@foldkit/ui 0.155.0 → 0.156.0-canary.0053b7691fcd

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 (95) hide show
  1. package/dist/anchor/anchor.d.ts +18 -18
  2. package/dist/anchor/anchor.d.ts.map +1 -1
  3. package/dist/anchor/anchor.js +16 -16
  4. package/dist/animation/index.js +6 -6
  5. package/dist/animation/schema.d.ts +6 -6
  6. package/dist/animation/schema.d.ts.map +1 -1
  7. package/dist/animation/schema.js +5 -5
  8. package/dist/animation/update.d.ts +2 -2
  9. package/dist/animation/update.d.ts.map +1 -1
  10. package/dist/animation/update.js +9 -9
  11. package/dist/calendar/index.d.ts +56 -56
  12. package/dist/calendar/index.d.ts.map +1 -1
  13. package/dist/calendar/index.js +49 -37
  14. package/dist/checkbox/index.js +2 -2
  15. package/dist/combobox/multi.d.ts +19 -19
  16. package/dist/combobox/multi.d.ts.map +1 -1
  17. package/dist/combobox/multi.js +2 -2
  18. package/dist/combobox/shared.d.ts +61 -61
  19. package/dist/combobox/shared.d.ts.map +1 -1
  20. package/dist/combobox/shared.js +51 -51
  21. package/dist/combobox/single.d.ts +19 -19
  22. package/dist/combobox/single.d.ts.map +1 -1
  23. package/dist/combobox/single.js +2 -2
  24. package/dist/datePicker/index.d.ts +72 -72
  25. package/dist/datePicker/index.d.ts.map +1 -1
  26. package/dist/datePicker/index.js +9 -9
  27. package/dist/dialog/index.d.ts +14 -14
  28. package/dist/dialog/index.d.ts.map +1 -1
  29. package/dist/dialog/index.js +14 -14
  30. package/dist/disclosure/index.js +2 -2
  31. package/dist/dragAndDrop/index.d.ts +61 -61
  32. package/dist/dragAndDrop/index.d.ts.map +1 -1
  33. package/dist/dragAndDrop/index.js +85 -85
  34. package/dist/fileDrop/index.d.ts +6 -6
  35. package/dist/fileDrop/index.d.ts.map +1 -1
  36. package/dist/fileDrop/index.js +6 -6
  37. package/dist/hoverIntent/hoverIntent.d.ts +19 -16
  38. package/dist/hoverIntent/hoverIntent.d.ts.map +1 -1
  39. package/dist/hoverIntent/hoverIntent.js +49 -46
  40. package/dist/hoverIntent/message.d.ts +4 -4
  41. package/dist/hoverIntent/message.d.ts.map +1 -1
  42. package/dist/hoverIntent/message.js +4 -4
  43. package/dist/hoverIntent/public.d.ts +1 -1
  44. package/dist/hoverIntent/public.d.ts.map +1 -1
  45. package/dist/hoverIntent/public.js +1 -1
  46. package/dist/keyboard.js +2 -2
  47. package/dist/listbox/multi.d.ts +19 -19
  48. package/dist/listbox/multi.d.ts.map +1 -1
  49. package/dist/listbox/multi.js +2 -2
  50. package/dist/listbox/shared.d.ts +58 -58
  51. package/dist/listbox/shared.d.ts.map +1 -1
  52. package/dist/listbox/shared.js +52 -52
  53. package/dist/listbox/single.d.ts +19 -19
  54. package/dist/listbox/single.d.ts.map +1 -1
  55. package/dist/listbox/single.js +2 -2
  56. package/dist/menu/index.d.ts +67 -67
  57. package/dist/menu/index.d.ts.map +1 -1
  58. package/dist/menu/index.js +60 -57
  59. package/dist/popover/index.d.ts +34 -34
  60. package/dist/popover/index.d.ts.map +1 -1
  61. package/dist/popover/index.js +27 -27
  62. package/dist/radioGroup/index.d.ts +12 -12
  63. package/dist/radioGroup/index.d.ts.map +1 -1
  64. package/dist/radioGroup/index.js +16 -16
  65. package/dist/slider/index.d.ts +14 -14
  66. package/dist/slider/index.d.ts.map +1 -1
  67. package/dist/slider/index.js +31 -31
  68. package/dist/switch/index.js +2 -2
  69. package/dist/tabs/index.d.ts +14 -14
  70. package/dist/tabs/index.d.ts.map +1 -1
  71. package/dist/tabs/index.js +18 -18
  72. package/dist/test/apps/disabledButton.d.ts +12 -12
  73. package/dist/test/apps/disabledButton.d.ts.map +1 -1
  74. package/dist/test/apps/disabledButton.js +4 -4
  75. package/dist/toast/index.d.ts +63 -63
  76. package/dist/toast/index.d.ts.map +1 -1
  77. package/dist/toast/index.js +19 -19
  78. package/dist/toast/schema.d.ts +55 -55
  79. package/dist/toast/schema.d.ts.map +1 -1
  80. package/dist/toast/schema.js +25 -25
  81. package/dist/toast/update.d.ts +61 -61
  82. package/dist/toast/update.d.ts.map +1 -1
  83. package/dist/toast/update.js +5 -5
  84. package/dist/tooltip/message.d.ts +3 -3
  85. package/dist/tooltip/message.d.ts.map +1 -1
  86. package/dist/tooltip/message.js +3 -3
  87. package/dist/tooltip/tooltip.d.ts +24 -24
  88. package/dist/tooltip/tooltip.d.ts.map +1 -1
  89. package/dist/tooltip/tooltip.js +13 -13
  90. package/dist/typeahead.d.ts.map +1 -1
  91. package/dist/typeahead.js +3 -3
  92. package/dist/virtualList/index.d.ts +15 -15
  93. package/dist/virtualList/index.d.ts.map +1 -1
  94. package/dist/virtualList/index.js +13 -13
  95. package/package.json +4 -4
@@ -1,27 +1,27 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Duration, Effect, Match as M, Number, Option, Schema as S, } from 'effect';
2
+ import { Duration, Effect, Match, Number, Option, Schema } from 'effect';
3
3
  import * as Command from 'foldkit/command';
4
4
  import { childAttributes } from 'foldkit/html';
5
5
  import { evo } from 'foldkit/struct';
6
6
  import { defineView } from 'foldkit/submodel';
7
7
  import { Message, OutMessage } from './message.js';
8
8
  // MODEL
9
- const FocusLocation = S.Literals(['Trigger', 'Panel']);
9
+ const FocusLocation = Schema.Literals(['Trigger', 'Panel']);
10
10
  /** Schema for HoverIntent state. It tracks pointer and focus engagement over a trigger and its panel, visibility, delay timers, and Escape dismissal. */
11
- export const Model = S.Struct({
12
- isOpen: S.Boolean,
13
- isTriggerHovered: S.Boolean,
14
- isPanelHovered: S.Boolean,
15
- maybeFocusLocation: S.Option(FocusLocation),
16
- isDismissed: S.Boolean,
17
- openDelay: S.DurationFromMillis,
18
- closeDelay: S.DurationFromMillis,
19
- pendingOpenVersion: S.Number,
20
- pendingCloseVersion: S.Number,
11
+ export const Model = Schema.Struct({
12
+ isOpen: Schema.Boolean,
13
+ isTriggerHovered: Schema.Boolean,
14
+ isPanelHovered: Schema.Boolean,
15
+ maybeFocusLocation: Schema.Option(FocusLocation),
16
+ isDismissed: Schema.Boolean,
17
+ openDelay: Schema.DurationFromMillis,
18
+ closeDelay: Schema.DurationFromMillis,
19
+ pendingOpenVersion: Schema.Number,
20
+ pendingCloseVersion: Schema.Number,
21
21
  });
22
22
  const DEFAULT_OPEN_DELAY = Duration.millis(200);
23
23
  const DEFAULT_CLOSE_DELAY = Duration.millis(300);
24
- /** Creates a HoverIntent Model. Pointer entry opens after 200 milliseconds and full disengagement closes after 300 milliseconds by default. */
24
+ /** Creates a HoverIntent Model. Pointer entry opens after 200 milliseconds and pointer departure closes after a 300-millisecond grace period by default. Focus entry opens immediately, and focus departure closes without that pointer grace period. */
25
25
  export const init = (config = {}) => (__foldkitBrandViewResult(({
26
26
  isOpen: false,
27
27
  isTriggerHovered: false,
@@ -40,13 +40,13 @@ export const init = (config = {}) => (__foldkitBrandViewResult(({
40
40
  // COMMAND
41
41
  /** Waits before opening, then emits the version that scheduled the wait. */
42
42
  export const WaitBeforeOpening = Command.define('WaitBeforeOpening', {
43
- args: { delay: S.DurationFromMillis, version: S.Number },
43
+ args: { delay: Schema.DurationFromMillis, version: Schema.Number },
44
44
  messages: [Message.CompletedWaitBeforeOpening],
45
45
  execute: ({ delay, version }) => __foldkitBrandViewResult((Effect.sleep(delay).pipe(Effect.as(Message.CompletedWaitBeforeOpening({ version })))), "@foldkit/ui/hoverIntent/hoverIntent.js#execute"),
46
46
  });
47
47
  /** Waits before closing, then emits the version that scheduled the wait. */
48
48
  export const WaitBeforeClosing = Command.define('WaitBeforeClosing', {
49
- args: { delay: S.DurationFromMillis, version: S.Number },
49
+ args: { delay: Schema.DurationFromMillis, version: Schema.Number },
50
50
  messages: [Message.CompletedWaitBeforeClosing],
51
51
  execute: ({ delay, version }) => __foldkitBrandViewResult((Effect.sleep(delay).pipe(Effect.as(Message.CompletedWaitBeforeClosing({ version })))), "@foldkit/ui/hoverIntent/hoverIntent.js#execute~2"),
52
52
  });
@@ -61,14 +61,14 @@ const open = (model) => {
61
61
  outMessage: OutMessage.Opened(),
62
62
  }), "@foldkit/ui/hoverIntent/hoverIntent.js#open");
63
63
  };
64
- const close = (model) => {
64
+ const finishClosing = (model) => {
65
65
  if (!model.isOpen) {
66
- return __foldkitBrandViewResult(({ model }), "@foldkit/ui/hoverIntent/hoverIntent.js#close");
66
+ return __foldkitBrandViewResult(({ model }), "@foldkit/ui/hoverIntent/hoverIntent.js#finishClosing");
67
67
  }
68
68
  return __foldkitBrandViewResult(({
69
69
  model: evo(model, { isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isOpen~2") }),
70
70
  outMessage: OutMessage.Closed(),
71
- }), "@foldkit/ui/hoverIntent/hoverIntent.js#close");
71
+ }), "@foldkit/ui/hoverIntent/hoverIntent.js#finishClosing");
72
72
  };
73
73
  const scheduleOpen = (model) => {
74
74
  const version = Number.increment(model.pendingOpenVersion);
@@ -77,11 +77,11 @@ const scheduleOpen = (model) => {
77
77
  commands: [WaitBeforeOpening({ delay: model.openDelay, version })],
78
78
  }), "@foldkit/ui/hoverIntent/hoverIntent.js#scheduleOpen");
79
79
  };
80
- const scheduleClose = (model) => {
80
+ const scheduleClose = (model, delay) => {
81
81
  const version = Number.increment(model.pendingCloseVersion);
82
82
  return __foldkitBrandViewResult(({
83
83
  model: evo(model, { pendingCloseVersion: () => __foldkitBrandViewResult((version), "@foldkit/ui/hoverIntent/hoverIntent.js#pendingCloseVersion") }),
84
- commands: [WaitBeforeClosing({ delay: model.closeDelay, version })],
84
+ commands: [WaitBeforeClosing({ delay, version })],
85
85
  }), "@foldkit/ui/hoverIntent/hoverIntent.js#scheduleClose");
86
86
  };
87
87
  const entered = (model) => {
@@ -106,7 +106,7 @@ const left = (model) => {
106
106
  if (!leftModel.isOpen) {
107
107
  return __foldkitBrandViewResult(({ model: leftModel }), "@foldkit/ui/hoverIntent/hoverIntent.js#left");
108
108
  }
109
- return __foldkitBrandViewResult((scheduleClose(leftModel)), "@foldkit/ui/hoverIntent/hoverIntent.js#left");
109
+ return __foldkitBrandViewResult((scheduleClose(leftModel, leftModel.closeDelay)), "@foldkit/ui/hoverIntent/hoverIntent.js#left");
110
110
  };
111
111
  const focused = (model, focusLocation) => {
112
112
  const focusedModel = evo(model, {
@@ -133,37 +133,40 @@ const blurred = (model) => {
133
133
  if (!blurredModel.isOpen) {
134
134
  return __foldkitBrandViewResult(({ model: blurredModel }), "@foldkit/ui/hoverIntent/hoverIntent.js#blurred");
135
135
  }
136
- return __foldkitBrandViewResult((scheduleClose(blurredModel)), "@foldkit/ui/hoverIntent/hoverIntent.js#blurred");
136
+ return __foldkitBrandViewResult((scheduleClose(blurredModel, Duration.zero)), "@foldkit/ui/hoverIntent/hoverIntent.js#blurred");
137
137
  };
138
+ const dismiss = (model, isTriggerFocused) => {
139
+ const maybeFocusLocation = Option.liftPredicate('Trigger', () => __foldkitBrandViewResult((isTriggerFocused), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous"));
140
+ const dismissedModel = evo(model, {
141
+ isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isOpen~3"),
142
+ isPanelHovered: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isPanelHovered"),
143
+ maybeFocusLocation: () => __foldkitBrandViewResult((maybeFocusLocation), "@foldkit/ui/hoverIntent/hoverIntent.js#maybeFocusLocation~3"),
144
+ isDismissed: () => __foldkitBrandViewResult((model.isTriggerHovered || isTriggerFocused), "@foldkit/ui/hoverIntent/hoverIntent.js#isDismissed~3"),
145
+ pendingOpenVersion: Number.increment,
146
+ pendingCloseVersion: Number.increment,
147
+ });
148
+ if (model.isOpen) {
149
+ return __foldkitBrandViewResult(({ model: dismissedModel, outMessage: OutMessage.Closed() }), "@foldkit/ui/hoverIntent/hoverIntent.js#dismiss");
150
+ }
151
+ return __foldkitBrandViewResult(({ model: dismissedModel }), "@foldkit/ui/hoverIntent/hoverIntent.js#dismiss");
152
+ };
153
+ /** Programmatically closes HoverIntent immediately, invalidating pending
154
+ * transitions and suppressing reopening until the trigger disengages. */
155
+ export const close = (model) => __foldkitBrandViewResult((dismiss(model, Option.exists(model.maybeFocusLocation, focusLocation => __foldkitBrandViewResult((focusLocation === 'Trigger'), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~2")))), "@foldkit/ui/hoverIntent/hoverIntent.js#close");
138
156
  /** Processes a HoverIntent Message and returns the next Model, optional Commands, and an optional OutMessage. */
139
157
  export const update = (model, message) => __foldkitBrandViewResult((Message.match(message, {
140
158
  EnteredTrigger: () => __foldkitBrandViewResult((entered(evo(model, { isTriggerHovered: () => __foldkitBrandViewResult((true), "@foldkit/ui/hoverIntent/hoverIntent.js#isTriggerHovered") }))), "@foldkit/ui/hoverIntent/hoverIntent.js#EnteredTrigger"),
141
159
  LeftTrigger: () => __foldkitBrandViewResult((left(evo(model, { isTriggerHovered: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isTriggerHovered~2") }))), "@foldkit/ui/hoverIntent/hoverIntent.js#LeftTrigger"),
142
- EnteredPanel: () => __foldkitBrandViewResult((entered(evo(model, { isPanelHovered: () => __foldkitBrandViewResult((true), "@foldkit/ui/hoverIntent/hoverIntent.js#isPanelHovered") }))), "@foldkit/ui/hoverIntent/hoverIntent.js#EnteredPanel"),
143
- LeftPanel: () => __foldkitBrandViewResult((left(evo(model, { isPanelHovered: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isPanelHovered~2") }))), "@foldkit/ui/hoverIntent/hoverIntent.js#LeftPanel"),
160
+ EnteredPanel: () => __foldkitBrandViewResult((entered(evo(model, { isPanelHovered: () => __foldkitBrandViewResult((true), "@foldkit/ui/hoverIntent/hoverIntent.js#isPanelHovered~2") }))), "@foldkit/ui/hoverIntent/hoverIntent.js#EnteredPanel"),
161
+ LeftPanel: () => __foldkitBrandViewResult((left(evo(model, { isPanelHovered: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isPanelHovered~3") }))), "@foldkit/ui/hoverIntent/hoverIntent.js#LeftPanel"),
144
162
  FocusedTrigger: () => __foldkitBrandViewResult((focused(model, 'Trigger')), "@foldkit/ui/hoverIntent/hoverIntent.js#FocusedTrigger"),
145
163
  BlurredTrigger: () => __foldkitBrandViewResult((blurred(model)), "@foldkit/ui/hoverIntent/hoverIntent.js#BlurredTrigger"),
146
164
  FocusedPanel: () => __foldkitBrandViewResult((focused(model, 'Panel')), "@foldkit/ui/hoverIntent/hoverIntent.js#FocusedPanel"),
147
165
  BlurredPanel: () => __foldkitBrandViewResult((blurred(model)), "@foldkit/ui/hoverIntent/hoverIntent.js#BlurredPanel"),
148
166
  PressedEscape: ({ source }) => {
149
167
  const isTriggerFocused = source === 'Trigger' ||
150
- Option.exists(model.maybeFocusLocation, focusLocation => __foldkitBrandViewResult((focusLocation === 'Trigger'), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous"));
151
- const maybeFocusLocation = isTriggerFocused
152
- ? Option.some('Trigger')
153
- : Option.none();
154
- const isDismissed = model.isTriggerHovered || isTriggerFocused;
155
- const dismissedModel = evo(model, {
156
- isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isOpen~3"),
157
- isPanelHovered: () => __foldkitBrandViewResult((false), "@foldkit/ui/hoverIntent/hoverIntent.js#isPanelHovered~3"),
158
- maybeFocusLocation: () => __foldkitBrandViewResult((maybeFocusLocation), "@foldkit/ui/hoverIntent/hoverIntent.js#maybeFocusLocation~3"),
159
- isDismissed: () => __foldkitBrandViewResult((isDismissed), "@foldkit/ui/hoverIntent/hoverIntent.js#isDismissed~3"),
160
- pendingOpenVersion: Number.increment,
161
- pendingCloseVersion: Number.increment,
162
- });
163
- if (model.isOpen) {
164
- return __foldkitBrandViewResult(({ model: dismissedModel, outMessage: OutMessage.Closed() }), "@foldkit/ui/hoverIntent/hoverIntent.js#PressedEscape");
165
- }
166
- return __foldkitBrandViewResult(({ model: dismissedModel }), "@foldkit/ui/hoverIntent/hoverIntent.js#PressedEscape");
168
+ Option.exists(model.maybeFocusLocation, focusLocation => __foldkitBrandViewResult((focusLocation === 'Trigger'), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~3"));
169
+ return __foldkitBrandViewResult((dismiss(model, isTriggerFocused)), "@foldkit/ui/hoverIntent/hoverIntent.js#PressedEscape");
167
170
  },
168
171
  CompletedWaitBeforeOpening: ({ version }) => {
169
172
  if (version !== model.pendingOpenVersion) {
@@ -178,18 +181,18 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
178
181
  if (version !== model.pendingCloseVersion || isEngaged(model)) {
179
182
  return __foldkitBrandViewResult(({ model }), "@foldkit/ui/hoverIntent/hoverIntent.js#CompletedWaitBeforeClosing");
180
183
  }
181
- return __foldkitBrandViewResult((close(model)), "@foldkit/ui/hoverIntent/hoverIntent.js#CompletedWaitBeforeClosing");
184
+ return __foldkitBrandViewResult((finishClosing(model)), "@foldkit/ui/hoverIntent/hoverIntent.js#CompletedWaitBeforeClosing");
182
185
  },
183
186
  })), "@foldkit/ui/hoverIntent/hoverIntent.js#update");
184
187
  /** Renders headless HoverIntent event bundles. It owns no markup, ARIA semantics, positioning, or styling. */
185
188
  export const view = defineView((model, { focusTriggerSelector, toView }, h) => {
186
- const toPressedEscape = (source) => __foldkitBrandViewResult(((key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some(Message.PressedEscape({ source }))), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~4")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~5")))), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~3")), "@foldkit/ui/hoverIntent/hoverIntent.js#toPressedEscape");
189
+ const toPressedEscape = (source) => __foldkitBrandViewResult(((key) => __foldkitBrandViewResult((Match.value(key).pipe(Match.when('Escape', () => __foldkitBrandViewResult((Option.some(Message.PressedEscape({ source }))), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~6")), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~7")))), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~5")), "@foldkit/ui/hoverIntent/hoverIntent.js#toPressedEscape");
187
190
  const panelEscapeHandler = focusTriggerSelector === undefined
188
191
  ? h.OnKeyDownPreventDefault(toPressedEscape('Panel'))
189
- : h.OnKeyDownFocus(key => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some({
192
+ : h.OnKeyDownFocus(key => __foldkitBrandViewResult((Match.value(key).pipe(Match.when('Escape', () => __foldkitBrandViewResult((Option.some({
190
193
  focusSelector: focusTriggerSelector,
191
194
  message: Message.PressedEscape({ source: 'Panel' }),
192
- })), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~7")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~8")))), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~6"));
195
+ })), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~9")), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~10")))), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~8"));
193
196
  return __foldkitBrandViewResult((toView({
194
197
  trigger: childAttributes([
195
198
  h.OnMouseEnter(Message.EnteredTrigger()),
@@ -206,5 +209,5 @@ export const view = defineView((model, { focusTriggerSelector, toView }, h) => {
206
209
  panelEscapeHandler,
207
210
  ]),
208
211
  isVisible: model.isOpen,
209
- })), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~2");
212
+ })), "@foldkit/ui/hoverIntent/hoverIntent.js#anonymous~4");
210
213
  });
@@ -1,4 +1,4 @@
1
- import { Schema as S } from 'effect';
1
+ import { Schema } from 'effect';
2
2
  /** Union of all Messages the HoverIntent component can produce. */
3
3
  export declare const Message: import("foldkit/message").MessageUnion<{
4
4
  readonly EnteredTrigger: {};
@@ -10,13 +10,13 @@ export declare const Message: import("foldkit/message").MessageUnion<{
10
10
  readonly FocusedPanel: {};
11
11
  readonly BlurredPanel: {};
12
12
  readonly PressedEscape: {
13
- source: S.Literals<readonly ["Trigger", "Panel"]>;
13
+ source: Schema.Literals<readonly ["Trigger", "Panel"]>;
14
14
  };
15
15
  readonly CompletedWaitBeforeOpening: {
16
- version: S.Number;
16
+ version: Schema.Number;
17
17
  };
18
18
  readonly CompletedWaitBeforeClosing: {
19
- version: S.Number;
19
+ version: Schema.Number;
20
20
  };
21
21
  }>;
22
22
  export type Message = typeof Message.Type;
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/hoverIntent/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAKpC,mEAAmE;AACnE,eAAO,MAAM,OAAO;;;;;;;;;;QASD,MAAM;;;QACO,OAAO;;;QACP,OAAO;;EACrC,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,CAAA;AAC/D,MAAM,MAAM,WAAW,GAAG,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAA;AAC3D,MAAM,MAAM,SAAS,GAAG,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,CAAA;AACrD,MAAM,MAAM,cAAc,GAAG,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,CAAA;AAC/D,MAAM,MAAM,cAAc,GAAG,OAAO,OAAO,CAAC,cAA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A;AACrD,MAAM,MAAM,cAAc,GAAG,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,CAAA;AAC/D,MAAM,MAAM,cAAc,GAAG,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,CAAA;AAC/D,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAA;AAC3D,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAA;AAC3D,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAA;AAC7D,MAAM,MAAM,0BAA0B,GACpC,OAAO,OAAO,CAAC,0BAA0B,CAAC,IAAI,CAAA;AAChD,MAAM,MAAM,0BAA0B,GACpC,OAAO,OAAO,CAAC,0BAA0B,CAAC,IAAI,CAAA;AAIhD,yEAAyE;AACzE,eAAO,MAAM,UAAU;;;EAGrB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAE/C,MAAM,MAAM,MAAM,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA;AAClD,MAAM,MAAM,MAAM,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Schema as S } from 'effect';
1
+ import { Schema } from 'effect';
2
2
  import { defineMessageUnion } from 'foldkit/message';
3
3
  // MESSAGE
4
4
  /** Union of all Messages the HoverIntent component can produce. */
@@ -11,9 +11,9 @@ export const Message = defineMessageUnion({
11
11
  BlurredTrigger: {},
12
12
  FocusedPanel: {},
13
13
  BlurredPanel: {},
14
- PressedEscape: { source: S.Literals(['Trigger', 'Panel']) },
15
- CompletedWaitBeforeOpening: { version: S.Number },
16
- CompletedWaitBeforeClosing: { version: S.Number },
14
+ PressedEscape: { source: Schema.Literals(['Trigger', 'Panel']) },
15
+ CompletedWaitBeforeOpening: { version: Schema.Number },
16
+ CompletedWaitBeforeClosing: { version: Schema.Number },
17
17
  });
18
18
  // OUT MESSAGE
19
19
  /** Union of visibility-transition OutMessages emitted by HoverIntent. */
@@ -1,3 +1,3 @@
1
- export { init, update, view, Model, Message, OutMessage, type BlurredPanel, type BlurredTrigger, type Closed, type CompletedWaitBeforeClosing, type CompletedWaitBeforeOpening, type EnteredPanel, type EnteredTrigger, type FocusedPanel, type FocusedTrigger, type LeftPanel, type LeftTrigger, type Opened, type PressedEscape, WaitBeforeClosing, WaitBeforeOpening, } from './index.js';
1
+ export { close, init, update, view, Model, Message, OutMessage, type BlurredPanel, type BlurredTrigger, type Closed, type CompletedWaitBeforeClosing, type CompletedWaitBeforeOpening, type EnteredPanel, type EnteredTrigger, type FocusedPanel, type FocusedTrigger, type LeftPanel, type LeftTrigger, type Opened, type PressedEscape, WaitBeforeClosing, WaitBeforeOpening, } from './index.js';
2
2
  export type { InitConfig, RenderInfo, ViewInputs } from './index.js';
3
3
  //# sourceMappingURL=public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/hoverIntent/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/hoverIntent/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA"}
@@ -1 +1 @@
1
- export { init, update, view, Model, Message, OutMessage, WaitBeforeClosing, WaitBeforeOpening, } from './index.js';
1
+ export { close, init, update, view, Model, Message, OutMessage, WaitBeforeClosing, WaitBeforeOpening, } from './index.js';
package/dist/keyboard.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Array, Match as M, Option, Predicate, pipe } from 'effect';
2
+ import { Array, Match, Option, Predicate, pipe } from 'effect';
3
3
  /** Whether a keyboard event key is a single printable character (not a named key like "Enter" or "ArrowDown"). */
4
4
  export const isPrintableKey = (key) => __foldkitBrandViewResult((key.length === 1), "@foldkit/ui/keyboard.js#isPrintableKey");
5
5
  export const wrapIndex = (index, length) => __foldkitBrandViewResult((((index % length) + length) % length), "@foldkit/ui/keyboard.js#wrapIndex");
6
6
  export const findFirstEnabledIndex = (itemCount, focusedIndex, isDisabled) => __foldkitBrandViewResult(((startIndex, direction) => __foldkitBrandViewResult((pipe(itemCount, Array.makeBy(step => __foldkitBrandViewResult((wrapIndex(startIndex + step * direction, itemCount)), "@foldkit/ui/keyboard.js#anonymous~2")), Array.findFirst(Predicate.not(isDisabled)), Option.getOrElse(() => __foldkitBrandViewResult((focusedIndex), "@foldkit/ui/keyboard.js#anonymous~3")))), "@foldkit/ui/keyboard.js#anonymous")), "@foldkit/ui/keyboard.js#findFirstEnabledIndex");
7
7
  export const keyToIndex = (nextKey, previousKey, itemCount, focusedIndex, isDisabled) => {
8
8
  const find = findFirstEnabledIndex(itemCount, focusedIndex, isDisabled);
9
- return __foldkitBrandViewResult(((key) => __foldkitBrandViewResult((M.value(key).pipe(M.when(nextKey, () => __foldkitBrandViewResult((find(focusedIndex + 1, 1)), "@foldkit/ui/keyboard.js#anonymous~5")), M.when(previousKey, () => __foldkitBrandViewResult((find(focusedIndex - 1, -1)), "@foldkit/ui/keyboard.js#anonymous~6")), M.whenOr('Home', 'PageUp', () => __foldkitBrandViewResult((find(0, 1)), "@foldkit/ui/keyboard.js#anonymous~7")), M.whenOr('End', 'PageDown', () => __foldkitBrandViewResult((find(itemCount - 1, -1)), "@foldkit/ui/keyboard.js#anonymous~8")), M.orElse(() => __foldkitBrandViewResult((focusedIndex), "@foldkit/ui/keyboard.js#anonymous~9")))), "@foldkit/ui/keyboard.js#anonymous~4")), "@foldkit/ui/keyboard.js#keyToIndex");
9
+ return __foldkitBrandViewResult(((key) => __foldkitBrandViewResult((Match.value(key).pipe(Match.when(nextKey, () => __foldkitBrandViewResult((find(focusedIndex + 1, 1)), "@foldkit/ui/keyboard.js#anonymous~5")), Match.when(previousKey, () => __foldkitBrandViewResult((find(focusedIndex - 1, -1)), "@foldkit/ui/keyboard.js#anonymous~6")), Match.whenOr('Home', 'PageUp', () => __foldkitBrandViewResult((find(0, 1)), "@foldkit/ui/keyboard.js#anonymous~7")), Match.whenOr('End', 'PageDown', () => __foldkitBrandViewResult((find(itemCount - 1, -1)), "@foldkit/ui/keyboard.js#anonymous~8")), Match.orElse(() => __foldkitBrandViewResult((focusedIndex), "@foldkit/ui/keyboard.js#anonymous~9")))), "@foldkit/ui/keyboard.js#anonymous~4")), "@foldkit/ui/keyboard.js#keyToIndex");
10
10
  };
@@ -1,28 +1,28 @@
1
- import { Option, Schema as S } from 'effect';
1
+ import { Option, Schema } from 'effect';
2
2
  import { type Update } from 'foldkit';
3
3
  import type { View as SubmodelView } from 'foldkit/submodel';
4
4
  import { type BaseInitConfig, type BaseViewInputs, Message, OutMessage } from './shared.js';
5
5
  /** Schema for the multi-select listbox's private interaction state (open/closed status, active item, activation trigger, typeahead search). The selection is owned by the parent and passed in via `ViewInputs.selectedValues`. */
6
- export declare const Model: S.Struct<{
7
- readonly id: S.String;
8
- readonly isOpen: S.Boolean;
9
- readonly isAnimated: S.Boolean;
10
- readonly isModal: S.Boolean;
11
- readonly orientation: S.Literals<readonly ["Vertical", "Horizontal"]>;
12
- readonly animation: S.Struct<{
13
- readonly id: S.String;
14
- readonly isShowing: S.Boolean;
15
- readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
6
+ export declare const Model: Schema.Struct<{
7
+ readonly id: Schema.String;
8
+ readonly isOpen: Schema.Boolean;
9
+ readonly isAnimated: Schema.Boolean;
10
+ readonly isModal: Schema.Boolean;
11
+ readonly orientation: Schema.Literals<readonly ["Vertical", "Horizontal"]>;
12
+ readonly animation: Schema.Struct<{
13
+ readonly id: Schema.String;
14
+ readonly isShowing: Schema.Boolean;
15
+ readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
16
16
  }>;
17
- readonly maybeActiveItemIndex: S.Option<S.Number>;
18
- readonly activationTrigger: S.Literals<readonly ["Pointer", "Keyboard"]>;
19
- readonly searchQuery: S.String;
20
- readonly searchVersion: S.Number;
21
- readonly maybeLastPointerPosition: S.Option<S.Struct<{
22
- readonly screenX: S.Number;
23
- readonly screenY: S.Number;
17
+ readonly maybeActiveItemIndex: Schema.Option<Schema.Number>;
18
+ readonly activationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
19
+ readonly searchQuery: Schema.String;
20
+ readonly searchVersion: Schema.Number;
21
+ readonly maybeLastPointerPosition: Schema.Option<Schema.Struct<{
22
+ readonly screenX: Schema.Number;
23
+ readonly screenY: Schema.Number;
24
24
  }>>;
25
- readonly maybeLastButtonPointerType: S.Option<S.String>;
25
+ readonly maybeLastButtonPointerType: Schema.Option<Schema.String>;
26
26
  }>;
27
27
  export type Model = typeof Model.Type;
28
28
  /** Configuration for creating a multi-select listbox model with `init`. `isAnimated` enables CSS transition coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). */
@@ -1 +1 @@
1
- {"version":3,"file":"multi.d.ts","sourceRoot":"","sources":["../../src/listbox/multi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE5D,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,OAAO,EACP,UAAU,EAIX,MAAM,aAAa,CAAA;AAIpB,mOAAmO;AACnO,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;EAEhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,kOAAkO;AAClO,MAAM,MAAM,UAAU,GAAG,cAAc,CAAA;AAEvC,2GAA2G;AAC3G,eAAO,MAAM,IAAI,WAAY,UAAU,KAAG,KAAyB,CAAA;AAInE;;;kBAGkB;AAClB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhB,CAAA;AAEH,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAA;AAE7C;6DAC6D;AAC7D,eAAO,MAAM,IAAI,UAAW,KAAK,KA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cAAc,CAC1E,IAAI,EACJ,KAAK,CACN,CAAA;AAID,KAAK,kBAAkB,CAAC,KAAK,SAAS,MAAM,IAAI,MAAM,CAAC,oBAAoB,CACzE,KAAK,EACL,OAAO,EACP,UAAU,CAAC,KAAK,CAAC,CAClB,CAAA;AAED;;;;2CAI2C;AAC3C,MAAM,MAAM,MAAM,CAChB,IAAI,GAAG,MAAM,EACb,KAAK,SAAS,MAAM,GAAG,IAAI,SAAS,MAAM,GAAG,IAAI,GAAG,MAAM,IACxD,QAAQ,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;IAC3D,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,KAAK,kBAAkB,CAAC,KAAK,CAAC,CAAA;IACrE,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,KAAK,kBAAkB,CAAC,KAAK,CAAC,CAAA;IACpE,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,kBAAkB,CAAC,KAAK,CAAC,CAAA;IACjD,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,kBAAkB,CAAC,KAAK,CAAC,CAAA;CACnD,CAAC,CAAA;AAEF;;;;qBAIqB;AACrB,eAAO,MAAM,MAAM,GACjB,IAAI,GAAG,MAAM,EACb,KAAK,SAAS,MAAM,GAAG,IAAI,SAAS,MAAM,GAAG,IAAI,GAAG,MAAM,OACvD,MAAM,CAAC,IAAI,EAAE,KAAK,CAoBtB,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Option, Schema as S } from 'effect';
2
+ import { Option, Schema } from 'effect';
3
3
  import { BaseModel, Message, OutMessage, baseInit, makeUpdate, makeView, } from './shared.js';
4
4
  // MODEL
5
5
  /** Schema for the multi-select listbox's private interaction state (open/closed status, active item, activation trigger, typeahead search). The selection is owned by the parent and passed in via `ViewInputs.selectedValues`. */
6
- export const Model = S.Struct({
6
+ export const Model = Schema.Struct({
7
7
  ...BaseModel.fields,
8
8
  });
9
9
  /** Creates an initial multi-select listbox model from a config. Defaults to closed with no active item. */
@@ -1,4 +1,4 @@
1
- import { Effect, Option, Schema as S } from 'effect';
1
+ import { Effect, Option, Schema } from 'effect';
2
2
  import * as Command from 'foldkit/command';
3
3
  import type { ChildAttribute, Html } from 'foldkit/html';
4
4
  import * as Mount from 'foldkit/mount';
@@ -8,32 +8,32 @@ import { AnchorConfig } from '../anchor/index.js';
8
8
  import { resolveTypeaheadMatch } from '../typeahead.js';
9
9
  export { resolveTypeaheadMatch };
10
10
  /** Schema for the activation trigger: whether the user interacted via mouse or keyboard. */
11
- export declare const ActivationTrigger: S.Literals<readonly ["Pointer", "Keyboard"]>;
11
+ export declare const ActivationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
12
12
  export type ActivationTrigger = typeof ActivationTrigger.Type;
13
13
  /** Schema for the listbox orientation: whether items flow vertically or horizontally. */
14
- export declare const Orientation: S.Literals<readonly ["Vertical", "Horizontal"]>;
14
+ export declare const Orientation: Schema.Literals<readonly ["Vertical", "Horizontal"]>;
15
15
  export type Orientation = typeof Orientation.Type;
16
- /** Schema fields shared by all listbox variants (single-select and multi-select). Spread into each variant's `S.Struct` to avoid duplicating field definitions. */
17
- export declare const BaseModel: S.Struct<{
18
- readonly id: S.String;
19
- readonly isOpen: S.Boolean;
20
- readonly isAnimated: S.Boolean;
21
- readonly isModal: S.Boolean;
22
- readonly orientation: S.Literals<readonly ["Vertical", "Horizontal"]>;
23
- readonly animation: S.Struct<{
24
- readonly id: S.String;
25
- readonly isShowing: S.Boolean;
26
- readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
16
+ /** Schema fields shared by all listbox variants (single-select and multi-select). Spread into each variant's `Schema.Struct` to avoid duplicating field definitions. */
17
+ export declare const BaseModel: Schema.Struct<{
18
+ readonly id: Schema.String;
19
+ readonly isOpen: Schema.Boolean;
20
+ readonly isAnimated: Schema.Boolean;
21
+ readonly isModal: Schema.Boolean;
22
+ readonly orientation: Schema.Literals<readonly ["Vertical", "Horizontal"]>;
23
+ readonly animation: Schema.Struct<{
24
+ readonly id: Schema.String;
25
+ readonly isShowing: Schema.Boolean;
26
+ readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
27
27
  }>;
28
- readonly maybeActiveItemIndex: S.Option<S.Number>;
29
- readonly activationTrigger: S.Literals<readonly ["Pointer", "Keyboard"]>;
30
- readonly searchQuery: S.String;
31
- readonly searchVersion: S.Number;
32
- readonly maybeLastPointerPosition: S.Option<S.Struct<{
33
- readonly screenX: S.Number;
34
- readonly screenY: S.Number;
28
+ readonly maybeActiveItemIndex: Schema.Option<Schema.Number>;
29
+ readonly activationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
30
+ readonly searchQuery: Schema.String;
31
+ readonly searchVersion: Schema.Number;
32
+ readonly maybeLastPointerPosition: Schema.Option<Schema.Struct<{
33
+ readonly screenX: Schema.Number;
34
+ readonly screenY: Schema.Number;
35
35
  }>>;
36
- readonly maybeLastButtonPointerType: S.Option<S.String>;
36
+ readonly maybeLastButtonPointerType: Schema.Option<Schema.String>;
37
37
  }>;
38
38
  export type BaseModel = typeof BaseModel.Type;
39
39
  /** Configuration fields shared by all listbox variant `init` functions. */
@@ -48,32 +48,32 @@ export declare const baseInit: (config: BaseInitConfig) => BaseModel;
48
48
  /** Union of all messages the listbox component can produce. */
49
49
  export declare const Message: import("foldkit/message").MessageUnion<{
50
50
  readonly Opened: {
51
- maybeActiveItemIndex: S.Option<S.Number>;
51
+ maybeActiveItemIndex: Schema.Option<Schema.Number>;
52
52
  };
53
53
  readonly Closed: {};
54
54
  readonly BlurredItems: {};
55
55
  readonly ActivatedItem: {
56
- index: S.Number;
57
- activationTrigger: S.Literals<readonly ["Pointer", "Keyboard"]>;
56
+ index: Schema.Number;
57
+ activationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
58
58
  };
59
59
  readonly DeactivatedItem: {};
60
60
  readonly SelectedItem: {
61
- item: S.String;
61
+ item: Schema.String;
62
62
  };
63
63
  readonly MovedPointerOverItem: {
64
- index: S.Number;
65
- screenX: S.Number;
66
- screenY: S.Number;
64
+ index: Schema.Number;
65
+ screenX: Schema.Number;
66
+ screenY: Schema.Number;
67
67
  };
68
68
  readonly RequestedItemClick: {
69
- index: S.Number;
69
+ index: Schema.Number;
70
70
  };
71
71
  readonly Searched: {
72
- key: S.String;
73
- maybeTargetIndex: S.Option<S.Number>;
72
+ key: Schema.String;
73
+ maybeTargetIndex: Schema.Option<Schema.Number>;
74
74
  };
75
75
  readonly CompletedDelayClearSearch: {
76
- version: S.Number;
76
+ version: Schema.Number;
77
77
  };
78
78
  readonly CompletedLockScroll: {};
79
79
  readonly CompletedUnlockScroll: {};
@@ -97,8 +97,8 @@ export declare const Message: import("foldkit/message").MessageUnion<{
97
97
  }>;
98
98
  };
99
99
  readonly PressedPointerOnButton: {
100
- pointerType: S.String;
101
- button: S.Number;
100
+ pointerType: Schema.String;
101
+ button: Schema.Number;
102
102
  };
103
103
  }>;
104
104
  export type Opened = typeof Message.Opened.Type;
@@ -123,7 +123,7 @@ export type Selected<Value extends string = string> = Readonly<{
123
123
  /** Union of out-messages the listbox component can produce. The parent folds `Selected` into the selection it owns: single-select stores the value, multi-select toggles the value's membership. */
124
124
  export declare const OutMessage: import("foldkit/message").MessageUnion<{
125
125
  readonly Selected: {
126
- value: S.String;
126
+ value: Schema.String;
127
127
  };
128
128
  }>;
129
129
  /** Generic over `Value extends string` so consumers who create the listbox
@@ -158,52 +158,52 @@ export declare const UnlockScroll: Command.CommandDefinitionNoArgs<"UnlockScroll
158
158
  }, never, never>>;
159
159
  /** Marks all elements outside the listbox as inert for modal behavior. */
160
160
  export declare const InertOthers: Command.CommandDefinitionWithArgs<"InertOthers", {
161
- id: S.String;
161
+ id: Schema.String;
162
162
  }, Effect.Effect<{
163
163
  readonly _tag: "CompletedInertOthers";
164
164
  }, never, never>>;
165
165
  /** Removes the inert attribute from elements outside the listbox. */
166
166
  export declare const RestoreInert: Command.CommandDefinitionWithArgs<"RestoreInert", {
167
- id: S.String;
167
+ id: Schema.String;
168
168
  }, Effect.Effect<{
169
169
  readonly _tag: "CompletedRestoreInert";
170
170
  }, never, never>>;
171
171
  /** Moves focus back to the listbox button after closing. */
172
172
  export declare const FocusButton: Command.CommandDefinitionWithArgs<"FocusButton", {
173
- id: S.String;
173
+ id: Schema.String;
174
174
  }, Effect.Effect<{
175
175
  readonly _tag: "CompletedFocusButton";
176
176
  }, never, never>>;
177
177
  /** Moves focus to the listbox items container after opening. */
178
178
  export declare const FocusItems: Command.CommandDefinitionWithArgs<"FocusItems", {
179
- id: S.String;
179
+ id: Schema.String;
180
180
  }, Effect.Effect<{
181
181
  readonly _tag: "CompletedFocusItems";
182
182
  }, never, never>>;
183
183
  /** Scrolls the active listbox item into view after keyboard navigation. */
184
184
  export declare const ScrollIntoView: Command.CommandDefinitionWithArgs<"ScrollIntoView", {
185
- id: S.String;
186
- index: S.Number;
185
+ id: Schema.String;
186
+ index: Schema.Number;
187
187
  }, Effect.Effect<{
188
188
  readonly _tag: "CompletedScrollIntoView";
189
189
  }, never, never>>;
190
190
  /** Programmatically clicks the active listbox item's DOM element. */
191
191
  export declare const ClickItem: Command.CommandDefinitionWithArgs<"ClickItem", {
192
- id: S.String;
193
- index: S.Number;
192
+ id: Schema.String;
193
+ index: Schema.Number;
194
194
  }, Effect.Effect<{
195
195
  readonly _tag: "CompletedClickItem";
196
196
  }, never, never>>;
197
197
  /** Waits for the typeahead search debounce period before clearing the query. */
198
198
  export declare const DelayClearSearch: Command.CommandDefinitionWithArgs<"DelayClearSearch", {
199
- version: S.Number;
199
+ version: Schema.Number;
200
200
  }, Effect.Effect<{
201
201
  readonly _tag: "CompletedDelayClearSearch";
202
202
  readonly version: number;
203
203
  }, never, never>>;
204
204
  /** Detects whether the listbox button moved or the leave animation ended. Whichever comes first; both outcomes signal the Animation submodel that leave is complete. */
205
205
  export declare const DetectMovementOrAnimationEnd: Command.CommandDefinitionWithArgs<"DetectMovementOrAnimationEnd", {
206
- id: S.String;
206
+ id: Schema.String;
207
207
  }, Effect.Effect<{
208
208
  readonly _tag: "GotAnimationMessage";
209
209
  readonly message: {
@@ -311,19 +311,19 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
311
311
  * Exposed so Scene tests can call
312
312
  * `Scene.Mount.resolve(AnchorListbox, CompletedAnchorListbox())`. */
313
313
  export declare const AnchorListbox: Mount.MountDefinitionWithArgs<"AnchorListbox", {
314
- buttonId: S.String;
315
- anchor: S.Struct<{
316
- readonly placement: S.optional<S.Literals<readonly ["top", "right", "bottom", "left", "top-start", "top-end", "right-start", "right-end", "bottom-start", "bottom-end", "left-start", "left-end"]>>;
317
- readonly gap: S.optional<S.Number>;
318
- readonly offset: S.optional<S.Number>;
319
- readonly padding: S.optional<S.Union<readonly [S.Number, S.Struct<{
320
- readonly top: S.optionalKey<S.Number>;
321
- readonly right: S.optionalKey<S.Number>;
322
- readonly bottom: S.optionalKey<S.Number>;
323
- readonly left: S.optionalKey<S.Number>;
314
+ buttonId: Schema.String;
315
+ anchor: Schema.Struct<{
316
+ readonly placement: Schema.optional<Schema.Literals<readonly ["top", "right", "bottom", "left", "top-start", "top-end", "right-start", "right-end", "bottom-start", "bottom-end", "left-start", "left-end"]>>;
317
+ readonly gap: Schema.optional<Schema.Number>;
318
+ readonly offset: Schema.optional<Schema.Number>;
319
+ readonly padding: Schema.optional<Schema.Union<readonly [Schema.Number, Schema.Struct<{
320
+ readonly top: Schema.optionalKey<Schema.Number>;
321
+ readonly right: Schema.optionalKey<Schema.Number>;
322
+ readonly bottom: Schema.optionalKey<Schema.Number>;
323
+ readonly left: Schema.optionalKey<Schema.Number>;
324
324
  }>]>>;
325
- readonly portal: S.optional<S.Boolean>;
326
- readonly isPlacementLocked: S.optional<S.Boolean>;
325
+ readonly portal: Schema.optional<Schema.Boolean>;
326
+ readonly isPlacementLocked: Schema.optional<Schema.Boolean>;
327
327
  }>;
328
328
  }, {
329
329
  readonly _tag: "CompletedAnchorListbox";
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/listbox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAIN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAc,MAAM,kBAAkB,CAAA;AACxE,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,OAAO,EACL,YAAY,EAGb,MAAM,oBAAoB,CAAA;AAmB3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAIhC,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,8CAAsC,CAAA;AACpE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,yFAAyF;AACzF,eAAO,MAAM,WAAW,iDAAyC,CAAA;AACjE,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,mKAAmK;AACnK,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EAepB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,QAAQ,C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