@accelint/map-toolkit 1.5.0 → 2.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 (197) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/catalog-info.yaml +4 -4
  3. package/dist/camera/events.js +1 -1
  4. package/dist/camera/index.d.ts +1 -1
  5. package/dist/camera/index.js +1 -1
  6. package/dist/camera/store.d.ts +1 -1
  7. package/dist/camera/store.js +3 -5
  8. package/dist/camera/store.js.map +1 -1
  9. package/dist/camera/types.d.ts +1 -1
  10. package/dist/camera/types.js +1 -1
  11. package/dist/cursor-coordinates/constants.js +1 -1
  12. package/dist/cursor-coordinates/index.d.ts +1 -1
  13. package/dist/cursor-coordinates/index.js +1 -1
  14. package/dist/cursor-coordinates/store.d.ts +1 -1
  15. package/dist/cursor-coordinates/store.js +1 -1
  16. package/dist/cursor-coordinates/types.d.ts +1 -1
  17. package/dist/cursor-coordinates/types.js +1 -1
  18. package/dist/cursor-coordinates/use-cursor-coordinates.d.ts +1 -1
  19. package/dist/cursor-coordinates/use-cursor-coordinates.js +4 -9
  20. package/dist/cursor-coordinates/use-cursor-coordinates.js.map +1 -1
  21. package/dist/deckgl/base-map/constants.js +1 -1
  22. package/dist/deckgl/base-map/controls.d.ts +1 -1
  23. package/dist/deckgl/base-map/controls.js +1 -1
  24. package/dist/deckgl/base-map/events.js +1 -1
  25. package/dist/deckgl/base-map/index.d.ts +1 -1
  26. package/dist/deckgl/base-map/index.js +1 -1
  27. package/dist/deckgl/base-map/provider.d.ts +3 -3
  28. package/dist/deckgl/base-map/provider.js +1 -1
  29. package/dist/deckgl/base-map/types.d.ts +1 -1
  30. package/dist/deckgl/base-map/types.js +1 -1
  31. package/dist/deckgl/index.d.ts +4 -4
  32. package/dist/deckgl/index.js +1 -1
  33. package/dist/deckgl/saved-viewports/index.d.ts +1 -1
  34. package/dist/deckgl/saved-viewports/index.js +1 -1
  35. package/dist/deckgl/saved-viewports/storage.d.ts +1 -1
  36. package/dist/deckgl/saved-viewports/storage.js +5 -10
  37. package/dist/deckgl/saved-viewports/storage.js.map +1 -1
  38. package/dist/deckgl/shapes/display-shape-layer/constants.js +66 -13
  39. package/dist/deckgl/shapes/display-shape-layer/constants.js.map +1 -1
  40. package/dist/deckgl/shapes/display-shape-layer/fiber.d.ts +1 -1
  41. package/dist/deckgl/shapes/display-shape-layer/fiber.js +1 -1
  42. package/dist/deckgl/shapes/display-shape-layer/index.d.ts +74 -35
  43. package/dist/deckgl/shapes/display-shape-layer/index.js +381 -154
  44. package/dist/deckgl/shapes/display-shape-layer/index.js.map +1 -1
  45. package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js +1 -1
  46. package/dist/deckgl/shapes/display-shape-layer/store.js +1 -1
  47. package/dist/deckgl/shapes/display-shape-layer/types.d.ts +108 -19
  48. package/dist/deckgl/shapes/display-shape-layer/types.js +1 -1
  49. package/dist/deckgl/shapes/display-shape-layer/use-select-shape.d.ts +1 -1
  50. package/dist/deckgl/shapes/display-shape-layer/use-select-shape.js +1 -1
  51. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js +66 -36
  52. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js.map +1 -1
  53. package/dist/deckgl/shapes/display-shape-layer/utils/elevation.js +407 -0
  54. package/dist/deckgl/shapes/display-shape-layer/utils/elevation.js.map +1 -0
  55. package/dist/deckgl/shapes/display-shape-layer/utils/icon-config.js +151 -0
  56. package/dist/deckgl/shapes/display-shape-layer/utils/icon-config.js.map +1 -0
  57. package/dist/deckgl/shapes/display-shape-layer/utils/interaction.js +50 -0
  58. package/dist/deckgl/shapes/display-shape-layer/utils/interaction.js.map +1 -0
  59. package/dist/deckgl/shapes/display-shape-layer/utils/labels.d.ts +1 -1
  60. package/dist/deckgl/shapes/display-shape-layer/utils/labels.js +28 -39
  61. package/dist/deckgl/shapes/display-shape-layer/utils/labels.js.map +1 -1
  62. package/dist/deckgl/shapes/draw-shape-layer/constants.js +1 -1
  63. package/dist/deckgl/shapes/draw-shape-layer/events.d.ts +1 -1
  64. package/dist/deckgl/shapes/draw-shape-layer/events.js +1 -1
  65. package/dist/deckgl/shapes/draw-shape-layer/fiber.js +1 -1
  66. package/dist/deckgl/shapes/draw-shape-layer/index.d.ts +1 -1
  67. package/dist/deckgl/shapes/draw-shape-layer/index.js +4 -14
  68. package/dist/deckgl/shapes/draw-shape-layer/index.js.map +1 -1
  69. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-circle-mode-with-tooltip.js +2 -3
  70. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-circle-mode-with-tooltip.js.map +1 -1
  71. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-ellipse-mode-with-tooltip.js +1 -1
  72. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-line-string-mode-with-tooltip.js +2 -19
  73. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-line-string-mode-with-tooltip.js.map +1 -1
  74. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-polygon-mode-with-tooltip.js +2 -32
  75. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-polygon-mode-with-tooltip.js.map +1 -1
  76. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-rectangle-mode-with-tooltip.js +9 -10
  77. package/dist/deckgl/shapes/draw-shape-layer/modes/draw-rectangle-mode-with-tooltip.js.map +1 -1
  78. package/dist/deckgl/shapes/draw-shape-layer/modes/index.js +2 -32
  79. package/dist/deckgl/shapes/draw-shape-layer/modes/index.js.map +1 -1
  80. package/dist/deckgl/shapes/draw-shape-layer/store.js +1 -1
  81. package/dist/deckgl/shapes/draw-shape-layer/types.d.ts +1 -1
  82. package/dist/deckgl/shapes/draw-shape-layer/types.js +1 -1
  83. package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.d.ts +1 -1
  84. package/dist/deckgl/shapes/draw-shape-layer/use-draw-shape.js +1 -1
  85. package/dist/deckgl/shapes/draw-shape-layer/utils/feature-conversion.js +3 -8
  86. package/dist/deckgl/shapes/draw-shape-layer/utils/feature-conversion.js.map +1 -1
  87. package/dist/deckgl/shapes/edit-shape-layer/constants.js +17 -2
  88. package/dist/deckgl/shapes/edit-shape-layer/constants.js.map +1 -1
  89. package/dist/deckgl/shapes/edit-shape-layer/events.d.ts +1 -1
  90. package/dist/deckgl/shapes/edit-shape-layer/events.js +1 -1
  91. package/dist/deckgl/shapes/edit-shape-layer/fiber.d.ts +1 -1
  92. package/dist/deckgl/shapes/edit-shape-layer/fiber.js +1 -1
  93. package/dist/deckgl/shapes/edit-shape-layer/index.d.ts +5 -2
  94. package/dist/deckgl/shapes/edit-shape-layer/index.js +51 -20
  95. package/dist/deckgl/shapes/edit-shape-layer/index.js.map +1 -1
  96. package/dist/deckgl/shapes/edit-shape-layer/modes/base-transform-mode.js +4 -1
  97. package/dist/deckgl/shapes/edit-shape-layer/modes/base-transform-mode.js.map +1 -1
  98. package/dist/deckgl/shapes/edit-shape-layer/modes/bounding-transform-mode.js +1 -1
  99. package/dist/deckgl/shapes/edit-shape-layer/modes/bounding-transform-mode.js.map +1 -1
  100. package/dist/deckgl/shapes/edit-shape-layer/modes/circle-transform-mode.js +1 -1
  101. package/dist/deckgl/shapes/edit-shape-layer/modes/circle-transform-mode.js.map +1 -1
  102. package/dist/deckgl/shapes/edit-shape-layer/modes/index.js +1 -1
  103. package/dist/deckgl/shapes/edit-shape-layer/modes/point-translate-mode.js +1 -1
  104. package/dist/deckgl/shapes/edit-shape-layer/modes/point-translate-mode.js.map +1 -1
  105. package/dist/deckgl/shapes/edit-shape-layer/modes/rotate-mode-with-snap.js +1 -1
  106. package/dist/deckgl/shapes/edit-shape-layer/modes/rotate-mode-with-snap.js.map +1 -1
  107. package/dist/deckgl/shapes/edit-shape-layer/modes/scale-mode-with-free-transform.js +1 -1
  108. package/dist/deckgl/shapes/edit-shape-layer/modes/scale-mode-with-free-transform.js.map +1 -1
  109. package/dist/deckgl/shapes/edit-shape-layer/modes/vertex-transform-mode.js +1 -1
  110. package/dist/deckgl/shapes/edit-shape-layer/modes/vertex-transform-mode.js.map +1 -1
  111. package/dist/deckgl/shapes/edit-shape-layer/store.js +70 -12
  112. package/dist/deckgl/shapes/edit-shape-layer/store.js.map +1 -1
  113. package/dist/deckgl/shapes/edit-shape-layer/types.d.ts +14 -2
  114. package/dist/deckgl/shapes/edit-shape-layer/types.js +1 -1
  115. package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.d.ts +1 -1
  116. package/dist/deckgl/shapes/edit-shape-layer/use-edit-shape.js +1 -1
  117. package/dist/deckgl/shapes/index.d.ts +4 -4
  118. package/dist/deckgl/shapes/index.js +1 -1
  119. package/dist/deckgl/shapes/shared/constants.d.ts +4 -3
  120. package/dist/deckgl/shapes/shared/constants.js +50 -10
  121. package/dist/deckgl/shapes/shared/constants.js.map +1 -1
  122. package/dist/deckgl/shapes/shared/events.d.ts +5 -1
  123. package/dist/deckgl/shapes/shared/events.js +1 -1
  124. package/dist/deckgl/shapes/shared/events.js.map +1 -1
  125. package/dist/deckgl/shapes/shared/hooks/use-shift-zoom-disable.js +19 -16
  126. package/dist/deckgl/shapes/shared/hooks/use-shift-zoom-disable.js.map +1 -1
  127. package/dist/deckgl/shapes/shared/types.d.ts +174 -53
  128. package/dist/deckgl/shapes/shared/types.js +155 -2
  129. package/dist/deckgl/shapes/shared/types.js.map +1 -1
  130. package/dist/deckgl/shapes/shared/utils/geometry-measurements.js +29 -24
  131. package/dist/deckgl/shapes/shared/utils/geometry-measurements.js.map +1 -1
  132. package/dist/deckgl/shapes/shared/utils/layer-config.js +8 -5
  133. package/dist/deckgl/shapes/shared/utils/layer-config.js.map +1 -1
  134. package/dist/deckgl/shapes/shared/utils/mode-utils.js +50 -20
  135. package/dist/deckgl/shapes/shared/utils/mode-utils.js.map +1 -1
  136. package/dist/deckgl/shapes/shared/utils/pick-filtering.js +22 -15
  137. package/dist/deckgl/shapes/shared/utils/pick-filtering.js.map +1 -1
  138. package/dist/deckgl/shapes/shared/utils/style-utils.d.ts +38 -14
  139. package/dist/deckgl/shapes/shared/utils/style-utils.js +43 -32
  140. package/dist/deckgl/shapes/shared/utils/style-utils.js.map +1 -1
  141. package/dist/deckgl/symbol-layer/fiber.d.ts +1 -1
  142. package/dist/deckgl/symbol-layer/fiber.js +1 -1
  143. package/dist/deckgl/symbol-layer/index.d.ts +1 -1
  144. package/dist/deckgl/symbol-layer/index.js +1 -1
  145. package/dist/deckgl/text-layer/character-sets.js +1 -1
  146. package/dist/deckgl/text-layer/default-settings.d.ts +1 -1
  147. package/dist/deckgl/text-layer/default-settings.js +1 -1
  148. package/dist/deckgl/text-layer/fiber.d.ts +1 -1
  149. package/dist/deckgl/text-layer/fiber.js +1 -1
  150. package/dist/deckgl/text-layer/index.d.ts +1 -1
  151. package/dist/deckgl/text-layer/index.js +1 -1
  152. package/dist/deckgl/text-settings.d.ts +3 -3
  153. package/dist/deckgl/text-settings.js +1 -1
  154. package/dist/map-cursor/events.js +1 -1
  155. package/dist/map-cursor/index.d.ts +1 -1
  156. package/dist/map-cursor/index.js +1 -1
  157. package/dist/map-cursor/store.d.ts +1 -1
  158. package/dist/map-cursor/store.js +1 -1
  159. package/dist/map-cursor/types.d.ts +1 -1
  160. package/dist/map-cursor/types.js +1 -1
  161. package/dist/map-cursor/use-map-cursor.d.ts +1 -1
  162. package/dist/map-cursor/use-map-cursor.js +1 -1
  163. package/dist/map-mode/events.js +1 -1
  164. package/dist/map-mode/index.d.ts +1 -1
  165. package/dist/map-mode/index.js +1 -1
  166. package/dist/map-mode/store.d.ts +1 -1
  167. package/dist/map-mode/store.js +3 -8
  168. package/dist/map-mode/store.js.map +1 -1
  169. package/dist/map-mode/types.d.ts +1 -1
  170. package/dist/map-mode/types.js +1 -1
  171. package/dist/map-mode/use-map-mode.d.ts +1 -1
  172. package/dist/map-mode/use-map-mode.js +1 -1
  173. package/dist/maplibre/hooks/use-maplibre.d.ts +1 -1
  174. package/dist/maplibre/hooks/use-maplibre.js +1 -1
  175. package/dist/maplibre/index.d.ts +1 -1
  176. package/dist/maplibre/index.js +1 -1
  177. package/dist/shared/cleanup.d.ts +1 -1
  178. package/dist/shared/cleanup.js +1 -1
  179. package/dist/shared/constants.js +1 -1
  180. package/dist/shared/create-map-store.d.ts +1 -1
  181. package/dist/shared/create-map-store.js +1 -1
  182. package/dist/shared/logger.js +31 -0
  183. package/dist/shared/logger.js.map +1 -0
  184. package/dist/shared/units.js +1 -1
  185. package/dist/viewport/index.d.ts +1 -1
  186. package/dist/viewport/index.js +1 -1
  187. package/dist/viewport/store.d.ts +1 -1
  188. package/dist/viewport/store.js +1 -1
  189. package/dist/viewport/types.d.ts +1 -1
  190. package/dist/viewport/types.js +1 -1
  191. package/dist/viewport/utils.d.ts +1 -1
  192. package/dist/viewport/utils.js +1 -1
  193. package/dist/viewport/viewport-size.d.ts +3 -3
  194. package/dist/viewport/viewport-size.js +1 -1
  195. package/package.json +22 -20
  196. package/dist/hotkey-manager/dist/react/use-hotkey.js +0 -39
  197. 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
@@ -26,19 +26,23 @@ declare const ShapeEvents: {
26
26
  /** Shape hovered (for cursor changes) */
27
27
  readonly hovered: "shapes:hovered";
28
28
  };
29
+ /** Union of all shape event string literals */
29
30
  type ShapeEventType = (typeof ShapeEvents)[keyof typeof ShapeEvents];
30
31
  /**
31
32
  * Event payload types (all payloads are serializable)
32
33
  */
34
+ /** Event payload emitted when a shape is selected */
33
35
  type ShapeSelectedEvent = Payload<'shapes:selected', {
34
36
  shapeId: ShapeId;
35
37
  /** Map instance ID for multi-map event isolation */
36
38
  mapId: UniqueId;
37
39
  }>;
40
+ /** Event payload emitted when a shape selection is cleared */
38
41
  type ShapeDeselectedEvent = Payload<'shapes:deselected', {
39
42
  /** Map instance ID for multi-map event isolation */
40
43
  mapId: UniqueId;
41
44
  }>;
45
+ /** Event payload emitted when a shape is hovered or hover ends */
42
46
  type ShapeHoveredEvent = Payload<'shapes:hovered', {
43
47
  /** Shape ID being hovered, or null when hover ends */
44
48
  shapeId: ShapeId | null;
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../../../../src/deckgl/shapes/shared/events.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 type { Payload } from '@accelint/bus';\nimport type { UniqueId } from '@accelint/core';\nimport type { ShapeId } from './types';\n\n/**\n * Shape interaction events for DisplayShapeLayer\n */\nexport const ShapeEvents = {\n /** Shape selected */\n selected: 'shapes:selected',\n /** Selection cleared */\n deselected: 'shapes:deselected',\n /** Shape hovered (for cursor changes) */\n hovered: 'shapes:hovered',\n} as const;\n\nexport type ShapeEventType = (typeof ShapeEvents)[keyof typeof ShapeEvents];\n\n/**\n * Event payload types (all payloads are serializable)\n */\n\nexport type ShapeSelectedEvent = Payload<\n 'shapes:selected',\n {\n shapeId: ShapeId;\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\nexport type ShapeDeselectedEvent = Payload<\n 'shapes:deselected',\n {\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\nexport type ShapeHoveredEvent = Payload<\n 'shapes:hovered',\n {\n /** Shape ID being hovered, or null when hover ends */\n shapeId: ShapeId | null;\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\n/**\n * Union of all shape event types\n */\nexport type ShapeEvent =\n | ShapeSelectedEvent\n | ShapeDeselectedEvent\n | ShapeHoveredEvent;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,MAAa,cAAc;CAEzB,UAAU;CAEV,YAAY;CAEZ,SAAS;CACV"}
1
+ {"version":3,"file":"events.js","names":[],"sources":["../../../../src/deckgl/shapes/shared/events.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 type { Payload } from '@accelint/bus';\nimport type { UniqueId } from '@accelint/core';\nimport type { ShapeId } from './types';\n\n/**\n * Shape interaction events for DisplayShapeLayer\n */\nexport const ShapeEvents = {\n /** Shape selected */\n selected: 'shapes:selected',\n /** Selection cleared */\n deselected: 'shapes:deselected',\n /** Shape hovered (for cursor changes) */\n hovered: 'shapes:hovered',\n} as const;\n\n/** Union of all shape event string literals */\nexport type ShapeEventType = (typeof ShapeEvents)[keyof typeof ShapeEvents];\n\n/**\n * Event payload types (all payloads are serializable)\n */\n\n/** Event payload emitted when a shape is selected */\nexport type ShapeSelectedEvent = Payload<\n 'shapes:selected',\n {\n shapeId: ShapeId;\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\n/** Event payload emitted when a shape selection is cleared */\nexport type ShapeDeselectedEvent = Payload<\n 'shapes:deselected',\n {\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\n/** Event payload emitted when a shape is hovered or hover ends */\nexport type ShapeHoveredEvent = Payload<\n 'shapes:hovered',\n {\n /** Shape ID being hovered, or null when hover ends */\n shapeId: ShapeId | null;\n /** Map instance ID for multi-map event isolation */\n mapId: UniqueId;\n }\n>;\n\n/**\n * Union of all shape event types\n */\nexport type ShapeEvent =\n | ShapeSelectedEvent\n | ShapeDeselectedEvent\n | ShapeHoveredEvent;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,MAAa,cAAc;CAEzB,UAAU;CAEV,YAAY;CAEZ,SAAS;CACV"}
@@ -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
@@ -13,7 +13,7 @@
13
13
  import { DistanceUnit } from "../../../shared/units.js";
14
14
  import { UniqueId } from "@accelint/core";
15
15
  import { Color } from "@deck.gl/core";
16
- import { Feature, LineString, Point, Polygon } from "geojson";
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,14 @@ 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
+ };
83
84
  /**
84
85
  * Circle-specific properties for precise rendering
85
86
  * Stored alongside the polygon approximation
86
87
  */
87
- interface CircleProperties {
88
- /** Center point as [longitude, latitude] */
89
- center: [number, number];
88
+ type CircleProperties = {
89
+ /** Center point as [longitude, latitude] or [longitude, latitude, elevation] */
90
+ center: [number, number, number?];
90
91
  /** Radius with value and units */
91
92
  radius: {
92
93
  /** Radius value */
@@ -94,14 +95,14 @@ interface CircleProperties {
94
95
  /** Units for the radius measurement */
95
96
  units: DistanceUnit;
96
97
  };
97
- }
98
+ };
98
99
  /**
99
100
  * Ellipse-specific properties for precise rendering
100
101
  * Stored alongside the polygon approximation
101
102
  */
102
- interface EllipseProperties {
103
- /** Center point as [longitude, latitude] */
104
- center: [number, number];
103
+ type EllipseProperties = {
104
+ /** Center point as [longitude, latitude] or [longitude, latitude, elevation] */
105
+ center: [number, number, number?];
105
106
  /** X semi-axis (horizontal radius) with value and units */
106
107
  xSemiAxis: {
107
108
  /** X semi-axis value */
@@ -118,11 +119,7 @@ interface EllipseProperties {
118
119
  };
119
120
  /** Rotation angle in degrees */
120
121
  angle: number;
121
- }
122
- /**
123
- * Custom geometry types supported
124
- */
125
- type CustomGeometry = Point | LineString | Polygon;
122
+ };
126
123
  /**
127
124
  * Properties for styled features.
128
125
  *
@@ -130,7 +127,7 @@ type CustomGeometry = Point | LineString | Polygon;
130
127
  * but are guaranteed to be present for their respective shape types.
131
128
  * Use the type guards (isCircleShape, isEllipseShape) for type narrowing.
132
129
  */
133
- interface StyledFeatureProperties {
130
+ type StyledFeatureProperties = {
134
131
  /** Style properties for rendering */
135
132
  styleProperties: StyleProperties;
136
133
  /** Shape ID for correlation */
@@ -139,33 +136,37 @@ interface StyledFeatureProperties {
139
136
  circleProperties?: CircleProperties;
140
137
  /** Ellipse properties (present for Ellipse shapes) */
141
138
  ellipseProperties?: EllipseProperties;
142
- }
139
+ /** Minimum elevation in meters (optional) */
140
+ minElevation?: number;
141
+ /** Maximum elevation in meters (optional) */
142
+ maxElevation?: number;
143
+ };
143
144
  /**
144
145
  * Feature properties for Circle shapes (circleProperties required).
145
146
  * Used by CircleShape for better type narrowing.
146
147
  */
147
- interface CircleFeatureProperties extends StyledFeatureProperties {
148
+ type CircleFeatureProperties = StyledFeatureProperties & {
148
149
  /** Circle properties (required for Circle shapes) */
149
150
  circleProperties: CircleProperties;
150
- }
151
+ };
151
152
  /**
152
153
  * Feature properties for Ellipse shapes (ellipseProperties required).
153
154
  * Used by EllipseShape for better type narrowing.
154
155
  */
155
- interface EllipseFeatureProperties extends StyledFeatureProperties {
156
+ type EllipseFeatureProperties = StyledFeatureProperties & {
156
157
  /** Ellipse properties (required for Ellipse shapes) */
157
158
  ellipseProperties: EllipseProperties;
158
- }
159
+ };
159
160
  /**
160
161
  * GeoJSON Feature with style properties
161
162
  */
162
- interface StyledFeature extends Feature {
163
+ type StyledFeature = Feature & {
163
164
  properties: StyledFeatureProperties;
164
- }
165
+ };
165
166
  /**
166
- * Base shape properties shared by all shapes
167
+ * Base shape properties shared by all shapes.
167
168
  */
168
- interface BaseShape {
169
+ type BaseShape = {
169
170
  /** Unique identifier */
170
171
  id: ShapeId;
171
172
  /** Full shape name used internally and in UI */
@@ -185,53 +186,53 @@ interface BaseShape {
185
186
  * Locked shapes cannot be modified due to data restrictions or user preference
186
187
  */
187
188
  locked?: boolean;
188
- }
189
+ };
189
190
  /**
190
191
  * Circle shape with required circleProperties
191
192
  */
192
- interface CircleShape extends BaseShape {
193
+ type CircleShape = BaseShape & {
193
194
  shape: typeof ShapeFeatureType.Circle;
194
195
  feature: StyledFeature & {
195
196
  properties: CircleFeatureProperties;
196
197
  };
197
- }
198
+ };
198
199
  /**
199
200
  * Ellipse shape with required ellipseProperties
200
201
  */
201
- interface EllipseShape extends BaseShape {
202
+ type EllipseShape = BaseShape & {
202
203
  shape: typeof ShapeFeatureType.Ellipse;
203
204
  feature: StyledFeature & {
204
205
  properties: EllipseFeatureProperties;
205
206
  };
206
- }
207
+ };
207
208
  /**
208
209
  * Polygon shape
209
210
  */
210
- interface PolygonShape extends BaseShape {
211
+ type PolygonShape = BaseShape & {
211
212
  shape: typeof ShapeFeatureType.Polygon;
212
213
  feature: StyledFeature;
213
- }
214
+ };
214
215
  /**
215
216
  * Rectangle shape
216
217
  */
217
- interface RectangleShape extends BaseShape {
218
+ type RectangleShape = BaseShape & {
218
219
  shape: typeof ShapeFeatureType.Rectangle;
219
220
  feature: StyledFeature;
220
- }
221
+ };
221
222
  /**
222
223
  * LineString shape
223
224
  */
224
- interface LineStringShape extends BaseShape {
225
+ type LineStringShape = BaseShape & {
225
226
  shape: typeof ShapeFeatureType.LineString;
226
227
  feature: StyledFeature;
227
- }
228
+ };
228
229
  /**
229
230
  * Point shape
230
231
  */
231
- interface PointShape extends BaseShape {
232
+ type PointShape = BaseShape & {
232
233
  shape: typeof ShapeFeatureType.Point;
233
234
  feature: StyledFeature;
234
- }
235
+ };
235
236
  /**
236
237
  * Discriminated union of all shape types.
237
238
  *
@@ -247,10 +248,6 @@ interface PointShape extends BaseShape {
247
248
  * ```
248
249
  */
249
250
  type Shape = CircleShape | EllipseShape | PolygonShape | RectangleShape | LineStringShape | PointShape;
250
- /**
251
- * Alias for ShapeFeatureType values
252
- */
253
- type ShapeFeatureTypeValues = ShapeFeatureType;
254
251
  /**
255
252
  * Alias for StyledFeature (shape feature)
256
253
  */
@@ -263,18 +260,12 @@ type ShapeFeatureProperties = StyledFeature['properties'];
263
260
  * Circle radius type
264
261
  */
265
262
  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
263
  /**
276
264
  * Type guard for Circle shapes.
277
265
  *
266
+ * @param shape - The shape to test.
267
+ * @returns True if shape is a CircleShape.
268
+ *
278
269
  * @example
279
270
  * ```typescript
280
271
  * if (isCircleShape(shape)) {
@@ -287,6 +278,9 @@ declare function isCircleShape(shape: Shape): shape is CircleShape;
287
278
  /**
288
279
  * Type guard for Ellipse shapes.
289
280
  *
281
+ * @param shape - The shape to test.
282
+ * @returns True if shape is an EllipseShape.
283
+ *
290
284
  * @example
291
285
  * ```typescript
292
286
  * if (isEllipseShape(shape)) {
@@ -298,20 +292,147 @@ declare function isCircleShape(shape: Shape): shape is CircleShape;
298
292
  declare function isEllipseShape(shape: Shape): shape is EllipseShape;
299
293
  /**
300
294
  * Type guard for Polygon shapes.
295
+ *
296
+ * @param shape - The shape to test
297
+ * @returns True if shape is a PolygonShape
298
+ * @example
299
+ * ```typescript
300
+ * if (isPolygonShape(shape)) {
301
+ * // TypeScript narrows shape to PolygonShape
302
+ * }
303
+ * ```
301
304
  */
302
305
  declare function isPolygonShape(shape: Shape): shape is PolygonShape;
303
306
  /**
304
307
  * Type guard for Rectangle shapes.
308
+ *
309
+ * @param shape - The shape to test
310
+ * @returns True if shape is a RectangleShape
311
+ * @example
312
+ * ```typescript
313
+ * if (isRectangleShape(shape)) {
314
+ * // TypeScript narrows shape to RectangleShape
315
+ * }
316
+ * ```
305
317
  */
306
318
  declare function isRectangleShape(shape: Shape): shape is RectangleShape;
307
319
  /**
308
320
  * Type guard for LineString shapes.
321
+ *
322
+ * @param shape - The shape to test
323
+ * @returns True if shape is a LineStringShape
324
+ * @example
325
+ * ```typescript
326
+ * if (isLineStringShape(shape)) {
327
+ * // TypeScript narrows shape to LineStringShape
328
+ * }
329
+ * ```
309
330
  */
310
331
  declare function isLineStringShape(shape: Shape): shape is LineStringShape;
311
332
  /**
312
333
  * Type guard for Point shapes.
334
+ *
335
+ * @param shape - The shape to test
336
+ * @returns True if shape is a PointShape
337
+ * @example
338
+ * ```typescript
339
+ * if (isPointShape(shape)) {
340
+ * // TypeScript narrows shape to PointShape
341
+ * }
342
+ * ```
313
343
  */
314
344
  declare function isPointShape(shape: Shape): shape is PointShape;
345
+ /**
346
+ * Narrow a GeoJSON geometry to the Point type.
347
+ *
348
+ * @param geometry - The GeoJSON geometry to test.
349
+ * @returns True if the geometry is a Point.
350
+ */
351
+ declare function isPointType(geometry: Geometry): geometry is Point;
352
+ /**
353
+ * Narrow a GeoJSON geometry to the MultiPoint type.
354
+ *
355
+ * @param geometry - The GeoJSON geometry to test.
356
+ * @returns True if the geometry is a MultiPoint.
357
+ */
358
+ declare function isMultiPointType(geometry: Geometry): geometry is MultiPoint;
359
+ /**
360
+ * Narrow a GeoJSON geometry to the LineString type.
361
+ *
362
+ * @param geometry - The GeoJSON geometry to test.
363
+ * @returns True if the geometry is a LineString.
364
+ */
365
+ declare function isLineStringType(geometry: Geometry): geometry is LineString;
366
+ /**
367
+ * Narrow a GeoJSON geometry to the MultiLineString type.
368
+ *
369
+ * @param geometry - The GeoJSON geometry to test.
370
+ * @returns True if the geometry is a MultiLineString.
371
+ */
372
+ declare function isMultiLineStringType(geometry: Geometry): geometry is MultiLineString;
373
+ /**
374
+ * Narrow a GeoJSON geometry to the Polygon type.
375
+ *
376
+ * @param geometry - The GeoJSON geometry to test.
377
+ * @returns True if the geometry is a Polygon.
378
+ */
379
+ declare function isPolygonType(geometry: Geometry): geometry is Polygon;
380
+ /**
381
+ * Narrow a GeoJSON geometry to the MultiPolygon type.
382
+ *
383
+ * @param geometry - The GeoJSON geometry to test.
384
+ * @returns True if the geometry is a MultiPolygon.
385
+ */
386
+ declare function isMultiPolygonType(geometry: Geometry): geometry is MultiPolygon;
387
+ /**
388
+ * Narrow a GeoJSON geometry to the GeometryCollection type.
389
+ *
390
+ * @param geometry - The GeoJSON geometry to test.
391
+ * @returns True if the geometry is a GeometryCollection.
392
+ */
393
+ declare function isGeometryCollectionType(geometry: Geometry): geometry is GeometryCollection;
394
+ /**
395
+ * Narrow a GeoJSON geometry to polygon-like types (Polygon or MultiPolygon).
396
+ *
397
+ * @param geometry - The GeoJSON geometry to test.
398
+ * @returns True if the geometry is a Polygon or MultiPolygon.
399
+ *
400
+ * @example
401
+ * ```typescript
402
+ * if (isPolygonGeometry(feature.geometry)) {
403
+ * // geometry narrowed to Polygon | MultiPolygon
404
+ * }
405
+ * ```
406
+ */
407
+ declare function isPolygonGeometry(geometry: Geometry): geometry is Polygon | MultiPolygon;
408
+ /**
409
+ * Narrow a GeoJSON geometry to line-like types (LineString or MultiLineString).
410
+ *
411
+ * @param geometry - The GeoJSON geometry to test.
412
+ * @returns True if the geometry is a LineString or MultiLineString.
413
+ *
414
+ * @example
415
+ * ```typescript
416
+ * if (isLineGeometry(feature.geometry)) {
417
+ * // geometry narrowed to LineString | MultiLineString
418
+ * }
419
+ * ```
420
+ */
421
+ declare function isLineGeometry(geometry: Geometry): geometry is LineString | MultiLineString;
422
+ /**
423
+ * Narrow a GeoJSON geometry to point-like types (Point or MultiPoint).
424
+ *
425
+ * @param geometry - The GeoJSON geometry to test.
426
+ * @returns True if the geometry is a Point or MultiPoint.
427
+ *
428
+ * @example
429
+ * ```typescript
430
+ * if (isPointGeometry(feature.geometry)) {
431
+ * // geometry narrowed to Point | MultiPoint
432
+ * }
433
+ * ```
434
+ */
435
+ declare function isPointGeometry(geometry: Geometry): geometry is Point | MultiPoint;
315
436
  //#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 };
437
+ export { CircleFeatureProperties, CircleProperties, CircleRadius, CircleShape, EllipseFeatureProperties, EllipseProperties, EllipseShape, 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
438
  //# sourceMappingURL=types.d.ts.map