foldkit 0.111.0 → 0.112.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 (222) hide show
  1. package/README.md +2 -2
  2. package/dist/devTools/host.d.ts +6 -0
  3. package/dist/devTools/host.d.ts.map +1 -0
  4. package/dist/devTools/host.js +4 -0
  5. package/dist/dom/dom.d.ts +6 -1
  6. package/dist/dom/dom.d.ts.map +1 -1
  7. package/dist/dom/dom.js +24 -1
  8. package/dist/html/index.d.ts +4 -3
  9. package/dist/html/index.d.ts.map +1 -1
  10. package/dist/html/index.js +4 -3
  11. package/dist/html/submodel.d.ts +2 -2
  12. package/dist/html/submodel.d.ts.map +1 -1
  13. package/dist/index.d.ts +0 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +0 -1
  16. package/dist/runtime/public.d.ts +1 -1
  17. package/dist/runtime/public.d.ts.map +1 -1
  18. package/dist/runtime/runtime.d.ts +14 -1
  19. package/dist/runtime/runtime.d.ts.map +1 -1
  20. package/dist/runtime/runtime.js +7 -4
  21. package/dist/runtime/subscription.d.ts +1 -1
  22. package/dist/subscription/public.d.ts +1 -1
  23. package/dist/subscription/public.d.ts.map +1 -1
  24. package/package.json +12 -93
  25. package/dist/devTools/overlay-styles.d.ts +0 -3
  26. package/dist/devTools/overlay-styles.d.ts.map +0 -1
  27. package/dist/devTools/overlay-styles.js +0 -706
  28. package/dist/devTools/overlay.d.ts +0 -63
  29. package/dist/devTools/overlay.d.ts.map +0 -1
  30. package/dist/devTools/overlay.js +0 -1244
  31. package/dist/test/apps/disabledButton.d.ts +0 -38
  32. package/dist/test/apps/disabledButton.d.ts.map +0 -1
  33. package/dist/test/apps/disabledButton.js +0 -71
  34. package/dist/ui/anchor.d.ts +0 -38
  35. package/dist/ui/anchor.d.ts.map +0 -1
  36. package/dist/ui/anchor.js +0 -142
  37. package/dist/ui/animation/index.d.ts +0 -49
  38. package/dist/ui/animation/index.d.ts.map +0 -1
  39. package/dist/ui/animation/index.js +0 -74
  40. package/dist/ui/animation/public.d.ts +0 -3
  41. package/dist/ui/animation/public.d.ts.map +0 -1
  42. package/dist/ui/animation/public.js +0 -1
  43. package/dist/ui/animation/schema.d.ts +0 -43
  44. package/dist/ui/animation/schema.d.ts.map +0 -1
  45. package/dist/ui/animation/schema.js +0 -41
  46. package/dist/ui/animation/update.d.ts +0 -24
  47. package/dist/ui/animation/update.d.ts.map +0 -1
  48. package/dist/ui/animation/update.js +0 -67
  49. package/dist/ui/button/index.d.ts +0 -17
  50. package/dist/ui/button/index.d.ts.map +0 -1
  51. package/dist/ui/button/index.js +0 -22
  52. package/dist/ui/button/public.d.ts +0 -3
  53. package/dist/ui/button/public.d.ts.map +0 -1
  54. package/dist/ui/button/public.js +0 -1
  55. package/dist/ui/calendar/index.d.ts +0 -462
  56. package/dist/ui/calendar/index.d.ts.map +0 -1
  57. package/dist/ui/calendar/index.js +0 -824
  58. package/dist/ui/calendar/public.d.ts +0 -3
  59. package/dist/ui/calendar/public.d.ts.map +0 -1
  60. package/dist/ui/calendar/public.js +0 -1
  61. package/dist/ui/checkbox/index.d.ts +0 -119
  62. package/dist/ui/checkbox/index.d.ts.map +0 -1
  63. package/dist/ui/checkbox/index.js +0 -110
  64. package/dist/ui/checkbox/public.d.ts +0 -3
  65. package/dist/ui/checkbox/public.d.ts.map +0 -1
  66. package/dist/ui/checkbox/public.js +0 -1
  67. package/dist/ui/combobox/multi.d.ts +0 -184
  68. package/dist/ui/combobox/multi.d.ts.map +0 -1
  69. package/dist/ui/combobox/multi.js +0 -81
  70. package/dist/ui/combobox/multiPublic.d.ts +0 -3
  71. package/dist/ui/combobox/multiPublic.d.ts.map +0 -1
  72. package/dist/ui/combobox/multiPublic.js +0 -1
  73. package/dist/ui/combobox/public.d.ts +0 -7
  74. package/dist/ui/combobox/public.d.ts.map +0 -1
  75. package/dist/ui/combobox/public.js +0 -3
  76. package/dist/ui/combobox/shared.d.ts +0 -422
  77. package/dist/ui/combobox/shared.d.ts.map +0 -1
  78. package/dist/ui/combobox/shared.js +0 -707
  79. package/dist/ui/combobox/single.d.ts +0 -199
  80. package/dist/ui/combobox/single.d.ts.map +0 -1
  81. package/dist/ui/combobox/single.js +0 -106
  82. package/dist/ui/datePicker/index.d.ts +0 -457
  83. package/dist/ui/datePicker/index.d.ts.map +0 -1
  84. package/dist/ui/datePicker/index.js +0 -317
  85. package/dist/ui/datePicker/public.d.ts +0 -3
  86. package/dist/ui/datePicker/public.d.ts.map +0 -1
  87. package/dist/ui/datePicker/public.js +0 -1
  88. package/dist/ui/dialog/index.d.ts +0 -155
  89. package/dist/ui/dialog/index.d.ts.map +0 -1
  90. package/dist/ui/dialog/index.js +0 -208
  91. package/dist/ui/dialog/public.d.ts +0 -3
  92. package/dist/ui/dialog/public.d.ts.map +0 -1
  93. package/dist/ui/dialog/public.js +0 -1
  94. package/dist/ui/disclosure/index.d.ts +0 -110
  95. package/dist/ui/disclosure/index.d.ts.map +0 -1
  96. package/dist/ui/disclosure/index.js +0 -110
  97. package/dist/ui/disclosure/public.d.ts +0 -3
  98. package/dist/ui/disclosure/public.d.ts.map +0 -1
  99. package/dist/ui/disclosure/public.js +0 -1
  100. package/dist/ui/dragAndDrop/index.d.ts +0 -540
  101. package/dist/ui/dragAndDrop/index.d.ts.map +0 -1
  102. package/dist/ui/dragAndDrop/index.js +0 -535
  103. package/dist/ui/dragAndDrop/public.d.ts +0 -3
  104. package/dist/ui/dragAndDrop/public.d.ts.map +0 -1
  105. package/dist/ui/dragAndDrop/public.js +0 -1
  106. package/dist/ui/fieldset/index.d.ts +0 -21
  107. package/dist/ui/fieldset/index.d.ts.map +0 -1
  108. package/dist/ui/fieldset/index.js +0 -25
  109. package/dist/ui/fieldset/public.d.ts +0 -3
  110. package/dist/ui/fieldset/public.d.ts.map +0 -1
  111. package/dist/ui/fieldset/public.js +0 -1
  112. package/dist/ui/fileDrop/index.d.ts +0 -109
  113. package/dist/ui/fileDrop/index.d.ts.map +0 -1
  114. package/dist/ui/fileDrop/index.js +0 -126
  115. package/dist/ui/fileDrop/public.d.ts +0 -3
  116. package/dist/ui/fileDrop/public.d.ts.map +0 -1
  117. package/dist/ui/fileDrop/public.js +0 -1
  118. package/dist/ui/group.d.ts +0 -8
  119. package/dist/ui/group.d.ts.map +0 -1
  120. package/dist/ui/group.js +0 -13
  121. package/dist/ui/index.d.ts +0 -25
  122. package/dist/ui/index.d.ts.map +0 -1
  123. package/dist/ui/index.js +0 -24
  124. package/dist/ui/input/index.d.ts +0 -26
  125. package/dist/ui/input/index.d.ts.map +0 -1
  126. package/dist/ui/input/index.js +0 -43
  127. package/dist/ui/input/public.d.ts +0 -3
  128. package/dist/ui/input/public.d.ts.map +0 -1
  129. package/dist/ui/input/public.js +0 -1
  130. package/dist/ui/keyboard.d.ts +0 -6
  131. package/dist/ui/keyboard.d.ts.map +0 -1
  132. package/dist/ui/keyboard.js +0 -9
  133. package/dist/ui/listbox/multi.d.ts +0 -190
  134. package/dist/ui/listbox/multi.d.ts.map +0 -1
  135. package/dist/ui/listbox/multi.js +0 -65
  136. package/dist/ui/listbox/multiPublic.d.ts +0 -3
  137. package/dist/ui/listbox/multiPublic.d.ts.map +0 -1
  138. package/dist/ui/listbox/multiPublic.js +0 -1
  139. package/dist/ui/listbox/public.d.ts +0 -7
  140. package/dist/ui/listbox/public.d.ts.map +0 -1
  141. package/dist/ui/listbox/public.js +0 -3
  142. package/dist/ui/listbox/shared.d.ts +0 -431
  143. package/dist/ui/listbox/shared.d.ts.map +0 -1
  144. package/dist/ui/listbox/shared.js +0 -669
  145. package/dist/ui/listbox/single.d.ts +0 -208
  146. package/dist/ui/listbox/single.d.ts.map +0 -1
  147. package/dist/ui/listbox/single.js +0 -73
  148. package/dist/ui/menu/index.d.ts +0 -367
  149. package/dist/ui/menu/index.d.ts.map +0 -1
  150. package/dist/ui/menu/index.js +0 -681
  151. package/dist/ui/menu/public.d.ts +0 -4
  152. package/dist/ui/menu/public.d.ts.map +0 -1
  153. package/dist/ui/menu/public.js +0 -1
  154. package/dist/ui/popover/index.d.ts +0 -267
  155. package/dist/ui/popover/index.d.ts.map +0 -1
  156. package/dist/ui/popover/index.js +0 -345
  157. package/dist/ui/popover/public.d.ts +0 -4
  158. package/dist/ui/popover/public.d.ts.map +0 -1
  159. package/dist/ui/popover/public.js +0 -1
  160. package/dist/ui/radioGroup/index.d.ts +0 -169
  161. package/dist/ui/radioGroup/index.d.ts.map +0 -1
  162. package/dist/ui/radioGroup/index.js +0 -196
  163. package/dist/ui/radioGroup/public.d.ts +0 -3
  164. package/dist/ui/radioGroup/public.d.ts.map +0 -1
  165. package/dist/ui/radioGroup/public.js +0 -1
  166. package/dist/ui/select/index.d.ts +0 -24
  167. package/dist/ui/select/index.d.ts.map +0 -1
  168. package/dist/ui/select/index.js +0 -40
  169. package/dist/ui/select/public.d.ts +0 -3
  170. package/dist/ui/select/public.d.ts.map +0 -1
  171. package/dist/ui/select/public.js +0 -1
  172. package/dist/ui/slider/index.d.ts +0 -318
  173. package/dist/ui/slider/index.d.ts.map +0 -1
  174. package/dist/ui/slider/index.js +0 -336
  175. package/dist/ui/slider/public.d.ts +0 -3
  176. package/dist/ui/slider/public.d.ts.map +0 -1
  177. package/dist/ui/slider/public.js +0 -1
  178. package/dist/ui/switch/index.d.ts +0 -99
  179. package/dist/ui/switch/index.d.ts.map +0 -1
  180. package/dist/ui/switch/index.js +0 -106
  181. package/dist/ui/switch/public.d.ts +0 -3
  182. package/dist/ui/switch/public.d.ts.map +0 -1
  183. package/dist/ui/switch/public.js +0 -1
  184. package/dist/ui/tabs/index.d.ts +0 -155
  185. package/dist/ui/tabs/index.d.ts.map +0 -1
  186. package/dist/ui/tabs/index.js +0 -184
  187. package/dist/ui/tabs/public.d.ts +0 -3
  188. package/dist/ui/tabs/public.d.ts.map +0 -1
  189. package/dist/ui/tabs/public.js +0 -1
  190. package/dist/ui/textarea/index.d.ts +0 -26
  191. package/dist/ui/textarea/index.d.ts.map +0 -1
  192. package/dist/ui/textarea/index.js +0 -44
  193. package/dist/ui/textarea/public.d.ts +0 -3
  194. package/dist/ui/textarea/public.d.ts.map +0 -1
  195. package/dist/ui/textarea/public.js +0 -1
  196. package/dist/ui/toast/index.d.ts +0 -608
  197. package/dist/ui/toast/index.d.ts.map +0 -1
  198. package/dist/ui/toast/index.js +0 -145
  199. package/dist/ui/toast/public.d.ts +0 -4
  200. package/dist/ui/toast/public.d.ts.map +0 -1
  201. package/dist/ui/toast/public.js +0 -1
  202. package/dist/ui/toast/schema.d.ts +0 -154
  203. package/dist/ui/toast/schema.d.ts.map +0 -1
  204. package/dist/ui/toast/schema.js +0 -93
  205. package/dist/ui/toast/update.d.ts +0 -510
  206. package/dist/ui/toast/update.d.ts.map +0 -1
  207. package/dist/ui/toast/update.js +0 -225
  208. package/dist/ui/tooltip/index.d.ts +0 -170
  209. package/dist/ui/tooltip/index.d.ts.map +0 -1
  210. package/dist/ui/tooltip/index.js +0 -252
  211. package/dist/ui/tooltip/public.d.ts +0 -4
  212. package/dist/ui/tooltip/public.d.ts.map +0 -1
  213. package/dist/ui/tooltip/public.js +0 -1
  214. package/dist/ui/typeahead.d.ts +0 -4
  215. package/dist/ui/typeahead.d.ts.map +0 -1
  216. package/dist/ui/typeahead.js +0 -14
  217. package/dist/ui/virtualList/index.d.ts +0 -202
  218. package/dist/ui/virtualList/index.d.ts.map +0 -1
  219. package/dist/ui/virtualList/index.js +0 -391
  220. package/dist/ui/virtualList/public.d.ts +0 -3
  221. package/dist/ui/virtualList/public.d.ts.map +0 -1
  222. package/dist/ui/virtualList/public.js +0 -1
@@ -1,169 +0,0 @@
1
- import { Effect, Option, Schema as S } from 'effect';
2
- import * as Command from '../../command/index.js';
3
- import { type ChildAttribute, type Html, type SubmodelView } from '../../html/index.js';
4
- import type { Reflect } from '../../submodel/submodel.js';
5
- /** Controls the radio group layout direction and which arrow keys navigate between options. */
6
- export declare const Orientation: S.Literals<readonly ["Horizontal", "Vertical"]>;
7
- export type Orientation = typeof Orientation.Type;
8
- /** Schema for the radio group component's state, tracking the selected value and orientation. */
9
- export declare const Model: S.Struct<{
10
- readonly id: S.String;
11
- readonly selectedValue: S.Option<S.String>;
12
- readonly orientation: S.Literals<readonly ["Horizontal", "Vertical"]>;
13
- }>;
14
- export type Model = typeof Model.Type;
15
- /** Sent when a radio option is selected via click or keyboard navigation. */
16
- export declare const SelectedOption: import("../../schema/index.js").CallableTaggedStruct<"SelectedOption", {
17
- value: S.String;
18
- index: S.Number;
19
- }>;
20
- /** Sent when the focus-option command completes. */
21
- export declare const CompletedFocusOption: import("../../schema/index.js").CallableTaggedStruct<"CompletedFocusOption", {}>;
22
- /** Union of all messages the radio group component can produce. */
23
- export declare const Message: S.Union<[
24
- typeof SelectedOption,
25
- typeof CompletedFocusOption
26
- ]>;
27
- export type SelectedOption = typeof SelectedOption.Type;
28
- export type CompletedFocusOption = typeof CompletedFocusOption.Type;
29
- export type Message = typeof Message.Type;
30
- /** Sent to the parent when an option is committed. Carries the selected
31
- * value and its index. Generic over `Value extends string`: the runtime
32
- * schema stores `value: string`, but the type-level OutMessage exposes
33
- * `value: Value` so consumers who supply `options: ReadonlyArray<MyUnion>`
34
- * receive `value: MyUnion` from the factory's `update` without casting at
35
- * the call site. The cast is fenced inside this module's `update` return,
36
- * sound because the value was selected from the options array the
37
- * consumer supplied. */
38
- export declare const Selected: import("../../schema/index.js").CallableTaggedStruct<"Selected", {
39
- value: S.String;
40
- index: S.Number;
41
- }>;
42
- export type Selected<Value extends string = string> = Readonly<{
43
- readonly _tag: 'Selected';
44
- readonly value: Value;
45
- readonly index: number;
46
- }>;
47
- export declare const OutMessage: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"Selected", {
48
- value: S.String;
49
- index: S.Number;
50
- }>]>;
51
- /** Generic over `Value extends string` so consumers who create the radio
52
- * group via `Ui.RadioGroup.create<MyUnion>()` receive `value: MyUnion` in
53
- * the `Selected` OutMessage from the factory's `update`, instead of
54
- * `value: string`. Defaults to `string` for consumers that don't need the
55
- * lift. */
56
- export type OutMessage<Value extends string = string> = Selected<Value>;
57
- /** Configuration for creating a radio group model with `init`. */
58
- export type InitConfig = Readonly<{
59
- id: string;
60
- selectedValue?: string;
61
- orientation?: Orientation;
62
- }>;
63
- /** Creates an initial radio group model from a config. Defaults to no selection and vertical orientation. */
64
- export declare const init: (config: InitConfig) => Model;
65
- /** Moves focus to the radio option at the given index. */
66
- export declare const FocusOption: Command.CommandDefinitionWithArgs<"FocusOption", {
67
- id: S.String;
68
- index: S.Number;
69
- }, Effect.Effect<{
70
- readonly _tag: "CompletedFocusOption";
71
- }, never, never>>;
72
- type UpdateReturn<Value extends string = string> = readonly [
73
- Model,
74
- ReadonlyArray<Command.Command<Message>>,
75
- Option.Option<OutMessage<Value>>
76
- ];
77
- /** Processes a radio group message and returns the next model, commands, and
78
- * optional OutMessage. Generic over `Value extends string`: pass the consumer's
79
- * union type at the call site to receive `Selected({ value: MyUnion })` without
80
- * casting. Defaults to `string`. */
81
- export declare const update: <Value extends string = string>(model: Model, message: Message) => UpdateReturn<Value>;
82
- /** Programmatically selects a value in the radio group, updating the model
83
- * and returning focus commands plus a `Selected` OutMessage. */
84
- export declare const select: <Value extends string = string>(model: Model, value: Value, options: ReadonlyArray<Value>) => UpdateReturn<Value>;
85
- /** Reflects an externally-sourced selection onto the model without
86
- * emitting an OutMessage or running the focus command. Use this to mirror
87
- * external truth (a URL parameter, restored storage, a server push) onto
88
- * the radio group's selection. Contrast with `select`, which represents a
89
- * user or programmatic *choice*: it focuses the option and emits
90
- * `Selected`. Takes no `options` (unlike `select`) because it sets the
91
- * value directly rather than deriving a focus index. Returns the model
92
- * directly because it produces no commands and no OutMessage. */
93
- export declare const reflectSelectedValue: Reflect<Model, Option.Option<string>>;
94
- /** Per-option render info passed to the consumer's `toView`. The consumer
95
- * spreads `option`, `label`, and `description` onto whichever elements
96
- * carry that role in their layout. Generic over `Value extends string`:
97
- * when `Ui.RadioGroup.create<MyUnion>()` is declared, `option.value` is
98
- * typed `MyUnion` so the consumer can switch on it without casting. */
99
- export type OptionInfo<Value extends string = string> = Readonly<{
100
- value: Value;
101
- index: number;
102
- isSelected: boolean;
103
- isActive: boolean;
104
- isDisabled: boolean;
105
- option: ReadonlyArray<ChildAttribute>;
106
- label: ReadonlyArray<ChildAttribute>;
107
- description: ReadonlyArray<ChildAttribute>;
108
- }>;
109
- /** Render-time payload published to the consumer's `toView`.
110
- *
111
- * - `group`: ARIA + role attributes for the wrapping radiogroup element.
112
- * - `options`: one entry per option in `viewInputs.options`, in the same
113
- * order. Includes the value, derived state, and the attribute bundles
114
- * for the option element, its label, and its description.
115
- * - `selectedValue`: the currently-selected value, if any. Convenient
116
- * for the consumer when rendering selected-state visuals next to the
117
- * option attributes.
118
- * - `hiddenInput`: when `viewInputs.name` was supplied, attributes for a
119
- * hidden form input carrying the selected value. The consumer
120
- * renders the `<input>` themselves. Empty array when `name` is
121
- * undefined. */
122
- export type RenderInfo<Value extends string = string> = Readonly<{
123
- group: ReadonlyArray<ChildAttribute>;
124
- options: ReadonlyArray<OptionInfo<Value>>;
125
- selectedValue: Option.Option<Value>;
126
- hiddenInput: ReadonlyArray<ChildAttribute>;
127
- }>;
128
- /** Per-render view inputs passed to `view` via `h.submodel`'s `viewInputs` field.
129
- * Generic over `Value extends string` so consumers using
130
- * `Ui.RadioGroup.create<MyUnion>()` receive `option.value: MyUnion` in
131
- * `toView` and `(value: MyUnion, index) => boolean` in
132
- * `isOptionDisabled`, without casting. */
133
- export type ViewInputs<Value extends string = string> = Readonly<{
134
- options: ReadonlyArray<Value>;
135
- ariaLabel: string;
136
- toView: (render: RenderInfo<Value>) => Html;
137
- isOptionDisabled?: (value: Value, index: number) => boolean;
138
- isDisabled?: boolean;
139
- name?: string;
140
- orientation?: Orientation;
141
- }>;
142
- /** Pairs the radio group's `view` and `update` (and `select`) behind a
143
- * single Value-typed entry point. Declaring the radio group once at
144
- * module scope ensures the OutMessage's `value` field carries the
145
- * consumer's union type without an `as` cast at the call site:
146
- *
147
- * ```ts
148
- * const ToolRadioGroup = Ui.RadioGroup.create<Tool>()
149
- *
150
- * // In view:
151
- * h.submodel({ view: ToolRadioGroup.view, ... })
152
- *
153
- * // In update:
154
- * const [next, commands, maybeOutMessage] = ToolRadioGroup.update(model, message)
155
- * // maybeOutMessage: Option<RadioGroup.OutMessage<Tool>>
156
- * ```
157
- *
158
- * The view's `ViewInputs.options` stays typed `ReadonlyArray<string>`;
159
- * consumers can pass a `ReadonlyArray<MyUnion>` (assignable) and the
160
- * fenced cast inside `update` types the OutMessage's `value` as
161
- * `MyUnion`. */
162
- export declare const create: <Value extends string = string>() => Readonly<{
163
- view: SubmodelView<Model, Message, ViewInputs<Value>>;
164
- update: (model: Model, message: Message) => readonly [Model, ReadonlyArray<Command.Command<Message>>, Option.Option<OutMessage<Value>>];
165
- select: (model: Model, value: Value, options: ReadonlyArray<Value>) => readonly [Model, ReadonlyArray<Command.Command<Message>>, Option.Option<OutMessage<Value>>];
166
- reflectSelectedValue: Reflect<Model, Option.Option<Value>>;
167
- }>;
168
- export {};
169
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/radioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,IAAI,EACT,KAAK,YAAY,EAIlB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAKzD,+FAA+F;AAC/F,eAAO,MAAM,WAAW,iDAAyC,CAAA;AACjE,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,iGAAiG;AACjG,eAAO,MAAM,KAAK;;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AK,CAAC,KAC1B,SAAS,CACZ,KAAK,EACL,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EACvC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CACjC,CAAA;IACD,oBAAoB,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;CAC3D,CAcC,CAAA"}
@@ -1,196 +0,0 @@
1
- import { Array, Effect, Function, Match as M, Option, Predicate, Schema as S, String, pipe, } from 'effect';
2
- import * as Command from '../../command/index.js';
3
- import * as Dom from '../../dom/index.js';
4
- import { childAttributes, defineView, html, } from '../../html/index.js';
5
- import { m } from '../../message/index.js';
6
- import { evo } from '../../struct/index.js';
7
- import { keyToIndex } from '../keyboard.js';
8
- // MODEL
9
- /** Controls the radio group layout direction and which arrow keys navigate between options. */
10
- export const Orientation = S.Literals(['Horizontal', 'Vertical']);
11
- /** Schema for the radio group component's state, tracking the selected value and orientation. */
12
- export const Model = S.Struct({
13
- id: S.String,
14
- selectedValue: S.Option(S.String),
15
- orientation: Orientation,
16
- });
17
- // MESSAGE
18
- /** Sent when a radio option is selected via click or keyboard navigation. */
19
- export const SelectedOption = m('SelectedOption', {
20
- value: S.String,
21
- index: S.Number,
22
- });
23
- /** Sent when the focus-option command completes. */
24
- export const CompletedFocusOption = m('CompletedFocusOption');
25
- /** Union of all messages the radio group component can produce. */
26
- export const Message = S.Union([SelectedOption, CompletedFocusOption]);
27
- // OUT MESSAGE
28
- /** Sent to the parent when an option is committed. Carries the selected
29
- * value and its index. Generic over `Value extends string`: the runtime
30
- * schema stores `value: string`, but the type-level OutMessage exposes
31
- * `value: Value` so consumers who supply `options: ReadonlyArray<MyUnion>`
32
- * receive `value: MyUnion` from the factory's `update` without casting at
33
- * the call site. The cast is fenced inside this module's `update` return,
34
- * sound because the value was selected from the options array the
35
- * consumer supplied. */
36
- export const Selected = m('Selected', { value: S.String, index: S.Number });
37
- export const OutMessage = S.Union([Selected]);
38
- /** Creates an initial radio group model from a config. Defaults to no selection and vertical orientation. */
39
- export const init = (config) => ({
40
- id: config.id,
41
- selectedValue: Option.fromNullishOr(config.selectedValue),
42
- orientation: config.orientation ?? 'Vertical',
43
- });
44
- // UPDATE
45
- const optionId = (id, index) => `${id}-option-${index}`;
46
- /** Moves focus to the radio option at the given index. */
47
- export const FocusOption = Command.define('FocusOption', { id: S.String, index: S.Number }, CompletedFocusOption)(({ id, index }) => Dom.focus(`#${optionId(id, index)}`).pipe(Effect.ignore, Effect.as(CompletedFocusOption())));
48
- const withInternalUpdateReturn = M.withReturnType();
49
- /** Processes a radio group message and returns the next model, commands, and
50
- * optional OutMessage. Generic over `Value extends string`: pass the consumer's
51
- * union type at the call site to receive `Selected({ value: MyUnion })` without
52
- * casting. Defaults to `string`. */
53
- export const update = (model, message) => {
54
- const result = M.value(message).pipe(withInternalUpdateReturn, M.tagsExhaustive({
55
- SelectedOption: ({ value, index }) => [
56
- evo(model, { selectedValue: () => Option.some(value) }),
57
- [FocusOption({ id: model.id, index })],
58
- Option.some(Selected({ value, index })),
59
- ],
60
- CompletedFocusOption: () => [model, [], Option.none()],
61
- }));
62
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
63
- return result;
64
- };
65
- /** Programmatically selects a value in the radio group, updating the model
66
- * and returning focus commands plus a `Selected` OutMessage. */
67
- export const select = (model, value, options) => pipe(options, Array.findFirstIndex(option => option === value), Option.match({
68
- onNone: () => [model, [], Option.none()],
69
- onSome: index => update(model, SelectedOption({ value, index })),
70
- }));
71
- /** Reflects an externally-sourced selection onto the model without
72
- * emitting an OutMessage or running the focus command. Use this to mirror
73
- * external truth (a URL parameter, restored storage, a server push) onto
74
- * the radio group's selection. Contrast with `select`, which represents a
75
- * user or programmatic *choice*: it focuses the option and emits
76
- * `Selected`. Takes no `options` (unlike `select`) because it sets the
77
- * value directly rather than deriving a focus index. Returns the model
78
- * directly because it produces no commands and no OutMessage. */
79
- export const reflectSelectedValue = Function.dual(2, (model, maybeValue) => evo(model, { selectedValue: () => maybeValue }));
80
- const labelId = (id, index) => `${id}-option-${index}-label`;
81
- const descriptionId = (id, index) => `${id}-option-${index}-description`;
82
- const internalView = defineView((model, viewInputs) => {
83
- const h = html();
84
- const { id, selectedValue } = model;
85
- const { options, ariaLabel, toView, isOptionDisabled: isOptionDisabledFn, isDisabled: isGroupDisabled = false, name, orientation = model.orientation, } = viewInputs;
86
- const isDisabled = (index) => {
87
- if (isGroupDisabled) {
88
- return true;
89
- }
90
- if (!isOptionDisabledFn) {
91
- return false;
92
- }
93
- return pipe(options, Array.get(index), Option.exists(option => isOptionDisabledFn(option, index)));
94
- };
95
- const selectedIndex = Option.flatMap(selectedValue, value => Array.findFirstIndex(options, option => option === value));
96
- const focusedIndex = pipe(selectedIndex, Option.getOrElse(() => pipe(options.length, Array.makeBy(index => index), Array.findFirst(Predicate.not(isDisabled)), Option.getOrElse(() => 0))));
97
- const { nextKey, previousKey } = M.value(orientation).pipe(M.when('Horizontal', () => ({
98
- nextKey: 'ArrowRight',
99
- previousKey: 'ArrowLeft',
100
- })), M.when('Vertical', () => ({
101
- nextKey: 'ArrowDown',
102
- previousKey: 'ArrowUp',
103
- })), M.exhaustive);
104
- const resolveKeyIndex = keyToIndex(nextKey, previousKey, options.length, focusedIndex, isDisabled);
105
- const handleKeyDown = (currentIndex) => (key) => M.value(key).pipe(M.whenOr(nextKey, previousKey, 'Home', 'End', 'PageUp', 'PageDown', () => {
106
- const nextIndex = resolveKeyIndex(key);
107
- return pipe(options, Array.get(nextIndex), Option.map(value => SelectedOption({ value, index: nextIndex })));
108
- }), M.when(' ', () => pipe(options, Array.get(currentIndex), Option.map(value => SelectedOption({ value, index: currentIndex })))), M.orElse(() => Option.none()));
109
- const optionInfos = Array.map(options, (value, index) => {
110
- const isSelected = Option.exists(selectedIndex, selectedIdx => selectedIdx === index);
111
- const isFocusable = index === focusedIndex;
112
- const isOptionDisabledNow = isDisabled(index);
113
- const checkedAttributes = isSelected
114
- ? [h.DataAttribute('checked', '')]
115
- : [];
116
- const activeAttributes = isFocusable
117
- ? [h.DataAttribute('active', '')]
118
- : [];
119
- const disabledAttributes = isOptionDisabledNow
120
- ? [h.AriaDisabled(true), h.DataAttribute('disabled', '')]
121
- : [];
122
- const optionAttributes = [
123
- h.Id(optionId(id, index)),
124
- h.Role('radio'),
125
- h.AriaChecked(isSelected),
126
- h.AriaLabelledBy(labelId(id, index)),
127
- h.AriaDescribedBy(descriptionId(id, index)),
128
- h.Tabindex(isFocusable ? 0 : -1),
129
- ...checkedAttributes,
130
- ...activeAttributes,
131
- ...disabledAttributes,
132
- ...(isOptionDisabledNow
133
- ? []
134
- : [
135
- h.OnClick(SelectedOption({ value, index })),
136
- h.OnKeyDownPreventDefault(handleKeyDown(index)),
137
- ]),
138
- ];
139
- const labelAttributes = [h.Id(labelId(id, index))];
140
- const descriptionAttributes = [h.Id(descriptionId(id, index))];
141
- return {
142
- value,
143
- index,
144
- isSelected,
145
- isActive: isFocusable,
146
- isDisabled: isOptionDisabledNow,
147
- option: childAttributes(optionAttributes),
148
- label: childAttributes(labelAttributes),
149
- description: childAttributes(descriptionAttributes),
150
- };
151
- });
152
- const groupAttributes = [
153
- h.Role('radiogroup'),
154
- h.AriaOrientation(String.toLowerCase(orientation)),
155
- h.AriaLabel(ariaLabel),
156
- ];
157
- const hiddenInputAttributes = pipe(Option.fromNullishOr(name), Option.flatMap(inputName => Option.map(selectedValue, value => [
158
- h.Type('hidden'),
159
- h.Name(inputName),
160
- h.Value(value),
161
- ])), Option.getOrElse(() => []));
162
- return toView({
163
- group: childAttributes(groupAttributes),
164
- options: optionInfos,
165
- selectedValue,
166
- hiddenInput: childAttributes(hiddenInputAttributes),
167
- });
168
- });
169
- /** Pairs the radio group's `view` and `update` (and `select`) behind a
170
- * single Value-typed entry point. Declaring the radio group once at
171
- * module scope ensures the OutMessage's `value` field carries the
172
- * consumer's union type without an `as` cast at the call site:
173
- *
174
- * ```ts
175
- * const ToolRadioGroup = Ui.RadioGroup.create<Tool>()
176
- *
177
- * // In view:
178
- * h.submodel({ view: ToolRadioGroup.view, ... })
179
- *
180
- * // In update:
181
- * const [next, commands, maybeOutMessage] = ToolRadioGroup.update(model, message)
182
- * // maybeOutMessage: Option<RadioGroup.OutMessage<Tool>>
183
- * ```
184
- *
185
- * The view's `ViewInputs.options` stays typed `ReadonlyArray<string>`;
186
- * consumers can pass a `ReadonlyArray<MyUnion>` (assignable) and the
187
- * fenced cast inside `update` types the OutMessage's `value` as
188
- * `MyUnion`. */
189
- export const create = () => ({
190
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
191
- view: internalView,
192
- update: (model, message) => update(model, message),
193
- select: (model, value, options) => select(model, value, options),
194
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
195
- reflectSelectedValue: reflectSelectedValue,
196
- });
@@ -1,3 +0,0 @@
1
- export { init, create, Model, Message, OutMessage, Selected, SelectedOption, CompletedFocusOption, FocusOption, } from './index.js';
2
- export type { Orientation, InitConfig, ViewInputs, RenderInfo, OptionInfo, } from './index.js';
3
- //# sourceMappingURL=public.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/radioGroup/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,WAAW,GACZ,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAA"}
@@ -1 +0,0 @@
1
- export { init, create, Model, Message, OutMessage, Selected, SelectedOption, CompletedFocusOption, FocusOption, } from './index.js';
@@ -1,24 +0,0 @@
1
- import type { Attribute } from '../../html/index.js';
2
- import type { Html } from '../../html/index.js';
3
- /** Attribute groups the select component provides to the consumer's `toView` callback. */
4
- export type SelectAttributes<ParentMessage> = Readonly<{
5
- select: ReadonlyArray<Attribute<ParentMessage>>;
6
- label: ReadonlyArray<Attribute<ParentMessage>>;
7
- description: ReadonlyArray<Attribute<ParentMessage>>;
8
- }>;
9
- /** Configuration for rendering a select with `view`. */
10
- export type ViewConfig<ParentMessage> = Readonly<{
11
- id: string;
12
- toView: (attributes: SelectAttributes<ParentMessage>) => Html;
13
- onChange?: (value: string) => ParentMessage;
14
- value?: string;
15
- isDisabled?: boolean;
16
- isInvalid?: boolean;
17
- isAutofocus?: boolean;
18
- name?: string;
19
- }>;
20
- /** Generates the description element ID from the select's base ID. */
21
- export declare const descriptionId: (id: string) => string;
22
- /** Renders an accessible select by building ARIA attribute groups and delegating layout to the consumer's `toView` callback. */
23
- export declare const view: <ParentMessage>(config: ViewConfig<ParentMessage>) => Html;
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/select/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAI/C,0FAA0F;AAC1F,MAAM,MAAM,gBAAgB,CAAC,aAAa,IAAI,QAAQ,CAAC;IACrD,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IAC/C,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IAC9C,WAAW,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;CACrD,CAAC,CAAA;AAEF,wDAAwD;AACxD,MAAM,MAAM,UAAU,CAAC,aAAa,IAAI,QAAQ,CAAC;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC,aAAa,CAAC,KAAK,IAAI,CAAA;IAC7D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,aAAa,CAAA;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,sEAAsE;AACtE,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,KAAG,MAA6B,CAAA;AAExE,gIAAgI;AAChI,eAAO,MAAM,IAAI,GAAI,aAAa,EAChC,QAAQ,UAAU,CAAC,aAAa,CAAC,KAChC,IAuDF,CAAA"}
@@ -1,40 +0,0 @@
1
- import { Predicate } from 'effect';
2
- import { html } from '../../html/index.js';
3
- /** Generates the description element ID from the select's base ID. */
4
- export const descriptionId = (id) => `${id}-description`;
5
- /** Renders an accessible select by building ARIA attribute groups and delegating layout to the consumer's `toView` callback. */
6
- export const view = (config) => {
7
- const h = html();
8
- const { toView, id, onChange, value, isDisabled = false, isInvalid = false, isAutofocus = false, name, } = config;
9
- const disabledAttributes = isDisabled
10
- ? [h.AriaDisabled(true), h.Disabled(true), h.DataAttribute('disabled', '')]
11
- : [];
12
- const invalidAttributes = isInvalid
13
- ? [h.AriaInvalid(true), h.DataAttribute('invalid', '')]
14
- : [];
15
- const changeAttributes = Predicate.isNotUndefined(onChange) && !isDisabled
16
- ? [h.OnChange(onChange)]
17
- : [];
18
- const valueAttributes = Predicate.isNotUndefined(value)
19
- ? [h.Value(value)]
20
- : [];
21
- const autofocusAttributes = isAutofocus ? [h.Autofocus(true)] : [];
22
- const nameAttributes = Predicate.isNotUndefined(name) ? [h.Name(name)] : [];
23
- const allSelectAttributes = [
24
- h.Id(id),
25
- h.AriaDescribedBy(descriptionId(id)),
26
- ...disabledAttributes,
27
- ...invalidAttributes,
28
- ...changeAttributes,
29
- ...valueAttributes,
30
- ...autofocusAttributes,
31
- ...nameAttributes,
32
- ];
33
- const labelAttributes = [h.For(id)];
34
- const descriptionAttributes = [h.Id(descriptionId(id))];
35
- return toView({
36
- select: allSelectAttributes,
37
- label: labelAttributes,
38
- description: descriptionAttributes,
39
- });
40
- };
@@ -1,3 +0,0 @@
1
- export { view, descriptionId } from './index.js';
2
- export type { ViewConfig, SelectAttributes } from './index.js';
3
- //# sourceMappingURL=public.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/select/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAEhD,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
@@ -1 +0,0 @@
1
- export { view, descriptionId } from './index.js';