foldkit 0.100.1 → 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.
Files changed (217) hide show
  1. package/README.md +3 -2
  2. package/dist/canvas/view.d.ts +1 -1
  3. package/dist/canvas/view.d.ts.map +1 -1
  4. package/dist/canvas/view.js +5 -5
  5. package/dist/command/index.d.ts +71 -0
  6. package/dist/command/index.d.ts.map +1 -1
  7. package/dist/command/index.js +34 -1
  8. package/dist/command/public.d.ts +1 -1
  9. package/dist/command/public.d.ts.map +1 -1
  10. package/dist/command/public.js +1 -1
  11. package/dist/devTools/overlay.d.ts.map +1 -1
  12. package/dist/devTools/overlay.js +156 -149
  13. package/dist/dom/dom.d.ts +8 -11
  14. package/dist/dom/dom.d.ts.map +1 -1
  15. package/dist/dom/dom.js +8 -11
  16. package/dist/dom/elementMovement.d.ts +1 -3
  17. package/dist/dom/elementMovement.d.ts.map +1 -1
  18. package/dist/dom/elementMovement.js +1 -3
  19. package/dist/dom/inert.d.ts +2 -4
  20. package/dist/dom/inert.d.ts.map +1 -1
  21. package/dist/dom/inert.js +2 -4
  22. package/dist/dom/scrollLock.d.ts +2 -2
  23. package/dist/dom/scrollLock.js +2 -2
  24. package/dist/dom/waitForAnimation.d.ts +1 -1
  25. package/dist/dom/waitForAnimation.js +1 -1
  26. package/dist/html/boundary.d.ts +98 -0
  27. package/dist/html/boundary.d.ts.map +1 -0
  28. package/dist/html/boundary.js +176 -0
  29. package/dist/html/childAttribute.d.ts +44 -0
  30. package/dist/html/childAttribute.d.ts.map +1 -0
  31. package/dist/html/childAttribute.js +34 -0
  32. package/dist/html/index.d.ts +70 -23
  33. package/dist/html/index.d.ts.map +1 -1
  34. package/dist/html/index.js +639 -575
  35. package/dist/html/lazy.d.ts +12 -7
  36. package/dist/html/lazy.d.ts.map +1 -1
  37. package/dist/html/lazy.js +30 -11
  38. package/dist/html/public.d.ts +2 -2
  39. package/dist/html/public.d.ts.map +1 -1
  40. package/dist/html/public.js +1 -1
  41. package/dist/html/runtimeSingleton.d.ts +72 -0
  42. package/dist/html/runtimeSingleton.d.ts.map +1 -0
  43. package/dist/html/runtimeSingleton.js +112 -0
  44. package/dist/html/submodel.d.ts +98 -0
  45. package/dist/html/submodel.d.ts.map +1 -0
  46. package/dist/html/submodel.js +190 -0
  47. package/dist/index.d.ts +1 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +1 -0
  50. package/dist/render/render.d.ts +1 -1
  51. package/dist/render/render.js +1 -1
  52. package/dist/runtime/messagePriority.d.ts +5 -1
  53. package/dist/runtime/messagePriority.d.ts.map +1 -1
  54. package/dist/runtime/messagePriority.js +25 -4
  55. package/dist/runtime/runtime.d.ts +11 -11
  56. package/dist/runtime/runtime.d.ts.map +1 -1
  57. package/dist/runtime/runtime.js +118 -63
  58. package/dist/runtime/subscription.d.ts +139 -19
  59. package/dist/runtime/subscription.d.ts.map +1 -1
  60. package/dist/runtime/subscription.js +90 -9
  61. package/dist/submodel/public.d.ts +4 -0
  62. package/dist/submodel/public.d.ts.map +1 -0
  63. package/dist/submodel/public.js +1 -0
  64. package/dist/submodel/submodel.d.ts +32 -0
  65. package/dist/submodel/submodel.d.ts.map +1 -0
  66. package/dist/submodel/submodel.js +1 -0
  67. package/dist/subscription/animationFrame.d.ts +23 -26
  68. package/dist/subscription/animationFrame.d.ts.map +1 -1
  69. package/dist/subscription/animationFrame.js +17 -18
  70. package/dist/subscription/public.d.ts +2 -2
  71. package/dist/subscription/public.d.ts.map +1 -1
  72. package/dist/subscription/public.js +1 -1
  73. package/dist/test/apps/disabledButton.d.ts +4 -5
  74. package/dist/test/apps/disabledButton.d.ts.map +1 -1
  75. package/dist/test/apps/disabledButton.js +16 -16
  76. package/dist/test/scene.d.ts +8 -8
  77. package/dist/test/scene.d.ts.map +1 -1
  78. package/dist/test/scene.js +25 -13
  79. package/dist/test/story.d.ts +15 -8
  80. package/dist/test/story.d.ts.map +1 -1
  81. package/dist/test/story.js +21 -9
  82. package/dist/ui/animation/index.d.ts +30 -14
  83. package/dist/ui/animation/index.d.ts.map +1 -1
  84. package/dist/ui/animation/index.js +9 -19
  85. package/dist/ui/animation/public.d.ts +2 -2
  86. package/dist/ui/animation/public.d.ts.map +1 -1
  87. package/dist/ui/animation/public.js +1 -1
  88. package/dist/ui/calendar/index.d.ts +199 -84
  89. package/dist/ui/calendar/index.d.ts.map +1 -1
  90. package/dist/ui/calendar/index.js +129 -140
  91. package/dist/ui/calendar/public.d.ts +2 -2
  92. package/dist/ui/calendar/public.d.ts.map +1 -1
  93. package/dist/ui/calendar/public.js +1 -1
  94. package/dist/ui/checkbox/index.d.ts +93 -21
  95. package/dist/ui/checkbox/index.d.ts.map +1 -1
  96. package/dist/ui/checkbox/index.js +62 -33
  97. package/dist/ui/checkbox/public.d.ts +2 -2
  98. package/dist/ui/checkbox/public.d.ts.map +1 -1
  99. package/dist/ui/checkbox/public.js +1 -1
  100. package/dist/ui/combobox/multi.d.ts +35 -91
  101. package/dist/ui/combobox/multi.d.ts.map +1 -1
  102. package/dist/ui/combobox/multi.js +34 -17
  103. package/dist/ui/combobox/multiPublic.d.ts +2 -2
  104. package/dist/ui/combobox/multiPublic.d.ts.map +1 -1
  105. package/dist/ui/combobox/multiPublic.js +1 -1
  106. package/dist/ui/combobox/public.d.ts +3 -3
  107. package/dist/ui/combobox/public.d.ts.map +1 -1
  108. package/dist/ui/combobox/public.js +2 -2
  109. package/dist/ui/combobox/shared.d.ts +56 -31
  110. package/dist/ui/combobox/shared.d.ts.map +1 -1
  111. package/dist/ui/combobox/shared.js +333 -322
  112. package/dist/ui/combobox/single.d.ts +46 -93
  113. package/dist/ui/combobox/single.d.ts.map +1 -1
  114. package/dist/ui/combobox/single.js +44 -17
  115. package/dist/ui/datePicker/index.d.ts +256 -48
  116. package/dist/ui/datePicker/index.d.ts.map +1 -1
  117. package/dist/ui/datePicker/index.js +149 -104
  118. package/dist/ui/datePicker/public.d.ts +2 -2
  119. package/dist/ui/datePicker/public.d.ts.map +1 -1
  120. package/dist/ui/datePicker/public.js +1 -1
  121. package/dist/ui/dialog/index.d.ts +95 -39
  122. package/dist/ui/dialog/index.d.ts.map +1 -1
  123. package/dist/ui/dialog/index.js +71 -62
  124. package/dist/ui/dialog/public.d.ts +2 -2
  125. package/dist/ui/dialog/public.d.ts.map +1 -1
  126. package/dist/ui/dialog/public.js +1 -1
  127. package/dist/ui/disclosure/index.d.ts +71 -31
  128. package/dist/ui/disclosure/index.d.ts.map +1 -1
  129. package/dist/ui/disclosure/index.js +57 -62
  130. package/dist/ui/disclosure/public.d.ts +2 -2
  131. package/dist/ui/disclosure/public.d.ts.map +1 -1
  132. package/dist/ui/disclosure/public.js +1 -1
  133. package/dist/ui/dragAndDrop/index.d.ts +385 -103
  134. package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
  135. package/dist/ui/dragAndDrop/index.js +26 -31
  136. package/dist/ui/dragAndDrop/public.d.ts +1 -1
  137. package/dist/ui/dragAndDrop/public.d.ts.map +1 -1
  138. package/dist/ui/dragAndDrop/public.js +1 -1
  139. package/dist/ui/fileDrop/index.d.ts +42 -46
  140. package/dist/ui/fileDrop/index.d.ts.map +1 -1
  141. package/dist/ui/fileDrop/index.js +30 -46
  142. package/dist/ui/fileDrop/public.d.ts +2 -2
  143. package/dist/ui/fileDrop/public.d.ts.map +1 -1
  144. package/dist/ui/fileDrop/public.js +1 -1
  145. package/dist/ui/listbox/multi.d.ts +39 -84
  146. package/dist/ui/listbox/multi.d.ts.map +1 -1
  147. package/dist/ui/listbox/multi.js +38 -20
  148. package/dist/ui/listbox/multiPublic.d.ts +2 -2
  149. package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
  150. package/dist/ui/listbox/multiPublic.js +1 -1
  151. package/dist/ui/listbox/public.d.ts +3 -3
  152. package/dist/ui/listbox/public.d.ts.map +1 -1
  153. package/dist/ui/listbox/public.js +2 -2
  154. package/dist/ui/listbox/shared.d.ts +71 -30
  155. package/dist/ui/listbox/shared.d.ts.map +1 -1
  156. package/dist/ui/listbox/shared.js +319 -296
  157. package/dist/ui/listbox/single.d.ts +57 -85
  158. package/dist/ui/listbox/single.d.ts.map +1 -1
  159. package/dist/ui/listbox/single.js +48 -24
  160. package/dist/ui/menu/index.d.ts +80 -36
  161. package/dist/ui/menu/index.d.ts.map +1 -1
  162. package/dist/ui/menu/index.js +117 -86
  163. package/dist/ui/menu/public.d.ts +2 -2
  164. package/dist/ui/menu/public.d.ts.map +1 -1
  165. package/dist/ui/menu/public.js +1 -1
  166. package/dist/ui/popover/index.d.ts +117 -44
  167. package/dist/ui/popover/index.d.ts.map +1 -1
  168. package/dist/ui/popover/index.js +88 -101
  169. package/dist/ui/popover/public.d.ts +2 -2
  170. package/dist/ui/popover/public.d.ts.map +1 -1
  171. package/dist/ui/popover/public.js +1 -1
  172. package/dist/ui/radioGroup/index.d.ts +122 -45
  173. package/dist/ui/radioGroup/index.d.ts.map +1 -1
  174. package/dist/ui/radioGroup/index.js +111 -72
  175. package/dist/ui/radioGroup/public.d.ts +2 -2
  176. package/dist/ui/radioGroup/public.d.ts.map +1 -1
  177. package/dist/ui/radioGroup/public.js +1 -1
  178. package/dist/ui/slider/index.d.ts +247 -103
  179. package/dist/ui/slider/index.d.ts.map +1 -1
  180. package/dist/ui/slider/index.js +52 -68
  181. package/dist/ui/slider/public.d.ts +2 -2
  182. package/dist/ui/slider/public.d.ts.map +1 -1
  183. package/dist/ui/slider/public.js +1 -1
  184. package/dist/ui/switch/index.d.ts +74 -21
  185. package/dist/ui/switch/index.d.ts.map +1 -1
  186. package/dist/ui/switch/index.js +62 -33
  187. package/dist/ui/switch/public.d.ts +2 -2
  188. package/dist/ui/switch/public.d.ts.map +1 -1
  189. package/dist/ui/switch/public.js +1 -1
  190. package/dist/ui/tabs/index.d.ts +107 -45
  191. package/dist/ui/tabs/index.d.ts.map +1 -1
  192. package/dist/ui/tabs/index.js +99 -81
  193. package/dist/ui/tabs/public.d.ts +2 -2
  194. package/dist/ui/tabs/public.d.ts.map +1 -1
  195. package/dist/ui/tabs/public.js +1 -1
  196. package/dist/ui/toast/index.d.ts +93 -109
  197. package/dist/ui/toast/index.d.ts.map +1 -1
  198. package/dist/ui/toast/index.js +16 -29
  199. package/dist/ui/toast/schema.d.ts +15 -4
  200. package/dist/ui/toast/schema.d.ts.map +1 -1
  201. package/dist/ui/toast/schema.js +11 -4
  202. package/dist/ui/toast/update.d.ts +36 -18
  203. package/dist/ui/toast/update.d.ts.map +1 -1
  204. package/dist/ui/toast/update.js +33 -14
  205. package/dist/ui/tooltip/index.d.ts +94 -42
  206. package/dist/ui/tooltip/index.d.ts.map +1 -1
  207. package/dist/ui/tooltip/index.js +64 -73
  208. package/dist/ui/tooltip/public.d.ts +2 -2
  209. package/dist/ui/tooltip/public.d.ts.map +1 -1
  210. package/dist/ui/tooltip/public.js +1 -1
  211. package/dist/ui/virtualList/index.d.ts +63 -80
  212. package/dist/ui/virtualList/index.d.ts.map +1 -1
  213. package/dist/ui/virtualList/index.js +22 -49
  214. package/dist/ui/virtualList/public.d.ts +2 -2
  215. package/dist/ui/virtualList/public.d.ts.map +1 -1
  216. package/dist/ui/virtualList/public.js +1 -1
  217. package/package.json +1 -1
@@ -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 { createLazy, html, } from '../../html/index.js';
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 whether the user interacted via mouse or keyboard. */
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 None for pointer, Some for keyboard. */
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', { index: S.Number });
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 CompletedSetupInert = m('CompletedSetupInert');
88
+ export const CompletedInertOthers = m('CompletedInertOthers');
86
89
  /** Sent when the restore-inert command completes. */
87
- export const CompletedTeardownInert = m('CompletedTeardownInert');
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
- CompletedSetupInert,
137
- CompletedTeardownInert,
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 }, CompletedSetupInert)(({ id }) => Dom.inertOthers(id, [buttonSelector(id), itemsSelector(id)]).pipe(Effect.as(CompletedSetupInert())));
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 }, CompletedTeardownInert)(({ id }) => Dom.restoreInert(id).pipe(Effect.as(CompletedTeardownInert())));
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 = animationCommands.map(Command.mapEffect(Effect.map(message => GotAnimationMessage({ message }))));
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
- ? [evo(model, { maybeActiveItemIndex: () => Option.none() }), []]
299
- : [model, []],
300
- SelectedItem: () => closeMenu(model, closeWithFocusCommands),
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 at the given index, closing the menu and returning
412
- * focus commands. Use this in domain-event handlers when the menu uses `onSelectedItem`. */
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
- /** Renders a headless menu with typeahead search, keyboard navigation, and aria-activedescendant focus management. */
417
- export const view = (config) => {
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 { model: { id, isOpen, animation: { transitionState }, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, }, toParentMessage, onSelectedItem, 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, } = config;
420
- const dispatchSelectedItem = (index) => onSelectedItem
421
- ? onSelectedItem(index)
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(toParentMessage(Opened({
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(toParentMessage(PressedPointerOnButton({
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 toParentMessage(IgnoredMouseClick());
470
+ return IgnoredMouseClick();
465
471
  }
466
472
  else if (isOpen) {
467
- return toParentMessage(Closed());
473
+ return Closed();
468
474
  }
469
475
  else {
470
- return toParentMessage(Opened({ maybeActiveItemIndex: Option.none() }));
476
+ return Opened({ maybeActiveItemIndex: Option.none() });
471
477
  }
472
478
  };
473
- const handleSpaceKeyUp = (key) => OptionExt.when(key === ' ', toParentMessage(SuppressedSpaceScroll()));
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(toParentMessage(Searched({ key, maybeTargetIndex })));
484
+ return Option.some(Searched({ key, maybeTargetIndex }));
479
485
  };
480
- const handleItemsKeyDown = (key) => M.value(key).pipe(M.when('Escape', () => Option.some(toParentMessage(Closed()))), M.when('Enter', () => Option.map(maybeActiveItemIndex, index => toParentMessage(RequestedItemClick({ index })))), M.when(' ', () => Str.isNonEmpty(searchQuery)
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 => toParentMessage(RequestedItemClick({ index })))), M.whenOr('ArrowDown', 'ArrowUp', 'Home', 'End', 'PageUp', 'PageDown', () => Option.some(toParentMessage(ActivatedItem({
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
- })))), M.when(isPrintableKey, () => searchForKey(key)), M.orElse(() => Option.none()));
486
- const handleItemsPointerUp = (screenX, screenY, pointerType, timeStamp) => OptionExt.when(pointerType === 'mouse', toParentMessage(ReleasedPointerOnItems({ screenX, screenY, timeStamp })));
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(Mount.mapMessage(AnchorMenu({ buttonId: `${id}-button`, anchor }), toParentMessage)),
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(toParentMessage(BlurredItems())),
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', toParentMessage(MovedPointerOverItem({ index, screenX, screenY })))),
566
+ h.OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch', MovedPointerOverItem({ index, screenX, screenY }))),
561
567
  ]),
562
- h.OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch', toParentMessage(DeactivatedItem()))),
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) ? [h.AriaLabelledBy(headingId)] : []),
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 ? [h.Class(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(Mount.mapMessage(PortalMenuBackdrop(), toParentMessage)),
612
- ...(isLeaving ? [] : [h.OnClick(toParentMessage(Closed()))]),
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 || Array.isReadonlyArrayNonEmpty(itemsScrollAttributes)
627
+ const scrollableItems = itemsScrollClassName ||
628
+ Array.isReadonlyArrayNonEmpty(itemsScrollAttributes)
618
629
  ? [
619
630
  h.div([
620
- ...(itemsScrollClassName ? [h.Class(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
- /** Creates a memoized menu view. Static config is captured in a closure;
642
- * only `model` and `toParentMessage` are compared per render via `createLazy`. */
643
- export const lazy = (staticConfig) => {
644
- const lazyView = createLazy();
645
- return (model, toParentMessage) => lazyView((currentModel, currentToParentMessage) => view({
646
- ...staticConfig,
647
- model: currentModel,
648
- toParentMessage: currentToParentMessage,
649
- }), [model, toParentMessage]);
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
  };
@@ -1,4 +1,4 @@
1
- export { init, update, open, close, selectItem, view, lazy, Model, Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, 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, ViewConfig, ItemConfig, GroupHeading, } from './index.js';
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,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,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"}
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"}
@@ -1 +1 @@
1
- export { init, update, open, close, selectItem, view, lazy, Model, Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorMenu, CompletedPortalMenuBackdrop, AnchorMenu, PortalMenuBackdrop, ClearedSearch, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrAnimationEnd, } from './index.js';
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';