foldkit 0.101.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/canvas/view.d.ts +1 -1
- package/dist/canvas/view.d.ts.map +1 -1
- package/dist/canvas/view.js +5 -5
- package/dist/command/index.d.ts +71 -0
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +34 -1
- package/dist/command/public.d.ts +1 -1
- package/dist/command/public.d.ts.map +1 -1
- package/dist/command/public.js +1 -1
- package/dist/devTools/overlay.d.ts.map +1 -1
- package/dist/devTools/overlay.js +137 -110
- package/dist/dom/dom.d.ts +8 -11
- package/dist/dom/dom.d.ts.map +1 -1
- package/dist/dom/dom.js +8 -11
- package/dist/dom/elementMovement.d.ts +1 -3
- package/dist/dom/elementMovement.d.ts.map +1 -1
- package/dist/dom/elementMovement.js +1 -3
- package/dist/dom/inert.d.ts +2 -4
- package/dist/dom/inert.d.ts.map +1 -1
- package/dist/dom/inert.js +2 -4
- package/dist/dom/scrollLock.d.ts +2 -2
- package/dist/dom/scrollLock.js +2 -2
- package/dist/dom/waitForAnimation.d.ts +1 -1
- package/dist/dom/waitForAnimation.js +1 -1
- package/dist/html/boundary.d.ts +98 -0
- package/dist/html/boundary.d.ts.map +1 -0
- package/dist/html/boundary.js +176 -0
- package/dist/html/childAttribute.d.ts +44 -0
- package/dist/html/childAttribute.d.ts.map +1 -0
- package/dist/html/childAttribute.js +34 -0
- package/dist/html/index.d.ts +70 -23
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +639 -575
- package/dist/html/lazy.d.ts +12 -7
- package/dist/html/lazy.d.ts.map +1 -1
- package/dist/html/lazy.js +30 -11
- package/dist/html/public.d.ts +2 -2
- package/dist/html/public.d.ts.map +1 -1
- package/dist/html/public.js +1 -1
- package/dist/html/runtimeSingleton.d.ts +72 -0
- package/dist/html/runtimeSingleton.d.ts.map +1 -0
- package/dist/html/runtimeSingleton.js +112 -0
- package/dist/html/submodel.d.ts +98 -0
- package/dist/html/submodel.d.ts.map +1 -0
- package/dist/html/submodel.js +190 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/render/render.d.ts +1 -1
- package/dist/render/render.js +1 -1
- package/dist/runtime/messagePriority.d.ts +5 -1
- package/dist/runtime/messagePriority.d.ts.map +1 -1
- package/dist/runtime/messagePriority.js +25 -4
- package/dist/runtime/runtime.d.ts +1 -1
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +115 -61
- package/dist/submodel/public.d.ts +4 -0
- package/dist/submodel/public.d.ts.map +1 -0
- package/dist/submodel/public.js +1 -0
- package/dist/submodel/submodel.d.ts +32 -0
- package/dist/submodel/submodel.d.ts.map +1 -0
- package/dist/submodel/submodel.js +1 -0
- package/dist/test/apps/disabledButton.d.ts +4 -5
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +16 -16
- package/dist/test/scene.d.ts +8 -8
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +25 -13
- package/dist/test/story.d.ts +15 -8
- package/dist/test/story.d.ts.map +1 -1
- package/dist/test/story.js +21 -9
- package/dist/ui/animation/index.d.ts +30 -14
- package/dist/ui/animation/index.d.ts.map +1 -1
- package/dist/ui/animation/index.js +9 -19
- package/dist/ui/animation/public.d.ts +2 -2
- package/dist/ui/animation/public.d.ts.map +1 -1
- package/dist/ui/animation/public.js +1 -1
- package/dist/ui/calendar/index.d.ts +199 -84
- package/dist/ui/calendar/index.d.ts.map +1 -1
- package/dist/ui/calendar/index.js +129 -140
- package/dist/ui/calendar/public.d.ts +2 -2
- package/dist/ui/calendar/public.d.ts.map +1 -1
- package/dist/ui/calendar/public.js +1 -1
- package/dist/ui/checkbox/index.d.ts +93 -21
- package/dist/ui/checkbox/index.d.ts.map +1 -1
- package/dist/ui/checkbox/index.js +62 -33
- package/dist/ui/checkbox/public.d.ts +2 -2
- package/dist/ui/checkbox/public.d.ts.map +1 -1
- package/dist/ui/checkbox/public.js +1 -1
- package/dist/ui/combobox/multi.d.ts +35 -91
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/multi.js +34 -17
- package/dist/ui/combobox/multiPublic.d.ts +2 -2
- package/dist/ui/combobox/multiPublic.d.ts.map +1 -1
- package/dist/ui/combobox/multiPublic.js +1 -1
- package/dist/ui/combobox/public.d.ts +3 -3
- package/dist/ui/combobox/public.d.ts.map +1 -1
- package/dist/ui/combobox/public.js +2 -2
- package/dist/ui/combobox/shared.d.ts +56 -31
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +333 -322
- package/dist/ui/combobox/single.d.ts +46 -93
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/combobox/single.js +44 -17
- package/dist/ui/datePicker/index.d.ts +256 -48
- package/dist/ui/datePicker/index.d.ts.map +1 -1
- package/dist/ui/datePicker/index.js +149 -104
- package/dist/ui/datePicker/public.d.ts +2 -2
- package/dist/ui/datePicker/public.d.ts.map +1 -1
- package/dist/ui/datePicker/public.js +1 -1
- package/dist/ui/dialog/index.d.ts +95 -39
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +71 -62
- package/dist/ui/dialog/public.d.ts +2 -2
- package/dist/ui/dialog/public.d.ts.map +1 -1
- package/dist/ui/dialog/public.js +1 -1
- package/dist/ui/disclosure/index.d.ts +71 -31
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +57 -62
- package/dist/ui/disclosure/public.d.ts +2 -2
- package/dist/ui/disclosure/public.d.ts.map +1 -1
- package/dist/ui/disclosure/public.js +1 -1
- package/dist/ui/dragAndDrop/index.d.ts +6 -6
- package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/index.js +7 -7
- package/dist/ui/dragAndDrop/public.d.ts +1 -1
- package/dist/ui/dragAndDrop/public.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/public.js +1 -1
- package/dist/ui/fileDrop/index.d.ts +42 -46
- package/dist/ui/fileDrop/index.d.ts.map +1 -1
- package/dist/ui/fileDrop/index.js +30 -46
- package/dist/ui/fileDrop/public.d.ts +2 -2
- package/dist/ui/fileDrop/public.d.ts.map +1 -1
- package/dist/ui/fileDrop/public.js +1 -1
- package/dist/ui/listbox/multi.d.ts +39 -84
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +38 -20
- package/dist/ui/listbox/multiPublic.d.ts +2 -2
- package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
- package/dist/ui/listbox/multiPublic.js +1 -1
- package/dist/ui/listbox/public.d.ts +3 -3
- package/dist/ui/listbox/public.d.ts.map +1 -1
- package/dist/ui/listbox/public.js +2 -2
- package/dist/ui/listbox/shared.d.ts +71 -30
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +319 -296
- package/dist/ui/listbox/single.d.ts +57 -85
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/listbox/single.js +48 -24
- package/dist/ui/menu/index.d.ts +80 -36
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +117 -86
- package/dist/ui/menu/public.d.ts +2 -2
- package/dist/ui/menu/public.d.ts.map +1 -1
- package/dist/ui/menu/public.js +1 -1
- package/dist/ui/popover/index.d.ts +117 -44
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +88 -101
- package/dist/ui/popover/public.d.ts +2 -2
- package/dist/ui/popover/public.d.ts.map +1 -1
- package/dist/ui/popover/public.js +1 -1
- package/dist/ui/radioGroup/index.d.ts +122 -45
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.js +111 -72
- package/dist/ui/radioGroup/public.d.ts +2 -2
- package/dist/ui/radioGroup/public.d.ts.map +1 -1
- package/dist/ui/radioGroup/public.js +1 -1
- package/dist/ui/slider/index.d.ts +72 -34
- package/dist/ui/slider/index.d.ts.map +1 -1
- package/dist/ui/slider/index.js +40 -49
- package/dist/ui/slider/public.d.ts +2 -2
- package/dist/ui/slider/public.d.ts.map +1 -1
- package/dist/ui/slider/public.js +1 -1
- package/dist/ui/switch/index.d.ts +74 -21
- package/dist/ui/switch/index.d.ts.map +1 -1
- package/dist/ui/switch/index.js +62 -33
- package/dist/ui/switch/public.d.ts +2 -2
- package/dist/ui/switch/public.d.ts.map +1 -1
- package/dist/ui/switch/public.js +1 -1
- package/dist/ui/tabs/index.d.ts +107 -45
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +99 -81
- package/dist/ui/tabs/public.d.ts +2 -2
- package/dist/ui/tabs/public.d.ts.map +1 -1
- package/dist/ui/tabs/public.js +1 -1
- package/dist/ui/toast/index.d.ts +93 -109
- package/dist/ui/toast/index.d.ts.map +1 -1
- package/dist/ui/toast/index.js +16 -29
- package/dist/ui/toast/schema.d.ts +15 -4
- package/dist/ui/toast/schema.d.ts.map +1 -1
- package/dist/ui/toast/schema.js +11 -4
- package/dist/ui/toast/update.d.ts +36 -18
- package/dist/ui/toast/update.d.ts.map +1 -1
- package/dist/ui/toast/update.js +33 -14
- package/dist/ui/tooltip/index.d.ts +94 -42
- package/dist/ui/tooltip/index.d.ts.map +1 -1
- package/dist/ui/tooltip/index.js +64 -73
- package/dist/ui/tooltip/public.d.ts +2 -2
- package/dist/ui/tooltip/public.d.ts.map +1 -1
- package/dist/ui/tooltip/public.js +1 -1
- package/dist/ui/virtualList/index.d.ts +18 -41
- package/dist/ui/virtualList/index.d.ts.map +1 -1
- package/dist/ui/virtualList/index.js +17 -37
- package/dist/ui/virtualList/public.d.ts +2 -2
- package/dist/ui/virtualList/public.d.ts.map +1 -1
- package/dist/ui/virtualList/public.js +1 -1
- package/package.json +1 -1
package/dist/ui/menu/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Array, Effect, Equal, Match as M, Option, Predicate, Schema as S, Strin
|
|
|
2
2
|
import * as Command from '../../command/index.js';
|
|
3
3
|
import * as Dom from '../../dom/index.js';
|
|
4
4
|
import { OptionExt } from '../../effectExtensions/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { defineView, html, } from '../../html/index.js';
|
|
6
6
|
import { m } from '../../message/index.js';
|
|
7
7
|
import * as Mount from '../../mount/index.js';
|
|
8
8
|
import { evo } from '../../struct/index.js';
|
|
@@ -16,7 +16,7 @@ import { groupContiguous } from '../group.js';
|
|
|
16
16
|
import { findFirstEnabledIndex, isPrintableKey, keyToIndex, } from '../keyboard.js';
|
|
17
17
|
import { resolveTypeaheadMatch } from '../typeahead.js';
|
|
18
18
|
// MODEL
|
|
19
|
-
/** Schema for the activation trigger
|
|
19
|
+
/** Schema for the activation trigger: whether the user interacted via mouse or keyboard. */
|
|
20
20
|
export const ActivationTrigger = S.Literals(['Pointer', 'Keyboard']);
|
|
21
21
|
const PointerOrigin = S.Struct({
|
|
22
22
|
screenX: S.Number,
|
|
@@ -39,7 +39,7 @@ export const Model = S.Struct({
|
|
|
39
39
|
maybePointerOrigin: S.Option(PointerOrigin),
|
|
40
40
|
});
|
|
41
41
|
// MESSAGE
|
|
42
|
-
/** Sent when the menu opens via button click or keyboard. Contains an optional initial active item index
|
|
42
|
+
/** Sent when the menu opens via button click or keyboard. Contains an optional initial active item index: None for pointer, Some for keyboard. */
|
|
43
43
|
export const Opened = m('Opened', {
|
|
44
44
|
maybeActiveItemIndex: S.Option(S.Number),
|
|
45
45
|
});
|
|
@@ -55,7 +55,10 @@ export const ActivatedItem = m('ActivatedItem', {
|
|
|
55
55
|
/** Sent when the mouse leaves an enabled item. */
|
|
56
56
|
export const DeactivatedItem = m('DeactivatedItem');
|
|
57
57
|
/** Sent when an item is selected via Enter, Space, or click. */
|
|
58
|
-
export const SelectedItem = m('SelectedItem', {
|
|
58
|
+
export const SelectedItem = m('SelectedItem', {
|
|
59
|
+
index: S.Number,
|
|
60
|
+
item: S.String,
|
|
61
|
+
});
|
|
59
62
|
/** Sent when Enter or Space is pressed on the active item, triggering a programmatic click on the DOM element. */
|
|
60
63
|
export const RequestedItemClick = m('RequestedItemClick', {
|
|
61
64
|
index: S.Number,
|
|
@@ -82,15 +85,13 @@ export const CompletedLockScroll = m('CompletedLockScroll');
|
|
|
82
85
|
/** Sent when the scroll unlock command completes. */
|
|
83
86
|
export const CompletedUnlockScroll = m('CompletedUnlockScroll');
|
|
84
87
|
/** Sent when the inert-others command completes. */
|
|
85
|
-
export const
|
|
88
|
+
export const CompletedInertOthers = m('CompletedInertOthers');
|
|
86
89
|
/** Sent when the restore-inert command completes. */
|
|
87
|
-
export const
|
|
90
|
+
export const CompletedRestoreInert = m('CompletedRestoreInert');
|
|
88
91
|
/** Sent when the scroll-into-view command completes after keyboard activation. */
|
|
89
92
|
export const CompletedScrollIntoView = m('CompletedScrollIntoView');
|
|
90
93
|
/** Sent when the programmatic click command completes. */
|
|
91
94
|
export const CompletedClickItem = m('CompletedClickItem');
|
|
92
|
-
/** Sent when the advance-focus command completes. */
|
|
93
|
-
export const CompletedAdvanceFocus = m('CompletedAdvanceFocus');
|
|
94
95
|
/** Sent when a mouse click on the button is ignored because pointer-down already handled the toggle. */
|
|
95
96
|
export const IgnoredMouseClick = m('IgnoredMouseClick');
|
|
96
97
|
/** Sent when a Space key-up is captured to prevent page scrolling. */
|
|
@@ -133,11 +134,10 @@ export const Message = S.Union([
|
|
|
133
134
|
CompletedFocusButton,
|
|
134
135
|
CompletedLockScroll,
|
|
135
136
|
CompletedUnlockScroll,
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
CompletedInertOthers,
|
|
138
|
+
CompletedRestoreInert,
|
|
138
139
|
CompletedScrollIntoView,
|
|
139
140
|
CompletedClickItem,
|
|
140
|
-
CompletedAdvanceFocus,
|
|
141
141
|
IgnoredMouseClick,
|
|
142
142
|
SuppressedSpaceScroll,
|
|
143
143
|
CompletedAnchorMenu,
|
|
@@ -146,6 +146,14 @@ export const Message = S.Union([
|
|
|
146
146
|
PressedPointerOnButton,
|
|
147
147
|
ReleasedPointerOnItems,
|
|
148
148
|
]);
|
|
149
|
+
// OUT MESSAGE
|
|
150
|
+
/** Sent to the parent when a menu item is selected. Carries both the selected value (from the `viewInputs.items` array supplied at view time) and its index. The menu has already closed when this fires; the parent does not need to dispatch `Ui.Menu.close`. */
|
|
151
|
+
export const Selected = m('Selected', {
|
|
152
|
+
value: S.String,
|
|
153
|
+
index: S.Number,
|
|
154
|
+
});
|
|
155
|
+
/** Union of out-messages the menu component can produce. Surfaced as the third element of `update`'s return tuple and pattern-matched by the parent. */
|
|
156
|
+
export const OutMessage = S.Union([Selected]);
|
|
149
157
|
// INIT
|
|
150
158
|
const SEARCH_DEBOUNCE_MILLISECONDS = 350;
|
|
151
159
|
const LEFT_MOUSE_BUTTON = 0;
|
|
@@ -185,9 +193,9 @@ export const LockScroll = Command.define('LockScroll', CompletedLockScroll)(Dom.
|
|
|
185
193
|
/** Re-enables page scrolling after the menu closes. */
|
|
186
194
|
export const UnlockScroll = Command.define('UnlockScroll', CompletedUnlockScroll)(Dom.unlockScroll.pipe(Effect.as(CompletedUnlockScroll())));
|
|
187
195
|
/** Marks all elements outside the menu as inert for modal behavior. */
|
|
188
|
-
export const InertOthers = Command.define('InertOthers', { id: S.String },
|
|
196
|
+
export const InertOthers = Command.define('InertOthers', { id: S.String }, CompletedInertOthers)(({ id }) => Dom.inertOthers(id, [buttonSelector(id), itemsSelector(id)]).pipe(Effect.as(CompletedInertOthers())));
|
|
189
197
|
/** Removes the inert attribute from elements outside the menu. */
|
|
190
|
-
export const RestoreInert = Command.define('RestoreInert', { id: S.String },
|
|
198
|
+
export const RestoreInert = Command.define('RestoreInert', { id: S.String }, CompletedRestoreInert)(({ id }) => Dom.restoreInert(id).pipe(Effect.as(CompletedRestoreInert())));
|
|
191
199
|
/** Moves focus to the menu items container after opening. */
|
|
192
200
|
export const FocusItems = Command.define('FocusItems', { id: S.String }, CompletedFocusItems)(({ id }) => Dom.focus(itemsSelector(id)).pipe(Effect.ignore, Effect.as(CompletedFocusItems())));
|
|
193
201
|
/** Moves focus back to the menu button after closing. */
|
|
@@ -202,7 +210,7 @@ export const DelayClearSearch = Command.define('DelayClearSearch', { version: S.
|
|
|
202
210
|
export const DetectMovementOrAnimationEnd = Command.define('DetectMovementOrAnimationEnd', { id: S.String }, GotAnimationMessage)(({ id }) => Effect.raceFirst(Dom.detectElementMovement(buttonSelector(id)).pipe(Effect.as(GotAnimationMessage({ message: AnimationEndedAnimation() }))), Dom.waitForAnimationSettled(itemsSelector(id)).pipe(Effect.as(GotAnimationMessage({ message: AnimationEndedAnimation() })))));
|
|
203
211
|
const delegateToAnimation = (model, animationMessage) => {
|
|
204
212
|
const [nextAnimation, animationCommands, maybeOutMessage] = animationUpdate(model.animation, animationMessage);
|
|
205
|
-
const mappedCommands =
|
|
213
|
+
const mappedCommands = Command.mapMessages(animationCommands, message => GotAnimationMessage({ message }));
|
|
206
214
|
const additionalCommands = Option.match(maybeOutMessage, {
|
|
207
215
|
onNone: () => [],
|
|
208
216
|
onSome: M.type().pipe(M.tagsExhaustive({
|
|
@@ -215,6 +223,7 @@ const delegateToAnimation = (model, animationMessage) => {
|
|
|
215
223
|
return [
|
|
216
224
|
evo(model, { animation: () => nextAnimation }),
|
|
217
225
|
[...mappedCommands, ...additionalCommands],
|
|
226
|
+
Option.none(),
|
|
218
227
|
];
|
|
219
228
|
};
|
|
220
229
|
/** Processes a menu message and returns the next model and commands. */
|
|
@@ -241,19 +250,20 @@ export const update = (model, message) => {
|
|
|
241
250
|
return [
|
|
242
251
|
evo(nextModel, { isOpen: () => true }),
|
|
243
252
|
[...openCommands, ...animationCommands],
|
|
253
|
+
Option.none(),
|
|
244
254
|
];
|
|
245
255
|
}
|
|
246
|
-
return [evo(baseModel, { isOpen: () => true }), openCommands];
|
|
256
|
+
return [evo(baseModel, { isOpen: () => true }), openCommands, Option.none()];
|
|
247
257
|
};
|
|
248
|
-
const closeMenu = (baseModel, commands) => {
|
|
258
|
+
const closeMenu = (baseModel, commands, maybeOutMessage = Option.none()) => {
|
|
249
259
|
const closed = closedModel(baseModel);
|
|
250
260
|
if (model.isAnimated) {
|
|
251
261
|
const [nextModel, animationCommands] = delegateToAnimation(closed, AnimationHid());
|
|
252
|
-
return [nextModel, [...commands, ...animationCommands]];
|
|
262
|
+
return [nextModel, [...commands, ...animationCommands], maybeOutMessage];
|
|
253
263
|
}
|
|
254
|
-
return [closed, commands];
|
|
264
|
+
return [closed, commands, maybeOutMessage];
|
|
255
265
|
};
|
|
256
|
-
return M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
|
|
266
|
+
return M.value(message).pipe(withUpdateReturn, M.tag('CompletedFocusItems', 'CompletedFocusButton', 'CompletedLockScroll', 'CompletedUnlockScroll', 'CompletedInertOthers', 'CompletedRestoreInert', 'CompletedScrollIntoView', 'CompletedClickItem', 'SuppressedSpaceScroll', 'CompletedAnchorMenu', 'CompletedPortalMenuBackdrop', () => [model, [], Option.none()]), M.tagsExhaustive({
|
|
257
267
|
Opened: ({ maybeActiveItemIndex }) => openMenu(evo(model, {
|
|
258
268
|
maybeActiveItemIndex: () => maybeActiveItemIndex,
|
|
259
269
|
activationTrigger: () => Option.match(maybeActiveItemIndex, {
|
|
@@ -267,7 +277,7 @@ export const update = (model, message) => {
|
|
|
267
277
|
Closed: () => closeMenu(model, closeWithFocusCommands),
|
|
268
278
|
BlurredItems: () => {
|
|
269
279
|
if (Option.exists(model.maybeLastButtonPointerType, Equal.equals('mouse'))) {
|
|
270
|
-
return [model, []];
|
|
280
|
+
return [model, [], Option.none()];
|
|
271
281
|
}
|
|
272
282
|
return closeMenu(model, closeWithoutFocusCommands);
|
|
273
283
|
},
|
|
@@ -279,11 +289,12 @@ export const update = (model, message) => {
|
|
|
279
289
|
activationTrigger === 'Keyboard'
|
|
280
290
|
? [ScrollIntoView({ id: model.id, index })]
|
|
281
291
|
: [],
|
|
292
|
+
Option.none(),
|
|
282
293
|
],
|
|
283
294
|
MovedPointerOverItem: ({ index, screenX, screenY }) => {
|
|
284
295
|
const isSamePosition = Option.exists(model.maybeLastPointerPosition, position => position.screenX === screenX && position.screenY === screenY);
|
|
285
296
|
if (isSamePosition) {
|
|
286
|
-
return [model, []];
|
|
297
|
+
return [model, [], Option.none()];
|
|
287
298
|
}
|
|
288
299
|
return [
|
|
289
300
|
evo(model, {
|
|
@@ -292,15 +303,21 @@ export const update = (model, message) => {
|
|
|
292
303
|
maybeLastPointerPosition: () => Option.some({ screenX, screenY }),
|
|
293
304
|
}),
|
|
294
305
|
[],
|
|
306
|
+
Option.none(),
|
|
295
307
|
];
|
|
296
308
|
},
|
|
297
309
|
DeactivatedItem: () => model.activationTrigger === 'Pointer'
|
|
298
|
-
? [
|
|
299
|
-
|
|
300
|
-
|
|
310
|
+
? [
|
|
311
|
+
evo(model, { maybeActiveItemIndex: () => Option.none() }),
|
|
312
|
+
[],
|
|
313
|
+
Option.none(),
|
|
314
|
+
]
|
|
315
|
+
: [model, [], Option.none()],
|
|
316
|
+
SelectedItem: ({ index, item }) => closeMenu(model, closeWithFocusCommands, Option.some(Selected({ value: item, index }))),
|
|
301
317
|
RequestedItemClick: ({ index }) => [
|
|
302
318
|
model,
|
|
303
319
|
[ClickItem({ id: model.id, index })],
|
|
320
|
+
Option.none(),
|
|
304
321
|
],
|
|
305
322
|
Searched: ({ key, maybeTargetIndex }) => {
|
|
306
323
|
const nextSearchQuery = model.searchQuery + key;
|
|
@@ -312,13 +329,14 @@ export const update = (model, message) => {
|
|
|
312
329
|
maybeActiveItemIndex: () => Option.orElse(maybeTargetIndex, () => model.maybeActiveItemIndex),
|
|
313
330
|
}),
|
|
314
331
|
[DelayClearSearch({ version: nextSearchVersion })],
|
|
332
|
+
Option.none(),
|
|
315
333
|
];
|
|
316
334
|
},
|
|
317
335
|
ClearedSearch: ({ version }) => {
|
|
318
336
|
if (version !== model.searchVersion) {
|
|
319
|
-
return [model, []];
|
|
337
|
+
return [model, [], Option.none()];
|
|
320
338
|
}
|
|
321
|
-
return [evo(model, { searchQuery: () => '' }), []];
|
|
339
|
+
return [evo(model, { searchQuery: () => '' }), [], Option.none()];
|
|
322
340
|
},
|
|
323
341
|
GotAnimationMessage: ({ message: animationMessage }) => delegateToAnimation(model, animationMessage),
|
|
324
342
|
PressedPointerOnButton: ({ pointerType, button, screenX, screenY, timeStamp, }) => {
|
|
@@ -326,7 +344,7 @@ export const update = (model, message) => {
|
|
|
326
344
|
maybeLastButtonPointerType: () => Option.some(pointerType),
|
|
327
345
|
});
|
|
328
346
|
if (pointerType !== 'mouse' || button !== LEFT_MOUSE_BUTTON) {
|
|
329
|
-
return [withPointerType, []];
|
|
347
|
+
return [withPointerType, [], Option.none()];
|
|
330
348
|
}
|
|
331
349
|
if (model.isOpen) {
|
|
332
350
|
const [closed, commands] = closeMenu(withPointerType, closeWithFocusCommands);
|
|
@@ -335,6 +353,7 @@ export const update = (model, message) => {
|
|
|
335
353
|
maybeLastButtonPointerType: () => Option.some(pointerType),
|
|
336
354
|
}),
|
|
337
355
|
commands,
|
|
356
|
+
Option.none(),
|
|
338
357
|
];
|
|
339
358
|
}
|
|
340
359
|
return openMenu(evo(withPointerType, {
|
|
@@ -358,7 +377,7 @@ export const update = (model, message) => {
|
|
|
358
377
|
isMovementBelowThreshold ||
|
|
359
378
|
isHoldTimeBelowThreshold ||
|
|
360
379
|
hasNoActiveItem) {
|
|
361
|
-
return [model, []];
|
|
380
|
+
return [model, [], Option.none()];
|
|
362
381
|
}
|
|
363
382
|
return [
|
|
364
383
|
model,
|
|
@@ -368,24 +387,14 @@ export const update = (model, message) => {
|
|
|
368
387
|
index: model.maybeActiveItemIndex.value,
|
|
369
388
|
}),
|
|
370
389
|
],
|
|
390
|
+
Option.none(),
|
|
371
391
|
];
|
|
372
392
|
},
|
|
373
|
-
CompletedFocusItems: () => [model, []],
|
|
374
|
-
CompletedFocusButton: () => [model, []],
|
|
375
|
-
CompletedLockScroll: () => [model, []],
|
|
376
|
-
CompletedUnlockScroll: () => [model, []],
|
|
377
|
-
CompletedSetupInert: () => [model, []],
|
|
378
|
-
CompletedTeardownInert: () => [model, []],
|
|
379
|
-
CompletedScrollIntoView: () => [model, []],
|
|
380
|
-
CompletedClickItem: () => [model, []],
|
|
381
|
-
CompletedAdvanceFocus: () => [model, []],
|
|
382
393
|
IgnoredMouseClick: () => [
|
|
383
394
|
evo(model, { maybeLastButtonPointerType: () => Option.none() }),
|
|
384
395
|
[],
|
|
396
|
+
Option.none(),
|
|
385
397
|
],
|
|
386
|
-
SuppressedSpaceScroll: () => [model, []],
|
|
387
|
-
CompletedAnchorMenu: () => [model, []],
|
|
388
|
-
CompletedPortalMenuBackdrop: () => [model, []],
|
|
389
398
|
}));
|
|
390
399
|
};
|
|
391
400
|
/** The anchor-positioning Mount this Menu renders on its panel. Exposed so
|
|
@@ -408,18 +417,19 @@ export const open = (model) => update(model, Opened({ maybeActiveItemIndex: Opti
|
|
|
408
417
|
/** Programmatically closes the menu, updating the model and returning
|
|
409
418
|
* focus and modal commands. Use this in domain-event handlers to close the menu. */
|
|
410
419
|
export const close = (model) => update(model, Closed());
|
|
411
|
-
/** Programmatically selects a menu item
|
|
412
|
-
* focus commands. Use this in domain-event handlers
|
|
413
|
-
export const selectItem = (model, index) => update(model, SelectedItem({ index }));
|
|
420
|
+
/** Programmatically selects a menu item, closing the menu and returning
|
|
421
|
+
* focus commands plus a `Selected` OutMessage. Use this in domain-event handlers. */
|
|
422
|
+
export const selectItem = (model, item, index) => update(model, SelectedItem({ index, item }));
|
|
414
423
|
export { groupContiguous, resolveTypeaheadMatch };
|
|
415
424
|
const itemId = (id, index) => `${id}-item-${index}`;
|
|
416
|
-
|
|
417
|
-
|
|
425
|
+
const internalView = () =>
|
|
426
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
427
|
+
menuViewImpl;
|
|
428
|
+
const menuViewImpl = defineView((model, viewInputs) => {
|
|
418
429
|
const h = html();
|
|
419
|
-
const {
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
: toParentMessage(SelectedItem({ index }));
|
|
430
|
+
const { id, isOpen, animation: { transitionState }, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, } = model;
|
|
431
|
+
const { items, itemToConfig, isItemDisabled, itemToSearchText = (item) => item, isButtonDisabled, buttonContent, buttonClassName, buttonAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor, } = viewInputs;
|
|
432
|
+
const dispatchSelectedItem = (item, index) => SelectedItem({ index, item });
|
|
423
433
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
424
434
|
const isVisible = isOpen || isLeaving;
|
|
425
435
|
const animationAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => [
|
|
@@ -445,45 +455,41 @@ export const view = (config) => {
|
|
|
445
455
|
if (isOpen) {
|
|
446
456
|
return handleItemsKeyDown(key);
|
|
447
457
|
}
|
|
448
|
-
return M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => Option.some(
|
|
449
|
-
maybeActiveItemIndex: Option.some(firstEnabledIndex),
|
|
450
|
-
})))), M.when('ArrowUp', () => Option.some(toParentMessage(Opened({
|
|
451
|
-
maybeActiveItemIndex: Option.some(lastEnabledIndex),
|
|
452
|
-
})))), M.orElse(() => Option.none()));
|
|
458
|
+
return M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => Option.some(Opened({ maybeActiveItemIndex: Option.some(firstEnabledIndex) }))), M.when('ArrowUp', () => Option.some(Opened({ maybeActiveItemIndex: Option.some(lastEnabledIndex) }))), M.orElse(() => Option.none()));
|
|
453
459
|
};
|
|
454
|
-
const handleButtonPointerDown = (pointerType, button, screenX, screenY, timeStamp) => Option.some(
|
|
460
|
+
const handleButtonPointerDown = (pointerType, button, screenX, screenY, timeStamp) => Option.some(PressedPointerOnButton({
|
|
455
461
|
pointerType,
|
|
456
462
|
button,
|
|
457
463
|
screenX,
|
|
458
464
|
screenY,
|
|
459
465
|
timeStamp,
|
|
460
|
-
}))
|
|
466
|
+
}));
|
|
461
467
|
const handleButtonClick = () => {
|
|
462
468
|
const isMouse = Option.exists(maybeLastButtonPointerType, type => type === 'mouse');
|
|
463
469
|
if (isMouse) {
|
|
464
|
-
return
|
|
470
|
+
return IgnoredMouseClick();
|
|
465
471
|
}
|
|
466
472
|
else if (isOpen) {
|
|
467
|
-
return
|
|
473
|
+
return Closed();
|
|
468
474
|
}
|
|
469
475
|
else {
|
|
470
|
-
return
|
|
476
|
+
return Opened({ maybeActiveItemIndex: Option.none() });
|
|
471
477
|
}
|
|
472
478
|
};
|
|
473
|
-
const handleSpaceKeyUp = (key) => OptionExt.when(key === ' ',
|
|
479
|
+
const handleSpaceKeyUp = (key) => OptionExt.when(key === ' ', SuppressedSpaceScroll());
|
|
474
480
|
const resolveActiveIndex = keyToIndex('ArrowDown', 'ArrowUp', items.length, Option.getOrElse(maybeActiveItemIndex, () => 0), isDisabled);
|
|
475
481
|
const searchForKey = (key) => {
|
|
476
482
|
const nextQuery = searchQuery + key;
|
|
477
483
|
const maybeTargetIndex = resolveTypeaheadMatch(items, nextQuery, maybeActiveItemIndex, isDisabled, itemToSearchText, Str.isNonEmpty(searchQuery));
|
|
478
|
-
return Option.some(
|
|
484
|
+
return Option.some(Searched({ key, maybeTargetIndex }));
|
|
479
485
|
};
|
|
480
|
-
const handleItemsKeyDown = (key) => M.value(key).pipe(M.when('Escape', () => Option.some(
|
|
486
|
+
const handleItemsKeyDown = (key) => M.value(key).pipe(M.when('Escape', () => Option.some(Closed())), M.when('Enter', () => Option.map(maybeActiveItemIndex, index => RequestedItemClick({ index }))), M.when(' ', () => Str.isNonEmpty(searchQuery)
|
|
481
487
|
? searchForKey(' ')
|
|
482
|
-
: Option.map(maybeActiveItemIndex, index =>
|
|
488
|
+
: Option.map(maybeActiveItemIndex, index => RequestedItemClick({ index }))), M.whenOr('ArrowDown', 'ArrowUp', 'Home', 'End', 'PageUp', 'PageDown', () => Option.some(ActivatedItem({
|
|
483
489
|
index: resolveActiveIndex(key),
|
|
484
490
|
activationTrigger: 'Keyboard',
|
|
485
|
-
})))
|
|
486
|
-
const handleItemsPointerUp = (screenX, screenY, pointerType, timeStamp) => OptionExt.when(pointerType === 'mouse',
|
|
491
|
+
}))), M.when(isPrintableKey, () => searchForKey(key)), M.orElse(() => Option.none()));
|
|
492
|
+
const handleItemsPointerUp = (screenX, screenY, pointerType, timeStamp) => OptionExt.when(pointerType === 'mouse', ReleasedPointerOnItems({ screenX, screenY, timeStamp }));
|
|
487
493
|
const resolvedButtonAttributes = [
|
|
488
494
|
h.Id(`${id}-button`),
|
|
489
495
|
h.Type('button'),
|
|
@@ -514,7 +520,7 @@ export const view = (config) => {
|
|
|
514
520
|
const anchorAttributes = anchor
|
|
515
521
|
? [
|
|
516
522
|
h.Style({ position: 'absolute', margin: '0', visibility: 'hidden' }),
|
|
517
|
-
h.OnMount(
|
|
523
|
+
h.OnMount(AnchorMenu({ buttonId: `${id}-button`, anchor })),
|
|
518
524
|
]
|
|
519
525
|
: [];
|
|
520
526
|
const itemsContainerAttributes = [
|
|
@@ -531,7 +537,7 @@ export const view = (config) => {
|
|
|
531
537
|
h.OnKeyDownPreventDefault(handleItemsKeyDown),
|
|
532
538
|
h.OnKeyUpPreventDefault(handleSpaceKeyUp),
|
|
533
539
|
h.OnPointerUp(handleItemsPointerUp),
|
|
534
|
-
h.OnBlur(
|
|
540
|
+
h.OnBlur(BlurredItems()),
|
|
535
541
|
]),
|
|
536
542
|
...(itemsClassName ? [h.Class(itemsClassName)] : []),
|
|
537
543
|
...itemsAttributes,
|
|
@@ -553,13 +559,13 @@ export const view = (config) => {
|
|
|
553
559
|
: []),
|
|
554
560
|
...(isInteractive
|
|
555
561
|
? [
|
|
556
|
-
h.OnClick(dispatchSelectedItem(index)),
|
|
562
|
+
h.OnClick(dispatchSelectedItem(item, index)),
|
|
557
563
|
...(isActiveItem
|
|
558
564
|
? []
|
|
559
565
|
: [
|
|
560
|
-
h.OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch',
|
|
566
|
+
h.OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch', MovedPointerOverItem({ index, screenX, screenY }))),
|
|
561
567
|
]),
|
|
562
|
-
h.OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch',
|
|
568
|
+
h.OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch', DeactivatedItem())),
|
|
563
569
|
]
|
|
564
570
|
: []),
|
|
565
571
|
...(itemConfig.className ? [h.Class(itemConfig.className)] : []),
|
|
@@ -589,7 +595,9 @@ export const view = (config) => {
|
|
|
589
595
|
const groupContent = [...headingElement, ...segment.items];
|
|
590
596
|
const groupElement = h.keyed('div')(`${id}-group-${segment.key}`, [
|
|
591
597
|
h.Role('group'),
|
|
592
|
-
...(Option.isSome(maybeHeading)
|
|
598
|
+
...(Option.isSome(maybeHeading)
|
|
599
|
+
? [h.AriaLabelledBy(headingId)]
|
|
600
|
+
: []),
|
|
593
601
|
...(groupClassName ? [h.Class(groupClassName)] : []),
|
|
594
602
|
...groupAttributes,
|
|
595
603
|
], groupContent);
|
|
@@ -599,7 +607,9 @@ export const view = (config) => {
|
|
|
599
607
|
? [
|
|
600
608
|
h.keyed('div')(`${id}-separator-${segmentIndex}`, [
|
|
601
609
|
h.Role('separator'),
|
|
602
|
-
...(separatorClassName
|
|
610
|
+
...(separatorClassName
|
|
611
|
+
? [h.Class(separatorClassName)]
|
|
612
|
+
: []),
|
|
603
613
|
...separatorAttributes,
|
|
604
614
|
], []),
|
|
605
615
|
]
|
|
@@ -608,16 +618,19 @@ export const view = (config) => {
|
|
|
608
618
|
});
|
|
609
619
|
};
|
|
610
620
|
const backdrop = h.keyed('div')(`${id}-backdrop`, [
|
|
611
|
-
h.OnMount(
|
|
612
|
-
...(isLeaving ? [] : [h.OnClick(
|
|
621
|
+
h.OnMount(PortalMenuBackdrop()),
|
|
622
|
+
...(isLeaving ? [] : [h.OnClick(Closed())]),
|
|
613
623
|
...(backdropClassName ? [h.Class(backdropClassName)] : []),
|
|
614
624
|
...backdropAttributes,
|
|
615
625
|
], []);
|
|
616
626
|
const renderedItems = renderGroupedItems();
|
|
617
|
-
const scrollableItems = itemsScrollClassName ||
|
|
627
|
+
const scrollableItems = itemsScrollClassName ||
|
|
628
|
+
Array.isReadonlyArrayNonEmpty(itemsScrollAttributes)
|
|
618
629
|
? [
|
|
619
630
|
h.div([
|
|
620
|
-
...(itemsScrollClassName
|
|
631
|
+
...(itemsScrollClassName
|
|
632
|
+
? [h.Class(itemsScrollClassName)]
|
|
633
|
+
: []),
|
|
621
634
|
...itemsScrollAttributes,
|
|
622
635
|
], renderedItems),
|
|
623
636
|
]
|
|
@@ -637,14 +650,32 @@ export const view = (config) => {
|
|
|
637
650
|
]),
|
|
638
651
|
...(isVisible ? visibleContent : []),
|
|
639
652
|
]);
|
|
640
|
-
};
|
|
641
|
-
/**
|
|
642
|
-
*
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
653
|
+
});
|
|
654
|
+
/** Pairs the menu's `view` and `update` (and programmatic helpers)
|
|
655
|
+
* behind a single Item-typed entry point. Declaring the menu once at
|
|
656
|
+
* module scope ensures the view's `Item` type and the OutMessage's
|
|
657
|
+
* `item` type can't drift:
|
|
658
|
+
*
|
|
659
|
+
* ```ts
|
|
660
|
+
* const ActionMenu = Ui.Menu.create<Action>()
|
|
661
|
+
*
|
|
662
|
+
* // In view:
|
|
663
|
+
* h.submodel({ view: ActionMenu.view, ... })
|
|
664
|
+
*
|
|
665
|
+
* // In update:
|
|
666
|
+
* const [next, commands, maybeOutMessage] = ActionMenu.update(model.menu, message)
|
|
667
|
+
* // maybeOutMessage: Option<Ui.Menu.OutMessage<Action>>
|
|
668
|
+
* ```
|
|
669
|
+
*/
|
|
670
|
+
export const create = () => {
|
|
671
|
+
const cast = (result) =>
|
|
672
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
673
|
+
result;
|
|
674
|
+
return {
|
|
675
|
+
view: internalView(),
|
|
676
|
+
update: (model, message) => cast(update(model, message)),
|
|
677
|
+
selectItem: (model, item, index) => cast(selectItem(model, item, index)),
|
|
678
|
+
open: model => cast(open(model)),
|
|
679
|
+
close: model => cast(close(model)),
|
|
680
|
+
};
|
|
650
681
|
};
|
package/dist/ui/menu/public.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { init,
|
|
2
|
-
export type { ActivationTrigger, Opened, Closed, BlurredItems, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, Searched, PressedPointerOnButton, ReleasedPointerOnItems, IgnoredMouseClick, SuppressedSpaceScroll, InitConfig,
|
|
1
|
+
export { init, create, Model, Message, OutMessage, Selected, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedInertOthers, CompletedRestoreInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorMenu, CompletedPortalMenuBackdrop, AnchorMenu, PortalMenuBackdrop, ClearedSearch, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrAnimationEnd, } from './index.js';
|
|
2
|
+
export type { ActivationTrigger, Opened, Closed, BlurredItems, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, Searched, PressedPointerOnButton, ReleasedPointerOnItems, IgnoredMouseClick, SuppressedSpaceScroll, InitConfig, ViewInputs, ItemConfig, GroupHeading, } from './index.js';
|
|
3
3
|
export type { AnchorConfig } from '../anchor.js';
|
|
4
4
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/ui/menu/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init,
|
|
1
|
+
export { init, create, Model, Message, OutMessage, Selected, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedInertOthers, CompletedRestoreInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorMenu, CompletedPortalMenuBackdrop, AnchorMenu, PortalMenuBackdrop, ClearedSearch, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrAnimationEnd, } from './index.js';
|