@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,5 +1,5 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Array, Effect, Match as M, Option, Predicate, Schema as S, pipe, } from 'effect';
2
+ import { Array, Effect, Match, Option, Predicate, Schema, pipe } from 'effect';
3
3
  import * as Command from 'foldkit/command';
4
4
  import * as Dom from 'foldkit/dom';
5
5
  import { defineMessageUnion } from 'foldkit/message';
@@ -20,21 +20,21 @@ import { findFirstEnabledIndex, keyToIndex } from '../keyboard.js';
20
20
  export { groupContiguous };
21
21
  // MODEL
22
22
  /** Schema for the activation trigger: whether the user interacted via mouse or keyboard. */
23
- export const ActivationTrigger = S.Literals(['Pointer', 'Keyboard']);
24
- /** Schema fields shared by all combobox variants (single-select and multi-select). Spread into each variant's `S.Struct` to avoid duplicating field definitions. */
25
- export const BaseModel = S.Struct({
26
- id: S.String,
27
- isOpen: S.Boolean,
28
- isAnimated: S.Boolean,
29
- isModal: S.Boolean,
30
- nullable: S.Boolean,
31
- immediate: S.Boolean,
32
- selectInputOnFocus: S.Boolean,
23
+ export const ActivationTrigger = Schema.Literals(['Pointer', 'Keyboard']);
24
+ /** Schema fields shared by all combobox variants (single-select and multi-select). Spread into each variant's `Schema.Struct` to avoid duplicating field definitions. */
25
+ export const BaseModel = Schema.Struct({
26
+ id: Schema.String,
27
+ isOpen: Schema.Boolean,
28
+ isAnimated: Schema.Boolean,
29
+ isModal: Schema.Boolean,
30
+ nullable: Schema.Boolean,
31
+ immediate: Schema.Boolean,
32
+ selectInputOnFocus: Schema.Boolean,
33
33
  animation: AnimationModel,
34
- maybeActiveItemIndex: S.Option(S.Number),
34
+ maybeActiveItemIndex: Schema.Option(Schema.Number),
35
35
  activationTrigger: ActivationTrigger,
36
- inputValue: S.String,
37
- maybeLastPointerPosition: S.Option(S.Struct({ screenX: S.Number, screenY: S.Number })),
36
+ inputValue: Schema.String,
37
+ maybeLastPointerPosition: Schema.Option(Schema.Struct({ screenX: Schema.Number, screenY: Schema.Number })),
38
38
  });
39
39
  /** Creates the shared base fields for a combobox model from a config. Each variant spreads this and adds its selection fields. */
40
40
  export const baseInit = (config) => (__foldkitBrandViewResult(({
@@ -54,32 +54,32 @@ export const baseInit = (config) => (__foldkitBrandViewResult(({
54
54
  // MESSAGE
55
55
  /** Union of all messages the combobox component can produce. */
56
56
  export const Message = defineMessageUnion({
57
- Opened: { maybeActiveItemIndex: S.Option(S.Number) },
57
+ Opened: { maybeActiveItemIndex: Schema.Option(Schema.Number) },
58
58
  Closed: {
59
- restingInputValue: S.String,
60
- isClearable: S.Boolean,
59
+ restingInputValue: Schema.String,
60
+ isClearable: Schema.Boolean,
61
61
  },
62
62
  BlurredInput: {
63
- restingInputValue: S.String,
64
- isClearable: S.Boolean,
63
+ restingInputValue: Schema.String,
64
+ isClearable: Schema.Boolean,
65
65
  },
66
66
  ActivatedItem: {
67
- index: S.Number,
67
+ index: Schema.Number,
68
68
  activationTrigger: ActivationTrigger,
69
- maybeImmediateSelection: S.Option(S.Struct({ item: S.String })),
69
+ maybeImmediateSelection: Schema.Option(Schema.Struct({ item: Schema.String })),
70
70
  },
71
71
  DeactivatedItem: {},
72
72
  SelectedItem: {
73
- item: S.String,
74
- displayText: S.String,
75
- wasSelected: S.Boolean,
73
+ item: Schema.String,
74
+ displayText: Schema.String,
75
+ wasSelected: Schema.Boolean,
76
76
  },
77
77
  MovedPointerOverItem: {
78
- index: S.Number,
79
- screenX: S.Number,
80
- screenY: S.Number,
78
+ index: Schema.Number,
79
+ screenX: Schema.Number,
80
+ screenY: Schema.Number,
81
81
  },
82
- RequestedItemClick: { index: S.Number },
82
+ RequestedItemClick: { index: Schema.Number },
83
83
  SuppressedItemCommit: {},
84
84
  CompletedLockScroll: {},
85
85
  CompletedUnlockScroll: {},
@@ -93,15 +93,15 @@ export const Message = defineMessageUnion({
93
93
  CompletedAttachComboboxSelectOnFocus: {},
94
94
  CompletedPortalComboboxBackdrop: {},
95
95
  GotAnimationMessage: { message: AnimationMessage },
96
- UpdatedInputValue: { value: S.String },
96
+ UpdatedInputValue: { value: Schema.String },
97
97
  PressedToggleButton: {
98
- restingInputValue: S.String,
99
- isClearable: S.Boolean,
98
+ restingInputValue: Schema.String,
99
+ isClearable: Schema.Boolean,
100
100
  },
101
101
  });
102
102
  /** Union of out-messages the combobox component can produce. The parent folds `Selected` into the selection it owns and clears that selection on `ClearedSelection`. */
103
103
  export const OutMessage = defineMessageUnion({
104
- Selected: { value: S.String },
104
+ Selected: { value: Schema.String },
105
105
  ClearedSelection: {},
106
106
  });
107
107
  // SELECTORS
@@ -137,37 +137,37 @@ export const UnlockScroll = Command.define('UnlockScroll', {
137
137
  });
138
138
  /** Marks all elements outside the combobox as inert for modal behavior. */
139
139
  export const InertOthers = Command.define('InertOthers', {
140
- args: { id: S.String },
140
+ args: { id: Schema.String },
141
141
  messages: [Message.CompletedInertOthers],
142
142
  execute: ({ id }) => __foldkitBrandViewResult((Dom.inertOthers(id, [inputWrapperSelector(id), itemsSelector(id)]).pipe(Effect.as(Message.CompletedInertOthers()))), "@foldkit/ui/combobox/shared.js#execute"),
143
143
  });
144
144
  /** Removes the inert attribute from elements outside the combobox. */
145
145
  export const RestoreInert = Command.define('RestoreInert', {
146
- args: { id: S.String },
146
+ args: { id: Schema.String },
147
147
  messages: [Message.CompletedRestoreInert],
148
148
  execute: ({ id }) => __foldkitBrandViewResult((Dom.restoreInert(id).pipe(Effect.as(Message.CompletedRestoreInert()))), "@foldkit/ui/combobox/shared.js#execute~2"),
149
149
  });
150
150
  /** Moves focus to the combobox input after selection or close. */
151
151
  export const FocusInput = Command.define('FocusInput', {
152
- args: { id: S.String },
152
+ args: { id: Schema.String },
153
153
  messages: [Message.CompletedFocusInput],
154
154
  execute: ({ id }) => __foldkitBrandViewResult((Dom.focus(inputSelector(id)).pipe(Effect.ignore, Effect.as(Message.CompletedFocusInput()))), "@foldkit/ui/combobox/shared.js#execute~3"),
155
155
  });
156
156
  /** Scrolls the active combobox item into view after keyboard navigation. */
157
157
  export const ScrollIntoView = Command.define('ScrollIntoView', {
158
- args: { id: S.String, index: S.Number },
158
+ args: { id: Schema.String, index: Schema.Number },
159
159
  messages: [Message.CompletedScrollIntoView],
160
160
  execute: ({ id, index }) => __foldkitBrandViewResult((Dom.scrollIntoView(itemSelector(id, index)).pipe(Effect.ignore, Effect.as(Message.CompletedScrollIntoView()))), "@foldkit/ui/combobox/shared.js#execute~4"),
161
161
  });
162
162
  /** Programmatically clicks the active combobox item's DOM element. */
163
163
  export const ClickItem = Command.define('ClickItem', {
164
- args: { id: S.String, index: S.Number },
164
+ args: { id: Schema.String, index: Schema.Number },
165
165
  messages: [Message.CompletedClickItem],
166
166
  execute: ({ id, index }) => __foldkitBrandViewResult((Dom.clickElement(itemSelector(id, index)).pipe(Effect.ignore, Effect.as(Message.CompletedClickItem()))), "@foldkit/ui/combobox/shared.js#execute~5"),
167
167
  });
168
168
  /** Detects whether the combobox input wrapper moved or the leave animation ended. Whichever comes first; both outcomes signal the Animation submodel that leave is complete. */
169
169
  export const DetectMovementOrAnimationEnd = Command.define('DetectMovementOrAnimationEnd', {
170
- args: { id: S.String },
170
+ args: { id: Schema.String },
171
171
  messages: [Message.GotAnimationMessage],
172
172
  execute: ({ id }) => __foldkitBrandViewResult((Effect.raceFirst(Dom.detectElementMovement(inputWrapperSelector(id)).pipe(Effect.as(Message.GotAnimationMessage({
173
173
  message: AnimationMessage.EndedAnimation(),
@@ -177,7 +177,7 @@ export const DetectMovementOrAnimationEnd = Command.define('DetectMovementOrAnim
177
177
  });
178
178
  /** Creates a combobox update function from variant-specific handlers. Shared logic (open, close, activate, transition) is handled internally; only close, selection, and immediate-activation behavior varies by variant. */
179
179
  export const makeUpdate = (handlers) => {
180
- const foldAnimationOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
180
+ const foldAnimationOutMessage = Match.type().pipe(Match.withReturnType(), Match.tagsExhaustive({
181
181
  StartedLeaveAnimating: () => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
182
182
  model,
183
183
  commands: [DetectMovementOrAnimationEnd({ id: model.id })],
@@ -369,7 +369,7 @@ export const makeUpdate = (handlers) => {
369
369
  * Scene tests can call
370
370
  * `Scene.Mount.resolve(AnchorCombobox, CompletedAnchorCombobox())`. */
371
371
  export const AnchorCombobox = Mount.define('AnchorCombobox', {
372
- args: { buttonId: S.String, anchor: AnchorConfig },
372
+ args: { buttonId: Schema.String, anchor: AnchorConfig },
373
373
  messages: [Message.CompletedAnchorCombobox],
374
374
  execute: ({ element, buttonId, anchor }) => __foldkitBrandViewResult((Effect.gen(function* () {
375
375
  yield* Effect.acquireRelease(Effect.sync(() => {
@@ -461,21 +461,21 @@ export const makeView = (behavior) => {
461
461
  const isValueSelected = (itemValue) => __foldkitBrandViewResult((Array.contains(selectedValues, itemValue)), "@foldkit/ui/combobox/shared.js#isValueSelected");
462
462
  const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
463
463
  const isVisible = isOpen || isLeaving;
464
- const animationAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => __foldkitBrandViewResult(([
464
+ const animationAttributes = Match.value(transitionState).pipe(Match.when('EnterStart', () => __foldkitBrandViewResult(([
465
465
  h.DataAttribute('closed', ''),
466
466
  h.DataAttribute('enter', ''),
467
467
  h.DataAttribute('transition', ''),
468
- ]), "@foldkit/ui/combobox/shared.js#anonymous~25")), M.when('EnterAnimating', () => __foldkitBrandViewResult(([
468
+ ]), "@foldkit/ui/combobox/shared.js#anonymous~25")), Match.when('EnterAnimating', () => __foldkitBrandViewResult(([
469
469
  h.DataAttribute('enter', ''),
470
470
  h.DataAttribute('transition', ''),
471
- ]), "@foldkit/ui/combobox/shared.js#anonymous~26")), M.when('LeaveStart', () => __foldkitBrandViewResult(([
471
+ ]), "@foldkit/ui/combobox/shared.js#anonymous~26")), Match.when('LeaveStart', () => __foldkitBrandViewResult(([
472
472
  h.DataAttribute('leave', ''),
473
473
  h.DataAttribute('transition', ''),
474
- ]), "@foldkit/ui/combobox/shared.js#anonymous~27")), M.when('LeaveAnimating', () => __foldkitBrandViewResult(([
474
+ ]), "@foldkit/ui/combobox/shared.js#anonymous~27")), Match.when('LeaveAnimating', () => __foldkitBrandViewResult(([
475
475
  h.DataAttribute('closed', ''),
476
476
  h.DataAttribute('leave', ''),
477
477
  h.DataAttribute('transition', ''),
478
- ]), "@foldkit/ui/combobox/shared.js#anonymous~28")), M.orElse(() => __foldkitBrandViewResult(([]), "@foldkit/ui/combobox/shared.js#anonymous~29")));
478
+ ]), "@foldkit/ui/combobox/shared.js#anonymous~28")), Match.orElse(() => __foldkitBrandViewResult(([]), "@foldkit/ui/combobox/shared.js#anonymous~29")));
479
479
  const isDisabledAtIndex = (index) => __foldkitBrandViewResult((Predicate.isNotUndefined(isItemDisabled) &&
480
480
  pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/combobox/shared.js#anonymous~30")))), "@foldkit/ui/combobox/shared.js#isDisabledAtIndex");
481
481
  const firstEnabledIndex = findFirstEnabledIndex(items.length, 0, isDisabledAtIndex)(0, 1);
@@ -499,7 +499,7 @@ export const makeView = (behavior) => {
499
499
  return __foldkitBrandViewResult((Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((Message.RequestedItemClick({ index })), "@foldkit/ui/combobox/shared.js#anonymous~34"))), "@foldkit/ui/combobox/shared.js#resolveCommitMessage");
500
500
  }
501
501
  };
502
- const handleInputKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('ArrowDown', () => {
502
+ const handleInputKeyDown = (key) => __foldkitBrandViewResult((Match.value(key).pipe(Match.when('ArrowDown', () => {
503
503
  if (!isOpen) {
504
504
  return __foldkitBrandViewResult((Option.some(Message.Opened({
505
505
  maybeActiveItemIndex: Option.some(firstEnabledIndex),
@@ -511,7 +511,7 @@ export const makeView = (behavior) => {
511
511
  activationTrigger: 'Keyboard',
512
512
  maybeImmediateSelection: resolveImmediateSelection(targetIndex),
513
513
  }))), "@foldkit/ui/combobox/shared.js#anonymous~35");
514
- }), M.when('ArrowUp', () => {
514
+ }), Match.when('ArrowUp', () => {
515
515
  if (!isOpen) {
516
516
  return __foldkitBrandViewResult((Option.some(Message.Opened({
517
517
  maybeActiveItemIndex: Option.some(lastEnabledIndex),
@@ -523,17 +523,17 @@ export const makeView = (behavior) => {
523
523
  activationTrigger: 'Keyboard',
524
524
  maybeImmediateSelection: resolveImmediateSelection(targetIndex),
525
525
  }))), "@foldkit/ui/combobox/shared.js#anonymous~36");
526
- }), M.when('Enter', () => {
526
+ }), Match.when('Enter', () => {
527
527
  if (!isOpen) {
528
528
  return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#anonymous~37");
529
529
  }
530
530
  return __foldkitBrandViewResult((resolveCommitMessage()), "@foldkit/ui/combobox/shared.js#anonymous~37");
531
- }), M.when('Escape', () => {
531
+ }), Match.when('Escape', () => {
532
532
  if (!isOpen) {
533
533
  return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#anonymous~38");
534
534
  }
535
535
  return __foldkitBrandViewResult((Option.some(Message.Closed({ restingInputValue, isClearable: !isReadOnly }))), "@foldkit/ui/combobox/shared.js#anonymous~38");
536
- }), M.whenOr('Home', 'End', () => {
536
+ }), Match.whenOr('Home', 'End', () => {
537
537
  if (!isOpen) {
538
538
  return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#anonymous~39");
539
539
  }
@@ -543,7 +543,7 @@ export const makeView = (behavior) => {
543
543
  activationTrigger: 'Keyboard',
544
544
  maybeImmediateSelection: resolveImmediateSelection(targetIndex),
545
545
  }))), "@foldkit/ui/combobox/shared.js#anonymous~39");
546
- }), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#anonymous~40")))), "@foldkit/ui/combobox/shared.js#handleInputKeyDown");
546
+ }), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#anonymous~40")))), "@foldkit/ui/combobox/shared.js#handleInputKeyDown");
547
547
  const maybeActiveDescendant = Option.match(maybeActiveItemIndex, {
548
548
  onNone: () => __foldkitBrandViewResult(([]), "@foldkit/ui/combobox/shared.js#onNone~3"),
549
549
  onSome: index => __foldkitBrandViewResult(([h.AriaActiveDescendant(itemId(id, index))]), "@foldkit/ui/combobox/shared.js#onSome~3"),
@@ -1,27 +1,27 @@
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 BaseViewInputsCommon, Message, OutMessage } from './shared.js';
5
5
  /** Schema for the single-select combobox's private interaction state (open/closed status, active item, activation trigger, typed input value). The selection is owned by the parent and passed in via `ViewInputs.maybeSelectedValue`. */
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 nullable: S.Boolean;
12
- readonly immediate: S.Boolean;
13
- readonly selectInputOnFocus: S.Boolean;
14
- readonly animation: S.Struct<{
15
- readonly id: S.String;
16
- readonly isShowing: S.Boolean;
17
- 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 nullable: Schema.Boolean;
12
+ readonly immediate: Schema.Boolean;
13
+ readonly selectInputOnFocus: Schema.Boolean;
14
+ readonly animation: Schema.Struct<{
15
+ readonly id: Schema.String;
16
+ readonly isShowing: Schema.Boolean;
17
+ readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
18
18
  }>;
19
- readonly maybeActiveItemIndex: S.Option<S.Number>;
20
- readonly activationTrigger: S.Literals<readonly ["Pointer", "Keyboard"]>;
21
- readonly inputValue: S.String;
22
- readonly maybeLastPointerPosition: S.Option<S.Struct<{
23
- readonly screenX: S.Number;
24
- readonly screenY: S.Number;
19
+ readonly maybeActiveItemIndex: Schema.Option<Schema.Number>;
20
+ readonly activationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
21
+ readonly inputValue: Schema.String;
22
+ readonly maybeLastPointerPosition: Schema.Option<Schema.Struct<{
23
+ readonly screenX: Schema.Number;
24
+ readonly screenY: Schema.Number;
25
25
  }>>;
26
26
  }>;
27
27
  export type Model = typeof Model.Type;
@@ -1 +1 @@
1
- {"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../src/combobox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAc,MAAM,kBAAkB,CAAA;AAExE,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EACzB,OAAO,EACP,UAAU,EAKX,MAAM,aA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,IAAI,EACV,WAAW,EAAE,MAAM,KAChB,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAC7B,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAChD,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,kBAAkB,CAAC,IAAI,CAAC,CAAA;CAC7E,CAAC,CAAA;AAEF;;;;;wDAKwD;AACxD,eAAO,MAAM,MAAM,GAAI,IAAI,SAAS,MAAM,GAAG,MAAM,OAAK,MAAM,CAAC,IAAI,CAuClE,CAAA"}
@@ -1,11 +1,11 @@
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 { evo } from 'foldkit/struct';
4
4
  import { defineView } from 'foldkit/submodel';
5
5
  import { BaseModel, Message, OutMessage, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared.js';
6
6
  // MODEL
7
7
  /** Schema for the single-select combobox's private interaction state (open/closed status, active item, activation trigger, typed input value). The selection is owned by the parent and passed in via `ViewInputs.maybeSelectedValue`. */
8
- export const Model = S.Struct({
8
+ export const Model = Schema.Struct({
9
9
  ...BaseModel.fields,
10
10
  });
11
11
  /** Creates an initial single-select combobox model from a config. Defaults to closed with no active item and an empty input. */
@@ -1,4 +1,4 @@
1
- import { Option, Schema as S } from 'effect';
1
+ import { Option, Schema } from 'effect';
2
2
  import * as Calendar from 'foldkit/calendar';
3
3
  import type { CalendarDate } from 'foldkit/calendar';
4
4
  import type { ChildAttribute, Html } from 'foldkit/html';
@@ -11,60 +11,60 @@ import * as UiCalendar from '../calendar/index.js';
11
11
  * `ViewInputs.maybeSelectedDate`. This holds the embedded Calendar submodel
12
12
  * (the visible grid) and the embedded Popover submodel (the open/close +
13
13
  * transition layer). */
14
- export declare const Model: S.Struct<{
15
- readonly id: S.String;
16
- readonly calendar: S.Struct<{
17
- readonly id: S.String;
18
- readonly today: S.Struct<{
19
- readonly year: S.Int;
20
- readonly month: S.Int;
21
- readonly day: S.Int;
14
+ export declare const Model: Schema.Struct<{
15
+ readonly id: Schema.String;
16
+ readonly calendar: Schema.Struct<{
17
+ readonly id: Schema.String;
18
+ readonly today: Schema.Struct<{
19
+ readonly year: Schema.Int;
20
+ readonly month: Schema.Int;
21
+ readonly day: Schema.Int;
22
22
  }>;
23
- readonly viewYear: S.Int;
24
- readonly viewMonth: S.Int;
25
- readonly viewMode: S.Literals<readonly ["Days", "Months", "Years"]>;
26
- readonly maybeFocusedDate: S.Option<S.Struct<{
27
- readonly year: S.Int;
28
- readonly month: S.Int;
29
- readonly day: S.Int;
23
+ readonly viewYear: Schema.Int;
24
+ readonly viewMonth: Schema.Int;
25
+ readonly viewMode: Schema.Literals<readonly ["Days", "Months", "Years"]>;
26
+ readonly maybeFocusedDate: Schema.Option<Schema.Struct<{
27
+ readonly year: Schema.Int;
28
+ readonly month: Schema.Int;
29
+ readonly day: Schema.Int;
30
30
  }>>;
31
- readonly isGridFocused: S.Boolean;
32
- readonly locale: S.Struct<{
33
- readonly firstDayOfWeek: S.Literals<readonly ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]>;
34
- readonly monthNames: S.Tuple<readonly [S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String]>;
35
- readonly shortMonthNames: S.Tuple<readonly [S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String, S.String]>;
36
- readonly dayNames: S.Tuple<readonly [S.String, S.String, S.String, S.String, S.String, S.String, S.String]>;
37
- readonly shortDayNames: S.Tuple<readonly [S.String, S.String, S.String, S.String, S.String, S.String, S.String]>;
31
+ readonly isGridFocused: Schema.Boolean;
32
+ readonly locale: Schema.Struct<{
33
+ readonly firstDayOfWeek: Schema.Literals<readonly ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]>;
34
+ readonly monthNames: Schema.Tuple<readonly [Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String]>;
35
+ readonly shortMonthNames: Schema.Tuple<readonly [Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String]>;
36
+ readonly dayNames: Schema.Tuple<readonly [Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String]>;
37
+ readonly shortDayNames: Schema.Tuple<readonly [Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String]>;
38
38
  }>;
39
- readonly maybeMinDate: S.Option<S.Struct<{
40
- readonly year: S.Int;
41
- readonly month: S.Int;
42
- readonly day: S.Int;
39
+ readonly maybeMinDate: Schema.Option<Schema.Struct<{
40
+ readonly year: Schema.Int;
41
+ readonly month: Schema.Int;
42
+ readonly day: Schema.Int;
43
43
  }>>;
44
- readonly maybeMaxDate: S.Option<S.Struct<{
45
- readonly year: S.Int;
46
- readonly month: S.Int;
47
- readonly day: S.Int;
44
+ readonly maybeMaxDate: Schema.Option<Schema.Struct<{
45
+ readonly year: Schema.Int;
46
+ readonly month: Schema.Int;
47
+ readonly day: Schema.Int;
48
48
  }>>;
49
- readonly disabledDaysOfWeek: S.$Array<S.Literals<readonly ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]>>;
50
- readonly disabledDates: S.$Array<S.Struct<{
51
- readonly year: S.Int;
52
- readonly month: S.Int;
53
- readonly day: S.Int;
49
+ readonly disabledDaysOfWeek: Schema.$Array<Schema.Literals<readonly ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]>>;
50
+ readonly disabledDates: Schema.$Array<Schema.Struct<{
51
+ readonly year: Schema.Int;
52
+ readonly month: Schema.Int;
53
+ readonly day: Schema.Int;
54
54
  }>>;
55
55
  }>;
56
- readonly popover: S.Struct<{
57
- readonly id: S.String;
58
- readonly isOpen: S.Boolean;
59
- readonly isAnimated: S.Boolean;
60
- readonly isModal: S.Boolean;
61
- readonly contentFocus: S.Boolean;
62
- readonly animation: S.Struct<{
63
- readonly id: S.String;
64
- readonly isShowing: S.Boolean;
65
- readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
56
+ readonly popover: Schema.Struct<{
57
+ readonly id: Schema.String;
58
+ readonly isOpen: Schema.Boolean;
59
+ readonly isAnimated: Schema.Boolean;
60
+ readonly isModal: Schema.Boolean;
61
+ readonly contentFocus: Schema.Boolean;
62
+ readonly animation: Schema.Struct<{
63
+ readonly id: Schema.String;
64
+ readonly isShowing: Schema.Boolean;
65
+ readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
66
66
  }>;
67
- readonly maybeLastButtonPointerType: S.Option<S.String>;
67
+ readonly maybeLastButtonPointerType: Schema.Option<Schema.String>;
68
68
  }>;
69
69
  }>;
70
70
  export type Model = typeof Model.Type;
@@ -73,35 +73,35 @@ export declare const Message: import("foldkit/message").MessageUnion<{
73
73
  readonly GotCalendarMessage: {
74
74
  message: import("foldkit/message").MessageUnion<{
75
75
  readonly ClickedDay: {
76
- date: S.Struct<{
77
- readonly year: S.Int;
78
- readonly month: S.Int;
79
- readonly day: S.Int;
76
+ date: Schema.Struct<{
77
+ readonly year: Schema.Int;
78
+ readonly month: Schema.Int;
79
+ readonly day: Schema.Int;
80
80
  }>;
81
81
  };
82
82
  readonly PressedKeyOnGrid: {
83
- key: S.String;
84
- isShift: S.Boolean;
83
+ key: Schema.String;
84
+ isShift: Schema.Boolean;
85
85
  };
86
86
  readonly ClickedPreviousMonthButton: {};
87
87
  readonly ClickedNextMonthButton: {};
88
88
  readonly ClickedHeading: {};
89
89
  readonly SelectedMonth: {
90
- month: S.Int;
90
+ month: Schema.Int;
91
91
  };
92
92
  readonly SelectedYear: {
93
- year: S.Int;
93
+ year: Schema.Int;
94
94
  };
95
95
  readonly PagedYears: {
96
- direction: S.Literals<readonly [1, -1]>;
96
+ direction: Schema.Literals<readonly [1, -1]>;
97
97
  };
98
98
  readonly FocusedGrid: {};
99
99
  readonly BlurredGrid: {};
100
100
  readonly RefreshedToday: {
101
- today: S.Struct<{
102
- readonly year: S.Int;
103
- readonly month: S.Int;
104
- readonly day: S.Int;
101
+ today: Schema.Struct<{
102
+ readonly year: Schema.Int;
103
+ readonly month: Schema.Int;
104
+ readonly day: Schema.Int;
105
105
  }>;
106
106
  };
107
107
  readonly CompletedFocusGrid: {};
@@ -113,8 +113,8 @@ export declare const Message: import("foldkit/message").MessageUnion<{
113
113
  readonly RequestedClose: {};
114
114
  readonly BlurredPanel: {};
115
115
  readonly PressedPointerOnButton: {
116
- pointerType: S.String;
117
- button: S.Number;
116
+ pointerType: Schema.String;
117
+ button: Schema.Number;
118
118
  };
119
119
  readonly CompletedFocusPanel: {};
120
120
  readonly CompletedFocusButton: {};
@@ -137,10 +137,10 @@ export declare const Message: import("foldkit/message").MessageUnion<{
137
137
  }>;
138
138
  };
139
139
  readonly RequestedSelectDate: {
140
- date: S.Struct<{
141
- readonly year: S.Int;
142
- readonly month: S.Int;
143
- readonly day: S.Int;
140
+ date: Schema.Struct<{
141
+ readonly year: Schema.Int;
142
+ readonly month: Schema.Int;
143
+ readonly day: Schema.Int;
144
144
  }>;
145
145
  };
146
146
  readonly Cleared: {};
@@ -151,14 +151,14 @@ export type Message = typeof Message.Type;
151
151
  /** Union of out-messages the date picker can produce. */
152
152
  export declare const OutMessage: import("foldkit/message").MessageUnion<{
153
153
  readonly ChangedViewMonth: {
154
- year: S.Int;
155
- month: S.Int;
154
+ year: Schema.Int;
155
+ month: Schema.Int;
156
156
  };
157
157
  readonly SelectedDate: {
158
- date: S.Struct<{
159
- readonly year: S.Int;
160
- readonly month: S.Int;
161
- readonly day: S.Int;
158
+ date: Schema.Struct<{
159
+ readonly year: Schema.Int;
160
+ readonly month: Schema.Int;
161
+ readonly day: Schema.Int;
162
162
  }>;
163
163
  };
164
164
  readonly ClearedDate: {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,EAAa,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC7E,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGxD,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAA;AAMlD;;;;wBAIwB;AACxB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIhB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,mEAAmE;AACnE,eAAO,MAAM,OAAO;;QACI,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QACR,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QACL,IAAI;;;;;;;;;EAI3B,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIzC,yDAAyD;AACzD,eAAO,MAAM,UAAU;;QAEnB,IAAI;QACJ,KAAK;;;QAES,IAAI;;;;;;;EAEpB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAE/C,MAAM,MAAM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ACzB,iBAAiB,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;CACnD,CAAC,CAAA;AAEF;;;;gEAIgE;AAChE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAlCP,YAAY;IACpB;;yBAEqB;uBACF,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAC9C;iEAC6D;oBAC7C,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI;IAChE;;6BAEyB;oBACT,CAAC,UAAU,EAAE,UAAU,CAAC,kBAAkB,KAAK,IAAI;iBACtD,OAAO;IACpB;;wDAEoD;WAC7C,MAAM;gBACD,MAAM;iBACL,aAAa,CAAC,cAAc,CAAC;uBACvB,MAAM;wBACL,aAAa,CAAC,cAAc,CAAC;gBACrC,MAAM;qBACD,MAAM;qBACN,MAAM;sBACL,aAAa,CAAC,cAAc,CAAC;wBAC3B,MAAM;yBACL,aAAa,CAAC,cAAc,CAAC;GAoHnD,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Function, Match as M, Option, Predicate, Schema as S } from 'effect';
2
+ import { Function, Match, Option, Predicate, Schema } from 'effect';
3
3
  import * as Calendar from 'foldkit/calendar';
4
4
  import { defineMessageUnion } from 'foldkit/message';
5
5
  import { evo } from 'foldkit/struct';
@@ -14,8 +14,8 @@ import * as Popover from '../popover/index.js';
14
14
  * `ViewInputs.maybeSelectedDate`. This holds the embedded Calendar submodel
15
15
  * (the visible grid) and the embedded Popover submodel (the open/close +
16
16
  * transition layer). */
17
- export const Model = S.Struct({
18
- id: S.String,
17
+ export const Model = Schema.Struct({
18
+ id: Schema.String,
19
19
  calendar: UiCalendar.Model,
20
20
  popover: Popover.Model,
21
21
  });
@@ -33,8 +33,8 @@ export const Message = defineMessageUnion({
33
33
  /** Union of out-messages the date picker can produce. */
34
34
  export const OutMessage = defineMessageUnion({
35
35
  ChangedViewMonth: {
36
- year: S.Int,
37
- month: S.Int,
36
+ year: Schema.Int,
37
+ month: Schema.Int,
38
38
  },
39
39
  SelectedDate: { date: Calendar.CalendarDate },
40
40
  ClearedDate: {},
@@ -75,7 +75,7 @@ const dropCalendarToDays = model => (__foldkitBrandViewResult(({
75
75
  const readPopover = (model) => __foldkitBrandViewResult((Option.some(model.popover)), "@foldkit/ui/datePicker/index.js#readPopover");
76
76
  const writePopover = (model, nextPopover) => __foldkitBrandViewResult((evo(model, { popover: () => __foldkitBrandViewResult((nextPopover), "@foldkit/ui/datePicker/index.js#popover") })), "@foldkit/ui/datePicker/index.js#writePopover");
77
77
  const toGotPopoverMessage = (message) => __foldkitBrandViewResult((Message.GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#toGotPopoverMessage");
78
- const foldPopoverOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
78
+ const foldPopoverOutMessage = Match.type().pipe(Match.withReturnType(), Match.tagsExhaustive({
79
79
  Opened: () => __foldkitBrandViewResult((dropCalendarToDays), "@foldkit/ui/datePicker/index.js#Opened"),
80
80
  Closed: () => __foldkitBrandViewResult((dropCalendarToDays), "@foldkit/ui/datePicker/index.js#Closed"),
81
81
  }));
@@ -100,11 +100,11 @@ const foldPopoverClose = Update.foldChildStep({
100
100
  toParentMessage: toGotPopoverMessage,
101
101
  foldOutMessage: foldPopoverOutMessage,
102
102
  });
103
- const foldCalendarOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
103
+ const foldCalendarOutMessage = Match.type().pipe(Match.withReturnType(), Match.tagsExhaustive({
104
104
  ChangedViewMonth: () => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/datePicker/index.js#anonymous"))), "@foldkit/ui/datePicker/index.js#ChangedViewMonth"),
105
105
  SelectedDate: () => __foldkitBrandViewResult((foldPopoverClose), "@foldkit/ui/datePicker/index.js#SelectedDate"),
106
106
  }));
107
- const toDatePickerOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
107
+ const toDatePickerOutMessage = Match.type().pipe(Match.withReturnType(), Match.tagsExhaustive({
108
108
  ChangedViewMonth: ({ year, month }) => __foldkitBrandViewResult((OutMessage.ChangedViewMonth({ year, month })), "@foldkit/ui/datePicker/index.js#ChangedViewMonth~2"),
109
109
  SelectedDate: ({ date }) => __foldkitBrandViewResult((OutMessage.SelectedDate({ date })), "@foldkit/ui/datePicker/index.js#SelectedDate~2"),
110
110
  }));
@@ -188,7 +188,7 @@ export const reflectDisabledDaysOfWeek = Function.dual(2, (model, disabledDaysOf
188
188
  * or an `aria-labelledby` reference. */
189
189
  export const triggerId = (id) => __foldkitBrandViewResult((`${id}-popover-button`), "@foldkit/ui/datePicker/index.js#triggerId");
190
190
  // VIEW
191
- const encodeIsoDate = S.encodeSync(Calendar.CalendarDateFromIsoString);
191
+ const encodeIsoDate = Schema.encodeSync(Calendar.CalendarDateFromIsoString);
192
192
  /** Renders an accessible date picker: a trigger button that opens a popover
193
193
  * containing an accessible calendar grid. The date picker assembles the
194
194
  * embedded Calendar and Popover components into one flat API. Consumers