mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
6f0a171c74
Vector basemaps rendered Arabic, Hebrew, Persian and Urdu place names as isolated letters in logical order — "القاهرة" drawn as "ة ر ه ا ق ل ا" — because neither GL engine loads its optional RTL text plugin by default and TREK never registered one. Raster basemaps hid the problem, since their labels are drawn server-side, so it only became visible for everyone when the default basemap became a vector style. Both engine entry points now register the plugin lazily, so the payload is only fetched once a map actually paints RTL text and Latin-only users download nothing. The call is left with each engine because the two signatures genuinely differ: MapLibre takes (url, lazy) and returns a promise, Mapbox takes (url, callback, deferred). The plugin is bundled rather than loaded from a CDN: TREK is offline-first and the production CSP is script-src 'self', so a remote plugin URL would be refused by the worker that imports it. Bundling also puts it in the Workbox precache, so shaping keeps working offline. It needs a resolve alias because the package publishes only its ESM/WASM entry point through "exports" while setRTLTextPlugin requires the classic script in dist/ — the alias is shared by the build and test configs so the two cannot drift.
106 lines
3.5 KiB
JSON
106 lines
3.5 KiB
JSON
{
|
|
"name": "@trek/client",
|
|
"version": "4.2.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"prebuild": "node scripts/generate-icons.mjs",
|
|
"build": "vite build",
|
|
"build:analyze": "vite build --mode analyze",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:unit": "vitest run tests/unit",
|
|
"test:integration": "vitest run tests/integration src/**/*.test.{ts,tsx}",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"lint": "eslint .",
|
|
"lint:check": "eslint .",
|
|
"lint:pages": "node scripts/check-page-pattern.mjs",
|
|
"check:gl-split": "node scripts/check-gl-split.mjs",
|
|
"theme:lint": "node scripts/theme-lint.mjs",
|
|
"theme:lint:strict": "node scripts/theme-lint.mjs --strict",
|
|
"e2e": "playwright test",
|
|
"shots": "playwright test --project=screenshots",
|
|
"shots:promote": "node e2e/screenshots/promote.mjs",
|
|
"e2e:report": "playwright show-report",
|
|
"format": "prettier --write \"src/**/*.tsx\" \"src/**/*.css\"",
|
|
"format:check": "prettier --check \"src/**/*.tsx\" \"src/**/*.css\""
|
|
},
|
|
"dependencies": {
|
|
"@fontsource/bebas-neue": "^5.3.0",
|
|
"@fontsource/eb-garamond": "^5.3.0",
|
|
"@fontsource/geist-sans": "^5.2.5",
|
|
"@fontsource/inter": "^5.3.0",
|
|
"@fontsource/lora": "^5.3.0",
|
|
"@fontsource/museomoderno": "^5.3.0",
|
|
"@fontsource/playfair-display": "^5.3.0",
|
|
"@fontsource/poppins": "^5.2.7",
|
|
"@mapbox/mapbox-gl-rtl-text": "^0.4.0",
|
|
"@maplibre/maplibre-gl-leaflet": "0.1.4",
|
|
"@simplewebauthn/browser": "^13.1.2",
|
|
"@trek/shared": "*",
|
|
"axios": "^1.6.7",
|
|
"dexie": "^4.4.2",
|
|
"drag-drop-touch": "^1.3.1",
|
|
"heic-to": "^1.4.2",
|
|
"iso-3166-2": "^1.0.0",
|
|
"leaflet": "^1.9.4",
|
|
"lucide-react": "^0.344.0",
|
|
"mapbox-gl": "^3.22.0",
|
|
"maplibre-gl": "^5.24.0",
|
|
"marked": "^18.0.0",
|
|
"plyr": "^3.8.4",
|
|
"react": "^19.2.6",
|
|
"react-dom": "^19.2.6",
|
|
"react-dropzone": "^14.4.1",
|
|
"react-leaflet": "^5.0.0",
|
|
"react-leaflet-cluster": "^4.1.3",
|
|
"react-markdown": "^10.1.0",
|
|
"react-router": "^7.18.2",
|
|
"rehype-sanitize": "^6.0.0",
|
|
"remark-breaks": "^4.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"topojson-client": "^3.1.0",
|
|
"tz-lookup": "^6.1.25",
|
|
"zod": "^4.3.6",
|
|
"zustand": "^5.0.14"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@playwright/test": "^1.60.0",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
"@types/leaflet": "^1.9.8",
|
|
"@types/node": "^25.9.3",
|
|
"@types/react": "^19.2.15",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"@vitest/coverage-v8": "^4.1.9",
|
|
"autoprefixer": "^10.4.18",
|
|
"eslint": "^10.2.1",
|
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"fake-indexeddb": "^6.2.5",
|
|
"jsdom": "^29.0.1",
|
|
"msw": "^2.13.0",
|
|
"postcss": "^8.4.35",
|
|
"prettier": "^3.8.3",
|
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
"sharp": "^0.35.0",
|
|
"tailwindcss": "^3.4.1",
|
|
"typescript": "^6.0.2",
|
|
"typescript-eslint": "^8.58.2",
|
|
"vite": "8.1.0",
|
|
"vite-plugin-pwa": "^1.3.0",
|
|
"vitest": "^4.1.9"
|
|
}
|
|
}
|