@accelint/map-toolkit 0.5.0 → 1.0.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 +82 -0
- package/catalog-info.yaml +6 -3
- package/dist/camera/index.d.ts +2 -2
- package/dist/camera/index.js +2 -2
- package/dist/camera/store.d.ts +120 -0
- package/dist/camera/store.js +279 -0
- package/dist/camera/store.js.map +1 -0
- package/dist/deckgl/base-map/constants.d.ts +9 -7
- package/dist/deckgl/base-map/constants.js +9 -7
- package/dist/deckgl/base-map/constants.js.map +1 -1
- package/dist/deckgl/base-map/controls.js +2 -0
- package/dist/deckgl/base-map/controls.js.map +1 -1
- package/dist/deckgl/base-map/index.d.ts +2 -0
- package/dist/deckgl/base-map/index.js +14 -16
- package/dist/deckgl/base-map/index.js.map +1 -1
- package/dist/deckgl/base-map/provider.js +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/saved-viewports/storage.js +10 -2
- package/dist/deckgl/saved-viewports/storage.js.map +1 -1
- package/dist/deckgl/shapes/display-shape-layer/constants.js +58 -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 +210 -0
- package/dist/deckgl/shapes/display-shape-layer/index.js +449 -0
- package/dist/deckgl/shapes/display-shape-layer/index.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js +102 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/store.js +102 -0
- package/dist/deckgl/shapes/display-shape-layer/store.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/types.d.ts +126 -0
- 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 → deckgl/shapes/display-shape-layer/types.js} +0 -3
- package/dist/deckgl/shapes/display-shape-layer/use-select-shape.d.ts +89 -0
- package/dist/deckgl/shapes/display-shape-layer/use-select-shape.js +88 -0
- package/dist/deckgl/shapes/display-shape-layer/use-select-shape.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js +50 -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 +133 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.js +250 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/constants.js +46 -0
- package/dist/deckgl/shapes/draw-shape-layer/constants.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/events.d.ts +92 -0
- package/dist/deckgl/shapes/draw-shape-layer/events.js +56 -0
- package/dist/deckgl/shapes/draw-shape-layer/events.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/fiber.d.ts +11 -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/draw-shape-layer/fiber.js} +5 -4
- package/dist/deckgl/shapes/draw-shape-layer/fiber.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/index.d.ts +53 -0
- package/dist/deckgl/shapes/draw-shape-layer/index.js +95 -0
- package/dist/deckgl/shapes/draw-shape-layer/index.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-circle-mode-with-tooltip.js +51 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-circle-mode-with-tooltip.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-ellipse-mode-with-tooltip.js +73 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-ellipse-mode-with-tooltip.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-line-string-mode-with-tooltip.js +87 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-line-string-mode-with-tooltip.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-polygon-mode-with-tooltip.js +88 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-polygon-mode-with-tooltip.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-rectangle-mode-with-tooltip.js +77 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/draw-rectangle-mode-with-tooltip.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/index.js +64 -0
- package/dist/deckgl/shapes/draw-shape-layer/modes/index.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/store.js +175 -0
- package/dist/deckgl/shapes/draw-shape-layer/store.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/types.d.ts +86 -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/draw-shape-layer/types.js} +1 -1
- package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.d.ts +82 -0
- package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.js +112 -0
- package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.js.map +1 -0
- package/dist/deckgl/shapes/draw-shape-layer/utils/feature-conversion.js +147 -0
- package/dist/deckgl/shapes/draw-shape-layer/utils/feature-conversion.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/constants.js +41 -0
- package/dist/deckgl/shapes/edit-shape-layer/constants.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/events.d.ts +92 -0
- package/dist/deckgl/shapes/edit-shape-layer/events.js +56 -0
- package/dist/deckgl/shapes/edit-shape-layer/events.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/fiber.d.ts +13 -0
- package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-viewport.js → deckgl/shapes/edit-shape-layer/fiber.js} +1 -3
- package/dist/deckgl/shapes/edit-shape-layer/index.d.ts +63 -0
- package/dist/deckgl/shapes/edit-shape-layer/index.js +162 -0
- package/dist/deckgl/shapes/edit-shape-layer/index.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/base-transform-mode.js +154 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/base-transform-mode.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/bounding-transform-mode.js +147 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/bounding-transform-mode.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/circle-transform-mode.js +87 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/circle-transform-mode.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/index.js +61 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/index.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/rotate-mode-with-snap.js +109 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/rotate-mode-with-snap.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/scale-mode-with-free-transform.js +289 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/scale-mode-with-free-transform.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/vertex-transform-mode.js +121 -0
- package/dist/deckgl/shapes/edit-shape-layer/modes/vertex-transform-mode.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/store.js +194 -0
- package/dist/deckgl/shapes/edit-shape-layer/store.js.map +1 -0
- package/dist/deckgl/shapes/edit-shape-layer/types.d.ts +93 -0
- package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/normalize-viewport-props.js → deckgl/shapes/edit-shape-layer/types.js} +1 -1
- package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.d.ts +82 -0
- package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.js +114 -0
- package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.js.map +1 -0
- package/dist/deckgl/shapes/index.d.ts +29 -0
- package/dist/deckgl/shapes/index.js +27 -0
- package/dist/deckgl/shapes/shared/constants.d.ts +73 -0
- package/dist/deckgl/shapes/shared/constants.js +273 -0
- package/dist/deckgl/shapes/shared/constants.js.map +1 -0
- package/dist/deckgl/shapes/shared/events.d.ts +54 -0
- package/dist/{packages/hotkey-manager/dist/lib/is-mac/index.js → deckgl/shapes/shared/events.js} +10 -6
- package/dist/deckgl/shapes/shared/events.js.map +1 -0
- package/dist/deckgl/shapes/shared/hooks/use-shift-zoom-disable.js +84 -0
- package/dist/deckgl/shapes/shared/hooks/use-shift-zoom-disable.js.map +1 -0
- package/dist/deckgl/shapes/shared/types.d.ts +317 -0
- package/dist/deckgl/shapes/shared/types.js +83 -0
- package/dist/deckgl/shapes/shared/types.js.map +1 -0
- package/dist/deckgl/shapes/shared/utils/geometry-measurements.js +128 -0
- package/dist/deckgl/shapes/shared/utils/geometry-measurements.js.map +1 -0
- package/dist/deckgl/shapes/shared/utils/layer-config.js +50 -0
- package/dist/deckgl/shapes/shared/utils/layer-config.js.map +1 -0
- package/dist/deckgl/shapes/shared/utils/mode-utils.js +113 -0
- package/dist/deckgl/shapes/shared/utils/mode-utils.js.map +1 -0
- package/dist/deckgl/shapes/shared/utils/pick-filtering.js +57 -0
- package/dist/deckgl/shapes/shared/utils/pick-filtering.js.map +1 -0
- package/dist/deckgl/shapes/shared/utils/style-utils.d.ts +64 -0
- package/dist/deckgl/shapes/shared/utils/style-utils.js +101 -0
- package/dist/deckgl/shapes/shared/utils/style-utils.js.map +1 -0
- package/dist/deckgl/symbol-layer/index.d.ts +1 -1
- package/dist/deckgl/text-layer/default-settings.js +4 -24
- package/dist/deckgl/text-layer/default-settings.js.map +1 -1
- package/dist/deckgl/text-settings.d.ts +77 -0
- package/dist/deckgl/text-settings.js +83 -0
- package/dist/deckgl/text-settings.js.map +1 -0
- package/dist/map-cursor/index.d.ts +2 -2
- package/dist/map-cursor/index.js +2 -2
- package/dist/map-cursor/store.d.ts +32 -61
- package/dist/map-cursor/store.js +165 -294
- package/dist/map-cursor/store.js.map +1 -1
- package/dist/map-cursor/use-map-cursor.d.ts +5 -2
- package/dist/map-cursor/use-map-cursor.js +33 -15
- package/dist/map-cursor/use-map-cursor.js.map +1 -1
- package/dist/map-mode/index.d.ts +2 -2
- package/dist/map-mode/index.js +2 -2
- package/dist/map-mode/store.d.ts +36 -37
- package/dist/map-mode/store.js +131 -237
- package/dist/map-mode/store.js.map +1 -1
- package/dist/map-mode/use-map-mode.js +6 -5
- package/dist/map-mode/use-map-mode.js.map +1 -1
- package/dist/maplibre/index.d.ts +2 -2
- package/dist/maplibre/index.js +2 -2
- package/dist/shared/constants.d.ts +19 -0
- package/dist/{maplibre → shared}/constants.js +9 -3
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/create-map-store.d.ts +202 -0
- package/dist/shared/create-map-store.js +223 -0
- package/dist/shared/create-map-store.js.map +1 -0
- package/dist/shared/units.d.ts +39 -0
- package/dist/shared/units.js +49 -0
- package/dist/shared/units.js.map +1 -0
- package/dist/viewport/index.d.ts +3 -3
- package/dist/viewport/index.js +3 -3
- package/dist/viewport/store.d.ts +69 -0
- package/dist/viewport/store.js +125 -0
- package/dist/viewport/store.js.map +1 -0
- package/dist/viewport/types.d.ts +2 -2
- package/dist/viewport/utils.js +2 -2
- package/dist/viewport/utils.js.map +1 -1
- package/dist/viewport/viewport-size.js +2 -2
- package/dist/viewport/viewport-size.js.map +1 -1
- package/package.json +60 -26
- package/dist/_virtual/rolldown_runtime.js +0 -22
- package/dist/camera/use-camera-state.d.ts +0 -153
- package/dist/camera/use-camera-state.js +0 -419
- package/dist/camera/use-camera-state.js.map +0 -1
- 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/maplibre/constants.d.ts +0 -13
- package/dist/maplibre/constants.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 +0 -25
- 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/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/@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/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.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/dist/viewport/constants.d.ts +0 -11
- package/dist/viewport/constants.js +0 -25
- package/dist/viewport/constants.js.map +0 -1
- package/dist/viewport/use-viewport-state.d.ts +0 -100
- package/dist/viewport/use-viewport-state.js +0 -222
- package/dist/viewport/use-viewport-state.js.map +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
import { MapModeEvents } from "../../../../map-mode/events.js";
|
|
17
|
+
import { MapCursorEvents } from "../../../../map-cursor/events.js";
|
|
18
|
+
import { cursorStore } from "../../../../map-cursor/store.js";
|
|
19
|
+
import { Broadcast } from "@accelint/bus";
|
|
20
|
+
|
|
21
|
+
//#region src/deckgl/shapes/shared/utils/mode-utils.ts
|
|
22
|
+
/**
|
|
23
|
+
* Typed event bus instances for mode and cursor communication.
|
|
24
|
+
*/
|
|
25
|
+
const mapModeBus = Broadcast.getInstance();
|
|
26
|
+
const mapCursorBus = Broadcast.getInstance();
|
|
27
|
+
/**
|
|
28
|
+
* Request a map mode change.
|
|
29
|
+
*
|
|
30
|
+
* Emits a mode change request through the event bus. The mode store will
|
|
31
|
+
* handle authorization and apply the change if approved.
|
|
32
|
+
*
|
|
33
|
+
* @param mapId - The map instance ID
|
|
34
|
+
* @param desiredMode - The mode to switch to
|
|
35
|
+
* @param owner - The identifier of the component requesting the change
|
|
36
|
+
*/
|
|
37
|
+
function requestModeChange(mapId, desiredMode, owner) {
|
|
38
|
+
mapModeBus.emit(MapModeEvents.changeRequest, {
|
|
39
|
+
desiredMode,
|
|
40
|
+
owner,
|
|
41
|
+
id: mapId
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Release mode back to default.
|
|
46
|
+
*
|
|
47
|
+
* Convenience function to request a mode change back to 'default'.
|
|
48
|
+
*
|
|
49
|
+
* @param mapId - The map instance ID
|
|
50
|
+
* @param owner - The identifier of the component releasing the mode
|
|
51
|
+
*/
|
|
52
|
+
function releaseMode(mapId, owner) {
|
|
53
|
+
requestModeChange(mapId, "default", owner);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Request a cursor change.
|
|
57
|
+
*
|
|
58
|
+
* Emits a cursor change request through the event bus.
|
|
59
|
+
*
|
|
60
|
+
* @param mapId - The map instance ID
|
|
61
|
+
* @param cursor - The CSS cursor type to set
|
|
62
|
+
* @param owner - The identifier of the component requesting the change
|
|
63
|
+
*/
|
|
64
|
+
function requestCursorChange(mapId, cursor, owner) {
|
|
65
|
+
mapCursorBus.emit(MapCursorEvents.changeRequest, {
|
|
66
|
+
cursor,
|
|
67
|
+
owner,
|
|
68
|
+
id: mapId
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Release cursor back to default.
|
|
73
|
+
*
|
|
74
|
+
* Uses the cursor store's clear function to release the cursor.
|
|
75
|
+
*
|
|
76
|
+
* @param mapId - The map instance ID
|
|
77
|
+
* @param owner - The identifier of the component releasing the cursor
|
|
78
|
+
*/
|
|
79
|
+
function releaseCursor(mapId, owner) {
|
|
80
|
+
cursorStore.actions(mapId).clearCursor(owner);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Request both mode and cursor changes together.
|
|
84
|
+
*
|
|
85
|
+
* The cursor is stored for registered mode owners even if the mode change
|
|
86
|
+
* requires authorization. When the mode change is approved, the cursor
|
|
87
|
+
* will be automatically applied via getEffectiveCursor.
|
|
88
|
+
*
|
|
89
|
+
* @param mapId - The map instance ID
|
|
90
|
+
* @param desiredMode - The mode to switch to
|
|
91
|
+
* @param cursor - The CSS cursor type to set
|
|
92
|
+
* @param owner - The identifier of the component requesting the changes
|
|
93
|
+
*/
|
|
94
|
+
function requestModeAndCursor(mapId, desiredMode, cursor, owner) {
|
|
95
|
+
requestModeChange(mapId, desiredMode, owner);
|
|
96
|
+
requestCursorChange(mapId, cursor, owner);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Release both mode and cursor back to defaults.
|
|
100
|
+
*
|
|
101
|
+
* Common pattern when ending an operation.
|
|
102
|
+
*
|
|
103
|
+
* @param mapId - The map instance ID
|
|
104
|
+
* @param owner - The identifier of the component releasing mode and cursor
|
|
105
|
+
*/
|
|
106
|
+
function releaseModeAndCursor(mapId, owner) {
|
|
107
|
+
releaseMode(mapId, owner);
|
|
108
|
+
releaseCursor(mapId, owner);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
export { releaseModeAndCursor, requestCursorChange, requestModeAndCursor, requestModeChange };
|
|
113
|
+
//# sourceMappingURL=mode-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode-utils.js","names":[],"sources":["../../../../../src/deckgl/shapes/shared/utils/mode-utils.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 { Broadcast } from '@accelint/bus';\nimport { MapCursorEvents } from '@/map-cursor/events';\nimport { cursorStore } from '@/map-cursor/store';\nimport { MapModeEvents } from '@/map-mode/events';\nimport type { UniqueId } from '@accelint/core';\nimport type { CSSCursorType, MapCursorEventType } from '@/map-cursor/types';\nimport type { MapModeEventType } from '@/map-mode/types';\n\n/**\n * Typed event bus instances for mode and cursor communication.\n */\nconst mapModeBus = Broadcast.getInstance<MapModeEventType>();\nconst mapCursorBus = Broadcast.getInstance<MapCursorEventType>();\n\n/**\n * Request a map mode change.\n *\n * Emits a mode change request through the event bus. The mode store will\n * handle authorization and apply the change if approved.\n *\n * @param mapId - The map instance ID\n * @param desiredMode - The mode to switch to\n * @param owner - The identifier of the component requesting the change\n */\nexport function requestModeChange(\n mapId: UniqueId,\n desiredMode: string,\n owner: string,\n): void {\n mapModeBus.emit(MapModeEvents.changeRequest, {\n desiredMode,\n owner,\n id: mapId,\n });\n}\n\n/**\n * Release mode back to default.\n *\n * Convenience function to request a mode change back to 'default'.\n *\n * @param mapId - The map instance ID\n * @param owner - The identifier of the component releasing the mode\n */\nexport function releaseMode(mapId: UniqueId, owner: string): void {\n requestModeChange(mapId, 'default', owner);\n}\n\n/**\n * Request a cursor change.\n *\n * Emits a cursor change request through the event bus.\n *\n * @param mapId - The map instance ID\n * @param cursor - The CSS cursor type to set\n * @param owner - The identifier of the component requesting the change\n */\nexport function requestCursorChange(\n mapId: UniqueId,\n cursor: CSSCursorType,\n owner: string,\n): void {\n mapCursorBus.emit(MapCursorEvents.changeRequest, {\n cursor,\n owner,\n id: mapId,\n });\n}\n\n/**\n * Release cursor back to default.\n *\n * Uses the cursor store's clear function to release the cursor.\n *\n * @param mapId - The map instance ID\n * @param owner - The identifier of the component releasing the cursor\n */\nexport function releaseCursor(mapId: UniqueId, owner: string): void {\n cursorStore.actions(mapId).clearCursor(owner);\n}\n\n/**\n * Request both mode and cursor changes together.\n *\n * The cursor is stored for registered mode owners even if the mode change\n * requires authorization. When the mode change is approved, the cursor\n * will be automatically applied via getEffectiveCursor.\n *\n * @param mapId - The map instance ID\n * @param desiredMode - The mode to switch to\n * @param cursor - The CSS cursor type to set\n * @param owner - The identifier of the component requesting the changes\n */\nexport function requestModeAndCursor(\n mapId: UniqueId,\n desiredMode: string,\n cursor: CSSCursorType,\n owner: string,\n): void {\n requestModeChange(mapId, desiredMode, owner);\n requestCursorChange(mapId, cursor, owner);\n}\n\n/**\n * Release both mode and cursor back to defaults.\n *\n * Common pattern when ending an operation.\n *\n * @param mapId - The map instance ID\n * @param owner - The identifier of the component releasing mode and cursor\n */\nexport function releaseModeAndCursor(mapId: UniqueId, owner: string): void {\n releaseMode(mapId, owner);\n releaseCursor(mapId, owner);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,aAAa,UAAU,aAA+B;AAC5D,MAAM,eAAe,UAAU,aAAiC;;;;;;;;;;;AAYhE,SAAgB,kBACd,OACA,aACA,OACM;AACN,YAAW,KAAK,cAAc,eAAe;EAC3C;EACA;EACA,IAAI;EACL,CAAC;;;;;;;;;;AAWJ,SAAgB,YAAY,OAAiB,OAAqB;AAChE,mBAAkB,OAAO,WAAW,MAAM;;;;;;;;;;;AAY5C,SAAgB,oBACd,OACA,QACA,OACM;AACN,cAAa,KAAK,gBAAgB,eAAe;EAC/C;EACA;EACA,IAAI;EACL,CAAC;;;;;;;;;;AAWJ,SAAgB,cAAc,OAAiB,OAAqB;AAClE,aAAY,QAAQ,MAAM,CAAC,YAAY,MAAM;;;;;;;;;;;;;;AAe/C,SAAgB,qBACd,OACA,aACA,QACA,OACM;AACN,mBAAkB,OAAO,aAAa,MAAM;AAC5C,qBAAoB,OAAO,QAAQ,MAAM;;;;;;;;;;AAW3C,SAAgB,qBAAqB,OAAiB,OAAqB;AACzE,aAAY,OAAO,MAAM;AACzB,eAAc,OAAO,MAAM"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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/utils/pick-filtering.ts
|
|
17
|
+
/**
|
|
18
|
+
* Filters picks to only include valid geometry elements.
|
|
19
|
+
*
|
|
20
|
+
* This prevents TypeError from sublayer elements that don't have geometry
|
|
21
|
+
* when modes try to access pick.object.geometry.type. Only picks that are
|
|
22
|
+
* either guide features (pick.isGuide) or have valid geometry are included.
|
|
23
|
+
*
|
|
24
|
+
* Uses a single-pass algorithm for efficiency - filters and tracks changes
|
|
25
|
+
* in one loop iteration.
|
|
26
|
+
*
|
|
27
|
+
* @param picks - The picks array from a pointer event
|
|
28
|
+
* @returns Object containing filtered picks and whether filtering occurred
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const picks = props.lastPointerMoveEvent?.picks;
|
|
33
|
+
* if (picks && picks.length > 0) {
|
|
34
|
+
* const { filteredPicks, didFilter } = filterGeometryAwarePicks(picks);
|
|
35
|
+
* if (didFilter) {
|
|
36
|
+
* // Use filteredPicks in modified props
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
function filterGeometryAwarePicks(picks) {
|
|
42
|
+
const filteredPicks = [];
|
|
43
|
+
let didFilter = false;
|
|
44
|
+
for (const pick of picks) {
|
|
45
|
+
const pickObj = pick;
|
|
46
|
+
if (pickObj.isGuide || pickObj.object?.geometry?.type !== void 0) filteredPicks.push(pick);
|
|
47
|
+
else didFilter = true;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
filteredPicks,
|
|
51
|
+
didFilter
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { filterGeometryAwarePicks };
|
|
57
|
+
//# sourceMappingURL=pick-filtering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick-filtering.js","names":["filteredPicks: T[]"],"sources":["../../../../../src/deckgl/shapes/shared/utils/pick-filtering.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\n/**\n * Result of filtering picks for geometry-aware processing.\n * Generic to support both deck.gl/core PickingInfo and editable-layers Pick types.\n */\nexport interface FilteredPicksResult<T> {\n /** The filtered picks array (only valid geometry picks) */\n filteredPicks: T[];\n /** Whether any picks were removed during filtering */\n didFilter: boolean;\n}\n\n/**\n * Filters picks to only include valid geometry elements.\n *\n * This prevents TypeError from sublayer elements that don't have geometry\n * when modes try to access pick.object.geometry.type. Only picks that are\n * either guide features (pick.isGuide) or have valid geometry are included.\n *\n * Uses a single-pass algorithm for efficiency - filters and tracks changes\n * in one loop iteration.\n *\n * @param picks - The picks array from a pointer event\n * @returns Object containing filtered picks and whether filtering occurred\n *\n * @example\n * ```ts\n * const picks = props.lastPointerMoveEvent?.picks;\n * if (picks && picks.length > 0) {\n * const { filteredPicks, didFilter } = filterGeometryAwarePicks(picks);\n * if (didFilter) {\n * // Use filteredPicks in modified props\n * }\n * }\n * ```\n */\nexport function filterGeometryAwarePicks<T>(\n picks: T[],\n): FilteredPicksResult<T> {\n const filteredPicks: T[] = [];\n let didFilter = false;\n\n for (const pick of picks) {\n // Keep picks that are guides or have valid geometry\n // biome-ignore lint/suspicious/noExplicitAny: deck.gl picks have dynamic object structure\n const pickObj = pick as any;\n if (pickObj.isGuide || pickObj.object?.geometry?.type !== undefined) {\n filteredPicks.push(pick);\n } else {\n didFilter = true;\n }\n }\n\n return { filteredPicks, didFilter };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,SAAgB,yBACd,OACwB;CACxB,MAAMA,gBAAqB,EAAE;CAC7B,IAAI,YAAY;AAEhB,MAAK,MAAM,QAAQ,OAAO;EAGxB,MAAM,UAAU;AAChB,MAAI,QAAQ,WAAW,QAAQ,QAAQ,UAAU,SAAS,OACxD,eAAc,KAAK,KAAK;MAExB,aAAY;;AAIhB,QAAO;EAAE;EAAe;EAAW"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { StyledFeature } from "../types.js";
|
|
14
|
+
import { Color } from "@deck.gl/core";
|
|
15
|
+
|
|
16
|
+
//#region src/deckgl/shapes/shared/utils/style-utils.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Normalize a Color to a 4-element RGBA array.
|
|
19
|
+
* Handles RGB arrays (adds alpha 255), RGBA arrays, and typed arrays.
|
|
20
|
+
*
|
|
21
|
+
* @param color - The color to normalize
|
|
22
|
+
* @returns 4-element RGBA array [r, g, b, a]
|
|
23
|
+
*/
|
|
24
|
+
declare function normalizeColor(color: Color): [number, number, number, number];
|
|
25
|
+
/**
|
|
26
|
+
* Get fill color for a feature.
|
|
27
|
+
* Colors are passed through as-is unless applyBaseOpacity is true.
|
|
28
|
+
*
|
|
29
|
+
* @param feature - The styled feature
|
|
30
|
+
* @param applyBaseOpacity - When true, multiplies alpha by BASE_FILL_OPACITY (0.2)
|
|
31
|
+
* @returns RGBA color array
|
|
32
|
+
*/
|
|
33
|
+
declare function getFillColor(feature: StyledFeature, applyBaseOpacity?: boolean): Color;
|
|
34
|
+
/**
|
|
35
|
+
* Get border/outline color for a feature.
|
|
36
|
+
* Outlines are always rendered at their literal alpha value.
|
|
37
|
+
*
|
|
38
|
+
* Named to match deck.gl's `getLineColor` accessor convention.
|
|
39
|
+
* Reads from `lineColor` in the feature's style properties.
|
|
40
|
+
*
|
|
41
|
+
* @param feature - The styled feature
|
|
42
|
+
* @returns RGBA color array
|
|
43
|
+
*/
|
|
44
|
+
declare function getLineColor(feature: StyledFeature): Color;
|
|
45
|
+
/**
|
|
46
|
+
* Get border/outline width for a feature.
|
|
47
|
+
*
|
|
48
|
+
* Named to match deck.gl's `getLineWidth` accessor convention.
|
|
49
|
+
* Reads from `lineWidth` in the feature's style properties.
|
|
50
|
+
*
|
|
51
|
+
* @param feature - The styled feature
|
|
52
|
+
* @returns Border/outline width in pixels
|
|
53
|
+
*/
|
|
54
|
+
declare function getLineWidth(feature: StyledFeature): number;
|
|
55
|
+
/**
|
|
56
|
+
* Get dash array for border/outline pattern.
|
|
57
|
+
*
|
|
58
|
+
* @param feature - The styled feature
|
|
59
|
+
* @returns Dash array [dash, gap] or null for solid outlines
|
|
60
|
+
*/
|
|
61
|
+
declare function getDashArray(feature: StyledFeature): [number, number] | null;
|
|
62
|
+
//#endregion
|
|
63
|
+
export { getDashArray, getFillColor, getLineColor, getLineWidth, normalizeColor };
|
|
64
|
+
//# sourceMappingURL=style-utils.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
import { BASE_FILL_OPACITY, DASH_ARRAYS, DEFAULT_COLORS, DEFAULT_LINE_WIDTH } from "../constants.js";
|
|
17
|
+
|
|
18
|
+
//#region src/deckgl/shapes/shared/utils/style-utils.ts
|
|
19
|
+
/**
|
|
20
|
+
* Normalize a Color to a 4-element RGBA array.
|
|
21
|
+
* Handles RGB arrays (adds alpha 255), RGBA arrays, and typed arrays.
|
|
22
|
+
*
|
|
23
|
+
* @param color - The color to normalize
|
|
24
|
+
* @returns 4-element RGBA array [r, g, b, a]
|
|
25
|
+
*/
|
|
26
|
+
function normalizeColor(color) {
|
|
27
|
+
if (color instanceof Uint8Array || color instanceof Uint8ClampedArray) return [
|
|
28
|
+
color[0] ?? 0,
|
|
29
|
+
color[1] ?? 0,
|
|
30
|
+
color[2] ?? 0,
|
|
31
|
+
color[3] ?? 255
|
|
32
|
+
];
|
|
33
|
+
if (!Array.isArray(color) || color.length < 3) return [
|
|
34
|
+
0,
|
|
35
|
+
0,
|
|
36
|
+
0,
|
|
37
|
+
255
|
|
38
|
+
];
|
|
39
|
+
return [
|
|
40
|
+
color[0] ?? 0,
|
|
41
|
+
color[1] ?? 0,
|
|
42
|
+
color[2] ?? 0,
|
|
43
|
+
color[3] ?? 255
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get fill color for a feature.
|
|
48
|
+
* Colors are passed through as-is unless applyBaseOpacity is true.
|
|
49
|
+
*
|
|
50
|
+
* @param feature - The styled feature
|
|
51
|
+
* @param applyBaseOpacity - When true, multiplies alpha by BASE_FILL_OPACITY (0.2)
|
|
52
|
+
* @returns RGBA color array
|
|
53
|
+
*/
|
|
54
|
+
function getFillColor(feature, applyBaseOpacity = false) {
|
|
55
|
+
const rgba = normalizeColor((feature.properties?.styleProperties)?.fillColor ?? DEFAULT_COLORS.fill);
|
|
56
|
+
if (applyBaseOpacity) return [
|
|
57
|
+
rgba[0],
|
|
58
|
+
rgba[1],
|
|
59
|
+
rgba[2],
|
|
60
|
+
Math.round(rgba[3] * BASE_FILL_OPACITY)
|
|
61
|
+
];
|
|
62
|
+
return rgba;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get border/outline color for a feature.
|
|
66
|
+
* Outlines are always rendered at their literal alpha value.
|
|
67
|
+
*
|
|
68
|
+
* Named to match deck.gl's `getLineColor` accessor convention.
|
|
69
|
+
* Reads from `lineColor` in the feature's style properties.
|
|
70
|
+
*
|
|
71
|
+
* @param feature - The styled feature
|
|
72
|
+
* @returns RGBA color array
|
|
73
|
+
*/
|
|
74
|
+
function getLineColor(feature) {
|
|
75
|
+
return normalizeColor((feature.properties?.styleProperties)?.lineColor ?? DEFAULT_COLORS.line);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get border/outline width for a feature.
|
|
79
|
+
*
|
|
80
|
+
* Named to match deck.gl's `getLineWidth` accessor convention.
|
|
81
|
+
* Reads from `lineWidth` in the feature's style properties.
|
|
82
|
+
*
|
|
83
|
+
* @param feature - The styled feature
|
|
84
|
+
* @returns Border/outline width in pixels
|
|
85
|
+
*/
|
|
86
|
+
function getLineWidth(feature) {
|
|
87
|
+
return (feature.properties?.styleProperties)?.lineWidth ?? DEFAULT_LINE_WIDTH;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get dash array for border/outline pattern.
|
|
91
|
+
*
|
|
92
|
+
* @param feature - The styled feature
|
|
93
|
+
* @returns Dash array [dash, gap] or null for solid outlines
|
|
94
|
+
*/
|
|
95
|
+
function getDashArray(feature) {
|
|
96
|
+
return DASH_ARRAYS[(feature.properties?.styleProperties)?.linePattern ?? "solid"] || null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { getDashArray, getFillColor, getLineColor, getLineWidth, normalizeColor };
|
|
101
|
+
//# sourceMappingURL=style-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-utils.js","names":[],"sources":["../../../../../src/deckgl/shapes/shared/utils/style-utils.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 {\n BASE_FILL_OPACITY,\n DASH_ARRAYS,\n DEFAULT_COLORS,\n DEFAULT_LINE_WIDTH,\n} from '../constants';\nimport type { Color } from '@deck.gl/core';\nimport type { StyledFeature } from '../types';\n\n/**\n * Normalize a Color to a 4-element RGBA array.\n * Handles RGB arrays (adds alpha 255), RGBA arrays, and typed arrays.\n *\n * @param color - The color to normalize\n * @returns 4-element RGBA array [r, g, b, a]\n */\nexport function normalizeColor(color: Color): [number, number, number, number] {\n if (color instanceof Uint8Array || color instanceof Uint8ClampedArray) {\n return [color[0] ?? 0, color[1] ?? 0, color[2] ?? 0, color[3] ?? 255];\n }\n\n // Handle RGB (3-element) or RGBA (4-element) arrays\n // Validate array has at least 3 elements for RGB\n if (!Array.isArray(color) || color.length < 3) {\n return [0, 0, 0, 255]; // Fallback to opaque black\n }\n return [color[0] ?? 0, color[1] ?? 0, color[2] ?? 0, color[3] ?? 255];\n}\n\n/**\n * Get fill color for a feature.\n * Colors are passed through as-is unless applyBaseOpacity is true.\n *\n * @param feature - The styled feature\n * @param applyBaseOpacity - When true, multiplies alpha by BASE_FILL_OPACITY (0.2)\n * @returns RGBA color array\n */\nexport function getFillColor(\n feature: StyledFeature,\n applyBaseOpacity = false,\n): Color {\n const styleProps = feature.properties?.styleProperties;\n const color = styleProps?.fillColor ?? DEFAULT_COLORS.fill;\n\n // Normalize to 4-element array\n const rgba = normalizeColor(color);\n\n if (applyBaseOpacity) {\n // Apply base opacity multiplier to alpha channel\n return [rgba[0], rgba[1], rgba[2], Math.round(rgba[3] * BASE_FILL_OPACITY)];\n }\n\n return rgba;\n}\n\n/**\n * Get border/outline color for a feature.\n * Outlines are always rendered at their literal alpha value.\n *\n * Named to match deck.gl's `getLineColor` accessor convention.\n * Reads from `lineColor` in the feature's style properties.\n *\n * @param feature - The styled feature\n * @returns RGBA color array\n */\nexport function getLineColor(feature: StyledFeature): Color {\n const styleProps = feature.properties?.styleProperties;\n const color = styleProps?.lineColor ?? DEFAULT_COLORS.line;\n\n return normalizeColor(color);\n}\n\n/**\n * Get border/outline width for a feature.\n *\n * Named to match deck.gl's `getLineWidth` accessor convention.\n * Reads from `lineWidth` in the feature's style properties.\n *\n * @param feature - The styled feature\n * @returns Border/outline width in pixels\n */\nexport function getLineWidth(feature: StyledFeature): number {\n const styleProps = feature.properties?.styleProperties;\n return styleProps?.lineWidth ?? DEFAULT_LINE_WIDTH;\n}\n\n/**\n * Get dash array for border/outline pattern.\n *\n * @param feature - The styled feature\n * @returns Dash array [dash, gap] or null for solid outlines\n */\nexport function getDashArray(feature: StyledFeature): [number, number] | null {\n const styleProps = feature.properties?.styleProperties;\n const pattern = styleProps?.linePattern ?? 'solid';\n\n return DASH_ARRAYS[pattern] || null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,eAAe,OAAgD;AAC7E,KAAI,iBAAiB,cAAc,iBAAiB,kBAClD,QAAO;EAAC,MAAM,MAAM;EAAG,MAAM,MAAM;EAAG,MAAM,MAAM;EAAG,MAAM,MAAM;EAAI;AAKvE,KAAI,CAAC,MAAM,QAAQ,MAAM,IAAI,MAAM,SAAS,EAC1C,QAAO;EAAC;EAAG;EAAG;EAAG;EAAI;AAEvB,QAAO;EAAC,MAAM,MAAM;EAAG,MAAM,MAAM;EAAG,MAAM,MAAM;EAAG,MAAM,MAAM;EAAI;;;;;;;;;;AAWvE,SAAgB,aACd,SACA,mBAAmB,OACZ;CAKP,MAAM,OAAO,gBAJM,QAAQ,YAAY,kBACb,aAAa,eAAe,KAGpB;AAElC,KAAI,iBAEF,QAAO;EAAC,KAAK;EAAI,KAAK;EAAI,KAAK;EAAI,KAAK,MAAM,KAAK,KAAK,kBAAkB;EAAC;AAG7E,QAAO;;;;;;;;;;;;AAaT,SAAgB,aAAa,SAA+B;AAI1D,QAAO,gBAHY,QAAQ,YAAY,kBACb,aAAa,eAAe,KAE1B;;;;;;;;;;;AAY9B,SAAgB,aAAa,SAAgC;AAE3D,SADmB,QAAQ,YAAY,kBACpB,aAAa;;;;;;;;AASlC,SAAgB,aAAa,SAAiD;AAI5E,QAAO,aAHY,QAAQ,YAAY,kBACX,eAAe,YAEZ"}
|
|
@@ -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> = {
|
|
@@ -11,35 +11,15 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
import { DEFAULT_TEXT_STYLE } from "../text-settings.js";
|
|
15
|
+
|
|
14
16
|
//#region src/deckgl/text-layer/default-settings.ts
|
|
15
17
|
const defaultSettings = {
|
|
18
|
+
...DEFAULT_TEXT_STYLE,
|
|
16
19
|
fontFamily: "system-ui, sans-serif",
|
|
17
|
-
fontSettings: {
|
|
18
|
-
fontSize: 22,
|
|
19
|
-
sdf: true,
|
|
20
|
-
buffer: 10,
|
|
21
|
-
cutoff: .19,
|
|
22
|
-
radius: 10,
|
|
23
|
-
smoothing: .1
|
|
24
|
-
},
|
|
25
|
-
fontWeight: 500,
|
|
26
20
|
getAlignmentBaseline: "center",
|
|
27
|
-
getColor: [
|
|
28
|
-
255,
|
|
29
|
-
255,
|
|
30
|
-
255,
|
|
31
|
-
255
|
|
32
|
-
],
|
|
33
|
-
getSize: 12,
|
|
34
21
|
getTextAnchor: "middle",
|
|
35
|
-
lineHeight: 1
|
|
36
|
-
outlineColor: [
|
|
37
|
-
0,
|
|
38
|
-
0,
|
|
39
|
-
0,
|
|
40
|
-
255
|
|
41
|
-
],
|
|
42
|
-
outlineWidth: 2
|
|
22
|
+
lineHeight: 1
|
|
43
23
|
};
|
|
44
24
|
|
|
45
25
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-settings.js","names":["defaultSettings: Partial<DglTextLayerProps>"],"sources":["../../../src/deckgl/text-layer/default-settings.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\nimport
|
|
1
|
+
{"version":3,"file":"default-settings.js","names":["defaultSettings: Partial<DglTextLayerProps>"],"sources":["../../../src/deckgl/text-layer/default-settings.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\nimport { DEFAULT_TEXT_STYLE } from '../text-settings';\nimport type { TextLayerProps as DglTextLayerProps } from '@deck.gl/layers';\n\nexport const defaultSettings: Partial<DglTextLayerProps> = {\n ...DEFAULT_TEXT_STYLE,\n fontFamily: 'system-ui, sans-serif',\n getAlignmentBaseline: 'center',\n getTextAnchor: 'middle',\n lineHeight: 1,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAaA,kBAA8C;CACzD,GAAG;CACH,YAAY;CACZ,sBAAsB;CACtB,eAAe;CACf,YAAY;CACb"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { Color } from "@deck.gl/core";
|
|
14
|
+
import { TextLayerProps } from "@deck.gl/layers";
|
|
15
|
+
|
|
16
|
+
//#region src/deckgl/text-settings.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Shared font settings for SDF (Signed Distance Field) text rendering.
|
|
19
|
+
*
|
|
20
|
+
* These settings are optimized for cross-platform legibility, particularly
|
|
21
|
+
* on Windows machines where text can appear thin/hard to read without
|
|
22
|
+
* proper SDF configuration.
|
|
23
|
+
*
|
|
24
|
+
* Used by:
|
|
25
|
+
* - TextLayer component
|
|
26
|
+
* - Shape label layers
|
|
27
|
+
* - Draw/edit mode tooltips
|
|
28
|
+
*/
|
|
29
|
+
declare const SDF_FONT_SETTINGS: NonNullable<TextLayerProps['fontSettings']>;
|
|
30
|
+
/**
|
|
31
|
+
* Default text size in pixels for deck.gl TextLayer.
|
|
32
|
+
* Works in conjunction with SDF_FONT_SETTINGS for proper rendering.
|
|
33
|
+
*/
|
|
34
|
+
declare const DEFAULT_TEXT_SIZE = 12;
|
|
35
|
+
/**
|
|
36
|
+
* Default text color (white) for deck.gl TextLayer.
|
|
37
|
+
*/
|
|
38
|
+
declare const DEFAULT_TEXT_COLOR: Color;
|
|
39
|
+
/**
|
|
40
|
+
* Default text outline color (black) for deck.gl TextLayer.
|
|
41
|
+
*/
|
|
42
|
+
declare const DEFAULT_TEXT_OUTLINE_COLOR: Color;
|
|
43
|
+
/**
|
|
44
|
+
* Default text outline width in pixels for deck.gl TextLayer.
|
|
45
|
+
*/
|
|
46
|
+
declare const DEFAULT_TEXT_OUTLINE_WIDTH = 2;
|
|
47
|
+
/**
|
|
48
|
+
* Default font weight for deck.gl TextLayer.
|
|
49
|
+
*/
|
|
50
|
+
declare const DEFAULT_FONT_WEIGHT = 500;
|
|
51
|
+
/**
|
|
52
|
+
* Combined default text style settings for deck.gl TextLayer.
|
|
53
|
+
* Spread this object into TextLayer props for consistent cross-platform rendering.
|
|
54
|
+
*
|
|
55
|
+
* Includes: fontSettings, fontWeight, getSize, getColor, outlineWidth, outlineColor
|
|
56
|
+
*/
|
|
57
|
+
declare const DEFAULT_TEXT_STYLE: {
|
|
58
|
+
fontSettings: {
|
|
59
|
+
fontFamily?: string;
|
|
60
|
+
fontWeight?: string | number;
|
|
61
|
+
characterSet?: Set<string> | string[] | string;
|
|
62
|
+
fontSize?: number;
|
|
63
|
+
buffer?: number;
|
|
64
|
+
sdf?: boolean;
|
|
65
|
+
cutoff?: number;
|
|
66
|
+
radius?: number;
|
|
67
|
+
smoothing?: number;
|
|
68
|
+
};
|
|
69
|
+
fontWeight: number;
|
|
70
|
+
getSize: number;
|
|
71
|
+
getColor: [number, number, number, number];
|
|
72
|
+
outlineWidth: number;
|
|
73
|
+
outlineColor: [number, number, number, number];
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
export { DEFAULT_FONT_WEIGHT, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_OUTLINE_COLOR, DEFAULT_TEXT_OUTLINE_WIDTH, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_STYLE, SDF_FONT_SETTINGS };
|
|
77
|
+
//# sourceMappingURL=text-settings.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
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 src/deckgl/text-settings.ts
|
|
15
|
+
/**
|
|
16
|
+
* Shared font settings for SDF (Signed Distance Field) text rendering.
|
|
17
|
+
*
|
|
18
|
+
* These settings are optimized for cross-platform legibility, particularly
|
|
19
|
+
* on Windows machines where text can appear thin/hard to read without
|
|
20
|
+
* proper SDF configuration.
|
|
21
|
+
*
|
|
22
|
+
* Used by:
|
|
23
|
+
* - TextLayer component
|
|
24
|
+
* - Shape label layers
|
|
25
|
+
* - Draw/edit mode tooltips
|
|
26
|
+
*/
|
|
27
|
+
const SDF_FONT_SETTINGS = {
|
|
28
|
+
fontSize: 22,
|
|
29
|
+
sdf: true,
|
|
30
|
+
buffer: 10,
|
|
31
|
+
cutoff: .19,
|
|
32
|
+
radius: 10,
|
|
33
|
+
smoothing: .1
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Default text size in pixels for deck.gl TextLayer.
|
|
37
|
+
* Works in conjunction with SDF_FONT_SETTINGS for proper rendering.
|
|
38
|
+
*/
|
|
39
|
+
const DEFAULT_TEXT_SIZE = 12;
|
|
40
|
+
/**
|
|
41
|
+
* Default text color (white) for deck.gl TextLayer.
|
|
42
|
+
*/
|
|
43
|
+
const DEFAULT_TEXT_COLOR = [
|
|
44
|
+
255,
|
|
45
|
+
255,
|
|
46
|
+
255,
|
|
47
|
+
255
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Default text outline color (black) for deck.gl TextLayer.
|
|
51
|
+
*/
|
|
52
|
+
const DEFAULT_TEXT_OUTLINE_COLOR = [
|
|
53
|
+
0,
|
|
54
|
+
0,
|
|
55
|
+
0,
|
|
56
|
+
255
|
|
57
|
+
];
|
|
58
|
+
/**
|
|
59
|
+
* Default text outline width in pixels for deck.gl TextLayer.
|
|
60
|
+
*/
|
|
61
|
+
const DEFAULT_TEXT_OUTLINE_WIDTH = 2;
|
|
62
|
+
/**
|
|
63
|
+
* Default font weight for deck.gl TextLayer.
|
|
64
|
+
*/
|
|
65
|
+
const DEFAULT_FONT_WEIGHT = 500;
|
|
66
|
+
/**
|
|
67
|
+
* Combined default text style settings for deck.gl TextLayer.
|
|
68
|
+
* Spread this object into TextLayer props for consistent cross-platform rendering.
|
|
69
|
+
*
|
|
70
|
+
* Includes: fontSettings, fontWeight, getSize, getColor, outlineWidth, outlineColor
|
|
71
|
+
*/
|
|
72
|
+
const DEFAULT_TEXT_STYLE = {
|
|
73
|
+
fontSettings: { ...SDF_FONT_SETTINGS },
|
|
74
|
+
fontWeight: DEFAULT_FONT_WEIGHT,
|
|
75
|
+
getSize: DEFAULT_TEXT_SIZE,
|
|
76
|
+
getColor: DEFAULT_TEXT_COLOR,
|
|
77
|
+
outlineWidth: DEFAULT_TEXT_OUTLINE_WIDTH,
|
|
78
|
+
outlineColor: DEFAULT_TEXT_OUTLINE_COLOR
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
export { DEFAULT_FONT_WEIGHT, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_OUTLINE_COLOR, DEFAULT_TEXT_OUTLINE_WIDTH, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_STYLE, SDF_FONT_SETTINGS };
|
|
83
|
+
//# sourceMappingURL=text-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-settings.js","names":["SDF_FONT_SETTINGS: NonNullable<TextLayerProps['fontSettings']>","DEFAULT_TEXT_COLOR: Color","DEFAULT_TEXT_OUTLINE_COLOR: Color"],"sources":["../../src/deckgl/text-settings.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\nimport type { Color } from '@deck.gl/core';\nimport type { TextLayerProps } from '@deck.gl/layers';\n\n/**\n * Shared font settings for SDF (Signed Distance Field) text rendering.\n *\n * These settings are optimized for cross-platform legibility, particularly\n * on Windows machines where text can appear thin/hard to read without\n * proper SDF configuration.\n *\n * Used by:\n * - TextLayer component\n * - Shape label layers\n * - Draw/edit mode tooltips\n */\nexport const SDF_FONT_SETTINGS: NonNullable<TextLayerProps['fontSettings']> = {\n fontSize: 22,\n sdf: true,\n buffer: 10,\n cutoff: 0.19,\n radius: 10,\n smoothing: 0.1,\n};\n\n/**\n * Default text size in pixels for deck.gl TextLayer.\n * Works in conjunction with SDF_FONT_SETTINGS for proper rendering.\n */\nexport const DEFAULT_TEXT_SIZE = 12;\n\n/**\n * Default text color (white) for deck.gl TextLayer.\n */\nexport const DEFAULT_TEXT_COLOR: Color = [255, 255, 255, 255];\n\n/**\n * Default text outline color (black) for deck.gl TextLayer.\n */\nexport const DEFAULT_TEXT_OUTLINE_COLOR: Color = [0, 0, 0, 255];\n\n/**\n * Default text outline width in pixels for deck.gl TextLayer.\n */\nexport const DEFAULT_TEXT_OUTLINE_WIDTH = 2;\n\n/**\n * Default font weight for deck.gl TextLayer.\n */\nexport const DEFAULT_FONT_WEIGHT = 500;\n\n/**\n * Combined default text style settings for deck.gl TextLayer.\n * Spread this object into TextLayer props for consistent cross-platform rendering.\n *\n * Includes: fontSettings, fontWeight, getSize, getColor, outlineWidth, outlineColor\n */\nexport const DEFAULT_TEXT_STYLE = {\n fontSettings: { ...SDF_FONT_SETTINGS },\n fontWeight: DEFAULT_FONT_WEIGHT,\n getSize: DEFAULT_TEXT_SIZE,\n getColor: DEFAULT_TEXT_COLOR,\n outlineWidth: DEFAULT_TEXT_OUTLINE_WIDTH,\n outlineColor: DEFAULT_TEXT_OUTLINE_COLOR,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAaA,oBAAiE;CAC5E,UAAU;CACV,KAAK;CACL,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACZ;;;;;AAMD,MAAa,oBAAoB;;;;AAKjC,MAAaC,qBAA4B;CAAC;CAAK;CAAK;CAAK;CAAI;;;;AAK7D,MAAaC,6BAAoC;CAAC;CAAG;CAAG;CAAG;CAAI;;;;AAK/D,MAAa,6BAA6B;;;;AAK1C,MAAa,sBAAsB;;;;;;;AAQnC,MAAa,qBAAqB;CAChC,cAAc,EAAE,GAAG,mBAAmB;CACtC,YAAY;CACZ,SAAS;CACT,UAAU;CACV,cAAc;CACd,cAAc;CACf"}
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
import { MapCursorEvents } from "./events.js";
|
|
14
14
|
import { CSSCursorType, CursorChangeRequestEvent, CursorChangedEvent, CursorRejectedEvent, MapCursorEventType } from "./types.js";
|
|
15
|
-
import {
|
|
15
|
+
import { clearCursorState, cursorStore, getCursor } from "./store.js";
|
|
16
16
|
import { UseMapCursorReturn, useMapCursor, useMapCursorEffect } from "./use-map-cursor.js";
|
|
17
|
-
export { type CSSCursorType, type CursorChangeRequestEvent, type CursorChangedEvent, type CursorRejectedEvent, type MapCursorEventType, MapCursorEvents, type UseMapCursorReturn,
|
|
17
|
+
export { type CSSCursorType, type CursorChangeRequestEvent, type CursorChangedEvent, type CursorRejectedEvent, type MapCursorEventType, MapCursorEvents, type UseMapCursorReturn, clearCursorState, cursorStore, getCursor, useMapCursor, useMapCursorEffect };
|
package/dist/map-cursor/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
import { MapCursorEvents } from "./events.js";
|
|
15
|
-
import {
|
|
15
|
+
import { clearCursorState, cursorStore, getCursor } from "./store.js";
|
|
16
16
|
import { useMapCursor, useMapCursorEffect } from "./use-map-cursor.js";
|
|
17
17
|
|
|
18
|
-
export { MapCursorEvents,
|
|
18
|
+
export { MapCursorEvents, clearCursorState, cursorStore, getCursor, useMapCursor, useMapCursorEffect };
|