@accelint/map-toolkit 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/catalog-info.yaml +5 -3
- package/dist/camera/use-camera-state.js +1 -2
- package/dist/camera/use-camera-state.js.map +1 -1
- package/dist/deckgl/base-map/constants.d.ts +9 -2
- package/dist/deckgl/base-map/constants.js +9 -2
- package/dist/deckgl/base-map/constants.js.map +1 -1
- package/dist/deckgl/base-map/index.d.ts +4 -2
- package/dist/deckgl/base-map/index.js +5 -6
- package/dist/deckgl/base-map/index.js.map +1 -1
- package/dist/deckgl/base-map/types.d.ts +6 -1
- package/dist/deckgl/index.d.ts +8 -2
- package/dist/deckgl/index.js +6 -2
- package/dist/deckgl/saved-viewports/index.d.ts +1 -1
- package/dist/deckgl/saved-viewports/index.js +1 -2
- package/dist/deckgl/saved-viewports/index.js.map +1 -1
- package/dist/deckgl/shapes/display-shape-layer/constants.d.ts +44 -0
- package/dist/deckgl/shapes/display-shape-layer/constants.js +61 -0
- package/dist/deckgl/shapes/display-shape-layer/constants.js.map +1 -0
- package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js → deckgl/shapes/display-shape-layer/fiber.d.ts} +11 -7
- package/dist/{packages/hotkey-manager/dist/lib/is-client/index.js → deckgl/shapes/display-shape-layer/fiber.js} +6 -7
- package/dist/deckgl/shapes/display-shape-layer/fiber.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/index.d.ts +206 -0
- package/dist/deckgl/shapes/display-shape-layer/index.js +416 -0
- package/dist/deckgl/shapes/display-shape-layer/index.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.d.ts +66 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js +116 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/store.d.ts +87 -0
- package/dist/deckgl/shapes/display-shape-layer/store.js +316 -0
- package/dist/deckgl/shapes/display-shape-layer/store.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/types.d.ts +115 -0
- package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fly-to-viewport.js → deckgl/shapes/display-shape-layer/types.js} +0 -2
- package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.d.ts +89 -0
- package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.js +88 -0
- package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.d.ts +61 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js +111 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.d.ts +196 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.js +368 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.js.map +1 -0
- package/dist/deckgl/shapes/index.d.ts +20 -0
- package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js → deckgl/shapes/index.js} +6 -11
- package/dist/deckgl/shapes/shared/constants.d.ts +78 -0
- package/dist/deckgl/shapes/shared/constants.js +109 -0
- package/dist/deckgl/shapes/shared/constants.js.map +1 -0
- package/dist/deckgl/shapes/shared/events.d.ts +73 -0
- package/dist/deckgl/shapes/shared/events.js +58 -0
- package/dist/deckgl/shapes/shared/events.js.map +1 -0
- package/dist/deckgl/shapes/shared/types.d.ts +158 -0
- package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js → deckgl/shapes/shared/types.js} +13 -4
- package/dist/deckgl/shapes/shared/types.js.map +1 -0
- package/dist/deckgl/symbol-layer/index.d.ts +1 -1
- package/dist/viewport/viewport-size.d.ts +2 -2
- package/package.json +36 -20
- package/dist/_virtual/rolldown_runtime.js +0 -22
- package/dist/decorators/deckgl.d.ts +0 -19
- package/dist/decorators/deckgl.js +0 -32
- package/dist/decorators/deckgl.js.map +0 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js.map +0 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js +0 -63
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js.map +0 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js.map +0 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/index.js +0 -19
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js.map +0 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/normalize-viewport-props.js +0 -14
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js +0 -59
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js.map +0 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-viewport.js +0 -16
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js +0 -29
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js +0 -29
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js +0 -54
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/layer.js +0 -15
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/logo-control.js +0 -29
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/logo-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/map.js +0 -91
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/map.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/marker.js +0 -88
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/marker.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/navigation-control.js +0 -29
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/navigation-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/popup.js +0 -69
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/popup.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/scale-control.js +0 -35
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/scale-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/source.js +0 -15
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/terrain-control.js +0 -29
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/terrain-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-control.js +0 -40
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-control.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-map.js +0 -23
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-map.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/index.js +0 -27
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/create-ref.js +0 -57
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/create-ref.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js +0 -343
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/apply-react-style.js +0 -28
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/apply-react-style.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js +0 -31
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js +0 -57
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js +0 -30
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js +0 -53
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/transform.js +0 -52
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/transform.js.map +0 -1
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/use-isomorphic-layout-effect.js +0 -22
- package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/use-isomorphic-layout-effect.js.map +0 -1
- package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js +0 -812
- package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js.map +0 -1
- package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js +0 -35
- package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.development.js +0 -195
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.development.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.production.js +0 -76
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.production.js.map +0 -1
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js +0 -39
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js.map +0 -1
- package/dist/node_modules/.pnpm/react-map-gl@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-map-gl/dist/maplibre.js +0 -16
- package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/middleware/immer.js +0 -27
- package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/middleware/immer.js.map +0 -1
- package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +0 -45
- package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js +0 -78
- package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/constants.js +0 -47
- package/dist/packages/hotkey-manager/dist/constants.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/enums/keycode.js +0 -130
- package/dist/packages/hotkey-manager/dist/enums/keycode.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/lib/is-client/index.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js +0 -24
- package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js +0 -39
- package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js +0 -27
- package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js.map +0 -1
- package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js +0 -95
- package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accelint/map-toolkit",
|
|
3
3
|
"description": "A collection of components and utilities to simplify visualizing and working with geospatial data.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"author": "https://hypergiant.com",
|
|
6
6
|
"$schema": "https://json.schemastore.org/package",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@deck.gl/core": "~9.1",
|
|
9
9
|
"@deck.gl/extensions": "~9.1",
|
|
10
|
-
"@deck.gl/geo-layers": "~9.1",
|
|
11
10
|
"@deck.gl/layers": "~9.1",
|
|
12
|
-
"@deck.gl/mapbox": "~9.1",
|
|
13
|
-
"@deck.gl/mesh-layers": "~9.1",
|
|
14
|
-
"@deck.gl/widgets": "~9.1",
|
|
15
11
|
"@deckgl-fiber-renderer/dom": "^1.4.0",
|
|
16
12
|
"@deckgl-fiber-renderer/shared": "^1.4.0",
|
|
17
13
|
"@deckgl-fiber-renderer/types": "^1.4.0",
|
|
@@ -24,6 +20,7 @@
|
|
|
24
20
|
"@testing-library/jest-dom": "^6.9.1",
|
|
25
21
|
"@testing-library/react": "^16.3.0",
|
|
26
22
|
"@testing-library/user-event": "^14.6.1",
|
|
23
|
+
"@types/geojson": "^7946.0.14",
|
|
27
24
|
"@types/node": "^22",
|
|
28
25
|
"@types/react": "^19",
|
|
29
26
|
"@types/react-dom": "^19",
|
|
@@ -34,6 +31,7 @@
|
|
|
34
31
|
"node-fetch": "^2.6.7",
|
|
35
32
|
"react": "^19",
|
|
36
33
|
"react-dom": "^19",
|
|
34
|
+
"remark-gfm": "^4.0.1",
|
|
37
35
|
"storybook": "^9.1.16",
|
|
38
36
|
"tailwindcss": "^4.1.18",
|
|
39
37
|
"tsdown": "^0.18.0",
|
|
@@ -44,12 +42,13 @@
|
|
|
44
42
|
"@accelint/biome-config": "1.0.2",
|
|
45
43
|
"@accelint/bus": "3.0.2",
|
|
46
44
|
"@accelint/core": "0.5.2",
|
|
47
|
-
"@accelint/design-
|
|
48
|
-
"@accelint/
|
|
45
|
+
"@accelint/design-toolkit": "9.1.1",
|
|
46
|
+
"@accelint/geo": "0.5.0",
|
|
49
47
|
"@accelint/postcss-tailwind-css-modules": "1.0.1",
|
|
48
|
+
"@accelint/smeegl": "0.3.4",
|
|
50
49
|
"@accelint/typescript-config": "0.1.4",
|
|
51
50
|
"@accelint/vitest-config": "0.1.6",
|
|
52
|
-
"@accelint/
|
|
51
|
+
"@accelint/design-foundation": "2.0.0"
|
|
53
52
|
},
|
|
54
53
|
"engines": {
|
|
55
54
|
"node": ">=22",
|
|
@@ -71,13 +70,25 @@
|
|
|
71
70
|
"./deckgl/base-map/types": "./dist/deckgl/base-map/types.js",
|
|
72
71
|
"./deckgl/saved-viewports": "./dist/deckgl/saved-viewports/index.js",
|
|
73
72
|
"./deckgl/saved-viewports/storage": "./dist/deckgl/saved-viewports/storage.js",
|
|
73
|
+
"./deckgl/shapes": "./dist/deckgl/shapes/index.js",
|
|
74
|
+
"./deckgl/shapes/display-shape-layer": "./dist/deckgl/shapes/display-shape-layer/index.js",
|
|
75
|
+
"./deckgl/shapes/display-shape-layer/constants": "./dist/deckgl/shapes/display-shape-layer/constants.js",
|
|
76
|
+
"./deckgl/shapes/display-shape-layer/fiber": "./dist/deckgl/shapes/display-shape-layer/fiber.js",
|
|
77
|
+
"./deckgl/shapes/display-shape-layer/shape-label-layer": "./dist/deckgl/shapes/display-shape-layer/shape-label-layer.js",
|
|
78
|
+
"./deckgl/shapes/display-shape-layer/store": "./dist/deckgl/shapes/display-shape-layer/store.js",
|
|
79
|
+
"./deckgl/shapes/display-shape-layer/types": "./dist/deckgl/shapes/display-shape-layer/types.js",
|
|
80
|
+
"./deckgl/shapes/display-shape-layer/use-shape-selection": "./dist/deckgl/shapes/display-shape-layer/use-shape-selection.js",
|
|
81
|
+
"./deckgl/shapes/display-shape-layer/utils/display-style": "./dist/deckgl/shapes/display-shape-layer/utils/display-style.js",
|
|
82
|
+
"./deckgl/shapes/display-shape-layer/utils/labels": "./dist/deckgl/shapes/display-shape-layer/utils/labels.js",
|
|
83
|
+
"./deckgl/shapes/shared/constants": "./dist/deckgl/shapes/shared/constants.js",
|
|
84
|
+
"./deckgl/shapes/shared/events": "./dist/deckgl/shapes/shared/events.js",
|
|
85
|
+
"./deckgl/shapes/shared/types": "./dist/deckgl/shapes/shared/types.js",
|
|
74
86
|
"./deckgl/symbol-layer": "./dist/deckgl/symbol-layer/index.js",
|
|
75
87
|
"./deckgl/symbol-layer/fiber": "./dist/deckgl/symbol-layer/fiber.js",
|
|
76
88
|
"./deckgl/text-layer": "./dist/deckgl/text-layer/index.js",
|
|
77
89
|
"./deckgl/text-layer/character-sets": "./dist/deckgl/text-layer/character-sets.js",
|
|
78
90
|
"./deckgl/text-layer/default-settings": "./dist/deckgl/text-layer/default-settings.js",
|
|
79
91
|
"./deckgl/text-layer/fiber": "./dist/deckgl/text-layer/fiber.js",
|
|
80
|
-
"./decorators/deckgl": "./dist/decorators/deckgl.js",
|
|
81
92
|
"./map-cursor": "./dist/map-cursor/index.js",
|
|
82
93
|
"./map-cursor/events": "./dist/map-cursor/events.js",
|
|
83
94
|
"./map-cursor/store": "./dist/map-cursor/store.js",
|
|
@@ -114,29 +125,26 @@
|
|
|
114
125
|
],
|
|
115
126
|
"license": "Apache-2.0",
|
|
116
127
|
"optionalDependencies": {
|
|
117
|
-
"@deck.gl/core": "9.1
|
|
118
|
-
"@deck.gl/extensions": "9.1
|
|
119
|
-
"@deck.gl/
|
|
120
|
-
"@
|
|
121
|
-
"@deck.gl/mapbox": "9.1.14",
|
|
122
|
-
"@deck.gl/mesh-layers": "9.1.14",
|
|
123
|
-
"@deck.gl/widgets": "9.1.14",
|
|
124
|
-
"@deckgl-fiber-renderer/dom": "1.4.0",
|
|
128
|
+
"@deck.gl/core": "~9.1",
|
|
129
|
+
"@deck.gl/extensions": "~9.1",
|
|
130
|
+
"@deck.gl/layers": "~9.1",
|
|
131
|
+
"@deckgl-fiber-renderer/dom": "^1.4.0",
|
|
125
132
|
"@deckgl-fiber-renderer/shared": "^1.4.0",
|
|
126
133
|
"@deckgl-fiber-renderer/types": "^1.4.0",
|
|
127
134
|
"@math.gl/web-mercator": "^4.1.0",
|
|
128
135
|
"maplibre-gl": "^5.7.1",
|
|
129
|
-
"milsymbol": "3.0.2",
|
|
136
|
+
"milsymbol": "^3.0.2",
|
|
130
137
|
"mjolnir.js": "^3.0.0",
|
|
131
138
|
"react-map-gl": "^8.1.0",
|
|
132
139
|
"@accelint/hotkey-manager": "0.1.3"
|
|
133
140
|
},
|
|
134
141
|
"owner": "default/pathfinder",
|
|
135
142
|
"peerDependencies": {
|
|
143
|
+
"@types/geojson": "^7946.0.14",
|
|
136
144
|
"react": "^19",
|
|
137
145
|
"@accelint/bus": "3.0.2",
|
|
138
146
|
"@accelint/core": "0.5.2",
|
|
139
|
-
"@accelint/geo": "0.
|
|
147
|
+
"@accelint/geo": "0.5.0"
|
|
140
148
|
},
|
|
141
149
|
"private": false,
|
|
142
150
|
"publishConfig": {
|
|
@@ -146,7 +154,14 @@
|
|
|
146
154
|
"type": "git",
|
|
147
155
|
"url": "https://github.com/gohypergiant/standard-toolkit"
|
|
148
156
|
},
|
|
149
|
-
"sideEffects":
|
|
157
|
+
"sideEffects": [
|
|
158
|
+
"./src/deckgl/shapes/display-shape-layer/fiber.ts",
|
|
159
|
+
"./src/deckgl/symbol-layer/fiber.ts",
|
|
160
|
+
"./src/deckgl/text-layer/fiber.ts",
|
|
161
|
+
"./dist/deckgl/shapes/display-shape-layer/fiber.js",
|
|
162
|
+
"./dist/deckgl/symbol-layer/fiber.js",
|
|
163
|
+
"./dist/deckgl/text-layer/fiber.js"
|
|
164
|
+
],
|
|
150
165
|
"subPath": "packages/map-toolkit",
|
|
151
166
|
"title": "Accelint Map Toolkit",
|
|
152
167
|
"type": "module",
|
|
@@ -154,6 +169,7 @@
|
|
|
154
169
|
"bench": "pnpm vitest bench --run --dir src",
|
|
155
170
|
"build": "pnpm tsdown",
|
|
156
171
|
"build-storybook": "pnpm storybook build",
|
|
172
|
+
"build:icons": "smeegl --in '.storybook/icons' --out 'src/deckgl/shapes/__fixtures__/atlas'",
|
|
157
173
|
"constellation-tracker": "pnpm exec constellation-tracker",
|
|
158
174
|
"dev": "pnpm tsc --watch",
|
|
159
175
|
"format": "pnpm biome format . --write --verbose",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//#region rolldown:runtime
|
|
15
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
16
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
17
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
18
|
-
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { __commonJSMin, __require };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { Decorator } from "@storybook/react-vite";
|
|
14
|
-
|
|
15
|
-
//#region src/decorators/deckgl.d.ts
|
|
16
|
-
declare const withDeckGL: () => Decorator;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { withDeckGL };
|
|
19
|
-
//# sourceMappingURL=deckgl.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { BaseMap } from "../deckgl/base-map/index.js";
|
|
15
|
-
import { uuid } from "@accelint/core";
|
|
16
|
-
import { jsx } from "react/jsx-runtime";
|
|
17
|
-
|
|
18
|
-
//#region src/decorators/deckgl.tsx
|
|
19
|
-
const STORYBOOK_MAP_ID = uuid();
|
|
20
|
-
const withDeckGL = () => {
|
|
21
|
-
return (Story) => {
|
|
22
|
-
return /* @__PURE__ */ jsx(BaseMap, {
|
|
23
|
-
className: "h-dvh w-dvw",
|
|
24
|
-
id: STORYBOOK_MAP_ID,
|
|
25
|
-
children: /* @__PURE__ */ jsx(Story, {})
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { withDeckGL };
|
|
32
|
-
//# sourceMappingURL=deckgl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deckgl.js","names":[],"sources":["../../src/decorators/deckgl.tsx"],"sourcesContent":["// __private-exports\n\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { uuid } from '@accelint/core';\nimport { BaseMap } from '../deckgl/base-map';\nimport type { Decorator } from '@storybook/react-vite';\n\n// Module-level constant - stable across all Storybook renders\nconst STORYBOOK_MAP_ID = uuid();\n\nexport const withDeckGL = (): Decorator => {\n return (Story) => {\n return (\n <BaseMap className='h-dvh w-dvw' id={STORYBOOK_MAP_ID}>\n <Story />\n </BaseMap>\n );\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAM,mBAAmB,MAAM;AAE/B,MAAa,mBAA8B;AACzC,SAAQ,UAAU;AAChB,SACE,oBAAC;GAAQ,WAAU;GAAc,IAAI;aACnC,oBAAC,UAAQ;IACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assert.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js"],"sourcesContent":["// Replacement for the external assert method to reduce bundle size\n// Note: We don't use the second \"message\" argument in calling code,\n// so no need to support it here\nexport function assert(condition, message) {\n if (!condition) {\n throw new Error(message || '@math.gl/web-mercator: assertion failed.');\n }\n}\n//# sourceMappingURL=assert.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAGA,SAAgB,OAAO,WAAW,SAAS;AACvC,KAAI,CAAC,UACD,OAAM,IAAI,MAAM,WAAW,2CAA2C"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { clamp, log2 } from "./math-utils.js";
|
|
15
|
-
import { assert } from "./assert.js";
|
|
16
|
-
import { MAX_LATITUDE, lngLatToWorld, worldToLngLat } from "./web-mercator-utils.js";
|
|
17
|
-
|
|
18
|
-
//#region ../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js
|
|
19
|
-
/**
|
|
20
|
-
* Returns map settings {latitude, longitude, zoom}
|
|
21
|
-
* that will contain the provided corners within the provided width.
|
|
22
|
-
*
|
|
23
|
-
* > _Note: Only supports non-perspective mode._
|
|
24
|
-
*
|
|
25
|
-
* @param options fit bounds parameters
|
|
26
|
-
* @returns - latitude, longitude and zoom
|
|
27
|
-
*/
|
|
28
|
-
function fitBounds(options) {
|
|
29
|
-
const { width, height, bounds, minExtent = 0, maxZoom = 24, offset = [0, 0] } = options;
|
|
30
|
-
const [[west, south], [east, north]] = bounds;
|
|
31
|
-
const padding = getPaddingObject(options.padding);
|
|
32
|
-
const nw = lngLatToWorld([west, clamp(north, -MAX_LATITUDE, MAX_LATITUDE)]);
|
|
33
|
-
const se = lngLatToWorld([east, clamp(south, -MAX_LATITUDE, MAX_LATITUDE)]);
|
|
34
|
-
const size = [Math.max(Math.abs(se[0] - nw[0]), minExtent), Math.max(Math.abs(se[1] - nw[1]), minExtent)];
|
|
35
|
-
const targetSize = [width - padding.left - padding.right - Math.abs(offset[0]) * 2, height - padding.top - padding.bottom - Math.abs(offset[1]) * 2];
|
|
36
|
-
assert(targetSize[0] > 0 && targetSize[1] > 0);
|
|
37
|
-
const scaleX = targetSize[0] / size[0];
|
|
38
|
-
const scaleY = targetSize[1] / size[1];
|
|
39
|
-
const offsetX = (padding.right - padding.left) / 2 / scaleX;
|
|
40
|
-
const offsetY = (padding.top - padding.bottom) / 2 / scaleY;
|
|
41
|
-
const centerLngLat = worldToLngLat([(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY]);
|
|
42
|
-
const zoom = Math.min(maxZoom, log2(Math.abs(Math.min(scaleX, scaleY))));
|
|
43
|
-
assert(Number.isFinite(zoom));
|
|
44
|
-
return {
|
|
45
|
-
longitude: centerLngLat[0],
|
|
46
|
-
latitude: centerLngLat[1],
|
|
47
|
-
zoom
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function getPaddingObject(padding = 0) {
|
|
51
|
-
if (typeof padding === "number") return {
|
|
52
|
-
top: padding,
|
|
53
|
-
bottom: padding,
|
|
54
|
-
left: padding,
|
|
55
|
-
right: padding
|
|
56
|
-
};
|
|
57
|
-
assert(Number.isFinite(padding.top) && Number.isFinite(padding.bottom) && Number.isFinite(padding.left) && Number.isFinite(padding.right));
|
|
58
|
-
return padding;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { fitBounds };
|
|
63
|
-
//# sourceMappingURL=fit-bounds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fit-bounds.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js"],"sourcesContent":["import { assert } from \"./assert.js\";\nimport { log2, clamp } from \"./math-utils.js\";\nimport { MAX_LATITUDE, lngLatToWorld, worldToLngLat } from \"./web-mercator-utils.js\";\n/**\n * Returns map settings {latitude, longitude, zoom}\n * that will contain the provided corners within the provided width.\n *\n * > _Note: Only supports non-perspective mode._\n *\n * @param options fit bounds parameters\n * @returns - latitude, longitude and zoom\n */\nexport function fitBounds(options) {\n const { width, height, bounds, minExtent = 0, // 0.01 would be about 1000 meters (degree is ~110KM)\n maxZoom = 24, // ~x4,000,000 => About 10 meter extents\n offset = [0, 0] } = options;\n const [[west, south], [east, north]] = bounds;\n const padding = getPaddingObject(options.padding);\n const nw = lngLatToWorld([west, clamp(north, -MAX_LATITUDE, MAX_LATITUDE)]);\n const se = lngLatToWorld([east, clamp(south, -MAX_LATITUDE, MAX_LATITUDE)]);\n // width/height on the Web Mercator plane\n const size = [\n Math.max(Math.abs(se[0] - nw[0]), minExtent),\n Math.max(Math.abs(se[1] - nw[1]), minExtent)\n ];\n const targetSize = [\n width - padding.left - padding.right - Math.abs(offset[0]) * 2,\n height - padding.top - padding.bottom - Math.abs(offset[1]) * 2\n ];\n assert(targetSize[0] > 0 && targetSize[1] > 0);\n // scale = screen pixels per unit on the Web Mercator plane\n const scaleX = targetSize[0] / size[0];\n const scaleY = targetSize[1] / size[1];\n // Find how much we need to shift the center\n const offsetX = (padding.right - padding.left) / 2 / scaleX;\n const offsetY = (padding.top - padding.bottom) / 2 / scaleY;\n const center = [(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY];\n const centerLngLat = worldToLngLat(center);\n const zoom = Math.min(maxZoom, log2(Math.abs(Math.min(scaleX, scaleY))));\n assert(Number.isFinite(zoom));\n return {\n longitude: centerLngLat[0],\n latitude: centerLngLat[1],\n zoom\n };\n}\n// Helpers\nfunction getPaddingObject(padding = 0) {\n if (typeof padding === 'number') {\n return {\n top: padding,\n bottom: padding,\n left: padding,\n right: padding\n };\n }\n // Make sure all the required properties are set\n assert(Number.isFinite(padding.top) &&\n Number.isFinite(padding.bottom) &&\n Number.isFinite(padding.left) &&\n Number.isFinite(padding.right));\n return padding;\n}\n//# sourceMappingURL=fit-bounds.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAgB,UAAU,SAAS;CAC/B,MAAM,EAAE,OAAO,QAAQ,QAAQ,YAAY,GAC3C,UAAU,IACV,SAAS,CAAC,GAAG,EAAE,KAAK;CACpB,MAAM,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,UAAU;CACvC,MAAM,UAAU,iBAAiB,QAAQ,QAAQ;CACjD,MAAM,KAAK,cAAc,CAAC,MAAM,MAAM,OAAO,CAAC,cAAc,aAAa,CAAC,CAAC;CAC3E,MAAM,KAAK,cAAc,CAAC,MAAM,MAAM,OAAO,CAAC,cAAc,aAAa,CAAC,CAAC;CAE3E,MAAM,OAAO,CACT,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,GAAG,GAAG,EAAE,UAAU,EAC5C,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,GAAG,GAAG,EAAE,UAAU,CAC/C;CACD,MAAM,aAAa,CACf,QAAQ,QAAQ,OAAO,QAAQ,QAAQ,KAAK,IAAI,OAAO,GAAG,GAAG,GAC7D,SAAS,QAAQ,MAAM,QAAQ,SAAS,KAAK,IAAI,OAAO,GAAG,GAAG,EACjE;AACD,QAAO,WAAW,KAAK,KAAK,WAAW,KAAK,EAAE;CAE9C,MAAM,SAAS,WAAW,KAAK,KAAK;CACpC,MAAM,SAAS,WAAW,KAAK,KAAK;CAEpC,MAAM,WAAW,QAAQ,QAAQ,QAAQ,QAAQ,IAAI;CACrD,MAAM,WAAW,QAAQ,MAAM,QAAQ,UAAU,IAAI;CAErD,MAAM,eAAe,cADN,EAAE,GAAG,KAAK,GAAG,MAAM,IAAI,UAAU,GAAG,KAAK,GAAG,MAAM,IAAI,QAAQ,CACnC;CAC1C,MAAM,OAAO,KAAK,IAAI,SAAS,KAAK,KAAK,IAAI,KAAK,IAAI,QAAQ,OAAO,CAAC,CAAC,CAAC;AACxE,QAAO,OAAO,SAAS,KAAK,CAAC;AAC7B,QAAO;EACH,WAAW,aAAa;EACxB,UAAU,aAAa;EACvB;EACH;;AAGL,SAAS,iBAAiB,UAAU,GAAG;AACnC,KAAI,OAAO,YAAY,SACnB,QAAO;EACH,KAAK;EACL,QAAQ;EACR,MAAM;EACN,OAAO;EACV;AAGL,QAAO,OAAO,SAAS,QAAQ,IAAI,IAC/B,OAAO,SAAS,QAAQ,OAAO,IAC/B,OAAO,SAAS,QAAQ,KAAK,IAC7B,OAAO,SAAS,QAAQ,MAAM,CAAC;AACnC,QAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-bounds.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js"],"sourcesContent":["/* eslint-disable camelcase */\nimport { vec2 } from '@math.gl/core';\nimport { worldToLngLat } from \"./web-mercator-utils.js\";\nimport { transformVector } from \"./math-utils.js\";\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n/*\n * Returns the quad at the intersection of the frustum and the given z plane\n * @param {WebMercatorViewport} viewport\n * @param {Number} z - elevation in meters\n */\nexport function getBounds(viewport, z = 0) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { width, height, unproject } = viewport;\n const unprojectOps = { targetZ: z };\n const bottomLeft = unproject([0, height], unprojectOps);\n const bottomRight = unproject([width, height], unprojectOps);\n let topLeft;\n let topRight;\n const halfFov = viewport.fovy\n ? 0.5 * viewport.fovy * DEGREES_TO_RADIANS\n : Math.atan(0.5 / viewport.altitude);\n const angleToGround = (90 - viewport.pitch) * DEGREES_TO_RADIANS;\n // The top plane is parallel to the ground if halfFov == angleToGround\n if (halfFov > angleToGround - 0.01) {\n // intersect with the far plane\n topLeft = unprojectOnFarPlane(viewport, 0, z);\n topRight = unprojectOnFarPlane(viewport, width, z);\n }\n else {\n // intersect with the top plane\n topLeft = unproject([0, 0], unprojectOps);\n topRight = unproject([width, 0], unprojectOps);\n }\n return [bottomLeft, bottomRight, topRight, topLeft];\n}\n/*\n * Find a point on the far clipping plane of the viewport\n * @param {WebMercatorViewport} viewport\n * @param {Number} x - projected x in screen space\n * @param {Number} targetZ - the elevation of the point in meters\n */\nfunction unprojectOnFarPlane(viewport, x, targetZ) {\n const { pixelUnprojectionMatrix } = viewport;\n const coord0 = transformVector(pixelUnprojectionMatrix, [x, 0, 1, 1]);\n const coord1 = transformVector(pixelUnprojectionMatrix, [x, viewport.height, 1, 1]);\n const z = targetZ * viewport.distanceScales.unitsPerMeter[2];\n const t = (z - coord0[2]) / (coord1[2] - coord0[2]);\n const coord = vec2.lerp([], coord0, coord1, t);\n const result = worldToLngLat(coord);\n result.push(targetZ);\n return result;\n}\n//# sourceMappingURL=get-bounds.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AAIA,MAAM,qBAAqB,KAAK,KAAK"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { MAX_LATITUDE, lngLatToWorld, worldToLngLat } from "./web-mercator-utils.js";
|
|
15
|
-
import { fitBounds } from "./fit-bounds.js";
|
|
16
|
-
import "./get-bounds.js";
|
|
17
|
-
import "./web-mercator-viewport.js";
|
|
18
|
-
import "./normalize-viewport-props.js";
|
|
19
|
-
import "./fly-to-viewport.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-utils.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js"],"sourcesContent":["import { vec4 } from '@math.gl/core';\n// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create()\nexport function createMat4() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n// Transforms a vec4 with a projection matrix\nexport function transformVector(matrix, vector) {\n const result = vec4.transformMat4([], vector, matrix);\n vec4.scale(result, result, 1 / result[3]);\n return result;\n}\nexport function mod(value, divisor) {\n const modulus = value % divisor;\n return modulus < 0 ? divisor + modulus : modulus;\n}\nexport function lerp(start, end, step) {\n return step * end + (1 - step) * start;\n}\nexport function clamp(x, min, max) {\n return x < min ? min : x > max ? max : x;\n}\nfunction ieLog2(x) {\n return Math.log(x) * Math.LOG2E;\n}\n// Handle missing log2 in IE 11\nexport const log2 = Math.log2 || ieLog2;\n//# sourceMappingURL=math-utils.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,MAAM,GAAG,KAAK,KAAK;AAC/B,QAAO,IAAI,MAAM,MAAM,IAAI,MAAM,MAAM;;AAE3C,SAAS,OAAO,GAAG;AACf,QAAO,KAAK,IAAI,EAAE,GAAG,KAAK;;AAG9B,MAAa,OAAO,KAAK,QAAQ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import "./web-mercator-utils.js";
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { assert } from "./assert.js";
|
|
15
|
-
|
|
16
|
-
//#region ../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js
|
|
17
|
-
const PI = Math.PI;
|
|
18
|
-
const PI_4 = PI / 4;
|
|
19
|
-
const DEGREES_TO_RADIANS = PI / 180;
|
|
20
|
-
const RADIANS_TO_DEGREES = 180 / PI;
|
|
21
|
-
const TILE_SIZE = 512;
|
|
22
|
-
const MAX_LATITUDE = 85.051129;
|
|
23
|
-
/**
|
|
24
|
-
* Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.
|
|
25
|
-
* Performs the nonlinear part of the web mercator projection.
|
|
26
|
-
* Remaining projection is done with 4x4 matrices which also handles
|
|
27
|
-
* perspective.
|
|
28
|
-
*
|
|
29
|
-
* @param lngLat - [lng, lat] coordinates
|
|
30
|
-
* Specifies a point on the sphere to project onto the map.
|
|
31
|
-
* @return [x,y] coordinates.
|
|
32
|
-
*/
|
|
33
|
-
function lngLatToWorld(lngLat) {
|
|
34
|
-
const [lng, lat] = lngLat;
|
|
35
|
-
assert(Number.isFinite(lng));
|
|
36
|
-
assert(Number.isFinite(lat) && lat >= -90 && lat <= 90, "invalid latitude");
|
|
37
|
-
const lambda2 = lng * DEGREES_TO_RADIANS;
|
|
38
|
-
const phi2 = lat * DEGREES_TO_RADIANS;
|
|
39
|
-
return [TILE_SIZE * (lambda2 + PI) / (2 * PI), TILE_SIZE * (PI + Math.log(Math.tan(PI_4 + phi2 * .5))) / (2 * PI)];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Unproject world point [x,y] on map onto {lat, lon} on sphere
|
|
43
|
-
*
|
|
44
|
-
* @param xy - array with [x,y] members
|
|
45
|
-
* representing point on projected map plane
|
|
46
|
-
* @return - array with [x,y] of point on sphere.
|
|
47
|
-
* Has toArray method if you need a GeoJSON Array.
|
|
48
|
-
* Per cartographic tradition, lat and lon are specified as degrees.
|
|
49
|
-
*/
|
|
50
|
-
function worldToLngLat(xy) {
|
|
51
|
-
const [x, y] = xy;
|
|
52
|
-
const lambda2 = x / TILE_SIZE * (2 * PI) - PI;
|
|
53
|
-
const phi2 = 2 * (Math.atan(Math.exp(y / TILE_SIZE * (2 * PI) - PI)) - PI_4);
|
|
54
|
-
return [lambda2 * RADIANS_TO_DEGREES, phi2 * RADIANS_TO_DEGREES];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
//#endregion
|
|
58
|
-
export { MAX_LATITUDE, lngLatToWorld, worldToLngLat };
|
|
59
|
-
//# sourceMappingURL=web-mercator-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"web-mercator-utils.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@math.gl+web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js"],"sourcesContent":["// TODO - THE UTILITIES IN THIS FILE SHOULD BE IMPORTED FROM WEB-MERCATOR-VIEWPORT MODULE\nimport { createMat4, transformVector, clamp, log2 } from \"./math-utils.js\";\nimport { mat4, vec2, vec3 } from '@math.gl/core';\nimport { assert } from \"./assert.js\";\n// CONSTANTS\nconst PI = Math.PI;\nconst PI_4 = PI / 4;\nconst DEGREES_TO_RADIANS = PI / 180;\nconst RADIANS_TO_DEGREES = 180 / PI;\nconst TILE_SIZE = 512;\n// Average circumference (40075 km equatorial, 40007 km meridional)\nconst EARTH_CIRCUMFERENCE = 40.03e6;\n// Latitude that makes a square world, 2 * atan(E ** PI) - PI / 2\nexport const MAX_LATITUDE = 85.051129;\n// Mapbox default altitude\nexport const DEFAULT_ALTITUDE = 1.5;\n/** Logarithimic zoom to linear scale **/\nexport function zoomToScale(zoom) {\n return Math.pow(2, zoom);\n}\n/** Linear scale to logarithimic zoom **/\nexport function scaleToZoom(scale) {\n return log2(scale);\n}\n/**\n * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.\n * Performs the nonlinear part of the web mercator projection.\n * Remaining projection is done with 4x4 matrices which also handles\n * perspective.\n *\n * @param lngLat - [lng, lat] coordinates\n * Specifies a point on the sphere to project onto the map.\n * @return [x,y] coordinates.\n */\nexport function lngLatToWorld(lngLat) {\n const [lng, lat] = lngLat;\n assert(Number.isFinite(lng));\n assert(Number.isFinite(lat) && lat >= -90 && lat <= 90, 'invalid latitude');\n const lambda2 = lng * DEGREES_TO_RADIANS;\n const phi2 = lat * DEGREES_TO_RADIANS;\n const x = (TILE_SIZE * (lambda2 + PI)) / (2 * PI);\n const y = (TILE_SIZE * (PI + Math.log(Math.tan(PI_4 + phi2 * 0.5)))) / (2 * PI);\n return [x, y];\n}\n/**\n * Unproject world point [x,y] on map onto {lat, lon} on sphere\n *\n * @param xy - array with [x,y] members\n * representing point on projected map plane\n * @return - array with [x,y] of point on sphere.\n * Has toArray method if you need a GeoJSON Array.\n * Per cartographic tradition, lat and lon are specified as degrees.\n */\nexport function worldToLngLat(xy) {\n const [x, y] = xy;\n const lambda2 = (x / TILE_SIZE) * (2 * PI) - PI;\n const phi2 = 2 * (Math.atan(Math.exp((y / TILE_SIZE) * (2 * PI) - PI)) - PI_4);\n return [lambda2 * RADIANS_TO_DEGREES, phi2 * RADIANS_TO_DEGREES];\n}\n/**\n * Returns the zoom level that gives a 1 meter pixel at a certain latitude\n * 1 = C*cos(y)/2^z/TILE_SIZE = C*cos(y)/2^(z+9)\n */\nexport function getMeterZoom(options) {\n const { latitude } = options;\n assert(Number.isFinite(latitude));\n const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);\n return scaleToZoom(EARTH_CIRCUMFERENCE * latCosine) - 9;\n}\n/**\n * Calculate the conversion from meter to common units at a given latitude\n * This is a cheaper version of `getDistanceScales`\n * @param latitude center latitude in degrees\n * @returns common units per meter\n */\nexport function unitsPerMeter(latitude) {\n const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);\n return TILE_SIZE / EARTH_CIRCUMFERENCE / latCosine;\n}\n/**\n * Calculate distance scales in meters around current lat/lon, both for\n * degrees and pixels.\n * In mercator projection mode, the distance scales vary significantly\n * with latitude.\n */\nexport function getDistanceScales(options) {\n const { latitude, longitude, highPrecision = false } = options;\n assert(Number.isFinite(latitude) && Number.isFinite(longitude));\n const worldSize = TILE_SIZE;\n const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);\n /**\n * Number of pixels occupied by one degree longitude around current lat/lon:\n unitsPerDegreeX = d(lngLatToWorld([lng, lat])[0])/d(lng)\n = scale * TILE_SIZE * DEGREES_TO_RADIANS / (2 * PI)\n unitsPerDegreeY = d(lngLatToWorld([lng, lat])[1])/d(lat)\n = -scale * TILE_SIZE * DEGREES_TO_RADIANS / cos(lat * DEGREES_TO_RADIANS) / (2 * PI)\n */\n const unitsPerDegreeX = worldSize / 360;\n const unitsPerDegreeY = unitsPerDegreeX / latCosine;\n /**\n * Number of pixels occupied by one meter around current lat/lon:\n */\n const altUnitsPerMeter = worldSize / EARTH_CIRCUMFERENCE / latCosine;\n /**\n * LngLat: longitude -> east and latitude -> north (bottom left)\n * UTM meter offset: x -> east and y -> north (bottom left)\n * World space: x -> east and y -> south (top left)\n *\n * Y needs to be flipped when converting delta degree/meter to delta pixels\n */\n const result = {\n unitsPerMeter: [altUnitsPerMeter, altUnitsPerMeter, altUnitsPerMeter],\n metersPerUnit: [1 / altUnitsPerMeter, 1 / altUnitsPerMeter, 1 / altUnitsPerMeter],\n unitsPerDegree: [unitsPerDegreeX, unitsPerDegreeY, altUnitsPerMeter],\n degreesPerUnit: [1 / unitsPerDegreeX, 1 / unitsPerDegreeY, 1 / altUnitsPerMeter]\n };\n /**\n * Taylor series 2nd order for 1/latCosine\n f'(a) * (x - a)\n = d(1/cos(lat * DEGREES_TO_RADIANS))/d(lat) * dLat\n = DEGREES_TO_RADIANS * tan(lat * DEGREES_TO_RADIANS) / cos(lat * DEGREES_TO_RADIANS) * dLat\n */\n if (highPrecision) {\n const latCosine2 = (DEGREES_TO_RADIANS * Math.tan(latitude * DEGREES_TO_RADIANS)) / latCosine;\n const unitsPerDegreeY2 = (unitsPerDegreeX * latCosine2) / 2;\n const altUnitsPerDegree2 = (worldSize / EARTH_CIRCUMFERENCE) * latCosine2;\n const altUnitsPerMeter2 = (altUnitsPerDegree2 / unitsPerDegreeY) * altUnitsPerMeter;\n result.unitsPerDegree2 = [0, unitsPerDegreeY2, altUnitsPerDegree2];\n result.unitsPerMeter2 = [altUnitsPerMeter2, 0, altUnitsPerMeter2];\n }\n // Main results, used for converting meters to latlng deltas and scaling offsets\n return result;\n}\n/**\n * Offset a lng/lat position by meterOffset (northing, easting)\n */\nexport function addMetersToLngLat(lngLatZ, xyz) {\n const [longitude, latitude, z0] = lngLatZ;\n const [x, y, z] = xyz;\n // eslint-disable-next-line no-shadow\n const { unitsPerMeter, unitsPerMeter2 } = getDistanceScales({\n longitude,\n latitude,\n highPrecision: true\n });\n const worldspace = lngLatToWorld(lngLatZ);\n worldspace[0] += x * (unitsPerMeter[0] + unitsPerMeter2[0] * y);\n worldspace[1] += y * (unitsPerMeter[1] + unitsPerMeter2[1] * y);\n const newLngLat = worldToLngLat(worldspace);\n const newZ = (z0 || 0) + (z || 0);\n return Number.isFinite(z0) || Number.isFinite(z) ? [newLngLat[0], newLngLat[1], newZ] : newLngLat;\n}\n/**\n *\n * view and projection matrix creation is intentionally kept compatible with\n * mapbox-gl's implementation to ensure that seamless interoperation\n * with mapbox and react-map-gl. See: https://github.com/mapbox/mapbox-gl-js\n */\nexport function getViewMatrix(options) {\n const { \n // Viewport props\n height, pitch, bearing, altitude, \n // Pre-calculated parameters\n scale, center } = options;\n // VIEW MATRIX: PROJECTS MERCATOR WORLD COORDINATES\n // Note that mercator world coordinates typically need to be flipped\n //\n // Note: As usual, matrix operation orders should be read in reverse\n // since vectors will be multiplied from the right during transformation\n const vm = createMat4();\n // Move camera to altitude (along the pitch & bearing direction)\n mat4.translate(vm, vm, [0, 0, -altitude]);\n // Rotate by bearing, and then by pitch (which tilts the view)\n mat4.rotateX(vm, vm, -pitch * DEGREES_TO_RADIANS);\n mat4.rotateZ(vm, vm, bearing * DEGREES_TO_RADIANS);\n const relativeScale = scale / height;\n mat4.scale(vm, vm, [relativeScale, relativeScale, relativeScale]);\n if (center) {\n mat4.translate(vm, vm, vec3.negate([], center));\n }\n return vm;\n}\n/**\n * Calculates mapbox compatible projection matrix from parameters\n *\n * @param options.width Width of \"viewport\" or window\n * @param options.height Height of \"viewport\" or window\n * @param options.scale Scale at the current zoom\n * @param options.center Offset of the target, vec3 in world space\n * @param options.offset Offset of the focal point, vec2 in screen space\n * @param options.pitch Camera angle in degrees (0 is straight down)\n * @param options.fovy field of view in degrees\n * @param options.altitude if provided, field of view is calculated using `altitudeToFovy()`\n * @param options.nearZMultiplier control z buffer\n * @param options.farZMultiplier control z buffer\n * @returns project parameters object\n */\nexport function getProjectionParameters(options) {\n const { width, height, altitude, pitch = 0, offset, center, scale, nearZMultiplier = 1, farZMultiplier = 1 } = options;\n let { fovy = altitudeToFovy(DEFAULT_ALTITUDE) } = options;\n // For back-compatibility allow field of view to be\n // derived from altitude\n if (altitude !== undefined) {\n fovy = altitudeToFovy(altitude);\n }\n const fovRadians = fovy * DEGREES_TO_RADIANS;\n const pitchRadians = pitch * DEGREES_TO_RADIANS;\n // Distance from camera to the target\n const focalDistance = fovyToAltitude(fovy);\n let cameraToSeaLevelDistance = focalDistance;\n if (center) {\n cameraToSeaLevelDistance += (center[2] * scale) / Math.cos(pitchRadians) / height;\n }\n const fovAboveCenter = fovRadians * (0.5 + (offset ? offset[1] : 0) / height);\n // Find the distance from the center point to the center top\n // in focal distance units using law of sines.\n const topHalfSurfaceDistance = (Math.sin(fovAboveCenter) * cameraToSeaLevelDistance) /\n Math.sin(clamp(Math.PI / 2 - pitchRadians - fovAboveCenter, 0.01, Math.PI - 0.01));\n // Calculate z distance of the farthest fragment that should be rendered.\n const furthestDistance = Math.sin(pitchRadians) * topHalfSurfaceDistance + cameraToSeaLevelDistance;\n // Matches mapbox limit\n const horizonDistance = cameraToSeaLevelDistance * 10;\n // Calculate z value of the farthest fragment that should be rendered.\n const farZ = Math.min(furthestDistance * farZMultiplier, horizonDistance);\n return {\n fov: fovRadians,\n aspect: width / height,\n focalDistance,\n near: nearZMultiplier,\n far: farZ\n };\n}\n/**\n * CALCULATE PROJECTION MATRIX: PROJECTS FROM CAMERA (VIEW) SPACE TO CLIPSPACE\n *\n * To match mapbox's z buffer:\n * - \\<= 0.28: nearZMultiplier: 0.1, farZmultiplier: 1\n * - \\>= 0.29: nearZMultiplier: 1 / height, farZMultiplier: 1.01\n *\n * @param options Viewport options\n * @param options.width Width of \"viewport\" or window\n * @param options.height Height of \"viewport\" or window\n * @param options.scale Scale at the current zoom\n * @param options.center Offset of the target, vec3 in world space\n * @param options.offset Offset of the focal point, vec2 in screen space\n * @param options.pitch Camera angle in degrees (0 is straight down)\n * @param options.fovy field of view in degrees\n * @param options.altitude if provided, field of view is calculated using `altitudeToFovy()`\n * @param options.nearZMultiplier control z buffer\n * @param options.farZMultiplier control z buffer\n * @returns 4x4 projection matrix\n */\nexport function getProjectionMatrix(options) {\n const { fov, aspect, near, far } = getProjectionParameters(options);\n const projectionMatrix = mat4.perspective([], fov, // fov in radians\n aspect, // aspect ratio\n near, // near plane\n far // far plane\n );\n return projectionMatrix;\n}\n/**\n *\n * Convert an altitude to field of view such that the\n * focal distance is equal to the altitude\n *\n * @param altitude - altitude of camera in screen units\n * @return fovy field of view in degrees\n */\nexport function altitudeToFovy(altitude) {\n return 2 * Math.atan(0.5 / altitude) * RADIANS_TO_DEGREES;\n}\n/**\n *\n * Convert an field of view such that the\n * focal distance is equal to the altitude\n *\n * @param fovy - field of view in degrees\n * @return altitude altitude of camera in screen units\n */\nexport function fovyToAltitude(fovy) {\n return 0.5 / Math.tan(0.5 * fovy * DEGREES_TO_RADIANS);\n}\n// Project flat coordinates to pixels on screen.\nexport function worldToPixels(xyz, pixelProjectionMatrix) {\n const [x, y, z = 0] = xyz;\n assert(Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z));\n return transformVector(pixelProjectionMatrix, [x, y, z, 1]);\n}\n/**\n * Unproject pixels on screen to flat coordinates.\n *\n * @param xyz - pixel coordinate on screen.\n * @param pixelUnprojectionMatrix - unprojection matrix 4x4\n * @param targetZ - if pixel coordinate does not have a 3rd component (depth),\n * targetZ is used as the elevation plane to unproject onto\n * @return [x, y, Z] flat coordinates on 512*512 Mercator Zoom 0 tile.\n */\nexport function pixelsToWorld(xyz, pixelUnprojectionMatrix, targetZ = 0) {\n const [x, y, z] = xyz;\n assert(Number.isFinite(x) && Number.isFinite(y), 'invalid pixel coordinate');\n if (Number.isFinite(z)) {\n // Has depth component\n const coord = transformVector(pixelUnprojectionMatrix, [x, y, z, 1]);\n return coord;\n }\n // since we don't know the correct projected z value for the point,\n // unproject two points to get a line and then find the point on that line with z=0\n const coord0 = transformVector(pixelUnprojectionMatrix, [x, y, 0, 1]);\n const coord1 = transformVector(pixelUnprojectionMatrix, [x, y, 1, 1]);\n const z0 = coord0[2];\n const z1 = coord1[2];\n const t = z0 === z1 ? 0 : ((targetZ || 0) - z0) / (z1 - z0);\n return vec2.lerp([], coord0, coord1, t);\n}\n//# sourceMappingURL=web-mercator-utils.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AAKA,MAAM,KAAK,KAAK;AAChB,MAAM,OAAO,KAAK;AAClB,MAAM,qBAAqB,KAAK;AAChC,MAAM,qBAAqB,MAAM;AACjC,MAAM,YAAY;AAIlB,MAAa,eAAe;;;;;;;;;;;AAqB5B,SAAgB,cAAc,QAAQ;CAClC,MAAM,CAAC,KAAK,OAAO;AACnB,QAAO,OAAO,SAAS,IAAI,CAAC;AAC5B,QAAO,OAAO,SAAS,IAAI,IAAI,OAAO,OAAO,OAAO,IAAI,mBAAmB;CAC3E,MAAM,UAAU,MAAM;CACtB,MAAM,OAAO,MAAM;AAGnB,QAAO,CAFI,aAAa,UAAU,OAAQ,IAAI,KACnC,aAAa,KAAK,KAAK,IAAI,KAAK,IAAI,OAAO,OAAO,GAAI,CAAC,KAAM,IAAI,IAC/D;;;;;;;;;;;AAWjB,SAAgB,cAAc,IAAI;CAC9B,MAAM,CAAC,GAAG,KAAK;CACf,MAAM,UAAW,IAAI,aAAc,IAAI,MAAM;CAC7C,MAAM,OAAO,KAAK,KAAK,KAAK,KAAK,IAAK,IAAI,aAAc,IAAI,MAAM,GAAG,CAAC,GAAG;AACzE,QAAO,CAAC,UAAU,oBAAoB,OAAO,mBAAmB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import "./web-mercator-utils.js";
|
|
15
|
-
import "./fit-bounds.js";
|
|
16
|
-
import "./get-bounds.js";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { applyReactStyle } from "../utils/apply-react-style.js";
|
|
15
|
-
import { useControl } from "./use-control.js";
|
|
16
|
-
import { memo, useEffect } from "react";
|
|
17
|
-
|
|
18
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js
|
|
19
|
-
function _AttributionControl(props) {
|
|
20
|
-
const ctrl = useControl(({ mapLib }) => new mapLib.AttributionControl(props), { position: props.position });
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
applyReactStyle(ctrl._container, props.style);
|
|
23
|
-
}, [props.style]);
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const AttributionControl = memo(_AttributionControl);
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
//# sourceMappingURL=attribution-control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribution-control.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from \"../utils/apply-react-style.js\";\nimport { useControl } from \"./use-control.js\";\nfunction _AttributionControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.AttributionControl(props), {\n position: props.position\n });\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport const AttributionControl = memo(_AttributionControl);\n//# sourceMappingURL=attribution-control.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAGA,SAAS,oBAAoB,OAAO;CAChC,MAAM,OAAO,YAAY,EAAE,aAAa,IAAI,OAAO,mBAAmB,MAAM,EAAE,EAC1E,UAAU,MAAM,UACnB,CAAC;AACF,iBAAgB;AACZ,kBAAgB,KAAK,YAAY,MAAM,MAAM;IAC9C,CAAC,MAAM,MAAM,CAAC;AACjB,QAAO;;AAEX,MAAa,qBAAqB,KAAK,oBAAoB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { applyReactStyle } from "../utils/apply-react-style.js";
|
|
15
|
-
import { useControl } from "./use-control.js";
|
|
16
|
-
import { memo, useEffect } from "react";
|
|
17
|
-
|
|
18
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js
|
|
19
|
-
function _FullscreenControl(props) {
|
|
20
|
-
const ctrl = useControl(({ mapLib }) => new mapLib.FullscreenControl({ container: props.containerId && document.getElementById(props.containerId) }), { position: props.position });
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
applyReactStyle(ctrl._controlContainer, props.style);
|
|
23
|
-
}, [props.style]);
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const FullscreenControl = memo(_FullscreenControl);
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
//# sourceMappingURL=fullscreen-control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fullscreen-control.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from \"../utils/apply-react-style.js\";\nimport { useControl } from \"./use-control.js\";\nfunction _FullscreenControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.FullscreenControl({\n container: props.containerId && document.getElementById(props.containerId)\n }), { position: props.position });\n useEffect(() => {\n applyReactStyle(ctrl._controlContainer, props.style);\n }, [props.style]);\n return null;\n}\nexport const FullscreenControl = memo(_FullscreenControl);\n//# sourceMappingURL=fullscreen-control.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAGA,SAAS,mBAAmB,OAAO;CAC/B,MAAM,OAAO,YAAY,EAAE,aAAa,IAAI,OAAO,kBAAkB,EACjE,WAAW,MAAM,eAAe,SAAS,eAAe,MAAM,YAAY,EAC7E,CAAC,EAAE,EAAE,UAAU,MAAM,UAAU,CAAC;AACjC,iBAAgB;AACZ,kBAAgB,KAAK,mBAAmB,MAAM,MAAM;IACrD,CAAC,MAAM,MAAM,CAAC;AACjB,QAAO;;AAEX,MAAa,oBAAoB,KAAK,mBAAmB"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { applyReactStyle } from "../utils/apply-react-style.js";
|
|
15
|
-
import { useControl } from "./use-control.js";
|
|
16
|
-
import { forwardRef, memo, useEffect, useImperativeHandle, useRef } from "react";
|
|
17
|
-
|
|
18
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js
|
|
19
|
-
function _GeolocateControl(props, ref) {
|
|
20
|
-
const thisRef = useRef({ props });
|
|
21
|
-
const ctrl = useControl(({ mapLib }) => {
|
|
22
|
-
const gc = new mapLib.GeolocateControl(props);
|
|
23
|
-
const setupUI = gc._setupUI;
|
|
24
|
-
gc._setupUI = () => {
|
|
25
|
-
if (!gc._container.hasChildNodes()) setupUI();
|
|
26
|
-
};
|
|
27
|
-
gc.on("geolocate", (e) => {
|
|
28
|
-
thisRef.current.props.onGeolocate?.(e);
|
|
29
|
-
});
|
|
30
|
-
gc.on("error", (e) => {
|
|
31
|
-
thisRef.current.props.onError?.(e);
|
|
32
|
-
});
|
|
33
|
-
gc.on("outofmaxbounds", (e) => {
|
|
34
|
-
thisRef.current.props.onOutOfMaxBounds?.(e);
|
|
35
|
-
});
|
|
36
|
-
gc.on("trackuserlocationstart", (e) => {
|
|
37
|
-
thisRef.current.props.onTrackUserLocationStart?.(e);
|
|
38
|
-
});
|
|
39
|
-
gc.on("trackuserlocationend", (e) => {
|
|
40
|
-
thisRef.current.props.onTrackUserLocationEnd?.(e);
|
|
41
|
-
});
|
|
42
|
-
return gc;
|
|
43
|
-
}, { position: props.position });
|
|
44
|
-
thisRef.current.props = props;
|
|
45
|
-
useImperativeHandle(ref, () => ctrl, []);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
applyReactStyle(ctrl._container, props.style);
|
|
48
|
-
}, [props.style]);
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
const GeolocateControl = memo(forwardRef(_GeolocateControl));
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
//# sourceMappingURL=geolocate-control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geolocate-control.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js"],"sourcesContent":["import { useImperativeHandle, useRef, useEffect, forwardRef, memo } from 'react';\nimport { applyReactStyle } from \"../utils/apply-react-style.js\";\nimport { useControl } from \"./use-control.js\";\nfunction _GeolocateControl(props, ref) {\n const thisRef = useRef({ props });\n const ctrl = useControl(({ mapLib }) => {\n const gc = new mapLib.GeolocateControl(props);\n // Hack: fix GeolocateControl reuse\n // When using React strict mode, the component is mounted twice.\n // GeolocateControl's UI creation is asynchronous. Removing and adding it back causes the UI to be initialized twice.\n const setupUI = gc._setupUI;\n gc._setupUI = () => {\n if (!gc._container.hasChildNodes()) {\n setupUI();\n }\n };\n gc.on('geolocate', e => {\n thisRef.current.props.onGeolocate?.(e);\n });\n gc.on('error', e => {\n thisRef.current.props.onError?.(e);\n });\n gc.on('outofmaxbounds', e => {\n thisRef.current.props.onOutOfMaxBounds?.(e);\n });\n gc.on('trackuserlocationstart', e => {\n thisRef.current.props.onTrackUserLocationStart?.(e);\n });\n gc.on('trackuserlocationend', e => {\n thisRef.current.props.onTrackUserLocationEnd?.(e);\n });\n return gc;\n }, { position: props.position });\n thisRef.current.props = props;\n useImperativeHandle(ref, () => ctrl, []);\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport const GeolocateControl = memo(forwardRef(_GeolocateControl));\n//# sourceMappingURL=geolocate-control.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAGA,SAAS,kBAAkB,OAAO,KAAK;CACnC,MAAM,UAAU,OAAO,EAAE,OAAO,CAAC;CACjC,MAAM,OAAO,YAAY,EAAE,aAAa;EACpC,MAAM,KAAK,IAAI,OAAO,iBAAiB,MAAM;EAI7C,MAAM,UAAU,GAAG;AACnB,KAAG,iBAAiB;AAChB,OAAI,CAAC,GAAG,WAAW,eAAe,CAC9B,UAAS;;AAGjB,KAAG,GAAG,cAAa,MAAK;AACpB,WAAQ,QAAQ,MAAM,cAAc,EAAE;IACxC;AACF,KAAG,GAAG,UAAS,MAAK;AAChB,WAAQ,QAAQ,MAAM,UAAU,EAAE;IACpC;AACF,KAAG,GAAG,mBAAkB,MAAK;AACzB,WAAQ,QAAQ,MAAM,mBAAmB,EAAE;IAC7C;AACF,KAAG,GAAG,2BAA0B,MAAK;AACjC,WAAQ,QAAQ,MAAM,2BAA2B,EAAE;IACrD;AACF,KAAG,GAAG,yBAAwB,MAAK;AAC/B,WAAQ,QAAQ,MAAM,yBAAyB,EAAE;IACnD;AACF,SAAO;IACR,EAAE,UAAU,MAAM,UAAU,CAAC;AAChC,SAAQ,QAAQ,QAAQ;AACxB,qBAAoB,WAAW,MAAM,EAAE,CAAC;AACxC,iBAAgB;AACZ,kBAAgB,KAAK,YAAY,MAAM,MAAM;IAC9C,CAAC,MAAM,MAAM,CAAC;AACjB,QAAO;;AAEX,MAAa,mBAAmB,KAAK,WAAW,kBAAkB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import "./map.js";
|
|
15
|
-
import { useContext, useEffect, useMemo, useRef, useState } from "react";
|