foldkit 0.84.0 → 0.86.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 (62) hide show
  1. package/dist/runtime/runtime.d.ts.map +1 -1
  2. package/dist/runtime/runtime.js +16 -6
  3. package/dist/task/dom.d.ts +11 -7
  4. package/dist/task/dom.d.ts.map +1 -1
  5. package/dist/task/dom.js +17 -20
  6. package/dist/task/elementMovement.d.ts.map +1 -1
  7. package/dist/task/elementMovement.js +4 -5
  8. package/dist/task/index.d.ts +1 -1
  9. package/dist/task/index.d.ts.map +1 -1
  10. package/dist/task/index.js +1 -1
  11. package/dist/task/public.d.ts +1 -1
  12. package/dist/task/public.d.ts.map +1 -1
  13. package/dist/task/public.js +1 -1
  14. package/dist/task/timing.d.ts +23 -0
  15. package/dist/task/timing.d.ts.map +1 -1
  16. package/dist/task/timing.js +26 -0
  17. package/dist/test/apps/mountPanel.d.ts +3 -3
  18. package/dist/test/apps/mountPanel.js +9 -9
  19. package/dist/test/internal.d.ts +6 -1
  20. package/dist/test/internal.d.ts.map +1 -1
  21. package/dist/test/internal.js +18 -0
  22. package/dist/test/scene.d.ts +3 -0
  23. package/dist/test/scene.d.ts.map +1 -1
  24. package/dist/test/scene.js +62 -8
  25. package/dist/ui/combobox/multi.d.ts +10 -10
  26. package/dist/ui/combobox/public.d.ts +1 -1
  27. package/dist/ui/combobox/public.d.ts.map +1 -1
  28. package/dist/ui/combobox/public.js +1 -1
  29. package/dist/ui/combobox/shared.d.ts +27 -27
  30. package/dist/ui/combobox/shared.d.ts.map +1 -1
  31. package/dist/ui/combobox/shared.js +36 -36
  32. package/dist/ui/combobox/single.d.ts +10 -10
  33. package/dist/ui/datePicker/index.d.ts +1 -1
  34. package/dist/ui/listbox/multi.d.ts +4 -8
  35. package/dist/ui/listbox/multi.d.ts.map +1 -1
  36. package/dist/ui/listbox/public.d.ts +1 -1
  37. package/dist/ui/listbox/public.d.ts.map +1 -1
  38. package/dist/ui/listbox/public.js +1 -1
  39. package/dist/ui/listbox/shared.d.ts +13 -24
  40. package/dist/ui/listbox/shared.d.ts.map +1 -1
  41. package/dist/ui/listbox/shared.js +22 -40
  42. package/dist/ui/listbox/single.d.ts +4 -8
  43. package/dist/ui/listbox/single.d.ts.map +1 -1
  44. package/dist/ui/menu/index.d.ts +11 -20
  45. package/dist/ui/menu/index.d.ts.map +1 -1
  46. package/dist/ui/menu/index.js +26 -40
  47. package/dist/ui/menu/public.d.ts +1 -1
  48. package/dist/ui/menu/public.d.ts.map +1 -1
  49. package/dist/ui/menu/public.js +1 -1
  50. package/dist/ui/popover/index.d.ts +11 -11
  51. package/dist/ui/popover/index.d.ts.map +1 -1
  52. package/dist/ui/popover/index.js +21 -21
  53. package/dist/ui/popover/public.d.ts +1 -1
  54. package/dist/ui/popover/public.d.ts.map +1 -1
  55. package/dist/ui/popover/public.js +1 -1
  56. package/dist/ui/tooltip/index.d.ts +6 -6
  57. package/dist/ui/tooltip/index.d.ts.map +1 -1
  58. package/dist/ui/tooltip/index.js +11 -11
  59. package/dist/ui/tooltip/public.d.ts +1 -1
  60. package/dist/ui/tooltip/public.d.ts.map +1 -1
  61. package/dist/ui/tooltip/public.js +1 -1
  62. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { Array, Effect, Function, Option, Predicate, String as String_, pipe, }
2
2
  import { dual } from 'effect/Function';
3
3
  import { FOLDKIT_MOUNT_KEY, FileHandlerSymbol } from '../html/index.js';
4
4
  import { Dispatch } from '../runtime/index.js';
5
- import { assertAllCommandsResolved, assertAllMountsResolved, assertExactCommands, assertExactMounts, assertHasCommands, assertHasMounts, assertNoUnresolvedCommands, assertNoUnresolvedMounts, assertZeroCommands, assertZeroMounts, resolveAllInternal, resolveByName, resolveMountByName, } from './internal.js';
5
+ import { assertAllCommandsResolved, assertAllMountsResolved, assertAllUnmountsAcknowledged, assertExactCommands, assertExactMounts, assertHasCommands, assertHasMounts, assertNoUnacknowledgedUnmounts, assertNoUnresolvedCommands, assertNoUnresolvedMounts, assertZeroCommands, assertZeroMounts, resolveAllInternal, resolveByName, resolveMountByName, } from './internal.js';
6
6
  import { accessibleDescription, accessibleName, ancestorsOf, attr, resolveTarget, selector, textContent, within, } from './query.js';
7
7
  import { allAltText, allDisplayValue, allLabel, allPlaceholder, allRole, allSelector, allTestId, allText, allTitle, } from './query.js';
8
8
  export { find, findAll, textContent, attr, getByRole, getAllByRole, getByText, getByPlaceholder, getByLabel, getByAltText, getByTitle, getByTestId, getByDisplayValue, role, placeholder, label, altText, title, testId, displayValue, selector, text, within, getAllByText, getAllByLabel, getAllByPlaceholder, getAllByAltText, getAllByTitle, getAllByTestId, getAllByDisplayValue, first, last, nth, filter, } from './query.js';
@@ -21,6 +21,10 @@ export const all = {
21
21
  selector: allSelector,
22
22
  };
23
23
  export { sceneMatchers } from './matchers.js';
24
+ const PENDING = { _tag: 'Pending' };
25
+ const RESOLVED = { _tag: 'Resolved' };
26
+ const ENDED_ACKNOWLEDGED = { _tag: 'Ended', acknowledged: true };
27
+ const ENDED_UNACKNOWLEDGED = { _tag: 'Ended', acknowledged: false };
24
28
  const slotKey = ({ name, occurrence }) => `${name}#${occurrence}`;
25
29
  const collectRenderedSlots = (vnode) => {
26
30
  const counts = new Map();
@@ -44,16 +48,29 @@ const collectRenderedSlots = (vnode) => {
44
48
  };
45
49
  const reconcileMountSlots = (previous, rendered) => {
46
50
  const previousByKey = new Map(Array.map(previous, state => [slotKey(state.slot), state]));
47
- return Array.map(collectRenderedSlots(rendered), slot => {
51
+ const renderedSlots = collectRenderedSlots(rendered);
52
+ const renderedKeys = new Set(Array.map(renderedSlots, slotKey));
53
+ const fromRendered = Array.map(renderedSlots, slot => {
48
54
  const existing = previousByKey.get(slotKey(slot));
49
- if (existing !== undefined) {
55
+ if (existing !== undefined && existing.status._tag !== 'Ended') {
50
56
  return existing;
51
57
  }
52
- const fresh = { slot, status: 'Pending' };
53
- return fresh;
58
+ return { slot, status: PENDING };
54
59
  });
60
+ const fromVanished = pipe(previous, Array.filter(state => !renderedKeys.has(slotKey(state.slot))), Array.map(state => endStatus(state)));
61
+ const unacknowledgedRevived = pipe(previous, Array.filter(state => renderedKeys.has(slotKey(state.slot)) &&
62
+ state.status._tag === 'Ended' &&
63
+ !state.status.acknowledged));
64
+ return Array.appendAll(fromRendered, Array.appendAll(fromVanished, unacknowledgedRevived));
55
65
  };
56
- const pendingMountsOf = (mountSlots) => pipe(mountSlots, Array.filter(({ status }) => status === 'Pending'), Array.map(({ slot }) => slot));
66
+ const endStatus = (state) => {
67
+ if (state.status._tag === 'Ended') {
68
+ return state;
69
+ }
70
+ return { slot: state.slot, status: ENDED_UNACKNOWLEDGED };
71
+ };
72
+ const pendingMountsOf = (mountSlots) => pipe(mountSlots, Array.filter(({ status }) => status._tag === 'Pending'), Array.map(({ slot }) => slot));
73
+ const unacknowledgedEndedMountsOf = (mountSlots) => pipe(mountSlots, Array.filter(({ status }) => status._tag === 'Ended' && !status.acknowledged), Array.map(({ slot }) => slot));
57
74
  const UNINITIALIZED = Symbol('uninitialized');
58
75
  const toInternal = (simulation) =>
59
76
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
@@ -140,6 +157,7 @@ const captureFromElement = (simulation, element, description, eventName, invokeH
140
157
  }
141
158
  assertNoUnresolvedCommands(internal.commands, 'when an interaction dispatched a new Message');
142
159
  assertNoUnresolvedMounts(internal.mounts, 'when an interaction dispatched a new Message');
160
+ assertNoUnacknowledgedUnmounts(unacknowledgedEndedMountsOf(internal.mountSlots), 'when an interaction dispatched a new Message');
143
161
  /* eslint-disable @typescript-eslint/consistent-type-assertions */
144
162
  const capturedMessage = captured;
145
163
  const result = internal.updateFn(internal.model, capturedMessage);
@@ -298,14 +316,14 @@ const resolveMount = (definition, resultMessage, toParentMessage) => (simulation
298
316
  }
299
317
  const resolvedKeys = new Set(Array.map(next.pendingMounts, slot => slotKey(slot)));
300
318
  const updatedSlots = Array.map(internal.mountSlots, (state) => {
301
- if (state.status !== 'Pending') {
319
+ if (state.status._tag !== 'Pending') {
302
320
  return state;
303
321
  }
304
322
  const key = slotKey(state.slot);
305
323
  return resolvedKeys.has(key)
306
324
  ? state
307
325
  : state.slot.name === definition.name
308
- ? { slot: state.slot, status: 'Resolved' }
326
+ ? { slot: state.slot, status: RESOLVED }
309
327
  : state;
310
328
  });
311
329
  return {
@@ -344,6 +362,38 @@ const expectNoMountsStep = () => (simulation) => {
344
362
  assertZeroMounts(toInternal(simulation).mounts);
345
363
  return simulation;
346
364
  };
365
+ /** Acknowledges that the given Mounts disappeared from the rendered tree.
366
+ * Required for every Mount that fires and then unmounts during a scene,
367
+ * whether or not it was resolved first. Without this, the scene throws at
368
+ * the end of the test for any unacknowledged unmount. */
369
+ const expectEndedMountsStep = (...definitions) => (simulation) => {
370
+ /* eslint-disable @typescript-eslint/consistent-type-assertions */
371
+ const internal = toInternal(simulation);
372
+ const remainingNames = Array.map(definitions, ({ name }) => name);
373
+ const updatedSlots = [];
374
+ for (const state of internal.mountSlots) {
375
+ if (state.status._tag === 'Ended' &&
376
+ !state.status.acknowledged &&
377
+ remainingNames.includes(state.slot.name)) {
378
+ const index = remainingNames.indexOf(state.slot.name);
379
+ remainingNames.splice(index, 1);
380
+ updatedSlots.push({ slot: state.slot, status: ENDED_ACKNOWLEDGED });
381
+ }
382
+ else {
383
+ updatedSlots.push(state);
384
+ }
385
+ }
386
+ if (Array.isReadonlyArrayNonEmpty(remainingNames)) {
387
+ throw new Error(`I tried to acknowledge ended Mounts but some haven't unmounted:\n\n` +
388
+ pipe(remainingNames, Array.map(name => ` ${name}`), Array.join('\n')) +
389
+ '\n\nUse Scene.Mount.expectEnded only after the Mount has disappeared from the rendered tree.');
390
+ }
391
+ return {
392
+ ...internal,
393
+ mountSlots: updatedSlots,
394
+ };
395
+ /* eslint-enable @typescript-eslint/consistent-type-assertions */
396
+ };
347
397
  /** Steps that operate on the pending Commands of a scene simulation.
348
398
  * Destructure as `const { Command } = Scene` for concise call sites. */
349
399
  export const Command = {
@@ -371,6 +421,9 @@ export const Mount = {
371
421
  expectExact: expectExactMountsStep,
372
422
  /** Asserts that there are no pending Mounts. */
373
423
  expectNone: expectNoMountsStep,
424
+ /** Acknowledges Mounts that disappeared from the rendered tree. Required for
425
+ * every Mount that fires and then unmounts during a scene. */
426
+ expectEnded: expectEndedMountsStep,
374
427
  };
375
428
  /** Runs a function for side effects (e.g. assertions) without breaking the step chain. */
376
429
  export const tap = (f) => (simulation) => {
@@ -906,4 +959,5 @@ export const scene = (config, ...steps) => {
906
959
  const internal = toInternal(result);
907
960
  assertAllCommandsResolved(internal.commands);
908
961
  assertAllMountsResolved(internal.mounts);
962
+ assertAllUnmountsAcknowledged(unacknowledgedEndedMountsOf(internal.mountSlots));
909
963
  };
@@ -93,10 +93,6 @@ export declare const update: (model: {
93
93
  readonly _tag: "CompletedScrollIntoView";
94
94
  } | {
95
95
  readonly _tag: "CompletedClickItem";
96
- } | {
97
- readonly _tag: "CompletedAnchorMount";
98
- } | {
99
- readonly _tag: "CompletedBackdropPortal";
100
96
  } | {
101
97
  readonly _tag: "Opened";
102
98
  readonly maybeActiveItemIndex: Option.Option<number>;
@@ -125,9 +121,13 @@ export declare const update: (model: {
125
121
  } | {
126
122
  readonly _tag: "CompletedFocusInput";
127
123
  } | {
128
- readonly _tag: "CompletedAttachPreventBlur";
124
+ readonly _tag: "CompletedAnchorCombobox";
125
+ } | {
126
+ readonly _tag: "CompletedAttachComboboxPreventBlur";
127
+ } | {
128
+ readonly _tag: "CompletedAttachComboboxSelectOnFocus";
129
129
  } | {
130
- readonly _tag: "CompletedAttachSelectOnFocus";
130
+ readonly _tag: "CompletedPortalComboboxBackdrop";
131
131
  } | {
132
132
  readonly _tag: "GotAnimationMessage";
133
133
  readonly message: {
@@ -181,13 +181,13 @@ export declare const view: <ParentMessage, Item extends string>(config: Readonly
181
181
  readonly inputValue: string;
182
182
  };
183
183
  toParentMessage: (message: Opened | Closed | import("./shared.js").BlurredInput | import("./shared.js").ActivatedItem | import("./shared.js").DeactivatedItem | SelectedItem | import("./shared.js").MovedPointerOverItem | import("./shared.js").RequestedItemClick | import("./shared.js").UpdatedInputValue | import("./shared.js").PressedToggleButton | {
184
- readonly _tag: "CompletedAnchorMount";
184
+ readonly _tag: "CompletedAnchorCombobox";
185
185
  } | {
186
- readonly _tag: "CompletedAttachPreventBlur";
186
+ readonly _tag: "CompletedAttachComboboxPreventBlur";
187
187
  } | {
188
- readonly _tag: "CompletedAttachSelectOnFocus";
188
+ readonly _tag: "CompletedAttachComboboxSelectOnFocus";
189
189
  } | {
190
- readonly _tag: "CompletedBackdropPortal";
190
+ readonly _tag: "CompletedPortalComboboxBackdrop";
191
191
  }) => ParentMessage;
192
192
  onSelectedItem?: (value: string) => ParentMessage;
193
193
  items: readonly Item[];
@@ -1,5 +1,5 @@
1
1
  export { init, update, open, close, selectItem, view, lazy, Model, } from './single.js';
2
- export { Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorMount, CompletedAttachPreventBlur, CompletedAttachSelectOnFocus, CompletedBackdropPortal, ComboboxAnchor, ComboboxAttachPreventBlur, ComboboxAttachSelectOnFocus, ComboboxBackdropPortal, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusInput, ScrollIntoView, ClickItem, DetectMovementOrAnimationEnd, } from './shared.js';
2
+ export { Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorCombobox, CompletedAttachComboboxPreventBlur, CompletedAttachComboboxSelectOnFocus, CompletedPortalComboboxBackdrop, AnchorCombobox, AttachComboboxPreventBlur, AttachComboboxSelectOnFocus, PortalComboboxBackdrop, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusInput, ScrollIntoView, ClickItem, DetectMovementOrAnimationEnd, } from './shared.js';
3
3
  export type { ActivationTrigger, Opened, Closed, BlurredInput, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, UpdatedInputValue, PressedToggleButton, ItemConfig, GroupHeading, } from './shared.js';
4
4
  export type { InitConfig, ViewConfig } from './single.js';
5
5
  export type { AnchorConfig } from '../anchor.js';
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,4BAA4B,GAC7B,MAAM,aAAa,CAAA;AAEpB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,GACb,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEzD,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,kCAAkC,EAClC,oCAAoC,EACpC,+BAA+B,EAC/B,cAAc,EACd,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,4BAA4B,GAC7B,MAAM,aAAa,CAAA;AAEpB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,GACb,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEzD,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA"}
@@ -1,3 +1,3 @@
1
1
  export { init, update, open, close, selectItem, view, lazy, Model, } from './single.js';
2
- export { Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorMount, CompletedAttachPreventBlur, CompletedAttachSelectOnFocus, CompletedBackdropPortal, ComboboxAnchor, ComboboxAttachPreventBlur, ComboboxAttachSelectOnFocus, ComboboxBackdropPortal, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusInput, ScrollIntoView, ClickItem, DetectMovementOrAnimationEnd, } from './shared.js';
2
+ export { Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, CompletedAnchorCombobox, CompletedAttachComboboxPreventBlur, CompletedAttachComboboxSelectOnFocus, CompletedPortalComboboxBackdrop, AnchorCombobox, AttachComboboxPreventBlur, AttachComboboxSelectOnFocus, PortalComboboxBackdrop, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusInput, ScrollIntoView, ClickItem, DetectMovementOrAnimationEnd, } from './shared.js';
3
3
  export * as Multi from './multiPublic.js';
@@ -91,13 +91,13 @@ export declare const CompletedScrollIntoView: import("../../schema/index.js").Ca
91
91
  /** Sent when the programmatic item click command completes. */
92
92
  export declare const CompletedClickItem: import("../../schema/index.js").CallableTaggedStruct<"CompletedClickItem", {}>;
93
93
  /** Sent when the items panel mounts and Floating UI has positioned it. Update no-ops; surfaces the positioning side effect for DevTools. */
94
- export declare const CompletedAnchorMount: import("../../schema/index.js").CallableTaggedStruct<"CompletedAnchorMount", {}>;
94
+ export declare const CompletedAnchorCombobox: import("../../schema/index.js").CallableTaggedStruct<"CompletedAnchorCombobox", {}>;
95
95
  /** Sent when the items panel mounts and the capture-phase pointerdown listener is attached (with or without anchor). Update no-ops; surfaces the listener-attach side effect for DevTools. */
96
- export declare const CompletedAttachPreventBlur: import("../../schema/index.js").CallableTaggedStruct<"CompletedAttachPreventBlur", {}>;
96
+ export declare const CompletedAttachComboboxPreventBlur: import("../../schema/index.js").CallableTaggedStruct<"CompletedAttachComboboxPreventBlur", {}>;
97
97
  /** Sent when the input mounts and the focus listener that auto-selects on focus is attached. Update no-ops; surfaces the listener-attach side effect for DevTools. */
98
- export declare const CompletedAttachSelectOnFocus: import("../../schema/index.js").CallableTaggedStruct<"CompletedAttachSelectOnFocus", {}>;
98
+ export declare const CompletedAttachComboboxSelectOnFocus: import("../../schema/index.js").CallableTaggedStruct<"CompletedAttachComboboxSelectOnFocus", {}>;
99
99
  /** Sent when the combobox backdrop mounts and is portaled to the document body. Update no-ops; surfaces the portal side effect for DevTools. */
100
- export declare const CompletedBackdropPortal: import("../../schema/index.js").CallableTaggedStruct<"CompletedBackdropPortal", {}>;
100
+ export declare const CompletedPortalComboboxBackdrop: import("../../schema/index.js").CallableTaggedStruct<"CompletedPortalComboboxBackdrop", {}>;
101
101
  /** Wraps an Animation submodel message for delegation. */
102
102
  export declare const GotAnimationMessage: import("../../schema/index.js").CallableTaggedStruct<"GotAnimationMessage", {
103
103
  message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Showed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hid", {}>, import("../../schema/index.js").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema/index.js").CallableTaggedStruct<"EndedAnimation", {}>]>;
@@ -125,10 +125,10 @@ export declare const Message: S.Union<[
125
125
  typeof CompletedFocusInput,
126
126
  typeof CompletedScrollIntoView,
127
127
  typeof CompletedClickItem,
128
- typeof CompletedAnchorMount,
129
- typeof CompletedAttachPreventBlur,
130
- typeof CompletedAttachSelectOnFocus,
131
- typeof CompletedBackdropPortal,
128
+ typeof CompletedAnchorCombobox,
129
+ typeof CompletedAttachComboboxPreventBlur,
130
+ typeof CompletedAttachComboboxSelectOnFocus,
131
+ typeof CompletedPortalComboboxBackdrop,
132
132
  typeof GotAnimationMessage,
133
133
  typeof UpdatedInputValue,
134
134
  typeof PressedToggleButton
@@ -228,10 +228,6 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
228
228
  readonly _tag: "CompletedScrollIntoView";
229
229
  } | {
230
230
  readonly _tag: "CompletedClickItem";
231
- } | {
232
- readonly _tag: "CompletedAnchorMount";
233
- } | {
234
- readonly _tag: "CompletedBackdropPortal";
235
231
  } | {
236
232
  readonly _tag: "Opened";
237
233
  readonly maybeActiveItemIndex: Option.Option<number>;
@@ -260,9 +256,13 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
260
256
  } | {
261
257
  readonly _tag: "CompletedFocusInput";
262
258
  } | {
263
- readonly _tag: "CompletedAttachPreventBlur";
259
+ readonly _tag: "CompletedAnchorCombobox";
260
+ } | {
261
+ readonly _tag: "CompletedAttachComboboxPreventBlur";
262
+ } | {
263
+ readonly _tag: "CompletedAttachComboboxSelectOnFocus";
264
264
  } | {
265
- readonly _tag: "CompletedAttachSelectOnFocus";
265
+ readonly _tag: "CompletedPortalComboboxBackdrop";
266
266
  } | {
267
267
  readonly _tag: "GotAnimationMessage";
268
268
  readonly message: {
@@ -283,28 +283,28 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
283
283
  }>[]];
284
284
  /** The anchor-positioning Mount this Combobox renders when an anchor is
285
285
  * configured. Exposed so Scene tests can call
286
- * `Scene.Mount.resolve(ComboboxAnchor, CompletedAnchorMount())`. */
287
- export declare const ComboboxAnchor: Mount.MountDefinition<"ComboboxAnchor", {
288
- readonly _tag: "CompletedAnchorMount";
286
+ * `Scene.Mount.resolve(AnchorCombobox, CompletedAnchorCombobox())`. */
287
+ export declare const AnchorCombobox: Mount.MountDefinition<"AnchorCombobox", {
288
+ readonly _tag: "CompletedAnchorCombobox";
289
289
  }>;
290
290
  /** The Mount this Combobox renders to install a `pointerdown`-cancelling
291
291
  * capture listener that prevents blur on item presses. Exposed so Scene
292
292
  * tests can call
293
- * `Scene.Mount.resolve(ComboboxAttachPreventBlur, CompletedAttachPreventBlur())`. */
294
- export declare const ComboboxAttachPreventBlur: Mount.MountDefinition<"ComboboxAttachPreventBlur", {
295
- readonly _tag: "CompletedAttachPreventBlur";
293
+ * `Scene.Mount.resolve(AttachComboboxPreventBlur, CompletedAttachComboboxPreventBlur())`. */
294
+ export declare const AttachComboboxPreventBlur: Mount.MountDefinition<"AttachComboboxPreventBlur", {
295
+ readonly _tag: "CompletedAttachComboboxPreventBlur";
296
296
  }>;
297
297
  /** The Mount this Combobox renders to install the input's select-on-focus
298
298
  * behavior. Exposed so Scene tests can call
299
- * `Scene.Mount.resolve(ComboboxAttachSelectOnFocus, CompletedAttachSelectOnFocus())`. */
300
- export declare const ComboboxAttachSelectOnFocus: Mount.MountDefinition<"ComboboxAttachSelectOnFocus", {
301
- readonly _tag: "CompletedAttachSelectOnFocus";
299
+ * `Scene.Mount.resolve(AttachComboboxSelectOnFocus, CompletedAttachComboboxSelectOnFocus())`. */
300
+ export declare const AttachComboboxSelectOnFocus: Mount.MountDefinition<"AttachComboboxSelectOnFocus", {
301
+ readonly _tag: "CompletedAttachComboboxSelectOnFocus";
302
302
  }>;
303
303
  /** The backdrop-portaling Mount this Combobox renders. Exposed so Scene tests can
304
- * call `Scene.Mount.resolve(ComboboxBackdropPortal, CompletedBackdropPortal())` to
304
+ * call `Scene.Mount.resolve(PortalComboboxBackdrop, CompletedPortalComboboxBackdrop())` to
305
305
  * acknowledge the mount produced by the rendered backdrop. */
306
- export declare const ComboboxBackdropPortal: Mount.MountDefinition<"ComboboxBackdropPortal", {
307
- readonly _tag: "CompletedBackdropPortal";
306
+ export declare const PortalComboboxBackdrop: Mount.MountDefinition<"PortalComboboxBackdrop", {
307
+ readonly _tag: "CompletedPortalComboboxBackdrop";
308
308
  }>;
309
309
  /** Configuration for an individual combobox item's appearance. */
310
310
  export type ItemConfig = Readonly<{
@@ -319,7 +319,7 @@ export type GroupHeading = Readonly<{
319
319
  /** Configuration for rendering a combobox with `view`. */
320
320
  export type BaseViewConfig<ParentMessage, Item extends string, Model extends BaseModel> = Readonly<{
321
321
  model: Model;
322
- toParentMessage: (message: Opened | Closed | BlurredInput | ActivatedItem | DeactivatedItem | SelectedItem | MovedPointerOverItem | RequestedItemClick | UpdatedInputValue | PressedToggleButton | typeof CompletedAnchorMount.Type | typeof CompletedAttachPreventBlur.Type | typeof CompletedAttachSelectOnFocus.Type | typeof CompletedBackdropPortal.Type) => ParentMessage;
322
+ toParentMessage: (message: Opened | Closed | BlurredInput | ActivatedItem | DeactivatedItem | SelectedItem | MovedPointerOverItem | RequestedItemClick | UpdatedInputValue | PressedToggleButton | typeof CompletedAnchorCombobox.Type | typeof CompletedAttachComboboxPreventBlur.Type | typeof CompletedAttachComboboxSelectOnFocus.Type | typeof CompletedPortalComboboxBackdrop.Type) => ParentMessage;
323
323
  onSelectedItem?: (value: string) => ParentMessage;
324
324
  items: ReadonlyArray<Item>;
325
325
  itemToConfig: (item: Item, context: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,MAAM,EAGN,MAAM,IAAI,CAAC,EAEZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EAGV,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAI7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAchD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,EAAE,eAAe,EAAE,CAAA;AAI1B,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,8CAAsC,CAAA;AACpE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,oKAAoK;AACpK,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EAepB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,4EAA4E;AAC5E,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA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B,EAAE,OAAO,CAAA;CAC7B,CAAC,CAAA;AAEF,gNAAgN;AAChN,eAAO,MAAM,QAAQ,GAClB,KAAK,SAAS,SAAS,EAAE,UAAU,YAAY,CAAC,KAAK,CAAC,MACtD,aAAa,EAAE,IAAI,SAAS,MAAM,EACjC,QAAQ,cAAc,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,KACjD,IAwjBF,CAAA"}
@@ -95,13 +95,13 @@ export const CompletedScrollIntoView = m('CompletedScrollIntoView');
95
95
  /** Sent when the programmatic item click command completes. */
96
96
  export const CompletedClickItem = m('CompletedClickItem');
97
97
  /** Sent when the items panel mounts and Floating UI has positioned it. Update no-ops; surfaces the positioning side effect for DevTools. */
98
- export const CompletedAnchorMount = m('CompletedAnchorMount');
98
+ export const CompletedAnchorCombobox = m('CompletedAnchorCombobox');
99
99
  /** Sent when the items panel mounts and the capture-phase pointerdown listener is attached (with or without anchor). Update no-ops; surfaces the listener-attach side effect for DevTools. */
100
- export const CompletedAttachPreventBlur = m('CompletedAttachPreventBlur');
100
+ export const CompletedAttachComboboxPreventBlur = m('CompletedAttachComboboxPreventBlur');
101
101
  /** Sent when the input mounts and the focus listener that auto-selects on focus is attached. Update no-ops; surfaces the listener-attach side effect for DevTools. */
102
- export const CompletedAttachSelectOnFocus = m('CompletedAttachSelectOnFocus');
102
+ export const CompletedAttachComboboxSelectOnFocus = m('CompletedAttachComboboxSelectOnFocus');
103
103
  /** Sent when the combobox backdrop mounts and is portaled to the document body. Update no-ops; surfaces the portal side effect for DevTools. */
104
- export const CompletedBackdropPortal = m('CompletedBackdropPortal');
104
+ export const CompletedPortalComboboxBackdrop = m('CompletedPortalComboboxBackdrop');
105
105
  /** Wraps an Animation submodel message for delegation. */
106
106
  export const GotAnimationMessage = m('GotAnimationMessage', {
107
107
  message: AnimationMessage,
@@ -129,10 +129,10 @@ export const Message = S.Union([
129
129
  CompletedFocusInput,
130
130
  CompletedScrollIntoView,
131
131
  CompletedClickItem,
132
- CompletedAnchorMount,
133
- CompletedAttachPreventBlur,
134
- CompletedAttachSelectOnFocus,
135
- CompletedBackdropPortal,
132
+ CompletedAnchorCombobox,
133
+ CompletedAttachComboboxPreventBlur,
134
+ CompletedAttachComboboxSelectOnFocus,
135
+ CompletedPortalComboboxBackdrop,
136
136
  GotAnimationMessage,
137
137
  UpdatedInputValue,
138
138
  PressedToggleButton,
@@ -331,43 +331,43 @@ export const makeUpdate = (handlers) => {
331
331
  CompletedFocusInput: () => [model, []],
332
332
  CompletedScrollIntoView: () => [model, []],
333
333
  CompletedClickItem: () => [model, []],
334
- CompletedAnchorMount: () => [model, []],
335
- CompletedAttachPreventBlur: () => [model, []],
336
- CompletedAttachSelectOnFocus: () => [model, []],
337
- CompletedBackdropPortal: () => [model, []],
334
+ CompletedAnchorCombobox: () => [model, []],
335
+ CompletedAttachComboboxPreventBlur: () => [model, []],
336
+ CompletedAttachComboboxSelectOnFocus: () => [model, []],
337
+ CompletedPortalComboboxBackdrop: () => [model, []],
338
338
  }));
339
339
  };
340
340
  };
341
341
  /** The anchor-positioning Mount this Combobox renders when an anchor is
342
342
  * configured. Exposed so Scene tests can call
343
- * `Scene.Mount.resolve(ComboboxAnchor, CompletedAnchorMount())`. */
344
- export const ComboboxAnchor = Mount.define('ComboboxAnchor', CompletedAnchorMount);
343
+ * `Scene.Mount.resolve(AnchorCombobox, CompletedAnchorCombobox())`. */
344
+ export const AnchorCombobox = Mount.define('AnchorCombobox', CompletedAnchorCombobox);
345
345
  /** The Mount this Combobox renders to install a `pointerdown`-cancelling
346
346
  * capture listener that prevents blur on item presses. Exposed so Scene
347
347
  * tests can call
348
- * `Scene.Mount.resolve(ComboboxAttachPreventBlur, CompletedAttachPreventBlur())`. */
349
- export const ComboboxAttachPreventBlur = Mount.define('ComboboxAttachPreventBlur', CompletedAttachPreventBlur);
348
+ * `Scene.Mount.resolve(AttachComboboxPreventBlur, CompletedAttachComboboxPreventBlur())`. */
349
+ export const AttachComboboxPreventBlur = Mount.define('AttachComboboxPreventBlur', CompletedAttachComboboxPreventBlur);
350
350
  /** The Mount this Combobox renders to install the input's select-on-focus
351
351
  * behavior. Exposed so Scene tests can call
352
- * `Scene.Mount.resolve(ComboboxAttachSelectOnFocus, CompletedAttachSelectOnFocus())`. */
353
- export const ComboboxAttachSelectOnFocus = Mount.define('ComboboxAttachSelectOnFocus', CompletedAttachSelectOnFocus);
352
+ * `Scene.Mount.resolve(AttachComboboxSelectOnFocus, CompletedAttachComboboxSelectOnFocus())`. */
353
+ export const AttachComboboxSelectOnFocus = Mount.define('AttachComboboxSelectOnFocus', CompletedAttachComboboxSelectOnFocus);
354
354
  /** The backdrop-portaling Mount this Combobox renders. Exposed so Scene tests can
355
- * call `Scene.Mount.resolve(ComboboxBackdropPortal, CompletedBackdropPortal())` to
355
+ * call `Scene.Mount.resolve(PortalComboboxBackdrop, CompletedPortalComboboxBackdrop())` to
356
356
  * acknowledge the mount produced by the rendered backdrop. */
357
- export const ComboboxBackdropPortal = Mount.define('ComboboxBackdropPortal', CompletedBackdropPortal);
358
- const attachPreventBlurOnPointerDown = ComboboxAttachPreventBlur((element) => Effect.sync(() => {
357
+ export const PortalComboboxBackdrop = Mount.define('PortalComboboxBackdrop', CompletedPortalComboboxBackdrop);
358
+ const attachComboboxPreventBlur = AttachComboboxPreventBlur((element) => Effect.sync(() => {
359
359
  const handler = (event) => {
360
360
  event.preventDefault();
361
361
  };
362
362
  element.addEventListener('pointerdown', handler, { capture: true });
363
363
  return {
364
- message: CompletedAttachPreventBlur(),
364
+ message: CompletedAttachComboboxPreventBlur(),
365
365
  cleanup: () => element.removeEventListener('pointerdown', handler, {
366
366
  capture: true,
367
367
  }),
368
368
  };
369
369
  }));
370
- const attachSelectOnFocus = ComboboxAttachSelectOnFocus((element) => Effect.sync(() => {
370
+ const attachComboboxSelectOnFocus = AttachComboboxSelectOnFocus((element) => Effect.sync(() => {
371
371
  const handler = () => {
372
372
  if (element instanceof HTMLInputElement) {
373
373
  element.select();
@@ -375,14 +375,14 @@ const attachSelectOnFocus = ComboboxAttachSelectOnFocus((element) => Effect.sync
375
375
  };
376
376
  element.addEventListener('focus', handler);
377
377
  return {
378
- message: CompletedAttachSelectOnFocus(),
378
+ message: CompletedAttachComboboxSelectOnFocus(),
379
379
  cleanup: () => element.removeEventListener('focus', handler),
380
380
  };
381
381
  }));
382
- const portalBackdropOnMount = ComboboxBackdropPortal((element) => Effect.sync(() => ({
383
- message: CompletedBackdropPortal(),
384
- cleanup: portalToBody(element),
385
- })));
382
+ const portalComboboxBackdrop = PortalComboboxBackdrop((element) => Effect.sync(() => {
383
+ const cleanup = portalToBody(element);
384
+ return { message: CompletedPortalComboboxBackdrop(), cleanup };
385
+ }));
386
386
  /** Creates a combobox view function from variant-specific behavior. Shared rendering logic (input, items, transitions, keyboard navigation) is handled internally; only selection display varies by variant. */
387
387
  export const makeView = (behavior) => (config) => {
388
388
  const { div, input, AriaActiveDescendant, AriaControls, AriaDisabled, AriaExpanded, AriaInvalid, AriaLabelledBy, AriaMultiSelectable, AriaSelected, Attribute, Autocomplete, Class, DataAttribute, Id, Name, OnBlur, OnClick, OnFocus, OnInput, OnKeyDownPreventDefault, OnMount, OnPointerLeave, OnPointerMove, Placeholder, Role, Style, Tabindex, Type, Value, keyed, } = html();
@@ -497,7 +497,9 @@ export const makeView = (behavior) => (config) => {
497
497
  ...(isInvalid ? [AriaInvalid(true), DataAttribute('invalid', '')] : []),
498
498
  ...(isVisible ? [DataAttribute('open', '')] : []),
499
499
  ...(config.model.selectInputOnFocus
500
- ? [OnMount(Mount.mapMessage(attachSelectOnFocus, toParentMessage))]
500
+ ? [
501
+ OnMount(Mount.mapMessage(attachComboboxSelectOnFocus, toParentMessage)),
502
+ ]
501
503
  : []),
502
504
  ...(inputClassName ? [Class(inputClassName)] : []),
503
505
  ...inputAttributes,
@@ -505,7 +507,7 @@ export const makeView = (behavior) => (config) => {
505
507
  const anchorAttributes = anchor
506
508
  ? [
507
509
  Style({ position: 'absolute', margin: '0', visibility: 'hidden' }),
508
- OnMount(Mount.mapMessage(ComboboxAnchor((items) => Effect.sync(() => {
510
+ OnMount(Mount.mapMessage(AnchorCombobox((items) => Effect.sync(() => {
509
511
  const preventBlur = (event) => {
510
512
  event.preventDefault();
511
513
  };
@@ -518,7 +520,7 @@ export const makeView = (behavior) => (config) => {
518
520
  interceptTab: false,
519
521
  })(items);
520
522
  return {
521
- message: CompletedAnchorMount(),
523
+ message: CompletedAnchorCombobox(),
522
524
  cleanup: () => {
523
525
  items.removeEventListener('pointerdown', preventBlur, {
524
526
  capture: true,
@@ -528,9 +530,7 @@ export const makeView = (behavior) => (config) => {
528
530
  };
529
531
  })), toParentMessage)),
530
532
  ]
531
- : [
532
- OnMount(Mount.mapMessage(attachPreventBlurOnPointerDown, toParentMessage)),
533
- ];
533
+ : [OnMount(Mount.mapMessage(attachComboboxPreventBlur, toParentMessage))];
534
534
  const itemsContainerAttributes = [
535
535
  Id(`${id}-items`),
536
536
  Role('listbox'),
@@ -618,7 +618,7 @@ export const makeView = (behavior) => (config) => {
618
618
  });
619
619
  };
620
620
  const backdrop = keyed('div')(`${id}-backdrop`, [
621
- OnMount(Mount.mapMessage(portalBackdropOnMount, toParentMessage)),
621
+ OnMount(Mount.mapMessage(portalComboboxBackdrop, toParentMessage)),
622
622
  ...(isLeaving ? [] : [OnClick(toParentMessage(Closed()))]),
623
623
  ...(backdropClassName ? [Class(backdropClassName)] : []),
624
624
  ...backdropAttributes,
@@ -654,7 +654,7 @@ export const makeView = (behavior) => (config) => {
654
654
  ...(isDisabled
655
655
  ? [AriaDisabled(true), DataAttribute('disabled', '')]
656
656
  : [OnClick(toParentMessage(PressedToggleButton()))]),
657
- OnMount(Mount.mapMessage(attachPreventBlurOnPointerDown, toParentMessage)),
657
+ OnMount(Mount.mapMessage(attachComboboxPreventBlur, toParentMessage)),
658
658
  ...(buttonClassName ? [Class(buttonClassName)] : []),
659
659
  ...buttonAttributes,
660
660
  ], [buttonContent]),
@@ -97,10 +97,6 @@ export declare const update: (model: {
97
97
  readonly _tag: "CompletedScrollIntoView";
98
98
  } | {
99
99
  readonly _tag: "CompletedClickItem";
100
- } | {
101
- readonly _tag: "CompletedAnchorMount";
102
- } | {
103
- readonly _tag: "CompletedBackdropPortal";
104
100
  } | {
105
101
  readonly _tag: "Opened";
106
102
  readonly maybeActiveItemIndex: Option.Option<number>;
@@ -129,9 +125,13 @@ export declare const update: (model: {
129
125
  } | {
130
126
  readonly _tag: "CompletedFocusInput";
131
127
  } | {
132
- readonly _tag: "CompletedAttachPreventBlur";
128
+ readonly _tag: "CompletedAnchorCombobox";
129
+ } | {
130
+ readonly _tag: "CompletedAttachComboboxPreventBlur";
131
+ } | {
132
+ readonly _tag: "CompletedAttachComboboxSelectOnFocus";
133
133
  } | {
134
- readonly _tag: "CompletedAttachSelectOnFocus";
134
+ readonly _tag: "CompletedPortalComboboxBackdrop";
135
135
  } | {
136
136
  readonly _tag: "GotAnimationMessage";
137
137
  readonly message: {
@@ -187,13 +187,13 @@ export declare const view: <ParentMessage, Item extends string>(config: Readonly
187
187
  readonly maybeSelectedDisplayText: Option.Option<string>;
188
188
  };
189
189
  toParentMessage: (message: Opened | Closed | import("./shared.js").BlurredInput | import("./shared.js").ActivatedItem | import("./shared.js").DeactivatedItem | SelectedItem | import("./shared.js").MovedPointerOverItem | import("./shared.js").RequestedItemClick | import("./shared.js").UpdatedInputValue | import("./shared.js").PressedToggleButton | {
190
- readonly _tag: "CompletedAnchorMount";
190
+ readonly _tag: "CompletedAnchorCombobox";
191
191
  } | {
192
- readonly _tag: "CompletedAttachPreventBlur";
192
+ readonly _tag: "CompletedAttachComboboxPreventBlur";
193
193
  } | {
194
- readonly _tag: "CompletedAttachSelectOnFocus";
194
+ readonly _tag: "CompletedAttachComboboxSelectOnFocus";
195
195
  } | {
196
- readonly _tag: "CompletedBackdropPortal";
196
+ readonly _tag: "CompletedPortalComboboxBackdrop";
197
197
  }) => ParentMessage;
198
198
  onSelectedItem?: (value: string) => ParentMessage;
199
199
  items: readonly Item[];
@@ -105,7 +105,7 @@ export declare const GotPopoverMessage: import("../../schema/index.js").Callable
105
105
  message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Opened", {}>, import("../../schema/index.js").CallableTaggedStruct<"Closed", {}>, import("../../schema/index.js").CallableTaggedStruct<"BlurredPanel", {}>, import("../../schema/index.js").CallableTaggedStruct<"PressedPointerOnButton", {
106
106
  pointerType: S.String;
107
107
  button: S.Number;
108
- }>, import("../../schema/index.js").CallableTaggedStruct<"CompletedFocusPanel", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedFocusButton", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedLockScroll", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedUnlockScroll", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedSetupInert", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedTeardownInert", {}>, import("../../schema/index.js").CallableTaggedStruct<"IgnoredMouseClick", {}>, import("../../schema/index.js").CallableTaggedStruct<"SuppressedSpaceScroll", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedAnchorMount", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedBackdropPortal", {}>, import("../../schema/index.js").CallableTaggedStruct<"GotAnimationMessage", {
108
+ }>, import("../../schema/index.js").CallableTaggedStruct<"CompletedFocusPanel", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedFocusButton", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedLockScroll", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedUnlockScroll", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedSetupInert", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedTeardownInert", {}>, import("../../schema/index.js").CallableTaggedStruct<"IgnoredMouseClick", {}>, import("../../schema/index.js").CallableTaggedStruct<"SuppressedSpaceScroll", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedAnchorPopover", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedPortalPopoverBackdrop", {}>, import("../../schema/index.js").CallableTaggedStruct<"GotAnimationMessage", {
109
109
  message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Showed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hid", {}>, import("../../schema/index.js").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema/index.js").CallableTaggedStruct<"EndedAnimation", {}>]>;
110
110
  }>]>;
111
111
  }>;
@@ -129,11 +129,9 @@ export declare const update: (model: {
129
129
  } | {
130
130
  readonly _tag: "SuppressedSpaceScroll";
131
131
  } | {
132
- readonly _tag: "CompletedAnchorMount";
132
+ readonly _tag: "CompletedAnchorListbox";
133
133
  } | {
134
- readonly _tag: "CompletedFocusItemsOnMount";
135
- } | {
136
- readonly _tag: "CompletedBackdropPortal";
134
+ readonly _tag: "CompletedPortalListboxBackdrop";
137
135
  } | {
138
136
  readonly _tag: "GotAnimationMessage";
139
137
  readonly message: {
@@ -186,11 +184,9 @@ export declare const view: <ParentMessage, Item>(config: Readonly<{
186
184
  readonly selectedItems: readonly string[];
187
185
  };
188
186
  toParentMessage: (message: Opened | Closed | import("./shared.js").BlurredItems | import("./shared.js").ActivatedItem | import("./shared.js").DeactivatedItem | SelectedItem | import("./shared.js").MovedPointerOverItem | import("./shared.js").RequestedItemClick | import("./shared.js").Searched | import("./shared.js").PressedPointerOnButton | import("./shared.js").IgnoredMouseClick | import("./shared.js").SuppressedSpaceScroll | {
189
- readonly _tag: "CompletedAnchorMount";
190
- } | {
191
- readonly _tag: "CompletedFocusItemsOnMount";
187
+ readonly _tag: "CompletedAnchorListbox";
192
188
  } | {
193
- readonly _tag: "CompletedBackdropPortal";
189
+ readonly _tag: "CompletedPortalListboxBackdrop";
194
190
  }) => ParentMessage;
195
191
  onSelectedItem?: (value: string) => ParentMessage;
196
192
  items: readonly Item[];