@accelint/design-toolkit 9.11.0 → 9.11.2

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 (266) hide show
  1. package/catalog-info.yaml +1 -1
  2. package/dist/components/accordion/context.d.ts +2 -2
  3. package/dist/components/accordion/group.d.ts +2 -2
  4. package/dist/components/accordion/header.d.ts +2 -2
  5. package/dist/components/accordion/index.d.ts +2 -2
  6. package/dist/components/accordion/panel.d.ts +2 -2
  7. package/dist/components/accordion/trigger.d.ts +2 -2
  8. package/dist/components/action-bar/index.d.ts +2 -2
  9. package/dist/components/audio/index.d.ts +2 -2
  10. package/dist/components/avatar/context.d.ts +4 -4
  11. package/dist/components/avatar/index.d.ts +2 -2
  12. package/dist/components/badge/context.d.ts +4 -4
  13. package/dist/components/badge/index.d.ts +2 -2
  14. package/dist/components/breadcrumbs/index.d.ts +2 -2
  15. package/dist/components/breadcrumbs/item.d.ts +2 -2
  16. package/dist/components/button/context.d.ts +8 -8
  17. package/dist/components/button/index.d.ts +2 -2
  18. package/dist/components/button/link.d.ts +2 -2
  19. package/dist/components/button/toggle.d.ts +2 -2
  20. package/dist/components/carousel/context.d.ts +4 -4
  21. package/dist/components/carousel/gallery.d.ts +2 -2
  22. package/dist/components/carousel/index.d.ts +2 -2
  23. package/dist/components/carousel/navigation.d.ts +3 -3
  24. package/dist/components/carousel/position.d.ts +2 -2
  25. package/dist/components/carousel/select.d.ts +2 -2
  26. package/dist/components/carousel/viewer.d.ts +2 -2
  27. package/dist/components/checkbox/context.d.ts +3 -3
  28. package/dist/components/checkbox/group.d.ts +2 -2
  29. package/dist/components/checkbox/index.d.ts +2 -2
  30. package/dist/components/checkbox/index.js +3 -1
  31. package/dist/components/checkbox/index.js.map +1 -1
  32. package/dist/components/checkbox/styles.module.css +2 -0
  33. package/dist/components/chip/context.d.ts +2 -2
  34. package/dist/components/chip/deletable.d.ts +2 -2
  35. package/dist/components/chip/index.d.ts +2 -2
  36. package/dist/components/chip/list.d.ts +4 -4
  37. package/dist/components/chip/selectable.d.ts +2 -2
  38. package/dist/components/classification-badge/context.d.ts +4 -4
  39. package/dist/components/classification-badge/index.d.ts +2 -2
  40. package/dist/components/classification-banner/context.d.ts +4 -4
  41. package/dist/components/classification-banner/index.d.ts +2 -2
  42. package/dist/components/clock/index.d.ts +2 -2
  43. package/dist/components/color-picker/index.d.ts +2 -2
  44. package/dist/components/combobox-field/context.d.ts +4 -4
  45. package/dist/components/combobox-field/index.d.ts +2 -2
  46. package/dist/components/combobox-field/styles.module.css +11 -2
  47. package/dist/components/coordinate-field/context.d.ts +6 -6
  48. package/dist/components/coordinate-field/coordinate-utils.js +2 -0
  49. package/dist/components/coordinate-field/coordinate-utils.js.map +1 -1
  50. package/dist/components/coordinate-field/index.d.ts +2 -2
  51. package/dist/components/coordinate-field/index.js +1 -0
  52. package/dist/components/coordinate-field/index.js.map +1 -1
  53. package/dist/components/coordinate-field/segment.d.ts +2 -2
  54. package/dist/components/date-field/index.d.ts +2 -2
  55. package/dist/components/deferred-collection/index.d.ts +2 -2
  56. package/dist/components/details-list/context.d.ts +4 -4
  57. package/dist/components/details-list/index.d.ts +2 -2
  58. package/dist/components/details-list/label.d.ts +2 -2
  59. package/dist/components/details-list/value.d.ts +2 -2
  60. package/dist/components/dialog/content.d.ts +2 -2
  61. package/dist/components/dialog/context.d.ts +2 -2
  62. package/dist/components/dialog/footer.d.ts +2 -2
  63. package/dist/components/dialog/index.d.ts +2 -2
  64. package/dist/components/dialog/title.d.ts +2 -2
  65. package/dist/components/divider/context.d.ts +4 -4
  66. package/dist/components/divider/index.d.ts +2 -2
  67. package/dist/components/drawer/back.d.ts +2 -2
  68. package/dist/components/drawer/close.d.ts +2 -2
  69. package/dist/components/drawer/content.d.ts +2 -2
  70. package/dist/components/drawer/context.d.ts +2 -2
  71. package/dist/components/drawer/footer.d.ts +2 -2
  72. package/dist/components/drawer/header-title.d.ts +2 -2
  73. package/dist/components/drawer/header.d.ts +2 -2
  74. package/dist/components/drawer/index.d.ts +2 -2
  75. package/dist/components/drawer/layout-main.d.ts +2 -2
  76. package/dist/components/drawer/layout.d.ts +2 -2
  77. package/dist/components/drawer/menu-item.d.ts +2 -2
  78. package/dist/components/drawer/menu.d.ts +2 -2
  79. package/dist/components/drawer/panel.d.ts +2 -2
  80. package/dist/components/drawer/styles.module.css +60 -113
  81. package/dist/components/drawer/trigger.d.ts +2 -2
  82. package/dist/components/drawer/view.d.ts +2 -2
  83. package/dist/components/flashcard/index.d.ts +9 -9
  84. package/dist/components/floating-card/context.d.ts +2 -2
  85. package/dist/components/floating-card/provider.d.ts +2 -2
  86. package/dist/components/gantt/components/base-elements/point.d.ts +2 -2
  87. package/dist/components/gantt/components/base-elements/range.d.ts +2 -2
  88. package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +2 -2
  89. package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +2 -2
  90. package/dist/components/gantt/components/containers/internal/index.d.ts +2 -2
  91. package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +2 -2
  92. package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +2 -2
  93. package/dist/components/gantt/components/content-row/block.d.ts +2 -2
  94. package/dist/components/gantt/components/content-row/bracket.d.ts +3 -3
  95. package/dist/components/gantt/components/content-row/icon-marker.d.ts +2 -2
  96. package/dist/components/gantt/components/content-row/index.d.ts +2 -2
  97. package/dist/components/gantt/components/content-row/marker.d.ts +2 -2
  98. package/dist/components/gantt/components/content-row/spacer.d.ts +2 -2
  99. package/dist/components/gantt/components/current-time/index.d.ts +2 -2
  100. package/dist/components/gantt/components/header/index.d.ts +3 -3
  101. package/dist/components/gantt/components/panel-row/index.d.ts +2 -2
  102. package/dist/components/gantt/components/rows-virtualizer/index.d.ts +3 -3
  103. package/dist/components/gantt/components/timeline/index.d.ts +2 -2
  104. package/dist/components/gantt/components/timeline-chunk/index.d.ts +3 -3
  105. package/dist/components/gantt/context/index.d.ts +4 -4
  106. package/dist/components/gantt/context/store/index.d.ts +4 -4
  107. package/dist/components/gantt/context/temporal-data/index.d.ts +4 -4
  108. package/dist/components/hero/context.d.ts +2 -2
  109. package/dist/components/hero/index.d.ts +2 -2
  110. package/dist/components/hero/subtitle.d.ts +3 -3
  111. package/dist/components/hero/title.d.ts +2 -2
  112. package/dist/components/hotkey/context.d.ts +4 -4
  113. package/dist/components/hotkey/index.d.ts +2 -2
  114. package/dist/components/hotkey/set.d.ts +2 -2
  115. package/dist/components/icon/context.d.ts +4 -4
  116. package/dist/components/icon/index.d.ts +2 -2
  117. package/dist/components/input/context.d.ts +2 -2
  118. package/dist/components/input/index.d.ts +2 -2
  119. package/dist/components/kanban/card-body.d.ts +2 -2
  120. package/dist/components/kanban/card-header-actions.d.ts +2 -2
  121. package/dist/components/kanban/card-header-title.d.ts +2 -2
  122. package/dist/components/kanban/card-header.d.ts +2 -2
  123. package/dist/components/kanban/card.d.ts +2 -2
  124. package/dist/components/kanban/column-actions.d.ts +2 -2
  125. package/dist/components/kanban/column-container.d.ts +2 -2
  126. package/dist/components/kanban/column-content.d.ts +2 -2
  127. package/dist/components/kanban/column-header-actions.d.ts +2 -2
  128. package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
  129. package/dist/components/kanban/column-header-title.d.ts +2 -2
  130. package/dist/components/kanban/column-header.d.ts +2 -2
  131. package/dist/components/kanban/column.d.ts +2 -2
  132. package/dist/components/kanban/context.d.ts +2 -2
  133. package/dist/components/kanban/header-actions.d.ts +2 -2
  134. package/dist/components/kanban/header-search.d.ts +2 -2
  135. package/dist/components/kanban/header-title.d.ts +2 -2
  136. package/dist/components/kanban/header.d.ts +2 -2
  137. package/dist/components/kanban/kanban.d.ts +4 -4
  138. package/dist/components/label/context.d.ts +4 -4
  139. package/dist/components/label/index.d.ts +2 -2
  140. package/dist/components/lines/index.d.ts +2 -2
  141. package/dist/components/link/context.d.ts +2 -2
  142. package/dist/components/link/index.d.ts +2 -2
  143. package/dist/components/list/context.d.ts +2 -2
  144. package/dist/components/list/index.d.ts +2 -2
  145. package/dist/components/list/item-content.d.ts +2 -2
  146. package/dist/components/list/item-description.d.ts +2 -2
  147. package/dist/components/list/item-title.d.ts +2 -2
  148. package/dist/components/list/item.d.ts +2 -2
  149. package/dist/components/media-controls/context.d.ts +4 -4
  150. package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
  151. package/dist/components/media-controls/index.d.ts +2 -2
  152. package/dist/components/media-controls/mute-button.d.ts +2 -2
  153. package/dist/components/media-controls/play-button.d.ts +2 -2
  154. package/dist/components/media-controls/playback-rate.d.ts +2 -2
  155. package/dist/components/media-controls/seek-button.d.ts +2 -2
  156. package/dist/components/media-controls/time-display.d.ts +2 -2
  157. package/dist/components/media-controls/time-range.d.ts +2 -2
  158. package/dist/components/media-controls/volume-slider.d.ts +2 -2
  159. package/dist/components/menu/context.d.ts +2 -2
  160. package/dist/components/menu/index.d.ts +2 -2
  161. package/dist/components/menu/item-description.d.ts +2 -2
  162. package/dist/components/menu/item-label.d.ts +2 -2
  163. package/dist/components/menu/item.d.ts +2 -2
  164. package/dist/components/menu/section.d.ts +2 -2
  165. package/dist/components/menu/separator.d.ts +2 -2
  166. package/dist/components/menu/submenu.d.ts +2 -2
  167. package/dist/components/notice/index.d.ts +2 -2
  168. package/dist/components/notice/list.d.ts +2 -2
  169. package/dist/components/notice/notice-icon.d.ts +2 -2
  170. package/dist/components/options/index.d.ts +2 -2
  171. package/dist/components/options/item-content.d.ts +2 -2
  172. package/dist/components/options/item-description.d.ts +2 -2
  173. package/dist/components/options/item-label.d.ts +2 -2
  174. package/dist/components/options/item.d.ts +2 -2
  175. package/dist/components/options/section.d.ts +2 -2
  176. package/dist/components/pagination/context.d.ts +2 -2
  177. package/dist/components/pagination/index.d.ts +2 -2
  178. package/dist/components/pagination/next.d.ts +2 -2
  179. package/dist/components/pagination/pages.d.ts +2 -2
  180. package/dist/components/pagination/prev.d.ts +2 -2
  181. package/dist/components/popover/content.d.ts +2 -2
  182. package/dist/components/popover/footer.d.ts +2 -2
  183. package/dist/components/popover/index.d.ts +2 -2
  184. package/dist/components/popover/title.d.ts +2 -2
  185. package/dist/components/popover/trigger.d.ts +2 -2
  186. package/dist/components/query-builder/action-element.d.ts +2 -2
  187. package/dist/components/query-builder/actions.d.ts +4 -4
  188. package/dist/components/query-builder/combinator-selector.d.ts +2 -2
  189. package/dist/components/query-builder/index.d.ts +2 -2
  190. package/dist/components/query-builder/rule-group.d.ts +4 -4
  191. package/dist/components/query-builder/rule.d.ts +2 -2
  192. package/dist/components/query-builder/value-editor.d.ts +2 -2
  193. package/dist/components/query-builder/value-selector.d.ts +2 -2
  194. package/dist/components/radio/context.d.ts +3 -3
  195. package/dist/components/radio/group.d.ts +2 -2
  196. package/dist/components/radio/index.d.ts +2 -2
  197. package/dist/components/search-field/context.d.ts +4 -4
  198. package/dist/components/search-field/index.d.ts +2 -2
  199. package/dist/components/select-field/context.d.ts +4 -4
  200. package/dist/components/select-field/index.d.ts +2 -2
  201. package/dist/components/sidenav/avatar.d.ts +2 -2
  202. package/dist/components/sidenav/content.d.ts +2 -2
  203. package/dist/components/sidenav/context.d.ts +2 -2
  204. package/dist/components/sidenav/footer.d.ts +2 -2
  205. package/dist/components/sidenav/header.d.ts +2 -2
  206. package/dist/components/sidenav/index.d.ts +2 -2
  207. package/dist/components/sidenav/item.d.ts +2 -2
  208. package/dist/components/sidenav/link.d.ts +2 -2
  209. package/dist/components/sidenav/menu-item.d.ts +2 -2
  210. package/dist/components/sidenav/menu.d.ts +2 -2
  211. package/dist/components/sidenav/trigger.d.ts +2 -2
  212. package/dist/components/skeleton/index.d.ts +2 -2
  213. package/dist/components/slider/index.d.ts +2 -2
  214. package/dist/components/status-indicator/index.d.ts +2 -2
  215. package/dist/components/switch/context.d.ts +4 -4
  216. package/dist/components/switch/index.d.ts +2 -2
  217. package/dist/components/switch/index.js +3 -1
  218. package/dist/components/switch/index.js.map +1 -1
  219. package/dist/components/switch/styles.module.css +2 -0
  220. package/dist/components/table/body.d.ts +2 -2
  221. package/dist/components/table/cell.d.ts +2 -2
  222. package/dist/components/table/context.d.ts +2 -2
  223. package/dist/components/table/header-cell.d.ts +2 -2
  224. package/dist/components/table/header.d.ts +2 -2
  225. package/dist/components/table/index.d.ts +2 -2
  226. package/dist/components/table/row.d.ts +2 -2
  227. package/dist/components/tabs/context.d.ts +6 -6
  228. package/dist/components/tabs/index.d.ts +2 -2
  229. package/dist/components/tabs/list.d.ts +2 -2
  230. package/dist/components/tabs/panel.d.ts +2 -2
  231. package/dist/components/tabs/tab.d.ts +2 -2
  232. package/dist/components/text-area-field/context.d.ts +4 -4
  233. package/dist/components/text-area-field/index.d.ts +2 -2
  234. package/dist/components/text-field/context.d.ts +4 -4
  235. package/dist/components/text-field/index.d.ts +2 -2
  236. package/dist/components/time-field/index.d.ts +2 -2
  237. package/dist/components/tooltip/context.d.ts +2 -2
  238. package/dist/components/tooltip/index.d.ts +2 -2
  239. package/dist/components/tooltip/trigger.d.ts +2 -2
  240. package/dist/components/tree/context.d.ts +3 -3
  241. package/dist/components/tree/index.d.ts +2 -2
  242. package/dist/components/tree/item-actions.d.ts +2 -2
  243. package/dist/components/tree/item-content.d.ts +2 -2
  244. package/dist/components/tree/item-description.d.ts +2 -2
  245. package/dist/components/tree/item-label.d.ts +2 -2
  246. package/dist/components/tree/item-prefix-icon.d.ts +2 -2
  247. package/dist/components/tree/item.d.ts +2 -2
  248. package/dist/components/tree/lines.d.ts +2 -2
  249. package/dist/components/video/index.d.ts +2 -2
  250. package/dist/components/view-stack/context.d.ts +2 -2
  251. package/dist/components/view-stack/index.d.ts +2 -2
  252. package/dist/components/view-stack/trigger.d.ts +2 -2
  253. package/dist/components/view-stack/view.d.ts +2 -2
  254. package/dist/hooks/coordinate-field/use-coordinate-field-state.d.ts +2 -0
  255. package/dist/hooks/coordinate-field/use-coordinate-field-state.js +15 -2
  256. package/dist/hooks/coordinate-field/use-coordinate-field-state.js.map +1 -1
  257. package/dist/hooks/coordinate-field/use-coordinate-paste.js +27 -4
  258. package/dist/hooks/coordinate-field/use-coordinate-paste.js.map +1 -1
  259. package/dist/hooks/use-prevent-scroll-focus/index.d.ts +39 -0
  260. package/dist/hooks/use-prevent-scroll-focus/index.js +69 -0
  261. package/dist/hooks/use-prevent-scroll-focus/index.js.map +1 -0
  262. package/dist/index.d.ts +2 -1
  263. package/dist/index.js +2 -1
  264. package/dist/providers/portal.d.ts +2 -2
  265. package/dist/providers/theme-provider.d.ts +2 -2
  266. package/package.json +7 -6
@@ -12,12 +12,12 @@
12
12
 
13
13
  import { ViewStackContextValue } from "./types.js";
14
14
  import "client-only";
15
- import * as react52 from "react";
15
+ import * as react43 from "react";
16
16
  import { UniqueId } from "@accelint/core";
17
17
 
18
18
  //#region src/components/view-stack/context.d.ts
19
19
  /** Context for sharing state across ViewStack components */
20
- declare const ViewStackContext: react52.Context<ViewStackContextValue>;
20
+ declare const ViewStackContext: react43.Context<ViewStackContextValue>;
21
21
  /** Event handlers for ViewStack events */
22
22
  declare const ViewStackEventHandlers: {
23
23
  readonly back: (stack: UniqueId) => void;
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { ViewStackProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime212 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime180 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/view-stack/index.d.ts
18
18
 
@@ -47,7 +47,7 @@ declare function ViewStack({
47
47
  children,
48
48
  defaultView,
49
49
  onChange
50
- }: ViewStackProps): react_jsx_runtime212.JSX.Element;
50
+ }: ViewStackProps): react_jsx_runtime180.JSX.Element;
51
51
  //#endregion
52
52
  export { ViewStack };
53
53
  //# sourceMappingURL=index.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { ViewStackTriggerProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime214 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime181 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/view-stack/trigger.d.ts
18
18
 
@@ -45,7 +45,7 @@ import * as react_jsx_runtime214 from "react/jsx-runtime";
45
45
  declare function ViewStackTrigger({
46
46
  children,
47
47
  for: types
48
- }: ViewStackTriggerProps): react_jsx_runtime214.JSX.Element;
48
+ }: ViewStackTriggerProps): react_jsx_runtime181.JSX.Element;
49
49
  //#endregion
50
50
  export { ViewStackTrigger };
51
51
  //# sourceMappingURL=trigger.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { ViewStackViewProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime199 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime182 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/view-stack/view.d.ts
18
18
 
@@ -43,7 +43,7 @@ import * as react_jsx_runtime199 from "react/jsx-runtime";
43
43
  declare function ViewStackView({
44
44
  id,
45
45
  children
46
- }: ViewStackViewProps): react_jsx_runtime199.JSX.Element | null;
46
+ }: ViewStackViewProps): react_jsx_runtime182.JSX.Element | null;
47
47
  //#endregion
48
48
  export { ViewStackView };
49
49
  //# sourceMappingURL=view.d.ts.map
@@ -43,6 +43,8 @@ interface UseCoordinateFieldStateResult {
43
43
  editableSegmentConfigs: SegmentConfig[];
44
44
  /** Handle change of a single segment */
45
45
  handleSegmentChange: (index: number, newValue: string) => void;
46
+ /** Handle blur event for a segment */
47
+ handleSegmentBlur: (index: number) => void;
46
48
  /** Set all segment values at once */
47
49
  setSegmentValues: (values: string[]) => void;
48
50
  /** Set validation errors */
@@ -146,12 +146,14 @@ function useCoordinateFieldState({ value, defaultValue, format, onChange, onErro
146
146
  };
147
147
  const handleSegmentChange = (index, newValue) => {
148
148
  const updatedValues = [...segmentValues];
149
- updatedValues[index] = newValue;
149
+ if (format === "mgrs" && (index === 1 || index === 2) && /^[a-zA-Z]+$/.test(newValue)) updatedValues[index] = newValue.toUpperCase();
150
+ else updatedValues[index] = newValue;
150
151
  setSegmentValues(updatedValues);
151
152
  if (areAllSegmentsFilled(updatedValues)) {
152
153
  clearValidationTimeout();
154
+ const capturedValues = [...updatedValues];
153
155
  const timeoutId = setTimeout(() => {
154
- validateAndUpdateCoordinate(updatedValues);
156
+ validateAndUpdateCoordinate(capturedValues);
155
157
  validationTimeoutRef.current = null;
156
158
  }, 400);
157
159
  validationTimeoutRef.current = timeoutId;
@@ -162,6 +164,16 @@ function useCoordinateFieldState({ value, defaultValue, format, onChange, onErro
162
164
  if (currentValue !== null) handleChange(null);
163
165
  }
164
166
  };
167
+ const handleSegmentBlur = (index) => {
168
+ if (format === "mgrs" && index === 0) {
169
+ const currentVal = segmentValues[0];
170
+ if (currentVal && currentVal.length === 1 && /^\d$/.test(currentVal)) {
171
+ const updatedValues = [...segmentValues];
172
+ updatedValues[0] = currentVal.padStart(2, "0");
173
+ setSegmentValues(updatedValues);
174
+ }
175
+ }
176
+ };
165
177
  const applyPastedCoordinate = (pastedValue) => {
166
178
  clearValidationTimeout();
167
179
  const segments = convertDDToDisplaySegments(pastedValue, format);
@@ -184,6 +196,7 @@ function useCoordinateFieldState({ value, defaultValue, format, onChange, onErro
184
196
  segmentConfigs,
185
197
  editableSegmentConfigs,
186
198
  handleSegmentChange,
199
+ handleSegmentBlur,
187
200
  setSegmentValues,
188
201
  setValidationErrors,
189
202
  effectiveErrorMessage: useMemo(() => validationErrors[0] || null, [validationErrors]),
@@ -1 +1 @@
1
- {"version":3,"file":"use-coordinate-field-state.js","names":[],"sources":["../../../src/hooks/coordinate-field/use-coordinate-field-state.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\nimport {\n type Dispatch,\n type SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n areAllSegmentsFilled,\n convertDDToDisplaySegments,\n convertDisplaySegmentsToDD,\n validateCoordinateSegments,\n} from '../../components/coordinate-field/coordinate-utils';\nimport { getSegmentConfigs } from '../../components/coordinate-field/segment-configs';\nimport type {\n CoordinateSystem,\n CoordinateValue,\n SegmentConfig,\n} from '../../components/coordinate-field/types';\n\n/** Options for the useCoordinateFieldState hook */\nexport interface UseCoordinateFieldStateOptions {\n /** Controlled coordinate value */\n value?: CoordinateValue | null;\n /** Default value for uncontrolled mode */\n defaultValue?: CoordinateValue;\n /** Coordinate format system (dd, ddm, dms, mgrs, utm) */\n format: CoordinateSystem;\n /** Callback when coordinate value changes */\n onChange?:\n | Dispatch<SetStateAction<CoordinateValue | null>>\n | ((value: CoordinateValue | null) => void);\n /** Callback for validation errors */\n onError?: (message: string, context?: Record<string, unknown>) => void;\n /** Register timeouts for cleanup on unmount */\n registerTimeout?: (timeoutId: NodeJS.Timeout) => void;\n}\n\n/** Return value from the useCoordinateFieldState hook */\nexport interface UseCoordinateFieldStateResult {\n /** Current coordinate value (null if incomplete/invalid) */\n currentValue: CoordinateValue | null;\n /** Array of display values for each segment */\n segmentValues: string[];\n /** Array of validation error messages */\n validationErrors: string[];\n /** All segment configurations including literals */\n segmentConfigs: SegmentConfig[];\n /** Only editable segment configurations */\n editableSegmentConfigs: SegmentConfig[];\n /** Handle change of a single segment */\n handleSegmentChange: (index: number, newValue: string) => void;\n /** Set all segment values at once */\n setSegmentValues: (values: string[]) => void;\n /** Set validation errors */\n setValidationErrors: (errors: string[]) => void;\n /** First validation error or null */\n effectiveErrorMessage: string | null;\n /** Apply a pasted coordinate value */\n applyPastedCoordinate: (pastedValue: CoordinateValue) => void;\n /** Immediately run pending validation */\n flushPendingValidation: () => void;\n}\n\n/**\n * Manages coordinate segment values, validation, and format conversion\n *\n * @example\n * ```tsx\n * function CoordinateInputs() {\n * const [value, setValue] = useState<CoordinateValue | null>(null);\n * const { registerTimeout } = useTimeoutCleanup();\n *\n * const {\n * currentValue,\n * segmentValues,\n * validationErrors,\n * editableSegmentConfigs,\n * handleSegmentChange,\n * } = useCoordinateFieldState({\n * value,\n * format: 'ddm',\n * onChange: setValue,\n * onError: (msg) => console.error(msg),\n * registerTimeout,\n * });\n *\n * return (\n * <div>\n * {editableSegmentConfigs.map((config, i) => (\n * <input\n * key={i}\n * value={segmentValues[i]}\n * onChange={(e) => handleSegmentChange(i, e.target.value)}\n * placeholder={config.placeholder}\n * />\n * ))}\n * {validationErrors.map((error, i) => (\n * <span key={i}>{error}</span>\n * ))}\n * </div>\n * );\n * }\n * ```\n *\n * @param options - {@link UseCoordinateFieldStateOptions}\n * @param options.value - Controlled coordinate value.\n * @param options.defaultValue - Default value for uncontrolled mode.\n * @param options.format - Coordinate format system (dd, ddm, dms, mgrs, utm).\n * @param options.onChange - Callback when coordinate value changes.\n * @param options.onError - Callback for validation errors.\n * @param options.registerTimeout - Register timeouts for cleanup on unmount.\n * @returns {@link UseCoordinateFieldStateResult} Segment state, validation, and change handlers.\n */\nexport function useCoordinateFieldState({\n value,\n defaultValue,\n format,\n onChange,\n onError,\n registerTimeout,\n}: UseCoordinateFieldStateOptions): UseCoordinateFieldStateResult {\n const [internalValue, setInternalValue] = useState<CoordinateValue | null>(\n defaultValue || null,\n );\n const [validationErrors, setValidationErrors] = useState<string[]>([]);\n const validationTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const currentValue = value !== undefined ? value : internalValue;\n\n const clearValidationTimeout = () => {\n if (validationTimeoutRef.current) {\n clearTimeout(validationTimeoutRef.current);\n validationTimeoutRef.current = null;\n }\n };\n\n const handleChange = (newValue: CoordinateValue | null) => {\n if (value === undefined) {\n setInternalValue(newValue);\n }\n onChange?.(newValue);\n };\n\n const segmentConfigs = useMemo(() => getSegmentConfigs(format), [format]);\n\n const editableSegmentConfigs = useMemo(\n () => segmentConfigs.flat().filter((config) => config.type !== 'literal'),\n [segmentConfigs],\n );\n\n const [segmentValues, setSegmentValues] = useState<string[]>(() => {\n const initialValue = value !== undefined ? value : defaultValue;\n if (!initialValue) {\n return new Array(editableSegmentConfigs.length).fill('');\n }\n\n const segments = convertDDToDisplaySegments(initialValue, format);\n if (!segments) {\n return new Array(editableSegmentConfigs.length).fill('');\n }\n\n return segments;\n });\n\n const convertValueToSegmentsOrClear = useCallback(\n (valueToConvert: CoordinateValue | null) => {\n // Clear any pending validation when value changes\n clearValidationTimeout();\n\n const segments = valueToConvert\n ? convertDDToDisplaySegments(valueToConvert, format)\n : null;\n\n setSegmentValues(\n segments || new Array(editableSegmentConfigs.length).fill(''),\n );\n setValidationErrors([]);\n },\n [format, editableSegmentConfigs.length],\n );\n\n const prevFormatRef = useRef(format);\n\n useEffect(() => {\n if (prevFormatRef.current !== format) {\n prevFormatRef.current = format;\n const valueToConvert = value !== undefined ? value : internalValue;\n convertValueToSegmentsOrClear(valueToConvert);\n }\n }, [format, value, internalValue, convertValueToSegmentsOrClear]);\n\n useEffect(() => {\n if (value !== undefined) {\n convertValueToSegmentsOrClear(value);\n }\n }, [value, convertValueToSegmentsOrClear]);\n\n /**\n * Validates segment values and updates the coordinate state\n *\n * When validation fails, calls onError with \"Invalid coordinate value\" message\n * and context containing the detailed validation errors from @accelint/geo.\n *\n * @param updatedValues - Array of segment values to validate\n */\n const validateAndUpdateCoordinate = (updatedValues: string[]) => {\n const errors = validateCoordinateSegments(updatedValues, format);\n\n if (errors.length > 0) {\n setValidationErrors(errors);\n onError?.('Invalid coordinate value', {\n errors,\n format,\n segments: updatedValues,\n });\n handleChange(null);\n return;\n }\n\n const ddValue = convertDisplaySegmentsToDD(updatedValues, format);\n if (!ddValue) {\n const errorMsg = 'Invalid coordinate value';\n setValidationErrors([errorMsg]);\n onError?.(errorMsg, { format, segments: updatedValues });\n handleChange(null);\n return;\n }\n\n setValidationErrors([]);\n handleChange(ddValue);\n };\n\n const handleSegmentChange = (index: number, newValue: string) => {\n const updatedValues = [...segmentValues];\n updatedValues[index] = newValue;\n setSegmentValues(updatedValues);\n\n if (areAllSegmentsFilled(updatedValues)) {\n // Clear any pending validation timeout\n clearValidationTimeout();\n\n // Debounce validation by 400ms when all segments are full\n const timeoutId = setTimeout(() => {\n validateAndUpdateCoordinate(updatedValues);\n validationTimeoutRef.current = null;\n }, 400);\n\n validationTimeoutRef.current = timeoutId;\n registerTimeout?.(timeoutId);\n } else {\n // Clear any pending validation when segments become incomplete\n clearValidationTimeout();\n setValidationErrors([]);\n if (currentValue !== null) {\n handleChange(null);\n }\n }\n };\n\n const applyPastedCoordinate = (pastedValue: CoordinateValue) => {\n // Clear any pending validation when applying pasted coordinate\n clearValidationTimeout();\n\n const segments = convertDDToDisplaySegments(pastedValue, format);\n\n if (segments) {\n setSegmentValues(segments);\n setValidationErrors([]);\n handleChange(pastedValue);\n }\n };\n\n const flushPendingValidation = () => {\n if (validationTimeoutRef.current) {\n clearValidationTimeout();\n\n // Immediately validate if all segments are filled\n if (areAllSegmentsFilled(segmentValues)) {\n validateAndUpdateCoordinate(segmentValues);\n }\n }\n };\n\n const effectiveErrorMessage = useMemo(\n () => validationErrors[0] || null,\n [validationErrors],\n );\n\n return {\n currentValue,\n segmentValues,\n validationErrors,\n segmentConfigs,\n editableSegmentConfigs,\n handleSegmentChange,\n setSegmentValues,\n setValidationErrors,\n effectiveErrorMessage,\n applyPastedCoordinate,\n flushPendingValidation,\n };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"use-coordinate-field-state.js","names":[],"sources":["../../../src/hooks/coordinate-field/use-coordinate-field-state.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\nimport {\n type Dispatch,\n type SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n areAllSegmentsFilled,\n convertDDToDisplaySegments,\n convertDisplaySegmentsToDD,\n validateCoordinateSegments,\n} from '../../components/coordinate-field/coordinate-utils';\nimport { getSegmentConfigs } from '../../components/coordinate-field/segment-configs';\nimport type {\n CoordinateSystem,\n CoordinateValue,\n SegmentConfig,\n} from '../../components/coordinate-field/types';\n\n/** Options for the useCoordinateFieldState hook */\nexport interface UseCoordinateFieldStateOptions {\n /** Controlled coordinate value */\n value?: CoordinateValue | null;\n /** Default value for uncontrolled mode */\n defaultValue?: CoordinateValue;\n /** Coordinate format system (dd, ddm, dms, mgrs, utm) */\n format: CoordinateSystem;\n /** Callback when coordinate value changes */\n onChange?:\n | Dispatch<SetStateAction<CoordinateValue | null>>\n | ((value: CoordinateValue | null) => void);\n /** Callback for validation errors */\n onError?: (message: string, context?: Record<string, unknown>) => void;\n /** Register timeouts for cleanup on unmount */\n registerTimeout?: (timeoutId: NodeJS.Timeout) => void;\n}\n\n/** Return value from the useCoordinateFieldState hook */\nexport interface UseCoordinateFieldStateResult {\n /** Current coordinate value (null if incomplete/invalid) */\n currentValue: CoordinateValue | null;\n /** Array of display values for each segment */\n segmentValues: string[];\n /** Array of validation error messages */\n validationErrors: string[];\n /** All segment configurations including literals */\n segmentConfigs: SegmentConfig[];\n /** Only editable segment configurations */\n editableSegmentConfigs: SegmentConfig[];\n /** Handle change of a single segment */\n handleSegmentChange: (index: number, newValue: string) => void;\n /** Handle blur event for a segment */\n handleSegmentBlur: (index: number) => void;\n /** Set all segment values at once */\n setSegmentValues: (values: string[]) => void;\n /** Set validation errors */\n setValidationErrors: (errors: string[]) => void;\n /** First validation error or null */\n effectiveErrorMessage: string | null;\n /** Apply a pasted coordinate value */\n applyPastedCoordinate: (pastedValue: CoordinateValue) => void;\n /** Immediately run pending validation */\n flushPendingValidation: () => void;\n}\n\n/**\n * Manages coordinate segment values, validation, and format conversion\n *\n * @example\n * ```tsx\n * function CoordinateInputs() {\n * const [value, setValue] = useState<CoordinateValue | null>(null);\n * const { registerTimeout } = useTimeoutCleanup();\n *\n * const {\n * currentValue,\n * segmentValues,\n * validationErrors,\n * editableSegmentConfigs,\n * handleSegmentChange,\n * } = useCoordinateFieldState({\n * value,\n * format: 'ddm',\n * onChange: setValue,\n * onError: (msg) => console.error(msg),\n * registerTimeout,\n * });\n *\n * return (\n * <div>\n * {editableSegmentConfigs.map((config, i) => (\n * <input\n * key={i}\n * value={segmentValues[i]}\n * onChange={(e) => handleSegmentChange(i, e.target.value)}\n * placeholder={config.placeholder}\n * />\n * ))}\n * {validationErrors.map((error, i) => (\n * <span key={i}>{error}</span>\n * ))}\n * </div>\n * );\n * }\n * ```\n *\n * @param options - {@link UseCoordinateFieldStateOptions}\n * @param options.value - Controlled coordinate value.\n * @param options.defaultValue - Default value for uncontrolled mode.\n * @param options.format - Coordinate format system (dd, ddm, dms, mgrs, utm).\n * @param options.onChange - Callback when coordinate value changes.\n * @param options.onError - Callback for validation errors.\n * @param options.registerTimeout - Register timeouts for cleanup on unmount.\n * @returns {@link UseCoordinateFieldStateResult} Segment state, validation, and change handlers.\n */\nexport function useCoordinateFieldState({\n value,\n defaultValue,\n format,\n onChange,\n onError,\n registerTimeout,\n}: UseCoordinateFieldStateOptions): UseCoordinateFieldStateResult {\n const [internalValue, setInternalValue] = useState<CoordinateValue | null>(\n defaultValue || null,\n );\n const [validationErrors, setValidationErrors] = useState<string[]>([]);\n const validationTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const currentValue = value !== undefined ? value : internalValue;\n\n const clearValidationTimeout = () => {\n if (validationTimeoutRef.current) {\n clearTimeout(validationTimeoutRef.current);\n validationTimeoutRef.current = null;\n }\n };\n\n const handleChange = (newValue: CoordinateValue | null) => {\n if (value === undefined) {\n setInternalValue(newValue);\n }\n onChange?.(newValue);\n };\n\n const segmentConfigs = useMemo(() => getSegmentConfigs(format), [format]);\n\n const editableSegmentConfigs = useMemo(\n () => segmentConfigs.flat().filter((config) => config.type !== 'literal'),\n [segmentConfigs],\n );\n\n const [segmentValues, setSegmentValues] = useState<string[]>(() => {\n const initialValue = value !== undefined ? value : defaultValue;\n if (!initialValue) {\n return new Array(editableSegmentConfigs.length).fill('');\n }\n\n const segments = convertDDToDisplaySegments(initialValue, format);\n if (!segments) {\n return new Array(editableSegmentConfigs.length).fill('');\n }\n\n return segments;\n });\n\n const convertValueToSegmentsOrClear = useCallback(\n (valueToConvert: CoordinateValue | null) => {\n // Clear any pending validation when value changes\n clearValidationTimeout();\n\n const segments = valueToConvert\n ? convertDDToDisplaySegments(valueToConvert, format)\n : null;\n\n setSegmentValues(\n segments || new Array(editableSegmentConfigs.length).fill(''),\n );\n setValidationErrors([]);\n },\n [format, editableSegmentConfigs.length],\n );\n\n const prevFormatRef = useRef(format);\n\n useEffect(() => {\n if (prevFormatRef.current !== format) {\n prevFormatRef.current = format;\n const valueToConvert = value !== undefined ? value : internalValue;\n convertValueToSegmentsOrClear(valueToConvert);\n }\n }, [format, value, internalValue, convertValueToSegmentsOrClear]);\n\n useEffect(() => {\n if (value !== undefined) {\n convertValueToSegmentsOrClear(value);\n }\n }, [value, convertValueToSegmentsOrClear]);\n\n /**\n * Validates segment values and updates the coordinate state\n *\n * When validation fails, calls onError with \"Invalid coordinate value\" message\n * and context containing the detailed validation errors from @accelint/geo.\n *\n * @param updatedValues - Array of segment values to validate\n */\n const validateAndUpdateCoordinate = (updatedValues: string[]) => {\n const errors = validateCoordinateSegments(updatedValues, format);\n\n if (errors.length > 0) {\n setValidationErrors(errors);\n onError?.('Invalid coordinate value', {\n errors,\n format,\n segments: updatedValues,\n });\n handleChange(null);\n return;\n }\n\n const ddValue = convertDisplaySegmentsToDD(updatedValues, format);\n if (!ddValue) {\n const errorMsg = 'Invalid coordinate value';\n setValidationErrors([errorMsg]);\n onError?.(errorMsg, { format, segments: updatedValues });\n handleChange(null);\n return;\n }\n\n setValidationErrors([]);\n handleChange(ddValue);\n };\n\n const handleSegmentChange = (index: number, newValue: string) => {\n const updatedValues = [...segmentValues];\n\n // Normalize MGRS letter inputs (Band/Grid): uppercase only\n if (\n format === 'mgrs' &&\n (index === 1 || index === 2) &&\n /^[a-zA-Z]+$/.test(newValue)\n ) {\n updatedValues[index] = newValue.toUpperCase();\n } else {\n updatedValues[index] = newValue;\n }\n\n setSegmentValues(updatedValues);\n\n if (areAllSegmentsFilled(updatedValues)) {\n // Clear any pending validation timeout\n clearValidationTimeout();\n\n // Capture segment values at timeout creation\n const capturedValues = [...updatedValues];\n\n // Debounce validation by 400ms when all segments are full\n const timeoutId = setTimeout(() => {\n validateAndUpdateCoordinate(capturedValues);\n validationTimeoutRef.current = null;\n }, 400);\n\n validationTimeoutRef.current = timeoutId;\n registerTimeout?.(timeoutId);\n } else {\n // Clear any pending validation when segments become incomplete\n clearValidationTimeout();\n setValidationErrors([]);\n if (currentValue !== null) {\n handleChange(null);\n }\n }\n };\n\n const handleSegmentBlur = (index: number) => {\n // MGRS zone field: add leading zero to single-digit values on blur\n if (format === 'mgrs' && index === 0) {\n const currentVal = segmentValues[0];\n if (currentVal && currentVal.length === 1 && /^\\d$/.test(currentVal)) {\n const updatedValues = [...segmentValues];\n updatedValues[0] = currentVal.padStart(2, '0');\n setSegmentValues(updatedValues);\n }\n }\n };\n\n const applyPastedCoordinate = (pastedValue: CoordinateValue) => {\n // Clear any pending validation when applying pasted coordinate\n clearValidationTimeout();\n\n const segments = convertDDToDisplaySegments(pastedValue, format);\n\n if (segments) {\n setSegmentValues(segments);\n setValidationErrors([]);\n handleChange(pastedValue);\n }\n };\n\n const flushPendingValidation = () => {\n if (validationTimeoutRef.current) {\n clearValidationTimeout();\n\n // Immediately validate if all segments are filled\n if (areAllSegmentsFilled(segmentValues)) {\n validateAndUpdateCoordinate(segmentValues);\n }\n }\n };\n\n const effectiveErrorMessage = useMemo(\n () => validationErrors[0] || null,\n [validationErrors],\n );\n\n return {\n currentValue,\n segmentValues,\n validationErrors,\n segmentConfigs,\n editableSegmentConfigs,\n handleSegmentChange,\n handleSegmentBlur,\n setSegmentValues,\n setValidationErrors,\n effectiveErrorMessage,\n applyPastedCoordinate,\n flushPendingValidation,\n };\n}\n"],"mappings":"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"}
@@ -86,6 +86,26 @@ function useCoordinatePaste({ onValueApplied, onError }) {
86
86
  if (firstMatch) setSelectedDisambiguationFormat(firstMatch.format);
87
87
  setShowDisambiguationModal(true);
88
88
  };
89
+ /**
90
+ * Normalizes MGRS coordinate input to a standard format.
91
+ *
92
+ * - Converts all letters to uppercase
93
+ * - Adds leading zero to single-digit grid zones (e.g., "6R" → "06R")
94
+ * - Handles both spaced ("6R YP 12345 67890") and compact ("6RYP1234567890") formats
95
+ *
96
+ * @param input - Raw MGRS coordinate string
97
+ * @returns Normalized MGRS coordinate string
98
+ *
99
+ * @example
100
+ * normalizeMgrsInput("6r yp 12345 67890") // → "06R YP 12345 67890"
101
+ * normalizeMgrsInput("6ryp1234567890") // → "06RYP1234567890"
102
+ */
103
+ const normalizeMgrsInput = (input) => {
104
+ let normalized = input.toUpperCase();
105
+ const match = normalized.match(/^(\d)([A-Z])/);
106
+ if (match?.[1]) normalized = match[1].padStart(2, "0") + normalized.slice(1);
107
+ return normalized;
108
+ };
89
109
  const handleCoordinatePaste = (pastedText) => {
90
110
  const allMatches = parseCoordinatePaste(pastedText);
91
111
  if (allMatches.length === 0) {
@@ -97,10 +117,13 @@ function useCoordinatePaste({ onValueApplied, onError }) {
97
117
  else handlePasteMultipleMatches(matches);
98
118
  };
99
119
  const handleInputPaste = (e) => {
100
- const pastedText = e.clipboardData?.getData("text/plain");
101
- if (pastedText && isCompleteCoordinate(pastedText)) {
102
- e.preventDefault();
103
- handleCoordinatePaste(pastedText);
120
+ const rawPastedText = e.clipboardData?.getData("text/plain");
121
+ if (rawPastedText) {
122
+ const pastedText = normalizeMgrsInput(rawPastedText);
123
+ if (isCompleteCoordinate(pastedText)) {
124
+ e.preventDefault();
125
+ handleCoordinatePaste(pastedText);
126
+ }
104
127
  }
105
128
  };
106
129
  const cleanupDisambiguationModal = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"use-coordinate-paste.js","names":[],"sources":["../../../src/hooks/coordinate-field/use-coordinate-paste.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\nimport { useState } from 'react';\nimport {\n deduplicateMatchesByLocation,\n isCompleteCoordinate,\n parseCoordinatePaste,\n} from '../../components/coordinate-field/coordinate-utils';\nimport type {\n CoordinateSystem,\n CoordinateValue,\n ParsedCoordinateMatch,\n} from '../../components/coordinate-field/types';\n\n/** Options for the useCoordinatePaste hook */\nexport interface UseCoordinatePasteOptions {\n /** Callback when a coordinate value is successfully parsed and applied */\n onValueApplied: (value: CoordinateValue) => void;\n /** Optional error callback for invalid paste attempts */\n onError?: (message: string, context?: Record<string, unknown>) => void;\n}\n\n/** Return value from the useCoordinatePaste hook */\nexport interface UseCoordinatePasteResult {\n /** Array of parsed coordinate matches for disambiguation */\n disambiguationMatches: ParsedCoordinateMatch[];\n /** Whether the disambiguation modal is visible */\n showDisambiguationModal: boolean;\n /** Currently selected format in disambiguation modal */\n selectedDisambiguationFormat: CoordinateSystem | null;\n /** Paste event handler for coordinate input */\n handleInputPaste: (e: React.ClipboardEvent<HTMLDivElement>) => void;\n /** Confirm selection in disambiguation modal */\n handleDisambiguationSelect: () => void;\n /** Control disambiguation modal visibility */\n setShowDisambiguationModal: (show: boolean) => void;\n /** Set the selected format in disambiguation modal */\n setSelectedDisambiguationFormat: (format: CoordinateSystem | null) => void;\n /** Reset disambiguation modal state */\n cleanupDisambiguationModal: () => void;\n}\n\n/**\n * Handles paste events with coordinate parsing and disambiguation when multiple formats match\n *\n * @example\n * ```tsx\n * function CoordinateFieldWithPaste() {\n * const [value, setValue] = useState<CoordinateValue | null>(null);\n *\n * const {\n * disambiguationMatches,\n * showDisambiguationModal,\n * selectedDisambiguationFormat,\n * handleInputPaste,\n * handleDisambiguationSelect,\n * setShowDisambiguationModal,\n * setSelectedDisambiguationFormat,\n * } = useCoordinatePaste({\n * onValueApplied: setValue,\n * onError: (msg) => console.error(msg),\n * });\n *\n * return (\n * <>\n * <div onPaste={handleInputPaste}>\n * // ...Coordinate input segments\n * </div>\n * {showDisambiguationModal && (\n * <Dialog onClose={() => setShowDisambiguationModal(false)}>\n * {disambiguationMatches.map((match) => (\n * <Radio\n * key={match.format}\n * value={match.format}\n * isSelected={selectedDisambiguationFormat === match.format}\n * onChange={() => setSelectedDisambiguationFormat(match.format)}\n * >\n * {match.format}: {match.matched}\n * </Radio>\n * ))}\n * <Button onPress={handleDisambiguationSelect}>Confirm</Button>\n * </Dialog>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @param options - {@link UseCoordinatePasteOptions}\n * @param options.onValueApplied - Callback when a coordinate value is successfully parsed and applied.\n * @param options.onError - Optional error callback for invalid paste attempts.\n * @returns {@link UseCoordinatePasteResult} Paste handling utilities and disambiguation state.\n */\nexport function useCoordinatePaste({\n onValueApplied,\n onError,\n}: UseCoordinatePasteOptions): UseCoordinatePasteResult {\n const [disambiguationMatches, setDisambiguationMatches] = useState<\n ParsedCoordinateMatch[]\n >([]);\n const [showDisambiguationModal, setShowDisambiguationModal] = useState(false);\n const [selectedDisambiguationFormat, setSelectedDisambiguationFormat] =\n useState<CoordinateSystem | null>(null);\n\n /**\n * Handles paste failure when no coordinate formats match\n * Calls onError with \"Invalid coordinate format\" message\n */\n const handlePasteNoMatches = (pastedText: string) => {\n const errorMsg = 'Invalid coordinate format';\n onError?.(errorMsg, { pastedText });\n };\n\n const handlePasteSingleMatch = (match: ParsedCoordinateMatch | undefined) => {\n if (match) {\n onValueApplied(match.value);\n }\n };\n\n const handlePasteMultipleMatches = (matches: ParsedCoordinateMatch[]) => {\n setDisambiguationMatches(matches);\n const firstMatch = matches[0];\n if (firstMatch) {\n setSelectedDisambiguationFormat(firstMatch.format);\n }\n setShowDisambiguationModal(true);\n };\n\n const handleCoordinatePaste = (pastedText: string) => {\n const allMatches = parseCoordinatePaste(pastedText);\n\n if (allMatches.length === 0) {\n handlePasteNoMatches(pastedText);\n return;\n }\n\n // Deduplicate matches by location - only show modal for different locations\n const matches = deduplicateMatchesByLocation(allMatches);\n\n if (matches.length === 1) {\n handlePasteSingleMatch(matches[0]);\n } else {\n handlePasteMultipleMatches(matches);\n }\n };\n\n const handleInputPaste = (e: React.ClipboardEvent<HTMLDivElement>) => {\n const pastedText = e.clipboardData?.getData('text/plain');\n if (pastedText && isCompleteCoordinate(pastedText)) {\n e.preventDefault();\n handleCoordinatePaste(pastedText);\n }\n };\n\n const cleanupDisambiguationModal = () => {\n setShowDisambiguationModal(false);\n setDisambiguationMatches([]);\n setSelectedDisambiguationFormat(null);\n };\n\n const handleDisambiguationSelect = () => {\n if (selectedDisambiguationFormat) {\n const match = disambiguationMatches.find(\n (m) => m.format === selectedDisambiguationFormat,\n );\n if (match) {\n onValueApplied(match.value);\n }\n }\n cleanupDisambiguationModal();\n };\n\n return {\n disambiguationMatches,\n showDisambiguationModal,\n selectedDisambiguationFormat,\n handleInputPaste,\n handleDisambiguationSelect,\n setShowDisambiguationModal,\n setSelectedDisambiguationFormat,\n cleanupDisambiguationModal,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,SAAgB,mBAAmB,EACjC,gBACA,WACsD;CACtD,MAAM,CAAC,uBAAuB,4BAA4B,SAExD,EAAE,CAAC;CACL,MAAM,CAAC,yBAAyB,8BAA8B,SAAS,MAAM;CAC7E,MAAM,CAAC,8BAA8B,mCACnC,SAAkC,KAAK;;;;;CAMzC,MAAM,wBAAwB,eAAuB;AAEnD,YADiB,6BACG,EAAE,YAAY,CAAC;;CAGrC,MAAM,0BAA0B,UAA6C;AAC3E,MAAI,MACF,gBAAe,MAAM,MAAM;;CAI/B,MAAM,8BAA8B,YAAqC;AACvE,2BAAyB,QAAQ;EACjC,MAAM,aAAa,QAAQ;AAC3B,MAAI,WACF,iCAAgC,WAAW,OAAO;AAEpD,6BAA2B,KAAK;;CAGlC,MAAM,yBAAyB,eAAuB;EACpD,MAAM,aAAa,qBAAqB,WAAW;AAEnD,MAAI,WAAW,WAAW,GAAG;AAC3B,wBAAqB,WAAW;AAChC;;EAIF,MAAM,UAAU,6BAA6B,WAAW;AAExD,MAAI,QAAQ,WAAW,EACrB,wBAAuB,QAAQ,GAAG;MAElC,4BAA2B,QAAQ;;CAIvC,MAAM,oBAAoB,MAA4C;EACpE,MAAM,aAAa,EAAE,eAAe,QAAQ,aAAa;AACzD,MAAI,cAAc,qBAAqB,WAAW,EAAE;AAClD,KAAE,gBAAgB;AAClB,yBAAsB,WAAW;;;CAIrC,MAAM,mCAAmC;AACvC,6BAA2B,MAAM;AACjC,2BAAyB,EAAE,CAAC;AAC5B,kCAAgC,KAAK;;CAGvC,MAAM,mCAAmC;AACvC,MAAI,8BAA8B;GAChC,MAAM,QAAQ,sBAAsB,MACjC,MAAM,EAAE,WAAW,6BACrB;AACD,OAAI,MACF,gBAAe,MAAM,MAAM;;AAG/B,8BAA4B;;AAG9B,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
1
+ {"version":3,"file":"use-coordinate-paste.js","names":[],"sources":["../../../src/hooks/coordinate-field/use-coordinate-paste.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\nimport { useState } from 'react';\nimport {\n deduplicateMatchesByLocation,\n isCompleteCoordinate,\n parseCoordinatePaste,\n} from '../../components/coordinate-field/coordinate-utils';\nimport type {\n CoordinateSystem,\n CoordinateValue,\n ParsedCoordinateMatch,\n} from '../../components/coordinate-field/types';\n\n/** Options for the useCoordinatePaste hook */\nexport interface UseCoordinatePasteOptions {\n /** Callback when a coordinate value is successfully parsed and applied */\n onValueApplied: (value: CoordinateValue) => void;\n /** Optional error callback for invalid paste attempts */\n onError?: (message: string, context?: Record<string, unknown>) => void;\n}\n\n/** Return value from the useCoordinatePaste hook */\nexport interface UseCoordinatePasteResult {\n /** Array of parsed coordinate matches for disambiguation */\n disambiguationMatches: ParsedCoordinateMatch[];\n /** Whether the disambiguation modal is visible */\n showDisambiguationModal: boolean;\n /** Currently selected format in disambiguation modal */\n selectedDisambiguationFormat: CoordinateSystem | null;\n /** Paste event handler for coordinate input */\n handleInputPaste: (e: React.ClipboardEvent<HTMLDivElement>) => void;\n /** Confirm selection in disambiguation modal */\n handleDisambiguationSelect: () => void;\n /** Control disambiguation modal visibility */\n setShowDisambiguationModal: (show: boolean) => void;\n /** Set the selected format in disambiguation modal */\n setSelectedDisambiguationFormat: (format: CoordinateSystem | null) => void;\n /** Reset disambiguation modal state */\n cleanupDisambiguationModal: () => void;\n}\n\n/**\n * Handles paste events with coordinate parsing and disambiguation when multiple formats match\n *\n * @example\n * ```tsx\n * function CoordinateFieldWithPaste() {\n * const [value, setValue] = useState<CoordinateValue | null>(null);\n *\n * const {\n * disambiguationMatches,\n * showDisambiguationModal,\n * selectedDisambiguationFormat,\n * handleInputPaste,\n * handleDisambiguationSelect,\n * setShowDisambiguationModal,\n * setSelectedDisambiguationFormat,\n * } = useCoordinatePaste({\n * onValueApplied: setValue,\n * onError: (msg) => console.error(msg),\n * });\n *\n * return (\n * <>\n * <div onPaste={handleInputPaste}>\n * // ...Coordinate input segments\n * </div>\n * {showDisambiguationModal && (\n * <Dialog onClose={() => setShowDisambiguationModal(false)}>\n * {disambiguationMatches.map((match) => (\n * <Radio\n * key={match.format}\n * value={match.format}\n * isSelected={selectedDisambiguationFormat === match.format}\n * onChange={() => setSelectedDisambiguationFormat(match.format)}\n * >\n * {match.format}: {match.matched}\n * </Radio>\n * ))}\n * <Button onPress={handleDisambiguationSelect}>Confirm</Button>\n * </Dialog>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @param options - {@link UseCoordinatePasteOptions}\n * @param options.onValueApplied - Callback when a coordinate value is successfully parsed and applied.\n * @param options.onError - Optional error callback for invalid paste attempts.\n * @returns {@link UseCoordinatePasteResult} Paste handling utilities and disambiguation state.\n */\nexport function useCoordinatePaste({\n onValueApplied,\n onError,\n}: UseCoordinatePasteOptions): UseCoordinatePasteResult {\n const [disambiguationMatches, setDisambiguationMatches] = useState<\n ParsedCoordinateMatch[]\n >([]);\n const [showDisambiguationModal, setShowDisambiguationModal] = useState(false);\n const [selectedDisambiguationFormat, setSelectedDisambiguationFormat] =\n useState<CoordinateSystem | null>(null);\n\n /**\n * Handles paste failure when no coordinate formats match\n * Calls onError with \"Invalid coordinate format\" message\n */\n const handlePasteNoMatches = (pastedText: string) => {\n const errorMsg = 'Invalid coordinate format';\n onError?.(errorMsg, { pastedText });\n };\n\n const handlePasteSingleMatch = (match: ParsedCoordinateMatch | undefined) => {\n if (match) {\n onValueApplied(match.value);\n }\n };\n\n const handlePasteMultipleMatches = (matches: ParsedCoordinateMatch[]) => {\n setDisambiguationMatches(matches);\n const firstMatch = matches[0];\n if (firstMatch) {\n setSelectedDisambiguationFormat(firstMatch.format);\n }\n setShowDisambiguationModal(true);\n };\n\n /**\n * Normalizes MGRS coordinate input to a standard format.\n *\n * - Converts all letters to uppercase\n * - Adds leading zero to single-digit grid zones (e.g., \"6R\" → \"06R\")\n * - Handles both spaced (\"6R YP 12345 67890\") and compact (\"6RYP1234567890\") formats\n *\n * @param input - Raw MGRS coordinate string\n * @returns Normalized MGRS coordinate string\n *\n * @example\n * normalizeMgrsInput(\"6r yp 12345 67890\") // → \"06R YP 12345 67890\"\n * normalizeMgrsInput(\"6ryp1234567890\") // → \"06RYP1234567890\"\n */\n const normalizeMgrsInput = (input: string): string => {\n let normalized = input.toUpperCase();\n\n const match = normalized.match(/^(\\d)([A-Z])/);\n\n if (match?.[1]) {\n // Add leading zero to single-digit grid zones\n normalized = match[1].padStart(2, '0') + normalized.slice(1);\n }\n\n return normalized;\n };\n\n const handleCoordinatePaste = (pastedText: string) => {\n const allMatches = parseCoordinatePaste(pastedText);\n\n if (allMatches.length === 0) {\n handlePasteNoMatches(pastedText);\n return;\n }\n\n // Deduplicate matches by location - only show modal for different locations\n const matches = deduplicateMatchesByLocation(allMatches);\n\n if (matches.length === 1) {\n handlePasteSingleMatch(matches[0]);\n } else {\n handlePasteMultipleMatches(matches);\n }\n };\n\n const handleInputPaste = (e: React.ClipboardEvent<HTMLDivElement>) => {\n const rawPastedText = e.clipboardData?.getData('text/plain');\n if (rawPastedText) {\n const pastedText = normalizeMgrsInput(rawPastedText);\n\n if (isCompleteCoordinate(pastedText)) {\n e.preventDefault();\n handleCoordinatePaste(pastedText);\n }\n }\n };\n\n const cleanupDisambiguationModal = () => {\n setShowDisambiguationModal(false);\n setDisambiguationMatches([]);\n setSelectedDisambiguationFormat(null);\n };\n\n const handleDisambiguationSelect = () => {\n if (selectedDisambiguationFormat) {\n const match = disambiguationMatches.find(\n (m) => m.format === selectedDisambiguationFormat,\n );\n if (match) {\n onValueApplied(match.value);\n }\n }\n cleanupDisambiguationModal();\n };\n\n return {\n disambiguationMatches,\n showDisambiguationModal,\n selectedDisambiguationFormat,\n handleInputPaste,\n handleDisambiguationSelect,\n setShowDisambiguationModal,\n setSelectedDisambiguationFormat,\n cleanupDisambiguationModal,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,SAAgB,mBAAmB,EACjC,gBACA,WACsD;CACtD,MAAM,CAAC,uBAAuB,4BAA4B,SAExD,EAAE,CAAC;CACL,MAAM,CAAC,yBAAyB,8BAA8B,SAAS,MAAM;CAC7E,MAAM,CAAC,8BAA8B,mCACnC,SAAkC,KAAK;;;;;CAMzC,MAAM,wBAAwB,eAAuB;AAEnD,YADiB,6BACG,EAAE,YAAY,CAAC;;CAGrC,MAAM,0BAA0B,UAA6C;AAC3E,MAAI,MACF,gBAAe,MAAM,MAAM;;CAI/B,MAAM,8BAA8B,YAAqC;AACvE,2BAAyB,QAAQ;EACjC,MAAM,aAAa,QAAQ;AAC3B,MAAI,WACF,iCAAgC,WAAW,OAAO;AAEpD,6BAA2B,KAAK;;;;;;;;;;;;;;;;CAiBlC,MAAM,sBAAsB,UAA0B;EACpD,IAAI,aAAa,MAAM,aAAa;EAEpC,MAAM,QAAQ,WAAW,MAAM,eAAe;AAE9C,MAAI,QAAQ,GAEV,cAAa,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,WAAW,MAAM,EAAE;AAG9D,SAAO;;CAGT,MAAM,yBAAyB,eAAuB;EACpD,MAAM,aAAa,qBAAqB,WAAW;AAEnD,MAAI,WAAW,WAAW,GAAG;AAC3B,wBAAqB,WAAW;AAChC;;EAIF,MAAM,UAAU,6BAA6B,WAAW;AAExD,MAAI,QAAQ,WAAW,EACrB,wBAAuB,QAAQ,GAAG;MAElC,4BAA2B,QAAQ;;CAIvC,MAAM,oBAAoB,MAA4C;EACpE,MAAM,gBAAgB,EAAE,eAAe,QAAQ,aAAa;AAC5D,MAAI,eAAe;GACjB,MAAM,aAAa,mBAAmB,cAAc;AAEpD,OAAI,qBAAqB,WAAW,EAAE;AACpC,MAAE,gBAAgB;AAClB,0BAAsB,WAAW;;;;CAKvC,MAAM,mCAAmC;AACvC,6BAA2B,MAAM;AACjC,2BAAyB,EAAE,CAAC;AAC5B,kCAAgC,KAAK;;CAGvC,MAAM,mCAAmC;AACvC,MAAI,8BAA8B;GAChC,MAAM,QAAQ,sBAAsB,MACjC,MAAM,EAAE,WAAW,6BACrB;AACD,OAAI,MACF,gBAAe,MAAM,MAAM;;AAG/B,8BAA4B;;AAG9B,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Copyright 2026 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 { Ref } from "react";
14
+
15
+ //#region src/hooks/use-prevent-scroll-focus/index.d.ts
16
+
17
+ /**
18
+ * Custom hook that prevents scroll-into-view behavior when focus is triggered
19
+ * on an element and its child inputs.
20
+ *
21
+ * This hook overrides the native focus() method on both the target element and
22
+ * any input elements within it to always pass { preventScroll: true }, preventing
23
+ * the browser from automatically scrolling the element into view when focused.
24
+ *
25
+ * @param ref - External ref to merge with internal ref
26
+ * @returns A ref callback that overrides focus behavior with preventScroll
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * function MyComponent({ ref, ...props }) {
31
+ * const handleRef = usePreventScrollFocus(ref);
32
+ * return <label ref={handleRef}>...</label>;
33
+ * }
34
+ * ```
35
+ */
36
+ declare function usePreventScrollFocus<T extends HTMLElement = HTMLLabelElement>(ref: Ref<T> | null | undefined): (node: T | null) => void;
37
+ //#endregion
38
+ export { usePreventScrollFocus };
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ import { useCallback, useRef } from "react";
15
+
16
+ //#region src/hooks/use-prevent-scroll-focus/index.ts
17
+ /**
18
+ * Custom hook that prevents scroll-into-view behavior when focus is triggered
19
+ * on an element and its child inputs.
20
+ *
21
+ * This hook overrides the native focus() method on both the target element and
22
+ * any input elements within it to always pass { preventScroll: true }, preventing
23
+ * the browser from automatically scrolling the element into view when focused.
24
+ *
25
+ * @param ref - External ref to merge with internal ref
26
+ * @returns A ref callback that overrides focus behavior with preventScroll
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * function MyComponent({ ref, ...props }) {
31
+ * const handleRef = usePreventScrollFocus(ref);
32
+ * return <label ref={handleRef}>...</label>;
33
+ * }
34
+ * ```
35
+ */
36
+ function usePreventScrollFocus(ref) {
37
+ const internalRef = useRef(null);
38
+ return useCallback((node) => {
39
+ internalRef.current = node;
40
+ if (typeof ref === "function") ref(node);
41
+ else if (ref) ref.current = node;
42
+ if (node) {
43
+ try {
44
+ const originalFocus = node.focus;
45
+ node.focus = function(options) {
46
+ originalFocus.call(this, {
47
+ ...options,
48
+ preventScroll: true
49
+ });
50
+ };
51
+ } catch {}
52
+ node.querySelectorAll("input").forEach((input) => {
53
+ try {
54
+ const originalInputFocus = input.focus;
55
+ input.focus = function(options) {
56
+ originalInputFocus.call(this, {
57
+ ...options,
58
+ preventScroll: true
59
+ });
60
+ };
61
+ } catch {}
62
+ });
63
+ }
64
+ }, [ref]);
65
+ }
66
+
67
+ //#endregion
68
+ export { usePreventScrollFocus };
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/use-prevent-scroll-focus/index.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\nimport { useCallback, useRef } from 'react';\nimport type { Ref } from 'react';\n\n/**\n * Custom hook that prevents scroll-into-view behavior when focus is triggered\n * on an element and its child inputs.\n *\n * This hook overrides the native focus() method on both the target element and\n * any input elements within it to always pass { preventScroll: true }, preventing\n * the browser from automatically scrolling the element into view when focused.\n *\n * @param ref - External ref to merge with internal ref\n * @returns A ref callback that overrides focus behavior with preventScroll\n *\n * @example\n * ```tsx\n * function MyComponent({ ref, ...props }) {\n * const handleRef = usePreventScrollFocus(ref);\n * return <label ref={handleRef}>...</label>;\n * }\n * ```\n */\nexport function usePreventScrollFocus<T extends HTMLElement = HTMLLabelElement>(\n ref: Ref<T> | null | undefined,\n) {\n const internalRef = useRef<T>(null);\n\n const handleRef = useCallback(\n (node: T | null) => {\n internalRef.current = node;\n\n // Merge with external ref\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as any).current = node;\n }\n\n if (node) {\n // Override focus on the element (skip in test environments where focus is read-only)\n try {\n const originalFocus = node.focus;\n node.focus = function (options?: FocusOptions) {\n originalFocus.call(this, { ...options, preventScroll: true });\n };\n } catch {\n // In test environments (jsdom), focus is read-only and cannot be overridden\n }\n\n // Also override focus on any input elements inside\n const inputs = node.querySelectorAll('input');\n inputs.forEach((input) => {\n try {\n const originalInputFocus = input.focus;\n input.focus = function (options?: FocusOptions) {\n originalInputFocus.call(this, {\n ...options,\n preventScroll: true,\n });\n };\n } catch {\n // In test environments (jsdom), focus is read-only and cannot be overridden\n }\n });\n }\n },\n [ref],\n );\n\n return handleRef;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAgB,sBACd,KACA;CACA,MAAM,cAAc,OAAU,KAAK;AA4CnC,QA1CkB,aACf,SAAmB;AAClB,cAAY,UAAU;AAGtB,MAAI,OAAO,QAAQ,WACjB,KAAI,KAAK;WACA,IACT,CAAC,IAAY,UAAU;AAGzB,MAAI,MAAM;AAER,OAAI;IACF,MAAM,gBAAgB,KAAK;AAC3B,SAAK,QAAQ,SAAU,SAAwB;AAC7C,mBAAc,KAAK,MAAM;MAAE,GAAG;MAAS,eAAe;MAAM,CAAC;;WAEzD;AAMR,GADe,KAAK,iBAAiB,QAAQ,CACtC,SAAS,UAAU;AACxB,QAAI;KACF,MAAM,qBAAqB,MAAM;AACjC,WAAM,QAAQ,SAAU,SAAwB;AAC9C,yBAAmB,KAAK,MAAM;OAC5B,GAAG;OACH,eAAe;OAChB,CAAC;;YAEE;KAGR;;IAGN,CAAC,IAAI,CACN"}
package/dist/index.d.ts CHANGED
@@ -309,9 +309,10 @@ import { UseCoordinatePasteOptions, UseCoordinatePasteResult, useCoordinatePaste
309
309
  import { UseCoordinateFieldResult, useCoordinateField } from "./hooks/coordinate-field/use-coordinate-field.js";
310
310
  import { useCardInteractions, useColumnInteractions } from "./hooks/kanban/index.js";
311
311
  import { UseFrameDelayOptions, UseFrameDelayResult, useFrameDelay } from "./hooks/use-frame-delay/index.js";
312
+ import { usePreventScrollFocus } from "./hooks/use-prevent-scroll-focus/index.js";
312
313
  import { useTreeActions } from "./hooks/use-tree/actions/index.js";
313
314
  import { useTreeState } from "./hooks/use-tree/state/index.js";
314
315
  import { isSlottedContextValue } from "./lib/utils.js";
315
316
  import { PortalProvider } from "./providers/portal.js";
316
317
  import { ThemeMode, ThemeProvider, useTheme } from "./providers/theme-provider.js";
317
- export { Accordion, AccordionContext, AccordionGroup, type AccordionGroupProps, AccordionHeader, type AccordionHeaderProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, type AccordionStyleVariants, AccordionTrigger, type AccordionTriggerProps, ActionBar, type ActionBarProps, type AriaAttributes, type AriaAttributesWithRef, Audio, type AudioProps, Avatar, AvatarContext, type AvatarProps, AvatarProvider, Badge, BadgeContext, type BadgeProps, BadgeProvider, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, Button, ButtonContext, type ButtonProps, ButtonProvider, type ButtonStyleVariants, COORDINATE_EPSILON, COORDINATE_ERROR_MESSAGES, COORDINATE_FORMAT_LABELS, COORDINATE_FORMAT_NAMES, COORDINATE_SYSTEMS, Carousel, CarouselContext, type CarouselData, CarouselGallery, type CarouselGalleryProps, CarouselNext, CarouselPosition, CarouselPrevious, type CarouselProps, CarouselProvider, CarouselSelect, type CarouselSelectProps, CarouselViewer, type CarouselViewerProps, type ChainedEvents, Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, type CheckboxGroupProps, type CheckboxProps, type ChildrenRenderProps, Chip, ChipContext, type ChipContextValue, ChipList, type ChipListProps, ChipListRenderingContext, type ChipProps, ChipProvider, type ClassNameRenderProps, type ClassNames, ClassificationBadge, ClassificationBadgeContext, type ClassificationBadgeProps, ClassificationBadgeProvider, ClassificationBanner, ClassificationBannerContext, type ClassificationBannerProps, ClassificationBannerProvider, Clock, type ClockProps, CloneAction, ColorPicker, type ColorPickerProps, CombinatorSelector, ComboBoxField, ComboBoxFieldContext, type ComboBoxFieldProps, ComboBoxFieldProvider, CoordinateField, CoordinateFieldContext, type CoordinateFieldProps, CoordinateFieldProvider, type CoordinateFieldState, CoordinateFieldStateContext, CoordinateFieldStateProvider, type CoordinateFormatResult, CoordinateSegment, type CoordinateSegmentProps, type CoordinateSystem, type CoordinateValue, DateField, type DateFieldProps, type DefaultRQBProps, DeferredCollection, type DeferredCollectionProps, DeletableChip, type DeletableChipProps, DetailsList, DetailsListContext, DetailsListLabel, type DetailsListLabelProps, type DetailsListProps, DetailsListProvider, DetailsListValue, type DetailsListValueProps, Dialog, DialogContent, DialogContext, DialogFooter, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, Divider, DividerContext, type DividerProps, DividerProvider, type DragAndDropConfig, DragContext, Drawer, DrawerBack, DrawerClose, type DrawerCloseEvent, type DrawerCloseProps, DrawerContent, DrawerContext, type DrawerContextValue, type DrawerEvent, DrawerEventHandlers, DrawerEventNamespace, DrawerEventTypes, DrawerFooter, DrawerHeader, DrawerHeaderTitle, DrawerLayout, DrawerLayoutMain, type DrawerLayoutProps, DrawerMenu, DrawerMenuItem, type DrawerMenuItemProps, type DrawerMenuProps, type DrawerOpenEvent, DrawerPanel, type DrawerProps, type DrawerTitleProps, type DrawerToggleEvent, DrawerTrigger, type DrawerTriggerProps, DrawerView, type DropTargetInfo, EXPECTED_SEGMENT_COUNTS, type Field, Flashcard, FlashcardAdditionalData, type FlashcardComponentProps, FlashcardContext, FlashcardDetailsLabel, FlashcardDetailsList, type FlashcardDetailsListProps, FlashcardDetailsValue, FlashcardHero, type FlashcardProps, FloatingCard, type FloatingCardContextValue, type FloatingCardHeaderAction, type FloatingCardProps, FloatingCardProvider, type FloatingCardProviderProps, FullscreenButton, type FullscreenButtonProps, GROUP_SEPARATOR, Gantt, GanttBlock, GanttBracketClose, GanttBracketOpen, GanttContentContainer, GanttContentRow, GanttIconMarker, GanttMarker, type GanttMetThresholdData, GanttPanelContainer, GanttPanelRow, type GanttProviderProps, type GanttRowElementColorProp, GanttSpacer, type GanttSpacerProps, type GanttThreshold, type GanttThresholdProps, type GanttTimescale, HeaderColumnAction, type HeaderColumnActionKey, Hero, HeroContext, type HeroProps, HeroSubtitle, HeroTitle, Hotkey, HotkeyContext, type HotkeyProps, HotkeyProvider, HotkeySet, Icon, IconContext, type IconProps, IconProvider, Input, InputContext, type InputProps, Kanban, KanbanCard, KanbanCardBody, type KanbanCardData, KanbanCardHeader, KanbanCardHeaderActions, KanbanCardHeaderTitle, type KanbanCardProps, type KanbanColContentActionProps, type KanbanColContentProps, type KanbanColProps, KanbanColumn, KanbanColumnActions, KanbanColumnContainer, KanbanColumnContent, type KanbanColumnData, KanbanColumnHeader, KanbanColumnHeaderActions, KanbanColumnHeaderDragHandle, KanbanColumnHeaderTitle, type KanbanComponentProps, type KanbanContextData, KanbanHeader, KanbanHeaderActions, KanbanHeaderSearch, KanbanHeaderTitle, type KanbanMenuProps, type KanbanProps, KanbanProvider, type KanbanProviderProps, type KanbanSearchProps, Label, LabelContext, type LabelProps, LabelProvider, Lines, type LinesProps, Link, LinkButton, LinkButtonContext, type LinkButtonProps, LinkButtonProvider, type LinkProps, LinkProvider, List, ListContext, ListItem, ListItemContent, type ListItemContentProps, ListItemDescription, type ListItemDescriptionProps, type ListItemProps, ListItemTitle, type ListItemTitleProps, type ListItemVariant, type ListProps, LockAction, MediaControls, MediaControlsContext, type MediaControlsContextValue, type MediaControlsProps, MediaControlsProvider, Menu, MenuContext, MenuItem, MenuItemDescription, MenuItemLabel, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, MenuSubmenu, MenuTrigger, type MoveCard, type MoveCardValidationParams, type MoveCardValidationResult, MuteButton, type MuteButtonProps, Notice, type NoticeActionEvent, type NoticeColor, type NoticeContent, type NoticeDequeueEvent, NoticeEventNamespace, NoticeEventTypes, NoticeIcon, type NoticeIconProps, NoticeList, type NoticeListProps, type NoticeProps, type NoticeQueueEvent, Options, OptionsContext, type OptionsDataItem, OptionsItem, OptionsItemContent, OptionsItemDescription, OptionsItemLabel, type OptionsItemProps, type OptionsProps, OptionsSection, type OptionsSectionProps, Pagination, PaginationContext, type PaginationContextValue, PaginationNext, type PaginationNextProps, PaginationPages, type PaginationPagesProps, PaginationPrev, type PaginationPrevProps, type PaginationProps, type ParsedCoordinateMatch, PlayButton, type PlayButtonProps, PlaybackRateButton, type PlaybackRateButtonProps, Popover, PopoverContent, PopoverFooter, type PopoverProps, PopoverTitle, PopoverTrigger, type PopoverTriggerProps, PortalProvider, type ProviderProps, QueryBuilder, type QueryBuilderContextType, type QueryBuilderProps, type QueryBuilderValueEditors, Radio, RadioContext, RadioGroup, RadioGroupContext, type RadioGroupProps, type RadioProps, RemoveRuleAction, type RenderProps, type RenderPropsChildren, type RenderPropsClassName, type RenderPropsStyle, type RuleGroupType, SearchField, SearchFieldContext, type SearchFieldProps, SearchFieldProvider, SeekButton, type SeekButtonProps, type SegmentConfig, type SegmentType, SelectField, SelectFieldContext, type SelectFieldProps, SelectFieldProvider, SelectableChip, type SelectableChipProps, Sidenav, SidenavAvatar, type SidenavAvatarProps, type SidenavCloseEvent, SidenavContent, type SidenavContentProps, SidenavContext, type SidenavContextValue, type SidenavDividerProps, type SidenavEvent, SidenavEventNamespace, SidenavEventTypes, SidenavFooter, type SidenavFooterProps, SidenavHeader, type SidenavHeaderProps, SidenavItem, type SidenavItemProps, SidenavLink, type SidenavLinkProps, SidenavMenu, SidenavMenuItem, type SidenavMenuItemProps, type SidenavMenuProps, type SidenavOpenEvent, type SidenavProps, type SidenavToggleEvent, SidenavTrigger, type SidenavTriggerProps, type SimpleEvents, Skeleton, type SkeletonProps, Slider, type SliderMarker, type SliderMarkersConfig, type SliderProps, type SlottedValue, SortDirection, type SortDirectionState, StatusIndicator, type StatusIndicatorProps, type StylePropRenderProps, type StyleRenderProps, Switch, SwitchContext, type SwitchProps, SwitchProvider, Tab, TabContext, TabList, TabPanel, type TabProps, TabProvider, TabStyleDefaults, type TabStyleProps, Table, type TableBodyProps, type TableCellProps, TableContext, type TableContextValue, type TableHeaderCellProps, type TableHeaderProps, type TableProps, type TableRowProps, Tabs, TabsContext, type TabsProps, TabsProvider, type TargetedEvents, TextAreaField, TextAreaFieldContext, type TextAreaFieldProps, TextAreaFieldProvider, TextField, TextFieldContext, type TextFieldProps, TextFieldProvider, type ThemeMode, ThemeProvider, TimeDisplay, type TimeDisplayMode, type TimeDisplayProps, TimeField, type TimeFieldProps, TimeRange, type TimeRangeProps, ToggleButton, ToggleButtonContext, type ToggleButtonProps, ToggleButtonProvider, type ToggleButtonStyleVariants, Tooltip, TooltipContext, type TooltipFocusableProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, Tree, type TreeActions, TreeContext, type TreeContextValue, type TreeData, TreeItem, TreeItemActions, TreeItemContent, type TreeItemContentProps, type TreeItemContentRenderProps, TreeItemContext, type TreeItemContextValue, TreeItemDescription, TreeItemLabel, TreeItemPrefixIcon, type TreeItemProps, TreeLines, type TreeNode, type TreeNodeBase, type TreeProps, type TreeStyleVariant, type UseCoordinateCopyOptions, type UseCoordinateCopyResult, type UseCoordinateFieldResult, type UseCoordinateFieldStateOptions, type UseCoordinateFieldStateResult, type UseCoordinateFocusOptions, type UseCoordinateFocusResult, type UseCoordinatePasteOptions, type UseCoordinatePasteResult, type UseFrameDelayOptions, type UseFrameDelayResult, type UseTimeoutCleanupResult, type UseTreeActionsOptions, type UseTreeState, type UseTreeStateOptions, Video, type VideoProps, ViewStack, type ViewStackBackEvent, type ViewStackClearEvent, ViewStackContext, type ViewStackContextValue, type ViewStackEvent, ViewStackEventHandlers, ViewStackEventNamespace, ViewStackEventTypes, type ViewStackProps, type ViewStackPushEvent, type ViewStackResetEvent, ViewStackTrigger, type ViewStackTriggerProps, ViewStackView, type ViewStackViewProps, VolumeSlider, type VolumeSliderProps, areAllSegmentsFilled, areCoordinatesEqual, bus, calculateClosestEdge, columnData, convertDDToDisplaySegments, convertDisplaySegmentsToDD, ddSegmentConfigs, ddmSegmentConfigs, deduplicateMatchesByLocation, dmsSegmentConfigs, formatSegmentsToCoordinateString, getAllCoordinateFormats, getEditableSegmentCount, getFormatDescription, getInsertIndex, getSegmentConfigs, getSegmentLabel, hasAnySegmentValue, headerColumnActionValues, isCompleteCoordinate, isSlottedContextValue, matchesMetadata, mgrsSegmentConfigs, parseCoordinatePaste, parseCoordinateStringToSegments, parseDropTarget, sortDirectionValues, useCardInteractions, useColumnInteractions, useCoordinateCopy, useCoordinateField, useCoordinateFieldState, useCoordinateFieldStateContext, useCoordinateFocus, useCoordinatePaste, useDragContext, useDrawerEmit, useFrameDelay, useKanban, useListItemVariant, useMediaControlsDisabled, useMediaProviderGuard, useTheme, useTimeoutCleanup, useTreeActions, useTreeState, useViewStackEmit, utmSegmentConfigs, validateCoordinateSegments, validateMoveCard };
318
+ export { Accordion, AccordionContext, AccordionGroup, type AccordionGroupProps, AccordionHeader, type AccordionHeaderProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, type AccordionStyleVariants, AccordionTrigger, type AccordionTriggerProps, ActionBar, type ActionBarProps, type AriaAttributes, type AriaAttributesWithRef, Audio, type AudioProps, Avatar, AvatarContext, type AvatarProps, AvatarProvider, Badge, BadgeContext, type BadgeProps, BadgeProvider, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, Button, ButtonContext, type ButtonProps, ButtonProvider, type ButtonStyleVariants, COORDINATE_EPSILON, COORDINATE_ERROR_MESSAGES, COORDINATE_FORMAT_LABELS, COORDINATE_FORMAT_NAMES, COORDINATE_SYSTEMS, Carousel, CarouselContext, type CarouselData, CarouselGallery, type CarouselGalleryProps, CarouselNext, CarouselPosition, CarouselPrevious, type CarouselProps, CarouselProvider, CarouselSelect, type CarouselSelectProps, CarouselViewer, type CarouselViewerProps, type ChainedEvents, Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, type CheckboxGroupProps, type CheckboxProps, type ChildrenRenderProps, Chip, ChipContext, type ChipContextValue, ChipList, type ChipListProps, ChipListRenderingContext, type ChipProps, ChipProvider, type ClassNameRenderProps, type ClassNames, ClassificationBadge, ClassificationBadgeContext, type ClassificationBadgeProps, ClassificationBadgeProvider, ClassificationBanner, ClassificationBannerContext, type ClassificationBannerProps, ClassificationBannerProvider, Clock, type ClockProps, CloneAction, ColorPicker, type ColorPickerProps, CombinatorSelector, ComboBoxField, ComboBoxFieldContext, type ComboBoxFieldProps, ComboBoxFieldProvider, CoordinateField, CoordinateFieldContext, type CoordinateFieldProps, CoordinateFieldProvider, type CoordinateFieldState, CoordinateFieldStateContext, CoordinateFieldStateProvider, type CoordinateFormatResult, CoordinateSegment, type CoordinateSegmentProps, type CoordinateSystem, type CoordinateValue, DateField, type DateFieldProps, type DefaultRQBProps, DeferredCollection, type DeferredCollectionProps, DeletableChip, type DeletableChipProps, DetailsList, DetailsListContext, DetailsListLabel, type DetailsListLabelProps, type DetailsListProps, DetailsListProvider, DetailsListValue, type DetailsListValueProps, Dialog, DialogContent, DialogContext, DialogFooter, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, Divider, DividerContext, type DividerProps, DividerProvider, type DragAndDropConfig, DragContext, Drawer, DrawerBack, DrawerClose, type DrawerCloseEvent, type DrawerCloseProps, DrawerContent, DrawerContext, type DrawerContextValue, type DrawerEvent, DrawerEventHandlers, DrawerEventNamespace, DrawerEventTypes, DrawerFooter, DrawerHeader, DrawerHeaderTitle, DrawerLayout, DrawerLayoutMain, type DrawerLayoutProps, DrawerMenu, DrawerMenuItem, type DrawerMenuItemProps, type DrawerMenuProps, type DrawerOpenEvent, DrawerPanel, type DrawerProps, type DrawerTitleProps, type DrawerToggleEvent, DrawerTrigger, type DrawerTriggerProps, DrawerView, type DropTargetInfo, EXPECTED_SEGMENT_COUNTS, type Field, Flashcard, FlashcardAdditionalData, type FlashcardComponentProps, FlashcardContext, FlashcardDetailsLabel, FlashcardDetailsList, type FlashcardDetailsListProps, FlashcardDetailsValue, FlashcardHero, type FlashcardProps, FloatingCard, type FloatingCardContextValue, type FloatingCardHeaderAction, type FloatingCardProps, FloatingCardProvider, type FloatingCardProviderProps, FullscreenButton, type FullscreenButtonProps, GROUP_SEPARATOR, Gantt, GanttBlock, GanttBracketClose, GanttBracketOpen, GanttContentContainer, GanttContentRow, GanttIconMarker, GanttMarker, type GanttMetThresholdData, GanttPanelContainer, GanttPanelRow, type GanttProviderProps, type GanttRowElementColorProp, GanttSpacer, type GanttSpacerProps, type GanttThreshold, type GanttThresholdProps, type GanttTimescale, HeaderColumnAction, type HeaderColumnActionKey, Hero, HeroContext, type HeroProps, HeroSubtitle, HeroTitle, Hotkey, HotkeyContext, type HotkeyProps, HotkeyProvider, HotkeySet, Icon, IconContext, type IconProps, IconProvider, Input, InputContext, type InputProps, Kanban, KanbanCard, KanbanCardBody, type KanbanCardData, KanbanCardHeader, KanbanCardHeaderActions, KanbanCardHeaderTitle, type KanbanCardProps, type KanbanColContentActionProps, type KanbanColContentProps, type KanbanColProps, KanbanColumn, KanbanColumnActions, KanbanColumnContainer, KanbanColumnContent, type KanbanColumnData, KanbanColumnHeader, KanbanColumnHeaderActions, KanbanColumnHeaderDragHandle, KanbanColumnHeaderTitle, type KanbanComponentProps, type KanbanContextData, KanbanHeader, KanbanHeaderActions, KanbanHeaderSearch, KanbanHeaderTitle, type KanbanMenuProps, type KanbanProps, KanbanProvider, type KanbanProviderProps, type KanbanSearchProps, Label, LabelContext, type LabelProps, LabelProvider, Lines, type LinesProps, Link, LinkButton, LinkButtonContext, type LinkButtonProps, LinkButtonProvider, type LinkProps, LinkProvider, List, ListContext, ListItem, ListItemContent, type ListItemContentProps, ListItemDescription, type ListItemDescriptionProps, type ListItemProps, ListItemTitle, type ListItemTitleProps, type ListItemVariant, type ListProps, LockAction, MediaControls, MediaControlsContext, type MediaControlsContextValue, type MediaControlsProps, MediaControlsProvider, Menu, MenuContext, MenuItem, MenuItemDescription, MenuItemLabel, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, MenuSubmenu, MenuTrigger, type MoveCard, type MoveCardValidationParams, type MoveCardValidationResult, MuteButton, type MuteButtonProps, Notice, type NoticeActionEvent, type NoticeColor, type NoticeContent, type NoticeDequeueEvent, NoticeEventNamespace, NoticeEventTypes, NoticeIcon, type NoticeIconProps, NoticeList, type NoticeListProps, type NoticeProps, type NoticeQueueEvent, Options, OptionsContext, type OptionsDataItem, OptionsItem, OptionsItemContent, OptionsItemDescription, OptionsItemLabel, type OptionsItemProps, type OptionsProps, OptionsSection, type OptionsSectionProps, Pagination, PaginationContext, type PaginationContextValue, PaginationNext, type PaginationNextProps, PaginationPages, type PaginationPagesProps, PaginationPrev, type PaginationPrevProps, type PaginationProps, type ParsedCoordinateMatch, PlayButton, type PlayButtonProps, PlaybackRateButton, type PlaybackRateButtonProps, Popover, PopoverContent, PopoverFooter, type PopoverProps, PopoverTitle, PopoverTrigger, type PopoverTriggerProps, PortalProvider, type ProviderProps, QueryBuilder, type QueryBuilderContextType, type QueryBuilderProps, type QueryBuilderValueEditors, Radio, RadioContext, RadioGroup, RadioGroupContext, type RadioGroupProps, type RadioProps, RemoveRuleAction, type RenderProps, type RenderPropsChildren, type RenderPropsClassName, type RenderPropsStyle, type RuleGroupType, SearchField, SearchFieldContext, type SearchFieldProps, SearchFieldProvider, SeekButton, type SeekButtonProps, type SegmentConfig, type SegmentType, SelectField, SelectFieldContext, type SelectFieldProps, SelectFieldProvider, SelectableChip, type SelectableChipProps, Sidenav, SidenavAvatar, type SidenavAvatarProps, type SidenavCloseEvent, SidenavContent, type SidenavContentProps, SidenavContext, type SidenavContextValue, type SidenavDividerProps, type SidenavEvent, SidenavEventNamespace, SidenavEventTypes, SidenavFooter, type SidenavFooterProps, SidenavHeader, type SidenavHeaderProps, SidenavItem, type SidenavItemProps, SidenavLink, type SidenavLinkProps, SidenavMenu, SidenavMenuItem, type SidenavMenuItemProps, type SidenavMenuProps, type SidenavOpenEvent, type SidenavProps, type SidenavToggleEvent, SidenavTrigger, type SidenavTriggerProps, type SimpleEvents, Skeleton, type SkeletonProps, Slider, type SliderMarker, type SliderMarkersConfig, type SliderProps, type SlottedValue, SortDirection, type SortDirectionState, StatusIndicator, type StatusIndicatorProps, type StylePropRenderProps, type StyleRenderProps, Switch, SwitchContext, type SwitchProps, SwitchProvider, Tab, TabContext, TabList, TabPanel, type TabProps, TabProvider, TabStyleDefaults, type TabStyleProps, Table, type TableBodyProps, type TableCellProps, TableContext, type TableContextValue, type TableHeaderCellProps, type TableHeaderProps, type TableProps, type TableRowProps, Tabs, TabsContext, type TabsProps, TabsProvider, type TargetedEvents, TextAreaField, TextAreaFieldContext, type TextAreaFieldProps, TextAreaFieldProvider, TextField, TextFieldContext, type TextFieldProps, TextFieldProvider, type ThemeMode, ThemeProvider, TimeDisplay, type TimeDisplayMode, type TimeDisplayProps, TimeField, type TimeFieldProps, TimeRange, type TimeRangeProps, ToggleButton, ToggleButtonContext, type ToggleButtonProps, ToggleButtonProvider, type ToggleButtonStyleVariants, Tooltip, TooltipContext, type TooltipFocusableProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, Tree, type TreeActions, TreeContext, type TreeContextValue, type TreeData, TreeItem, TreeItemActions, TreeItemContent, type TreeItemContentProps, type TreeItemContentRenderProps, TreeItemContext, type TreeItemContextValue, TreeItemDescription, TreeItemLabel, TreeItemPrefixIcon, type TreeItemProps, TreeLines, type TreeNode, type TreeNodeBase, type TreeProps, type TreeStyleVariant, type UseCoordinateCopyOptions, type UseCoordinateCopyResult, type UseCoordinateFieldResult, type UseCoordinateFieldStateOptions, type UseCoordinateFieldStateResult, type UseCoordinateFocusOptions, type UseCoordinateFocusResult, type UseCoordinatePasteOptions, type UseCoordinatePasteResult, type UseFrameDelayOptions, type UseFrameDelayResult, type UseTimeoutCleanupResult, type UseTreeActionsOptions, type UseTreeState, type UseTreeStateOptions, Video, type VideoProps, ViewStack, type ViewStackBackEvent, type ViewStackClearEvent, ViewStackContext, type ViewStackContextValue, type ViewStackEvent, ViewStackEventHandlers, ViewStackEventNamespace, ViewStackEventTypes, type ViewStackProps, type ViewStackPushEvent, type ViewStackResetEvent, ViewStackTrigger, type ViewStackTriggerProps, ViewStackView, type ViewStackViewProps, VolumeSlider, type VolumeSliderProps, areAllSegmentsFilled, areCoordinatesEqual, bus, calculateClosestEdge, columnData, convertDDToDisplaySegments, convertDisplaySegmentsToDD, ddSegmentConfigs, ddmSegmentConfigs, deduplicateMatchesByLocation, dmsSegmentConfigs, formatSegmentsToCoordinateString, getAllCoordinateFormats, getEditableSegmentCount, getFormatDescription, getInsertIndex, getSegmentConfigs, getSegmentLabel, hasAnySegmentValue, headerColumnActionValues, isCompleteCoordinate, isSlottedContextValue, matchesMetadata, mgrsSegmentConfigs, parseCoordinatePaste, parseCoordinateStringToSegments, parseDropTarget, sortDirectionValues, useCardInteractions, useColumnInteractions, useCoordinateCopy, useCoordinateField, useCoordinateFieldState, useCoordinateFieldStateContext, useCoordinateFocus, useCoordinatePaste, useDragContext, useDrawerEmit, useFrameDelay, useKanban, useListItemVariant, useMediaControlsDisabled, useMediaProviderGuard, usePreventScrollFocus, useTheme, useTimeoutCleanup, useTreeActions, useTreeState, useViewStackEmit, utmSegmentConfigs, validateCoordinateSegments, validateMoveCard };
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ import { Video } from "./components/video/index.js";
59
59
  import { CarouselViewer } from "./components/carousel/viewer.js";
60
60
  import { CheckboxContext, CheckboxGroupContext } from "./components/checkbox/context.js";
61
61
  import { CheckboxGroup } from "./components/checkbox/group.js";
62
+ import { usePreventScrollFocus } from "./hooks/use-prevent-scroll-focus/index.js";
62
63
  import { Checkbox } from "./components/checkbox/index.js";
63
64
  import { ChipContext, ChipProvider } from "./components/chip/context.js";
64
65
  import { DeletableChip } from "./components/chip/deletable.js";
@@ -257,4 +258,4 @@ import { useTreeActions } from "./hooks/use-tree/actions/index.js";
257
258
  import { useTreeState } from "./hooks/use-tree/state/index.js";
258
259
  import { ThemeProvider, useTheme } from "./providers/theme-provider.js";
259
260
 
260
- export { Accordion, AccordionContext, AccordionGroup, AccordionHeader, AccordionPanel, AccordionTrigger, ActionBar, Audio, Avatar, AvatarContext, AvatarProvider, Badge, BadgeContext, BadgeProvider, BreadcrumbItem, Breadcrumbs, Button, ButtonContext, ButtonProvider, COORDINATE_EPSILON, COORDINATE_ERROR_MESSAGES, COORDINATE_FORMAT_LABELS, COORDINATE_FORMAT_NAMES, COORDINATE_SYSTEMS, Carousel, CarouselContext, CarouselGallery, CarouselNext, CarouselPosition, CarouselPrevious, CarouselProvider, CarouselSelect, CarouselViewer, Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, Chip, ChipContext, ChipList, ChipListRenderingContext, ChipProvider, ClassificationBadge, ClassificationBadgeContext, ClassificationBadgeProvider, ClassificationBanner, ClassificationBannerContext, ClassificationBannerProvider, Clock, CloneAction, ColorPicker, CombinatorSelector, ComboBoxField, ComboBoxFieldContext, ComboBoxFieldProvider, CoordinateField, CoordinateFieldContext, CoordinateFieldProvider, CoordinateFieldStateContext, CoordinateFieldStateProvider, CoordinateSegment, DateField, DeferredCollection, DeletableChip, DetailsList, DetailsListContext, DetailsListLabel, DetailsListProvider, DetailsListValue, Dialog, DialogContent, DialogContext, DialogFooter, DialogTitle, DialogTrigger, Divider, DividerContext, DividerProvider, DragContext, Drawer, DrawerBack, DrawerClose, DrawerContent, DrawerContext, DrawerEventHandlers, DrawerEventNamespace, DrawerEventTypes, DrawerFooter, DrawerHeader, DrawerHeaderTitle, DrawerLayout, DrawerLayoutMain, DrawerMenu, DrawerMenuItem, DrawerPanel, DrawerTrigger, DrawerView, EXPECTED_SEGMENT_COUNTS, Flashcard, FlashcardAdditionalData, FlashcardContext, FlashcardDetailsLabel, FlashcardDetailsList, FlashcardDetailsValue, FlashcardHero, FloatingCard, FloatingCardProvider, FullscreenButton, GROUP_SEPARATOR, Gantt, GanttBlock, GanttBracketClose, GanttBracketOpen, GanttContentContainer, GanttContentRow, GanttIconMarker, GanttMarker, GanttPanelContainer, GanttPanelRow, GanttSpacer, HeaderColumnAction, Hero, HeroContext, HeroSubtitle, HeroTitle, Hotkey, HotkeyContext, HotkeyProvider, HotkeySet, Icon, IconContext, IconProvider, Input, InputContext, Kanban, KanbanCard, KanbanCardBody, KanbanCardHeader, KanbanCardHeaderActions, KanbanCardHeaderTitle, KanbanColumn, KanbanColumnActions, KanbanColumnContainer, KanbanColumnContent, KanbanColumnHeader, KanbanColumnHeaderActions, KanbanColumnHeaderDragHandle, KanbanColumnHeaderTitle, KanbanHeader, KanbanHeaderActions, KanbanHeaderSearch, KanbanHeaderTitle, KanbanProvider, Label, LabelContext, LabelProvider, Lines, Link, LinkButton, LinkButtonContext, LinkButtonProvider, LinkProvider, List, ListContext, ListItem, ListItemContent, ListItemDescription, ListItemTitle, LockAction, MediaControls, MediaControlsContext, MediaControlsProvider, Menu, MenuContext, MenuItem, MenuItemDescription, MenuItemLabel, MenuSection, MenuSeparator, MenuSubmenu, MenuTrigger, MuteButton, Notice, NoticeEventNamespace, NoticeEventTypes, NoticeIcon, NoticeList, Options, OptionsContext, OptionsItem, OptionsItemContent, OptionsItemDescription, OptionsItemLabel, OptionsSection, Pagination, PaginationContext, PaginationNext, PaginationPages, PaginationPrev, PlayButton, PlaybackRateButton, Popover, PopoverContent, PopoverFooter, PopoverTitle, PopoverTrigger, PortalProvider, QueryBuilder, Radio, RadioContext, RadioGroup, RadioGroupContext, RemoveRuleAction, SearchField, SearchFieldContext, SearchFieldProvider, SeekButton, SelectField, SelectFieldContext, SelectFieldProvider, SelectableChip, Sidenav, SidenavAvatar, SidenavContent, SidenavContext, SidenavEventNamespace, SidenavEventTypes, SidenavFooter, SidenavHeader, SidenavItem, SidenavLink, SidenavMenu, SidenavMenuItem, SidenavTrigger, Skeleton, Slider, SortDirection, StatusIndicator, Switch, SwitchContext, SwitchProvider, Tab, TabContext, TabList, TabPanel, TabProvider, TabStyleDefaults, Table, TableContext, Tabs, TabsContext, TabsProvider, TextAreaField, TextAreaFieldContext, TextAreaFieldProvider, TextField, TextFieldContext, TextFieldProvider, ThemeProvider, TimeDisplay, TimeField, TimeRange, ToggleButton, ToggleButtonContext, ToggleButtonProvider, Tooltip, TooltipContext, TooltipTrigger, Tree, TreeContext, TreeItem, TreeItemActions, TreeItemContent, TreeItemContext, TreeItemDescription, TreeItemLabel, TreeItemPrefixIcon, TreeLines, Video, ViewStack, ViewStackContext, ViewStackEventHandlers, ViewStackEventNamespace, ViewStackEventTypes, ViewStackTrigger, ViewStackView, VolumeSlider, areAllSegmentsFilled, areCoordinatesEqual, bus, calculateClosestEdge, columnData, convertDDToDisplaySegments, convertDisplaySegmentsToDD, ddSegmentConfigs, ddmSegmentConfigs, deduplicateMatchesByLocation, dmsSegmentConfigs, formatSegmentsToCoordinateString, getAllCoordinateFormats, getEditableSegmentCount, getFormatDescription, getInsertIndex, getSegmentConfigs, getSegmentLabel, hasAnySegmentValue, headerColumnActionValues, isCompleteCoordinate, isSlottedContextValue, matchesMetadata, mgrsSegmentConfigs, parseCoordinatePaste, parseCoordinateStringToSegments, parseDropTarget, sortDirectionValues, useCardInteractions, useColumnInteractions, useCoordinateCopy, useCoordinateField, useCoordinateFieldState, useCoordinateFieldStateContext, useCoordinateFocus, useCoordinatePaste, useDragContext, useDrawerEmit, useFrameDelay, useKanban, useListItemVariant, useMediaControlsDisabled, useMediaProviderGuard, useTheme, useTimeoutCleanup, useTreeActions, useTreeState, useViewStackEmit, utmSegmentConfigs, validateCoordinateSegments, validateMoveCard };
261
+ export { Accordion, AccordionContext, AccordionGroup, AccordionHeader, AccordionPanel, AccordionTrigger, ActionBar, Audio, Avatar, AvatarContext, AvatarProvider, Badge, BadgeContext, BadgeProvider, BreadcrumbItem, Breadcrumbs, Button, ButtonContext, ButtonProvider, COORDINATE_EPSILON, COORDINATE_ERROR_MESSAGES, COORDINATE_FORMAT_LABELS, COORDINATE_FORMAT_NAMES, COORDINATE_SYSTEMS, Carousel, CarouselContext, CarouselGallery, CarouselNext, CarouselPosition, CarouselPrevious, CarouselProvider, CarouselSelect, CarouselViewer, Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, Chip, ChipContext, ChipList, ChipListRenderingContext, ChipProvider, ClassificationBadge, ClassificationBadgeContext, ClassificationBadgeProvider, ClassificationBanner, ClassificationBannerContext, ClassificationBannerProvider, Clock, CloneAction, ColorPicker, CombinatorSelector, ComboBoxField, ComboBoxFieldContext, ComboBoxFieldProvider, CoordinateField, CoordinateFieldContext, CoordinateFieldProvider, CoordinateFieldStateContext, CoordinateFieldStateProvider, CoordinateSegment, DateField, DeferredCollection, DeletableChip, DetailsList, DetailsListContext, DetailsListLabel, DetailsListProvider, DetailsListValue, Dialog, DialogContent, DialogContext, DialogFooter, DialogTitle, DialogTrigger, Divider, DividerContext, DividerProvider, DragContext, Drawer, DrawerBack, DrawerClose, DrawerContent, DrawerContext, DrawerEventHandlers, DrawerEventNamespace, DrawerEventTypes, DrawerFooter, DrawerHeader, DrawerHeaderTitle, DrawerLayout, DrawerLayoutMain, DrawerMenu, DrawerMenuItem, DrawerPanel, DrawerTrigger, DrawerView, EXPECTED_SEGMENT_COUNTS, Flashcard, FlashcardAdditionalData, FlashcardContext, FlashcardDetailsLabel, FlashcardDetailsList, FlashcardDetailsValue, FlashcardHero, FloatingCard, FloatingCardProvider, FullscreenButton, GROUP_SEPARATOR, Gantt, GanttBlock, GanttBracketClose, GanttBracketOpen, GanttContentContainer, GanttContentRow, GanttIconMarker, GanttMarker, GanttPanelContainer, GanttPanelRow, GanttSpacer, HeaderColumnAction, Hero, HeroContext, HeroSubtitle, HeroTitle, Hotkey, HotkeyContext, HotkeyProvider, HotkeySet, Icon, IconContext, IconProvider, Input, InputContext, Kanban, KanbanCard, KanbanCardBody, KanbanCardHeader, KanbanCardHeaderActions, KanbanCardHeaderTitle, KanbanColumn, KanbanColumnActions, KanbanColumnContainer, KanbanColumnContent, KanbanColumnHeader, KanbanColumnHeaderActions, KanbanColumnHeaderDragHandle, KanbanColumnHeaderTitle, KanbanHeader, KanbanHeaderActions, KanbanHeaderSearch, KanbanHeaderTitle, KanbanProvider, Label, LabelContext, LabelProvider, Lines, Link, LinkButton, LinkButtonContext, LinkButtonProvider, LinkProvider, List, ListContext, ListItem, ListItemContent, ListItemDescription, ListItemTitle, LockAction, MediaControls, MediaControlsContext, MediaControlsProvider, Menu, MenuContext, MenuItem, MenuItemDescription, MenuItemLabel, MenuSection, MenuSeparator, MenuSubmenu, MenuTrigger, MuteButton, Notice, NoticeEventNamespace, NoticeEventTypes, NoticeIcon, NoticeList, Options, OptionsContext, OptionsItem, OptionsItemContent, OptionsItemDescription, OptionsItemLabel, OptionsSection, Pagination, PaginationContext, PaginationNext, PaginationPages, PaginationPrev, PlayButton, PlaybackRateButton, Popover, PopoverContent, PopoverFooter, PopoverTitle, PopoverTrigger, PortalProvider, QueryBuilder, Radio, RadioContext, RadioGroup, RadioGroupContext, RemoveRuleAction, SearchField, SearchFieldContext, SearchFieldProvider, SeekButton, SelectField, SelectFieldContext, SelectFieldProvider, SelectableChip, Sidenav, SidenavAvatar, SidenavContent, SidenavContext, SidenavEventNamespace, SidenavEventTypes, SidenavFooter, SidenavHeader, SidenavItem, SidenavLink, SidenavMenu, SidenavMenuItem, SidenavTrigger, Skeleton, Slider, SortDirection, StatusIndicator, Switch, SwitchContext, SwitchProvider, Tab, TabContext, TabList, TabPanel, TabProvider, TabStyleDefaults, Table, TableContext, Tabs, TabsContext, TabsProvider, TextAreaField, TextAreaFieldContext, TextAreaFieldProvider, TextField, TextFieldContext, TextFieldProvider, ThemeProvider, TimeDisplay, TimeField, TimeRange, ToggleButton, ToggleButtonContext, ToggleButtonProvider, Tooltip, TooltipContext, TooltipTrigger, Tree, TreeContext, TreeItem, TreeItemActions, TreeItemContent, TreeItemContext, TreeItemDescription, TreeItemLabel, TreeItemPrefixIcon, TreeLines, Video, ViewStack, ViewStackContext, ViewStackEventHandlers, ViewStackEventNamespace, ViewStackEventTypes, ViewStackTrigger, ViewStackView, VolumeSlider, areAllSegmentsFilled, areCoordinatesEqual, bus, calculateClosestEdge, columnData, convertDDToDisplaySegments, convertDisplaySegmentsToDD, ddSegmentConfigs, ddmSegmentConfigs, deduplicateMatchesByLocation, dmsSegmentConfigs, formatSegmentsToCoordinateString, getAllCoordinateFormats, getEditableSegmentCount, getFormatDescription, getInsertIndex, getSegmentConfigs, getSegmentLabel, hasAnySegmentValue, headerColumnActionValues, isCompleteCoordinate, isSlottedContextValue, matchesMetadata, mgrsSegmentConfigs, parseCoordinatePaste, parseCoordinateStringToSegments, parseDropTarget, sortDirectionValues, useCardInteractions, useColumnInteractions, useCoordinateCopy, useCoordinateField, useCoordinateFieldState, useCoordinateFieldStateContext, useCoordinateFocus, useCoordinatePaste, useDragContext, useDrawerEmit, useFrameDelay, useKanban, useListItemVariant, useMediaControlsDisabled, useMediaProviderGuard, usePreventScrollFocus, useTheme, useTimeoutCleanup, useTreeActions, useTreeState, useViewStackEmit, utmSegmentConfigs, validateCoordinateSegments, validateMoveCard };
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { PropsWithChildren, RefObject } from "react";
14
- import * as react_jsx_runtime0 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime83 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/providers/portal.d.ts
17
17
  /**
@@ -30,7 +30,7 @@ declare function PortalProvider({
30
30
  }: PropsWithChildren<{
31
31
  parentRef?: RefObject<HTMLElement | null>;
32
32
  inject?: HTMLElement | null;
33
- }>): react_jsx_runtime0.JSX.Element;
33
+ }>): react_jsx_runtime83.JSX.Element;
34
34
  //#endregion
35
35
  export { PortalProvider };
36
36
  //# sourceMappingURL=portal.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import "client-only";
14
14
  import { PropsWithChildren } from "react";
15
- import * as react_jsx_runtime0 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime79 from "react/jsx-runtime";
16
16
  import { PartialDeep } from "type-fest";
17
17
  import { DomainColorTokens, SemanticColorTokens, ThemeTokens } from "@accelint/design-foundation/tokens/types";
18
18
 
@@ -46,7 +46,7 @@ declare function ThemeProvider({
46
46
  defaultMode,
47
47
  onChange,
48
48
  overrides
49
- }: ThemeProviderProps): react_jsx_runtime0.JSX.Element;
49
+ }: ThemeProviderProps): react_jsx_runtime79.JSX.Element;
50
50
  /**
51
51
  * Access the current theme context
52
52
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@accelint/design-toolkit",
3
3
  "description": "An open-source component library to serve as part of the entire ecosystem of UX for Accelint.",
4
- "version": "9.11.0",
4
+ "version": "9.11.2",
5
5
  "author": "https://hypergiant.com",
6
6
  "$schema": "https://json.schemastore.org/package",
7
7
  "devDependencies": {
@@ -56,15 +56,15 @@
56
56
  "@accelint/converters": "1.0.1",
57
57
  "@accelint/core": "0.6.0",
58
58
  "@accelint/design-foundation": "3.2.0",
59
- "@accelint/geo": "0.6.0",
60
59
  "@accelint/icons": "3.0.0",
61
60
  "@accelint/logger": "1.1.0",
62
- "@accelint/postcss-tailwind-css-modules": "1.1.0",
63
61
  "@accelint/predicates": "0.5.2",
62
+ "@accelint/postcss-tailwind-css-modules": "1.1.0",
63
+ "@accelint/geo": "0.6.0",
64
64
  "@accelint/prettier-config": "0.2.1",
65
65
  "@accelint/temporal": "0.1.4",
66
- "@accelint/typescript-config": "0.1.4",
67
- "@accelint/vitest-config": "0.1.6"
66
+ "@accelint/vitest-config": "0.1.6",
67
+ "@accelint/typescript-config": "0.1.4"
68
68
  },
69
69
  "exports": {
70
70
  ".": "./dist/index.js",
@@ -421,6 +421,7 @@
421
421
  "./hooks/coordinate-field/use-timeout-cleanup": "./dist/hooks/coordinate-field/use-timeout-cleanup.js",
422
422
  "./hooks/kanban": "./dist/hooks/kanban/index.js",
423
423
  "./hooks/use-frame-delay": "./dist/hooks/use-frame-delay/index.js",
424
+ "./hooks/use-prevent-scroll-focus": "./dist/hooks/use-prevent-scroll-focus/index.js",
424
425
  "./hooks/use-tree/actions": "./dist/hooks/use-tree/actions/index.js",
425
426
  "./hooks/use-tree/actions/cache": "./dist/hooks/use-tree/actions/cache.js",
426
427
  "./hooks/use-tree/state": "./dist/hooks/use-tree/state/index.js",
@@ -467,10 +468,10 @@
467
468
  "zod": "^4.1.12",
468
469
  "zustand": "^5.0.3",
469
470
  "@accelint/bus": "4.0.0",
470
- "@accelint/converters": "1.0.1",
471
471
  "@accelint/core": "0.6.0",
472
472
  "@accelint/design-foundation": "3.2.0",
473
473
  "@accelint/geo": "0.6.0",
474
+ "@accelint/converters": "1.0.1",
474
475
  "@accelint/icons": "3.0.0",
475
476
  "@accelint/logger": "1.1.0",
476
477
  "@accelint/predicates": "0.5.2",