mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 14:36:22 -05:00
The standalone viewer (port 8084) drew basemaps only: a map file which is not a basemap was skipped. It now offers each overlay in its layer panel, hidden until turned on, with a checkbox per layer, draws it with the style beside it when there is one, and shows a feature's attributes on a click. The overlay logic is the map viewer's own. It moved to dependency-free modules (app/src/map-shared) which a browser can load as they are; the standalone viewer, which has no build step, loads copies of them from modules/map/static/js. A test fails while a copy differs from its module (`npm run sync:map-shared` makes the copies). What differs between the viewers is passed in: where a map file and its style are fetched from, and whether a layer can be checked before MapLibre is given it. The standalone viewer cannot check a layer first, so it adds an overlay's layers to the map one at a time once the style has loaded: MapLibre refuses a whole style over one layer it cannot draw, but only that layer when it is added by itself. The API also names a style by its path within the map directory, which is what the standalone viewer is served. Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
103 lines
3 KiB
JSON
103 lines
3 KiB
JSON
{
|
|
"name": "wrolpi-app",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"dependencies": {
|
|
"@acalcutt/maplibre-contour-pmtiles": "^0.1.2",
|
|
"@artsy/fresnel": "^8.5.0",
|
|
"@cypress/react18": "^2.0.1",
|
|
"@mantine/core": "^8.3.18",
|
|
"@mantine/hooks": "^8.3.18",
|
|
"@mantine/notifications": "^8.3.18",
|
|
"@maplibre/maplibre-gl-style-spec": "^24.8.5",
|
|
"@tabler/icons-react": "^3.50.0",
|
|
"@testing-library/react": "^13.4.0",
|
|
"@testing-library/user-event": "^14.6.8",
|
|
"cypress": "^15.21.1",
|
|
"dompurify": "^3.4.17",
|
|
"esptool-js": "^0.7.0",
|
|
"lodash": "^4.18.1",
|
|
"maplibre-gl": "^5.24.0",
|
|
"markdown-it": "^15.0.3",
|
|
"mathjs": "^15.2.0",
|
|
"pmtiles": "^4.5.0",
|
|
"protomaps-themes-base": "^4.5.0",
|
|
"query-string": "^10.0.0",
|
|
"react": "^18.3.1",
|
|
"react-colorful": "^5.8.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-dropzone": "^14.4.1",
|
|
"react-hotkeys-hook": "^5.3.3",
|
|
"react-qr-code": "^2.2.0",
|
|
"react-router": "^7.18.5",
|
|
"react-scripts": "5.0.1",
|
|
"three": "^0.186",
|
|
"web-vitals": "^6.2.3"
|
|
},
|
|
"scripts": {
|
|
"start": "react-scripts start",
|
|
"build": "BROWSERSLIST_IGNORE_OLD_DATA=true react-scripts build",
|
|
"test": "TZ=America/New_York react-scripts test",
|
|
"eject": "react-scripts eject",
|
|
"cy:run": "cypress run",
|
|
"sync:map-shared": "mkdir -p ../modules/map/static/js && cp src/map-shared/overlays.js src/map-shared/overlayStyle.js ../modules/map/static/js/",
|
|
"cy:open": "cypress open"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app"
|
|
]
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/dom": "^10.4.2",
|
|
"@testing-library/jest-dom": "^7.0.1",
|
|
"@types/lodash": "^4.17.27",
|
|
"@types/node": "^26.6.6",
|
|
"@types/react": "^18.3.17",
|
|
"@types/react-dom": "^18.3.5",
|
|
"typescript": "^5.9.3",
|
|
"webpack-dev-server": "^5.2.7"
|
|
},
|
|
"jest": {
|
|
"transform": {
|
|
"^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": "<rootDir>/jest/babelTransform.js"
|
|
},
|
|
"transformIgnorePatterns": [
|
|
"node_modules/(?!(react-hotkeys-hook|three)/)"
|
|
]
|
|
},
|
|
"overrides": {
|
|
"@babel/code-frame": "7.29.0",
|
|
"@babel/compat-data": "7.20.14",
|
|
"@babel/core": "7.20.12",
|
|
"@babel/generator": "7.29.1",
|
|
"@babel/helper-compilation-targets": "7.20.7",
|
|
"@babel/helper-globals": "7.28.0",
|
|
"@babel/helper-module-imports": "7.28.6",
|
|
"@babel/helper-module-transforms": "7.28.6",
|
|
"@babel/helper-string-parser": "7.27.1",
|
|
"@babel/helper-validator-identifier": "7.28.5",
|
|
"@babel/helper-validator-option": "7.18.6",
|
|
"@babel/helpers": "7.27.0",
|
|
"@babel/parser": "7.29.3",
|
|
"@babel/template": "7.28.6",
|
|
"@babel/traverse": "7.29.0",
|
|
"@babel/types": "7.29.0",
|
|
"fork-ts-checker-webpack-plugin": "^6.5.3",
|
|
"react-scripts": {
|
|
"typescript": "$typescript"
|
|
}
|
|
}
|
|
}
|