Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
93 lines
2.8 KiB
JSON
93 lines
2.8 KiB
JSON
{
|
|
"name": "leaflet.offline",
|
|
"version": "3.2.1",
|
|
"description": "Offline tilelayer for leaflet",
|
|
"main": "dist/bundle.js",
|
|
"engines": {
|
|
"node": ">=16"
|
|
},
|
|
"types": "dist/types/src/index.d.ts",
|
|
"scripts": {
|
|
"type-check": "tsc --noEmit",
|
|
"docs:build": "typedoc --out docs src/index.ts",
|
|
"docs:deploy": "gh-pages -d docs",
|
|
"build": "rm -rf dist && rollup -c",
|
|
"lint": "eslint && prettier --check \"./(src|test)/**/*.ts\"",
|
|
"lint:fix": "eslint --fix src test",
|
|
"format": "eslint --fix src test && prettier -w \"./(src|test)/**/*.ts\"",
|
|
"test": "karma start --browsers ChromeHeadless",
|
|
"testci": "karma start --browsers ChromeHeadlessWithoutSandbox",
|
|
"test:watch": "karma start --no-single-run",
|
|
"watch": "rollup -c -w",
|
|
"preversion": "karma start --browsers ChromeHeadlessWithoutSandbox --single-run",
|
|
"prepare": "husky || true",
|
|
"prepublishOnly": "npm run build && npx husky install"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/allartk/leaflet.offline.git"
|
|
},
|
|
"keywords": [
|
|
"leaflet",
|
|
"offline"
|
|
],
|
|
"author": "Allart Kooiman",
|
|
"license": "ISC",
|
|
"bugs": {
|
|
"url": "https://github.com/allartk/leaflet.offline/issues"
|
|
},
|
|
"homepage": "https://github.com/allartk/leaflet.offline",
|
|
"devDependencies": {
|
|
"@commitlint/cli": "^20.1.0",
|
|
"@commitlint/config-conventional": "^19.2.2",
|
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
"@types/geojson": "^7946.0.8",
|
|
"@types/karma-chai": "^0.1.3",
|
|
"@types/karma-chai-sinon": "^0.1.16",
|
|
"@types/leaflet": "^1.7.9",
|
|
"@types/mocha": "^10.0.7",
|
|
"@types/sinon": "^17.0.3",
|
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
"@typescript-eslint/parser": "^7.18.0",
|
|
"chai": "^6.2.2",
|
|
"eslint": "^8.57.1",
|
|
"eslint-config-airbnb": "^19.0.4",
|
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
"eslint-config-prettier": "^10.0.1",
|
|
"fetch-mock": "^12.5.3",
|
|
"gh-pages": "^6.3.0",
|
|
"husky": "^9.0.11",
|
|
"karma": "^6.4.2",
|
|
"karma-chrome-launcher": "^3.2.0",
|
|
"karma-coverage": "^2.2.1",
|
|
"karma-firefox-launcher": "^2.1.2",
|
|
"karma-mocha": "^2.0.1",
|
|
"karma-mocha-reporter": "^2.2.5",
|
|
"karma-rollup-preprocessor": "^7.0.5",
|
|
"leaflet": "^1.7.1",
|
|
"leaflet.vectorgrid": "^1.1.0",
|
|
"lint-staged": "^16.2.3",
|
|
"mocha": "^11.7.5",
|
|
"npm-run-all": "^4.1.5",
|
|
"prettier": "^3.0.3",
|
|
"puppeteer": "^24.10.2",
|
|
"rollup": "^4.53.3",
|
|
"rollup-plugin-istanbul": "^5.0.0",
|
|
"sinon": "^21.0.0",
|
|
"typedoc": "^0.26.4",
|
|
"typedoc-plugin-markdown": "^4.2.10",
|
|
"typescript": "^5.0.4"
|
|
},
|
|
"lint-staged": {
|
|
"src/**/*.js": [
|
|
"eslint --cache --fix",
|
|
"prettier --write"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"idb": "^8.0.2",
|
|
"leaflet": "^1.6.0"
|
|
}
|
|
}
|