@accelint/map-toolkit 1.5.0 → 3.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.
Files changed (224) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +8 -1
  3. package/catalog-info.yaml +9 -6
  4. package/dist/camera/events.js +1 -1
  5. package/dist/camera/index.d.ts +1 -1
  6. package/dist/camera/index.js +1 -1
  7. package/dist/camera/store.d.ts +1 -1
  8. package/dist/camera/store.js +3 -5
  9. package/dist/camera/store.js.map +1 -1
  10. package/dist/camera/types.d.ts +1 -1
  11. package/dist/camera/types.js +1 -1
  12. package/dist/cursor-coordinates/constants.js +1 -1
  13. package/dist/cursor-coordinates/index.d.ts +1 -1
  14. package/dist/cursor-coordinates/index.js +1 -1
  15. package/dist/cursor-coordinates/store.d.ts +1 -1
  16. package/dist/cursor-coordinates/store.js +1 -1
  17. package/dist/cursor-coordinates/types.d.ts +1 -1
  18. package/dist/cursor-coordinates/types.js +1 -1
  19. package/dist/cursor-coordinates/use-cursor-coordinates.d.ts +1 -1
  20. package/dist/cursor-coordinates/use-cursor-coordinates.js +4 -9
  21. package/dist/cursor-coordinates/use-cursor-coordinates.js.map +1 -1
  22. package/dist/deckgl/base-map/constants.js +1 -1
  23. package/dist/deckgl/base-map/controls.d.ts +1 -1
  24. package/dist/deckgl/base-map/controls.js +1 -1
  25. package/dist/deckgl/base-map/events.js +1 -1
  26. package/dist/deckgl/base-map/index.d.ts +3 -3
  27. package/dist/deckgl/base-map/index.js +1 -1
  28. package/dist/deckgl/base-map/provider.d.ts +1 -1
  29. package/dist/deckgl/base-map/provider.js +1 -1
  30. package/dist/deckgl/base-map/types.d.ts +1 -1
  31. package/dist/deckgl/base-map/types.js +1 -1
  32. package/dist/deckgl/extensions/coffin-corner/coffin-corner-extension.d.ts +144 -0
  33. package/dist/deckgl/extensions/coffin-corner/coffin-corner-extension.js +535 -0
  34. package/dist/deckgl/extensions/coffin-corner/coffin-corner-extension.js.map +1 -0
  35. package/dist/deckgl/extensions/coffin-corner/index.d.ts +17 -0
  36. package/dist/deckgl/extensions/coffin-corner/index.js +19 -0
  37. package/dist/deckgl/extensions/coffin-corner/store.d.ts +96 -0
  38. package/dist/deckgl/extensions/coffin-corner/store.js +173 -0
  39. package/dist/deckgl/extensions/coffin-corner/store.js.map +1 -0
  40. package/dist/deckgl/extensions/coffin-corner/types.d.ts +76 -0
  41. package/dist/deckgl/extensions/coffin-corner/types.js +27 -0
  42. package/dist/deckgl/extensions/coffin-corner/types.js.map +1 -0
  43. package/dist/deckgl/extensions/coffin-corner/use-coffin-corner.d.ts +81 -0
  44. package/dist/deckgl/extensions/coffin-corner/use-coffin-corner.js +75 -0
  45. package/dist/deckgl/extensions/coffin-corner/use-coffin-corner.js.map +1 -0
  46. package/dist/deckgl/extensions/index.d.ts +15 -0
  47. package/dist/deckgl/extensions/index.js +16 -0
  48. package/dist/deckgl/index.d.ts +9 -4
  49. package/dist/deckgl/index.js +6 -2
  50. package/dist/deckgl/saved-viewports/index.d.ts +1 -1
  51. package/dist/deckgl/saved-viewports/index.js +1 -1
  52. package/dist/deckgl/saved-viewports/storage.d.ts +1 -1
  53. package/dist/deckgl/saved-viewports/storage.js +5 -10
  54. package/dist/deckgl/saved-viewports/storage.js.map +1 -1
  55. package/dist/deckgl/shapes/display-shape-layer/constants.js +70 -26
  56. package/dist/deckgl/shapes/display-shape-layer/constants.js.map +1 -1
  57. package/dist/deckgl/shapes/display-shape-layer/fiber.d.ts +1 -1
  58. package/dist/deckgl/shapes/display-shape-layer/fiber.js +1 -1
  59. package/dist/deckgl/shapes/display-shape-layer/index.d.ts +93 -38
  60. package/dist/deckgl/shapes/display-shape-layer/index.js +433 -187
  61. package/dist/deckgl/shapes/display-shape-layer/index.js.map +1 -1
  62. package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js +1 -1
  63. package/dist/deckgl/shapes/display-shape-layer/store.js +1 -1
  64. package/dist/deckgl/shapes/display-shape-layer/types.d.ts +116 -19
  65. package/dist/deckgl/shapes/display-shape-layer/types.js +1 -1
  66. package/dist/deckgl/shapes/display-shape-layer/use-select-shape.d.ts +1 -1
  67. package/dist/deckgl/shapes/display-shape-layer/use-select-shape.js +1 -1
  68. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js +66 -36
  69. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js.map +1 -1
  70. package/dist/deckgl/shapes/display-shape-layer/utils/elevation.js +407 -0
  71. package/dist/deckgl/shapes/display-shape-layer/utils/elevation.js.map +1 -0
  72. package/dist/deckgl/shapes/display-shape-layer/utils/icon-config.js +106 -0
  73. package/dist/deckgl/shapes/display-shape-layer/utils/icon-config.js.map +1 -0
  74. package/dist/deckgl/shapes/display-shape-layer/utils/labels.d.ts +1 -1
  75. package/dist/deckgl/shapes/display-shape-layer/utils/labels.js +28 -39
  76. package/dist/deckgl/shapes/display-shape-layer/utils/labels.js.map +1 -1
  77. package/dist/deckgl/shapes/display-shape-layer/utils/radius-label.js +53 -0
  78. package/dist/deckgl/shapes/display-shape-layer/utils/radius-label.js.map +1 -0
  79. package/dist/deckgl/shapes/draw-shape-layer/constants.js +1 -1
  80. package/dist/deckgl/shapes/draw-shape-layer/events.d.ts +1 -1
  81. package/dist/deckgl/shapes/draw-shape-layer/events.js +1 -1
  82. package/dist/deckgl/shapes/draw-shape-layer/fiber.js +1 -1
  83. package/dist/deckgl/shapes/draw-shape-layer/index.d.ts +8 -4
  84. package/dist/deckgl/shapes/draw-shape-layer/index.js +11 -17
  85. package/dist/deckgl/shapes/draw-shape-layer/index.js.map +1 -1
  86. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-circle-mode-with-tooltip.js +6 -5
  87. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-circle-mode-with-tooltip.js.map +1 -1
  88. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-ellipse-mode-with-tooltip.js +4 -3
  89. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-ellipse-mode-with-tooltip.js.map +1 -1
  90. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-line-string-mode-with-tooltip.js +6 -20
  91. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-line-string-mode-with-tooltip.js.map +1 -1
  92. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-polygon-mode-with-tooltip.js +6 -33
  93. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-polygon-mode-with-tooltip.js.map +1 -1
  94. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-rectangle-mode-with-tooltip.js +16 -12
  95. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-rectangle-mode-with-tooltip.js.map +1 -1
  96. package/dist/deckgl/shapes/draw-shape-layer/modes/index.js +2 -32
  97. package/dist/deckgl/shapes/draw-shape-layer/modes/index.js.map +1 -1
  98. package/dist/deckgl/shapes/draw-shape-layer/store.js +1 -1
  99. package/dist/deckgl/shapes/draw-shape-layer/types.d.ts +3 -3
  100. package/dist/deckgl/shapes/draw-shape-layer/types.js +1 -1
  101. package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.d.ts +1 -1
  102. package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.js +1 -1
  103. package/dist/deckgl/shapes/draw-shape-layer/utils/feature-conversion.js +3 -8
  104. package/dist/deckgl/shapes/draw-shape-layer/utils/feature-conversion.js.map +1 -1
  105. package/dist/deckgl/shapes/edit-shape-layer/constants.js +17 -2
  106. package/dist/deckgl/shapes/edit-shape-layer/constants.js.map +1 -1
  107. package/dist/deckgl/shapes/edit-shape-layer/events.d.ts +1 -1
  108. package/dist/deckgl/shapes/edit-shape-layer/events.js +1 -1
  109. package/dist/deckgl/shapes/edit-shape-layer/fiber.d.ts +1 -1
  110. package/dist/deckgl/shapes/edit-shape-layer/fiber.js +1 -1
  111. package/dist/deckgl/shapes/edit-shape-layer/index.d.ts +12 -6
  112. package/dist/deckgl/shapes/edit-shape-layer/index.js +72 -27
  113. package/dist/deckgl/shapes/edit-shape-layer/index.js.map +1 -1
  114. package/dist/deckgl/shapes/edit-shape-layer/modes/base-transform-mode.js +4 -1
  115. package/dist/deckgl/shapes/edit-shape-layer/modes/base-transform-mode.js.map +1 -1
  116. package/dist/deckgl/shapes/edit-shape-layer/modes/bounding-transform-mode.js +4 -3
  117. package/dist/deckgl/shapes/edit-shape-layer/modes/bounding-transform-mode.js.map +1 -1
  118. package/dist/deckgl/shapes/edit-shape-layer/modes/circle-transform-mode.js +5 -3
  119. package/dist/deckgl/shapes/edit-shape-layer/modes/circle-transform-mode.js.map +1 -1
  120. package/dist/deckgl/shapes/edit-shape-layer/modes/index.js +1 -1
  121. package/dist/deckgl/shapes/edit-shape-layer/modes/point-translate-mode.js +1 -1
  122. package/dist/deckgl/shapes/edit-shape-layer/modes/point-translate-mode.js.map +1 -1
  123. package/dist/deckgl/shapes/edit-shape-layer/modes/rotate-mode-with-snap.js +1 -1
  124. package/dist/deckgl/shapes/edit-shape-layer/modes/rotate-mode-with-snap.js.map +1 -1
  125. package/dist/deckgl/shapes/edit-shape-layer/modes/scale-mode-with-free-transform.js +1 -1
  126. package/dist/deckgl/shapes/edit-shape-layer/modes/scale-mode-with-free-transform.js.map +1 -1
  127. package/dist/deckgl/shapes/edit-shape-layer/modes/vertex-transform-mode.js +1 -1
  128. package/dist/deckgl/shapes/edit-shape-layer/modes/vertex-transform-mode.js.map +1 -1
  129. package/dist/deckgl/shapes/edit-shape-layer/store.js +83 -14
  130. package/dist/deckgl/shapes/edit-shape-layer/store.js.map +1 -1
  131. package/dist/deckgl/shapes/edit-shape-layer/types.d.ts +18 -4
  132. package/dist/deckgl/shapes/edit-shape-layer/types.js +1 -1
  133. package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.d.ts +2 -2
  134. package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.js +8 -4
  135. package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.js.map +1 -1
  136. package/dist/deckgl/shapes/index.d.ts +5 -4
  137. package/dist/deckgl/shapes/index.js +3 -2
  138. package/dist/deckgl/shapes/shared/constants.d.ts +4 -3
  139. package/dist/deckgl/shapes/shared/constants.js +51 -11
  140. package/dist/deckgl/shapes/shared/constants.js.map +1 -1
  141. package/dist/deckgl/shapes/shared/events.d.ts +5 -1
  142. package/dist/deckgl/shapes/shared/events.js +1 -1
  143. package/dist/deckgl/shapes/shared/events.js.map +1 -1
  144. package/dist/deckgl/shapes/shared/hooks/use-shift-zoom-disable.js +19 -16
  145. package/dist/deckgl/shapes/shared/hooks/use-shift-zoom-disable.js.map +1 -1
  146. package/dist/deckgl/shapes/shared/types.d.ts +182 -54
  147. package/dist/deckgl/shapes/shared/types.js +155 -2
  148. package/dist/deckgl/shapes/shared/types.js.map +1 -1
  149. package/dist/deckgl/shapes/shared/utils/duplicate-shape.d.ts +56 -0
  150. package/dist/deckgl/shapes/shared/utils/duplicate-shape.js +131 -0
  151. package/dist/deckgl/shapes/shared/utils/duplicate-shape.js.map +1 -0
  152. package/dist/deckgl/shapes/shared/utils/geometry-measurements.js +29 -24
  153. package/dist/deckgl/shapes/shared/utils/geometry-measurements.js.map +1 -1
  154. package/dist/deckgl/shapes/shared/utils/layer-config.js +15 -9
  155. package/dist/deckgl/shapes/shared/utils/layer-config.js.map +1 -1
  156. package/dist/deckgl/shapes/shared/utils/mode-utils.js +50 -20
  157. package/dist/deckgl/shapes/shared/utils/mode-utils.js.map +1 -1
  158. package/dist/deckgl/shapes/shared/utils/pick-filtering.js +22 -15
  159. package/dist/deckgl/shapes/shared/utils/pick-filtering.js.map +1 -1
  160. package/dist/deckgl/shapes/shared/utils/style-utils.d.ts +38 -14
  161. package/dist/deckgl/shapes/shared/utils/style-utils.js +43 -32
  162. package/dist/deckgl/shapes/shared/utils/style-utils.js.map +1 -1
  163. package/dist/deckgl/symbol-layer/fiber.d.ts +4 -2
  164. package/dist/deckgl/symbol-layer/fiber.js +1 -1
  165. package/dist/deckgl/symbol-layer/fiber.js.map +1 -1
  166. package/dist/deckgl/symbol-layer/index.d.ts +1 -1
  167. package/dist/deckgl/symbol-layer/index.js +1 -1
  168. package/dist/deckgl/text-layer/character-sets.js +1 -1
  169. package/dist/deckgl/text-layer/default-settings.d.ts +1 -1
  170. package/dist/deckgl/text-layer/default-settings.js +1 -1
  171. package/dist/deckgl/text-layer/fiber.d.ts +1 -1
  172. package/dist/deckgl/text-layer/fiber.js +1 -1
  173. package/dist/deckgl/text-layer/index.d.ts +1 -1
  174. package/dist/deckgl/text-layer/index.js +1 -1
  175. package/dist/deckgl/text-settings.d.ts +3 -3
  176. package/dist/deckgl/text-settings.js +1 -1
  177. package/dist/map-cursor/events.js +1 -1
  178. package/dist/map-cursor/index.d.ts +1 -1
  179. package/dist/map-cursor/index.js +1 -1
  180. package/dist/map-cursor/store.d.ts +1 -1
  181. package/dist/map-cursor/store.js +1 -1
  182. package/dist/map-cursor/types.d.ts +1 -1
  183. package/dist/map-cursor/types.js +1 -1
  184. package/dist/map-cursor/use-map-cursor.d.ts +1 -1
  185. package/dist/map-cursor/use-map-cursor.js +1 -1
  186. package/dist/map-mode/events.js +1 -1
  187. package/dist/map-mode/index.d.ts +1 -1
  188. package/dist/map-mode/index.js +1 -1
  189. package/dist/map-mode/store.d.ts +1 -1
  190. package/dist/map-mode/store.js +3 -8
  191. package/dist/map-mode/store.js.map +1 -1
  192. package/dist/map-mode/types.d.ts +1 -1
  193. package/dist/map-mode/types.js +1 -1
  194. package/dist/map-mode/use-map-mode.d.ts +1 -1
  195. package/dist/map-mode/use-map-mode.js +1 -1
  196. package/dist/maplibre/hooks/use-maplibre.d.ts +1 -1
  197. package/dist/maplibre/hooks/use-maplibre.js +1 -1
  198. package/dist/maplibre/index.d.ts +1 -1
  199. package/dist/maplibre/index.js +1 -1
  200. package/dist/shared/cleanup.d.ts +1 -1
  201. package/dist/shared/cleanup.js +1 -1
  202. package/dist/shared/constants.js +1 -1
  203. package/dist/shared/create-map-store.d.ts +1 -1
  204. package/dist/shared/create-map-store.js +1 -1
  205. package/dist/shared/logger.js +31 -0
  206. package/dist/shared/logger.js.map +1 -0
  207. package/dist/shared/units.d.ts +15 -56
  208. package/dist/shared/units.js +2 -53
  209. package/dist/shared/units.js.map +1 -1
  210. package/dist/viewport/index.d.ts +3 -4
  211. package/dist/viewport/index.js +2 -3
  212. package/dist/viewport/store.d.ts +1 -1
  213. package/dist/viewport/store.js +1 -1
  214. package/dist/viewport/types.d.ts +9 -5
  215. package/dist/viewport/types.js +1 -1
  216. package/dist/viewport/utils.d.ts +4 -4
  217. package/dist/viewport/utils.js +17 -9
  218. package/dist/viewport/utils.js.map +1 -1
  219. package/dist/viewport/viewport-size.d.ts +7 -6
  220. package/dist/viewport/viewport-size.js +3 -3
  221. package/dist/viewport/viewport-size.js.map +1 -1
  222. package/package.json +29 -20
  223. package/dist/hotkey-manager/dist/react/use-hotkey.js +0 -39
  224. package/dist/hotkey-manager/dist/react/use-hotkey.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -27,8 +27,8 @@ import { useEmit } from "@accelint/bus/react";
27
27
  * - Shift for rotation snap during edit
28
28
  * - Shift for square constraint during rectangle drawing
29
29
  *
30
- * @param mapId - The map instance ID
31
- * @param isActive - Whether the hook should be active (e.g., when editing/drawing)
30
+ * @param mapId - The map instance ID.
31
+ * @param isActive - Whether the hook should be active (e.g., when editing/drawing).
32
32
  *
33
33
  * @example
34
34
  * ```typescript
@@ -47,31 +47,34 @@ function useShiftZoomDisable(mapId, isActive) {
47
47
  const emitEnableZoom = useEmit(MapEvents.enableZoom);
48
48
  const isZoomDisabledRef = useRef(false);
49
49
  useEffect(() => {
50
- if (!isActive) return;
51
- const disableZoom = () => {
50
+ if (!isActive) {
51
+ isZoomDisabledRef.current = false;
52
+ return;
53
+ }
54
+ function disableZoom() {
52
55
  if (!isZoomDisabledRef.current) {
53
56
  isZoomDisabledRef.current = true;
54
57
  emitDisableZoom({ id: mapId });
55
58
  }
56
- };
57
- const enableZoom = () => {
59
+ }
60
+ function enableZoom() {
58
61
  if (isZoomDisabledRef.current) {
59
62
  isZoomDisabledRef.current = false;
60
63
  emitEnableZoom({ id: mapId });
61
64
  }
62
- };
63
- const handleKeyDown = (event) => {
65
+ }
66
+ function handleKeyDown(event) {
64
67
  if (event.key === "Shift") disableZoom();
65
- };
66
- const handleKeyUp = (event) => {
68
+ }
69
+ function handleKeyUp(event) {
67
70
  if (event.key === "Shift") enableZoom();
68
- };
69
- const handleMouseDown = (event) => {
71
+ }
72
+ function handleMouseDown(event) {
70
73
  if (event.shiftKey) disableZoom();
71
- };
72
- const handleBlur = () => {
74
+ }
75
+ function handleBlur() {
73
76
  enableZoom();
74
- };
77
+ }
75
78
  document.addEventListener("keydown", handleKeyDown);
76
79
  document.addEventListener("keyup", handleKeyUp);
77
80
  document.addEventListener("mousedown", handleMouseDown, { capture: true });
@@ -1 +1 @@
1
- {"version":3,"file":"use-shift-zoom-disable.js","names":[],"sources":["../../../../../src/deckgl/shapes/shared/hooks/use-shift-zoom-disable.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { useEmit } from '@accelint/bus/react';\nimport { useEffect, useRef } from 'react';\nimport { MapEvents } from '@/deckgl/base-map/events';\nimport type { UniqueId } from '@accelint/core';\nimport type {\n MapDisableZoomEvent,\n MapEnableZoomEvent,\n} from '@/deckgl/base-map/types';\n\n/**\n * Hook to disable map zoom while Shift key is held during shape operations.\n *\n * This prevents MapLibre's boxZoom (Shift+drag) from interfering with\n * Shift modifier constraints like:\n * - Shift for uniform scaling during edit\n * - Shift for rotation snap during edit\n * - Shift for square constraint during rectangle drawing\n *\n * @param mapId - The map instance ID\n * @param isActive - Whether the hook should be active (e.g., when editing/drawing)\n *\n * @example\n * ```typescript\n * function EditShapeLayer({ mapId }) {\n * const isEditing = editStore.use(mapId).state?.editingShape != null;\n *\n * // Disable zoom when editing to allow Shift modifiers to work\n * useShiftZoomDisable(mapId, isEditing);\n *\n * // ... rest of component\n * }\n * ```\n */\nexport function useShiftZoomDisable(mapId: UniqueId, isActive: boolean): void {\n const emitDisableZoom = useEmit<MapDisableZoomEvent>(MapEvents.disableZoom);\n const emitEnableZoom = useEmit<MapEnableZoomEvent>(MapEvents.enableZoom);\n const isZoomDisabledRef = useRef(false);\n\n useEffect(() => {\n if (!isActive) {\n return;\n }\n\n const disableZoom = () => {\n if (!isZoomDisabledRef.current) {\n isZoomDisabledRef.current = true;\n emitDisableZoom({ id: mapId });\n }\n };\n\n const enableZoom = () => {\n if (isZoomDisabledRef.current) {\n isZoomDisabledRef.current = false;\n emitEnableZoom({ id: mapId });\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Shift') {\n disableZoom();\n }\n };\n\n const handleKeyUp = (event: KeyboardEvent) => {\n if (event.key === 'Shift') {\n enableZoom();\n }\n };\n\n // Also catch Shift state on mousedown to handle edge cases where\n // keydown might have been missed (e.g., focus issues)\n const handleMouseDown = (event: MouseEvent) => {\n if (event.shiftKey) {\n disableZoom();\n }\n };\n\n // Re-enable zoom if the window loses focus while Shift is held\n const handleBlur = () => {\n enableZoom();\n };\n\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('keyup', handleKeyUp);\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n window.addEventListener('blur', handleBlur);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n document.removeEventListener('keyup', handleKeyUp);\n document.removeEventListener('mousedown', handleMouseDown, {\n capture: true,\n });\n window.removeEventListener('blur', handleBlur);\n\n // Ensure zoom is re-enabled when unmounting\n enableZoom();\n };\n }, [isActive, mapId, emitDisableZoom, emitEnableZoom]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAgB,oBAAoB,OAAiB,UAAyB;CAC5E,MAAM,kBAAkB,QAA6B,UAAU,YAAY;CAC3E,MAAM,iBAAiB,QAA4B,UAAU,WAAW;CACxE,MAAM,oBAAoB,OAAO,MAAM;AAEvC,iBAAgB;AACd,MAAI,CAAC,SACH;EAGF,MAAM,oBAAoB;AACxB,OAAI,CAAC,kBAAkB,SAAS;AAC9B,sBAAkB,UAAU;AAC5B,oBAAgB,EAAE,IAAI,OAAO,CAAC;;;EAIlC,MAAM,mBAAmB;AACvB,OAAI,kBAAkB,SAAS;AAC7B,sBAAkB,UAAU;AAC5B,mBAAe,EAAE,IAAI,OAAO,CAAC;;;EAIjC,MAAM,iBAAiB,UAAyB;AAC9C,OAAI,MAAM,QAAQ,QAChB,cAAa;;EAIjB,MAAM,eAAe,UAAyB;AAC5C,OAAI,MAAM,QAAQ,QAChB,aAAY;;EAMhB,MAAM,mBAAmB,UAAsB;AAC7C,OAAI,MAAM,SACR,cAAa;;EAKjB,MAAM,mBAAmB;AACvB,eAAY;;AAGd,WAAS,iBAAiB,WAAW,cAAc;AACnD,WAAS,iBAAiB,SAAS,YAAY;AAC/C,WAAS,iBAAiB,aAAa,iBAAiB,EAAE,SAAS,MAAM,CAAC;AAC1E,SAAO,iBAAiB,QAAQ,WAAW;AAE3C,eAAa;AACX,YAAS,oBAAoB,WAAW,cAAc;AACtD,YAAS,oBAAoB,SAAS,YAAY;AAClD,YAAS,oBAAoB,aAAa,iBAAiB,EACzD,SAAS,MACV,CAAC;AACF,UAAO,oBAAoB,QAAQ,WAAW;AAG9C,eAAY;;IAEb;EAAC;EAAU;EAAO;EAAiB;EAAe,CAAC"}
1
+ {"version":3,"file":"use-shift-zoom-disable.js","names":[],"sources":["../../../../../src/deckgl/shapes/shared/hooks/use-shift-zoom-disable.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { useEmit } from '@accelint/bus/react';\nimport { useEffect, useRef } from 'react';\nimport { MapEvents } from '@/deckgl/base-map/events';\nimport type { UniqueId } from '@accelint/core';\nimport type {\n MapDisableZoomEvent,\n MapEnableZoomEvent,\n} from '@/deckgl/base-map/types';\n\n/**\n * Hook to disable map zoom while Shift key is held during shape operations.\n *\n * This prevents MapLibre's boxZoom (Shift+drag) from interfering with\n * Shift modifier constraints like:\n * - Shift for uniform scaling during edit\n * - Shift for rotation snap during edit\n * - Shift for square constraint during rectangle drawing\n *\n * @param mapId - The map instance ID.\n * @param isActive - Whether the hook should be active (e.g., when editing/drawing).\n *\n * @example\n * ```typescript\n * function EditShapeLayer({ mapId }) {\n * const isEditing = editStore.use(mapId).state?.editingShape != null;\n *\n * // Disable zoom when editing to allow Shift modifiers to work\n * useShiftZoomDisable(mapId, isEditing);\n *\n * // ... rest of component\n * }\n * ```\n */\nexport function useShiftZoomDisable(mapId: UniqueId, isActive: boolean): void {\n const emitDisableZoom = useEmit<MapDisableZoomEvent>(MapEvents.disableZoom);\n const emitEnableZoom = useEmit<MapEnableZoomEvent>(MapEvents.enableZoom);\n const isZoomDisabledRef = useRef(false);\n\n useEffect(() => {\n if (!isActive) {\n isZoomDisabledRef.current = false;\n\n return;\n }\n\n function disableZoom(): void {\n if (!isZoomDisabledRef.current) {\n isZoomDisabledRef.current = true;\n emitDisableZoom({ id: mapId });\n }\n }\n\n function enableZoom(): void {\n if (isZoomDisabledRef.current) {\n isZoomDisabledRef.current = false;\n emitEnableZoom({ id: mapId });\n }\n }\n\n function handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Shift') {\n disableZoom();\n }\n }\n\n function handleKeyUp(event: KeyboardEvent): void {\n if (event.key === 'Shift') {\n enableZoom();\n }\n }\n\n // Also catch Shift state on mousedown to handle edge cases where\n // keydown might have been missed (e.g., focus issues)\n function handleMouseDown(event: MouseEvent): void {\n if (event.shiftKey) {\n disableZoom();\n }\n }\n\n // Re-enable zoom if the window loses focus while Shift is held\n function handleBlur(): void {\n enableZoom();\n }\n\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('keyup', handleKeyUp);\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n window.addEventListener('blur', handleBlur);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n document.removeEventListener('keyup', handleKeyUp);\n document.removeEventListener('mousedown', handleMouseDown, {\n capture: true,\n });\n window.removeEventListener('blur', handleBlur);\n\n // Ensure zoom is re-enabled when unmounting\n enableZoom();\n };\n }, [isActive, mapId, emitDisableZoom, emitEnableZoom]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAgB,oBAAoB,OAAiB,UAAyB;CAC5E,MAAM,kBAAkB,QAA6B,UAAU,YAAY;CAC3E,MAAM,iBAAiB,QAA4B,UAAU,WAAW;CACxE,MAAM,oBAAoB,OAAO,MAAM;AAEvC,iBAAgB;AACd,MAAI,CAAC,UAAU;AACb,qBAAkB,UAAU;AAE5B;;EAGF,SAAS,cAAoB;AAC3B,OAAI,CAAC,kBAAkB,SAAS;AAC9B,sBAAkB,UAAU;AAC5B,oBAAgB,EAAE,IAAI,OAAO,CAAC;;;EAIlC,SAAS,aAAmB;AAC1B,OAAI,kBAAkB,SAAS;AAC7B,sBAAkB,UAAU;AAC5B,mBAAe,EAAE,IAAI,OAAO,CAAC;;;EAIjC,SAAS,cAAc,OAA4B;AACjD,OAAI,MAAM,QAAQ,QAChB,cAAa;;EAIjB,SAAS,YAAY,OAA4B;AAC/C,OAAI,MAAM,QAAQ,QAChB,aAAY;;EAMhB,SAAS,gBAAgB,OAAyB;AAChD,OAAI,MAAM,SACR,cAAa;;EAKjB,SAAS,aAAmB;AAC1B,eAAY;;AAGd,WAAS,iBAAiB,WAAW,cAAc;AACnD,WAAS,iBAAiB,SAAS,YAAY;AAC/C,WAAS,iBAAiB,aAAa,iBAAiB,EAAE,SAAS,MAAM,CAAC;AAC1E,SAAO,iBAAiB,QAAQ,WAAW;AAE3C,eAAa;AACX,YAAS,oBAAoB,WAAW,cAAc;AACtD,YAAS,oBAAoB,SAAS,YAAY;AAClD,YAAS,oBAAoB,aAAa,iBAAiB,EACzD,SAAS,MACV,CAAC;AACF,UAAO,oBAAoB,QAAQ,WAAW;AAG9C,eAAY;;IAEb;EAAC;EAAU;EAAO;EAAiB;EAAe,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -10,10 +10,10 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { DistanceUnit } from "../../../shared/units.js";
14
13
  import { UniqueId } from "@accelint/core";
15
14
  import { Color } from "@deck.gl/core";
16
- import { Feature, LineString, Point, Polygon } from "geojson";
15
+ import { DistanceUnit } from "@accelint/constants/units";
16
+ import { Feature, Geometry, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon } from "geojson";
17
17
 
18
18
  //#region src/deckgl/shapes/shared/types.d.ts
19
19
  /**
@@ -27,6 +27,7 @@ declare const ShapeFeatureType: {
27
27
  readonly LineString: "LineString";
28
28
  readonly Point: "Point";
29
29
  };
30
+ /** Union of all supported shape feature type string literals. */
30
31
  type ShapeFeatureType = (typeof ShapeFeatureType)[keyof typeof ShapeFeatureType];
31
32
  /**
32
33
  * Shape ID type - uses UniqueId from core
@@ -45,7 +46,7 @@ type LinePattern = 'solid' | 'dashed' | 'dotted';
45
46
  /**
46
47
  * Style properties for rendering shapes
47
48
  */
48
- interface StyleProperties {
49
+ type StyleProperties = {
49
50
  /** Fill color as RGBA array [r, g, b, a] where each value is 0-255 */
50
51
  fillColor: Color;
51
52
  /** Border/outline color as RGBA array [r, g, b, a] where each value is 0-255 */
@@ -79,14 +80,21 @@ interface StyleProperties {
79
80
  labelHorizontalAnchor?: 'left' | 'center' | 'right';
80
81
  /** Optional custom label coordinate anchor (position along geometry) */
81
82
  labelCoordinateAnchor?: 'center' | 'start' | 'middle' | 'end' | 'top' | 'right' | 'bottom' | 'left';
82
- }
83
+ };
84
+ /**
85
+ * Geographic position as [longitude, latitude] with optional elevation.
86
+ *
87
+ * Similar to GeoJSON's `Position` (`number[]`) but with stricter typing
88
+ * that guarantees at least two elements.
89
+ */
90
+ type GeoPosition = [number, number] | [number, number, number];
83
91
  /**
84
92
  * Circle-specific properties for precise rendering
85
93
  * Stored alongside the polygon approximation
86
94
  */
87
- interface CircleProperties {
88
- /** Center point as [longitude, latitude] */
89
- center: [number, number];
95
+ type CircleProperties = {
96
+ /** Center point as [longitude, latitude] or [longitude, latitude, elevation] */
97
+ center: GeoPosition;
90
98
  /** Radius with value and units */
91
99
  radius: {
92
100
  /** Radius value */
@@ -94,14 +102,14 @@ interface CircleProperties {
94
102
  /** Units for the radius measurement */
95
103
  units: DistanceUnit;
96
104
  };
97
- }
105
+ };
98
106
  /**
99
107
  * Ellipse-specific properties for precise rendering
100
108
  * Stored alongside the polygon approximation
101
109
  */
102
- interface EllipseProperties {
103
- /** Center point as [longitude, latitude] */
104
- center: [number, number];
110
+ type EllipseProperties = {
111
+ /** Center point as [longitude, latitude] or [longitude, latitude, elevation] */
112
+ center: GeoPosition;
105
113
  /** X semi-axis (horizontal radius) with value and units */
106
114
  xSemiAxis: {
107
115
  /** X semi-axis value */
@@ -118,11 +126,7 @@ interface EllipseProperties {
118
126
  };
119
127
  /** Rotation angle in degrees */
120
128
  angle: number;
121
- }
122
- /**
123
- * Custom geometry types supported
124
- */
125
- type CustomGeometry = Point | LineString | Polygon;
129
+ };
126
130
  /**
127
131
  * Properties for styled features.
128
132
  *
@@ -130,7 +134,7 @@ type CustomGeometry = Point | LineString | Polygon;
130
134
  * but are guaranteed to be present for their respective shape types.
131
135
  * Use the type guards (isCircleShape, isEllipseShape) for type narrowing.
132
136
  */
133
- interface StyledFeatureProperties {
137
+ type StyledFeatureProperties = {
134
138
  /** Style properties for rendering */
135
139
  styleProperties: StyleProperties;
136
140
  /** Shape ID for correlation */
@@ -139,33 +143,37 @@ interface StyledFeatureProperties {
139
143
  circleProperties?: CircleProperties;
140
144
  /** Ellipse properties (present for Ellipse shapes) */
141
145
  ellipseProperties?: EllipseProperties;
142
- }
146
+ /** Minimum elevation in meters (optional) */
147
+ minElevation?: number;
148
+ /** Maximum elevation in meters (optional) */
149
+ maxElevation?: number;
150
+ };
143
151
  /**
144
152
  * Feature properties for Circle shapes (circleProperties required).
145
153
  * Used by CircleShape for better type narrowing.
146
154
  */
147
- interface CircleFeatureProperties extends StyledFeatureProperties {
155
+ type CircleFeatureProperties = StyledFeatureProperties & {
148
156
  /** Circle properties (required for Circle shapes) */
149
157
  circleProperties: CircleProperties;
150
- }
158
+ };
151
159
  /**
152
160
  * Feature properties for Ellipse shapes (ellipseProperties required).
153
161
  * Used by EllipseShape for better type narrowing.
154
162
  */
155
- interface EllipseFeatureProperties extends StyledFeatureProperties {
163
+ type EllipseFeatureProperties = StyledFeatureProperties & {
156
164
  /** Ellipse properties (required for Ellipse shapes) */
157
165
  ellipseProperties: EllipseProperties;
158
- }
166
+ };
159
167
  /**
160
168
  * GeoJSON Feature with style properties
161
169
  */
162
- interface StyledFeature extends Feature {
170
+ type StyledFeature = Feature & {
163
171
  properties: StyledFeatureProperties;
164
- }
172
+ };
165
173
  /**
166
- * Base shape properties shared by all shapes
174
+ * Base shape properties shared by all shapes.
167
175
  */
168
- interface BaseShape {
176
+ type BaseShape = {
169
177
  /** Unique identifier */
170
178
  id: ShapeId;
171
179
  /** Full shape name used internally and in UI */
@@ -185,53 +193,53 @@ interface BaseShape {
185
193
  * Locked shapes cannot be modified due to data restrictions or user preference
186
194
  */
187
195
  locked?: boolean;
188
- }
196
+ };
189
197
  /**
190
198
  * Circle shape with required circleProperties
191
199
  */
192
- interface CircleShape extends BaseShape {
200
+ type CircleShape = BaseShape & {
193
201
  shape: typeof ShapeFeatureType.Circle;
194
202
  feature: StyledFeature & {
195
203
  properties: CircleFeatureProperties;
196
204
  };
197
- }
205
+ };
198
206
  /**
199
207
  * Ellipse shape with required ellipseProperties
200
208
  */
201
- interface EllipseShape extends BaseShape {
209
+ type EllipseShape = BaseShape & {
202
210
  shape: typeof ShapeFeatureType.Ellipse;
203
211
  feature: StyledFeature & {
204
212
  properties: EllipseFeatureProperties;
205
213
  };
206
- }
214
+ };
207
215
  /**
208
216
  * Polygon shape
209
217
  */
210
- interface PolygonShape extends BaseShape {
218
+ type PolygonShape = BaseShape & {
211
219
  shape: typeof ShapeFeatureType.Polygon;
212
220
  feature: StyledFeature;
213
- }
221
+ };
214
222
  /**
215
223
  * Rectangle shape
216
224
  */
217
- interface RectangleShape extends BaseShape {
225
+ type RectangleShape = BaseShape & {
218
226
  shape: typeof ShapeFeatureType.Rectangle;
219
227
  feature: StyledFeature;
220
- }
228
+ };
221
229
  /**
222
230
  * LineString shape
223
231
  */
224
- interface LineStringShape extends BaseShape {
232
+ type LineStringShape = BaseShape & {
225
233
  shape: typeof ShapeFeatureType.LineString;
226
234
  feature: StyledFeature;
227
- }
235
+ };
228
236
  /**
229
237
  * Point shape
230
238
  */
231
- interface PointShape extends BaseShape {
239
+ type PointShape = BaseShape & {
232
240
  shape: typeof ShapeFeatureType.Point;
233
241
  feature: StyledFeature;
234
- }
242
+ };
235
243
  /**
236
244
  * Discriminated union of all shape types.
237
245
  *
@@ -247,10 +255,6 @@ interface PointShape extends BaseShape {
247
255
  * ```
248
256
  */
249
257
  type Shape = CircleShape | EllipseShape | PolygonShape | RectangleShape | LineStringShape | PointShape;
250
- /**
251
- * Alias for ShapeFeatureType values
252
- */
253
- type ShapeFeatureTypeValues = ShapeFeatureType;
254
258
  /**
255
259
  * Alias for StyledFeature (shape feature)
256
260
  */
@@ -263,18 +267,12 @@ type ShapeFeatureProperties = StyledFeature['properties'];
263
267
  * Circle radius type
264
268
  */
265
269
  type CircleRadius = CircleProperties['radius'];
266
- /**
267
- * Coordinate as [longitude, latitude]
268
- */
269
- type Coordinate = [number, number];
270
- /**
271
- * Function type for subscription (useSyncExternalStore pattern).
272
- * Used by draw-shape-layer and edit-shape-layer stores.
273
- */
274
- type Subscription = (onStoreChange: () => void) => () => void;
275
270
  /**
276
271
  * Type guard for Circle shapes.
277
272
  *
273
+ * @param shape - The shape to test.
274
+ * @returns True if shape is a CircleShape.
275
+ *
278
276
  * @example
279
277
  * ```typescript
280
278
  * if (isCircleShape(shape)) {
@@ -287,6 +285,9 @@ declare function isCircleShape(shape: Shape): shape is CircleShape;
287
285
  /**
288
286
  * Type guard for Ellipse shapes.
289
287
  *
288
+ * @param shape - The shape to test.
289
+ * @returns True if shape is an EllipseShape.
290
+ *
290
291
  * @example
291
292
  * ```typescript
292
293
  * if (isEllipseShape(shape)) {
@@ -298,20 +299,147 @@ declare function isCircleShape(shape: Shape): shape is CircleShape;
298
299
  declare function isEllipseShape(shape: Shape): shape is EllipseShape;
299
300
  /**
300
301
  * Type guard for Polygon shapes.
302
+ *
303
+ * @param shape - The shape to test
304
+ * @returns True if shape is a PolygonShape
305
+ * @example
306
+ * ```typescript
307
+ * if (isPolygonShape(shape)) {
308
+ * // TypeScript narrows shape to PolygonShape
309
+ * }
310
+ * ```
301
311
  */
302
312
  declare function isPolygonShape(shape: Shape): shape is PolygonShape;
303
313
  /**
304
314
  * Type guard for Rectangle shapes.
315
+ *
316
+ * @param shape - The shape to test
317
+ * @returns True if shape is a RectangleShape
318
+ * @example
319
+ * ```typescript
320
+ * if (isRectangleShape(shape)) {
321
+ * // TypeScript narrows shape to RectangleShape
322
+ * }
323
+ * ```
305
324
  */
306
325
  declare function isRectangleShape(shape: Shape): shape is RectangleShape;
307
326
  /**
308
327
  * Type guard for LineString shapes.
328
+ *
329
+ * @param shape - The shape to test
330
+ * @returns True if shape is a LineStringShape
331
+ * @example
332
+ * ```typescript
333
+ * if (isLineStringShape(shape)) {
334
+ * // TypeScript narrows shape to LineStringShape
335
+ * }
336
+ * ```
309
337
  */
310
338
  declare function isLineStringShape(shape: Shape): shape is LineStringShape;
311
339
  /**
312
340
  * Type guard for Point shapes.
341
+ *
342
+ * @param shape - The shape to test
343
+ * @returns True if shape is a PointShape
344
+ * @example
345
+ * ```typescript
346
+ * if (isPointShape(shape)) {
347
+ * // TypeScript narrows shape to PointShape
348
+ * }
349
+ * ```
313
350
  */
314
351
  declare function isPointShape(shape: Shape): shape is PointShape;
352
+ /**
353
+ * Narrow a GeoJSON geometry to the Point type.
354
+ *
355
+ * @param geometry - The GeoJSON geometry to test.
356
+ * @returns True if the geometry is a Point.
357
+ */
358
+ declare function isPointType(geometry: Geometry): geometry is Point;
359
+ /**
360
+ * Narrow a GeoJSON geometry to the MultiPoint type.
361
+ *
362
+ * @param geometry - The GeoJSON geometry to test.
363
+ * @returns True if the geometry is a MultiPoint.
364
+ */
365
+ declare function isMultiPointType(geometry: Geometry): geometry is MultiPoint;
366
+ /**
367
+ * Narrow a GeoJSON geometry to the LineString type.
368
+ *
369
+ * @param geometry - The GeoJSON geometry to test.
370
+ * @returns True if the geometry is a LineString.
371
+ */
372
+ declare function isLineStringType(geometry: Geometry): geometry is LineString;
373
+ /**
374
+ * Narrow a GeoJSON geometry to the MultiLineString type.
375
+ *
376
+ * @param geometry - The GeoJSON geometry to test.
377
+ * @returns True if the geometry is a MultiLineString.
378
+ */
379
+ declare function isMultiLineStringType(geometry: Geometry): geometry is MultiLineString;
380
+ /**
381
+ * Narrow a GeoJSON geometry to the Polygon type.
382
+ *
383
+ * @param geometry - The GeoJSON geometry to test.
384
+ * @returns True if the geometry is a Polygon.
385
+ */
386
+ declare function isPolygonType(geometry: Geometry): geometry is Polygon;
387
+ /**
388
+ * Narrow a GeoJSON geometry to the MultiPolygon type.
389
+ *
390
+ * @param geometry - The GeoJSON geometry to test.
391
+ * @returns True if the geometry is a MultiPolygon.
392
+ */
393
+ declare function isMultiPolygonType(geometry: Geometry): geometry is MultiPolygon;
394
+ /**
395
+ * Narrow a GeoJSON geometry to the GeometryCollection type.
396
+ *
397
+ * @param geometry - The GeoJSON geometry to test.
398
+ * @returns True if the geometry is a GeometryCollection.
399
+ */
400
+ declare function isGeometryCollectionType(geometry: Geometry): geometry is GeometryCollection;
401
+ /**
402
+ * Narrow a GeoJSON geometry to polygon-like types (Polygon or MultiPolygon).
403
+ *
404
+ * @param geometry - The GeoJSON geometry to test.
405
+ * @returns True if the geometry is a Polygon or MultiPolygon.
406
+ *
407
+ * @example
408
+ * ```typescript
409
+ * if (isPolygonGeometry(feature.geometry)) {
410
+ * // geometry narrowed to Polygon | MultiPolygon
411
+ * }
412
+ * ```
413
+ */
414
+ declare function isPolygonGeometry(geometry: Geometry): geometry is Polygon | MultiPolygon;
415
+ /**
416
+ * Narrow a GeoJSON geometry to line-like types (LineString or MultiLineString).
417
+ *
418
+ * @param geometry - The GeoJSON geometry to test.
419
+ * @returns True if the geometry is a LineString or MultiLineString.
420
+ *
421
+ * @example
422
+ * ```typescript
423
+ * if (isLineGeometry(feature.geometry)) {
424
+ * // geometry narrowed to LineString | MultiLineString
425
+ * }
426
+ * ```
427
+ */
428
+ declare function isLineGeometry(geometry: Geometry): geometry is LineString | MultiLineString;
429
+ /**
430
+ * Narrow a GeoJSON geometry to point-like types (Point or MultiPoint).
431
+ *
432
+ * @param geometry - The GeoJSON geometry to test.
433
+ * @returns True if the geometry is a Point or MultiPoint.
434
+ *
435
+ * @example
436
+ * ```typescript
437
+ * if (isPointGeometry(feature.geometry)) {
438
+ * // geometry narrowed to Point | MultiPoint
439
+ * }
440
+ * ```
441
+ */
442
+ declare function isPointGeometry(geometry: Geometry): geometry is Point | MultiPoint;
315
443
  //#endregion
316
- export { CircleFeatureProperties, CircleProperties, CircleRadius, CircleShape, Coordinate, CustomGeometry, EllipseFeatureProperties, EllipseProperties, EllipseShape, LinePattern, LineStringShape, LineWidth, PointShape, PolygonShape, RectangleShape, Shape, ShapeFeature, ShapeFeatureProperties, ShapeFeatureType, ShapeFeatureTypeValues, ShapeId, StyleProperties, StyledFeature, StyledFeatureProperties, Subscription, isCircleShape, isEllipseShape, isLineStringShape, isPointShape, isPolygonShape, isRectangleShape };
444
+ export { CircleFeatureProperties, CircleProperties, CircleRadius, CircleShape, EllipseFeatureProperties, EllipseProperties, EllipseShape, GeoPosition, LinePattern, LineStringShape, LineWidth, PointShape, PolygonShape, RectangleShape, Shape, ShapeFeature, ShapeFeatureProperties, ShapeFeatureType, ShapeId, StyleProperties, StyledFeature, StyledFeatureProperties, isCircleShape, isEllipseShape, isGeometryCollectionType, isLineGeometry, isLineStringShape, isLineStringType, isMultiLineStringType, isMultiPointType, isMultiPolygonType, isPointGeometry, isPointShape, isPointType, isPolygonGeometry, isPolygonShape, isPolygonType, isRectangleShape };
317
445
  //# sourceMappingURL=types.d.ts.map