foldkit 0.25.0 → 0.27.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 (89) hide show
  1. package/README.md +70 -55
  2. package/dist/fieldValidation/index.d.ts +39 -29
  3. package/dist/fieldValidation/index.d.ts.map +1 -1
  4. package/dist/fieldValidation/index.js +23 -24
  5. package/dist/fieldValidation/public.d.ts +2 -2
  6. package/dist/fieldValidation/public.d.ts.map +1 -1
  7. package/dist/fieldValidation/public.js +1 -1
  8. package/dist/html/index.d.ts +2 -9
  9. package/dist/html/index.d.ts.map +1 -1
  10. package/dist/html/public.d.ts +1 -1
  11. package/dist/html/public.d.ts.map +1 -1
  12. package/dist/ui/anchor.d.ts +19 -0
  13. package/dist/ui/anchor.d.ts.map +1 -0
  14. package/dist/ui/{menu/anchor.js → anchor.js} +3 -2
  15. package/dist/ui/combobox/multi.d.ts +178 -0
  16. package/dist/ui/combobox/multi.d.ts.map +1 -0
  17. package/dist/ui/combobox/multi.js +53 -0
  18. package/dist/ui/combobox/multiPublic.d.ts +3 -0
  19. package/dist/ui/combobox/multiPublic.d.ts.map +1 -0
  20. package/dist/ui/combobox/multiPublic.js +1 -0
  21. package/dist/ui/combobox/public.d.ts +8 -0
  22. package/dist/ui/combobox/public.d.ts.map +1 -0
  23. package/dist/ui/combobox/public.js +4 -0
  24. package/dist/ui/combobox/shared.d.ts +236 -0
  25. package/dist/ui/combobox/shared.d.ts.map +1 -0
  26. package/dist/ui/combobox/shared.js +560 -0
  27. package/dist/ui/combobox/single.d.ts +183 -0
  28. package/dist/ui/combobox/single.d.ts.map +1 -0
  29. package/dist/ui/combobox/single.js +73 -0
  30. package/dist/ui/dialog/index.d.ts +3 -0
  31. package/dist/ui/dialog/index.d.ts.map +1 -1
  32. package/dist/ui/dialog/index.js +11 -0
  33. package/dist/ui/dialog/public.d.ts +1 -1
  34. package/dist/ui/dialog/public.d.ts.map +1 -1
  35. package/dist/ui/dialog/public.js +1 -1
  36. package/dist/ui/disclosure/index.d.ts +3 -0
  37. package/dist/ui/disclosure/index.d.ts.map +1 -1
  38. package/dist/ui/disclosure/index.js +11 -0
  39. package/dist/ui/disclosure/public.d.ts +1 -1
  40. package/dist/ui/disclosure/public.d.ts.map +1 -1
  41. package/dist/ui/disclosure/public.js +1 -1
  42. package/dist/ui/index.d.ts +3 -0
  43. package/dist/ui/index.d.ts.map +1 -1
  44. package/dist/ui/index.js +3 -0
  45. package/dist/ui/listbox/multi.d.ts +26 -21
  46. package/dist/ui/listbox/multi.d.ts.map +1 -1
  47. package/dist/ui/listbox/multi.js +11 -0
  48. package/dist/ui/listbox/multiPublic.d.ts +1 -1
  49. package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
  50. package/dist/ui/listbox/multiPublic.js +1 -1
  51. package/dist/ui/listbox/public.d.ts +4 -3
  52. package/dist/ui/listbox/public.d.ts.map +1 -1
  53. package/dist/ui/listbox/public.js +3 -2
  54. package/dist/ui/listbox/shared.d.ts +10 -12
  55. package/dist/ui/listbox/shared.d.ts.map +1 -1
  56. package/dist/ui/listbox/shared.js +12 -6
  57. package/dist/ui/listbox/single.d.ts +26 -21
  58. package/dist/ui/listbox/single.d.ts.map +1 -1
  59. package/dist/ui/listbox/single.js +11 -0
  60. package/dist/ui/menu/index.d.ts +5 -4
  61. package/dist/ui/menu/index.d.ts.map +1 -1
  62. package/dist/ui/menu/index.js +23 -6
  63. package/dist/ui/menu/public.d.ts +3 -2
  64. package/dist/ui/menu/public.d.ts.map +1 -1
  65. package/dist/ui/menu/public.js +2 -1
  66. package/dist/ui/popover/index.d.ts +78 -0
  67. package/dist/ui/popover/index.d.ts.map +1 -0
  68. package/dist/ui/popover/index.js +248 -0
  69. package/dist/ui/popover/public.d.ts +5 -0
  70. package/dist/ui/popover/public.d.ts.map +1 -0
  71. package/dist/ui/popover/public.js +2 -0
  72. package/dist/ui/switch/index.d.ts +50 -0
  73. package/dist/ui/switch/index.d.ts.map +1 -0
  74. package/dist/ui/switch/index.js +77 -0
  75. package/dist/ui/switch/public.d.ts +3 -0
  76. package/dist/ui/switch/public.d.ts.map +1 -0
  77. package/dist/ui/switch/public.js +1 -0
  78. package/dist/ui/tabs/index.d.ts +3 -0
  79. package/dist/ui/tabs/index.d.ts.map +1 -1
  80. package/dist/ui/tabs/index.js +11 -0
  81. package/dist/ui/tabs/public.d.ts +1 -1
  82. package/dist/ui/tabs/public.d.ts.map +1 -1
  83. package/dist/ui/tabs/public.js +1 -1
  84. package/dist/ui/transition.d.ts +5 -0
  85. package/dist/ui/transition.d.ts.map +1 -0
  86. package/dist/ui/transition.js +3 -0
  87. package/package.json +14 -2
  88. package/dist/ui/menu/anchor.d.ts +0 -18
  89. package/dist/ui/menu/anchor.d.ts.map +0 -1
@@ -10,7 +10,7 @@ const getOrCreatePortalRoot = () => {
10
10
  return document.body.appendChild(root);
11
11
  };
12
12
  const anchorCleanups = new WeakMap();
13
- /** Returns insert/destroy hook callbacks that position the menu items container relative to its button using Floating UI. */
13
+ /** Returns insert/destroy hook callbacks that position a floating element relative to its button using Floating UI. When `interceptTab` is true (default), Tab key in portal mode refocuses the button — set to false for components like Popover where Tab should navigate naturally within the panel. */
14
14
  export const anchorHooks = (config) => ({
15
15
  onInsert: (items) => {
16
16
  const button = document.getElementById(config.buttonId);
@@ -22,6 +22,7 @@ export const anchorHooks = (config) => ({
22
22
  getOrCreatePortalRoot().appendChild(items);
23
23
  }
24
24
  const { placement, gap, offset: crossAxis, padding } = config.anchor;
25
+ const shouldInterceptTab = config.interceptTab ?? true;
25
26
  let isFirstUpdate = true;
26
27
  const floatingCleanup = autoUpdate(button, items, () => {
27
28
  computePosition(button, items, {
@@ -49,7 +50,7 @@ export const anchorHooks = (config) => ({
49
50
  }
50
51
  });
51
52
  });
52
- if (isPortal) {
53
+ if (isPortal && shouldInterceptTab) {
53
54
  const handleTabKey = (event) => {
54
55
  if (event instanceof KeyboardEvent && event.key === 'Tab') {
55
56
  button.focus();
@@ -0,0 +1,178 @@
1
+ import { Schema as S } from 'effect';
2
+ import type { Html } from '../../html';
3
+ import { type BaseInitConfig, type BaseViewConfig } from './shared';
4
+ /** Schema for the multi-select combobox component's state, tracking open/closed status, active item, input value, and selected items. */
5
+ export declare const Model: S.extend<S.Struct<{
6
+ id: typeof S.String;
7
+ isOpen: typeof S.Boolean;
8
+ isAnimated: typeof S.Boolean;
9
+ isModal: typeof S.Boolean;
10
+ nullable: typeof S.Boolean;
11
+ immediate: typeof S.Boolean;
12
+ selectInputOnFocus: typeof S.Boolean;
13
+ transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
14
+ maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
15
+ activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
16
+ inputValue: typeof S.String;
17
+ maybeLastPointerPosition: S.OptionFromSelf<S.Struct<{
18
+ screenX: typeof S.Number;
19
+ screenY: typeof S.Number;
20
+ }>>;
21
+ }>, S.Struct<{
22
+ selectedItems: S.Array$<typeof S.String>;
23
+ }>>;
24
+ export type Model = typeof Model.Type;
25
+ /** Configuration for creating a multi-select combobox model with `init`. `isAnimated` enables CSS transition coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). `selectedItems` sets the initial selection (default `[]`). */
26
+ export type InitConfig = BaseInitConfig & Readonly<{
27
+ selectedItems?: ReadonlyArray<string>;
28
+ }>;
29
+ /** Creates an initial multi-select combobox model from a config. Defaults to closed with no active item, empty input, and no selection. */
30
+ export declare const init: (config: InitConfig) => Model;
31
+ /** Processes a combobox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
32
+ export declare const update: (model: {
33
+ readonly id: string;
34
+ readonly isOpen: boolean;
35
+ readonly isAnimated: boolean;
36
+ readonly isModal: boolean;
37
+ readonly nullable: boolean;
38
+ readonly immediate: boolean;
39
+ readonly selectInputOnFocus: boolean;
40
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
41
+ readonly maybeActiveItemIndex: import("effect/Option").Option<number>;
42
+ readonly activationTrigger: "Pointer" | "Keyboard";
43
+ readonly inputValue: string;
44
+ readonly maybeLastPointerPosition: import("effect/Option").Option<{
45
+ readonly screenX: number;
46
+ readonly screenY: number;
47
+ }>;
48
+ } & {
49
+ readonly selectedItems: readonly string[];
50
+ }, message: import("./shared").Message) => [{
51
+ readonly id: string;
52
+ readonly isOpen: boolean;
53
+ readonly isAnimated: boolean;
54
+ readonly isModal: boolean;
55
+ readonly nullable: boolean;
56
+ readonly immediate: boolean;
57
+ readonly selectInputOnFocus: boolean;
58
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
59
+ readonly maybeActiveItemIndex: import("effect/Option").Option<number>;
60
+ readonly activationTrigger: "Pointer" | "Keyboard";
61
+ readonly inputValue: string;
62
+ readonly maybeLastPointerPosition: import("effect/Option").Option<{
63
+ readonly screenX: number;
64
+ readonly screenY: number;
65
+ }>;
66
+ } & {
67
+ readonly selectedItems: readonly string[];
68
+ }, readonly import("../../command").Command<{
69
+ readonly _tag: "Opened";
70
+ readonly maybeActiveItemIndex: import("effect/Option").Option<number>;
71
+ } | {
72
+ readonly _tag: "Closed";
73
+ } | {
74
+ readonly _tag: "ClosedByTab";
75
+ } | {
76
+ readonly _tag: "ActivatedItem";
77
+ readonly activationTrigger: "Pointer" | "Keyboard";
78
+ readonly index: number;
79
+ readonly maybeImmediateSelection: import("effect/Option").Option<{
80
+ readonly item: string;
81
+ readonly displayText: string;
82
+ }>;
83
+ } | {
84
+ readonly _tag: "DeactivatedItem";
85
+ } | {
86
+ readonly _tag: "SelectedItem";
87
+ readonly item: string;
88
+ readonly displayText: string;
89
+ } | {
90
+ readonly _tag: "MovedPointerOverItem";
91
+ readonly screenX: number;
92
+ readonly screenY: number;
93
+ readonly index: number;
94
+ } | {
95
+ readonly _tag: "RequestedItemClick";
96
+ readonly index: number;
97
+ } | {
98
+ readonly _tag: "NoOp";
99
+ } | {
100
+ readonly _tag: "AdvancedTransitionFrame";
101
+ } | {
102
+ readonly _tag: "EndedTransition";
103
+ } | {
104
+ readonly _tag: "DetectedInputMovement";
105
+ } | {
106
+ readonly _tag: "UpdatedInputValue";
107
+ readonly value: string;
108
+ } | {
109
+ readonly _tag: "PressedToggleButton";
110
+ }>[]];
111
+ /** Configuration for rendering a multi-select combobox with `view`. */
112
+ export type ViewConfig<Message, Item extends string> = BaseViewConfig<Message, Item, Model>;
113
+ /** Renders a headless multi-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
114
+ export declare const view: <Message, Item extends string>(config: Readonly<{
115
+ model: {
116
+ readonly id: string;
117
+ readonly isOpen: boolean;
118
+ readonly isAnimated: boolean;
119
+ readonly isModal: boolean;
120
+ readonly nullable: boolean;
121
+ readonly immediate: boolean;
122
+ readonly selectInputOnFocus: boolean;
123
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
124
+ readonly maybeActiveItemIndex: import("effect/Option").Option<number>;
125
+ readonly activationTrigger: "Pointer" | "Keyboard";
126
+ readonly inputValue: string;
127
+ readonly maybeLastPointerPosition: import("effect/Option").Option<{
128
+ readonly screenX: number;
129
+ readonly screenY: number;
130
+ }>;
131
+ } & {
132
+ readonly selectedItems: readonly string[];
133
+ };
134
+ toMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | import("./shared").SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").UpdatedInputValue | import("./shared").PressedToggleButton | import("./shared").NoOp) => Message;
135
+ items: readonly Item[];
136
+ itemToConfig: (item: Item, context: Readonly<{
137
+ isActive: boolean;
138
+ isDisabled: boolean;
139
+ isSelected: boolean;
140
+ }>) => Readonly<{
141
+ className: string;
142
+ content: Html;
143
+ }>;
144
+ itemToValue: (item: Item, index: number) => string;
145
+ itemToDisplayText: (item: Item, index: number) => string;
146
+ isItemDisabled?: (item: Item, index: number) => boolean;
147
+ inputClassName: string;
148
+ inputPlaceholder?: string;
149
+ itemsClassName: string;
150
+ itemsScrollClassName?: string;
151
+ backdropClassName: string;
152
+ className?: string;
153
+ inputWrapperClassName?: string;
154
+ buttonContent?: Html;
155
+ buttonClassName?: string;
156
+ formName?: string;
157
+ isDisabled?: boolean;
158
+ isInvalid?: boolean;
159
+ openOnFocus?: boolean;
160
+ itemGroupKey?: (item: Item, index: number) => string;
161
+ groupToHeading?: (groupKey: string) => Readonly<{
162
+ content: Html;
163
+ className: string;
164
+ }> | undefined;
165
+ groupClassName?: string;
166
+ separatorClassName?: string;
167
+ anchor?: Readonly<{
168
+ placement?: import("@floating-ui/dom").Placement;
169
+ gap?: number;
170
+ offset?: number;
171
+ padding?: number;
172
+ portal?: boolean;
173
+ }>;
174
+ }>) => Html;
175
+ /** Creates a memoized multi-select combobox view. Static config is captured in a closure;
176
+ * only `model` and `toMessage` are compared per render via `createLazy`. */
177
+ export declare const lazy: <Message, Item extends string>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "toMessage">) => ((model: Model, toMessage: BaseViewConfig<Message, Item, Model>["toMessage"]) => Html);
178
+ //# sourceMappingURL=multi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/multi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAGtC,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EAKpB,MAAM,UAAU,CAAA;AAIjB,yIAAyI;AACzI,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;GAEjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,8RAA8R;AAC9R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACtC,CAAC,CAAA;AAEJ,2IAA2I;AAC3I,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;AAcF,yJAAyJ;AACzJ,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwBjB,CAAA;AAIF,uEAAuE;AACvE,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,SAAS,MAAM,IAAI,cAAc,CACnE,OAAO,EACP,IAAI,EACJ,KAAK,CACN,CAAA;AAED,yIAAyI;AACzI,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAIf,CAAA;AAEF;6EAC6E;AAC7E,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,SAAS,MAAM,EAC/C,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,KACnE,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,WAAW,CAAC,KACzD,IAAI,CAgBR,CAAA"}
@@ -0,0 +1,53 @@
1
+ import { Array, Schema as S } from 'effect';
2
+ import { createLazy } from '../../html/lazy';
3
+ import { evo } from '../../struct';
4
+ import { BaseModel, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
5
+ // MODEL
6
+ /** Schema for the multi-select combobox component's state, tracking open/closed status, active item, input value, and selected items. */
7
+ export const Model = BaseModel.pipe(S.extend(S.Struct({ selectedItems: S.Array(S.String) })));
8
+ /** Creates an initial multi-select combobox model from a config. Defaults to closed with no active item, empty input, and no selection. */
9
+ export const init = (config) => ({
10
+ ...baseInit(config),
11
+ selectedItems: config.selectedItems ?? [],
12
+ });
13
+ // UPDATE
14
+ const toggleItem = (selectedItems, item) => Array.contains(selectedItems, item)
15
+ ? Array.filter(selectedItems, selected => selected !== item)
16
+ : Array.append(selectedItems, item);
17
+ const emptySelection = [];
18
+ /** Processes a combobox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
19
+ export const update = makeUpdate({
20
+ handleClose: model => {
21
+ if (model.nullable && model.inputValue === '') {
22
+ return evo(closedBaseModel(model), {
23
+ selectedItems: () => emptySelection,
24
+ inputValue: () => '',
25
+ });
26
+ }
27
+ return evo(closedBaseModel(model), {
28
+ inputValue: () => '',
29
+ });
30
+ },
31
+ handleSelectedItem: (model, item) => {
32
+ const nextSelectedItems = toggleItem(model.selectedItems, item);
33
+ return [evo(model, { selectedItems: () => nextSelectedItems }), []];
34
+ },
35
+ handleImmediateActivation: (model, item) => evo(model, {
36
+ selectedItems: () => toggleItem(model.selectedItems, item),
37
+ }),
38
+ });
39
+ /** Renders a headless multi-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
40
+ export const view = makeView({
41
+ isItemSelected: (model, itemValue) => Array.contains(model.selectedItems, itemValue),
42
+ ariaMultiSelectable: true,
43
+ });
44
+ /** Creates a memoized multi-select combobox view. Static config is captured in a closure;
45
+ * only `model` and `toMessage` are compared per render via `createLazy`. */
46
+ export const lazy = (staticConfig) => {
47
+ const lazyView = createLazy();
48
+ return (model, toMessage) => lazyView((currentModel, currentToMessage) => view({
49
+ ...staticConfig,
50
+ model: currentModel,
51
+ toMessage: currentToMessage,
52
+ }), [model, toMessage]);
53
+ };
@@ -0,0 +1,3 @@
1
+ export { init, update, view, lazy, Model } from './multi';
2
+ export type { InitConfig, ViewConfig } from './multi';
3
+ //# sourceMappingURL=multiPublic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACzD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1 @@
1
+ export { init, update, view, lazy, Model } from './multi';
@@ -0,0 +1,8 @@
1
+ export { init, update, view, lazy, Model } from './single';
2
+ export { Message } from './shared';
3
+ export { TransitionState } from '../transition';
4
+ export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick, UpdatedInputValue, PressedToggleButton, NoOp, AdvancedTransitionFrame, EndedTransition, DetectedInputMovement, ItemConfig, GroupHeading, } from './shared';
5
+ export type { InitConfig, ViewConfig } from './single';
6
+ export type { AnchorConfig } from '../anchor';
7
+ export * as Multi from './multiPublic';
8
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,IAAI,EACJ,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEtD,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { init, update, view, lazy, Model } from './single';
2
+ export { Message } from './shared';
3
+ export { TransitionState } from '../transition';
4
+ export * as Multi from './multiPublic';
@@ -0,0 +1,236 @@
1
+ import { Option, Schema as S } from 'effect';
2
+ import type { Command } from '../../command';
3
+ import { type Html } from '../../html';
4
+ import type { AnchorConfig } from '../anchor';
5
+ import { groupContiguous } from '../group';
6
+ export { groupContiguous };
7
+ /** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
8
+ export declare const ActivationTrigger: S.Literal<["Pointer", "Keyboard"]>;
9
+ export type ActivationTrigger = typeof ActivationTrigger.Type;
10
+ /** Schema fields shared by all combobox variants (single-select and multi-select). Spread into each variant's `S.Struct` to avoid duplicating field definitions. */
11
+ export declare const BaseModel: S.Struct<{
12
+ id: typeof S.String;
13
+ isOpen: typeof S.Boolean;
14
+ isAnimated: typeof S.Boolean;
15
+ isModal: typeof S.Boolean;
16
+ nullable: typeof S.Boolean;
17
+ immediate: typeof S.Boolean;
18
+ selectInputOnFocus: typeof S.Boolean;
19
+ transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
20
+ maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
21
+ activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
22
+ inputValue: typeof S.String;
23
+ maybeLastPointerPosition: S.OptionFromSelf<S.Struct<{
24
+ screenX: typeof S.Number;
25
+ screenY: typeof S.Number;
26
+ }>>;
27
+ }>;
28
+ export type BaseModel = typeof BaseModel.Type;
29
+ /** Configuration fields shared by all combobox variant `init` functions. */
30
+ export type BaseInitConfig = Readonly<{
31
+ id: string;
32
+ isAnimated?: boolean;
33
+ isModal?: boolean;
34
+ nullable?: boolean;
35
+ immediate?: boolean;
36
+ selectInputOnFocus?: boolean;
37
+ }>;
38
+ /** Creates the shared base fields for a combobox model from a config. Each variant spreads this and adds its selection fields. */
39
+ export declare const baseInit: (config: BaseInitConfig) => BaseModel;
40
+ /** Sent when the combobox popup opens. Contains an optional initial active item index. */
41
+ export declare const Opened: import("../../schema").CallableTaggedStruct<"Opened", {
42
+ maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
43
+ }>;
44
+ /** Sent when the combobox closes via Escape key or backdrop click. */
45
+ export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed", {}>;
46
+ /** Sent when focus leaves the input via Tab key or blur. */
47
+ export declare const ClosedByTab: import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>;
48
+ /** Sent when an item is highlighted via arrow keys or mouse hover. Includes activation trigger and optional immediate selection info. */
49
+ export declare const ActivatedItem: import("../../schema").CallableTaggedStruct<"ActivatedItem", {
50
+ index: typeof S.Number;
51
+ activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
52
+ maybeImmediateSelection: S.OptionFromSelf<S.Struct<{
53
+ item: typeof S.String;
54
+ displayText: typeof S.String;
55
+ }>>;
56
+ }>;
57
+ /** Sent when the mouse leaves an enabled item. */
58
+ export declare const DeactivatedItem: import("../../schema").CallableTaggedStruct<"DeactivatedItem", {}>;
59
+ /** Sent when an item is selected via Enter or click. Includes display text for restoring input value on close. */
60
+ export declare const SelectedItem: import("../../schema").CallableTaggedStruct<"SelectedItem", {
61
+ item: typeof S.String;
62
+ displayText: typeof S.String;
63
+ }>;
64
+ /** Sent when the pointer moves over a combobox item. */
65
+ export declare const MovedPointerOverItem: import("../../schema").CallableTaggedStruct<"MovedPointerOverItem", {
66
+ index: typeof S.Number;
67
+ screenX: typeof S.Number;
68
+ screenY: typeof S.Number;
69
+ }>;
70
+ /** Sent when Enter or Space is pressed on the active item, triggering a programmatic click. */
71
+ export declare const RequestedItemClick: import("../../schema").CallableTaggedStruct<"RequestedItemClick", {
72
+ index: typeof S.Number;
73
+ }>;
74
+ /** Placeholder message used when no action is needed. */
75
+ export declare const NoOp: import("../../schema").CallableTaggedStruct<"NoOp", {}>;
76
+ /** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
77
+ export declare const AdvancedTransitionFrame: import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>;
78
+ /** Sent internally when all CSS transitions on the items container have completed. */
79
+ export declare const EndedTransition: import("../../schema").CallableTaggedStruct<"EndedTransition", {}>;
80
+ /** Sent internally when the input wrapper moves in the viewport during a leave transition, cancelling the animation. */
81
+ export declare const DetectedInputMovement: import("../../schema").CallableTaggedStruct<"DetectedInputMovement", {}>;
82
+ /** Sent when the user types in the input. */
83
+ export declare const UpdatedInputValue: import("../../schema").CallableTaggedStruct<"UpdatedInputValue", {
84
+ value: typeof S.String;
85
+ }>;
86
+ /** Sent when the optional toggle button is clicked. */
87
+ export declare const PressedToggleButton: import("../../schema").CallableTaggedStruct<"PressedToggleButton", {}>;
88
+ /** Union of all messages the combobox component can produce. */
89
+ export declare const Message: S.Union<[import("../../schema").CallableTaggedStruct<"Opened", {
90
+ maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
91
+ }>, import("../../schema").CallableTaggedStruct<"Closed", {}>, import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>, import("../../schema").CallableTaggedStruct<"ActivatedItem", {
92
+ index: typeof S.Number;
93
+ activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
94
+ maybeImmediateSelection: S.OptionFromSelf<S.Struct<{
95
+ item: typeof S.String;
96
+ displayText: typeof S.String;
97
+ }>>;
98
+ }>, import("../../schema").CallableTaggedStruct<"DeactivatedItem", {}>, import("../../schema").CallableTaggedStruct<"SelectedItem", {
99
+ item: typeof S.String;
100
+ displayText: typeof S.String;
101
+ }>, import("../../schema").CallableTaggedStruct<"MovedPointerOverItem", {
102
+ index: typeof S.Number;
103
+ screenX: typeof S.Number;
104
+ screenY: typeof S.Number;
105
+ }>, import("../../schema").CallableTaggedStruct<"RequestedItemClick", {
106
+ index: typeof S.Number;
107
+ }>, import("../../schema").CallableTaggedStruct<"NoOp", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>, import("../../schema").CallableTaggedStruct<"DetectedInputMovement", {}>, import("../../schema").CallableTaggedStruct<"UpdatedInputValue", {
108
+ value: typeof S.String;
109
+ }>, import("../../schema").CallableTaggedStruct<"PressedToggleButton", {}>]>;
110
+ export type Opened = typeof Opened.Type;
111
+ export type Closed = typeof Closed.Type;
112
+ export type ClosedByTab = typeof ClosedByTab.Type;
113
+ export type ActivatedItem = typeof ActivatedItem.Type;
114
+ export type DeactivatedItem = typeof DeactivatedItem.Type;
115
+ export type SelectedItem = typeof SelectedItem.Type;
116
+ export type MovedPointerOverItem = typeof MovedPointerOverItem.Type;
117
+ export type RequestedItemClick = typeof RequestedItemClick.Type;
118
+ export type NoOp = typeof NoOp.Type;
119
+ export type AdvancedTransitionFrame = typeof AdvancedTransitionFrame.Type;
120
+ export type EndedTransition = typeof EndedTransition.Type;
121
+ export type DetectedInputMovement = typeof DetectedInputMovement.Type;
122
+ export type UpdatedInputValue = typeof UpdatedInputValue.Type;
123
+ export type PressedToggleButton = typeof PressedToggleButton.Type;
124
+ export type Message = typeof Message.Type;
125
+ export declare const inputSelector: (id: string) => string;
126
+ export declare const inputWrapperSelector: (id: string) => string;
127
+ export declare const itemsSelector: (id: string) => string;
128
+ export declare const itemSelector: (id: string, index: number) => string;
129
+ export declare const itemId: (id: string, index: number) => string;
130
+ /** Resets only shared base fields to their closed state. Does not touch inputValue or selection — those are variant-specific. */
131
+ export declare const closedBaseModel: <Model extends BaseModel>(model: Model) => Model;
132
+ /** Context passed to the `handleSelectedItem` handler with commands for focus management and modal cleanup. */
133
+ export type SelectedItemContext = Readonly<{
134
+ focusInput: Command<Message>;
135
+ maybeNextFrame: Option.Option<Command<Message>>;
136
+ maybeUnlockScroll: Option.Option<Command<Message>>;
137
+ maybeRestoreInert: Option.Option<Command<Message>>;
138
+ }>;
139
+ /** 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. */
140
+ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
141
+ handleClose: (model: Model) => Model;
142
+ handleSelectedItem: (model: Model, item: string, displayText: string, context: SelectedItemContext) => [Model, ReadonlyArray<Command<Message>>];
143
+ handleImmediateActivation: (model: Model, item: string, displayText: string) => Model;
144
+ }>) => (model: Model, message: Message) => [Model, readonly Command<{
145
+ readonly _tag: "Opened";
146
+ readonly maybeActiveItemIndex: Option.Option<number>;
147
+ } | {
148
+ readonly _tag: "Closed";
149
+ } | {
150
+ readonly _tag: "ClosedByTab";
151
+ } | {
152
+ readonly _tag: "ActivatedItem";
153
+ readonly activationTrigger: "Pointer" | "Keyboard";
154
+ readonly index: number;
155
+ readonly maybeImmediateSelection: Option.Option<{
156
+ readonly item: string;
157
+ readonly displayText: string;
158
+ }>;
159
+ } | {
160
+ readonly _tag: "DeactivatedItem";
161
+ } | {
162
+ readonly _tag: "SelectedItem";
163
+ readonly item: string;
164
+ readonly displayText: string;
165
+ } | {
166
+ readonly _tag: "MovedPointerOverItem";
167
+ readonly screenX: number;
168
+ readonly screenY: number;
169
+ readonly index: number;
170
+ } | {
171
+ readonly _tag: "RequestedItemClick";
172
+ readonly index: number;
173
+ } | {
174
+ readonly _tag: "NoOp";
175
+ } | {
176
+ readonly _tag: "AdvancedTransitionFrame";
177
+ } | {
178
+ readonly _tag: "EndedTransition";
179
+ } | {
180
+ readonly _tag: "DetectedInputMovement";
181
+ } | {
182
+ readonly _tag: "UpdatedInputValue";
183
+ readonly value: string;
184
+ } | {
185
+ readonly _tag: "PressedToggleButton";
186
+ }>[]];
187
+ /** Configuration for an individual combobox item's appearance. */
188
+ export type ItemConfig = Readonly<{
189
+ className: string;
190
+ content: Html;
191
+ }>;
192
+ /** Configuration for a group heading rendered above a group of items. */
193
+ export type GroupHeading = Readonly<{
194
+ content: Html;
195
+ className: string;
196
+ }>;
197
+ /** Configuration for rendering a combobox with `view`. */
198
+ export type BaseViewConfig<Message, Item extends string, Model extends BaseModel> = Readonly<{
199
+ model: Model;
200
+ toMessage: (message: Opened | Closed | ClosedByTab | ActivatedItem | DeactivatedItem | SelectedItem | MovedPointerOverItem | RequestedItemClick | UpdatedInputValue | PressedToggleButton | NoOp) => Message;
201
+ items: ReadonlyArray<Item>;
202
+ itemToConfig: (item: Item, context: Readonly<{
203
+ isActive: boolean;
204
+ isDisabled: boolean;
205
+ isSelected: boolean;
206
+ }>) => ItemConfig;
207
+ itemToValue: (item: Item, index: number) => string;
208
+ itemToDisplayText: (item: Item, index: number) => string;
209
+ isItemDisabled?: (item: Item, index: number) => boolean;
210
+ inputClassName: string;
211
+ inputPlaceholder?: string;
212
+ itemsClassName: string;
213
+ itemsScrollClassName?: string;
214
+ backdropClassName: string;
215
+ className?: string;
216
+ inputWrapperClassName?: string;
217
+ buttonContent?: Html;
218
+ buttonClassName?: string;
219
+ formName?: string;
220
+ isDisabled?: boolean;
221
+ isInvalid?: boolean;
222
+ openOnFocus?: boolean;
223
+ itemGroupKey?: (item: Item, index: number) => string;
224
+ groupToHeading?: (groupKey: string) => GroupHeading | undefined;
225
+ groupClassName?: string;
226
+ separatorClassName?: string;
227
+ anchor?: AnchorConfig;
228
+ }>;
229
+ /** Variant-specific view behavior injected into the shared combobox view factory. */
230
+ export type ViewBehavior<Model extends BaseModel> = Readonly<{
231
+ isItemSelected: (model: Model, itemValue: string) => boolean;
232
+ ariaMultiSelectable: boolean;
233
+ }>;
234
+ /** 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. */
235
+ export declare const makeView: <Model extends BaseModel>(behavior: ViewBehavior<Model>) => <Message, Item extends string>(config: BaseViewConfig<Message, Item, Model>) => Html;
236
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui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