@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
|
@@ -11,15 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return Math.log(x) * Math.LOG2E;
|
|
20
|
-
}
|
|
21
|
-
const log2 = Math.log2 || ieLog2;
|
|
14
|
+
import { BASE_FILL_OPACITY, DASH_ARRAYS, DEFAULT_COLORS, DEFAULT_STYLE_PROPERTIES, SHAPE_LAYER_IDS, STROKE_PATTERNS, STROKE_WIDTHS } from "./shared/constants.js";
|
|
15
|
+
import { SHAPE_EVENTS, ShapeEvents } from "./shared/events.js";
|
|
16
|
+
import { DisplayShapeLayer } from "./display-shape-layer/index.js";
|
|
17
|
+
import { useShapeSelection } from "./display-shape-layer/use-shape-selection.js";
|
|
18
|
+
import { ShapeFeatureType } from "./shared/types.js";
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
export { clamp, log2 };
|
|
25
|
-
//# sourceMappingURL=math-utils.js.map
|
|
20
|
+
export { BASE_FILL_OPACITY, DASH_ARRAYS, DEFAULT_COLORS, DEFAULT_STYLE_PROPERTIES, DisplayShapeLayer, SHAPE_EVENTS, SHAPE_LAYER_IDS, STROKE_PATTERNS, STROKE_WIDTHS, ShapeEvents, ShapeFeatureType, useShapeSelection };
|
|
@@ -0,0 +1,78 @@
|
|
|
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 { StyleProperties } from "./types.js";
|
|
14
|
+
import { Color } from "@deck.gl/core";
|
|
15
|
+
|
|
16
|
+
//#region src/deckgl/shapes/shared/constants.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Layer IDs for shape layers
|
|
19
|
+
*/
|
|
20
|
+
declare const SHAPE_LAYER_IDS: {
|
|
21
|
+
readonly DISPLAY: "DISPLAY_SHAPES";
|
|
22
|
+
readonly DISPLAY_HIGHLIGHT: "DISPLAY_SHAPES::Highlight";
|
|
23
|
+
readonly DISPLAY_LABELS: "DISPLAY_SHAPES::Labels";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Base fill opacity multiplier (60%) for standard semi-transparent look
|
|
27
|
+
*/
|
|
28
|
+
declare const BASE_FILL_OPACITY = 0.2;
|
|
29
|
+
/**
|
|
30
|
+
* Default stroke width in pixels when not specified in styleProperties
|
|
31
|
+
*/
|
|
32
|
+
declare const DEFAULT_STROKE_WIDTH = 2;
|
|
33
|
+
/**
|
|
34
|
+
* Additional pixels added to stroke width on hover
|
|
35
|
+
*/
|
|
36
|
+
declare const HOVER_WIDTH_INCREASE = 2;
|
|
37
|
+
/**
|
|
38
|
+
* Additional pixels added to stroke width for selection highlight
|
|
39
|
+
*/
|
|
40
|
+
declare const HIGHLIGHT_WIDTH_INCREASE = 5;
|
|
41
|
+
/**
|
|
42
|
+
* Fixed opacity for label background (0-255)
|
|
43
|
+
*/
|
|
44
|
+
declare const LABEL_BACKGROUND_OPACITY = 200;
|
|
45
|
+
/**
|
|
46
|
+
* Fixed opacity for label border (0-255)
|
|
47
|
+
*/
|
|
48
|
+
declare const LABEL_BORDER_OPACITY = 255;
|
|
49
|
+
/**
|
|
50
|
+
* Default colors as RGBA arrays for DeckGL layers
|
|
51
|
+
*/
|
|
52
|
+
declare const DEFAULT_COLORS: {
|
|
53
|
+
/** Default fill color (background-surface-muted gray at full alpha) */
|
|
54
|
+
readonly fill: Color;
|
|
55
|
+
/** Default stroke color (outline-interactive-hover gray at full alpha) */
|
|
56
|
+
readonly stroke: Color;
|
|
57
|
+
/** Highlight/selection color (turquoise at ~39% alpha) */
|
|
58
|
+
readonly highlight: Color;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Default style properties for new shapes
|
|
62
|
+
*/
|
|
63
|
+
declare const DEFAULT_STYLE_PROPERTIES: StyleProperties;
|
|
64
|
+
/**
|
|
65
|
+
* Stroke width options
|
|
66
|
+
*/
|
|
67
|
+
declare const STROKE_WIDTHS: readonly [1, 2, 4, 8];
|
|
68
|
+
/**
|
|
69
|
+
* Stroke pattern options
|
|
70
|
+
*/
|
|
71
|
+
declare const STROKE_PATTERNS: readonly ["solid", "dashed", "dotted"];
|
|
72
|
+
/**
|
|
73
|
+
* Dash array patterns for stroke rendering
|
|
74
|
+
*/
|
|
75
|
+
declare const DASH_ARRAYS: Record<'solid' | 'dashed' | 'dotted', [number, number] | null>;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { BASE_FILL_OPACITY, DASH_ARRAYS, DEFAULT_COLORS, DEFAULT_STROKE_WIDTH, DEFAULT_STYLE_PROPERTIES, HIGHLIGHT_WIDTH_INCREASE, HOVER_WIDTH_INCREASE, LABEL_BACKGROUND_OPACITY, LABEL_BORDER_OPACITY, SHAPE_LAYER_IDS, STROKE_PATTERNS, STROKE_WIDTHS };
|
|
78
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
//#region src/deckgl/shapes/shared/constants.ts
|
|
17
|
+
/**
|
|
18
|
+
* Layer IDs for shape layers
|
|
19
|
+
*/
|
|
20
|
+
const SHAPE_LAYER_IDS = {
|
|
21
|
+
DISPLAY: "DISPLAY_SHAPES",
|
|
22
|
+
DISPLAY_HIGHLIGHT: "DISPLAY_SHAPES::Highlight",
|
|
23
|
+
DISPLAY_LABELS: "DISPLAY_SHAPES::Labels"
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Base fill opacity multiplier (60%) for standard semi-transparent look
|
|
27
|
+
*/
|
|
28
|
+
const BASE_FILL_OPACITY = .2;
|
|
29
|
+
/**
|
|
30
|
+
* Default stroke width in pixels when not specified in styleProperties
|
|
31
|
+
*/
|
|
32
|
+
const DEFAULT_STROKE_WIDTH = 2;
|
|
33
|
+
/**
|
|
34
|
+
* Additional pixels added to stroke width on hover
|
|
35
|
+
*/
|
|
36
|
+
const HOVER_WIDTH_INCREASE = 2;
|
|
37
|
+
/**
|
|
38
|
+
* Additional pixels added to stroke width for selection highlight
|
|
39
|
+
*/
|
|
40
|
+
const HIGHLIGHT_WIDTH_INCREASE = 5;
|
|
41
|
+
/**
|
|
42
|
+
* Fixed opacity for label background (0-255)
|
|
43
|
+
*/
|
|
44
|
+
const LABEL_BACKGROUND_OPACITY = 200;
|
|
45
|
+
/**
|
|
46
|
+
* Fixed opacity for label border (0-255)
|
|
47
|
+
*/
|
|
48
|
+
const LABEL_BORDER_OPACITY = 255;
|
|
49
|
+
/**
|
|
50
|
+
* Default colors as RGBA arrays for DeckGL layers
|
|
51
|
+
*/
|
|
52
|
+
const DEFAULT_COLORS = {
|
|
53
|
+
fill: [
|
|
54
|
+
255,
|
|
55
|
+
255,
|
|
56
|
+
255,
|
|
57
|
+
255
|
|
58
|
+
],
|
|
59
|
+
stroke: [
|
|
60
|
+
136,
|
|
61
|
+
138,
|
|
62
|
+
143,
|
|
63
|
+
255
|
|
64
|
+
],
|
|
65
|
+
highlight: [
|
|
66
|
+
40,
|
|
67
|
+
245,
|
|
68
|
+
190,
|
|
69
|
+
100
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Default style properties for new shapes
|
|
74
|
+
*/
|
|
75
|
+
const DEFAULT_STYLE_PROPERTIES = {
|
|
76
|
+
fillColor: DEFAULT_COLORS.fill,
|
|
77
|
+
strokeColor: DEFAULT_COLORS.stroke,
|
|
78
|
+
strokeWidth: 2,
|
|
79
|
+
strokePattern: "solid"
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Stroke width options
|
|
83
|
+
*/
|
|
84
|
+
const STROKE_WIDTHS = [
|
|
85
|
+
1,
|
|
86
|
+
2,
|
|
87
|
+
4,
|
|
88
|
+
8
|
|
89
|
+
];
|
|
90
|
+
/**
|
|
91
|
+
* Stroke pattern options
|
|
92
|
+
*/
|
|
93
|
+
const STROKE_PATTERNS = [
|
|
94
|
+
"solid",
|
|
95
|
+
"dashed",
|
|
96
|
+
"dotted"
|
|
97
|
+
];
|
|
98
|
+
/**
|
|
99
|
+
* Dash array patterns for stroke rendering
|
|
100
|
+
*/
|
|
101
|
+
const DASH_ARRAYS = {
|
|
102
|
+
solid: null,
|
|
103
|
+
dashed: [8, 4],
|
|
104
|
+
dotted: [2, 4]
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
export { BASE_FILL_OPACITY, DASH_ARRAYS, DEFAULT_COLORS, DEFAULT_STROKE_WIDTH, DEFAULT_STYLE_PROPERTIES, HIGHLIGHT_WIDTH_INCREASE, HOVER_WIDTH_INCREASE, LABEL_BACKGROUND_OPACITY, LABEL_BORDER_OPACITY, SHAPE_LAYER_IDS, STROKE_PATTERNS, STROKE_WIDTHS };
|
|
109
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":["DEFAULT_STYLE_PROPERTIES: StyleProperties","DASH_ARRAYS: Record<\n 'solid' | 'dashed' | 'dotted',\n [number, number] | null\n>"],"sources":["../../../../src/deckgl/shapes/shared/constants.ts"],"sourcesContent":["/*\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\n'use client';\n\nimport type { Color } from '@deck.gl/core';\nimport type { StyleProperties } from './types';\n\n/**\n * Layer IDs for shape layers\n */\nexport const SHAPE_LAYER_IDS = {\n DISPLAY: 'DISPLAY_SHAPES',\n DISPLAY_HIGHLIGHT: 'DISPLAY_SHAPES::Highlight',\n DISPLAY_LABELS: 'DISPLAY_SHAPES::Labels',\n} as const;\n\n/**\n * Base fill opacity multiplier (60%) for standard semi-transparent look\n */\nexport const BASE_FILL_OPACITY = 0.2;\n\n/**\n * Default stroke width in pixels when not specified in styleProperties\n */\nexport const DEFAULT_STROKE_WIDTH = 2;\n\n/**\n * Additional pixels added to stroke width on hover\n */\nexport const HOVER_WIDTH_INCREASE = 2;\n\n/**\n * Additional pixels added to stroke width for selection highlight\n */\nexport const HIGHLIGHT_WIDTH_INCREASE = 5;\n\n/**\n * Fixed opacity for label background (0-255)\n */\nexport const LABEL_BACKGROUND_OPACITY = 200;\n\n/**\n * Fixed opacity for label border (0-255)\n */\nexport const LABEL_BORDER_OPACITY = 255;\n\n/**\n * Default colors as RGBA arrays for DeckGL layers\n */\nexport const DEFAULT_COLORS = {\n /** Default fill color (background-surface-muted gray at full alpha) */\n fill: [255, 255, 255, 255] as Color,\n /** Default stroke color (outline-interactive-hover gray at full alpha) */\n stroke: [136, 138, 143, 255] as Color,\n /** Highlight/selection color (turquoise at ~39% alpha) */\n highlight: [40, 245, 190, 100] as Color,\n} as const;\n\n/**\n * Default style properties for new shapes\n */\nexport const DEFAULT_STYLE_PROPERTIES: StyleProperties = {\n fillColor: DEFAULT_COLORS.fill,\n strokeColor: DEFAULT_COLORS.stroke,\n strokeWidth: 2,\n strokePattern: 'solid',\n};\n\n/**\n * Stroke width options\n */\nexport const STROKE_WIDTHS = [1, 2, 4, 8] as const;\n\n/**\n * Stroke pattern options\n */\nexport const STROKE_PATTERNS = ['solid', 'dashed', 'dotted'] as const;\n\n/**\n * Dash array patterns for stroke rendering\n */\nexport const DASH_ARRAYS: Record<\n 'solid' | 'dashed' | 'dotted',\n [number, number] | null\n> = {\n solid: null,\n dashed: [8, 4],\n dotted: [2, 4],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,MAAa,kBAAkB;CAC7B,SAAS;CACT,mBAAmB;CACnB,gBAAgB;CACjB;;;;AAKD,MAAa,oBAAoB;;;;AAKjC,MAAa,uBAAuB;;;;AAKpC,MAAa,uBAAuB;;;;AAKpC,MAAa,2BAA2B;;;;AAKxC,MAAa,2BAA2B;;;;AAKxC,MAAa,uBAAuB;;;;AAKpC,MAAa,iBAAiB;CAE5B,MAAM;EAAC;EAAK;EAAK;EAAK;EAAI;CAE1B,QAAQ;EAAC;EAAK;EAAK;EAAK;EAAI;CAE5B,WAAW;EAAC;EAAI;EAAK;EAAK;EAAI;CAC/B;;;;AAKD,MAAaA,2BAA4C;CACvD,WAAW,eAAe;CAC1B,aAAa,eAAe;CAC5B,aAAa;CACb,eAAe;CAChB;;;;AAKD,MAAa,gBAAgB;CAAC;CAAG;CAAG;CAAG;CAAE;;;;AAKzC,MAAa,kBAAkB;CAAC;CAAS;CAAU;CAAS;;;;AAK5D,MAAaC,cAGT;CACF,OAAO;CACP,QAAQ,CAAC,GAAG,EAAE;CACd,QAAQ,CAAC,GAAG,EAAE;CACf"}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 { ShapeId } from "./types.js";
|
|
14
|
+
import { Payload } from "@accelint/bus";
|
|
15
|
+
import { UniqueId } from "@accelint/core";
|
|
16
|
+
|
|
17
|
+
//#region src/deckgl/shapes/shared/events.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Shape interaction events for DisplayShapeLayer
|
|
20
|
+
*/
|
|
21
|
+
declare const ShapeEvents: {
|
|
22
|
+
/** Shape selected */
|
|
23
|
+
readonly selected: "shapes:selected";
|
|
24
|
+
/** Selection cleared */
|
|
25
|
+
readonly deselected: "shapes:deselected";
|
|
26
|
+
/** Shape hovered (for cursor changes) */
|
|
27
|
+
readonly hovered: "shapes:hovered";
|
|
28
|
+
};
|
|
29
|
+
type ShapeEventType = (typeof ShapeEvents)[keyof typeof ShapeEvents];
|
|
30
|
+
/**
|
|
31
|
+
* Event payload types (all payloads are serializable)
|
|
32
|
+
*/
|
|
33
|
+
type ShapeSelectedEvent = Payload<'shapes:selected', {
|
|
34
|
+
shapeId: ShapeId;
|
|
35
|
+
/** Map instance ID for multi-map event isolation */
|
|
36
|
+
mapId: UniqueId;
|
|
37
|
+
}>;
|
|
38
|
+
type ShapeDeselectedEvent = Payload<'shapes:deselected', {
|
|
39
|
+
/** Map instance ID for multi-map event isolation */
|
|
40
|
+
mapId: UniqueId;
|
|
41
|
+
}>;
|
|
42
|
+
type ShapeHoveredEvent = Payload<'shapes:hovered', {
|
|
43
|
+
/** Shape ID being hovered, or null when hover ends */
|
|
44
|
+
shapeId: ShapeId | null;
|
|
45
|
+
/** Map instance ID for multi-map event isolation */
|
|
46
|
+
mapId: UniqueId;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Union of all shape event types
|
|
50
|
+
*/
|
|
51
|
+
type ShapeEvent = ShapeSelectedEvent | ShapeDeselectedEvent | ShapeHoveredEvent;
|
|
52
|
+
/**
|
|
53
|
+
* Aliases for backward compatibility
|
|
54
|
+
*/
|
|
55
|
+
declare const SHAPE_EVENTS: {
|
|
56
|
+
/** Shape selected */
|
|
57
|
+
readonly selected: "shapes:selected";
|
|
58
|
+
/** Selection cleared */
|
|
59
|
+
readonly deselected: "shapes:deselected";
|
|
60
|
+
/** Shape hovered (for cursor changes) */
|
|
61
|
+
readonly hovered: "shapes:hovered";
|
|
62
|
+
};
|
|
63
|
+
type ShapeEventPayload = ShapeEvent;
|
|
64
|
+
type ShapeEventHandler<T extends ShapeEventType = ShapeEventType> = (event: Extract<ShapeEvent, {
|
|
65
|
+
type: T;
|
|
66
|
+
}>) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Shape events namespace for bus integration
|
|
69
|
+
*/
|
|
70
|
+
declare const ShapeEventsNamespace = "shapes";
|
|
71
|
+
//#endregion
|
|
72
|
+
export { SHAPE_EVENTS, ShapeDeselectedEvent, ShapeEvent, ShapeEventHandler, ShapeEventPayload, ShapeEventType, ShapeEvents, ShapeEventsNamespace, ShapeHoveredEvent, ShapeSelectedEvent };
|
|
73
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
//#region src/deckgl/shapes/shared/events.ts
|
|
17
|
+
/**
|
|
18
|
+
* Shape interaction events for DisplayShapeLayer
|
|
19
|
+
*/
|
|
20
|
+
const ShapeEvents = {
|
|
21
|
+
selected: "shapes:selected",
|
|
22
|
+
deselected: "shapes:deselected",
|
|
23
|
+
hovered: "shapes:hovered"
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Aliases for backward compatibility
|
|
27
|
+
*/
|
|
28
|
+
const SHAPE_EVENTS = ShapeEvents;
|
|
29
|
+
/**
|
|
30
|
+
* Shape events namespace for bus integration
|
|
31
|
+
*/
|
|
32
|
+
const ShapeEventsNamespace = "shapes";
|
|
33
|
+
/**
|
|
34
|
+
* Note: These utility functions are deprecated in favor of direct bus usage.
|
|
35
|
+
* Use `useEmit` and `useOn` from '@accelint/bus/react' in React components instead.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* import { useEmit, useOn } from '@accelint/bus/react';
|
|
40
|
+
* import { ShapeEvents } from '@accelint/map-toolkit/deckgl/shapes';
|
|
41
|
+
*
|
|
42
|
+
* function MyComponent() {
|
|
43
|
+
* const emit = useEmit();
|
|
44
|
+
*
|
|
45
|
+
* // Emit shape selected event
|
|
46
|
+
* emit(ShapeEvents.selected, { shapeId: 'some-id' });
|
|
47
|
+
*
|
|
48
|
+
* // Listen to shape events
|
|
49
|
+
* useOn(ShapeEvents.selected, (event) => {
|
|
50
|
+
* console.log('Shape selected:', event.data.shapeId);
|
|
51
|
+
* });
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { SHAPE_EVENTS, ShapeEvents, ShapeEventsNamespace };
|
|
58
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../../../../src/deckgl/shapes/shared/events.ts"],"sourcesContent":["/*\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\n'use client';\n\nimport type { Payload } from '@accelint/bus';\nimport type { UniqueId } from '@accelint/core';\nimport type { ShapeId } from './types';\n\n/**\n * Shape interaction events for DisplayShapeLayer\n */\nexport const ShapeEvents = {\n /** Shape selected */\n selected: 'shapes:selected',\n /** Selection cleared */\n deselected: 'shapes:deselected',\n /** Shape hovered (for cursor changes) */\n hovered: 'shapes:hovered',\n} as const;\n\nexport type ShapeEventType = (typeof ShapeEvents)[keyof typeof ShapeEvents];\n\n/**\n * Event payload types (all payloads are serializable)\n */\n\nexport type ShapeSelectedEvent = Payload<\n 'shapes:selected',\n {\n shapeId: ShapeId;\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\nexport type ShapeDeselectedEvent = Payload<\n 'shapes:deselected',\n {\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\nexport type ShapeHoveredEvent = Payload<\n 'shapes:hovered',\n {\n /** Shape ID being hovered, or null when hover ends */\n shapeId: ShapeId | null;\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\n/**\n * Union of all shape event types\n */\nexport type ShapeEvent =\n | ShapeSelectedEvent\n | ShapeDeselectedEvent\n | ShapeHoveredEvent;\n\n/**\n * Aliases for backward compatibility\n */\nexport const SHAPE_EVENTS = ShapeEvents;\nexport type ShapeEventPayload = ShapeEvent;\nexport type ShapeEventHandler<T extends ShapeEventType = ShapeEventType> = (\n event: Extract<ShapeEvent, { type: T }>,\n) => void;\n\n/**\n * Shape events namespace for bus integration\n */\nexport const ShapeEventsNamespace = 'shapes';\n\n/**\n * Note: These utility functions are deprecated in favor of direct bus usage.\n * Use `useEmit` and `useOn` from '@accelint/bus/react' in React components instead.\n *\n * @example\n * ```tsx\n * import { useEmit, useOn } from '@accelint/bus/react';\n * import { ShapeEvents } from '@accelint/map-toolkit/deckgl/shapes';\n *\n * function MyComponent() {\n * const emit = useEmit();\n *\n * // Emit shape selected event\n * emit(ShapeEvents.selected, { shapeId: 'some-id' });\n *\n * // Listen to shape events\n * useOn(ShapeEvents.selected, (event) => {\n * console.log('Shape selected:', event.data.shapeId);\n * });\n * }\n * ```\n */\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,MAAa,cAAc;CAEzB,UAAU;CAEV,YAAY;CAEZ,SAAS;CACV;;;;AA8CD,MAAa,eAAe;;;;AAS5B,MAAa,uBAAuB"}
|
|
@@ -0,0 +1,158 @@
|
|
|
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 { UniqueId } from "@accelint/core";
|
|
14
|
+
import { Color } from "@deck.gl/core";
|
|
15
|
+
import { Feature, LineString, Point, Polygon } from "geojson";
|
|
16
|
+
|
|
17
|
+
//#region src/deckgl/shapes/shared/types.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Supported shape types
|
|
20
|
+
*/
|
|
21
|
+
declare const ShapeFeatureType: {
|
|
22
|
+
readonly Circle: "Circle";
|
|
23
|
+
readonly Polygon: "Polygon";
|
|
24
|
+
readonly LineString: "LineString";
|
|
25
|
+
readonly Point: "Point";
|
|
26
|
+
};
|
|
27
|
+
type ShapeFeatureType = (typeof ShapeFeatureType)[keyof typeof ShapeFeatureType];
|
|
28
|
+
/**
|
|
29
|
+
* Shape ID type - uses UniqueId from core
|
|
30
|
+
*/
|
|
31
|
+
type ShapeId = UniqueId;
|
|
32
|
+
/**
|
|
33
|
+
* Stroke width options (in pixels)
|
|
34
|
+
*/
|
|
35
|
+
type StrokeWidth = 1 | 2 | 4 | 8;
|
|
36
|
+
/**
|
|
37
|
+
* Stroke pattern options
|
|
38
|
+
*/
|
|
39
|
+
type StrokePattern = 'solid' | 'dashed' | 'dotted';
|
|
40
|
+
/**
|
|
41
|
+
* Style properties for rendering shapes
|
|
42
|
+
*/
|
|
43
|
+
interface StyleProperties {
|
|
44
|
+
/** Fill color as RGBA array [r, g, b, a] where each value is 0-255 */
|
|
45
|
+
fillColor: Color;
|
|
46
|
+
/** Stroke color as RGBA array [r, g, b, a] where each value is 0-255 */
|
|
47
|
+
strokeColor: Color;
|
|
48
|
+
/** Stroke width in pixels */
|
|
49
|
+
strokeWidth: StrokeWidth;
|
|
50
|
+
/** Stroke pattern */
|
|
51
|
+
strokePattern: StrokePattern;
|
|
52
|
+
/** Optional icon properties for Point geometries */
|
|
53
|
+
icon?: {
|
|
54
|
+
/** Icon atlas URL or data */
|
|
55
|
+
atlas?: string;
|
|
56
|
+
/** Icon mapping (name to position in atlas) */
|
|
57
|
+
mapping?: Record<string, {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
width: number;
|
|
61
|
+
height: number;
|
|
62
|
+
mask?: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
/** Icon name to use from mapping */
|
|
65
|
+
name?: string;
|
|
66
|
+
/** Icon size in pixels */
|
|
67
|
+
size?: number;
|
|
68
|
+
};
|
|
69
|
+
/** Optional custom label pixel offset [x, y] */
|
|
70
|
+
labelOffset?: [number, number];
|
|
71
|
+
/** Optional custom label vertical anchor */
|
|
72
|
+
labelVerticalAnchor?: 'top' | 'middle' | 'bottom';
|
|
73
|
+
/** Optional custom label horizontal anchor */
|
|
74
|
+
labelHorizontalAnchor?: 'left' | 'center' | 'right';
|
|
75
|
+
/** Optional custom label coordinate anchor (position along geometry) */
|
|
76
|
+
labelCoordinateAnchor?: 'center' | 'start' | 'middle' | 'end' | 'top' | 'right' | 'bottom' | 'left';
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Circle-specific properties for precise rendering
|
|
80
|
+
* Stored alongside the polygon approximation
|
|
81
|
+
*/
|
|
82
|
+
interface CircleProperties {
|
|
83
|
+
/** Center point as [longitude, latitude] */
|
|
84
|
+
center: [number, number];
|
|
85
|
+
/** Radius with value and units */
|
|
86
|
+
radius: {
|
|
87
|
+
/** Radius value */
|
|
88
|
+
value: number;
|
|
89
|
+
/** Units (hardcoded to kilometers for v1) */
|
|
90
|
+
units: 'kilometers';
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Custom geometry types supported
|
|
95
|
+
*/
|
|
96
|
+
type CustomGeometry = Point | LineString | Polygon;
|
|
97
|
+
/**
|
|
98
|
+
* GeoJSON Feature with style properties
|
|
99
|
+
*/
|
|
100
|
+
interface StyledFeature extends Feature {
|
|
101
|
+
properties: {
|
|
102
|
+
/** Style properties for rendering */
|
|
103
|
+
styleProperties: StyleProperties;
|
|
104
|
+
/** Circle properties (only for Circle type shapes) */
|
|
105
|
+
circleProperties?: CircleProperties;
|
|
106
|
+
/** Shape ID for correlation */
|
|
107
|
+
shapeId?: ShapeId;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Shape data structure for DisplayShapeLayer
|
|
112
|
+
*/
|
|
113
|
+
interface DisplayShape {
|
|
114
|
+
/** Unique identifier */
|
|
115
|
+
id: ShapeId;
|
|
116
|
+
/** Full shape name used internally and in UI */
|
|
117
|
+
name: string;
|
|
118
|
+
/**
|
|
119
|
+
* Optional short display label shown on the map
|
|
120
|
+
* If not provided, the `name` property will be used instead
|
|
121
|
+
* Useful for showing abbreviated text on the map (e.g., "NYC" vs "New York City Office")
|
|
122
|
+
*/
|
|
123
|
+
label?: string;
|
|
124
|
+
/** Shape type */
|
|
125
|
+
shapeType: ShapeFeatureTypeValues;
|
|
126
|
+
/** GeoJSON feature with geometry and style properties */
|
|
127
|
+
feature: ShapeFeature;
|
|
128
|
+
/** UTC timestamp (only set when saved) */
|
|
129
|
+
lastUpdated?: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Alias for backward compatibility
|
|
133
|
+
* @deprecated Use DisplayShape instead
|
|
134
|
+
*/
|
|
135
|
+
type EditableShape = DisplayShape;
|
|
136
|
+
/**
|
|
137
|
+
* Alias for ShapeFeatureType values
|
|
138
|
+
*/
|
|
139
|
+
type ShapeFeatureTypeValues = ShapeFeatureType;
|
|
140
|
+
/**
|
|
141
|
+
* Alias for StyledFeature (shape feature)
|
|
142
|
+
*/
|
|
143
|
+
type ShapeFeature = StyledFeature;
|
|
144
|
+
/**
|
|
145
|
+
* Alias for StyledFeature properties
|
|
146
|
+
*/
|
|
147
|
+
type ShapeFeatureProperties = StyledFeature['properties'];
|
|
148
|
+
/**
|
|
149
|
+
* Circle radius type
|
|
150
|
+
*/
|
|
151
|
+
type CircleRadius = CircleProperties['radius'];
|
|
152
|
+
/**
|
|
153
|
+
* Coordinate as [longitude, latitude]
|
|
154
|
+
*/
|
|
155
|
+
type Coordinate = [number, number];
|
|
156
|
+
//#endregion
|
|
157
|
+
export { CircleProperties, CircleRadius, Coordinate, CustomGeometry, DisplayShape, EditableShape, ShapeFeature, ShapeFeatureProperties, ShapeFeatureType, ShapeFeatureTypeValues, ShapeId, StrokePattern, StrokeWidth, StyleProperties, StyledFeature };
|
|
158
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -11,10 +11,19 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
'use client';
|
|
15
15
|
|
|
16
|
-
//#region
|
|
17
|
-
|
|
16
|
+
//#region src/deckgl/shapes/shared/types.ts
|
|
17
|
+
/**
|
|
18
|
+
* Supported shape types
|
|
19
|
+
*/
|
|
20
|
+
const ShapeFeatureType = {
|
|
21
|
+
Circle: "Circle",
|
|
22
|
+
Polygon: "Polygon",
|
|
23
|
+
LineString: "LineString",
|
|
24
|
+
Point: "Point"
|
|
25
|
+
};
|
|
18
26
|
|
|
19
27
|
//#endregion
|
|
20
|
-
|
|
28
|
+
export { ShapeFeatureType };
|
|
29
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/deckgl/shapes/shared/types.ts"],"sourcesContent":["/*\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\n'use client';\n\nimport type { UniqueId } from '@accelint/core';\nimport type { Color } from '@deck.gl/core';\nimport type { Feature, LineString, Point, Polygon } from 'geojson';\n\n/**\n * Supported shape types\n */\nexport const ShapeFeatureType = {\n Circle: 'Circle',\n Polygon: 'Polygon',\n LineString: 'LineString',\n Point: 'Point',\n} as const;\n\nexport type ShapeFeatureType =\n (typeof ShapeFeatureType)[keyof typeof ShapeFeatureType];\n\n/**\n * Shape ID type - uses UniqueId from core\n */\nexport type ShapeId = UniqueId;\n\n/**\n * Stroke width options (in pixels)\n */\nexport type StrokeWidth = 1 | 2 | 4 | 8;\n\n/**\n * Stroke pattern options\n */\nexport type StrokePattern = 'solid' | 'dashed' | 'dotted';\n\n/**\n * Style properties for rendering shapes\n */\nexport interface StyleProperties {\n /** Fill color as RGBA array [r, g, b, a] where each value is 0-255 */\n fillColor: Color;\n /** Stroke color as RGBA array [r, g, b, a] where each value is 0-255 */\n strokeColor: Color;\n /** Stroke width in pixels */\n strokeWidth: StrokeWidth;\n /** Stroke pattern */\n strokePattern: StrokePattern;\n /** Optional icon properties for Point geometries */\n icon?: {\n /** Icon atlas URL or data */\n atlas?: string;\n /** Icon mapping (name to position in atlas) */\n mapping?: Record<\n string,\n { x: number; y: number; width: number; height: number; mask?: boolean }\n >;\n /** Icon name to use from mapping */\n name?: string;\n /** Icon size in pixels */\n size?: number;\n };\n /** Optional custom label pixel offset [x, y] */\n labelOffset?: [number, number];\n /** Optional custom label vertical anchor */\n labelVerticalAnchor?: 'top' | 'middle' | 'bottom';\n /** Optional custom label horizontal anchor */\n labelHorizontalAnchor?: 'left' | 'center' | 'right';\n /** Optional custom label coordinate anchor (position along geometry) */\n labelCoordinateAnchor?:\n | 'center'\n | 'start'\n | 'middle'\n | 'end'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left';\n}\n\n/**\n * Circle-specific properties for precise rendering\n * Stored alongside the polygon approximation\n */\nexport interface CircleProperties {\n /** Center point as [longitude, latitude] */\n center: [number, number];\n /** Radius with value and units */\n radius: {\n /** Radius value */\n value: number;\n /** Units (hardcoded to kilometers for v1) */\n units: 'kilometers';\n };\n}\n\n/**\n * Custom geometry types supported\n */\nexport type CustomGeometry = Point | LineString | Polygon;\n\n/**\n * GeoJSON Feature with style properties\n */\nexport interface StyledFeature extends Feature {\n properties: {\n /** Style properties for rendering */\n styleProperties: StyleProperties;\n /** Circle properties (only for Circle type shapes) */\n circleProperties?: CircleProperties;\n /** Shape ID for correlation */\n shapeId?: ShapeId;\n };\n}\n\n/**\n * Shape data structure for DisplayShapeLayer\n */\nexport interface DisplayShape {\n /** Unique identifier */\n id: ShapeId;\n /** Full shape name used internally and in UI */\n name: string;\n /**\n * Optional short display label shown on the map\n * If not provided, the `name` property will be used instead\n * Useful for showing abbreviated text on the map (e.g., \"NYC\" vs \"New York City Office\")\n */\n label?: string;\n /** Shape type */\n shapeType: ShapeFeatureTypeValues;\n /** GeoJSON feature with geometry and style properties */\n feature: ShapeFeature;\n /** UTC timestamp (only set when saved) */\n lastUpdated?: number;\n}\n\n/**\n * Alias for backward compatibility\n * @deprecated Use DisplayShape instead\n */\nexport type EditableShape = DisplayShape;\n\n/**\n * Alias for ShapeFeatureType values\n */\nexport type ShapeFeatureTypeValues = ShapeFeatureType;\n\n/**\n * Alias for StyledFeature (shape feature)\n */\nexport type ShapeFeature = StyledFeature;\n\n/**\n * Alias for StyledFeature properties\n */\nexport type ShapeFeatureProperties = StyledFeature['properties'];\n\n/**\n * Circle radius type\n */\nexport type CircleRadius = CircleProperties['radius'];\n\n/**\n * Coordinate as [longitude, latitude]\n */\nexport type Coordinate = [number, number];\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,MAAa,mBAAmB;CAC9B,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,OAAO;CACR"}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { AccessorContext, AccessorFunction, DefaultProps } from "@deck.gl/core";
|
|
13
14
|
import { IconLayer, IconLayerProps } from "@deck.gl/layers";
|
|
14
15
|
import { SymbolOptions } from "milsymbol";
|
|
15
|
-
import { AccessorContext, AccessorFunction, DefaultProps } from "@deck.gl/core";
|
|
16
16
|
|
|
17
17
|
//#region src/deckgl/symbol-layer/index.d.ts
|
|
18
18
|
type _SymbolLayerProps<TData = unknown> = {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { SupportedDistanceUnit } from "./types.js";
|
|
14
14
|
import { ComponentPropsWithRef } from "react";
|
|
15
15
|
import { UniqueId } from "@accelint/core";
|
|
16
|
-
import * as
|
|
16
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
17
17
|
|
|
18
18
|
//#region src/viewport/viewport-size.d.ts
|
|
19
19
|
type ViewportSizeProps = ComponentPropsWithRef<'span'> & {
|
|
@@ -48,7 +48,7 @@ declare function ViewportSize({
|
|
|
48
48
|
instanceId,
|
|
49
49
|
unit,
|
|
50
50
|
...rest
|
|
51
|
-
}: ViewportSizeProps):
|
|
51
|
+
}: ViewportSizeProps): react_jsx_runtime1.JSX.Element;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { ViewportSize, ViewportSizeProps };
|
|
54
54
|
//# sourceMappingURL=viewport-size.d.ts.map
|