Files
Sky Mulley 266544edfc Interactable Terminal Improvements (#7296)
Fixes some internal Discord discussions.

Most of this works around gaps in ghostty-web 0.4.0's selection and link
handling. Several fixes reach into its private internals, so the
dependency is pinned to `0.4.0` now instead of free spinning.

Ghostty seems to be an overall regression as a library over XTerm, below
are some internal hook ins to provide vital functionality back to the
console that v1 originally had.

### Selection
- Double-click selects the word on the line you clicked. Ghostty's
`getWordAtCell` reads the live screen row whatever the scroll position,
so once you'd scrolled up it picked a word from a different line.
- Triple-click now selects and copies the whole line, including every
row it wraps onto.
- Copying no longer puts a line break where a line only wrapped.
Ghostty's `getSelection` puts `\n` between every row, which broke copied
URLs and commands. The fix covers Ctrl/Cmd+C, drag-copy, right-click
copy and triple-click. If a row wrapped at a space, the space is kept.

### Links
- URLs that wrap across rows are detected as one link, and hovering any
part of them underlines the whole URL.
- Only `http:` and `https:` links can be opened. Console output comes
from the game server, so a `javascript:`, `file:` or `ssh:` link in the
output is ignored rather than passed to `window.open`.

### Focus
- The page no longer scrolls when the console takes focus. Ghostty
focuses the console on open and its hidden textarea on every press; both
now focus with `preventScroll`.
2026-10-16 14:11:59 -04:00

122 lines
5.0 KiB
JSON

{
"name": "pterodactyl-panel",
"engines": {
"node": ">=22.12"
},
"dependencies": {
"@base-ui/react": "^1.6.0",
"@codemirror/autocomplete": "^6.20.3",
"@codemirror/commands": "^6.10.4",
"@codemirror/lang-cpp": "^6.0.3",
"@codemirror/lang-css": "^6.3.1",
"@codemirror/lang-go": "^6.0.1",
"@codemirror/lang-html": "^6.4.11",
"@codemirror/lang-java": "^6.0.2",
"@codemirror/lang-javascript": "^6.2.5",
"@codemirror/lang-json": "^6.0.2",
"@codemirror/lang-markdown": "^6.5.0",
"@codemirror/lang-php": "^6.0.2",
"@codemirror/lang-python": "^6.2.1",
"@codemirror/lang-rust": "^6.0.2",
"@codemirror/lang-sass": "^6.0.2",
"@codemirror/lang-sql": "^6.10.0",
"@codemirror/lang-vue": "^0.1.3",
"@codemirror/lang-xml": "^6.1.0",
"@codemirror/lang-yaml": "^6.1.3",
"@codemirror/language": "^6.12.4",
"@codemirror/legacy-modes": "^6.5.3",
"@codemirror/search": "^6.7.1",
"@codemirror/state": "^6.7.0",
"@codemirror/view": "^6.43.4",
"@floating-ui/react": "^0.27.19",
"@google-recaptcha/react": "^2.4.2",
"@lezer/highlight": "^1.2.3",
"@tailwindcss/forms": "^0.5.2",
"@tanstack/form-core": "^1.33.0",
"@tanstack/react-form": "^1.33.0",
"@tanstack/react-query": "^5",
"@tanstack/react-router": "^1.170.17",
"@tanstack/react-table": "^8.21.3",
"axios": "^1.20.0",
"boring-avatars": "^1.7.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"codemirror": "^6.0.2",
"dayjs": "^1.11.21",
"ghostty-web": "0.4.0",
"i18next": "^25.8.0",
"i18next-http-backend": "^3.0.2",
"i18next-multiload-backend-adapter": "^2.3.0",
"lucide-react": "^1.17.0",
"pathe": "^2.0.3",
"qrcode.react": "^4.2.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"react-fast-compare": "^3.2.0",
"react-i18next": "^16.5.4",
"recharts": "^3.8.1",
"sonner": "^2.0.7",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.0",
"zustand": "^5.0.14"
},
"devDependencies": {
"@hey-api/openapi-ts": "0.99.0",
"@oxlint/plugins": "^1.77.0",
"@stylistic/eslint-plugin": "^5.10.0",
"@tailwindcss/postcss": "^4",
"@testing-library/dom": "^10",
"@testing-library/jest-dom": "^6",
"@testing-library/react": "^16",
"@testing-library/user-event": "^14.2.1",
"@types/node": "^22.0.0",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react-swc": "^4",
"concurrently": "^10.0.5",
"jsdom": "^26.1.0",
"oxfmt": "^0.72.0",
"oxlint": "^1.77.0",
"oxlint-tsgolint": "^7.0.2003",
"postcss": "^8.5.6",
"typescript": "^6",
"vite": "^8",
"vitest": "^4.1.9"
},
"overrides": {
"@hey-api/json-schema-ref-parser": {
"js-yaml": "^4.3.2"
}
},
"scripts": {
"clean": "cd public/assets && find . \\( -name \"*.js\" -o -name \"*.map\" \\) -type f -delete",
"test": "vitest run",
"test:watch": "vitest",
"tsc": "tsc --noEmit && tsc --project tools/oxlint/rules && npm --prefix packages/hello-world run typecheck",
"lint": "oxfmt --check resources/scripts packages/hello-world packages/sdk/docs-samples tools/oxlint && oxlint --type-aware resources/scripts packages/hello-world/src/client tools/oxlint",
"api:generate": "openapi-ts",
"extension:api:generate": "node scripts/generate-extension-api.mjs",
"api:refresh": "APP_URL=http://localhost PTERODACTYL_EXTENSIONS_ENABLED=false composer docs:openapi:verify && npm run api:generate",
"api:check": "npm run sdk:check && npm run tsc && npm run lint",
"dev": "vite",
"watch": "vite build --watch",
"prebuild": "npm run sdk:generate",
"build": "vite build",
"postbuild": "node scripts/check-extension-runtime.mjs",
"build:force": "npm run build --",
"build:production": "npm run build --",
"build:vite": "npm run build && npm --prefix packages/hello-world run build",
"serve": "vite",
"sdk:generate": "node scripts/generate-sdk-types.mjs && node scripts/generate-sdk-icons.mjs && node scripts/generate-sdk-views.mjs && node scripts/generate-core-classes.mjs && node scripts/generate-sdk-docs.mjs",
"sdk:check": "node scripts/generate-sdk-types.mjs --check && node scripts/generate-sdk-icons.mjs --check && node scripts/generate-sdk-views.mjs --check && node scripts/generate-sdk-docs.mjs --check && tsc --project packages/sdk/docs-samples && npm run sdk:testing && vitest run packages/sdk/types-drift.spec.ts",
"sdk:testing": "node scripts/build-sdk-testing.mjs",
"pretest": "npm run sdk:testing"
},
"browserslist": [
"> 0.5%",
"last 2 versions",
"firefox esr",
"not dead"
]
}