The body editor painted highlighted markdown in a div behind a transparent-text textarea, so the painted text and the caret were two different layout engines. Any wrap-point difference (borders, scrollbar gutters, engine rounding, trailing newlines) shifted the overlay by whole lines once content soft-wrapped, making clicks land on the wrong glyph and the document end feel unreachable. The CSS patch that preceded this reduced the drift but could not remove the class of bug. CodeMirror 6 owns text and caret together, so the failure mode is gone by construction rather than by maintenance. The body remains a markdown string, so prepareMarkdown, ::: directives, wikilinks, templates, revisions and the preview pipeline are untouched, with no data migration. - WikiMarkdownEditor: EditorView lifecycle, theme and markdown HighlightStyle bound to the app's CSS tokens, history, line wrapping, IME-safe keymap. - markdownCommands: one pure command table shared by toolbar buttons and keys. - editorChange: toolbar updates dispatch only the differing span, keeping undo granular and selections outside the edit intact. - Removes WikiEditorHighlightLayer, editorMetrics, lib/wiki/editorHighlight, useEditorHistory and the now-dead textarea selection reader. - Adds e2e proof: glyph-precise clicks across wrapped paragraphs, list items, image markdown and scrolled documents land at the exact clicked offset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
154 lines
6.2 KiB
JSON
154 lines
6.2 KiB
JSON
{
|
|
"name": "polaris-task-force",
|
|
"version": "0.16.0",
|
|
"description": "Web app for the Arma 3 unit Polaris Task Force. Uses Next.js for client- and server-side rendering, with a Postgres database and some other neat libraries.",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"scripts": {
|
|
"arena": "bun run src/arena/server.ts",
|
|
"bot": "bun run src/bot/index.ts",
|
|
"build": "bun run generate:version-info && cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=8000\" next build --webpack",
|
|
"dev": "bun run generate:version-info && cross-env NODE_OPTIONS=--no-deprecation next dev --webpack",
|
|
"devsafe": "rm -rf .next && bun run generate:version-info && cross-env NODE_OPTIONS=--no-deprecation next dev --webpack",
|
|
"devturbo": "rm -rf .next && bun run generate:version-info && cross-env NODE_OPTIONS=--no-deprecation next dev --turbo",
|
|
"generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap",
|
|
"generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types",
|
|
"generate:version-info": "bun run src/scripts/generateVersionInfo.ts",
|
|
"import:arma": "bun run src/tools/import/importArmaLibrary.ts",
|
|
"arma:dedupe": "bun run src/tools/import/dedupeVehicleTemplates.ts",
|
|
"icons:arma": "bun run src/tools/import/extractArmaIcons.ts",
|
|
"markers:arma": "bun run src/tools/arma/extractMarkers.ts",
|
|
"version:bump": "bun run src/scripts/bumpVersion.ts",
|
|
"lint": "cross-env NODE_OPTIONS=--no-deprecation next lint",
|
|
"payload": "cross-env NODE_OPTIONS=--no-deprecation payload",
|
|
"migrate": "bun run src/scripts/run-migrations.ts",
|
|
"mcp:key": "bun run src/tools/cli/create-mcp-key.ts",
|
|
"garage:backfill": "bun run src/tools/cli/backfillGaragePlacement.ts",
|
|
"db": "cross-env NODE_OPTIONS=--no-deprecation pnpm drizzle-kit",
|
|
"start": "cross-env NODE_OPTIONS=--no-deprecation next start",
|
|
"staging": "cross-env NODE_ENV=test NODE_OPTIONS=--no-deprecation next start",
|
|
"test": "pnpm run test:int && pnpm run test:e2e",
|
|
"test:e2e": "cross-env NODE_OPTIONS=\"--no-deprecation --no-experimental-strip-types\" pnpm exec playwright test",
|
|
"test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts",
|
|
"deploy": "bun pm version patch --message \"chore: update to %s\"",
|
|
"postversion": "bun run build",
|
|
"u:reset-password": "bun run src/tools/cli/reset-password.ts"
|
|
},
|
|
"dependencies": {
|
|
"@ai-stack/payloadcms": "^3.2.30",
|
|
"@codemirror/commands": "^6.11.1",
|
|
"@codemirror/lang-markdown": "^6.5.2",
|
|
"@codemirror/language": "^6.13.1",
|
|
"@codemirror/state": "^6.7.6",
|
|
"@codemirror/view": "^6.43.15",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@lexical/extension": "0.41.0",
|
|
"@lexical/link": "0.41.0",
|
|
"@lexical/list": "0.41.0",
|
|
"@lexical/react": "0.41.0",
|
|
"@lexical/rich-text": "0.41.0",
|
|
"@lexical/selection": "0.41.0",
|
|
"@lezer/highlight": "^1.2.5",
|
|
"@microsoft/clarity": "^1.0.2",
|
|
"@payloadcms/db-postgres": "3.88.0",
|
|
"@payloadcms/email-nodemailer": "3.88.0",
|
|
"@payloadcms/next": "3.88.0",
|
|
"@payloadcms/payload-cloud": "3.88.0",
|
|
"@payloadcms/plugin-form-builder": "3.88.0",
|
|
"@payloadcms/plugin-mcp": "^3.88.0",
|
|
"@payloadcms/richtext-lexical": "3.88.0",
|
|
"@payloadcms/ui": "3.88.0",
|
|
"@radix-ui/react-alert-dialog": "^1.1.23",
|
|
"@radix-ui/react-avatar": "^1.2.6",
|
|
"@radix-ui/react-checkbox": "^1.3.11",
|
|
"@radix-ui/react-collapsible": "^1.1.20",
|
|
"@radix-ui/react-context-menu": "^2.3.7",
|
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
"@radix-ui/react-label": "^2.1.15",
|
|
"@radix-ui/react-navigation-menu": "^1.2.22",
|
|
"@radix-ui/react-popover": "^1.1.23",
|
|
"@radix-ui/react-progress": "^1.1.16",
|
|
"@radix-ui/react-select": "^2.3.7",
|
|
"@radix-ui/react-separator": "^1.1.15",
|
|
"@radix-ui/react-slot": "^1.3.3",
|
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
"@tailwindcss/postcss": "^4.3.3",
|
|
"@types/leaflet": "^1.9.22",
|
|
"@types/nodemailer": "^8.0.1",
|
|
"@xyflow/react": "^12.11.3",
|
|
"ajv": "^8.18.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"cross-env": "^10.1.0",
|
|
"discord.js": "^14.27.0",
|
|
"dotenv": "17.2.3",
|
|
"graphql": "^16.14.2",
|
|
"jose": "^6.2.12",
|
|
"leaflet": "^1.9.4",
|
|
"lexical": "0.41.0",
|
|
"lucide-react": "^0.561.0",
|
|
"next": "16.2.11",
|
|
"next-themes": "^0.4.6",
|
|
"nodemailer": "^9.0.5",
|
|
"payload": "3.88.0",
|
|
"postcss": "8.5.18",
|
|
"prompt": "^1.3.0",
|
|
"radix-ui": "^1.6.7",
|
|
"react": "19.2.3",
|
|
"react-dom": "19.2.3",
|
|
"react-leaflet": "^5.0.0",
|
|
"react-markdown": "10.1.0",
|
|
"recharts": "3.8.0",
|
|
"rehype-highlight": "^7.0.2",
|
|
"remark-directive": "4.0.0",
|
|
"remark-gfm": "4.0.1",
|
|
"sharp": "0.34.5",
|
|
"sonner": "^2.0.8",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tailwindcss": "^4.3.3",
|
|
"tsx": "^4.23.12",
|
|
"ws": "^8.22.0"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "1.57.0",
|
|
"@testing-library/react": "16.3.1",
|
|
"@types/node": "^25.9.5",
|
|
"@types/react": "19.2.7",
|
|
"@types/react-dom": "19.2.3",
|
|
"@types/ws": "^8.18.2",
|
|
"@vitejs/plugin-react": "5.1.2",
|
|
"drizzle-kit": "^0.31.10",
|
|
"eslint": "^9.39.5",
|
|
"eslint-config-next": "16.0.10",
|
|
"jsdom": "27.3.0",
|
|
"playwright": "1.57.0",
|
|
"playwright-core": "1.57.0",
|
|
"prettier": "^3.9.6",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typescript": "5.9.3",
|
|
"vite-tsconfig-paths": "6.0.1",
|
|
"vitest": "4.0.16"
|
|
},
|
|
"engines": {
|
|
"node": "^18.20.2 || >=20.9.0",
|
|
"pnpm": "^9 || ^10"
|
|
},
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"sharp",
|
|
"esbuild",
|
|
"unrs-resolver"
|
|
]
|
|
},
|
|
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0",
|
|
"patchedDependencies": {
|
|
"@ai-stack/payloadcms@3.2.30": "patches/@ai-stack%2Fpayloadcms@3.2.30.patch",
|
|
"@payloadcms/ui@3.88.0": "patches/@payloadcms%2Fui@3.88.0.patch",
|
|
"drizzle-orm@0.45.2": "patches/drizzle-orm@0.45.2.patch"
|
|
}
|
|
}
|