@accelint/design-toolkit 9.11.1 → 9.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog-info.yaml +2 -2
- package/dist/components/accordion/context.d.ts +2 -2
- package/dist/components/accordion/group.d.ts +2 -2
- package/dist/components/accordion/header.d.ts +2 -2
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/panel.d.ts +2 -2
- package/dist/components/accordion/trigger.d.ts +2 -2
- package/dist/components/action-bar/index.d.ts +2 -2
- package/dist/components/audio/index.d.ts +2 -2
- package/dist/components/avatar/context.d.ts +4 -4
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/context.d.ts +4 -4
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/breadcrumbs/index.d.ts +2 -2
- package/dist/components/breadcrumbs/item.d.ts +2 -2
- package/dist/components/button/context.d.ts +8 -8
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/link.d.ts +2 -2
- package/dist/components/button/toggle.d.ts +2 -2
- package/dist/components/carousel/context.d.ts +4 -4
- package/dist/components/carousel/gallery.d.ts +2 -2
- package/dist/components/carousel/index.d.ts +2 -2
- package/dist/components/carousel/navigation.d.ts +3 -3
- package/dist/components/carousel/position.d.ts +2 -2
- package/dist/components/carousel/select.d.ts +2 -2
- package/dist/components/carousel/viewer.d.ts +2 -2
- package/dist/components/checkbox/context.d.ts +3 -3
- package/dist/components/checkbox/group.d.ts +2 -2
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +3 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/styles.module.css +2 -0
- package/dist/components/chip/context.d.ts +4 -4
- package/dist/components/chip/deletable.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/list.d.ts +4 -4
- package/dist/components/chip/selectable.d.ts +2 -2
- package/dist/components/classification-badge/context.d.ts +4 -4
- package/dist/components/classification-badge/index.d.ts +2 -2
- package/dist/components/classification-banner/context.d.ts +4 -4
- package/dist/components/classification-banner/index.d.ts +2 -2
- package/dist/components/clock/index.d.ts +2 -2
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox-field/context.d.ts +4 -4
- package/dist/components/combobox-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/context.d.ts +6 -6
- package/dist/components/coordinate-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/segment.d.ts +2 -2
- package/dist/components/date-field/index.d.ts +2 -2
- package/dist/components/deferred-collection/index.d.ts +2 -2
- package/dist/components/details-list/context.d.ts +4 -4
- package/dist/components/details-list/index.d.ts +2 -2
- package/dist/components/details-list/label.d.ts +2 -2
- package/dist/components/details-list/value.d.ts +2 -2
- package/dist/components/dialog/content.d.ts +2 -2
- package/dist/components/dialog/context.d.ts +2 -2
- package/dist/components/dialog/footer.d.ts +2 -2
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/title.d.ts +2 -2
- package/dist/components/divider/context.d.ts +4 -4
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/drawer/back.d.ts +2 -2
- package/dist/components/drawer/close.d.ts +2 -2
- package/dist/components/drawer/content.d.ts +2 -2
- package/dist/components/drawer/context.d.ts +2 -2
- package/dist/components/drawer/footer.d.ts +2 -2
- package/dist/components/drawer/header-title.d.ts +2 -2
- package/dist/components/drawer/header.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/layout-main.d.ts +2 -2
- package/dist/components/drawer/layout.d.ts +2 -2
- package/dist/components/drawer/menu-item.d.ts +2 -2
- package/dist/components/drawer/menu.d.ts +2 -2
- package/dist/components/drawer/panel.d.ts +2 -2
- package/dist/components/drawer/styles.module.css +18 -0
- package/dist/components/drawer/trigger.d.ts +2 -2
- package/dist/components/drawer/view.d.ts +2 -2
- package/dist/components/flashcard/index.d.ts +9 -9
- package/dist/components/floating-card/context.d.ts +2 -2
- package/dist/components/floating-card/index.d.ts +2 -2
- package/dist/components/floating-card/provider.d.ts +2 -2
- package/dist/components/gantt/components/base-elements/point.d.ts +2 -2
- package/dist/components/gantt/components/base-elements/range.d.ts +2 -2
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/internal/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +2 -2
- package/dist/components/gantt/components/content-row/block.d.ts +2 -2
- package/dist/components/gantt/components/content-row/bracket.d.ts +3 -3
- package/dist/components/gantt/components/content-row/icon-marker.d.ts +2 -2
- package/dist/components/gantt/components/content-row/index.d.ts +2 -2
- package/dist/components/gantt/components/content-row/marker.d.ts +2 -2
- package/dist/components/gantt/components/content-row/spacer.d.ts +2 -2
- package/dist/components/gantt/components/current-time/index.d.ts +2 -2
- package/dist/components/gantt/components/header/index.d.ts +3 -3
- package/dist/components/gantt/components/panel-row/index.d.ts +2 -2
- package/dist/components/gantt/components/rows-virtualizer/index.d.ts +3 -3
- package/dist/components/gantt/components/timeline/index.d.ts +2 -2
- package/dist/components/gantt/components/timeline-chunk/index.d.ts +3 -3
- package/dist/components/gantt/context/index.d.ts +4 -4
- package/dist/components/gantt/context/store/index.d.ts +4 -4
- package/dist/components/gantt/context/temporal-data/index.d.ts +4 -4
- package/dist/components/hero/context.d.ts +2 -2
- package/dist/components/hero/index.d.ts +2 -2
- package/dist/components/hero/subtitle.d.ts +2 -2
- package/dist/components/hero/title.d.ts +3 -3
- package/dist/components/hotkey/context.d.ts +4 -4
- package/dist/components/hotkey/index.d.ts +2 -2
- package/dist/components/hotkey/set.d.ts +2 -2
- package/dist/components/icon/context.d.ts +4 -4
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/input/context.d.ts +2 -2
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/kanban/card-body.d.ts +2 -2
- package/dist/components/kanban/card-header-actions.d.ts +2 -2
- package/dist/components/kanban/card-header-title.d.ts +2 -2
- package/dist/components/kanban/card-header.d.ts +2 -2
- package/dist/components/kanban/card.d.ts +2 -2
- package/dist/components/kanban/column-actions.d.ts +2 -2
- package/dist/components/kanban/column-container.d.ts +2 -2
- package/dist/components/kanban/column-content.d.ts +2 -2
- package/dist/components/kanban/column-header-actions.d.ts +2 -2
- package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
- package/dist/components/kanban/column-header-title.d.ts +2 -2
- package/dist/components/kanban/column-header.d.ts +2 -2
- package/dist/components/kanban/column.d.ts +2 -2
- package/dist/components/kanban/context.d.ts +2 -2
- package/dist/components/kanban/header-actions.d.ts +2 -2
- package/dist/components/kanban/header-search.d.ts +2 -2
- package/dist/components/kanban/header-title.d.ts +2 -2
- package/dist/components/kanban/header.d.ts +2 -2
- package/dist/components/kanban/kanban.d.ts +4 -4
- package/dist/components/label/context.d.ts +4 -4
- package/dist/components/label/index.d.ts +2 -2
- package/dist/components/lines/index.d.ts +2 -2
- package/dist/components/link/context.d.ts +2 -2
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/list/context.d.ts +2 -2
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/item-content.d.ts +2 -2
- package/dist/components/list/item-description.d.ts +2 -2
- package/dist/components/list/item-title.d.ts +2 -2
- package/dist/components/list/item.d.ts +2 -2
- package/dist/components/media-controls/context.d.ts +4 -4
- package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
- package/dist/components/media-controls/index.d.ts +2 -2
- package/dist/components/media-controls/mute-button.d.ts +2 -2
- package/dist/components/media-controls/play-button.d.ts +2 -2
- package/dist/components/media-controls/playback-rate.d.ts +2 -2
- package/dist/components/media-controls/seek-button.d.ts +2 -2
- package/dist/components/media-controls/time-display.d.ts +2 -2
- package/dist/components/media-controls/time-range.d.ts +2 -2
- package/dist/components/media-controls/volume-slider.d.ts +2 -2
- package/dist/components/menu/context.d.ts +2 -2
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/item-description.d.ts +2 -2
- package/dist/components/menu/item-label.d.ts +2 -2
- package/dist/components/menu/item.d.ts +2 -2
- package/dist/components/menu/section.d.ts +2 -2
- package/dist/components/menu/separator.d.ts +2 -2
- package/dist/components/menu/submenu.d.ts +2 -2
- package/dist/components/notice/index.d.ts +2 -2
- package/dist/components/notice/list.d.ts +2 -2
- package/dist/components/notice/list.js +7 -9
- package/dist/components/notice/list.js.map +1 -1
- package/dist/components/notice/notice-icon.d.ts +2 -2
- package/dist/components/options/context.d.ts +2 -2
- package/dist/components/options/index.d.ts +2 -2
- package/dist/components/options/item-content.d.ts +2 -2
- package/dist/components/options/item-description.d.ts +2 -2
- package/dist/components/options/item-label.d.ts +2 -2
- package/dist/components/options/item.d.ts +2 -2
- package/dist/components/options/section.d.ts +2 -2
- package/dist/components/pagination/context.d.ts +2 -2
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/next.d.ts +2 -2
- package/dist/components/pagination/pages.d.ts +2 -2
- package/dist/components/pagination/prev.d.ts +2 -2
- package/dist/components/popover/content.d.ts +2 -2
- package/dist/components/popover/footer.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/title.d.ts +2 -2
- package/dist/components/popover/trigger.d.ts +2 -2
- package/dist/components/query-builder/action-element.d.ts +2 -2
- package/dist/components/query-builder/actions.d.ts +4 -4
- package/dist/components/query-builder/combinator-selector.d.ts +2 -2
- package/dist/components/query-builder/index.d.ts +2 -2
- package/dist/components/query-builder/rule-group.d.ts +4 -4
- package/dist/components/query-builder/rule.d.ts +2 -2
- package/dist/components/query-builder/value-editor.d.ts +2 -2
- package/dist/components/query-builder/value-selector.d.ts +2 -2
- package/dist/components/radio/context.d.ts +3 -3
- package/dist/components/radio/group.d.ts +2 -2
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/search-field/context.d.ts +4 -4
- package/dist/components/search-field/index.d.ts +2 -2
- package/dist/components/select-field/context.d.ts +4 -4
- package/dist/components/select-field/index.d.ts +2 -2
- package/dist/components/sidenav/avatar.d.ts +2 -2
- package/dist/components/sidenav/content.d.ts +2 -2
- package/dist/components/sidenav/context.d.ts +2 -2
- package/dist/components/sidenav/footer.d.ts +2 -2
- package/dist/components/sidenav/header.d.ts +2 -2
- package/dist/components/sidenav/index.d.ts +2 -2
- package/dist/components/sidenav/item.d.ts +2 -2
- package/dist/components/sidenav/link.d.ts +2 -2
- package/dist/components/sidenav/menu-item.d.ts +2 -2
- package/dist/components/sidenav/menu.d.ts +2 -2
- package/dist/components/sidenav/styles.module.css +14 -8
- package/dist/components/sidenav/trigger.d.ts +2 -2
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/status-indicator/index.d.ts +2 -2
- package/dist/components/switch/context.d.ts +4 -4
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js +3 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/styles.module.css +2 -0
- package/dist/components/table/body.d.ts +2 -2
- package/dist/components/table/cell.d.ts +2 -2
- package/dist/components/table/context.d.ts +2 -2
- package/dist/components/table/header-cell.d.ts +2 -2
- package/dist/components/table/header.d.ts +2 -2
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/row.d.ts +2 -2
- package/dist/components/tabs/context.d.ts +6 -6
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/list.d.ts +2 -2
- package/dist/components/tabs/panel.d.ts +2 -2
- package/dist/components/tabs/tab.d.ts +2 -2
- package/dist/components/text-area-field/context.d.ts +4 -4
- package/dist/components/text-area-field/index.d.ts +2 -2
- package/dist/components/text-field/context.d.ts +4 -4
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/time-field/index.d.ts +2 -2
- package/dist/components/tooltip/context.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/trigger.d.ts +2 -2
- package/dist/components/tree/context.d.ts +3 -3
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/item-actions.d.ts +2 -2
- package/dist/components/tree/item-content.d.ts +2 -2
- package/dist/components/tree/item-description.d.ts +2 -2
- package/dist/components/tree/item-label.d.ts +2 -2
- package/dist/components/tree/item-prefix-icon.d.ts +2 -2
- package/dist/components/tree/item.d.ts +2 -2
- package/dist/components/tree/lines.d.ts +2 -2
- package/dist/components/video/index.d.ts +2 -2
- package/dist/components/view-stack/context.d.ts +2 -2
- package/dist/components/view-stack/index.d.ts +2 -2
- package/dist/components/view-stack/trigger.d.ts +2 -2
- package/dist/components/view-stack/view.d.ts +2 -2
- package/dist/hooks/coordinate-field/use-coordinate-field-state.js +5 -1
- package/dist/hooks/coordinate-field/use-coordinate-field-state.js.map +1 -1
- package/dist/hooks/use-prevent-scroll-focus/index.d.ts +39 -0
- package/dist/hooks/use-prevent-scroll-focus/index.js +69 -0
- package/dist/hooks/use-prevent-scroll-focus/index.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/providers/portal.d.ts +2 -2
- package/dist/providers/theme-provider.d.ts +2 -2
- package/package.json +13 -12
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
import { ViewStackContextValue } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react44 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:
|
|
20
|
+
declare const ViewStackContext: react44.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
|
|
15
|
+
import * as react_jsx_runtime165 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):
|
|
50
|
+
}: ViewStackProps): react_jsx_runtime165.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
|
|
15
|
+
import * as react_jsx_runtime167 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_runtime211 from "react/jsx-runtime";
|
|
|
45
45
|
declare function ViewStackTrigger({
|
|
46
46
|
children,
|
|
47
47
|
for: types
|
|
48
|
-
}: ViewStackTriggerProps):
|
|
48
|
+
}: ViewStackTriggerProps): react_jsx_runtime167.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
|
|
15
|
+
import * as react_jsx_runtime166 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_runtime212 from "react/jsx-runtime";
|
|
|
43
43
|
declare function ViewStackView({
|
|
44
44
|
id,
|
|
45
45
|
children
|
|
46
|
-
}: ViewStackViewProps):
|
|
46
|
+
}: ViewStackViewProps): react_jsx_runtime166.JSX.Element | null;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { ViewStackView };
|
|
49
49
|
//# sourceMappingURL=view.d.ts.map
|
|
@@ -70,6 +70,7 @@ function useCoordinateFieldState({ value, defaultValue, format, onChange, onErro
|
|
|
70
70
|
const [internalValue, setInternalValue] = useState(defaultValue || null);
|
|
71
71
|
const [validationErrors, setValidationErrors] = useState([]);
|
|
72
72
|
const validationTimeoutRef = useRef(null);
|
|
73
|
+
const lastEmittedValueRef = useRef(void 0);
|
|
73
74
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
74
75
|
const clearValidationTimeout = () => {
|
|
75
76
|
if (validationTimeoutRef.current) {
|
|
@@ -78,6 +79,7 @@ function useCoordinateFieldState({ value, defaultValue, format, onChange, onErro
|
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
const handleChange = (newValue) => {
|
|
82
|
+
lastEmittedValueRef.current = newValue;
|
|
81
83
|
if (value === void 0) setInternalValue(newValue);
|
|
82
84
|
onChange?.(newValue);
|
|
83
85
|
};
|
|
@@ -108,7 +110,9 @@ function useCoordinateFieldState({ value, defaultValue, format, onChange, onErro
|
|
|
108
110
|
convertValueToSegmentsOrClear
|
|
109
111
|
]);
|
|
110
112
|
useEffect(() => {
|
|
111
|
-
if (value
|
|
113
|
+
if (value === void 0) return;
|
|
114
|
+
const lastEmitted = lastEmittedValueRef.current;
|
|
115
|
+
if (!(lastEmitted !== void 0 && (value === lastEmitted || value !== null && lastEmitted !== null && value.lat === lastEmitted.lat && value.lon === lastEmitted.lon))) convertValueToSegmentsOrClear(value);
|
|
112
116
|
}, [value, convertValueToSegmentsOrClear]);
|
|
113
117
|
/**
|
|
114
118
|
* Validates segment values and updates the coordinate state
|
|
@@ -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 /** 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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"}
|
|
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 // Last value emitted via onChange; `undefined` means nothing emitted yet.\n const lastEmittedValueRef = useRef<CoordinateValue | null | undefined>(\n undefined,\n );\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 lastEmittedValueRef.current = newValue;\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 return;\n }\n\n /*\n * Skip re-syncing when the controlled `value` is just the echo of our own\n * onChange (the parent storing what we emitted). Without this guard, the\n * `handleChange(null)` fired for an in-progress edit (one segment emptied,\n * or an invalid entry) comes straight back and wipes every segment and any\n * validation error that was just set.\n */\n const lastEmitted = lastEmittedValueRef.current;\n const isEchoOfEmit =\n lastEmitted !== undefined &&\n (value === lastEmitted ||\n (value !== null &&\n lastEmitted !== null &&\n value.lat === lastEmitted.lat &&\n value.lon === lastEmitted.lon));\n\n if (!isEchoOfEmit) {\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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"}
|
|
@@ -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
|
|
14
|
+
import * as react_jsx_runtime0 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
|
-
}>):
|
|
33
|
+
}>): react_jsx_runtime0.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
|
|
15
|
+
import * as react_jsx_runtime22 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):
|
|
49
|
+
}: ThemeProviderProps): react_jsx_runtime22.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.
|
|
4
|
+
"version": "9.11.3",
|
|
5
5
|
"author": "https://hypergiant.com",
|
|
6
6
|
"$schema": "https://json.schemastore.org/package",
|
|
7
7
|
"devDependencies": {
|
|
@@ -51,20 +51,20 @@
|
|
|
51
51
|
"vite-tsconfig-paths": "^5.1.4",
|
|
52
52
|
"vitest": "^4.0.15",
|
|
53
53
|
"zod": "^4.1.12",
|
|
54
|
-
"@accelint/biome-config": "1.1.0",
|
|
55
54
|
"@accelint/bus": "4.0.0",
|
|
56
55
|
"@accelint/converters": "1.0.1",
|
|
56
|
+
"@accelint/biome-config": "1.1.0",
|
|
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
|
-
"@accelint/logger": "1.1.0",
|
|
62
60
|
"@accelint/postcss-tailwind-css-modules": "1.1.0",
|
|
61
|
+
"@accelint/logger": "1.1.0",
|
|
63
62
|
"@accelint/predicates": "0.5.2",
|
|
64
|
-
"@accelint/typescript-config": "0.1.4",
|
|
65
63
|
"@accelint/prettier-config": "0.2.1",
|
|
64
|
+
"@accelint/geo": "0.6.1",
|
|
66
65
|
"@accelint/temporal": "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",
|
|
@@ -466,15 +467,15 @@
|
|
|
466
467
|
"uuid": "^11.1.0",
|
|
467
468
|
"zod": "^4.1.12",
|
|
468
469
|
"zustand": "^5.0.3",
|
|
469
|
-
"@accelint/design-foundation": "3.2.0",
|
|
470
470
|
"@accelint/bus": "4.0.0",
|
|
471
|
-
"@accelint/predicates": "0.5.2",
|
|
472
|
-
"@accelint/temporal": "0.1.4",
|
|
473
|
-
"@accelint/icons": "3.0.0",
|
|
474
|
-
"@accelint/logger": "1.1.0",
|
|
475
471
|
"@accelint/converters": "1.0.1",
|
|
476
472
|
"@accelint/core": "0.6.0",
|
|
477
|
-
"@accelint/
|
|
473
|
+
"@accelint/design-foundation": "3.2.0",
|
|
474
|
+
"@accelint/geo": "0.6.1",
|
|
475
|
+
"@accelint/icons": "3.0.0",
|
|
476
|
+
"@accelint/logger": "1.1.0",
|
|
477
|
+
"@accelint/predicates": "0.5.2",
|
|
478
|
+
"@accelint/temporal": "0.1.4"
|
|
478
479
|
},
|
|
479
480
|
"private": false,
|
|
480
481
|
"publishConfig": {
|