Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Convert all files to typescript, linting fixes and cleanups

Russ Garrett993bbcf54784
diff --git a/web/.eslintrc b/web/.eslintrc
new file mode 100644
index 0000000..9948e23
--- /dev/null
+++ b/web/.eslintrc
@@ -0,0 +1,15 @@
+{
+ "root": true,
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint", "prettier"],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended",
+ "prettier"
+ ],
+ "rules": {
+ "@typescript-eslint/no-explicit-any": "off",
+ "prettier/prettier": 2
+ }
+}
diff --git a/web/.eslintrc.json b/web/.eslintrc.json
deleted file mode 100644
index 1ce0730..0000000
--- a/web/.eslintrc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "parserOptions": {
- "ecmaVersion": 12
- },
- "plugins": ["prettier"],
- "rules": {
- "prettier/prettier": "error"
- }
-}
diff --git a/web/.jshintrc b/web/.jshintrc
deleted file mode 100644
index e39b9b4..0000000
--- a/web/.jshintrc
+++ /dev/null
@@ -1 +0,0 @@
-{"esversion": 8}
diff --git a/web/.prettierrc b/web/.prettierrc
new file mode 100644
index 0000000..cd9e6e6
--- /dev/null
+++ b/web/.prettierrc
@@ -0,0 +1,6 @@
+{
+ "semi": false,
+ "trailingComma": "none",
+ "singleQuote": true,
+ "printWidth": 110
+}
diff --git a/web/README.md b/web/README.md
index 67ca12f..7a8fae0 100644
--- a/web/README.md
+++ b/web/README.md
@@ -1,23 +1,8 @@
+# Web Frontend
+Develop using:
-Z orders:
-
-0 - Underground petroleum
-20 - Underground water
-40 - Underground telecoms
-60 - Underground power
-
-100 - Petroleum landuse
-120 - Water landuse
-140 - Telecoms landuse
-160 - Power landuse
-
-200 - Overhead petroleum (?)
-220 - Overhead water (?!)
-240 - Overhead telecoms
-260 - Overhead power
-
-500 - Petroleum labels
-520 - Water labels
-540 - Telecoms labels
-560 - Power labels
+```js
+ npm install
+ npm start
+```
diff --git a/web/package-lock.json b/web/package-lock.json
index 77aaf37..91f32db 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -9,7 +9,6 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "@russss/maplibregl-layer-switcher": "^1.1.0",
"lodash.invert": "^4.3.0",
"lodash.isequal": "^4.5.0",
"lodash.sortby": "^4.7.0",
@@ -18,12 +17,50 @@
"title-case": "^3.0.3"
},
"devDependencies": {
+ "@russss/maplibregl-layer-switcher": "^1.2.3",
+ "@typescript-eslint/eslint-plugin": "^6.18.0",
+ "@typescript-eslint/parser": "^6.18.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.1.2",
"in-browser-language": "^1.0.3",
+ "prettier": "^3.1.1",
"typescript": "^5.0.2",
"vite": "^5.0.11",
"vite-plugin-render-svg": "^1.1.1"
}
},
+ "../../maplibregl-layer-switcher": {
+ "name": "@russss/maplibregl-layer-switcher",
+ "version": "1.2.3",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "lodash.invert": "^4.3.0",
+ "lodash.isequal": "^4.5.0",
+ "redom": "^3.24.2"
+ },
+ "devDependencies": {
+ "@types/jest": "^29.5.3",
+ "@types/lodash.invert": "^4.3.7",
+ "@types/lodash.isequal": "^4.5.6",
+ "jest": "^29.6.1",
+ "jest-environment-jsdom": "^29.6.1",
+ "maplibre-gl": "^3.1.0",
+ "prettier": "^3.0.0",
+ "ts-jest": "^29.1.1",
+ "typescript": "^5.3.3"
+ }
+ },
+ "node_modules/@aashutoshrathi/word-wrap": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
+ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz",
@@ -392,6 +429,148 @@
"node": ">=12"
}
},
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "dev": true,
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
+ "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
+ "dev": true,
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
+ "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^9.6.0",
+ "globals": "^13.19.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "8.56.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
+ "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array": {
+ "version": "0.11.13",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
+ "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "@humanwhocodes/object-schema": "^2.0.1",
+ "debug": "^4.1.1",
+ "minimatch": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=10.10.0"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/object-schema": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
+ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
@@ -574,6 +753,18 @@
"node": ">= 8"
}
},
+ "node_modules/@pkgr/core": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.0.tgz",
+ "integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
"node_modules/@resvg/resvg-js": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/@resvg/resvg-js/-/resvg-js-2.6.0.tgz",
@@ -959,14 +1150,8 @@
]
},
"node_modules/@russss/maplibregl-layer-switcher": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@russss/maplibregl-layer-switcher/-/maplibregl-layer-switcher-1.2.2.tgz",
- "integrity": "sha512-cAA56ixQw1nTCm54QdS6juXfbRlpnR/dm336kTahNSLOGNYo3i6D/37HAe4J2W/k9dYqf+1M/VeTXzmZdcqZuQ==",
- "dependencies": {
- "lodash.invert": "^4.3.0",
- "lodash.isequal": "^4.5.0",
- "redom": "^3.24.2"
- }
+ "resolved": "../../maplibregl-layer-switcher",
+ "link": true
},
"node_modules/@types/estree": {
"version": "1.0.5",
@@ -979,6 +1164,12 @@
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.13.tgz",
"integrity": "sha512-bmrNrgKMOhM3WsafmbGmC+6dsF2Z308vLFsQ3a/bT8X8Sv5clVYpPars/UPq+sAaJP+5OoLAYgwbkS5QEJdLUQ=="
},
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true
+ },
"node_modules/@types/mapbox__point-geometry": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz",
@@ -999,6 +1190,12 @@
"resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.5.tgz",
"integrity": "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA=="
},
+ "node_modules/@types/semver": {
+ "version": "7.5.6",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
+ "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
+ "dev": true
+ },
"node_modules/@types/supercluster": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz",
@@ -1007,6 +1204,203 @@
"@types/geojson": "*"
}
},
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.0.tgz",
+ "integrity": "sha512-3lqEvQUdCozi6d1mddWqd+kf8KxmGq2Plzx36BlkjuQe3rSTm/O98cLf0A4uDO+a5N1KD2SeEEl6fW97YHY+6w==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.5.1",
+ "@typescript-eslint/scope-manager": "6.18.0",
+ "@typescript-eslint/type-utils": "6.18.0",
+ "@typescript-eslint/utils": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0",
+ "debug": "^4.3.4",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.4",
+ "natural-compare": "^1.4.0",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.0.tgz",
+ "integrity": "sha512-v6uR68SFvqhNQT41frCMCQpsP+5vySy6IdgjlzUWoo7ALCnpaWYcz/Ij2k4L8cEsL0wkvOviCMpjmtRtHNOKzA==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "6.18.0",
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/typescript-estree": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.0.tgz",
+ "integrity": "sha512-o/UoDT2NgOJ2VfHpfr+KBY2ErWvCySNUIX/X7O9g8Zzt/tXdpfEU43qbNk8LVuWUT2E0ptzTWXh79i74PP0twA==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.0.tgz",
+ "integrity": "sha512-ZeMtrXnGmTcHciJN1+u2CigWEEXgy1ufoxtWcHORt5kGvpjjIlK9MUhzHm4RM8iVy6dqSaZA/6PVkX6+r+ChjQ==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/typescript-estree": "6.18.0",
+ "@typescript-eslint/utils": "6.18.0",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.0.tgz",
+ "integrity": "sha512-/RFVIccwkwSdW/1zeMx3hADShWbgBxBnV/qSrex6607isYjj05t36P6LyONgqdUrNLl5TYU8NIKdHUYpFvExkA==",
+ "dev": true,
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.0.tgz",
+ "integrity": "sha512-klNvl+Ql4NsBNGB4W9TZ2Od03lm7aGvTbs0wYaFYsplVPhr+oeXjlPZCDI4U9jgJIDK38W1FKhacCFzCC+nbIg==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "minimatch": "9.0.3",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.0.tgz",
+ "integrity": "sha512-wiKKCbUeDPGaYEYQh1S580dGxJ/V9HI7K5sbGAVklyf+o5g3O+adnS4UNJajplF4e7z2q0uVBaTdT/yLb4XAVA==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@types/json-schema": "^7.0.12",
+ "@types/semver": "^7.5.0",
+ "@typescript-eslint/scope-manager": "6.18.0",
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/typescript-estree": "6.18.0",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.0.tgz",
+ "integrity": "sha512-1wetAlSZpewRDb2h9p/Q8kRjdGuqdTAQbkJIOUMLug2LBLG+QOjiWoSj6/3B/hA9/tVTFFdtiKvAYoYnSRW/RA==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.18.0",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/@wasm-codecs/oxipng": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@wasm-codecs/oxipng/-/oxipng-1.0.1.tgz",
@@ -1018,7 +1412,6 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"dev": true,
- "optional": true,
"peer": true,
"bin": {
"acorn": "bin/acorn"
@@ -1027,6 +1420,59 @@
"node": ">=0.4.0"
}
},
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "peer": true,
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
@@ -1040,6 +1486,13 @@
"node": ">= 8"
}
},
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/arr-union": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
@@ -1048,6 +1501,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
@@ -1056,6 +1518,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -1065,6 +1533,15 @@
"node": ">=8"
}
},
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -1102,15 +1579,42 @@
"typewise-core": "^1.2"
}
},
- "node_modules/chokidar": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
- "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
}
],
"dependencies": {
@@ -1129,6 +1633,97 @@
"fsevents": "~2.3.2"
}
},
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
"node_modules/earcut": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz",
@@ -1172,6 +1767,247 @@
"@esbuild/win32-x64": "0.19.11"
}
},
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "8.56.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
+ "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.6.1",
+ "@eslint/eslintrc": "^2.1.4",
+ "@eslint/js": "8.56.0",
+ "@humanwhocodes/config-array": "^0.11.13",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@nodelib/fs.walk": "^1.2.8",
+ "@ungap/structured-clone": "^1.2.0",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
+ "debug": "^4.3.2",
+ "doctrine": "^3.0.0",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^7.2.2",
+ "eslint-visitor-keys": "^3.4.3",
+ "espree": "^9.6.1",
+ "esquery": "^1.4.2",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "globals": "^13.19.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "is-path-inside": "^3.0.3",
+ "js-yaml": "^4.1.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3",
+ "strip-ansi": "^6.0.1",
+ "text-table": "^0.2.0"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-config-prettier": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
+ "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
+ "dev": true,
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-prettier": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz",
+ "integrity": "sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==",
+ "dev": true,
+ "dependencies": {
+ "prettier-linter-helpers": "^1.0.0",
+ "synckit": "^0.8.6"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint-plugin-prettier"
+ },
+ "peerDependencies": {
+ "@types/eslint": ">=8.0.0",
+ "eslint": ">=8.0.0",
+ "eslint-config-prettier": "*",
+ "prettier": ">=3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/eslint": {
+ "optional": true
+ },
+ "eslint-config-prettier": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+ "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint/node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/eslint/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/espree": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
+ "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "acorn": "^8.9.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
+ "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
@@ -1183,6 +2019,19 @@
"node": ">=0.10.0"
}
},
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true
+ },
"node_modules/fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
@@ -1199,6 +2048,20 @@
"node": ">=8.6.0"
}
},
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/fastq": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
@@ -1208,6 +2071,19 @@
"reusify": "^1.0.4"
}
},
+ "node_modules/file-entry-cache": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "flat-cache": "^3.0.4"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -1220,6 +2096,52 @@
"node": ">=8"
}
},
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
+ "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.3",
+ "rimraf": "^3.0.2"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.2.9",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
+ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@@ -1263,6 +2185,27 @@
"resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz",
"integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA=="
},
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -1275,6 +2218,30 @@
"node": ">= 6"
}
},
+ "node_modules/glob/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/global-prefix": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz",
@@ -1299,6 +2266,58 @@
"which": "bin/which"
}
},
+ "node_modules/globals": {
+ "version": "13.24.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globby": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
+ "dev": true,
+ "dependencies": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.2.9",
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/graphemer": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
+ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
+ "dev": true
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -1318,12 +2337,66 @@
}
]
},
+ "node_modules/ignore": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
+ "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
"node_modules/in-browser-language": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/in-browser-language/-/in-browser-language-1.0.3.tgz",
"integrity": "sha512-kVKHZiWj+pDMLW/YaIP/r8OyaYVZZ4BZ/kD+fQrEp+FCoH/mprIIQhsEnUVkPuNEXCP5ZeWArOWz0KzDaLgICg==",
"dev": true
},
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/ini": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
@@ -1379,6 +2452,16 @@
"node": ">=0.12.0"
}
},
+ "node_modules/is-path-inside": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@@ -1403,6 +2486,40 @@
"node": ">=0.10.0"
}
},
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/json-stringify-pretty-compact": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz",
@@ -1413,12 +2530,52 @@
"resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz",
"integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="
},
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
"node_modules/kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lodash.invert": {
@@ -1431,11 +2588,30 @@
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
},
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/maplibre-gl": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.6.2.tgz",
@@ -1497,6 +2673,21 @@
"node": ">=8.6"
}
},
+ "node_modules/minimatch": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
@@ -1505,6 +2696,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
"node_modules/murmurhash-js": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz",
@@ -1528,6 +2725,12 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true
+ },
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -1537,6 +2740,118 @@
"node": ">=0.10.0"
}
},
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
+ "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "@aashutoshrathi/word-wrap": "^1.2.3",
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/pbf": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz",
@@ -1600,11 +2915,58 @@
"resolved": "https://registry.npmjs.org/potpack/-/potpack-2.0.0.tgz",
"integrity": "sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw=="
},
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
+ "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/prettier-linter-helpers": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
+ "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
+ "dev": true,
+ "dependencies": {
+ "fast-diff": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
"node_modules/protocol-buffers-schema": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
},
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -1651,6 +3013,16 @@
"url": "https://opencollective.com/redom"
}
},
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/resolve-protobuf-schema": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
@@ -1669,6 +3041,22 @@
"node": ">=0.10.0"
}
},
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/rollup": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.4.tgz",
@@ -1729,6 +3117,21 @@
"resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
"integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="
},
+ "node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/set-value": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
@@ -1743,6 +3146,38 @@
"node": ">=0.10.0"
}
},
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/sort-asc": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.2.0.tgz",
@@ -1841,6 +3276,32 @@
"node": ">=0.10.0"
}
},
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/supercluster": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz",
@@ -1849,6 +3310,35 @@
"kdbush": "^4.0.2"
}
},
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/synckit": {
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
+ "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
+ "dev": true,
+ "dependencies": {
+ "@pkgr/core": "^0.1.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
"node_modules/terser": {
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.19.0.tgz",
@@ -1877,6 +3367,13 @@
"optional": true,
"peer": true
},
+ "node_modules/text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/tinyqueue": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz",
@@ -1902,10 +3399,48 @@
"node": ">=8.0"
}
},
+ "node_modules/ts-api-utils": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz",
+ "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==",
+ "dev": true,
+ "engines": {
+ "node": ">=16.13.0"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.2.0"
+ }
+ },
"node_modules/tslib": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
- "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
"node_modules/typescript": {
"version": "5.1.6",
@@ -1947,6 +3482,16 @@
"node": ">=0.10.0"
}
},
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
"node_modules/vite": {
"version": "5.0.11",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz",
@@ -2026,9 +3571,58 @@
"@mapbox/vector-tile": "^1.3.1",
"pbf": "^3.2.1"
}
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
}
},
"dependencies": {
+ "@aashutoshrathi/word-wrap": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
+ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "dev": true,
+ "peer": true
+ },
"@esbuild/aix-ppc64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz",
@@ -2190,6 +3784,118 @@
"dev": true,
"optional": true
},
+ "@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "dev": true,
+ "requires": {
+ "eslint-visitor-keys": "^3.3.0"
+ }
+ },
+ "@eslint-community/regexpp": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
+ "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
+ "dev": true
+ },
+ "@eslint/eslintrc": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
+ "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^9.6.0",
+ "globals": "^13.19.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "@eslint/js": {
+ "version": "8.56.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
+ "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
+ "dev": true,
+ "peer": true
+ },
+ "@humanwhocodes/config-array": {
+ "version": "0.11.13",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
+ "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "@humanwhocodes/object-schema": "^2.0.1",
+ "debug": "^4.1.1",
+ "minimatch": "^3.0.5"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "peer": true
+ },
+ "@humanwhocodes/object-schema": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
+ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
+ "dev": true,
+ "peer": true
+ },
"@jridgewell/gen-mapping": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
@@ -2342,6 +4048,12 @@
"fastq": "^1.6.0"
}
},
+ "@pkgr/core": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.0.tgz",
+ "integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==",
+ "dev": true
+ },
"@resvg/resvg-js": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/@resvg/resvg-js/-/resvg-js-2.6.0.tgz",
@@ -2538,13 +4250,20 @@
"optional": true
},
"@russss/maplibregl-layer-switcher": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@russss/maplibregl-layer-switcher/-/maplibregl-layer-switcher-1.2.2.tgz",
- "integrity": "sha512-cAA56ixQw1nTCm54QdS6juXfbRlpnR/dm336kTahNSLOGNYo3i6D/37HAe4J2W/k9dYqf+1M/VeTXzmZdcqZuQ==",
+ "version": "file:../../maplibregl-layer-switcher",
"requires": {
+ "@types/jest": "^29.5.3",
+ "@types/lodash.invert": "^4.3.7",
+ "@types/lodash.isequal": "^4.5.6",
+ "jest": "^29.6.1",
+ "jest-environment-jsdom": "^29.6.1",
"lodash.invert": "^4.3.0",
"lodash.isequal": "^4.5.0",
- "redom": "^3.24.2"
+ "maplibre-gl": "^3.1.0",
+ "prettier": "^3.0.0",
+ "redom": "^3.24.2",
+ "ts-jest": "^29.1.1",
+ "typescript": "^5.3.3"
}
},
"@types/estree": {
@@ -2558,6 +4277,12 @@
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.13.tgz",
"integrity": "sha512-bmrNrgKMOhM3WsafmbGmC+6dsF2Z308vLFsQ3a/bT8X8Sv5clVYpPars/UPq+sAaJP+5OoLAYgwbkS5QEJdLUQ=="
},
+ "@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true
+ },
"@types/mapbox__point-geometry": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz",
@@ -2578,6 +4303,12 @@
"resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.5.tgz",
"integrity": "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA=="
},
+ "@types/semver": {
+ "version": "7.5.6",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
+ "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
+ "dev": true
+ },
"@types/supercluster": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz",
@@ -2586,6 +4317,114 @@
"@types/geojson": "*"
}
},
+ "@typescript-eslint/eslint-plugin": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.0.tgz",
+ "integrity": "sha512-3lqEvQUdCozi6d1mddWqd+kf8KxmGq2Plzx36BlkjuQe3rSTm/O98cLf0A4uDO+a5N1KD2SeEEl6fW97YHY+6w==",
+ "dev": true,
+ "requires": {
+ "@eslint-community/regexpp": "^4.5.1",
+ "@typescript-eslint/scope-manager": "6.18.0",
+ "@typescript-eslint/type-utils": "6.18.0",
+ "@typescript-eslint/utils": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0",
+ "debug": "^4.3.4",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.4",
+ "natural-compare": "^1.4.0",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ }
+ },
+ "@typescript-eslint/parser": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.0.tgz",
+ "integrity": "sha512-v6uR68SFvqhNQT41frCMCQpsP+5vySy6IdgjlzUWoo7ALCnpaWYcz/Ij2k4L8cEsL0wkvOviCMpjmtRtHNOKzA==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/scope-manager": "6.18.0",
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/typescript-estree": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0",
+ "debug": "^4.3.4"
+ }
+ },
+ "@typescript-eslint/scope-manager": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.0.tgz",
+ "integrity": "sha512-o/UoDT2NgOJ2VfHpfr+KBY2ErWvCySNUIX/X7O9g8Zzt/tXdpfEU43qbNk8LVuWUT2E0ptzTWXh79i74PP0twA==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0"
+ }
+ },
+ "@typescript-eslint/type-utils": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.0.tgz",
+ "integrity": "sha512-ZeMtrXnGmTcHciJN1+u2CigWEEXgy1ufoxtWcHORt5kGvpjjIlK9MUhzHm4RM8iVy6dqSaZA/6PVkX6+r+ChjQ==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/typescript-estree": "6.18.0",
+ "@typescript-eslint/utils": "6.18.0",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^1.0.1"
+ }
+ },
+ "@typescript-eslint/types": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.0.tgz",
+ "integrity": "sha512-/RFVIccwkwSdW/1zeMx3hADShWbgBxBnV/qSrex6607isYjj05t36P6LyONgqdUrNLl5TYU8NIKdHUYpFvExkA==",
+ "dev": true
+ },
+ "@typescript-eslint/typescript-estree": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.0.tgz",
+ "integrity": "sha512-klNvl+Ql4NsBNGB4W9TZ2Od03lm7aGvTbs0wYaFYsplVPhr+oeXjlPZCDI4U9jgJIDK38W1FKhacCFzCC+nbIg==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/visitor-keys": "6.18.0",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "minimatch": "9.0.3",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ }
+ },
+ "@typescript-eslint/utils": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.0.tgz",
+ "integrity": "sha512-wiKKCbUeDPGaYEYQh1S580dGxJ/V9HI7K5sbGAVklyf+o5g3O+adnS4UNJajplF4e7z2q0uVBaTdT/yLb4XAVA==",
+ "dev": true,
+ "requires": {
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@types/json-schema": "^7.0.12",
+ "@types/semver": "^7.5.0",
+ "@typescript-eslint/scope-manager": "6.18.0",
+ "@typescript-eslint/types": "6.18.0",
+ "@typescript-eslint/typescript-estree": "6.18.0",
+ "semver": "^7.5.4"
+ }
+ },
+ "@typescript-eslint/visitor-keys": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.0.tgz",
+ "integrity": "sha512-1wetAlSZpewRDb2h9p/Q8kRjdGuqdTAQbkJIOUMLug2LBLG+QOjiWoSj6/3B/hA9/tVTFFdtiKvAYoYnSRW/RA==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/types": "6.18.0",
+ "eslint-visitor-keys": "^3.4.1"
+ }
+ },
+ "@ungap/structured-clone": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "dev": true,
+ "peer": true
+ },
"@wasm-codecs/oxipng": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@wasm-codecs/oxipng/-/oxipng-1.0.1.tgz",
@@ -2597,9 +4436,46 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"dev": true,
- "optional": true,
"peer": true
},
+ "acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {}
+ },
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "peer": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
"anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
@@ -2610,22 +4486,50 @@
"picomatch": "^2.0.4"
}
},
+ "argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true,
+ "peer": true
+ },
"arr-union": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
"integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q=="
},
+ "array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true
+ },
"assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
"integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw=="
},
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -2660,6 +4564,24 @@
"typewise-core": "^1.2"
}
},
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "peer": true
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -2676,6 +4598,77 @@
"readdirp": "~3.6.0"
}
},
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true,
+ "peer": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true,
+ "peer": true
+ },
+ "cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "peer": true
+ },
+ "dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "requires": {
+ "path-type": "^4.0.0"
+ }
+ },
+ "doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "esutils": "^2.0.2"
+ }
+ },
"earcut": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz",
@@ -2712,6 +4705,173 @@
"@esbuild/win32-x64": "0.19.11"
}
},
+ "escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "peer": true
+ },
+ "eslint": {
+ "version": "8.56.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
+ "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.6.1",
+ "@eslint/eslintrc": "^2.1.4",
+ "@eslint/js": "8.56.0",
+ "@humanwhocodes/config-array": "^0.11.13",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@nodelib/fs.walk": "^1.2.8",
+ "@ungap/structured-clone": "^1.2.0",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
+ "debug": "^4.3.2",
+ "doctrine": "^3.0.0",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^7.2.2",
+ "eslint-visitor-keys": "^3.4.3",
+ "espree": "^9.6.1",
+ "esquery": "^1.4.2",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "globals": "^13.19.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "is-path-inside": "^3.0.3",
+ "js-yaml": "^4.1.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3",
+ "strip-ansi": "^6.0.1",
+ "text-table": "^0.2.0"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "is-glob": "^4.0.3"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "eslint-config-prettier": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
+ "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
+ "dev": true,
+ "requires": {}
+ },
+ "eslint-plugin-prettier": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz",
+ "integrity": "sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==",
+ "dev": true,
+ "requires": {
+ "prettier-linter-helpers": "^1.0.0",
+ "synckit": "^0.8.6"
+ }
+ },
+ "eslint-scope": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+ "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ }
+ },
+ "eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true
+ },
+ "espree": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
+ "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "acorn": "^8.9.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^3.4.1"
+ }
+ },
+ "esquery": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
+ "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "estraverse": "^5.1.0"
+ }
+ },
+ "esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "estraverse": "^5.2.0"
+ }
+ },
+ "estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "peer": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "peer": true
+ },
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
@@ -2720,6 +4880,19 @@
"is-extendable": "^0.1.0"
}
},
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true,
+ "peer": true
+ },
+ "fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true
+ },
"fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
@@ -2733,6 +4906,20 @@
"micromatch": "^4.0.4"
}
},
+ "fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true,
+ "peer": true
+ },
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "peer": true
+ },
"fastq": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
@@ -2742,6 +4929,16 @@
"reusify": "^1.0.4"
}
},
+ "file-entry-cache": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "flat-cache": "^3.0.4"
+ }
+ },
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -2751,6 +4948,43 @@
"to-regex-range": "^5.0.1"
}
},
+ "find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "flat-cache": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
+ "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.3",
+ "rimraf": "^3.0.2"
+ }
+ },
+ "flatted": {
+ "version": "3.2.9",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
+ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
+ "dev": true,
+ "peer": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true,
+ "peer": true
+ },
"fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@@ -2778,6 +5012,44 @@
"resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz",
"integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA=="
},
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -2807,17 +5079,96 @@
}
}
},
+ "globals": {
+ "version": "13.24.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "type-fest": "^0.20.2"
+ }
+ },
+ "globby": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
+ "dev": true,
+ "requires": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.2.9",
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ }
+ },
+ "graphemer": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
+ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "peer": true
+ },
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
+ "ignore": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
+ "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
+ "dev": true
+ },
+ "import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "peer": true
+ },
"in-browser-language": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/in-browser-language/-/in-browser-language-1.0.3.tgz",
"integrity": "sha512-kVKHZiWj+pDMLW/YaIP/r8OyaYVZZ4BZ/kD+fQrEp+FCoH/mprIIQhsEnUVkPuNEXCP5ZeWArOWz0KzDaLgICg==",
"dev": true
},
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true,
+ "peer": true
+ },
"ini": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
@@ -2858,6 +5209,13 @@
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
+ "is-path-inside": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+ "dev": true,
+ "peer": true
+ },
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@@ -2876,6 +5234,37 @@
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg=="
},
+ "js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "argparse": "^2.0.1"
+ }
+ },
+ "json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true,
+ "peer": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true,
+ "peer": true
+ },
+ "json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true,
+ "peer": true
+ },
"json-stringify-pretty-compact": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz",
@@ -2886,11 +5275,42 @@
"resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz",
"integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="
},
+ "keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "json-buffer": "3.0.1"
+ }
+ },
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
},
+ "levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ }
+ },
+ "locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "p-locate": "^5.0.0"
+ }
+ },
"lodash.invert": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.invert/-/lodash.invert-4.3.0.tgz",
@@ -2901,11 +5321,27 @@
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
+ "lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true,
+ "peer": true
+ },
"lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
},
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
"maplibre-gl": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.6.2.tgz",
@@ -2954,11 +5390,26 @@
"picomatch": "^2.3.1"
}
},
+ "minimatch": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ },
"minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
},
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
"murmurhash-js": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz",
@@ -2970,12 +5421,100 @@
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"dev": true
},
+ "natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true
+ },
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
},
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "optionator": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
+ "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "@aashutoshrathi/word-wrap": "^1.2.3",
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0"
+ }
+ },
+ "p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "yocto-queue": "^0.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "p-limit": "^3.0.2"
+ }
+ },
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "peer": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "peer": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "peer": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
"pbf": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz",
@@ -3013,11 +5552,40 @@
"resolved": "https://registry.npmjs.org/potpack/-/potpack-2.0.0.tgz",
"integrity": "sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw=="
},
+ "prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "peer": true
+ },
+ "prettier": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
+ "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
+ "dev": true
+ },
+ "prettier-linter-helpers": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
+ "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
+ "dev": true,
+ "requires": {
+ "fast-diff": "^1.1.2"
+ }
+ },
"protocol-buffers-schema": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
},
+ "punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "peer": true
+ },
"queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -3043,6 +5611,13 @@
"resolved": "https://registry.npmjs.org/redom/-/redom-3.29.1.tgz",
"integrity": "sha512-hEQEcPGRj4W2UT4IIBsNw29zMNV6vtXQ8ttitQ+Uc5XpdQ7i8d5VgKfm6fPmYbbApKXa98dUoEzDgk1oqXVlMg=="
},
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "peer": true
+ },
"resolve-protobuf-schema": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
@@ -3057,6 +5632,16 @@
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
"dev": true
},
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
"rollup": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.4.tgz",
@@ -3094,6 +5679,15 @@
"resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
"integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="
},
+ "semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
"set-value": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
@@ -3105,6 +5699,29 @@
"split-string": "^3.0.1"
}
},
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "peer": true
+ },
+ "slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true
+ },
"sort-asc": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.2.0.tgz",
@@ -3181,6 +5798,23 @@
}
}
},
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "peer": true
+ },
"supercluster": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz",
@@ -3189,6 +5823,26 @@
"kdbush": "^4.0.2"
}
},
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "synckit": {
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
+ "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
+ "dev": true,
+ "requires": {
+ "@pkgr/core": "^0.1.0",
+ "tslib": "^2.6.2"
+ }
+ },
"terser": {
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.19.0.tgz",
@@ -3213,6 +5867,13 @@
}
}
},
+ "text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
+ "dev": true,
+ "peer": true
+ },
"tinyqueue": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz",
@@ -3235,10 +5896,34 @@
"is-number": "^7.0.0"
}
},
+ "ts-api-utils": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz",
+ "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==",
+ "dev": true,
+ "requires": {}
+ },
"tslib": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
- "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ },
+ "type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "prelude-ls": "^1.2.1"
+ }
+ },
+ "type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true,
+ "peer": true
},
"typescript": {
"version": "5.1.6",
@@ -3270,6 +5955,16 @@
"set-value": "^2.0.1"
}
},
+ "uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
"vite": {
"version": "5.0.11",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz",
@@ -3303,6 +5998,36 @@
"@mapbox/vector-tile": "^1.3.1",
"pbf": "^3.2.1"
}
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true,
+ "peer": true
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "peer": true
}
}
}
diff --git a/web/package.json b/web/package.json
index 12fa23d..0609b93 100644
--- a/web/package.json
+++ b/web/package.json
@@ -19,13 +19,18 @@
},
"homepage": "https://github.com/openinframap/web#readme",
"devDependencies": {
+ "@russss/maplibregl-layer-switcher": "^1.2.3",
+ "@typescript-eslint/eslint-plugin": "^6.18.0",
+ "@typescript-eslint/parser": "^6.18.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.1.2",
"in-browser-language": "^1.0.3",
+ "prettier": "^3.1.1",
"typescript": "^5.0.2",
"vite": "^5.0.11",
"vite-plugin-render-svg": "^1.1.1"
},
"dependencies": {
- "@russss/maplibregl-layer-switcher": "^1.1.0",
"lodash.invert": "^4.3.0",
"lodash.isequal": "^4.5.0",
"lodash.sortby": "^4.7.0",
diff --git a/web/public/heatmap.json b/web/public/heatmap.json
index fe7a2c9..99a5bff 100644
--- a/web/public/heatmap.json
+++ b/web/public/heatmap.json
@@ -8,7 +8,5 @@
"minzoom": 2,
"maxzoom": 17,
"tiles": ["https://openinframap.org/heatmap/{z}/{x}/{y}.pbf"],
- "vector_layers": [
- {"id": "power_heatmap_solar", "description": "Solar power heatmap", "fields": {}}
- ]
+ "vector_layers": [{ "id": "power_heatmap_solar", "description": "Solar power heatmap", "fields": {} }]
}
diff --git a/web/public/img/maptiler.png b/web/public/img/maptiler.png
deleted file mode 100644
index 36809ae..0000000
Binary files a/web/public/img/maptiler.png and /dev/null differ
diff --git a/web/public/map.json b/web/public/map.json
index 04d9a31..a3ac69a 100644
--- a/web/public/map.json
+++ b/web/public/map.json
@@ -9,24 +9,24 @@
"maxzoom": 17,
"tiles": ["https://openinframap.org/tiles/{z}/{x}/{y}.pbf"],
"vector_layers": [
- {"id": "power_line", "description": "Power lines and cables", "fields": {}},
- {"id": "power_tower", "description": "Power towers and poles", "fields": {}},
- {"id": "power_substation", "description": "Power substations", "fields": {}},
- {"id": "power_substation_point", "description": "Power substations centroids", "fields": {}},
- {"id": "power_plant", "description": "Power plants", "fields": {}},
- {"id": "power_plant_point", "description": "Power plant centroids", "fields": {}},
- {"id": "power_generator", "description": "Power generators", "fields": {}},
- {"id": "power_generator_area", "description": "Power generators mapped as areas", "fields": {}},
- {"id": "power_heatmap_solar", "description": "Solar generation heatmap points", "fields": {}},
- {"id": "power_transformer", "description": "Power transformers", "fields": {}},
- {"id": "power_compensator", "description": "Power compensators", "fields": {}},
- {"id": "power_switch", "description": "Power switches", "fields": {}},
- {"id": "telecoms_communication_line", "description": "Telecoms lines", "fields": {}},
- {"id": "telecoms_data_center", "description": "Telecoms datacenters and exchanges", "fields": {}},
- {"id": "telecoms_mast", "description": "Communications masts", "fields": {}},
- {"id": "petroleum_pipeline", "description": "Petroleum pipelines", "fields": {}},
- {"id": "petroleum_well", "description": "Petroleum wells", "fields": {}},
- {"id": "petroleum_site", "description": "Petroleum sites", "fields": {}},
- {"id": "water_pipeline", "description": "Water pipelines", "fields": {}}
+ { "id": "power_line", "description": "Power lines and cables", "fields": {} },
+ { "id": "power_tower", "description": "Power towers and poles", "fields": {} },
+ { "id": "power_substation", "description": "Power substations", "fields": {} },
+ { "id": "power_substation_point", "description": "Power substations centroids", "fields": {} },
+ { "id": "power_plant", "description": "Power plants", "fields": {} },
+ { "id": "power_plant_point", "description": "Power plant centroids", "fields": {} },
+ { "id": "power_generator", "description": "Power generators", "fields": {} },
+ { "id": "power_generator_area", "description": "Power generators mapped as areas", "fields": {} },
+ { "id": "power_heatmap_solar", "description": "Solar generation heatmap points", "fields": {} },
+ { "id": "power_transformer", "description": "Power transformers", "fields": {} },
+ { "id": "power_compensator", "description": "Power compensators", "fields": {} },
+ { "id": "power_switch", "description": "Power switches", "fields": {} },
+ { "id": "telecoms_communication_line", "description": "Telecoms lines", "fields": {} },
+ { "id": "telecoms_data_center", "description": "Telecoms datacenters and exchanges", "fields": {} },
+ { "id": "telecoms_mast", "description": "Communications masts", "fields": {} },
+ { "id": "petroleum_pipeline", "description": "Petroleum pipelines", "fields": {} },
+ { "id": "petroleum_well", "description": "Petroleum wells", "fields": {} },
+ { "id": "petroleum_site", "description": "Petroleum sites", "fields": {} },
+ { "id": "water_pipeline", "description": "Water pipelines", "fields": {} }
]
}
diff --git a/web/public/taginfo.json b/web/public/taginfo.json
index 2a9411d..b862222 100644
--- a/web/public/taginfo.json
+++ b/web/public/taginfo.json
@@ -13,46 +13,46 @@
"key": "power",
"object_types": ["node", "way", "relation", "area"]
},
- {
- "key": "plant:source",
+ {
+ "key": "plant:source",
"object_types": ["relation", "area"]
- },
- {
- "key": "plant:output:electricity",
+ },
+ {
+ "key": "plant:output:electricity",
"object_types": ["relation", "area"]
- },
- {
- "key": "plant:method",
+ },
+ {
+ "key": "plant:method",
"object_types": ["relation", "area"]
- },
- {
- "key": "plant:storage",
+ },
+ {
+ "key": "plant:storage",
"object_types": ["relation", "area"]
- },
- {
- "key": "generator:source",
+ },
+ {
+ "key": "generator:source",
"object_types": ["node", "area"]
- },
- {
- "key": "generator:output:electricity",
+ },
+ {
+ "key": "generator:output:electricity",
"object_types": ["node", "area"]
- },
- {
- "key": "generator:method",
+ },
+ {
+ "key": "generator:method",
"object_types": ["node", "area"]
- },
- {
- "key": "voltage",
+ },
+ {
+ "key": "voltage",
"object_types": ["node", "way", "relation", "area"]
- },
- {
- "key": "frequency",
+ },
+ {
+ "key": "frequency",
"object_types": ["node", "way", "relation", "area"]
- },
- {
- "key": "circuits",
+ },
+ {
+ "key": "circuits",
"object_types": ["way"]
- },
+ },
{
"key": "communication",
"value": "line",
diff --git a/web/src/editbutton.ts b/web/src/editbutton.ts
index 6cec1df..f06ced8 100644
--- a/web/src/editbutton.ts
+++ b/web/src/editbutton.ts
@@ -1,62 +1,67 @@
-import { el, setStyle } from "redom";
+import { IControl } from 'maplibre-gl'
+import { el, setStyle } from 'redom'
-class EditButton {
- _map: any;
- _control!: HTMLDivElement;
+class EditButton implements IControl {
+ _map: any
+ _control!: HTMLDivElement
onAdd(map: maplibregl.Map) {
- this._map = map;
+ this._map = map
- var button = el("button", "Edit in JOSM");
+ const button = el('button', 'Edit in JOSM')
button.onclick = (ev) => {
- this._click();
- ev.preventDefault();
- };
+ this._click()
+ ev.preventDefault()
+ }
+
+ this._control = el('div', button, {
+ class: 'maplibregl-ctrl'
+ })
- this._control = el("div", button, {
- class: "maplibregl-ctrl",
- });
+ map.on('zoomend', () => {
+ this.updateVisibility()
+ })
- map.on("zoomend", () => {
- this.updateVisibility();
- });
+ this.updateVisibility()
+ return this._control
+ }
- this.updateVisibility();
- return this._control;
+ onRemove(): void {
+ this._map = undefined
+ this._control.remove()
}
updateVisibility() {
if (this._map.getZoom() > 14) {
- setStyle(this._control, { display: "block" });
+ setStyle(this._control, { display: 'block' })
} else {
- setStyle(this._control, { display: "none" });
+ setStyle(this._control, { display: 'none' })
}
}
_getJosmURL() {
- var url = "http://127.0.0.1:8111/load_and_zoom";
- var bounds = this._map.getBounds();
+ const url = 'http://127.0.0.1:8111/load_and_zoom'
+ const bounds = this._map.getBounds()
return (
url +
- "?left=" +
+ '?left=' +
bounds.getWest() +
- "&right=" +
+ '&right=' +
bounds.getEast() +
- "&top=" +
+ '&top=' +
bounds.getNorth() +
- "&bottom=" +
+ '&bottom=' +
bounds.getSouth()
- );
+ )
}
_click() {
- var url = this._getJosmURL();
+ const url = this._getJosmURL()
fetch(url).catch((error) => {
alert(
- "Unable to edit in JOSM - make sure it's running and has remote control enabled.\nError: " +
- error
- );
- });
+ "Unable to edit in JOSM - make sure it's running and has remote control enabled.\nError: " + error
+ )
+ })
}
}
-export { EditButton as default };
+export { EditButton as default }
diff --git a/web/src/friendlynames.ts b/web/src/friendlynames.ts
index 22fb0dd..62463aa 100644
--- a/web/src/friendlynames.ts
+++ b/web/src/friendlynames.ts
@@ -1,35 +1,35 @@
// Map layer names to a descriptive string to show in the infobox
const friendlyNames: { [key: string]: string } = {
- power_transformer: "Transformer",
- power_tower: "Power tower",
- power_pole: "Power pole",
- power_generator: "Generator",
- power_wind_turbine: "Wind turbine",
- power_substation: "Substation",
- power_substation_point: "Substation",
- power_switch: "Switch",
- power_compensator: "Compensator",
- power_cable: "Cable",
- power_line_1: "Power line",
- power_line_2: "Power line",
- power_line_3: "Power line",
- power_line_4: "Power line",
- power_line_underground_1: "Underground power line",
- power_line_underground_2: "Underground power line",
- power_line_underground_3: "Underground power line",
- power_line_underground_4: "Underground power line",
- power_line_case: "Underground power line",
- power_line_label: "Power line",
- power_solar_panel: "Solar panel",
- power_plant: "Power plant",
- telecoms_communication_line: "Telecoms line",
- telecoms_mast: "Telecoms mast",
- telecoms_data_center: "Telecoms building",
- petroleum_pipeline: "Pipeline",
- petroleum_pipeline_case: "Pipeline",
- petroleum_pipeline_label: "Pipeline",
- petroleum_well: "Well",
- water_pipeline: "Water pipeline",
-};
+ power_transformer: 'Transformer',
+ power_tower: 'Power tower',
+ power_pole: 'Power pole',
+ power_generator: 'Generator',
+ power_wind_turbine: 'Wind turbine',
+ power_substation: 'Substation',
+ power_substation_point: 'Substation',
+ power_switch: 'Switch',
+ power_compensator: 'Compensator',
+ power_cable: 'Cable',
+ power_line_1: 'Power line',
+ power_line_2: 'Power line',
+ power_line_3: 'Power line',
+ power_line_4: 'Power line',
+ power_line_underground_1: 'Underground power line',
+ power_line_underground_2: 'Underground power line',
+ power_line_underground_3: 'Underground power line',
+ power_line_underground_4: 'Underground power line',
+ power_line_case: 'Underground power line',
+ power_line_label: 'Power line',
+ power_solar_panel: 'Solar panel',
+ power_plant: 'Power plant',
+ telecoms_communication_line: 'Telecoms line',
+ telecoms_mast: 'Telecoms mast',
+ telecoms_data_center: 'Telecoms building',
+ petroleum_pipeline: 'Pipeline',
+ petroleum_pipeline_case: 'Pipeline',
+ petroleum_pipeline_label: 'Pipeline',
+ petroleum_well: 'Well',
+ water_pipeline: 'Water pipeline'
+}
-export default friendlyNames;
+export default friendlyNames
diff --git a/web/src/index.ts b/web/src/index.ts
index 1247726..f1425d2 100644
--- a/web/src/index.ts
+++ b/web/src/index.ts
@@ -1,24 +1,23 @@
-import "./index.css";
-import maplibregl, { IControl } from "maplibre-gl";
-
-// @ts-ignore
-import LayerSwitcher from "@russss/maplibregl-layer-switcher";
-// @ts-ignore
-import URLHash from "@russss/maplibregl-layer-switcher/urlhash";
-
-import EditButton from "./editbutton.js";
-import InfoPopup from "./infopopup.js";
-import KeyControl from "./key/key.js";
-
-import map_style from "./style/style.json";
-import style_base from "./style/style_base.js";
-import style_labels from "./style/style_labels.js";
-import style_oim_power from "./style/style_oim_power.js";
-import style_oim_power_heatmap from "./style/style_oim_power_heatmap.js";
-import style_oim_telecoms from "./style/style_oim_telecoms.js";
-import style_oim_petroleum from "./style/style_oim_petroleum.js";
-import style_oim_water from "./style/style_oim_water.js";
-import loadIcons from "./loadIcons.js";
+import './index.css'
+import maplibregl from 'maplibre-gl'
+
+import LayerSwitcher from '@russss/maplibregl-layer-switcher'
+import URLHash from '@russss/maplibregl-layer-switcher/urlhash'
+
+import EditButton from './editbutton.js'
+import InfoPopup from './infopopup.js'
+import KeyControl from './key/key.js'
+
+import map_style from './style/style.js'
+import style_base from './style/style_base.js'
+import style_labels from './style/style_labels.js'
+import style_oim_power from './style/style_oim_power.js'
+import style_oim_power_heatmap from './style/style_oim_power_heatmap.js'
+import style_oim_telecoms from './style/style_oim_telecoms.js'
+import style_oim_petroleum from './style/style_oim_petroleum.js'
+import style_oim_water from './style/style_oim_water.js'
+import loadIcons from './loadIcons.js'
+import { LayerSpecificationWithZIndex } from './style/types.js'
function init() {
// if (!maplibregl.supported({ failIfMajorPerformanceCaveat: true })) {
@@ -31,37 +30,37 @@ function init() {
// mount(document.body, infobox);
// }
- var oim_layers = style_oim_power.concat(
- // @ts-ignore
- style_oim_power_heatmap,
- style_oim_petroleum,
- style_oim_telecoms,
- style_oim_water
- );
+ const oim_layers: LayerSpecificationWithZIndex[] = [
+ ...style_oim_power,
+ ...style_oim_power_heatmap,
+ ...style_oim_petroleum,
+ ...style_oim_telecoms,
+ ...style_oim_water
+ ]
oim_layers.sort((a, b) => {
- if (a["zorder"] < b["zorder"]) return -1;
- if (a["zorder"] > b["zorder"]) return 1;
- return 0;
- });
+ if (!a.zorder || !b.zorder) return 0
+ if (a.zorder < b.zorder) return -1
+ if (a.zorder > b.zorder) return 1
+ return 0
+ })
const layers = {
- Power: "power_",
- "Solar Generation": "heatmap_",
- Telecoms: "telecoms_",
- "Oil & Gas": "petroleum_",
- Water: "water_",
- Labels: "place_",
- };
- const layers_enabled = ["Power", "Labels"];
- const layer_switcher = new LayerSwitcher(layers, layers_enabled);
- var url_hash = new URLHash(layer_switcher);
- layer_switcher.urlhash = url_hash;
-
- // @ts-ignore
- map_style.layers = style_base.concat(oim_layers, style_labels);
-
- layer_switcher.setInitialVisibility(map_style);
+ Power: 'power_',
+ 'Solar Generation': 'heatmap_',
+ Telecoms: 'telecoms_',
+ 'Oil & Gas': 'petroleum_',
+ Water: 'water_',
+ Labels: 'place_'
+ }
+ const layers_enabled = ['Power', 'Labels']
+ const layer_switcher = new LayerSwitcher(layers, layers_enabled)
+ const url_hash = new URLHash(layer_switcher)
+ layer_switcher.urlhash = url_hash
+
+ map_style.layers = style_base.concat(oim_layers, style_labels)
+
+ layer_switcher.setInitialVisibility(map_style)
if (import.meta.env.DEV) {
// map_style["sprite"] = "http://localhost:8080/style/sprite";
@@ -69,49 +68,46 @@ function init() {
// map_style['sources']['solar_heatmap']['url'] = 'http://localhost:8081/capabilities/solar_heatmap.json'
}
- var map = new maplibregl.Map(
+ const map = new maplibregl.Map(
url_hash.init({
- container: "map",
+ container: 'map',
style: map_style,
minZoom: 2,
maxZoom: 17.9,
center: [12, 26],
localIdeographFontFamily: "'Apple LiSung', 'Noto Sans', 'Noto Sans CJK SC', sans-serif"
})
- );
+ )
- loadIcons(map);
+ loadIcons(map)
- map.dragRotate.disable();
- map.touchZoomRotate.disableRotation();
+ map.dragRotate.disable()
+ map.touchZoomRotate.disableRotation()
- url_hash.enable(map);
- map.addControl(
- new maplibregl.NavigationControl({ showCompass: false }),
- "top-right"
- );
+ url_hash.enable(map)
+ map.addControl(new maplibregl.NavigationControl({ showCompass: false }), 'top-right')
map.addControl(
new maplibregl.GeolocateControl({
positionOptions: {
- enableHighAccuracy: true,
+ enableHighAccuracy: true
},
- trackUserLocation: true,
+ trackUserLocation: true
})
- );
+ )
- map.addControl(new maplibregl.ScaleControl({}), "bottom-left");
+ map.addControl(new maplibregl.ScaleControl({}), 'bottom-left')
- map.addControl(new KeyControl() as unknown as IControl, "top-right");
- map.addControl(layer_switcher, "top-right");
- map.addControl(new EditButton() as unknown as IControl, "bottom-right");
+ map.addControl(new KeyControl(), 'top-right')
+ map.addControl(layer_switcher, 'top-right')
+ map.addControl(new EditButton(), 'bottom-right')
new InfoPopup(
- oim_layers.map((layer: { [x: string]: any }) => layer["id"]),
+ oim_layers.map((layer: { [x: string]: any }) => layer['id']),
9
- ).add(map);
+ ).add(map)
}
-if (document.readyState != "loading") {
- init();
+if (document.readyState != 'loading') {
+ init()
} else {
- document.addEventListener("DOMContentLoaded", init);
+ document.addEventListener('DOMContentLoaded', init)
}
diff --git a/web/src/infobox.ts b/web/src/infobox.ts
index 7892d85..cfa8576 100644
--- a/web/src/infobox.ts
+++ b/web/src/infobox.ts
@@ -1,24 +1,24 @@
-import { el, unmount } from "redom";
+import { el, unmount } from 'redom'
class InfoBox {
- content: HTMLDivElement;
- el: HTMLDivElement;
+ content: HTMLDivElement
+ el: HTMLDivElement
constructor(title: string) {
- this.content = el("div", { class: "infobox-content" });
- const closebutton = el("a", "×");
- const header = el("div", title, closebutton, { class: "infobox-header" });
+ this.content = el('div', { class: 'infobox-content' })
+ const closebutton = el('a', '×')
+ const header = el('div', title, closebutton, { class: 'infobox-header' })
- this.el = el("div", header, this.content, { class: "infobox" });
+ this.el = el('div', header, this.content, { class: 'infobox' })
closebutton.onclick = (e) => {
- unmount(document.body, this.el);
- e.preventDefault();
- };
+ unmount(document.body, this.el)
+ e.preventDefault()
+ }
}
update(data: string) {
- this.content.innerHTML = data;
+ this.content.innerHTML = data
}
}
-export default InfoBox;
+export default InfoBox
diff --git a/web/src/infopopup.ts b/web/src/infopopup.ts
index 1b32c9e..9e8cb29 100644
--- a/web/src/infopopup.ts
+++ b/web/src/infopopup.ts
@@ -1,305 +1,282 @@
-import "./infopopup.css";
-
-import maplibregl, {
- MapGeoJSONFeature,
- MapMouseEvent,
- Popup,
-} from "maplibre-gl";
-import { titleCase } from "title-case";
-// @ts-ignore
-import browserLanguage from "in-browser-language";
-import { local_name_tags } from "./l10n.ts";
-import friendlyNames from "./friendlynames.ts";
-import { el, mount, setChildren, RedomElement } from "redom";
+import './infopopup.css'
+
+import maplibregl, { MapGeoJSONFeature, MapMouseEvent, Popup } from 'maplibre-gl'
+import { titleCase } from 'title-case'
+// @ts-expect-error No types
+import browserLanguage from 'in-browser-language'
+import { local_name_tags } from './l10n.ts'
+import friendlyNames from './friendlynames.ts'
+import { el, mount, setChildren, RedomElement } from 'redom'
const hidden_keys = [
- "osm_id",
- "name",
- "wikidata",
- "wikipedia",
- "construction",
- "tunnel",
- "is_node",
- "area",
- "gid",
- "ref_len",
-];
+ 'osm_id',
+ 'name',
+ 'wikidata',
+ 'wikipedia',
+ 'construction',
+ 'tunnel',
+ 'is_node',
+ 'area',
+ 'gid',
+ 'ref_len'
+]
class InfoPopup {
- layers: string[];
- min_zoom: any;
- popup_obj: Popup | null;
- _map!: maplibregl.Map;
+ layers: string[]
+ min_zoom: any
+ popup_obj: Popup | null
+ _map!: maplibregl.Map
constructor(layers: string[], min_zoom: number) {
- this.layers = layers;
- this.min_zoom = min_zoom;
- this.popup_obj = null;
+ this.layers = layers
+ this.min_zoom = min_zoom
+ this.popup_obj = null
}
add(map: maplibregl.Map) {
- this._map = map;
+ this._map = map
- for (let layer of this.layers) {
- map.on("click", layer, (e) => {
+ for (const layer of this.layers) {
+ map.on('click', layer, (e) => {
if (this._map.getZoom() > this.min_zoom) {
- this.popup(e);
+ this.popup(e)
}
- });
+ })
- map.on("mouseenter", layer, () => {
+ map.on('mouseenter', layer, () => {
if (this._map.getZoom() > this.min_zoom) {
- map.getCanvas().style.cursor = "pointer";
+ map.getCanvas().style.cursor = 'pointer'
}
- });
- map.on("mouseleave", layer, () => {
+ })
+ map.on('mouseleave', layer, () => {
if (this._map.getZoom() > this.min_zoom) {
- map.getCanvas().style.cursor = "";
+ map.getCanvas().style.cursor = ''
}
- });
+ })
}
}
osmLink(id: number, is_node: boolean) {
- let url = "";
- let value = "";
+ let url = ''
+ let value = ''
if (id > 0) {
if (is_node) {
- url = `https://openstreetmap.org/node/${id}`;
- value = `Node ${id}`;
+ url = `https://openstreetmap.org/node/${id}`
+ value = `Node ${id}`
} else {
- url = `https://openstreetmap.org/way/${id}`;
- value = `Way ${id}`;
+ url = `https://openstreetmap.org/way/${id}`
+ value = `Way ${id}`
}
} else {
- url = `https://openstreetmap.org/relation/${-id}`;
- value = `Relation ${-id}`;
+ url = `https://openstreetmap.org/relation/${-id}`
+ value = `Relation ${-id}`
}
- return el("a", value, {
+ return el('a', value, {
href: url,
- target: "_blank",
- });
+ target: '_blank'
+ })
}
renderKey(key: string, value: any) {
- if (hidden_keys.includes(key) || key.startsWith("name_")) {
- return null;
+ if (hidden_keys.includes(key) || key.startsWith('name_')) {
+ return null
}
if (!value) {
- return null;
+ return null
}
- if (key.startsWith("voltage")) {
- value = `${Number(parseFloat(value).toFixed(2))} kV`;
+ if (key.startsWith('voltage')) {
+ value = `${Number(parseFloat(value).toFixed(2))} kV`
}
- if (key == "output") {
- let val = parseFloat(value);
+ if (key == 'output') {
+ const val = parseFloat(value)
if (val < 1) {
- value = `${(val * 1000).toFixed(2)} kW`;
+ value = `${(val * 1000).toFixed(2)} kW`
} else {
- value = `${val.toFixed(2)} MW`;
+ value = `${val.toFixed(2)} MW`
}
}
- if (key == "frequency" && value == "0") {
- value = "DC";
+ if (key == 'frequency' && value == '0') {
+ value = 'DC'
}
- if (key == "url") {
- value = el("a", "Website", {
+ if (key == 'url') {
+ value = el('a', 'Website', {
href: value,
- target: "_blank",
- });
- key = "Website";
+ target: '_blank'
+ })
+ key = 'Website'
} else {
- key = titleCase(key);
+ key = titleCase(key)
}
- return el("tr", el("th", key), el("td", value));
+ return el('tr', el('th', key), el('td', value))
}
nameTags(feature: MapGeoJSONFeature) {
- let title_text = "";
+ let title_text = ''
for (const tag of local_name_tags) {
if (feature.properties[tag]) {
- title_text = feature.properties[tag];
- break;
+ title_text = feature.properties[tag]
+ break
}
}
if (!title_text) {
- const layer_id = feature.layer["id"];
+ const layer_id = feature.layer['id']
if (layer_id in friendlyNames) {
- title_text = friendlyNames[layer_id];
+ title_text = friendlyNames[layer_id]
} else {
- title_text = feature.layer["id"];
+ title_text = feature.layer['id']
}
}
- let container = el("div.nameContainer", el("h3", title_text));
+ const container = el('div.nameContainer', el('h3', title_text))
// If we're showing a translated name, also show the name tag
if (feature.properties.name && title_text != feature.properties.name) {
- mount(container, el("h4", feature.properties.name));
+ mount(container, el('h4', feature.properties.name))
}
- return container;
+ return container
}
popupHtml(feature: MapGeoJSONFeature) {
- let attrs_table = el("table", { class: "item_info" });
+ const attrs_table = el('table', { class: 'item_info' })
const renderedProperties = Object.keys(feature.properties)
.sort()
.map((key) => this.renderKey(key, feature.properties[key]))
- .filter((x) => x !== null) as HTMLTableRowElement[];
- setChildren(attrs_table, renderedProperties);
+ .filter((x) => x !== null) as HTMLTableRowElement[]
+ setChildren(attrs_table, renderedProperties)
- let links_container = el("div");
+ const links_container = el('div')
- if (feature.properties["osm_id"]) {
+ if (feature.properties['osm_id']) {
mount(
links_container,
- el("a", el("div.ext_link.osm_link"), {
- href: this.osmLink(
- feature.properties["osm_id"],
- feature.properties["is_node"]
- ),
- target: "_blank",
- title: "OpenStreetMap",
+ el('a', el('div.ext_link.osm_link'), {
+ href: this.osmLink(feature.properties['osm_id'], feature.properties['is_node']),
+ target: '_blank',
+ title: 'OpenStreetMap'
})
- );
+ )
}
- let wikidata_div = el("div");
- if (feature.properties["wikidata"]) {
- this.fetch_wikidata(
- feature.properties["wikidata"],
- wikidata_div,
- links_container
- );
+ const wikidata_div = el('div')
+ if (feature.properties['wikidata']) {
+ this.fetch_wikidata(feature.properties['wikidata'], wikidata_div, links_container)
} else {
- let wp_link = this.wp_link(feature.properties["wikipedia"]);
+ const wp_link = this.wp_link(feature.properties['wikipedia'])
if (wp_link) {
- mount(links_container, wp_link);
+ mount(links_container, wp_link)
}
}
- let content = el(
- "div",
- this.nameTags(feature),
- links_container,
- wikidata_div,
- attrs_table
- );
+ const content = el('div', this.nameTags(feature), links_container, wikidata_div, attrs_table)
- if (feature.layer.id.startsWith("power_plant")) {
+ if (feature.layer.id.startsWith('power_plant')) {
mount(
content,
- el("a", "More info", {
- href: "/stats/object/plant/" + feature.properties["osm_id"],
- target: "_blank",
+ el('a', 'More info', {
+ href: '/stats/object/plant/' + feature.properties['osm_id'],
+ target: '_blank'
})
- );
+ )
}
- return content;
+ return content
}
- popup(
- e: MapMouseEvent & { features?: MapGeoJSONFeature[] | undefined } & Object
- ) {
+ popup(e: MapMouseEvent & { features?: MapGeoJSONFeature[] | undefined }) {
if (this.popup_obj && this.popup_obj.isOpen()) {
- this.popup_obj.remove();
+ this.popup_obj.remove()
}
if (e.features === undefined || e.features.length == 0) {
- return;
+ return
}
this.popup_obj = new maplibregl.Popup()
.setLngLat(e.lngLat)
.setDOMContent(this.popupHtml(e.features[0]))
- .addTo(this._map);
+ .addTo(this._map)
}
- fetch_wikidata(
- id: string,
- container: RedomElement,
- links_container: RedomElement
- ) {
+ fetch_wikidata(id: string, container: RedomElement, links_container: RedomElement) {
fetch(`https://openinframap.org/wikidata/${id}`)
.then((response) => {
- return response.json();
+ return response.json()
})
.then((data) => {
- if (data["thumbnail"]) {
+ if (data['thumbnail']) {
mount(
container,
el(
- "a",
- el("img.wikidata_image", {
- src: data["thumbnail"],
+ 'a',
+ el('img.wikidata_image', {
+ src: data['thumbnail']
}),
{
- href: `https://commons.wikimedia.org/wiki/File:${data["image"]}`,
- target: "_blank",
+ href: `https://commons.wikimedia.org/wiki/File:${data['image']}`,
+ target: '_blank'
}
)
- );
+ )
}
- let languages = browserLanguage.list();
- languages.push("en");
+ const languages = browserLanguage.list()
+ languages.push('en')
for (const lang of languages) {
- if (data["sitelinks"][`${lang}wiki`]) {
+ if (data['sitelinks'][`${lang}wiki`]) {
mount(
links_container,
- el("a", el("div.ext_link.wikipedia_link"), {
- href: data["sitelinks"][`${lang}wiki`]["url"],
- target: "_blank",
- title: "Wikipedia",
+ el('a', el('div.ext_link.wikipedia_link'), {
+ href: data['sitelinks'][`${lang}wiki`]['url'],
+ target: '_blank',
+ title: 'Wikipedia'
})
- );
- break;
+ )
+ break
}
}
- if (data["sitelinks"]["commonswiki"]) {
+ if (data['sitelinks']['commonswiki']) {
mount(
links_container,
- el("a", el("div.ext_link.commons_link"), {
- href: data["sitelinks"]["commonswiki"]["url"],
- target: "_blank",
- title: "Wikimedia Commons",
+ el('a', el('div.ext_link.commons_link'), {
+ href: data['sitelinks']['commonswiki']['url'],
+ target: '_blank',
+ title: 'Wikimedia Commons'
})
- );
+ )
}
mount(
links_container,
- el("a", el("div.ext_link.wikidata_link"), {
+ el('a', el('div.ext_link.wikidata_link'), {
href: `https://wikidata.org/wiki/${id}`,
- target: "_blank",
- title: "Wikidata",
+ target: '_blank',
+ title: 'Wikidata'
})
- );
- });
+ )
+ })
}
wp_link(value: string) {
if (!value) {
- return null;
+ return null
}
- let parts = value.split(":", 2);
+ const parts = value.split(':', 2)
if (parts.length > 1) {
- let url = `https://${parts[0]}.wikipedia.org/wiki/${parts[1]}`;
- return el("a", el("div.ext_link.wikipedia_link"), {
+ const url = `https://${parts[0]}.wikipedia.org/wiki/${parts[1]}`
+ return el('a', el('div.ext_link.wikipedia_link'), {
href: url,
- target: "_blank",
- title: "Wikipedia",
- });
+ target: '_blank',
+ title: 'Wikipedia'
+ })
}
}
}
-export { InfoPopup as default };
+export { InfoPopup as default }
diff --git a/web/src/key/key.ts b/web/src/key/key.ts
index fa1abf6..e28360d 100644
--- a/web/src/key/key.ts
+++ b/web/src/key/key.ts
@@ -1,11 +1,12 @@
-import { el, mount, list, setStyle, RedomElement } from "redom";
+import { IControl } from 'maplibre-gl'
+import { el, mount, list, setStyle, RedomElement } from 'redom'
import {
default as power_layers,
voltage_scale,
special_voltages,
- plant_types,
-} from "../style/style_oim_power.ts";
-import comms_layers from "../style/style_oim_telecoms.js";
+ plant_types
+} from '../style/style_oim_power.ts'
+import comms_layers from '../style/style_oim_telecoms.js'
import {
default as petroleum_layers,
colour_oil,
@@ -14,237 +15,235 @@ import {
colour_intermediate,
colour_hydrogen,
colour_co2,
- colour_unknown,
-} from "../style/style_oim_petroleum.js";
+ colour_unknown
+} from '../style/style_oim_petroleum.js'
import {
colour_freshwater,
colour_wastewater,
colour_hotwater,
- colour_steam,
-} from "../style/style_oim_water.js";
-import { svgLine, svgLineFromLayer, svgRectFromLayer } from "./svg.js";
-import "./key.css";
+ colour_steam
+} from '../style/style_oim_water.js'
+import { svgLine, svgLineFromLayer, svgRectFromLayer } from './svg.js'
+import './key.css'
// @ts-expect-error Vite virtual module
-import { manifest } from 'virtual:render-svg';
+import { manifest } from 'virtual:render-svg'
-const line_thickness = 6;
+const line_thickness = 6
class Td {
- el: HTMLTableCellElement;
+ el: HTMLTableCellElement
constructor() {
- this.el = el("td");
+ this.el = el('td')
}
update(data: string | RedomElement) {
- if (typeof data == "string") {
- this.el.innerHTML = data;
+ if (typeof data == 'string') {
+ this.el.innerHTML = data
} else if (!data) {
- return;
+ return
} else {
- mount(this.el, data);
+ mount(this.el, data)
}
}
}
-const Tr = list.extend("tr", Td);
+const Tr = list.extend('tr', Td)
-class KeyControl {
- _map: any;
- _control!: HTMLButtonElement;
- _container!: HTMLDivElement;
- _pane: RedomElement | undefined;
+class KeyControl implements IControl {
+ _map: maplibregl.Map | undefined
+ _control!: HTMLButtonElement
+ _container!: HTMLDivElement
+ _pane: RedomElement | undefined
onAdd(map: maplibregl.Map) {
- this._map = map;
+ this._map = map
- this._control = el("button", {
- class: "maplibregl-ctrl-icon oim-key-control",
- });
+ this._control = el('button', {
+ class: 'maplibregl-ctrl-icon oim-key-control'
+ })
- this._container = el("div", { class: "maplibregl-ctrl oim-key-panel" });
+ this._container = el('div', { class: 'maplibregl-ctrl oim-key-panel' })
- this.populate();
+ this.populate()
this._control.onclick = () => {
- this._container.style.display = "block";
- this._control.style.display = "none";
- };
-
- setTimeout(() => this.resize(), 100);
- this._map.on("resize", () => this.resize());
- return el("div", this._control, this._container, {
- class: "maplibregl-ctrl maplibregl-ctrl-group",
- });
+ this._container.style.display = 'block'
+ this._control.style.display = 'none'
+ }
+
+ setTimeout(() => this.resize(), 100)
+ this._map.on('resize', () => this.resize())
+ return el('div', this._control, this._container, {
+ class: 'maplibregl-ctrl maplibregl-ctrl-group'
+ })
+ }
+
+ onRemove(): void {
+ this._map = undefined
+ this._container.remove()
+ this._control.remove()
+ this._pane = undefined
}
resize() {
if (!this._pane) {
- return;
+ return
}
// Set max-height of key depending on window style
- let map_style = window.getComputedStyle(this._map.getContainer());
- let cont_style;
- if (this._control.style.display != "none") {
- cont_style = this._control.getBoundingClientRect();
+ const map_style = window.getComputedStyle(this._map!.getContainer())
+ let cont_style
+ if (this._control.style.display != 'none') {
+ cont_style = this._control.getBoundingClientRect()
} else {
- cont_style = this._container.getBoundingClientRect();
+ cont_style = this._container.getBoundingClientRect()
}
- let height = parseInt(map_style.height) - cont_style.top - 100 + "px";
- setStyle(this._pane, { "max-height": height });
+ const height = parseInt(map_style.height) - cont_style.top - 100 + 'px'
+ setStyle(this._pane, { 'max-height': height })
}
header() {
- const close_button = el(".oim-key-close", "×");
+ const close_button = el('.oim-key-close', '×')
close_button.onclick = () => {
- this._container.style.display = "none";
- this._control.style.display = "block";
- };
- return el(".oim-key-header", el("h2", "Key"), close_button);
+ this._container.style.display = 'none'
+ this._control.style.display = 'block'
+ }
+ return el('.oim-key-header', el('h2', 'Key'), close_button)
}
async populate() {
- mount(this._container, this.header());
-
- let pane = el(".oim-key-pane");
- pane.appendChild(el("h3", "Power Lines"));
- mount(pane, await this.voltageTable());
- pane.appendChild(el("h3", "Power Plants"));
- mount(pane, await this.plantTable());
- pane.appendChild(el("h3", "Power Generators"));
- mount(pane, await this.generatorTable());
- pane.appendChild(el("h3", "Other Power"));
- mount(pane, await this.towerTable());
- pane.appendChild(el("h3", "Telecoms"));
- mount(pane, await this.telecomTable());
- pane.appendChild(el("h3", "Petroleum"));
- mount(pane, this.petroleumTable());
- pane.appendChild(el("h3", "Water"));
- mount(pane, this.waterTable());
- this._pane = pane;
-
- mount(this._container, pane);
+ mount(this._container, this.header())
+
+ const pane = el('.oim-key-pane')
+ pane.appendChild(el('h3', 'Power Lines'))
+ mount(pane, await this.voltageTable())
+ pane.appendChild(el('h3', 'Power Plants'))
+ mount(pane, await this.plantTable())
+ pane.appendChild(el('h3', 'Power Generators'))
+ mount(pane, await this.generatorTable())
+ pane.appendChild(el('h3', 'Other Power'))
+ mount(pane, await this.towerTable())
+ pane.appendChild(el('h3', 'Telecoms'))
+ mount(pane, await this.telecomTable())
+ pane.appendChild(el('h3', 'Petroleum'))
+ mount(pane, this.petroleumTable())
+ pane.appendChild(el('h3', 'Water'))
+ mount(pane, this.waterTable())
+ this._pane = pane
+
+ mount(this._container, pane)
}
async voltageTable() {
- let rows = [];
- for (let row of voltage_scale) {
- let label = row[0];
+ let rows = []
+ for (const row of voltage_scale) {
+ let label = row[0]?.toString()
if (label === null) {
- label = "< 10 kV";
+ label = '< 10 kV'
} else {
- label = `≥ ${label} kV`;
+ label = `≥ ${label} kV`
}
- rows.push([label, row[1]]);
+ rows.push([label, row[1]])
}
for (const [key, value] of Object.entries(special_voltages)) {
- rows.push([key, value]);
+ rows.push([key, value])
}
- rows = rows.map((row) => [row[0], svgLine(row[1], line_thickness)]);
+ rows = rows.map((row) => [row[0], svgLine(row[1], line_thickness)])
- rows.push(["Underground", svgLine("#7A7A85", line_thickness, "3 2")]);
- rows.push(["Line Reference", await this.sprite("power_line_ref")]);
+ rows.push(['Underground', svgLine('#7A7A85', line_thickness, '3 2')])
+ rows.push(['Line Reference', await this.sprite('power_line_ref')])
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
async sprite(name: string, size = 25) {
- let spriteDiv = el("img.oim-plant-sprite", {
+ const spriteDiv = el('img.oim-plant-sprite', {
src: manifest['svg'][name],
- height: size,
- });
+ height: size
+ })
setStyle(spriteDiv, {
- "max-width": size + "px",
- });
- return spriteDiv as unknown as SVGElement;
+ 'max-width': size + 'px'
+ })
+ return spriteDiv as unknown as SVGElement
}
async plantTable() {
- let rows = [];
+ const rows = []
for (const [key, value] of Object.entries(plant_types)) {
- rows.push([
- key.charAt(0).toUpperCase() + key.slice(1),
- await this.sprite(value),
- ]);
+ rows.push([key.charAt(0).toUpperCase() + key.slice(1), await this.sprite(value)])
}
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
async generatorTable() {
- let rows = [
- ["Wind Turbine", await this.sprite("power_wind", 14)],
- ["Solar Panel", svgRectFromLayer(power_layers, "power_solar_panel")],
- ];
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const rows = [
+ ['Wind Turbine', await this.sprite('power_wind', 14)],
+ ['Solar Panel', svgRectFromLayer(power_layers, 'power_solar_panel')]
+ ]
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
async towerTable() {
- let rows = [
- ["Tower/Pylon", await this.sprite("power_tower", 10)],
- ["Transition Tower", await this.sprite("power_tower_transition", 10)],
- ["Pole", await this.sprite("power_pole", 8)],
- ["Transition Pole", await this.sprite("power_pole_transition", 8)],
- ["Transformer", await this.sprite("power_transformer")],
- ["Switch", await this.sprite("power_switch")],
- ["Compensator", await this.sprite("power_compensator")],
- ["Converter", await this.sprite("converter")],
- ];
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const rows = [
+ ['Tower/Pylon', await this.sprite('power_tower', 10)],
+ ['Transition Tower', await this.sprite('power_tower_transition', 10)],
+ ['Pole', await this.sprite('power_pole', 8)],
+ ['Transition Pole', await this.sprite('power_pole_transition', 8)],
+ ['Transformer', await this.sprite('power_transformer')],
+ ['Switch', await this.sprite('power_switch')],
+ ['Compensator', await this.sprite('power_compensator')],
+ ['Converter', await this.sprite('converter')]
+ ]
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
async telecomTable() {
- let rows = [
- ["Cable", svgLineFromLayer(comms_layers, "telecoms_line")],
- ["Tower/Mast", await this.sprite("comms_tower")],
- [
- "Datacenter/Exchange",
- svgRectFromLayer(comms_layers, "telecoms_data_center"),
- ],
- ];
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const rows = [
+ ['Cable', svgLineFromLayer(comms_layers, 'telecoms_line')],
+ ['Tower/Mast', await this.sprite('comms_tower')],
+ ['Datacenter/Exchange', svgRectFromLayer(comms_layers, 'telecoms_data_center')]
+ ]
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
petroleumTable() {
- let rows = [
- ["Oil", svgLine(colour_oil, line_thickness)],
- ["Gas", svgLine(colour_gas, line_thickness)],
- ["Petroleum Intermediate", svgLine(colour_intermediate, line_thickness)],
- ["Fuel", svgLine(colour_fuel, line_thickness)],
- ["Hydrogen", svgLine(colour_hydrogen, line_thickness)],
- ["CO<sub>2</sub>", svgLine(colour_co2, line_thickness)],
- ["Other", svgLine(colour_unknown, line_thickness)],
- [
- "Petroleum Facility",
- svgRectFromLayer(petroleum_layers, "petroleum_site"),
- ],
- ];
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const rows = [
+ ['Oil', svgLine(colour_oil, line_thickness)],
+ ['Gas', svgLine(colour_gas, line_thickness)],
+ ['Petroleum Intermediate', svgLine(colour_intermediate, line_thickness)],
+ ['Fuel', svgLine(colour_fuel, line_thickness)],
+ ['Hydrogen', svgLine(colour_hydrogen, line_thickness)],
+ ['CO<sub>2</sub>', svgLine(colour_co2, line_thickness)],
+ ['Other', svgLine(colour_unknown, line_thickness)],
+ ['Petroleum Facility', svgRectFromLayer(petroleum_layers, 'petroleum_site')]
+ ]
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
waterTable() {
- let rows = [
- ["Fresh Water", svgLine(colour_freshwater, line_thickness)],
- ["Hot Water", svgLine(colour_hotwater, line_thickness)],
- ["Steam", svgLine(colour_steam, line_thickness)],
- ["Wastewater", svgLine(colour_wastewater, line_thickness)],
- ];
- let table = list("table", Tr);
- table.update(rows);
- return table;
+ const rows = [
+ ['Fresh Water', svgLine(colour_freshwater, line_thickness)],
+ ['Hot Water', svgLine(colour_hotwater, line_thickness)],
+ ['Steam', svgLine(colour_steam, line_thickness)],
+ ['Wastewater', svgLine(colour_wastewater, line_thickness)]
+ ]
+ const table = list('table', Tr)
+ table.update(rows)
+ return table
}
}
-export { KeyControl as default };
+export { KeyControl as default }
diff --git a/web/src/key/svg.ts b/web/src/key/svg.ts
index 15bca00..949279a 100644
--- a/web/src/key/svg.ts
+++ b/web/src/key/svg.ts
@@ -1,80 +1,73 @@
-import { svg, setStyle } from "redom";
+import { svg, setStyle } from 'redom'
function getLayer(layers: { [key: string]: any }[], id: string) {
- for (let l of layers) {
- if (l["id"] == id) {
- return l;
+ for (const l of layers) {
+ if (l['id'] == id) {
+ return l
}
}
- return null;
+ return null
}
-export function svgLine(colour: string, thickness: number, dash = "") {
- const height = 15;
- const width = 30;
+export function svgLine(colour: string, thickness: number, dash = '') {
+ const height = 15
+ const width = 30
- let line = svg("line", {
+ const line = svg('line', {
x1: 0,
y1: height / 2,
x2: width,
- y2: height / 2,
- });
+ y2: height / 2
+ })
setStyle(line, {
stroke: colour,
- "stroke-width": thickness,
- "stroke-dasharray": dash,
- });
+ 'stroke-width': thickness,
+ 'stroke-dasharray': dash
+ })
- return svg("svg", line, { height: height, width: width });
+ return svg('svg', line, { height: height, width: width })
}
-export function svgLineFromLayer(
- layers: { [key: string]: any }[],
- name: string,
- thickness = 2
-) {
- let layer = getLayer(layers, name);
+export function svgLineFromLayer(layers: { [key: string]: any }[], name: string, thickness = 2) {
+ const layer = getLayer(layers, name)
if (layer) {
- let dasharray = layer ? layer["paint"]["line-dasharray"].join(" ") : "";
- return svgLine(layer["paint"]["line-color"], thickness, dasharray);
+ const dasharray = layer ? layer['paint']['line-dasharray'].join(' ') : ''
+ return svgLine(layer['paint']['line-color'], thickness, dasharray)
}
}
-export function svgRect(colour: string, stroke = "black", opacity = 1) {
- const height = 15;
- const width = 30;
+export function svgRect(colour: string, stroke = 'black', opacity = 1) {
+ const height = 15
+ const width = 30
- let rect = svg("rect", {
+ const rect = svg('rect', {
width: width,
- height: height,
- });
+ height: height
+ })
setStyle(rect, {
fill: colour,
stroke: stroke,
- "stroke-width": 1,
- opacity: opacity,
- });
+ 'stroke-width': 1,
+ opacity: opacity
+ })
- return svg("svg", rect, { height: height, width: width });
+ return svg('svg', rect, { height: height, width: width })
}
-export function svgRectFromLayer(
- layers: { [key: string]: any }[],
- name: string
-) {
- let layer = getLayer(layers, name);
+export function svgRectFromLayer(layers: { [key: string]: any }[], name: string) {
+ const layer = getLayer(layers, name)
if (!layer) {
- return;
+ return
}
- let opacity = 1;
- let outline_color = "";
- if (layer["paint"]["fill-opacity"]) {
- opacity = layer["paint"]["fill-opacity"];
+ let opacity = 1
+ let outline_color = ''
+ if (layer['paint']['fill-opacity']) {
+ opacity = layer['paint']['fill-opacity']
}
- if (layer["paint"]["fill-outline-color"]) {
- outline_color = layer["paint"]["fill-outline-color"];
+ if (layer['paint']['fill-outline-color']) {
+ outline_color = layer['paint']['fill-outline-color']
}
- return svgRect(layer["paint"]["fill-color"], outline_color, opacity);
+ return svgRect(layer['paint']['fill-color'], outline_color, opacity)
}
diff --git a/web/src/l10n.ts b/web/src/l10n.ts
index ba3300f..9f28faf 100644
--- a/web/src/l10n.ts
+++ b/web/src/l10n.ts
@@ -1,26 +1,15 @@
-// @ts-ignore
-import browserLanguage from "in-browser-language";
+// @ts-expect-error No type hints
+import browserLanguage from 'in-browser-language'
/* List of supported languages in the OpenInfraMap layer.
* This should be kept up to date with the list in tegola/layers.yml.
*/
-const layer_supported_languages = [
- "en",
- "es",
- "de",
- "fr",
- "hi",
- "ur",
- "zh",
- "ru",
- "pt",
- "ja",
-];
+const layer_supported_languages: string[] = ['en', 'es', 'de', 'fr', 'hi', 'ur', 'zh', 'ru', 'pt', 'ja']
/* List of name tags to check, in order */
-const local_name_tags = (browserLanguage.list() as string[])
+const local_name_tags: string[] = (browserLanguage.list() as string[])
.filter((code: string) => layer_supported_languages.includes(code))
.map((code: string) => `name_${code}`)
- .concat(["name"]);
+ .concat(['name'])
-export { layer_supported_languages, local_name_tags };
+export { layer_supported_languages, local_name_tags }
diff --git a/web/src/loadIcons.ts b/web/src/loadIcons.ts
index 378b2d5..5182760 100644
--- a/web/src/loadIcons.ts
+++ b/web/src/loadIcons.ts
@@ -1,15 +1,15 @@
// @ts-expect-error Vite virtual module
-import { manifest } from 'virtual:render-svg';
+import { manifest } from 'virtual:render-svg'
export default async function loadIcons(map: maplibregl.Map) {
- const ratio = Math.max(window.devicePixelRatio, 2);
+ const ratio = Math.max(window.devicePixelRatio, 2)
const icons = manifest[ratio.toString()]
for (const name in icons) {
map.loadImage(icons[name], function (error, image) {
- if (error) throw error;
- if (!image) throw new Error("Image not found");
- map.addImage(name, image, { pixelRatio: ratio });
- });
+ if (error) throw error
+ if (!image) throw new Error('Image not found')
+ map.addImage(name, image, { pixelRatio: ratio })
+ })
}
}
diff --git a/web/src/maptiler-attribution.ts b/web/src/maptiler-attribution.ts
deleted file mode 100644
index 1387514..0000000
--- a/web/src/maptiler-attribution.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { el } from "redom";
-
-class MapTilerAttribution {
- _map: any;
- _control!: HTMLElement;
- onAdd(map: maplibregl.Map) {
- this._map = map;
-
- var img = el(
- "a",
- el("img", {
- src: "img/maptiler.png",
- }),
- {
- href: "https://www.maptiler.com",
- target: "_blank",
- }
- );
-
- this._control = el("div#maptiler-attribution", img, {
- class: "maplibregl-ctrl",
- });
-
- return this._control;
- }
-}
-
-export { MapTilerAttribution as default };
diff --git a/web/src/style/README b/web/src/style/README
new file mode 100644
index 0000000..2113578
--- /dev/null
+++ b/web/src/style/README
@@ -0,0 +1,21 @@
+Z orders:
+
+0 - Underground petroleum
+20 - Underground water
+40 - Underground telecoms
+60 - Underground power
+
+100 - Petroleum landuse
+120 - Water landuse
+140 - Telecoms landuse
+160 - Power landuse
+
+200 - Overhead petroleum (?)
+220 - Overhead water (?!)
+240 - Overhead telecoms
+260 - Overhead power
+
+500 - Petroleum labels
+520 - Water labels
+540 - Telecoms labels
+560 - Power labels
diff --git a/web/src/style/common.ts b/web/src/style/common.ts
new file mode 100644
index 0000000..174b070
--- /dev/null
+++ b/web/src/style/common.ts
@@ -0,0 +1,36 @@
+import { ExpressionSpecification } from 'maplibre-gl'
+import { local_name_tags } from '../l10n.ts'
+
+export const local_name: ExpressionSpecification = (['coalesce'] as any).concat(
+ local_name_tags.map((tag) => ['get', tag])
+) as ExpressionSpecification
+
+const text_paint = {
+ 'text-halo-width': 4,
+ 'text-halo-blur': 2,
+ 'text-halo-color': 'rgba(230, 230, 230, 1)'
+}
+
+const operator_text: ExpressionSpecification = [
+ 'step',
+ ['zoom'],
+ ['get', 'name'],
+ 14,
+ ['case', ['has', 'operator'], ['concat', ['get', 'name'], ' (', ['get', 'operator'], ')'], ['get', 'name']]
+]
+
+const underground_p: ExpressionSpecification = [
+ 'any',
+ ['==', ['get', 'location'], 'underground'],
+ ['==', ['get', 'location'], 'underwater'],
+ ['==', ['get', 'tunnel'], true],
+ [
+ 'all', // Power cables are underground by default
+ ['==', ['get', 'type'], 'cable'],
+ ['==', ['get', 'location'], '']
+ ]
+]
+
+const font = ['Noto Sans Regular']
+
+export { text_paint, operator_text, underground_p, font }
diff --git a/web/src/style/style.json b/web/src/style/style.json
deleted file mode 100644
index 48e3483..0000000
--- a/web/src/style/style.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "version": 8,
- "name": "OpenInfraMap",
- "sources": {
- "openmaptiles": {
- "type": "vector",
- "tiles": ["https://openinframap.org/20221105/{z}/{x}/{y}.mvt"],
- "maxzoom": 14,
- "attribution": "<a href=\"https://openmaptiles.org/\">© OpenMapTiles</a>"
- },
- "openinframap": {
- "type": "vector",
- "url": "https://openinframap.org/map.json"
- },
- "solar_heatmap": {
- "type": "vector",
- "url": "https://openinframap.org/heatmap.json"
- }
- },
- "glyphs": "/fonts/{fontstack}/{range}.pbf",
- "layers": [],
- "id": "openinframap"
-}
diff --git a/web/src/style/style.ts b/web/src/style/style.ts
new file mode 100644
index 0000000..70d4de0
--- /dev/null
+++ b/web/src/style/style.ts
@@ -0,0 +1,26 @@
+import { StyleSpecification } from 'maplibre-gl'
+
+const style: StyleSpecification = {
+ version: 8,
+ name: 'OpenInfraMap',
+ sources: {
+ openmaptiles: {
+ type: 'vector',
+ tiles: ['https://openinframap.org/20221105/{z}/{x}/{y}.mvt'],
+ maxzoom: 14,
+ attribution: '<a href="https://openmaptiles.org/">© OpenMapTiles</a>'
+ },
+ openinframap: {
+ type: 'vector',
+ url: 'https://openinframap.org/map.json'
+ },
+ solar_heatmap: {
+ type: 'vector',
+ url: 'https://openinframap.org/heatmap.json'
+ }
+ },
+ glyphs: '/fonts/{fontstack}/{range}.pbf',
+ layers: []
+}
+
+export default style
diff --git a/web/src/style/style_base.js b/web/src/style/style_base.js
deleted file mode 100644
index 92ac2e0..0000000
--- a/web/src/style/style_base.js
+++ /dev/null
@@ -1,778 +0,0 @@
-// Base Style, adapted from MapTiler's Positron theme.
-
-const layers = [
- {
- id: "background",
- type: "background",
- paint: {
- "background-color": "rgb(242,243,240)",
- },
- },
- {
- id: "park",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "park",
- filter: ["==", "$type", "Polygon"],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-color": "rgb(230, 233, 229)",
- },
- },
- {
- id: "water",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "water",
- filter: ["==", "$type", "Polygon"],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-color": "hsl(207, 12%, 78%)",
- "fill-antialias": true,
- },
- },
- {
- id: "landcover_ice_shelf",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "landcover",
- maxzoom: 8,
- filter: [
- "all",
- ["==", "$type", "Polygon"],
- ["==", "subclass", "ice_shelf"],
- ],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-color": "hsl(0, 0%, 98%)",
- "fill-opacity": 0.7,
- },
- },
- {
- id: "landcover_glacier",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "landcover",
- maxzoom: 8,
- filter: ["all", ["==", "$type", "Polygon"], ["==", "subclass", "glacier"]],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-color": "hsl(0, 0%, 98%)",
- "fill-opacity": {
- base: 1,
- stops: [
- [0, 1],
- [8, 0.5],
- ],
- },
- },
- },
- {
- id: "landuse_residential",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "landuse",
- maxzoom: 16,
- filter: ["all", ["==", "$type", "Polygon"], ["==", "class", "residential"]],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-color": "rgb(234, 234, 230)",
- "fill-opacity": {
- base: 0.6,
- stops: [
- [8, 0.8],
- [9, 0.6],
- ],
- },
- },
- },
- {
- id: "landcover_wood",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "landcover",
- minzoom: 10,
- filter: ["all", ["==", "$type", "Polygon"], ["==", "class", "wood"]],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-color": "rgb(220,226,220)",
- "fill-opacity": {
- base: 1,
- stops: [
- [8, 0],
- [12, 1],
- ],
- },
- },
- },
- {
- id: "waterway",
- type: "line",
- source: "openmaptiles",
- "source-layer": "waterway",
- filter: ["==", "$type", "LineString"],
- layout: {
- visibility: "visible",
- },
- paint: {
- "line-color": "hsl(207, 20%, 78%)",
- },
- },
- {
- id: "building",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "building",
- minzoom: 12,
- paint: {
- "fill-color": "rgb(234, 234, 229)",
- "fill-outline-color": "rgb(219, 219, 218)",
- "fill-antialias": true,
- },
- },
- {
- id: "tunnel_motorway_casing",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 6,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "brunnel", "tunnel"], ["==", "class", "motorway"]],
- ],
- layout: {
- "line-cap": "butt",
- "line-join": "miter",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgb(213, 213, 213)",
- "line-width": {
- base: 1.4,
- stops: [
- [5.8, 0],
- [6, 3],
- [20, 40],
- ],
- },
- "line-opacity": 1,
- },
- },
- {
- id: "tunnel_motorway_inner",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 6,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "brunnel", "tunnel"], ["==", "class", "motorway"]],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgb(234,234,234)",
- "line-width": {
- base: 1.4,
- stops: [
- [4, 2],
- [6, 1.3],
- [20, 30],
- ],
- },
- },
- },
- {
- id: "aeroway-taxiway",
- type: "line",
- source: "openmaptiles",
- "source-layer": "aeroway",
- minzoom: 12,
- filter: ["all", ["in", "class", "taxiway"]],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "hsl(0, 0%, 88%)",
- "line-width": {
- base: 1.55,
- stops: [
- [13, 1.8],
- [20, 20],
- ],
- },
- "line-opacity": 1,
- },
- },
- {
- id: "aeroway-runway-casing",
- type: "line",
- source: "openmaptiles",
- "source-layer": "aeroway",
- minzoom: 11,
- filter: ["all", ["in", "class", "runway"]],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "hsl(0, 0%, 88%)",
- "line-width": {
- base: 1.5,
- stops: [
- [11, 6],
- [17, 55],
- ],
- },
- "line-opacity": 1,
- },
- },
- {
- id: "aeroway-area",
- type: "fill",
- source: "openmaptiles",
- "source-layer": "aeroway",
- minzoom: 4,
- filter: [
- "all",
- ["==", "$type", "Polygon"],
- ["in", "class", "runway", "taxiway"],
- ],
- layout: {
- visibility: "visible",
- },
- paint: {
- "fill-opacity": {
- base: 1,
- stops: [
- [13, 0],
- [14, 1],
- ],
- },
- "fill-color": "rgba(255, 255, 255, 1)",
- },
- },
- {
- id: "aeroway-runway",
- type: "line",
- source: "openmaptiles",
- "source-layer": "aeroway",
- minzoom: 11,
- filter: ["all", ["in", "class", "runway"], ["==", "$type", "LineString"]],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgba(255, 255, 255, 1)",
- "line-width": {
- base: 1.5,
- stops: [
- [11, 4],
- [17, 50],
- ],
- },
- "line-opacity": 1,
- },
- },
- {
- id: "highway_path",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- filter: ["all", ["==", "$type", "LineString"], ["==", "class", "path"]],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgb(234, 234, 234)",
- "line-width": {
- base: 1.2,
- stops: [
- [13, 1],
- [20, 10],
- ],
- },
- "line-opacity": 0.9,
- },
- },
- {
- id: "highway_minor_casing",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 8,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["in", "class", "minor", "service", "track"],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "hsl(0, 0%, 83%)",
- "line-width": {
- base: 1.3,
- stops: [
- [13, 1.9],
- [20, 21],
- ],
- },
- },
- },
- {
- id: "highway_minor",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 8,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["in", "class", "minor", "service", "track"],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "hsl(0, 0%, 92%)",
- "line-width": {
- base: 1.55,
- stops: [
- [13, 1.8],
- [20, 20],
- ],
- },
- },
- },
- {
- id: "highway_major_casing",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 11,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["in", "class", "primary", "secondary", "tertiary", "trunk"],
- ],
- layout: {
- "line-cap": "butt",
- "line-join": "miter",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgb(213, 213, 213)",
- "line-dasharray": [12, 0],
- "line-width": {
- base: 1.3,
- stops: [
- [10, 3],
- [20, 23],
- ],
- },
- },
- },
- {
- id: "highway_major_inner",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 11,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["in", "class", "primary", "secondary", "tertiary", "trunk"],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "#fff",
- "line-width": {
- base: 1.3,
- stops: [
- [10, 2],
- [20, 20],
- ],
- },
- },
- },
- {
- id: "highway_major_subtle",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- maxzoom: 11,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["in", "class", "primary", "secondary", "tertiary", "trunk"],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "hsla(0, 0%, 85%, 0.69)",
- "line-width": 1,
- },
- },
- {
- id: "highway_motorway_casing",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 6,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- [
- "all",
- ["!in", "brunnel", "bridge", "tunnel"],
- ["==", "class", "motorway"],
- ],
- ],
- layout: {
- "line-cap": "butt",
- "line-join": "miter",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgb(213, 213, 213)",
- "line-width": {
- base: 1.4,
- stops: [
- [5.8, 0],
- [6, 3],
- [20, 40],
- ],
- },
- "line-dasharray": [2, 0],
- "line-opacity": 1,
- },
- },
- {
- id: "highway_motorway_inner",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 6,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- [
- "all",
- ["!in", "brunnel", "bridge", "tunnel"],
- ["==", "class", "motorway"],
- ],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": {
- base: 1,
- stops: [
- [5.8, "hsla(0, 0%, 85%, 0.53)"],
- [6, "#fff"],
- ],
- },
- "line-width": {
- base: 1.4,
- stops: [
- [4, 2],
- [6, 1.3],
- [20, 30],
- ],
- },
- },
- },
- {
- id: "highway_motorway_subtle",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- maxzoom: 6,
- filter: ["all", ["==", "$type", "LineString"], ["==", "class", "motorway"]],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": "hsla(0, 0%, 85%, 0.53)",
- "line-width": {
- base: 1,
- stops: [
- [4, 1],
- [6, 1.3],
- ],
- },
- },
- },
- {
- id: "railway_transit",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 16,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "class", "transit"], ["!in", "brunnel", "tunnel"]],
- ],
- layout: {
- visibility: "visible",
- "line-join": "round",
- },
- paint: {
- "line-color": "#dddddd",
- "line-width": 3,
- },
- },
- {
- id: "railway_transit_dashline",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 16,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "class", "transit"], ["!in", "brunnel", "tunnel"]],
- ],
- layout: {
- visibility: "visible",
- "line-join": "round",
- },
- paint: {
- "line-color": "#fafafa",
- "line-width": 2,
- "line-dasharray": [3, 3],
- },
- },
- {
- id: "railway_service",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 16,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "class", "rail"], ["has", "service"]],
- ],
- layout: {
- visibility: "visible",
- "line-join": "round",
- },
- paint: {
- "line-color": "#dddddd",
- "line-width": 3,
- },
- },
- {
- id: "railway_service_dashline",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 16,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["==", "class", "rail"],
- ["has", "service"],
- ],
- layout: {
- visibility: "visible",
- "line-join": "round",
- },
- paint: {
- "line-color": "#fafafa",
- "line-width": 2,
- "line-dasharray": [3, 3],
- },
- },
- {
- id: "railway",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 7,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["!has", "service"], ["==", "class", "rail"]],
- ],
- layout: {
- visibility: "visible",
- "line-join": "round",
- },
- paint: {
- "line-color": "#c0c0c0",
- "line-width": {
- base: 1.3,
- stops: [
- [9, 1],
- [20, 7],
- ],
- },
- },
- },
- {
- id: "railway_dashline",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 11,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["!has", "service"], ["==", "class", "rail"]],
- ],
- layout: {
- visibility: "visible",
- "line-join": "round",
- },
- paint: {
- "line-color": "#fafafa",
- "line-width": {
- base: 1.3,
- stops: [
- [11, 1],
- [20, 6],
- ],
- },
- "line-dasharray": [3, 3],
- },
- },
- {
- id: "highway_motorway_bridge_casing",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 6,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "brunnel", "bridge"], ["==", "class", "motorway"]],
- ],
- layout: {
- "line-cap": "butt",
- "line-join": "miter",
- visibility: "visible",
- },
- paint: {
- "line-color": "rgb(213, 213, 213)",
- "line-width": {
- base: 1.4,
- stops: [
- [5.8, 0],
- [6, 5],
- [20, 45],
- ],
- },
- "line-dasharray": [2, 0],
- "line-opacity": 1,
- },
- },
- {
- id: "highway_motorway_bridge_inner",
- type: "line",
- source: "openmaptiles",
- "source-layer": "transportation",
- minzoom: 6,
- filter: [
- "all",
- ["==", "$type", "LineString"],
- ["all", ["==", "brunnel", "bridge"], ["==", "class", "motorway"]],
- ],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- visibility: "visible",
- },
- paint: {
- "line-color": {
- base: 1,
- stops: [
- [5.8, "hsla(0, 0%, 85%, 0.53)"],
- [6, "#fff"],
- ],
- },
- "line-width": {
- base: 1.4,
- stops: [
- [4, 2],
- [6, 1.3],
- [20, 30],
- ],
- },
- },
- },
- {
- id: "boundary_country",
- type: "line",
- source: "openmaptiles",
- "source-layer": "boundary",
- filter: ["==", "admin_level", 2],
- layout: {
- "line-cap": "round",
- "line-join": "round",
- },
- paint: {
- "line-color": "rgb(230, 204, 207)",
- "line-width": {
- base: 1.1,
- stops: [
- [3, 1],
- [22, 20],
- ],
- },
- "line-blur": {
- base: 1,
- stops: [
- [0, 0.4],
- [22, 4],
- ],
- },
- "line-dasharray": [4, 4],
- },
- },
-];
-
-export default layers;
diff --git a/web/src/style/style_base.ts b/web/src/style/style_base.ts
new file mode 100644
index 0000000..9400973
--- /dev/null
+++ b/web/src/style/style_base.ts
@@ -0,0 +1,576 @@
+import { LayerSpecificationWithZIndex } from './types.ts'
+// Base Style, adapted from MapTiler's Positron theme.
+
+const layers: LayerSpecificationWithZIndex[] = [
+ {
+ id: 'background',
+ type: 'background',
+ paint: {
+ 'background-color': 'rgb(242,243,240)'
+ }
+ },
+ {
+ id: 'park',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'park',
+ filter: ['==', '$type', 'Polygon'],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-color': 'rgb(230, 233, 229)'
+ }
+ },
+ {
+ id: 'water',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'water',
+ filter: ['==', '$type', 'Polygon'],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-color': 'hsl(207, 12%, 78%)',
+ 'fill-antialias': true
+ }
+ },
+ {
+ id: 'landcover_ice_shelf',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'landcover',
+ maxzoom: 8,
+ filter: ['all', ['==', '$type', 'Polygon'], ['==', 'subclass', 'ice_shelf']],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-color': 'hsl(0, 0%, 98%)',
+ 'fill-opacity': 0.7
+ }
+ },
+ {
+ id: 'landcover_glacier',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'landcover',
+ maxzoom: 8,
+ filter: ['all', ['==', '$type', 'Polygon'], ['==', 'subclass', 'glacier']],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-color': 'hsl(0, 0%, 98%)',
+ 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 0, 1, 8, 0.5]
+ }
+ },
+ {
+ id: 'landuse_residential',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'landuse',
+ maxzoom: 16,
+ filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'residential']],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-color': 'rgb(234, 234, 230)',
+ 'fill-opacity': ['interpolate', ['exponential', 0.6], ['zoom'], 8, 0.8, 9, 0.6]
+ }
+ },
+ {
+ id: 'landcover_wood',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'landcover',
+ minzoom: 10,
+ filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'wood']],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-color': 'rgb(220,226,220)',
+ 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 8, 0, 12, 1]
+ }
+ },
+ {
+ id: 'waterway',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'waterway',
+ filter: ['==', '$type', 'LineString'],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsl(207, 20%, 78%)'
+ }
+ },
+ {
+ id: 'building',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'building',
+ minzoom: 12,
+ paint: {
+ 'fill-color': 'rgb(234, 234, 229)',
+ 'fill-outline-color': 'rgb(219, 219, 218)',
+ 'fill-antialias': true
+ }
+ },
+ {
+ id: 'tunnel_motorway_casing',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 6,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']]
+ ],
+ layout: {
+ 'line-cap': 'butt',
+ 'line-join': 'miter',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgb(213, 213, 213)',
+ 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 5.8, 0, 6, 3, 20, 40]
+ }
+ },
+ {
+ id: 'tunnel_motorway_inner',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 6,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']]
+ ],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgb(234,234,234)',
+ 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 4, 2, 6, 1.3, 20, 30]
+ }
+ },
+ {
+ id: 'aeroway-taxiway',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'aeroway',
+ minzoom: 12,
+ filter: ['all', ['in', 'class', 'taxiway']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsl(0, 0%, 88%)',
+ 'line-width': ['interpolate', ['exponential', 1.55], ['zoom'], 13, 1.8, 20, 20]
+ }
+ },
+ {
+ id: 'aeroway-runway-casing',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'aeroway',
+ minzoom: 11,
+ filter: ['all', ['in', 'class', 'runway']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsl(0, 0%, 88%)',
+ 'line-width': ['interpolate', ['exponential', 1.5], ['zoom'], 11, 6, 17, 55]
+ }
+ },
+ {
+ id: 'aeroway-area',
+ type: 'fill',
+ source: 'openmaptiles',
+ 'source-layer': 'aeroway',
+ minzoom: 4,
+ filter: ['all', ['==', '$type', 'Polygon'], ['in', 'class', 'runway', 'taxiway']],
+ layout: {
+ visibility: 'visible'
+ },
+ paint: {
+ 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 13, 0, 14, 1],
+ 'fill-color': 'rgba(255, 255, 255, 1)'
+ }
+ },
+ {
+ id: 'aeroway-runway',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'aeroway',
+ minzoom: 11,
+ filter: ['all', ['in', 'class', 'runway'], ['==', '$type', 'LineString']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgba(255, 255, 255, 1)',
+ 'line-width': ['interpolate', ['exponential', 1.5], ['zoom'], 11, 4, 17, 50]
+ }
+ },
+ {
+ id: 'highway_path',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'path']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgb(234, 234, 234)',
+ 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 13, 1, 20, 10],
+ 'line-opacity': 0.9
+ }
+ },
+ {
+ id: 'highway_minor_casing',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 8,
+ filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'minor', 'service', 'track']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsl(0, 0%, 83%)',
+ 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 13, 1.9, 20, 21]
+ }
+ },
+ {
+ id: 'highway_minor',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 8,
+ filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'minor', 'service', 'track']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsl(0, 0%, 92%)',
+ 'line-width': ['interpolate', ['exponential', 1.55], ['zoom'], 13, 1.8, 20, 20]
+ }
+ },
+ {
+ id: 'highway_major_casing',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 11,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk']
+ ],
+ layout: {
+ 'line-cap': 'butt',
+ 'line-join': 'miter',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgb(213, 213, 213)',
+ 'line-dasharray': [12, 0],
+ 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 10, 3, 20, 23]
+ }
+ },
+ {
+ id: 'highway_major_inner',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 11,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk']
+ ],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': '#fff',
+ 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 10, 2, 20, 20]
+ }
+ },
+ {
+ id: 'highway_major_subtle',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ maxzoom: 11,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk']
+ ],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsla(0, 0%, 85%, 0.69)',
+ 'line-width': 1
+ }
+ },
+ {
+ id: 'highway_motorway_casing',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 6,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['==', 'class', 'motorway']]
+ ],
+ layout: {
+ 'line-cap': 'butt',
+ 'line-join': 'miter',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgb(213, 213, 213)',
+ 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 5.8, 0, 6, 3, 20, 40],
+ 'line-dasharray': [2, 0]
+ }
+ },
+ {
+ id: 'highway_motorway_inner',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 6,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['==', 'class', 'motorway']]
+ ],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': ['interpolate', ['linear'], ['zoom'], 6, 'hsla(0, 0%, 85%, 0.53)', 8, '#fff'],
+ 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 4, 2, 6, 1.3, 20, 30]
+ }
+ },
+ {
+ id: 'highway_motorway_subtle',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ maxzoom: 6,
+ filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'motorway']],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'hsla(0, 0%, 85%, 0.53)',
+ 'line-width': ['interpolate', ['linear'], ['zoom'], 4, 1, 6, 1.3]
+ }
+ },
+ {
+ id: 'railway_transit',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 16,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']]
+ ],
+ layout: {
+ visibility: 'visible',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': '#dddddd',
+ 'line-width': 3
+ }
+ },
+ {
+ id: 'railway_transit_dashline',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 16,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']]
+ ],
+ layout: {
+ visibility: 'visible',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': '#fafafa',
+ 'line-width': 2,
+ 'line-dasharray': [3, 3]
+ }
+ },
+ {
+ id: 'railway_service',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 16,
+ filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'class', 'rail'], ['has', 'service']]],
+ layout: {
+ visibility: 'visible',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': '#dddddd',
+ 'line-width': 3
+ }
+ },
+ {
+ id: 'railway_service_dashline',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 16,
+ filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'rail'], ['has', 'service']],
+ layout: {
+ visibility: 'visible',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': '#fafafa',
+ 'line-width': 2,
+ 'line-dasharray': [3, 3]
+ }
+ },
+ {
+ id: 'railway',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 7,
+ filter: ['all', ['==', '$type', 'LineString'], ['all', ['!has', 'service'], ['==', 'class', 'rail']]],
+ layout: {
+ visibility: 'visible',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': '#c0c0c0',
+ 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 9, 1, 20, 7]
+ }
+ },
+ {
+ id: 'railway_dashline',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 11,
+ filter: ['all', ['==', '$type', 'LineString'], ['all', ['!has', 'service'], ['==', 'class', 'rail']]],
+ layout: {
+ visibility: 'visible',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': '#fafafa',
+ 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 11, 1, 20, 6],
+ 'line-dasharray': [3, 3]
+ }
+ },
+ {
+ id: 'highway_motorway_bridge_casing',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 6,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']]
+ ],
+ layout: {
+ 'line-cap': 'butt',
+ 'line-join': 'miter',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': 'rgb(213, 213, 213)',
+ 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 5.8, 0, 6, 5, 20, 45],
+ 'line-dasharray': [2, 0]
+ }
+ },
+ {
+ id: 'highway_motorway_bridge_inner',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'transportation',
+ minzoom: 6,
+ filter: [
+ 'all',
+ ['==', '$type', 'LineString'],
+ ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']]
+ ],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round',
+ visibility: 'visible'
+ },
+ paint: {
+ 'line-color': ['interpolate', ['linear'], ['zoom'], 5.8, 'hsla(0, 0%, 85%, 0.53)', 6, '#fff'],
+ 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 4, 2, 6, 1.3, 20, 30]
+ }
+ },
+ {
+ id: 'boundary_country',
+ type: 'line',
+ source: 'openmaptiles',
+ 'source-layer': 'boundary',
+ filter: ['==', 'admin_level', 2],
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round'
+ },
+ paint: {
+ 'line-color': 'rgb(230, 204, 207)',
+ 'line-width': ['interpolate', ['exponential', 1.1], ['zoom'], 3, 1, 22, 20],
+ 'line-blur': ['interpolate', ['linear'], ['zoom'], 0, 0.4, 22, 4],
+ 'line-dasharray': [4, 4]
+ }
+ }
+]
+
+export default layers
diff --git a/web/src/style/style_labels.js b/web/src/style/style_labels.ts
similarity index 78%
rename from web/src/style/style_labels.js
rename to web/src/style/style_labels.ts
index e22671b..cd9d5e9 100644
--- a/web/src/style/style_labels.js
+++ b/web/src/style/style_labels.ts
@@ -1,7 +1,9 @@
-const text_color = 'hsl(0, 0%, 20%)';
-const text_halo_color = 'rgb(242,243,240)';
+import { LayerSpecificationWithZIndex } from './types.ts'
-const layers = [
+const text_color = 'hsl(0, 0%, 20%)'
+const text_halo_color = 'rgb(242,243,240)'
+
+const layers: LayerSpecificationWithZIndex[] = [
{
id: 'place_suburb',
type: 'symbol',
@@ -16,15 +18,14 @@ const layers = [
'text-font': ['Noto Sans Regular'],
'text-justify': 'center',
'text-offset': [0.5, 0],
- 'text-size': { base: 1, stops: [[12, 9], [17, 17]] },
- visibility: 'visible',
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 12, 9, 17, 17]
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_village',
@@ -40,15 +41,14 @@ const layers = [
'text-font': ['Noto Sans Regular'],
'text-justify': 'center',
'text-offset': [0.5, 0.2],
- 'text-size': { base: 1, stops: [[12, 9], [17, 18]] },
- visibility: 'visible',
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 12, 9, 17, 18]
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_town',
@@ -64,15 +64,14 @@ const layers = [
'text-font': ['Noto Sans Regular'],
'text-justify': 'center',
'text-offset': [0.5, 0.2],
- 'text-size': { base: 1, stops: [[10, 9], [15, 18]] },
- visibility: 'visible',
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 10, 9, 15, 18]
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_city',
@@ -84,7 +83,7 @@ const layers = [
filter: [
'all',
['==', '$type', 'Point'],
- ['all', ['!=', 'capital', 2], ['==', 'class', 'city'], ['>', 'rank', 3]],
+ ['all', ['!=', 'capital', 2], ['==', 'class', 'city'], ['>', 'rank', 3]]
],
layout: {
'text-anchor': 'center',
@@ -93,14 +92,14 @@ const layers = [
'text-justify': 'center',
'text-offset': [0.5, 0.2],
'text-size': 12,
- visibility: 'visible',
+ visibility: 'visible'
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_capital',
@@ -109,11 +108,7 @@ const layers = [
'source-layer': 'place',
minzoom: 5.5,
maxzoom: 12,
- filter: [
- 'all',
- ['==', '$type', 'Point'],
- ['all', ['==', 'capital', 2], ['==', 'class', 'city']],
- ],
+ filter: ['all', ['==', '$type', 'Point'], ['all', ['==', 'capital', 2], ['==', 'class', 'city']]],
layout: {
'text-anchor': 'center',
'text-field': '{name:latin}\n{name:nonlatin}',
@@ -121,14 +116,14 @@ const layers = [
'text-justify': 'center',
'text-offset': [0.5, 0.2],
'text-size': 14,
- visibility: 'visible',
+ visibility: 'visible'
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_city_large',
@@ -140,7 +135,7 @@ const layers = [
filter: [
'all',
['==', '$type', 'Point'],
- ['all', ['!=', 'capital', 2], ['<=', 'rank', 3], ['==', 'class', 'city']],
+ ['all', ['!=', 'capital', 2], ['<=', 'rank', 3], ['==', 'class', 'city']]
],
layout: {
'text-anchor': 'center',
@@ -149,14 +144,14 @@ const layers = [
'text-justify': 'center',
'text-offset': [0.5, 0.2],
'text-size': 14,
- visibility: 'visible',
+ visibility: 'visible'
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_state',
@@ -170,14 +165,14 @@ const layers = [
'text-field': '{name:latin}\n{name:nonlatin}',
'text-font': ['Noto Sans Regular'],
'text-size': 15,
- visibility: 'visible',
+ visibility: 'visible'
},
paint: {
'text-color': text_color,
'text-halo-blur': 1,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_country_other',
@@ -185,23 +180,17 @@ const layers = [
source: 'openmaptiles',
'source-layer': 'place',
maxzoom: 8,
- filter: [
- 'all',
- ['==', '$type', 'Point'],
- ['==', 'class', 'country'],
- ['!has', 'iso_a2'],
- ],
+ filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'country'], ['!has', 'iso_a2']],
layout: {
'text-field': ['case', ['has', 'name:en'], ['get', 'name:en'], ['get', 'name:latin']],
'text-font': ['Metropolis Light Italic', 'Noto Sans Regular Italic'],
- 'text-size': { base: 1, stops: [[0, 9], [6, 13]] },
- visibility: 'visible',
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 0, 9, 6, 15]
},
paint: {
'text-color': text_color,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_country_minor',
@@ -214,19 +203,18 @@ const layers = [
['==', '$type', 'Point'],
['==', 'class', 'country'],
['>=', 'rank', 2],
- ['has', 'iso_a2'],
+ ['has', 'iso_a2']
],
layout: {
'text-field': ['case', ['has', 'name:en'], ['get', 'name:en'], ['get', 'name:latin']],
'text-font': ['Noto Sans Regular'],
- 'text-size': { base: 1, stops: [[0, 10], [6, 12]] },
- visibility: 'visible',
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 0, 10, 6, 12]
},
paint: {
'text-color': text_color,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2,
- },
+ 'text-halo-width': 2
+ }
},
{
id: 'place_country_major',
@@ -239,21 +227,20 @@ const layers = [
['==', '$type', 'Point'],
['<=', 'rank', 1],
['==', 'class', 'country'],
- ['has', 'iso_a2'],
+ ['has', 'iso_a2']
],
layout: {
'text-anchor': 'center',
'text-field': ['case', ['has', 'name:en'], ['get', 'name:en'], ['get', 'name:latin']],
'text-font': ['Noto Sans Regular'],
- 'text-size': { base: 1.4, stops: [[0, 10], [3, 12], [4, 14]] },
- visibility: 'visible',
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 0, 10, 3, 12, 4, 14]
},
paint: {
'text-color': text_color,
'text-halo-color': text_halo_color,
- 'text-halo-width': 2.4,
- },
- },
-];
+ 'text-halo-width': 2.4
+ }
+ }
+]
-export default layers;
+export default layers
diff --git a/web/src/style/style_oim_common.js b/web/src/style/style_oim_common.js
deleted file mode 100644
index 277973f..0000000
--- a/web/src/style/style_oim_common.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const text_paint = {
- 'text-halo-width': 4,
- 'text-halo-blur': 2,
- 'text-halo-color': "rgba(230, 230, 230, 1)",
-}
-
-const operator_text = ["step", ["zoom"],
- ['get', 'name'],
- 14, ["case", ['has', 'operator'],
- ["concat", ['get', 'name'], ' (', ['get', 'operator'], ')'],
- ['get', 'name']
- ]
-];
-
-const underground_p = ["any",
- ['==', ['get', 'location'], 'underground'],
- ['==', ['get', 'location'], 'underwater'],
- ['==', ['get', 'tunnel'], true],
- ['all', // Power cables are underground by default
- ['==', ['get', 'type'], 'cable'],
- ['==', ['get', 'location'], '']
- ]
-];
-
-const font = ['Noto Sans Regular'];
-
-export { text_paint, operator_text, underground_p, font };
diff --git a/web/src/style/style_oim_petroleum.js b/web/src/style/style_oim_petroleum.ts
similarity index 53%
rename from web/src/style/style_oim_petroleum.js
rename to web/src/style/style_oim_petroleum.ts
index 3a9a13a..3a19234 100644
--- a/web/src/style/style_oim_petroleum.js
+++ b/web/src/style/style_oim_petroleum.ts
@@ -1,41 +1,47 @@
-import { text_paint, font } from './style_oim_common.js';
+import { ColorSpecification, ExpressionSpecification } from 'maplibre-gl'
+import { text_paint, font } from './common.js'
+import { LayerSpecificationWithZIndex } from './types.ts'
-const colour_gas = '#BFBC6B';
-const colour_oil = '#6B6B6B';
-const colour_fuel = '#CC9F83';
-const colour_intermediate = '#78CC9E';
-const colour_hydrogen = '#CC78AB';
-const colour_co2 = '#7885CC';
-const colour_unknown = '#BABABA';
+const colour_gas: ColorSpecification = '#BFBC6B'
+const colour_oil: ColorSpecification = '#6B6B6B'
+const colour_fuel: ColorSpecification = '#CC9F83'
+const colour_intermediate: ColorSpecification = '#78CC9E'
+const colour_hydrogen: ColorSpecification = '#CC78AB'
+const colour_co2: ColorSpecification = '#7885CC'
+const colour_unknown: ColorSpecification = '#BABABA'
-const substance = ["coalesce", ["get", "substance"], ["get", "type"], ""];
+const substance: ExpressionSpecification = ['coalesce', ['get', 'substance'], ['get', 'type'], '']
-const pipeline_colour = ["match",
+const pipeline_colour: ExpressionSpecification = [
+ 'match',
substance,
- ['gas', 'natural_gas', 'cng', 'lpg', 'lng'], colour_gas,
- 'oil', colour_oil,
- 'fuel', colour_fuel,
- ['ngl', 'y-grade', 'hydrocarbons', 'condensate', 'naphtha'], colour_intermediate,
- 'hydrogen', colour_hydrogen,
- 'carbon_dioxide', colour_co2,
+ ['gas', 'natural_gas', 'cng', 'lpg', 'lng'],
+ colour_gas,
+ 'oil',
+ colour_oil,
+ 'fuel',
+ colour_fuel,
+ ['ngl', 'y-grade', 'hydrocarbons', 'condensate', 'naphtha'],
+ colour_intermediate,
+ 'hydrogen',
+ colour_hydrogen,
+ 'carbon_dioxide',
+ colour_co2,
colour_unknown
]
-const pipeline_label = ["concat",
- ["case", ["has", "name"], ["get", "name"], ["get", "operator"]],
- ["case", ["all",
- ["!=", substance, ""],
- ['any',
- ["has", "operator"],
- ['has', 'name']
- ]
- ],
- ["concat", " (", substance, ")"],
+const pipeline_label: ExpressionSpecification = [
+ 'concat',
+ ['case', ['has', 'name'], ['get', 'name'], ['get', 'operator']],
+ [
+ 'case',
+ ['all', ['!=', substance, ''], ['any', ['has', 'operator'], ['has', 'name']]],
+ ['concat', ' (', substance, ')'],
substance
]
]
-const layers = [
+const layers: LayerSpecificationWithZIndex[] = [
{
zorder: 0,
id: 'petroleum_pipeline_case',
@@ -45,17 +51,20 @@ const layers = [
'source-layer': 'petroleum_pipeline',
paint: {
'line-color': '#666666',
- 'line-width': ['interpolate', ['linear'], ['zoom'],
- 8, 1.5,
- 16, ['match', ['get', 'usage'],
- 'transmission', 4,
- 1.5]
- ],
+ 'line-width': [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
+ 8,
+ 1.5,
+ 16,
+ ['match', ['get', 'usage'], 'transmission', 4, 1.5]
+ ]
},
layout: {
'line-cap': 'round',
- 'line-join': 'round',
- },
+ 'line-join': 'round'
+ }
},
{
zorder: 1,
@@ -66,13 +75,16 @@ const layers = [
'source-layer': 'petroleum_pipeline',
paint: {
'line-color': pipeline_colour,
- 'line-width': ['interpolate', ['linear'], ['zoom'],
- 3, 1,
- 16, ['match', ['get', 'usage'],
- 'transmission', 2,
- 1]
+ 'line-width': [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
+ 3,
+ 1,
+ 16,
+ ['match', ['get', 'usage'], 'transmission', 2, 1]
]
- },
+ }
},
{
zorder: 100,
@@ -84,8 +96,8 @@ const layers = [
paint: {
'fill-opacity': 0.3,
'fill-color': colour_oil,
- 'fill-outline-color': 'rgba(0, 0, 0, 1)',
- },
+ 'fill-outline-color': 'rgba(0, 0, 0, 1)'
+ }
},
{
zorder: 101,
@@ -98,13 +110,8 @@ const layers = [
'circle-color': colour_oil,
'circle-stroke-color': '#666666',
'circle-stroke-width': 1,
- 'circle-radius': ['interpolate',
- ['linear'], ['zoom'],
- 10, 1,
- 12, 2,
- 14, 5
- ],
- },
+ 'circle-radius': ['interpolate', ['linear'], ['zoom'], 10, 1, 12, 2, 14, 5]
+ }
},
{
zorder: 500,
@@ -136,9 +143,9 @@ const layers = [
'text-font': font,
'text-anchor': 'top',
'text-offset': [0, 1],
- 'text-size': 11,
+ 'text-size': 11
},
- paint: text_paint,
+ paint: text_paint
},
{
zorder: 502,
@@ -152,11 +159,11 @@ const layers = [
'text-font': font,
'text-anchor': 'top',
'text-offset': [0, 0.5],
- 'text-size': 10,
+ 'text-size': 10
},
- paint: text_paint,
- },
-];
+ paint: text_paint
+ }
+]
export {
layers as default,
@@ -167,4 +174,4 @@ export {
colour_hydrogen,
colour_co2,
colour_unknown
-};
+}
diff --git a/web/src/style/style_oim_power.ts b/web/src/style/style_oim_power.ts
index 560ad80..12dea78 100644
--- a/web/src/style/style_oim_power.ts
+++ b/web/src/style/style_oim_power.ts
@@ -1,948 +1,862 @@
-import { text_paint, underground_p, font } from "./style_oim_common.js";
-import { local_name_tags } from "../l10n.ts";
-
-const voltage_scale: [number | string | null, string][] = [
- [null, "#7A7A85"],
- [10, "#6E97B8"],
- [25, "#55B555"],
- [52, "#B59F10"],
- [132, "#B55D00"],
- [220, "#C73030"],
- [310, "#B54EB2"],
- [550, "#00C1CF"],
-];
+import { text_paint, underground_p, font, local_name } from './common.js'
+import { LayerSpecificationWithZIndex } from './types.ts'
+import { DataDrivenPropertyValueSpecification, ExpressionSpecification } from 'maplibre-gl'
+
+const voltage_scale: [number | null, string][] = [
+ [null, '#7A7A85'],
+ [10, '#6E97B8'],
+ [25, '#55B555'],
+ [52, '#B59F10'],
+ [132, '#B55D00'],
+ [220, '#C73030'],
+ [310, '#B54EB2'],
+ [550, '#00C1CF']
+]
const special_voltages = {
- HVDC: "#4E01B5",
- "Traction (<50 Hz)": "#A8B596",
-};
+ HVDC: '#4E01B5',
+ 'Traction (<50 Hz)': '#A8B596'
+}
const plant_types = {
- coal: "power_plant_coal",
- geothermal: "power_plant_geothermal",
- hydro: "power_plant_hydro",
- nuclear: "power_plant_nuclear",
- oil: "power_plant_oilgas",
- gas: "power_plant_oilgas",
- diesel: "power_plant_oilgas",
- solar: "power_plant_solar",
- wind: "power_plant_wind",
- biomass: "power_plant_biomass",
- waste: "power_plant_waste",
- battery: "power_plant_battery",
-};
+ coal: 'power_plant_coal',
+ geothermal: 'power_plant_geothermal',
+ hydro: 'power_plant_hydro',
+ nuclear: 'power_plant_nuclear',
+ oil: 'power_plant_oilgas',
+ gas: 'power_plant_oilgas',
+ diesel: 'power_plant_oilgas',
+ solar: 'power_plant_solar',
+ wind: 'power_plant_wind',
+ biomass: 'power_plant_biomass',
+ waste: 'power_plant_waste',
+ battery: 'power_plant_battery'
+}
// === Frequency predicates
-const traction_freq_p = [
- "all",
- ["has", "frequency"],
- ["!=", ["get", "frequency"], ""],
- ["!=", ["to-number", ["get", "frequency"]], 50],
- ["!=", ["to-number", ["get", "frequency"]], 60],
-];
-
-const hvdc_p = [
- "all",
- ["has", "frequency"],
- ["!=", ["get", "frequency"], ""],
- ["==", ["to-number", ["get", "frequency"]], 0],
-];
+const traction_freq_p: ExpressionSpecification = [
+ 'all',
+ ['has', 'frequency'],
+ ['!=', ['get', 'frequency'], ''],
+ ['!=', ['to-number', ['get', 'frequency']], 50],
+ ['!=', ['to-number', ['get', 'frequency']], 60]
+]
+
+const hvdc_p: ExpressionSpecification = [
+ 'all',
+ ['has', 'frequency'],
+ ['!=', ['get', 'frequency'], ''],
+ ['==', ['to-number', ['get', 'frequency']], 0]
+]
// Stepwise function to assign colour by voltage:
-function voltage_color(field: string) {
- let voltage_func = ["step", ["to-number", ["coalesce", ["get", field], 0]]];
- for (let row of voltage_scale) {
+function voltage_color(field: string): DataDrivenPropertyValueSpecification<string> {
+ const voltage_func: any = ['step', ['to-number', ['coalesce', ['get', field], 0]]]
+ for (const row of voltage_scale) {
if (row[0] == null) {
- voltage_func.push(row[1]);
- continue;
+ voltage_func.push(row[1])
+ continue
}
- // @ts-ignore
- voltage_func.push(row[0] - 0.01);
- voltage_func.push(row[1]);
+ voltage_func.push(row[0] - 0.01)
+ voltage_func.push(row[1])
}
return [
- "case",
+ 'case',
hvdc_p,
- special_voltages["HVDC"], // HVDC (frequency == 0)
+ special_voltages['HVDC'], // HVDC (frequency == 0)
traction_freq_p,
- special_voltages["Traction (<50 Hz)"], // Traction power
- voltage_func,
- ];
+ special_voltages['Traction (<50 Hz)'], // Traction power
+ voltage_func as ExpressionSpecification
+ ]
}
-const multi_voltage_min_zoom = 10;
+const multi_voltage_min_zoom = 10
// Generate an expression to determine the offset of a power line
// segment with multiple voltages
-function voltage_offset(index: number) {
- const spacing = 7;
+function voltage_offset(index: number): DataDrivenPropertyValueSpecification<number> {
+ const spacing = 7
- let offset = (index - 1) * spacing;
+ const offset = (index - 1) * spacing
return [
- "interpolate",
- ["linear"],
- ["zoom"],
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
multi_voltage_min_zoom - 0.001,
0,
multi_voltage_min_zoom,
[
- "case",
- ["has", "voltage_3"],
+ 'case',
+ ['has', 'voltage_3'],
(offset - spacing) * 0.5,
- ["has", "voltage_2"],
+ ['has', 'voltage_2'],
(offset - spacing / 2) * 0.5,
- 0,
+ 0
],
13,
- [
- "case",
- ["has", "voltage_3"],
- offset - spacing,
- ["has", "voltage_2"],
- offset - spacing / 2,
- 0,
- ],
- ];
+ ['case', ['has', 'voltage_3'], offset - spacing, ['has', 'voltage_2'], offset - spacing / 2, 0]
+ ]
}
// Function to assign power line thickness.
// Interpolate first by zoom level and then by voltage.
-const voltage_line_thickness = [
- "interpolate",
- ["linear"],
- ["zoom"],
+const voltage_line_thickness: ExpressionSpecification = [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
2,
0.5,
10,
[
- "match",
- ["get", "line"],
- "bay",
+ 'match',
+ ['get', 'line'],
+ 'bay',
1,
- "busbar",
+ 'busbar',
1,
- [
- "interpolate",
- ["linear"],
- ["coalesce", ["get", "voltage"], 0],
- 0,
- 1,
- 100,
- 1.8,
- 800,
- 4,
- ],
- ],
-];
+ ['interpolate', ['linear'], ['coalesce', ['get', 'voltage'], 0], 0, 1, 100, 1.8, 800, 4]
+ ]
+]
-const voltage = ["to-number", ["coalesce", ["get", "voltage"], 0]];
-const output = ["to-number", ["coalesce", ["get", "output"], 0]];
+const voltage: ExpressionSpecification = ['to-number', ['coalesce', ['get', 'voltage'], 0]]
+const output: ExpressionSpecification = ['to-number', ['coalesce', ['get', 'output'], 0]]
// Determine substation visibility
-const substation_visible_p = [
- "all",
+const substation_visible_p: ExpressionSpecification = [
+ 'all',
[
- "any",
- [">", voltage, 200],
- ["all", [">", voltage, 200], [">", ["zoom"], 6]],
- ["all", [">", voltage, 100], [">", ["zoom"], 7]],
- ["all", [">", voltage, 25], [">", ["zoom"], 9]],
- ["all", [">", voltage, 9], [">", ["zoom"], 10]],
- [">", ["zoom"], 11],
+ 'any',
+ ['>', voltage, 200],
+ ['all', ['>', voltage, 200], ['>', ['zoom'], 6]],
+ ['all', ['>', voltage, 100], ['>', ['zoom'], 7]],
+ ['all', ['>', voltage, 25], ['>', ['zoom'], 9]],
+ ['all', ['>', voltage, 9], ['>', ['zoom'], 10]],
+ ['>', ['zoom'], 11]
],
- ["any", ["!=", ["get", "substation"], "transition"], [">", ["zoom"], 12]],
-];
+ ['any', ['!=', ['get', 'substation'], 'transition'], ['>', ['zoom'], 12]]
+]
-const substation_radius = [
- "interpolate",
- ["linear"],
- ["zoom"],
+const substation_radius: ExpressionSpecification = [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
5,
- ["interpolate", ["linear"], voltage, 0, 0, 200, 1, 750, 3],
+ ['interpolate', ['linear'], voltage, 0, 0, 200, 1, 750, 3],
12,
- ["interpolate", ["linear"], voltage, 10, 1, 30, 3, 100, 5, 300, 7, 600, 9],
+ ['interpolate', ['linear'], voltage, 10, 1, 30, 3, 100, 5, 300, 7, 600, 9],
15,
- 3,
-];
+ 3
+]
// Determine the minimum zoom a point is visible at (before it can be seen as an
// area), based on the area of the substation.
-const substation_point_visible_p = [
- "any",
- ["==", ["coalesce", ["get", "area"], 0], 0], // Area = 0 - mapped as node
- ["all", ["<", ["coalesce", ["get", "area"], 0], 100], ["<", ["zoom"], 16]],
- ["all", ["<", ["coalesce", ["get", "area"], 0], 250], ["<", ["zoom"], 15]],
- ["<", ["zoom"], 13],
-];
-
-const converter_p = [
- "all",
- ["==", ["get", "substation"], "converter"],
- ["any", [">", voltage, 100], [">", ["zoom"], 6]],
-];
-
-const substation_label_visible_p = [
- "all",
+const substation_point_visible_p: ExpressionSpecification = [
+ 'any',
+ ['==', ['coalesce', ['get', 'area'], 0], 0], // Area = 0 - mapped as node
+ ['all', ['<', ['coalesce', ['get', 'area'], 0], 100], ['<', ['zoom'], 16]],
+ ['all', ['<', ['coalesce', ['get', 'area'], 0], 250], ['<', ['zoom'], 15]],
+ ['<', ['zoom'], 13]
+]
+
+const converter_p: ExpressionSpecification = [
+ 'all',
+ ['==', ['get', 'substation'], 'converter'],
+ ['any', ['>', voltage, 100], ['>', ['zoom'], 6]]
+]
+
+const substation_label_visible_p: ExpressionSpecification = [
+ 'all',
[
- "any",
- [">", voltage, 399],
- ["all", [">", voltage, 200], [">", ["zoom"], 8]],
- ["all", [">", voltage, 100], [">", ["zoom"], 10]],
- ["all", [">", voltage, 50], [">", ["zoom"], 12]],
- [">", ["zoom"], 13],
+ 'any',
+ ['>', voltage, 399],
+ ['all', ['>', voltage, 200], ['>', ['zoom'], 8]],
+ ['all', ['>', voltage, 100], ['>', ['zoom'], 10]],
+ ['all', ['>', voltage, 50], ['>', ['zoom'], 12]],
+ ['>', ['zoom'], 13]
],
- ["any", ["==", ["to-number", ["get", "area"]], 0], ["<", ["zoom"], 17]],
- ["!=", ["get", "substation"], "transition"],
-];
+ ['any', ['==', ['to-number', ['get', 'area']], 0], ['<', ['zoom'], 17]],
+ ['!=', ['get', 'substation'], 'transition']
+]
// Power line / substation visibility
-const power_visible_p = [
- "all",
- [
- "any",
- [">", voltage, 199],
- ["all", [">", voltage, 99], [">=", ["zoom"], 4]],
- ["all", [">", voltage, 49], [">=", ["zoom"], 5]],
- ["all", [">", voltage, 24], [">=", ["zoom"], 6]],
- ["all", [">", voltage, 9], [">=", ["zoom"], 9]],
- [">", ["zoom"], 10],
- ],
+const power_visible_p: ExpressionSpecification = [
+ 'all',
[
- "any",
- ["all", ["!=", ["get", "line"], "busbar"], ["!=", ["get", "line"], "bay"]],
- [">", ["zoom"], 12],
+ 'any',
+ ['>', voltage, 199],
+ ['all', ['>', voltage, 99], ['>=', ['zoom'], 4]],
+ ['all', ['>', voltage, 49], ['>=', ['zoom'], 5]],
+ ['all', ['>', voltage, 24], ['>=', ['zoom'], 6]],
+ ['all', ['>', voltage, 9], ['>=', ['zoom'], 9]],
+ ['>', ['zoom'], 10]
],
-];
+ ['any', ['all', ['!=', ['get', 'line'], 'busbar'], ['!=', ['get', 'line'], 'bay']], ['>', ['zoom'], 12]]
+]
// Power line ref visibility
-const power_ref_visible_p = [
- "all",
- [
- "any",
- ["all", [">", voltage, 330], [">", ["zoom"], 7]],
- ["all", [">", voltage, 200], [">", ["zoom"], 8]],
- ["all", [">", voltage, 100], [">", ["zoom"], 9]],
- [">", ["zoom"], 10],
- ],
+const power_ref_visible_p: ExpressionSpecification = [
+ 'all',
[
- "any",
- ["all", ["!=", ["get", "line"], "busbar"], ["!=", ["get", "line"], "bay"]],
- [">", ["zoom"], 12],
+ 'any',
+ ['all', ['>', voltage, 330], ['>', ['zoom'], 7]],
+ ['all', ['>', voltage, 200], ['>', ['zoom'], 8]],
+ ['all', ['>', voltage, 100], ['>', ['zoom'], 9]],
+ ['>', ['zoom'], 10]
],
-];
-
-const construction_p = ["get", "construction"];
-
-const construction_label = [
- "case",
- construction_p,
- " (under construction) ",
- "",
-];
-
-const plant_label_visible_p = [
- "any",
- [">", output, 1000],
- ["all", [">", output, 750], [">", ["zoom"], 5]],
- ["all", [">", output, 250], [">", ["zoom"], 6]],
- ["all", [">", output, 100], [">", ["zoom"], 7]],
- ["all", [">", output, 10], [">", ["zoom"], 9]],
- ["all", [">", output, 1], [">", ["zoom"], 11]],
- [">", ["zoom"], 12],
-];
-
-const pretty_output = [
- "case",
- [">", output, 1],
- ["concat", output, " MW"],
- ["concat", ["round", ["*", output, 1000]], " kW"],
-];
-
-const local_name = (["coalesce"] as (string | string[])[]).concat(
- local_name_tags.map((tag) => ["get", tag])
-);
-
-const plant_label = [
- "step",
- ["zoom"],
- ["concat", local_name],
+ ['any', ['all', ['!=', ['get', 'line'], 'busbar'], ['!=', ['get', 'line'], 'bay']], ['>', ['zoom'], 12]]
+]
+
+const construction_p: ExpressionSpecification = ['get', 'construction']
+
+const construction_label: ExpressionSpecification = ['case', construction_p, ' (under construction) ', '']
+
+const plant_label_visible_p: ExpressionSpecification = [
+ 'any',
+ ['>', output, 1000],
+ ['all', ['>', output, 750], ['>', ['zoom'], 5]],
+ ['all', ['>', output, 250], ['>', ['zoom'], 6]],
+ ['all', ['>', output, 100], ['>', ['zoom'], 7]],
+ ['all', ['>', output, 10], ['>', ['zoom'], 9]],
+ ['all', ['>', output, 1], ['>', ['zoom'], 11]],
+ ['>', ['zoom'], 12]
+]
+
+const pretty_output: ExpressionSpecification = [
+ 'case',
+ ['>', output, 1],
+ ['concat', output, ' MW'],
+ ['concat', ['round', ['*', output, 1000]], ' kW']
+]
+
+const plant_label: ExpressionSpecification = [
+ 'step',
+ ['zoom'],
+ ['concat', local_name],
9,
[
- "case",
- ["all", ["!", ["has", "name"]], ["has", "output"]],
- ["concat", pretty_output, construction_label],
- ["has", "output"],
- ["concat", local_name, " \n", pretty_output, "\n", construction_label],
- local_name,
- ],
-];
-
-function plant_image() {
- let expr = ["match", ["get", "source"]];
+ 'case',
+ ['all', ['!', ['has', 'name']], ['has', 'output']],
+ ['concat', pretty_output, construction_label],
+ ['has', 'output'],
+ ['concat', local_name, ' \n', pretty_output, '\n', construction_label],
+ local_name
+ ]
+]
+
+function plant_image(): ExpressionSpecification {
+ const expr = ['match', ['get', 'source']]
for (const [key, value] of Object.entries(plant_types)) {
- expr.push(key, value);
+ expr.push(key, value)
}
- expr.push("power_plant"); // default
- return expr;
+ expr.push('power_plant') // default
+ return expr as ExpressionSpecification
}
-const power_line_opacity = [
- "interpolate",
- ["linear"],
- ["zoom"],
+const power_line_opacity: ExpressionSpecification = [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
4,
- ["case", construction_p, 0.3, 0.6],
+ ['case', construction_p, 0.3, 0.6],
8,
- ["case", construction_p, 0.3, 1],
-];
+ ['case', construction_p, 0.3, 1]
+]
-const freq = [
- "case",
+const freq: ExpressionSpecification = [
+ 'case',
hvdc_p,
- " DC",
+ ' DC',
traction_freq_p,
- ["concat", " ", ["get", "frequency"], " Hz"],
- "",
-];
+ ['concat', ' ', ['get', 'frequency'], ' Hz'],
+ ''
+]
-function round(field: string | string[], places: number) {
- const pow = Math.pow(10, places);
- return ["/", ["round", ["*", field, pow]], pow];
+function round(field: ExpressionSpecification, places: number): ExpressionSpecification {
+ const pow = Math.pow(10, places)
+ return ['/', ['round', ['*', field, pow]], pow]
}
-const line_voltage = [
- "case",
- [
- "all",
- ["has", "voltage_3"],
- ["!=", ["get", "voltage_3"], ["get", "voltage_2"]],
- ],
- [
- "concat",
- round(["get", "voltage"], 3),
- "/",
- round(["get", "voltage_2"], 3),
- "/",
- round(["get", "voltage_3"], 3),
- " kV",
- ],
- [
- "all",
- ["has", "voltage_2"],
- ["!=", ["get", "voltage_2"], ["get", "voltage"]],
- ],
+const line_voltage: ExpressionSpecification = [
+ 'case',
+ ['all', ['has', 'voltage_3'], ['!=', ['get', 'voltage_3'], ['get', 'voltage_2']]],
[
- "concat",
- round(["get", "voltage"], 3),
- "/",
- round(["get", "voltage_2"], 3),
- " kV",
+ 'concat',
+ round(['get', 'voltage'], 3),
+ '/',
+ round(['get', 'voltage_2'], 3),
+ '/',
+ round(['get', 'voltage_3'], 3),
+ ' kV'
],
- ["has", "voltage"],
- ["concat", round(["get", "voltage"], 3), " kV"],
- "",
-];
-
-const line_label = [
- "case",
- ["all", ["has", "voltage"], ["has", "name"], ["!=", local_name, ""]],
- ["concat", local_name, " (", line_voltage, freq, ")", construction_label],
- ["has", "voltage"],
- ["concat", line_voltage, freq, construction_label],
- local_name,
-];
-
-const substation_label_detail = [
- "case",
- ["all", ["!=", local_name, ""], ["has", "voltage"]],
- ["concat", local_name, " ", voltage, " kV", freq, construction_label],
- ["all", ["==", local_name, ""], ["has", "voltage"]],
- ["concat", "Substation ", voltage, " kV", freq, construction_label],
- local_name,
-];
-
-const substation_label = [
- "step",
- ["zoom"],
- local_name,
- 12,
- substation_label_detail,
-];
-
-const layers = [
+ ['all', ['has', 'voltage_2'], ['!=', ['get', 'voltage_2'], ['get', 'voltage']]],
+ ['concat', round(['get', 'voltage'], 3), '/', round(['get', 'voltage_2'], 3), ' kV'],
+ ['has', 'voltage'],
+ ['concat', round(['get', 'voltage'], 3), ' kV'],
+ ''
+]
+
+const line_label: ExpressionSpecification = [
+ 'case',
+ ['all', ['has', 'voltage'], ['has', 'name'], ['!=', local_name, '']],
+ ['concat', local_name, ' (', line_voltage, freq, ')', construction_label],
+ ['has', 'voltage'],
+ ['concat', line_voltage, freq, construction_label],
+ local_name
+]
+
+const substation_label_detail: ExpressionSpecification = [
+ 'case',
+ ['all', ['!=', local_name, ''], ['has', 'voltage']],
+ ['concat', local_name, ' ', voltage, ' kV', freq, construction_label],
+ ['all', ['==', local_name, ''], ['has', 'voltage']],
+ ['concat', 'Substation ', voltage, ' kV', freq, construction_label],
+ local_name
+]
+
+const substation_label: ExpressionSpecification = ['step', ['zoom'], local_name, 12, substation_label_detail]
+
+const layers: LayerSpecificationWithZIndex[] = [
{
zorder: 60,
- id: "power_line_case",
- type: "line",
- source: "openinframap",
- "source-layer": "power_line",
- filter: ["==", ["get", "tunnel"], true],
+ id: 'power_line_case',
+ type: 'line',
+ source: 'openinframap',
+ 'source-layer': 'power_line',
+ filter: ['==', ['get', 'tunnel'], true],
minzoom: 12,
paint: {
- "line-opacity": ["case", construction_p, 0.2, 0.4],
- "line-color": "#7C4544",
- "line-width": ["interpolate", ["linear"], ["zoom"], 12, 4, 18, 10],
+ 'line-opacity': ['case', construction_p, 0.2, 0.4],
+ 'line-color': '#7C4544',
+ 'line-width': ['interpolate', ['linear'], ['zoom'], 12, 4, 18, 10]
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 61,
- id: "power_line_underground_1",
- type: "line",
- filter: ["all", underground_p, power_visible_p],
- source: "openinframap",
- "source-layer": "power_line",
+ id: 'power_line_underground_1',
+ type: 'line',
+ filter: ['all', underground_p, power_visible_p],
+ source: 'openinframap',
+ 'source-layer': 'power_line',
minzoom: 0,
paint: {
- "line-color": voltage_color("voltage"),
- "line-width": voltage_line_thickness,
- "line-dasharray": [3, 2],
- "line-offset": voltage_offset(1),
- "line-opacity": power_line_opacity,
+ 'line-color': voltage_color('voltage'),
+ 'line-width': voltage_line_thickness,
+ 'line-dasharray': [3, 2],
+ 'line-offset': voltage_offset(1),
+ 'line-opacity': power_line_opacity
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 61,
- id: "power_line_underground_2",
- type: "line",
- filter: ["all", underground_p, power_visible_p, ["has", "voltage_2"]],
- source: "openinframap",
- "source-layer": "power_line",
+ id: 'power_line_underground_2',
+ type: 'line',
+ filter: ['all', underground_p, power_visible_p, ['has', 'voltage_2']],
+ source: 'openinframap',
+ 'source-layer': 'power_line',
minzoom: multi_voltage_min_zoom,
paint: {
- "line-color": voltage_color("voltage_2"),
- "line-width": voltage_line_thickness,
- "line-dasharray": [3, 2],
- "line-offset": voltage_offset(2),
- "line-opacity": power_line_opacity,
+ 'line-color': voltage_color('voltage_2'),
+ 'line-width': voltage_line_thickness,
+ 'line-dasharray': [3, 2],
+ 'line-offset': voltage_offset(2),
+ 'line-opacity': power_line_opacity
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 61,
- id: "power_line_underground_3",
- type: "line",
- filter: ["all", underground_p, power_visible_p, ["has", "voltage_3"]],
- source: "openinframap",
- "source-layer": "power_line",
+ id: 'power_line_underground_3',
+ type: 'line',
+ filter: ['all', underground_p, power_visible_p, ['has', 'voltage_3']],
+ source: 'openinframap',
+ 'source-layer': 'power_line',
minzoom: multi_voltage_min_zoom,
paint: {
- "line-color": voltage_color("voltage_3"),
- "line-width": voltage_line_thickness,
- "line-dasharray": [3, 2],
- "line-offset": voltage_offset(3),
- "line-opacity": power_line_opacity,
+ 'line-color': voltage_color('voltage_3'),
+ 'line-width': voltage_line_thickness,
+ 'line-dasharray': [3, 2],
+ 'line-offset': voltage_offset(3),
+ 'line-opacity': power_line_opacity
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 160,
- id: "power_plant",
- type: "fill",
- source: "openinframap",
+ id: 'power_plant',
+ type: 'fill',
+ source: 'openinframap',
minzoom: 5,
- "source-layer": "power_plant",
+ 'source-layer': 'power_plant',
paint: {
- "fill-opacity": ["case", construction_p, 0.05, 0.2],
- },
+ 'fill-opacity': ['case', construction_p, 0.05, 0.2]
+ }
},
{
zorder: 161,
- id: "power_plant_outline",
- type: "line",
- filter: ["!", construction_p],
- source: "openinframap",
+ id: 'power_plant_outline',
+ type: 'line',
+ filter: ['!', construction_p],
+ source: 'openinframap',
minzoom: 8,
- "source-layer": "power_plant",
+ 'source-layer': 'power_plant',
paint: {
- "line-color": "rgb(80,80,80)",
- "line-opacity": 0.4,
- "line-width": 1,
+ 'line-color': 'rgb(80,80,80)',
+ 'line-opacity': 0.4,
+ 'line-width': 1
},
layout: {
- "line-join": "round",
- },
+ 'line-join': 'round'
+ }
},
{
zorder: 161,
- id: "power_plant_outline_construction",
- type: "line",
+ id: 'power_plant_outline_construction',
+ type: 'line',
filter: construction_p,
- source: "openinframap",
+ source: 'openinframap',
minzoom: 8,
- "source-layer": "power_plant",
+ 'source-layer': 'power_plant',
paint: {
- "line-color": "rgb(163,139,16)",
- "line-opacity": 0.4,
- "line-width": 1,
- "line-dasharray": [2, 2],
+ 'line-color': 'rgb(163,139,16)',
+ 'line-opacity': 0.4,
+ 'line-width': 1,
+ 'line-dasharray': [2, 2]
},
layout: {
- "line-join": "round",
- },
+ 'line-join': 'round'
+ }
},
{
zorder: 161,
- id: "power_substation",
- type: "fill",
+ id: 'power_substation',
+ type: 'fill',
filter: substation_visible_p,
- source: "openinframap",
- "source-layer": "power_substation",
+ source: 'openinframap',
+ 'source-layer': 'power_substation',
minzoom: 13,
paint: {
- "fill-opacity": 0.3,
- "fill-color": voltage_color("voltage"),
- "fill-outline-color": "rgba(0, 0, 0, 1)",
- },
+ 'fill-opacity': 0.3,
+ 'fill-color': voltage_color('voltage'),
+ 'fill-outline-color': 'rgba(0, 0, 0, 1)'
+ }
},
{
zorder: 162,
- id: "power_solar_panel",
- type: "fill",
- source: "openinframap",
- "source-layer": "power_generator_area",
- filter: ["==", ["get", "source"], "solar"],
+ id: 'power_solar_panel',
+ type: 'fill',
+ source: 'openinframap',
+ 'source-layer': 'power_generator_area',
+ filter: ['==', ['get', 'source'], 'solar'],
minzoom: 13,
paint: {
- "fill-color": "#726BA9",
- "fill-outline-color": "rgba(50, 50, 50, 1)",
- },
+ 'fill-color': '#726BA9',
+ 'fill-outline-color': 'rgba(50, 50, 50, 1)'
+ }
},
{
zorder: 260,
- id: "power_line_1",
- type: "line",
- source: "openinframap",
- "source-layer": "power_line",
- filter: ["all", ["!", underground_p], power_visible_p],
+ id: 'power_line_1',
+ type: 'line',
+ source: 'openinframap',
+ 'source-layer': 'power_line',
+ filter: ['all', ['!', underground_p], power_visible_p],
minzoom: 0,
paint: {
- "line-color": voltage_color("voltage"),
- "line-width": voltage_line_thickness,
- "line-offset": voltage_offset(1),
- "line-opacity": power_line_opacity,
+ 'line-color': voltage_color('voltage'),
+ 'line-width': voltage_line_thickness,
+ 'line-offset': voltage_offset(1),
+ 'line-opacity': power_line_opacity
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 260,
- id: "power_line_2",
- type: "line",
- source: "openinframap",
- "source-layer": "power_line",
- filter: [
- "all",
- ["!", underground_p],
- power_visible_p,
- ["has", "voltage_2"],
- ],
+ id: 'power_line_2',
+ type: 'line',
+ source: 'openinframap',
+ 'source-layer': 'power_line',
+ filter: ['all', ['!', underground_p], power_visible_p, ['has', 'voltage_2']],
minzoom: multi_voltage_min_zoom,
paint: {
- "line-color": voltage_color("voltage_2"),
- "line-width": voltage_line_thickness,
- "line-offset": voltage_offset(2),
- "line-opacity": power_line_opacity,
+ 'line-color': voltage_color('voltage_2'),
+ 'line-width': voltage_line_thickness,
+ 'line-offset': voltage_offset(2),
+ 'line-opacity': power_line_opacity
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 260,
- id: "power_line_3",
- type: "line",
- source: "openinframap",
- "source-layer": "power_line",
- filter: [
- "all",
- ["!", underground_p],
- power_visible_p,
- ["has", "voltage_3"],
- ],
+ id: 'power_line_3',
+ type: 'line',
+ source: 'openinframap',
+ 'source-layer': 'power_line',
+ filter: ['all', ['!', underground_p], power_visible_p, ['has', 'voltage_3']],
minzoom: multi_voltage_min_zoom,
paint: {
- "line-color": voltage_color("voltage_3"),
- "line-width": voltage_line_thickness,
- "line-offset": voltage_offset(3),
- "line-opacity": power_line_opacity,
+ 'line-color': voltage_color('voltage_3'),
+ 'line-width': voltage_line_thickness,
+ 'line-offset': voltage_offset(3),
+ 'line-opacity': power_line_opacity
},
layout: {
- "line-join": "round",
- "line-cap": "round",
- },
+ 'line-join': 'round',
+ 'line-cap': 'round'
+ }
},
{
zorder: 261,
- id: "power_transformer",
- type: "symbol",
- source: "openinframap",
- "source-layer": "power_transformer",
+ id: 'power_transformer',
+ type: 'symbol',
+ source: 'openinframap',
+ 'source-layer': 'power_transformer',
minzoom: 14,
paint: text_paint,
layout: {
- "icon-image": "power_transformer",
- },
+ 'icon-image': 'power_transformer'
+ }
},
{
zorder: 262,
- id: "power_compensator",
- type: "symbol",
- source: "openinframap",
- "source-layer": "power_compensator",
+ id: 'power_compensator',
+ type: 'symbol',
+ source: 'openinframap',
+ 'source-layer': 'power_compensator',
minzoom: 14,
paint: text_paint,
layout: {
- "icon-image": "power_compensator",
- },
+ 'icon-image': 'power_compensator'
+ }
},
{
zorder: 263,
- id: "power_switch",
- type: "symbol",
- source: "openinframap",
- "source-layer": "power_switch",
+ id: 'power_switch',
+ type: 'symbol',
+ source: 'openinframap',
+ 'source-layer': 'power_switch',
minzoom: 14,
paint: text_paint,
layout: {
- "icon-image": "power_switch",
- },
+ 'icon-image': 'power_switch'
+ }
},
{
zorder: 264,
- id: "power_tower",
- type: "symbol",
- filter: ["==", ["get", "type"], "tower"],
- source: "openinframap",
- "source-layer": "power_tower",
+ id: 'power_tower',
+ type: 'symbol',
+ filter: ['==', ['get', 'type'], 'tower'],
+ source: 'openinframap',
+ 'source-layer': 'power_tower',
minzoom: 13,
paint: text_paint,
layout: {
- "icon-image": [
- "case",
- ["get", "transition"],
- "power_tower_transition",
- ["any", ["has", "transformer"], ["has", "substation"]],
- "power_tower_transformer",
- "power_tower",
+ 'icon-image': [
+ 'case',
+ ['get', 'transition'],
+ 'power_tower_transition',
+ ['any', ['has', 'transformer'], ['has', 'substation']],
+ 'power_tower_transformer',
+ 'power_tower'
],
- "icon-offset": [
- "case",
- ["any", ["has", "transformer"], ["has", "substation"]],
- ["literal", [12, 0]],
- ["literal", [0, 0]],
+ 'icon-offset': [
+ 'case',
+ ['any', ['has', 'transformer'], ['has', 'substation']],
+ ['literal', [12, 0]],
+ ['literal', [0, 0]]
],
- "icon-allow-overlap": true,
- "icon-size": ["interpolate", ["linear"], ["zoom"], 13, 0.6, 17, 1],
- "text-field": "{ref}",
- "text-font": font,
- "text-size": [
- "step",
+ 'icon-allow-overlap': true,
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 13, 0.6, 17, 1],
+ 'text-field': '{ref}',
+ 'text-font': font,
+ 'text-size': [
+ 'step',
// Set visibility by using size
- ["zoom"],
+ ['zoom'],
0,
14,
- 10,
+ 10
],
- "text-offset": [0, 1.5],
- "text-max-angle": 10,
- },
+ 'text-offset': [0, 1.5],
+ 'text-max-angle': 10
+ }
},
{
zorder: 265,
- id: "power_pole",
- type: "symbol",
- filter: ["==", ["get", "type"], "pole"],
- source: "openinframap",
- "source-layer": "power_tower",
+ id: 'power_pole',
+ type: 'symbol',
+ filter: ['==', ['get', 'type'], 'pole'],
+ source: 'openinframap',
+ 'source-layer': 'power_tower',
minzoom: 13,
paint: text_paint,
layout: {
- "icon-image": [
- "case",
- ["get", "transition"],
- "power_pole_transition",
- ["any", ["has", "transformer"], ["has", "substation"]],
- "power_pole_transformer",
- "power_pole",
+ 'icon-image': [
+ 'case',
+ ['get', 'transition'],
+ 'power_pole_transition',
+ ['any', ['has', 'transformer'], ['has', 'substation']],
+ 'power_pole_transformer',
+ 'power_pole'
],
- "icon-offset": [
- "case",
- ["any", ["has", "transformer"], ["has", "substation"]],
- ["literal", [10, 0]],
- ["literal", [0, 0]],
+ 'icon-offset': [
+ 'case',
+ ['any', ['has', 'transformer'], ['has', 'substation']],
+ ['literal', [10, 0]],
+ ['literal', [0, 0]]
],
- "icon-allow-overlap": true,
- "icon-size": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 17, 0.8],
- "text-field": "{ref}",
- "text-font": font,
- "text-size": [
- "step",
+ 'icon-allow-overlap': true,
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 13, 0.2, 17, 0.8],
+ 'text-field': '{ref}',
+ 'text-font': font,
+ 'text-size': [
+ 'step',
// Set visibility by using size
- ["zoom"],
+ ['zoom'],
0,
14,
- 10,
+ 10
],
- "text-offset": [0, 1],
- "text-max-angle": 10,
- },
+ 'text-offset': [0, 1],
+ 'text-max-angle': 10
+ }
},
{
zorder: 266,
- id: "power_wind_turbine",
- type: "symbol",
- source: "openinframap",
- "source-layer": "power_generator",
- filter: ["==", ["get", "source"], "wind"],
+ id: 'power_wind_turbine',
+ type: 'symbol',
+ source: 'openinframap',
+ 'source-layer': 'power_generator',
+ filter: ['==', ['get', 'source'], 'wind'],
minzoom: 11,
paint: text_paint,
layout: {
- "icon-image": "power_wind",
- "icon-anchor": "bottom",
- "icon-size": ["interpolate", ["linear"], ["zoom"], 11, 0.5, 14, 1],
- "text-field": "{name}",
- "text-font": font,
- "text-size": ["step", ["zoom"], 0, 12, 9],
- "text-offset": [0, 1],
- "text-anchor": "top",
- },
+ 'icon-image': 'power_wind',
+ 'icon-anchor': 'bottom',
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 11, 0.5, 14, 1],
+ 'text-field': '{name}',
+ 'text-font': font,
+ 'text-size': ['step', ['zoom'], 0, 12, 9],
+ 'text-offset': [0, 1],
+ 'text-anchor': 'top'
+ }
},
{
zorder: 267,
- id: "power_wind_turbine_point",
- type: "circle",
- source: "openinframap",
- "source-layer": "power_generator",
+ id: 'power_wind_turbine_point',
+ type: 'circle',
+ source: 'openinframap',
+ 'source-layer': 'power_generator',
//['all',
- filter: ["==", ["get", "source"], "wind"],
+ filter: ['==', ['get', 'source'], 'wind'],
// ['has', 'output'],
// ['>', ['get', 'output'], 1]
// ],
minzoom: 9,
maxzoom: 11,
paint: {
- "circle-radius": 1.5,
- "circle-color": "#444444",
- },
+ 'circle-radius': 1.5,
+ 'circle-color': '#444444'
+ }
},
{
zorder: 268,
- id: "power_substation_point",
- type: "circle",
- filter: [
- "all",
- substation_visible_p,
- substation_point_visible_p,
- ["!", converter_p],
- ],
- source: "openinframap",
- "source-layer": "power_substation_point",
+ id: 'power_substation_point',
+ type: 'circle',
+ filter: ['all', substation_visible_p, substation_point_visible_p, ['!', converter_p]],
+ source: 'openinframap',
+ 'source-layer': 'power_substation_point',
minzoom: 5,
layout: {},
paint: {
- "circle-radius": substation_radius,
- "circle-color": voltage_color("voltage"),
- "circle-stroke-color": "#555",
- "circle-stroke-width": [
- "interpolate",
- ["linear"],
- ["zoom"],
- 5,
- 0.1,
- 8,
- 0.5,
- 15,
- 2,
- ],
- "circle-opacity": power_line_opacity,
- "circle-stroke-opacity": power_line_opacity,
- },
+ 'circle-radius': substation_radius,
+ 'circle-color': voltage_color('voltage'),
+ 'circle-stroke-color': '#555',
+ 'circle-stroke-width': ['interpolate', ['linear'], ['zoom'], 5, 0.1, 8, 0.5, 15, 2],
+ 'circle-opacity': power_line_opacity,
+ 'circle-stroke-opacity': power_line_opacity
+ }
},
{
zorder: 560,
- id: "power_line_ref",
- type: "symbol",
+ id: 'power_line_ref',
+ type: 'symbol',
filter: [
- "all",
+ 'all',
power_ref_visible_p,
- ["!=", ["coalesce", ["get", "ref"], ""], ""],
- ["<", ["length", ["get", "ref"]], 5],
+ ['!=', ['coalesce', ['get', 'ref'], ''], ''],
+ ['<', ['length', ['get', 'ref']], 5]
],
- source: "openinframap",
- "source-layer": "power_line",
+ source: 'openinframap',
+ 'source-layer': 'power_line',
minzoom: 7,
layout: {
- "icon-image": "power_line_ref",
- "text-field": "{ref}",
- "text-font": font,
- "symbol-placement": "line-center",
- "text-size": 10,
- "text-max-angle": 10,
- },
+ 'icon-image': 'power_line_ref',
+ 'text-field': '{ref}',
+ 'text-font': font,
+ 'symbol-placement': 'line-center',
+ 'text-size': 10,
+ 'text-max-angle': 10
+ }
},
{
zorder: 561,
- id: "power_line_label",
- type: "symbol",
- filter: ["all", power_visible_p],
- source: "openinframap",
- "source-layer": "power_line",
+ id: 'power_line_label',
+ type: 'symbol',
+ filter: ['all', power_visible_p],
+ source: 'openinframap',
+ 'source-layer': 'power_line',
minzoom: 11,
paint: text_paint,
layout: {
- "text-field": line_label,
- "text-font": font,
- "symbol-placement": "line",
- "symbol-spacing": 400,
- "text-size": ["interpolate", ["linear"], ["zoom"], 11, 10, 18, 13],
- "text-offset": [
- "case",
- ["has", "voltage_3"],
- ["literal", [0, 1.5]],
- ["has", "voltage_2"],
- ["literal", [0, 1.25]],
- ["literal", [0, 1]],
+ 'text-field': line_label,
+ 'text-font': font,
+ 'symbol-placement': 'line',
+ 'symbol-spacing': 400,
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 11, 10, 18, 13],
+ 'text-offset': [
+ 'case',
+ ['has', 'voltage_3'],
+ ['literal', [0, 1.5]],
+ ['has', 'voltage_2'],
+ ['literal', [0, 1.25]],
+ ['literal', [0, 1]]
],
- "text-max-angle": 10,
- },
+ 'text-max-angle': 10
+ }
},
{
zorder: 562,
- id: "power_substation_ref_label",
- type: "symbol",
+ id: 'power_substation_ref_label',
+ type: 'symbol',
filter: substation_label_visible_p,
- source: "openinframap",
- "source-layer": "power_substation_point",
+ source: 'openinframap',
+ 'source-layer': 'power_substation_point',
minzoom: 14.5,
layout: {
- "symbol-z-order": "source",
- "text-field": "{ref}",
- "text-font": font,
- "text-anchor": "bottom",
- "text-offset": [0, -0.5],
- "text-size": ["interpolate", ["linear"], ["zoom"], 14, 9, 18, 12],
- "text-max-width": 8,
- },
- paint: text_paint,
+ 'symbol-z-order': 'source',
+ 'text-field': '{ref}',
+ 'text-font': font,
+ 'text-anchor': 'bottom',
+ 'text-offset': [0, -0.5],
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 14, 9, 18, 12],
+ 'text-max-width': 8
+ },
+ paint: text_paint
},
{
zorder: 562,
- id: "power_substation_label",
- type: "symbol",
- source: "openinframap",
+ id: 'power_substation_label',
+ type: 'symbol',
+ source: 'openinframap',
filter: substation_label_visible_p,
- "source-layer": "power_substation_point",
+ 'source-layer': 'power_substation_point',
minzoom: 8,
layout: {
- "symbol-sort-key": ["-", 10000, voltage],
- "symbol-z-order": "source",
- "text-field": substation_label,
- "text-font": font,
- "text-anchor": "top",
- "text-offset": [0, 0.5],
- "text-size": [
- "interpolate",
- ["linear"],
- ["zoom"],
+ 'symbol-sort-key': ['-', 10000, voltage],
+ 'symbol-z-order': 'source',
+ 'text-field': substation_label,
+ 'text-font': font,
+ 'text-anchor': 'top',
+ 'text-offset': [0, 0.5],
+ 'text-size': [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
8,
10,
18,
- ["interpolate", ["linear"], voltage, 0, 10, 400, 16],
+ ['interpolate', ['linear'], voltage, 0, 10, 400, 16]
],
- "text-max-width": 8,
+ 'text-max-width': 8
},
- paint: text_paint,
+ paint: text_paint
},
{
zorder: 562,
- id: "power_converter_point",
- type: "symbol",
- filter: ["all", converter_p, substation_point_visible_p],
- source: "openinframap",
- "source-layer": "power_substation_point",
+ id: 'power_converter_point',
+ type: 'symbol',
+ filter: ['all', converter_p, substation_point_visible_p],
+ source: 'openinframap',
+ 'source-layer': 'power_substation_point',
minzoom: 5.5,
layout: {
- "icon-image": "converter",
- "icon-size": ["interpolate", ["linear"], ["zoom"], 5, 0.4, 9, 1],
- "text-field": substation_label,
- "text-font": font,
- "text-anchor": "top",
- "text-offset": [0, 1.2],
- "text-size": [
- "interpolate",
- ["linear"],
- ["zoom"],
+ 'icon-image': 'converter',
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 5, 0.4, 9, 1],
+ 'text-field': substation_label,
+ 'text-font': font,
+ 'text-anchor': 'top',
+ 'text-offset': [0, 1.2],
+ 'text-size': [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
7,
10,
18,
- ["interpolate", ["linear"], output, 0, 10, 2000, 16],
+ ['interpolate', ['linear'], output, 0, 10, 2000, 16]
],
- "text-optional": true,
+ 'text-optional': true
},
- paint: Object.assign({}, text_paint, {
- "text-opacity": ["step", ["zoom"], 0, 7, 1],
- }),
+ paint: { ...text_paint, 'text-opacity': ['step', ['zoom'], 0, 7, 1] }
},
{
zorder: 563,
- id: "power_plant_label",
- type: "symbol",
- source: "openinframap",
+ id: 'power_plant_label',
+ type: 'symbol',
+ source: 'openinframap',
filter: plant_label_visible_p,
- "source-layer": "power_plant_point",
+ 'source-layer': 'power_plant_point',
minzoom: 6,
maxzoom: 24,
layout: {
- "symbol-sort-key": ["-", 10000, output],
- "symbol-z-order": "source",
- "icon-allow-overlap": true,
- "icon-image": plant_image(),
- "icon-size": ["interpolate", ["linear"], ["zoom"], 6, 0.6, 10, 0.8],
- "text-field": plant_label,
- "text-font": font,
- "text-anchor": "top",
- "text-offset": [0, 1],
- "text-size": [
- "interpolate",
- ["linear"],
- ["zoom"],
+ 'symbol-sort-key': ['-', 10000, output],
+ 'symbol-z-order': 'source',
+ 'icon-allow-overlap': true,
+ 'icon-image': plant_image(),
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 6, 0.6, 10, 0.8],
+ 'text-field': plant_label,
+ 'text-font': font,
+ 'text-anchor': 'top',
+ 'text-offset': [0, 1],
+ 'text-size': [
+ 'interpolate',
+ ['linear'],
+ ['zoom'],
7,
10,
18,
- ["interpolate", ["linear"], output, 0, 10, 2000, 16],
+ ['interpolate', ['linear'], output, 0, 10, 2000, 16]
],
- "text-optional": true,
+ 'text-optional': true
},
- paint: Object.assign({}, text_paint, {
+ paint: {
+ ...text_paint,
// Control visibility using the opacity property...
- "icon-opacity": [
- "step",
- ["zoom"],
- ["case", construction_p, 0.5, 1],
- 11,
- 0,
- ],
- "text-opacity": ["step", ["zoom"], 0, 7, 1],
- }),
- },
-];
+ 'icon-opacity': ['step', ['zoom'], ['case', construction_p, 0.5, 1], 11, 0],
+ 'text-opacity': ['step', ['zoom'], 0, 7, 1]
+ }
+ }
+]
-export { layers as default, voltage_scale, special_voltages, plant_types };
+export { layers as default, voltage_scale, special_voltages, plant_types }
diff --git a/web/src/style/style_oim_power_heatmap.js b/web/src/style/style_oim_power_heatmap.ts
similarity index 58%
rename from web/src/style/style_oim_power_heatmap.js
rename to web/src/style/style_oim_power_heatmap.ts
index de83f59..54d5386 100644
--- a/web/src/style/style_oim_power_heatmap.js
+++ b/web/src/style/style_oim_power_heatmap.ts
@@ -1,16 +1,25 @@
+import { ExpressionSpecification } from 'maplibre-gl'
+import { LayerSpecificationWithZIndex } from './types.ts'
-const generator_weight = ['interpolate',
- ['linear'],
- ['to-number', ['get', 'output']],
- 0, 0,
- 70, 0.125,
- 250, 0.25,
- 1000, 0.35,
- 7000, 0.5,
- 14000, 1
-];
+const generator_weight: ExpressionSpecification = [
+ 'interpolate',
+ ['linear'],
+ ['to-number', ['get', 'output']],
+ 0,
+ 0,
+ 70,
+ 0.125,
+ 250,
+ 0.25,
+ 1000,
+ 0.35,
+ 7000,
+ 0.5,
+ 14000,
+ 1
+]
-const layers = [
+const layers: LayerSpecificationWithZIndex[] = [
{
zorder: 162,
id: 'heatmap_solar',
@@ -43,21 +52,15 @@ const layers = [
0.9,
'rgb(189,0,38)',
1,
- 'rgb(128,0,38)',
+ 'rgb(128,0,38)'
],
// Adjust the heatmap radius by zoom level
- 'heatmap-radius': ['interpolate',
- ['linear'], ['zoom'],
- 2, 2,
- 6, 6,
- 10, 12,
- 12, 20
- ],
+ 'heatmap-radius': ['interpolate', ['linear'], ['zoom'], 2, 2, 6, 6, 10, 12, 12, 20]
},
layout: {
- 'visibility': 'none'
- },
- },
-];
+ visibility: 'none'
+ }
+ }
+]
-export {layers as default};
+export { layers as default }
diff --git a/web/src/style/style_oim_telecoms.js b/web/src/style/style_oim_telecoms.js
deleted file mode 100644
index c99c9ef..0000000
--- a/web/src/style/style_oim_telecoms.js
+++ /dev/null
@@ -1,105 +0,0 @@
-import { text_paint, operator_text, font } from "./style_oim_common.js";
-import { local_name_tags } from "../l10n.ts";
-const local_name = ["coalesce"].concat(
- local_name_tags.map((tag) => ["get", tag])
-);
-
-const layers = [
- {
- zorder: 40,
- id: "telecoms_line",
- type: "line",
- source: "openinframap",
- minzoom: 2,
- "source-layer": "telecoms_communication_line",
- paint: {
- "line-color": "#61637A",
- "line-width": ["interpolate", ["linear"], ["zoom"], 3, 0.3, 11, 2],
- "line-dasharray": [3, 2],
- },
- },
- {
- zorder: 140,
- id: "telecoms_data_center",
- type: "fill",
- source: "openinframap",
- minzoom: 10,
- "source-layer": "telecoms_data_center",
- paint: {
- "fill-opacity": 0.3,
- "fill-color": "#7D59AB",
- "fill-outline-color": "rgba(0, 0, 0, 1)",
- },
- },
- {
- zorder: 141,
- id: "telecoms_mast",
- type: "symbol",
- source: "openinframap",
- minzoom: 10,
- "source-layer": "telecoms_mast",
- paint: text_paint,
- layout: {
- "icon-image": "comms_tower",
- "icon-anchor": "bottom",
- "icon-size": ["interpolate", ["linear"], ["zoom"], 10, 0.6, 14, 1],
- "text-field": operator_text,
- "text-font": font,
- "text-size": {
- stops: [
- [11, 0],
- [12, 0],
- [12.01, 10],
- ],
- },
- "text-anchor": "top",
- "text-offset": {
- stops: [
- [11, [0, 1]],
- [16, [0, 2]],
- ],
- },
- "text-optional": true,
- },
- },
- {
- id: "telecoms_data_center_symbol",
- type: "symbol",
- source: "openinframap",
- minzoom: 11,
- "source-layer": "telecoms_data_center",
- paint: text_paint,
- layout: {
- "text-field": operator_text,
- "text-font": font,
- "text-size": {
- stops: [
- [11, 0],
- [13, 0],
- [13.01, 10],
- ],
- },
- "text-offset": [0, 1],
- "text-anchor": "top",
- },
- },
- {
- id: "telecoms_line_label",
- type: "symbol",
- source: "openinframap",
- minzoom: 9,
- "source-layer": "telecoms_communication_line",
- paint: text_paint,
- layout: {
- "text-field": local_name,
- "text-font": font,
- "symbol-placement": "line",
- "symbol-spacing": 400,
- "text-size": 10,
- "text-offset": [0, 1],
- "text-max-angle": 10,
- },
- },
-];
-
-export default layers;
diff --git a/web/src/style/style_oim_telecoms.ts b/web/src/style/style_oim_telecoms.ts
new file mode 100644
index 0000000..7258d36
--- /dev/null
+++ b/web/src/style/style_oim_telecoms.ts
@@ -0,0 +1,86 @@
+import { LayerSpecificationWithZIndex } from './types.ts'
+import { text_paint, operator_text, font } from './common.js'
+import { local_name } from './common.ts'
+
+const layers: LayerSpecificationWithZIndex[] = [
+ {
+ zorder: 40,
+ id: 'telecoms_line',
+ type: 'line',
+ source: 'openinframap',
+ minzoom: 2,
+ 'source-layer': 'telecoms_communication_line',
+ paint: {
+ 'line-color': '#61637A',
+ 'line-width': ['interpolate', ['linear'], ['zoom'], 3, 0.3, 11, 2],
+ 'line-dasharray': [3, 2]
+ }
+ },
+ {
+ zorder: 140,
+ id: 'telecoms_data_center',
+ type: 'fill',
+ source: 'openinframap',
+ minzoom: 10,
+ 'source-layer': 'telecoms_data_center',
+ paint: {
+ 'fill-opacity': 0.3,
+ 'fill-color': '#7D59AB',
+ 'fill-outline-color': 'rgba(0, 0, 0, 1)'
+ }
+ },
+ {
+ zorder: 141,
+ id: 'telecoms_mast',
+ type: 'symbol',
+ source: 'openinframap',
+ minzoom: 10,
+ 'source-layer': 'telecoms_mast',
+ paint: text_paint,
+ layout: {
+ 'icon-image': 'comms_tower',
+ 'icon-anchor': 'bottom',
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 10, 0.6, 14, 1],
+ 'text-field': operator_text,
+ 'text-font': font,
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 11, 0, 12, 0, 12.01, 10],
+ 'text-anchor': 'top',
+ 'text-offset': ['interpolate', ['linear'], ['zoom'], 11, ['literal', [0, 1]], 16, ['literal', [0, 2]]],
+ 'text-optional': true
+ }
+ },
+ {
+ id: 'telecoms_data_center_symbol',
+ type: 'symbol',
+ source: 'openinframap',
+ minzoom: 11,
+ 'source-layer': 'telecoms_data_center',
+ paint: text_paint,
+ layout: {
+ 'text-field': operator_text,
+ 'text-font': font,
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 11, 0, 13, 0, 13.01, 10],
+ 'text-offset': [0, 1],
+ 'text-anchor': 'top'
+ }
+ },
+ {
+ id: 'telecoms_line_label',
+ type: 'symbol',
+ source: 'openinframap',
+ minzoom: 9,
+ 'source-layer': 'telecoms_communication_line',
+ paint: text_paint,
+ layout: {
+ 'text-field': local_name,
+ 'text-font': font,
+ 'symbol-placement': 'line',
+ 'symbol-spacing': 400,
+ 'text-size': 10,
+ 'text-offset': [0, 1],
+ 'text-max-angle': 10
+ }
+ }
+]
+
+export default layers
diff --git a/web/src/style/style_oim_water.js b/web/src/style/style_oim_water.js
deleted file mode 100644
index b2713ee..0000000
--- a/web/src/style/style_oim_water.js
+++ /dev/null
@@ -1,88 +0,0 @@
-import { text_paint, operator_text, underground_p, font } from './style_oim_common.js';
-
-const colour_freshwater = '#7B7CBA';
-const colour_wastewater = '#BAA87B';
-const colour_hotwater = '#AD4C4C';
-const colour_steam = '#7BBAAC';
-
-const substance_label = ['match', ['get', 'substance'],
- "water", 'Water',
- "rainwater", "Rainwater",
- "hot_water", "Hot Water",
- "wastewater", "Wastewater",
- "sewage", "Sewage",
- "waterwaste", "Waterwaste",
- "steam", "Steam",
- ["get", "substance"]
-];
-
-const substance_colour = ["match", ["get", "substance"],
- "water", colour_freshwater,
- "rainwater", colour_freshwater,
- "hot_water", colour_hotwater,
- "wastewater", colour_wastewater,
- "sewage", colour_wastewater,
- "waterwaste", colour_wastewater,
- "steam", colour_steam,
- '#7B7CBA'
-];
-
-const layers = [
- {
- zorder: 20,
- id: 'water_pipeline_case',
- type: 'line',
- source: 'openinframap',
- minzoom: 7,
- 'source-layer': 'water_pipeline',
- paint: {
- 'line-color': '#777777',
- 'line-width': ['interpolate', ['linear'], ['zoom'],
- 8, 1.5,
- 16, 7
- ],
- },
- layout: {
- 'line-cap': 'round',
- 'line-join': 'round',
- },
- },
- {
- zorder: 21,
- id: 'water_pipeline',
- type: 'line',
- source: 'openinframap',
- minzoom: 3,
- 'source-layer': 'water_pipeline',
- paint: {
- 'line-color': substance_colour,
- 'line-width': ['interpolate', ['linear'], ['zoom'],
- 3, 0.3,
- 16, 4
- ],
- },
- },
- {
- zorder: 520,
- id: 'water_pipeline_label',
- type: 'symbol',
- source: 'openinframap',
- 'source-layer': 'water_pipeline',
- minzoom: 11,
- paint: text_paint,
- layout: {
- 'text-field': ["case",
- ["has", "name"], ['concat', ['get', 'name'], ' (', substance_label, ')',],
- substance_label
- ],
- 'text-font': font,
- 'symbol-placement': 'line',
- 'symbol-spacing': 400,
- 'text-size': 10,
- 'text-offset': [0, 1],
- 'text-max-angle': 10
- }
- },
-];
-
-export { layers as default, colour_freshwater, colour_wastewater, colour_hotwater, colour_steam };
diff --git a/web/src/style/style_oim_water.ts b/web/src/style/style_oim_water.ts
new file mode 100644
index 0000000..d91ba50
--- /dev/null
+++ b/web/src/style/style_oim_water.ts
@@ -0,0 +1,104 @@
+import { LayerSpecificationWithZIndex } from './types.ts'
+import { text_paint, font } from './common.js'
+import { ExpressionSpecification } from 'maplibre-gl'
+
+const colour_freshwater = '#7B7CBA'
+const colour_wastewater = '#BAA87B'
+const colour_hotwater = '#AD4C4C'
+const colour_steam = '#7BBAAC'
+
+const substance_label: ExpressionSpecification = [
+ 'match',
+ ['get', 'substance'],
+ 'water',
+ 'Water',
+ 'rainwater',
+ 'Rainwater',
+ 'hot_water',
+ 'Hot Water',
+ 'wastewater',
+ 'Wastewater',
+ 'sewage',
+ 'Sewage',
+ 'waterwaste',
+ 'Waterwaste',
+ 'steam',
+ 'Steam',
+ ['get', 'substance']
+]
+
+const substance_colour: ExpressionSpecification = [
+ 'match',
+ ['get', 'substance'],
+ 'water',
+ colour_freshwater,
+ 'rainwater',
+ colour_freshwater,
+ 'hot_water',
+ colour_hotwater,
+ 'wastewater',
+ colour_wastewater,
+ 'sewage',
+ colour_wastewater,
+ 'waterwaste',
+ colour_wastewater,
+ 'steam',
+ colour_steam,
+ '#7B7CBA'
+]
+
+const layers: LayerSpecificationWithZIndex[] = [
+ {
+ zorder: 20,
+ id: 'water_pipeline_case',
+ type: 'line',
+ source: 'openinframap',
+ minzoom: 7,
+ 'source-layer': 'water_pipeline',
+ paint: {
+ 'line-color': '#777777',
+ 'line-width': ['interpolate', ['linear'], ['zoom'], 8, 1.5, 16, 7]
+ },
+ layout: {
+ 'line-cap': 'round',
+ 'line-join': 'round'
+ }
+ },
+ {
+ zorder: 21,
+ id: 'water_pipeline',
+ type: 'line',
+ source: 'openinframap',
+ minzoom: 3,
+ 'source-layer': 'water_pipeline',
+ paint: {
+ 'line-color': substance_colour,
+ 'line-width': ['interpolate', ['linear'], ['zoom'], 3, 0.3, 16, 4]
+ }
+ },
+ {
+ zorder: 520,
+ id: 'water_pipeline_label',
+ type: 'symbol',
+ source: 'openinframap',
+ 'source-layer': 'water_pipeline',
+ minzoom: 11,
+ paint: text_paint,
+ layout: {
+ 'text-field': [
+ 'case',
+ ['has', 'name'],
+ ['concat', ['get', 'name'], ' (', substance_label, ')'],
+ substance_label
+ ],
+ 'text-font': font,
+ 'symbol-placement': 'line',
+ 'symbol-spacing': 400,
+ 'text-size': 10,
+ 'text-offset': [0, 1],
+ 'text-max-angle': 10
+ }
+ }
+]
+
+export { layers as default, colour_freshwater, colour_wastewater, colour_hotwater, colour_steam }
diff --git a/web/src/style/types.ts b/web/src/style/types.ts
new file mode 100644
index 0000000..330c74d
--- /dev/null
+++ b/web/src/style/types.ts
@@ -0,0 +1,5 @@
+import { LayerSpecification } from 'maplibre-gl'
+
+export type LayerSpecificationWithZIndex = LayerSpecification & {
+ zorder?: number
+}
diff --git a/web/vite.config.ts b/web/vite.config.ts
index b5975df..72a3a75 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -1,15 +1,17 @@
-import { defineConfig } from "vite";
-import { renderSVG } from "vite-plugin-render-svg";
+import { defineConfig } from 'vite'
+import { renderSVG } from 'vite-plugin-render-svg'
export default defineConfig({
build: {
- // Relative to the root
- outDir: "./dist",
+ outDir: './dist',
+ chunkSizeWarningLimit: 1000
},
-
- plugins: [renderSVG({
- pattern: "src/icons/*.svg",
- urlPrefix: "icons/",
- outputOriginal: true,
- })],
-});
+
+ plugins: [
+ renderSVG({
+ pattern: 'src/icons/*.svg',
+ urlPrefix: 'icons/',
+ outputOriginal: true
+ })
+ ]
+})