@typed/ui 1.0.0-beta.6 → 1.0.0-beta.8

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 (130) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/Alert.d.ts +35 -41
  4. package/dist/Alert.d.ts.map +1 -1
  5. package/dist/Alert.js +23 -20
  6. package/dist/Button.d.ts +34 -78
  7. package/dist/Button.d.ts.map +1 -1
  8. package/dist/Button.js +16 -12
  9. package/dist/Carousel.d.ts +35 -236
  10. package/dist/Carousel.d.ts.map +1 -1
  11. package/dist/Carousel.js +13 -136
  12. package/dist/Checkbox.d.ts +55 -90
  13. package/dist/Checkbox.d.ts.map +1 -1
  14. package/dist/Checkbox.js +44 -38
  15. package/dist/Collection.d.ts +15 -15
  16. package/dist/Collection.js +7 -7
  17. package/dist/Combobox.d.ts +38 -187
  18. package/dist/Combobox.d.ts.map +1 -1
  19. package/dist/Combobox.js +9 -80
  20. package/dist/Component.d.ts +30 -24
  21. package/dist/Component.d.ts.map +1 -1
  22. package/dist/Component.js +23 -12
  23. package/dist/Composite.d.ts +50 -50
  24. package/dist/Composite.js +20 -20
  25. package/dist/Dialog.d.ts +34 -34
  26. package/dist/Dialog.d.ts.map +1 -1
  27. package/dist/Dialog.js +16 -14
  28. package/dist/Disclosure.d.ts +15 -15
  29. package/dist/Disclosure.js +6 -6
  30. package/dist/Dom/Events.d.ts +4 -4
  31. package/dist/Dom/Events.js +4 -4
  32. package/dist/Dom/Props.d.ts +9 -9
  33. package/dist/Dom/Props.js +4 -4
  34. package/dist/Dom/Refs.d.ts +2 -2
  35. package/dist/Dom/Refs.js +1 -1
  36. package/dist/Dom/Render.d.ts +2 -2
  37. package/dist/Dom/Render.js +2 -2
  38. package/dist/Dom/Types.d.ts +33 -33
  39. package/dist/Dom/index.d.ts +5 -5
  40. package/dist/Dom/index.d.ts.map +1 -1
  41. package/dist/Dom/index.js +4 -4
  42. package/dist/Dom.d.ts +1 -1
  43. package/dist/Dom.js +1 -1
  44. package/dist/Focusable.d.ts +5 -5
  45. package/dist/Focusable.js +1 -1
  46. package/dist/Form.d.ts +565 -533
  47. package/dist/Form.d.ts.map +1 -1
  48. package/dist/Form.js +350 -195
  49. package/dist/Grid.d.ts +39 -220
  50. package/dist/Grid.d.ts.map +1 -1
  51. package/dist/Grid.js +12 -107
  52. package/dist/Group.d.ts +50 -69
  53. package/dist/Group.d.ts.map +1 -1
  54. package/dist/Group.js +33 -25
  55. package/dist/Heading.d.ts +41 -40
  56. package/dist/Heading.d.ts.map +1 -1
  57. package/dist/Heading.js +26 -16
  58. package/dist/Hovercard.d.ts +18 -18
  59. package/dist/Hovercard.js +6 -6
  60. package/dist/HttpRouter.d.ts +3 -3
  61. package/dist/HttpRouter.js +5 -5
  62. package/dist/Link.d.ts +17 -21
  63. package/dist/Link.d.ts.map +1 -1
  64. package/dist/Link.js +11 -0
  65. package/dist/Listbox.d.ts +31 -163
  66. package/dist/Listbox.d.ts.map +1 -1
  67. package/dist/Listbox.js +9 -80
  68. package/dist/Menu.d.ts +67 -376
  69. package/dist/Menu.d.ts.map +1 -1
  70. package/dist/Menu.js +17 -179
  71. package/dist/Menubar.d.ts +24 -142
  72. package/dist/Menubar.d.ts.map +1 -1
  73. package/dist/Menubar.js +8 -66
  74. package/dist/Meter.d.ts +72 -132
  75. package/dist/Meter.d.ts.map +1 -1
  76. package/dist/Meter.js +35 -42
  77. package/dist/NativeDetails.d.ts +1 -1
  78. package/dist/NativeDetails.js +1 -1
  79. package/dist/NativeDialog.d.ts +7 -5
  80. package/dist/NativeDialog.d.ts.map +1 -1
  81. package/dist/NativeDialog.js +42 -4
  82. package/dist/NativePopover.d.ts +6 -4
  83. package/dist/NativePopover.d.ts.map +1 -1
  84. package/dist/NativePopover.js +43 -5
  85. package/dist/Popover.d.ts +18 -19
  86. package/dist/Popover.d.ts.map +1 -1
  87. package/dist/Popover.js +7 -8
  88. package/dist/RadioGroup.d.ts +86 -188
  89. package/dist/RadioGroup.d.ts.map +1 -1
  90. package/dist/RadioGroup.js +55 -105
  91. package/dist/Role.d.ts +4 -4
  92. package/dist/Role.js +1 -1
  93. package/dist/Select.d.ts +109 -220
  94. package/dist/Select.d.ts.map +1 -1
  95. package/dist/Select.js +67 -117
  96. package/dist/Separator.d.ts +30 -26
  97. package/dist/Separator.d.ts.map +1 -1
  98. package/dist/Separator.js +16 -10
  99. package/dist/Slider.d.ts +64 -111
  100. package/dist/Slider.d.ts.map +1 -1
  101. package/dist/Slider.js +47 -42
  102. package/dist/SpinButton.d.ts +64 -111
  103. package/dist/SpinButton.d.ts.map +1 -1
  104. package/dist/SpinButton.js +47 -42
  105. package/dist/Storybook.d.ts +2 -2
  106. package/dist/Storybook.js +1 -1
  107. package/dist/Switch.d.ts +52 -91
  108. package/dist/Switch.d.ts.map +1 -1
  109. package/dist/Switch.js +30 -36
  110. package/dist/Tabs.d.ts +44 -224
  111. package/dist/Tabs.d.ts.map +1 -1
  112. package/dist/Tabs.js +10 -94
  113. package/dist/Toolbar.d.ts +24 -142
  114. package/dist/Toolbar.d.ts.map +1 -1
  115. package/dist/Toolbar.js +8 -66
  116. package/dist/Tooltip.d.ts +20 -20
  117. package/dist/Tooltip.js +6 -6
  118. package/dist/Tree.d.ts +43 -229
  119. package/dist/Tree.d.ts.map +1 -1
  120. package/dist/Tree.js +12 -113
  121. package/dist/TreeGrid.d.ts +45 -264
  122. package/dist/TreeGrid.d.ts.map +1 -1
  123. package/dist/TreeGrid.js +13 -125
  124. package/dist/VisuallyHidden.d.ts +41 -27
  125. package/dist/VisuallyHidden.d.ts.map +1 -1
  126. package/dist/VisuallyHidden.js +27 -10
  127. package/dist/WindowSplitter.d.ts +68 -108
  128. package/dist/WindowSplitter.d.ts.map +1 -1
  129. package/dist/WindowSplitter.js +106 -23
  130. package/package.json +13 -12
package/dist/Menu.d.ts CHANGED
@@ -8,6 +8,8 @@
8
8
  * the state and pure operations without mounting UI, or supply custom hosts without replacing native
9
9
  * events and browser-owned focus.
10
10
  *
11
+ * Learn the interaction in the [Menu guide](/explore/ui-menu).
12
+ *
11
13
  * @since 1.0.0
12
14
  * @category modules
13
15
  * @packageDocumentation
@@ -23,43 +25,29 @@ import * as Composite from "./Composite.js";
23
25
  import * as Dom from "./Dom.js";
24
26
  import type { HostResult } from "./Dom/Types.js";
25
27
  /**
26
- * Complete renderer-independent state for Menu.
27
- *
28
- * @remarks
29
- * ## Why
30
- *
31
- * Applications can inspect, update, and test Menu behavior without mounting or coupling the state
32
- * to a renderer.
28
+ * Popup identity, visibility, and active command focus.
29
+ * Checked preferences and command results belong to the application, not this state.
33
30
  *
34
- * ## Ownership and lifetime
35
- *
36
- * This declaration is data or schema metadata and acquires no resources.
37
- *
38
- * ## Example
39
- *
40
- * Import with `import type { State } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
41
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Inside the linked program,
42
- * `const snapshot: State = yield* state` exposes popup identity, open state, and active-item focus.
43
31
  * @since 1.0.0
44
- * @category models
32
+ * @category Popup state
45
33
  */
46
34
  export interface State extends Omit<Composite.State, "orientation"> {
47
35
  /**
48
36
  * Axis used to interpret Arrow-key movement.
49
37
  * @since 1.0.0
50
- * @category models
38
+ * @category Keyboard navigation
51
39
  */
52
40
  readonly orientation: "vertical";
53
41
  /**
54
42
  * Stable id used for collection identity and ARIA relationships.
55
43
  * @since 1.0.0
56
- * @category models
44
+ * @category Identity and relationships
57
45
  */
58
46
  readonly id: string;
59
47
  /**
60
48
  * Whether the associated native popover is open.
61
49
  * @since 1.0.0
62
- * @category models
50
+ * @category Popup visibility
63
51
  */
64
52
  readonly open: boolean;
65
53
  }
@@ -67,47 +55,32 @@ export interface State extends Omit<Composite.State, "orientation"> {
67
55
  * Initial Menu values. The caller supplies id; open defaults false, activeId null, loop true, and
68
56
  * orientation vertical.
69
57
  *
70
- * @remarks
71
- * ## Why
72
- *
73
- * Making initialization explicit documents hydration-sensitive defaults and lets servers and
74
- * clients construct matching state.
75
- *
76
- * ## Ownership and lifetime
77
- *
78
- * This declaration is data or schema metadata and acquires no resources.
79
- *
80
- * ## Example
81
- *
82
- * Import with `import type { InitialState } from "@typed/ui/Menu";` Extend the [Menu.makeState
83
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). Construct a closed menu with
84
- * `const initial: InitialState = { id: "file-menu", open: false }; const state = yield* Menu.makeState(initial)`.
85
58
  * @since 1.0.0
86
- * @category models
59
+ * @category Popup state
87
60
  */
88
61
  export interface InitialState {
89
62
  /**
90
63
  * Stable id used for collection identity and ARIA relationships.
91
64
  * @since 1.0.0
92
- * @category models
65
+ * @category Identity and relationships
93
66
  */
94
67
  readonly id: string;
95
68
  /**
96
69
  * Whether the associated native popover is open.
97
70
  * @since 1.0.0
98
- * @category models
71
+ * @category Popup visibility
99
72
  */
100
73
  readonly open?: boolean;
101
74
  /**
102
75
  * Id currently active for keyboard navigation; null means no active item.
103
76
  * @since 1.0.0
104
- * @category models
77
+ * @category Keyboard focus
105
78
  */
106
79
  readonly activeId?: string | null;
107
80
  /**
108
81
  * Whether movement wraps between the first and last enabled items.
109
82
  * @since 1.0.0
110
- * @category models
83
+ * @category Keyboard navigation
111
84
  */
112
85
  readonly loop?: boolean;
113
86
  }
@@ -115,15 +88,6 @@ export interface InitialState {
115
88
  * Effect Schema used by makeState to encode, decode, and hydrate Menu state.
116
89
  *
117
90
  * @remarks
118
- * ## Why
119
- *
120
- * A public schema makes hydration and serialized state use the same runtime validation as direct
121
- * construction.
122
- *
123
- * ## Ownership and lifetime
124
- *
125
- * This declaration is data or schema metadata and acquires no resources.
126
- *
127
91
  * @example
128
92
  * ```ts
129
93
  * import * as Schema from "effect/Schema";
@@ -132,7 +96,7 @@ export interface InitialState {
132
96
  * const decodeState = Schema.decodeUnknownEffect(Menu.StateSchema);
133
97
  * ```
134
98
  * @since 1.0.0
135
- * @category schemas
99
+ * @category Popup state
136
100
  */
137
101
  export declare const StateSchema: Schema.Struct<{
138
102
  readonly id: Schema.String;
@@ -148,12 +112,6 @@ export declare const StateSchema: Schema.Struct<{
148
112
  * true, and orientation vertical.
149
113
  *
150
114
  * @remarks
151
- * ## Why
152
- *
153
- * State and collection ownership can be composed and tested independently from any renderer.
154
- *
155
- * ## Ownership and lifetime
156
- *
157
115
  * The returned Effect creates the RefSubject when run. That state is renderer-independent;
158
116
  * collection registrations belong to the separate Scope that runs register or ref, not to state
159
117
  * creation.
@@ -172,7 +130,7 @@ export declare const StateSchema: Schema.Struct<{
172
130
  * );
173
131
  * ```
174
132
  * @since 1.0.0
175
- * @category constructors
133
+ * @category Popup state
176
134
  */
177
135
  export declare function makeState(initial: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{
178
136
  readonly id: string;
@@ -187,12 +145,6 @@ export declare function makeState(initial: InitialState): Effect.Effect<RefSubje
187
145
  * Creates a scoped Collection for Menu items.
188
146
  *
189
147
  * @remarks
190
- * ## Why
191
- *
192
- * State and collection ownership can be composed and tested independently from any renderer.
193
- *
194
- * ## Ownership and lifetime
195
- *
196
148
  * The returned Effect allocates the RefSubject in the caller's Scope. Each later registration is
197
149
  * owned by the Scope that runs register, independently of this construction Effect.
198
150
  *
@@ -209,65 +161,41 @@ export declare function makeState(initial: InitialState): Effect.Effect<RefSubje
209
161
  * );
210
162
  * ```
211
163
  * @since 1.0.0
212
- * @category constructors
164
+ * @category Command registration
213
165
  */
214
166
  export declare const makeCollection: (initial?: Collection.State<string, Element>) => Effect.Effect<RefSubject.RefSubject<Collection.State<string, Element>, never, never>, never, Scope.Scope>;
215
167
  /**
216
168
  * Updates only the menu's explicit open state.
217
169
  *
218
170
  * @remarks
219
- * ## Why
220
- *
221
171
  * The operation exposes Menu's transition directly so callers can compose it in Effect programs
222
172
  * and native event handlers.
223
173
  *
224
- * ## Ownership and lifetime
225
- *
226
- * The returned Effect performs the update or DOM side effect only when run, preserves the declared
227
- * error and service channels, and retains no resources after completion.
228
- *
229
- * ## Example
230
- *
231
- * Import with `import { setOpen } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
232
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Inside the linked Effect program invoke
233
- * `yield* setOpen(state, true)`, then read state to observe `open: true` without changing focus or
234
- * menu identity.
235
174
  * @since 1.0.0
236
- * @category combinators
175
+ * @category Popup state
237
176
  */
238
177
  export declare function setOpen<E, R>(state: RefSubject.RefSubject<State, E, R>, open: boolean): Effect.Effect<State, E, R>;
239
178
  /**
240
179
  * Inputs accepted by Menu.Trigger in addition to the shared DOM host options.
241
180
  *
242
181
  * @remarks
243
- * ## Why
244
- *
245
182
  * Separator orientation is an accessibility announcement only, so it remains independent from the
246
183
  * orientation used by menu keyboard navigation.
247
184
  *
248
- * ## Ownership and lifetime
249
- *
250
- * This declaration is data or schema metadata and acquires no resources.
251
- *
252
- * ## Example
253
- *
254
- * Import with `import type { TriggerOptions } from "@typed/ui/Menu";` Extend the [Menu.makeState
255
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). A native popover trigger accepts
256
- * `const options: TriggerOptions = { state, content: "File" }`.
257
185
  * @since 1.0.0
258
- * @category models
186
+ * @category Opening a menu
259
187
  */
260
188
  export interface TriggerOptions extends Dom.HostOptions<HTMLButtonElement> {
261
189
  /**
262
190
  * Renderer-independent RefSubject state consumed by this component or operation.
263
191
  * @since 1.0.0
264
- * @category models
192
+ * @category State connection
265
193
  */
266
194
  readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
267
195
  /**
268
196
  * Renderable child content for the component host.
269
197
  * @since 1.0.0
270
- * @category models
198
+ * @category Rendered content
271
199
  */
272
200
  readonly content: Renderable.Any;
273
201
  }
@@ -285,99 +213,64 @@ type TriggerProps<Options extends TriggerOptions> = ReturnType<ReturnType<typeof
285
213
  * Renders a native button targeting menu popover content and opens the menu on ArrowDown.
286
214
  *
287
215
  * @remarks
288
- * ## Why
289
- *
290
- * The component applies the family behavior while leaving callers free to supply a custom host
291
- * through the shared DOM boundary.
292
- *
293
- * ## Ownership and lifetime
294
- *
295
216
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
296
217
  * collection registrations only when rendered. The rendering Scope removes those resources;
297
218
  * unrelated nodes and attributes remain caller-owned.
298
219
  *
299
- * ## Example
300
- *
301
- * Import with `import { Trigger } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
302
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
303
- * read with `Trigger({ state, content: "File" })`; render that Fx before the same Scope closes.
304
220
  * @since 1.0.0
305
- * @category components
221
+ * @category Opening a menu
306
222
  */
307
223
  export declare function Trigger<const Options extends TriggerOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, TriggerProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
308
224
  /**
309
225
  * Consumer-facing alias of the canonical Menu component with identical behavior and lifetime.
310
226
  *
311
227
  * @remarks
312
- * ## Why
313
- *
314
- * The component applies the family behavior while leaving callers free to supply a custom host
315
- * through the shared DOM boundary.
316
- *
317
- * ## Ownership and lifetime
318
- *
319
228
  * The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
320
229
  * ownership contract.
321
230
  *
322
- * ## Example
323
- *
324
- * Import with `import { Button } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
325
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
326
- * read with `Button({ state, content: "File" })`; render that Fx before the same Scope closes.
327
231
  * @since 1.0.0
328
- * @category components
232
+ * @category Opening a menu
329
233
  */
330
234
  export declare const Button: typeof Trigger;
331
235
  /**
332
236
  * Inputs accepted by Menu.Content in addition to the shared DOM host options.
333
237
  *
334
238
  * @remarks
335
- * ## Why
336
- *
337
239
  * The model makes popup content, optional collection navigation, and optional parent-menu linkage
338
240
  * explicit while retaining the shared custom-host boundary.
339
241
  *
340
- * ## Ownership and lifetime
341
- *
342
- * This declaration is data or schema metadata and acquires no resources.
343
- *
344
- * ## Example
345
- *
346
- * Import with `import type { ContentOptions } from "@typed/ui/Menu";` Extend the [Menu.makeState
347
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). Enable menu movement with
348
- * `const options: ContentOptions = { state, collection, label: "File", content: "Commands" }`.
349
242
  * @since 1.0.0
350
- * @category models
243
+ * @category Menu surface
351
244
  */
352
245
  export interface ContentOptions extends Dom.HostOptions<HTMLDivElement> {
353
246
  /**
354
247
  * Renderer-independent RefSubject state consumed by this component or operation.
355
248
  * @since 1.0.0
356
- * @category models
249
+ * @category State connection
357
250
  */
358
251
  readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
359
252
  /**
360
253
  * Item registry used for collection-driven keyboard behavior and mounted ordering.
361
254
  * @since 1.0.0
362
- * @category models
255
+ * @category Item registration
363
256
  */
364
257
  readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
365
258
  /**
366
259
  * Parent-menu state and collection used for nested directional navigation and focus return.
367
260
  * @since 1.0.0
368
- * @category models
261
+ * @category Nested menus
369
262
  */
370
263
  readonly parent?: ParentMenu;
371
264
  /**
372
265
  * Renderable child content for the component host.
373
266
  * @since 1.0.0
374
- * @category models
267
+ * @category Rendered content
375
268
  */
376
269
  readonly content: Renderable.Any;
377
270
  /**
378
271
  * Accessible label rendered through aria-label.
379
272
  * @since 1.0.0
380
- * @category models
273
+ * @category Accessible naming
381
274
  */
382
275
  readonly label?: Renderable.Any<string | null | undefined>;
383
276
  }
@@ -385,40 +278,29 @@ export interface ContentOptions extends Dom.HostOptions<HTMLDivElement> {
385
278
  * Public Menu.ParentMenu behavioral model.
386
279
  *
387
280
  * @remarks
388
- * ## Why
389
- *
390
281
  * The public model lets custom composites reuse Menu's deterministic policy without copying an
391
282
  * internal shape.
392
283
  *
393
- * ## Ownership and lifetime
394
- *
395
- * This declaration is data or schema metadata and acquires no resources.
396
- *
397
- * ## Example
398
- *
399
- * Import with `import type { ParentMenu } from "@typed/ui/Menu";` Extend the [Menu.makeState
400
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). Nested menus carry their parent
401
- * navigation pair explicitly: `const parent: ParentMenu = { state, collection }`.
402
284
  * @since 1.0.0
403
- * @category models
285
+ * @category Nested menus
404
286
  */
405
287
  export interface ParentMenu {
406
288
  /**
407
289
  * Renderer-independent RefSubject state consumed by this component or operation.
408
290
  * @since 1.0.0
409
- * @category models
291
+ * @category State connection
410
292
  */
411
293
  readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
412
294
  /**
413
295
  * Item registry used for collection-driven keyboard behavior and mounted ordering.
414
296
  * @since 1.0.0
415
- * @category models
297
+ * @category Item registration
416
298
  */
417
299
  readonly collection: RefSubject.RefSubject<Collection.State<string>>;
418
300
  /**
419
301
  * Id of the trigger that owns this menu and receives focus when the menu closes.
420
302
  * @since 1.0.0
421
- * @category models
303
+ * @category Nested menus
422
304
  */
423
305
  readonly triggerId: string;
424
306
  }
@@ -437,119 +319,82 @@ type ContentProps<Options extends ContentOptions> = ReturnType<ReturnType<typeof
437
319
  * traversal.
438
320
  *
439
321
  * @remarks
440
- * ## Why
441
- *
442
- * The component applies the family behavior while leaving callers free to supply a custom host
443
- * through the shared DOM boundary.
444
- *
445
- * ## Ownership and lifetime
446
- *
447
322
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
448
323
  * collection registrations only when rendered. The rendering Scope removes those resources;
449
324
  * unrelated nodes and attributes remain caller-owned.
450
325
  *
451
- * ## Example
452
- *
453
- * Import with `import { Content } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
454
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
455
- * read with `Content({ state, label: "File", content: "Commands" })`; render that Fx before the
456
- * same Scope closes.
457
326
  * @since 1.0.0
458
- * @category components
327
+ * @category Menu surface
459
328
  */
460
329
  export declare function Content<const Options extends ContentOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ContentProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
461
330
  /**
462
331
  * Consumer-facing alias of the canonical Menu component with identical behavior and lifetime.
463
332
  *
464
333
  * @remarks
465
- * ## Why
466
- *
467
- * The component applies the family behavior while leaving callers free to supply a custom host
468
- * through the shared DOM boundary.
469
- *
470
- * ## Ownership and lifetime
471
- *
472
334
  * The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
473
335
  * ownership contract.
474
336
  *
475
- * ## Example
476
- *
477
- * Import with `import { Menu } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
478
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
479
- * read with `Menu({ state, label: "File", content: "Commands" })`; render that Fx before the same
480
- * Scope closes.
481
337
  * @since 1.0.0
482
- * @category components
338
+ * @category Menu surface
483
339
  */
484
340
  export declare const Menu: typeof Content;
485
341
  /**
486
342
  * Inputs accepted by Menu.Item in addition to the shared DOM host options.
487
343
  *
488
344
  * @remarks
489
- * ## Why
490
- *
491
345
  * The model makes item identity, content, optional registration metadata, and state ownership
492
346
  * explicit before the item is rendered.
493
347
  *
494
- * ## Ownership and lifetime
495
- *
496
- * This declaration is data or schema metadata and acquires no resources.
497
- *
498
- * ## Example
499
- *
500
- * Import with `import type { ItemOptions } from "@typed/ui/Menu";` Extend the [Menu.makeState
501
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). A menu command is
502
- * `const options: ItemOptions = { state, collection, id: "save", content: "Save" }`.
503
348
  * @since 1.0.0
504
- * @category models
349
+ * @category Commands
505
350
  */
506
351
  export interface ItemOptions extends Dom.HostOptions<HTMLDivElement> {
507
352
  /**
508
353
  * Renderer-independent RefSubject state consumed by this component or operation.
509
354
  * @since 1.0.0
510
- * @category models
355
+ * @category State connection
511
356
  */
512
357
  readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
513
358
  /**
514
359
  * Item registry used for collection-driven keyboard behavior and mounted ordering.
515
360
  * @since 1.0.0
516
- * @category models
361
+ * @category Item registration
517
362
  */
518
363
  readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
519
364
  /**
520
365
  * Stable id used for collection identity and ARIA relationships.
521
366
  * @since 1.0.0
522
- * @category models
367
+ * @category Identity and relationships
523
368
  */
524
369
  readonly id: string;
525
370
  /**
526
371
  * Renderable child content for the component host.
527
372
  * @since 1.0.0
528
- * @category models
373
+ * @category Rendered content
529
374
  */
530
375
  readonly content: Renderable.Any;
531
376
  /**
532
377
  * Search text used by typeahead independently of rendered markup.
533
378
  * @since 1.0.0
534
- * @category models
379
+ * @category Text matching
535
380
  */
536
381
  readonly textValue?: string;
537
382
  /**
538
383
  * Flag used by collection movement and widget handlers to skip activation by default.
539
384
  * @since 1.0.0
540
- * @category models
385
+ * @category Availability
541
386
  */
542
387
  readonly disabled?: boolean;
543
388
  /**
544
389
  * ARIA role emitted by the item variant.
545
390
  * @since 1.0.0
546
- * @category models
391
+ * @category Command semantics
547
392
  */
548
393
  readonly role?: "menuitem" | "menuitemcheckbox" | "menuitemradio";
549
394
  /**
550
395
  * Checked state exposed by checkbox and radio menu-item variants.
551
396
  * @since 1.0.0
552
- * @category models
397
+ * @category Checked state
553
398
  */
554
399
  readonly checked?: Renderable.Any<boolean | null | undefined>;
555
400
  }
@@ -572,90 +417,61 @@ type ItemProps<Options extends ItemOptions> = ReturnType<ReturnType<typeof itemP
572
417
  * activate.
573
418
  *
574
419
  * @remarks
575
- * ## Why
576
- *
577
- * The component applies the family behavior while leaving callers free to supply a custom host
578
- * through the shared DOM boundary.
579
- *
580
- * ## Ownership and lifetime
581
- *
582
420
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
583
421
  * collection registrations only when rendered. The rendering Scope removes those resources;
584
422
  * unrelated nodes and attributes remain caller-owned.
585
423
  *
586
- * ## Example
587
- *
588
- * Import with `import { Item } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
589
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
590
- * read with `Item({ state, id: "save", content: "Save" })`; render that Fx before the same Scope
591
- * closes.
592
424
  * @since 1.0.0
593
- * @category components
425
+ * @category Commands
594
426
  */
595
427
  export declare function Item<const Options extends ItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ItemProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
596
428
  /**
597
429
  * Inputs accepted by Menu.SubmenuTrigger in addition to the shared DOM host options.
598
430
  *
599
- * @remarks
600
- * ## Why
601
- *
602
- * The options type makes required state, content, accessible relationships, and custom-host inputs
603
- * visible before rendering.
604
- *
605
- * ## Ownership and lifetime
606
- *
607
- * This declaration is data or schema metadata and acquires no resources.
608
- *
609
- * ## Example
610
- *
611
- * Import with `import type { SubmenuTriggerOptions } from "@typed/ui/Menu";` Extend the
612
- * [Menu.makeState runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). After
613
- * `const submenu = yield* Menu.makeState({ id: "share-menu" })`, use
614
- * `const options: SubmenuTriggerOptions<State> = { state, submenu, collection, id: "share", content: "Share" }`.
615
431
  * @since 1.0.0
616
- * @category models
432
+ * @category Nested menus
617
433
  */
618
434
  export interface SubmenuTriggerOptions<ParentState extends Composite.State> extends Dom.HostOptions<HTMLButtonElement> {
619
435
  /**
620
436
  * Renderer-independent RefSubject state consumed by this component or operation.
621
437
  * @since 1.0.0
622
- * @category models
438
+ * @category State connection
623
439
  */
624
440
  readonly state: RefSubject.HydratedRefSubject<ParentState, Schema.SchemaError>;
625
441
  /**
626
442
  * Whether the item participates as a submenu entry.
627
443
  * @since 1.0.0
628
- * @category models
444
+ * @category Nested menus
629
445
  */
630
446
  readonly submenu: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
631
447
  /**
632
448
  * Item registry used for collection-driven keyboard behavior and mounted ordering.
633
449
  * @since 1.0.0
634
- * @category models
450
+ * @category Item registration
635
451
  */
636
452
  readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
637
453
  /**
638
454
  * Stable id used for collection identity and ARIA relationships.
639
455
  * @since 1.0.0
640
- * @category models
456
+ * @category Identity and relationships
641
457
  */
642
458
  readonly id: string;
643
459
  /**
644
460
  * Renderable child content for the component host.
645
461
  * @since 1.0.0
646
- * @category models
462
+ * @category Rendered content
647
463
  */
648
464
  readonly content: Renderable.Any;
649
465
  /**
650
466
  * Search text used by typeahead independently of rendered markup.
651
467
  * @since 1.0.0
652
- * @category models
468
+ * @category Text matching
653
469
  */
654
470
  readonly textValue?: string;
655
471
  /**
656
472
  * Flag used by collection movement and widget handlers to skip activation by default.
657
473
  * @since 1.0.0
658
- * @category models
474
+ * @category Availability
659
475
  */
660
476
  readonly disabled?: boolean;
661
477
  }
@@ -680,26 +496,12 @@ type SubmenuTriggerProps<ParentState extends Composite.State, Options extends Su
680
496
  * focus.
681
497
  *
682
498
  * @remarks
683
- * ## Why
684
- *
685
- * The component applies the family behavior while leaving callers free to supply a custom host
686
- * through the shared DOM boundary.
687
- *
688
- * ## Ownership and lifetime
689
- *
690
499
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
691
500
  * collection registrations only when rendered. The rendering Scope removes those resources;
692
501
  * unrelated nodes and attributes remain caller-owned.
693
502
  *
694
- * ## Example
695
- *
696
- * Import with `import { SubmenuTrigger } from "@typed/ui/Menu";` Extend the [Menu.makeState
697
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final
698
- * snapshot read after `const submenu = yield* Menu.makeState({ id: "share-menu" })` with
699
- * `SubmenuTrigger({ state, submenu, collection, id: "share", content: "Share" })`; render that Fx
700
- * before the same Scope closes.
701
503
  * @since 1.0.0
702
- * @category components
504
+ * @category Nested menus
703
505
  */
704
506
  export declare function SubmenuTrigger<ParentState extends Composite.State, const Options extends SubmenuTriggerOptions<NoInfer<ParentState>>, const Host extends HostResult = never>(options: Options & {
705
507
  readonly state: RefSubject.HydratedRefSubject<ParentState, Schema.SchemaError>;
@@ -707,30 +509,14 @@ export declare function SubmenuTrigger<ParentState extends Composite.State, cons
707
509
  /**
708
510
  * Inputs accepted by Menu.CheckboxItem in addition to the shared DOM host options.
709
511
  *
710
- * @remarks
711
- * ## Why
712
- *
713
- * The options type makes required state, content, accessible relationships, and custom-host inputs
714
- * visible before rendering.
715
- *
716
- * ## Ownership and lifetime
717
- *
718
- * This declaration is data or schema metadata and acquires no resources.
719
- *
720
- * ## Example
721
- *
722
- * Import with `import type { CheckboxItemOptions } from "@typed/ui/Menu";` Extend the
723
- * [Menu.makeState runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). A checked command
724
- * is
725
- * `const options: CheckboxItemOptions = { state, collection, id: "autosave", checked: true, content: "Autosave" }`.
726
512
  * @since 1.0.0
727
- * @category models
513
+ * @category Checked commands
728
514
  */
729
515
  export interface CheckboxItemOptions extends Omit<ItemOptions, "role" | "checked"> {
730
516
  /**
731
517
  * Checked state exposed by checkbox and radio menu-item variants.
732
518
  * @since 1.0.0
733
- * @category models
519
+ * @category Checked state
734
520
  */
735
521
  readonly checked: Renderable.Any<boolean | null | undefined>;
736
522
  }
@@ -741,53 +527,25 @@ type CheckboxItemWithRole<Options extends CheckboxItemOptions> = Options & {
741
527
  * Renders Item with menuitemcheckbox semantics and caller-supplied checked state.
742
528
  *
743
529
  * @remarks
744
- * ## Why
745
- *
746
- * The component applies the family behavior while leaving callers free to supply a custom host
747
- * through the shared DOM boundary.
748
- *
749
- * ## Ownership and lifetime
750
- *
751
530
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
752
531
  * collection registrations only when rendered. The rendering Scope removes those resources;
753
532
  * unrelated nodes and attributes remain caller-owned.
754
533
  *
755
- * ## Example
756
- *
757
- * Import with `import { CheckboxItem } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
758
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
759
- * read with `CheckboxItem({ state, id: "autosave", checked: true, content: "Autosave" })`; render
760
- * that Fx before the same Scope closes.
761
534
  * @since 1.0.0
762
- * @category components
535
+ * @category Checked commands
763
536
  */
764
537
  export declare function CheckboxItem<const Options extends CheckboxItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<CheckboxItemWithRole<Options>, ItemProps<CheckboxItemWithRole<Options>>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
765
538
  /**
766
539
  * Inputs accepted by Menu.RadioItem in addition to the shared DOM host options.
767
540
  *
768
- * @remarks
769
- * ## Why
770
- *
771
- * The options type makes required state, content, accessible relationships, and custom-host inputs
772
- * visible before rendering.
773
- *
774
- * ## Ownership and lifetime
775
- *
776
- * This declaration is data or schema metadata and acquires no resources.
777
- *
778
- * ## Example
779
- *
780
- * Import with `import type { RadioItemOptions } from "@typed/ui/Menu";` Extend the [Menu.makeState
781
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). A radio command is
782
- * `const options: RadioItemOptions = { state, collection, id: "compact", checked: false, content: "Compact" }`.
783
541
  * @since 1.0.0
784
- * @category models
542
+ * @category Checked commands
785
543
  */
786
544
  export interface RadioItemOptions extends Omit<ItemOptions, "role" | "checked"> {
787
545
  /**
788
546
  * Checked state exposed by checkbox and radio menu-item variants.
789
547
  * @since 1.0.0
790
- * @category models
548
+ * @category Checked state
791
549
  */
792
550
  readonly checked: Renderable.Any<boolean | null | undefined>;
793
551
  }
@@ -798,59 +556,31 @@ type RadioItemWithRole<Options extends RadioItemOptions> = Options & {
798
556
  * Renders Item with menuitemradio semantics and caller-supplied checked state.
799
557
  *
800
558
  * @remarks
801
- * ## Why
802
- *
803
- * The component applies the family behavior while leaving callers free to supply a custom host
804
- * through the shared DOM boundary.
805
- *
806
- * ## Ownership and lifetime
807
- *
808
559
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
809
560
  * collection registrations only when rendered. The rendering Scope removes those resources;
810
561
  * unrelated nodes and attributes remain caller-owned.
811
562
  *
812
- * ## Example
813
- *
814
- * Import with `import { RadioItem } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
815
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
816
- * read with `RadioItem({ state, id: "compact", checked: false, content: "Compact" })`; render that
817
- * Fx before the same Scope closes.
818
563
  * @since 1.0.0
819
- * @category components
564
+ * @category Checked commands
820
565
  */
821
566
  export declare function RadioItem<const Options extends RadioItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<RadioItemWithRole<Options>, ItemProps<RadioItemWithRole<Options>>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
822
567
  /**
823
568
  * Inputs accepted by Menu.Group in addition to the shared DOM host options.
824
569
  *
825
- * @remarks
826
- * ## Why
827
- *
828
- * The options type makes required state, content, accessible relationships, and custom-host inputs
829
- * visible before rendering.
830
- *
831
- * ## Ownership and lifetime
832
- *
833
- * This declaration is data or schema metadata and acquires no resources.
834
- *
835
- * ## Example
836
- *
837
- * Import with `import type { GroupOptions } from "@typed/ui/Menu";` Extend the [Menu.makeState
838
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). A labeled command group accepts
839
- * `const options: GroupOptions = { label: "View", content: "Choices" }`.
840
570
  * @since 1.0.0
841
- * @category models
571
+ * @category Command grouping
842
572
  */
843
573
  export interface GroupOptions extends Dom.HostOptions<HTMLDivElement> {
844
574
  /**
845
575
  * Renderable child content for the component host.
846
576
  * @since 1.0.0
847
- * @category models
577
+ * @category Rendered content
848
578
  */
849
579
  readonly content: Renderable.Any;
850
580
  /**
851
581
  * Accessible label rendered through aria-label.
852
582
  * @since 1.0.0
853
- * @category models
583
+ * @category Accessible naming
854
584
  */
855
585
  readonly label?: Renderable.Any<string | null | undefined>;
856
586
  }
@@ -863,13 +593,6 @@ type GroupProps<Options extends GroupOptions> = ReturnType<ReturnType<typeof gro
863
593
  * Renders a labelled ARIA group inside menu content.
864
594
  *
865
595
  * @remarks
866
- * ## Why
867
- *
868
- * The component applies the family behavior while leaving callers free to supply a custom host
869
- * through the shared DOM boundary.
870
- *
871
- * ## Ownership and lifetime
872
- *
873
596
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
874
597
  * collection registrations only when rendered. The rendering Scope removes those resources;
875
598
  * unrelated nodes and attributes remain caller-owned.
@@ -881,60 +604,35 @@ type GroupProps<Options extends GroupOptions> = ReturnType<ReturnType<typeof gro
881
604
  * const view = Menu.Group({ label: "View", content: "Choices" });
882
605
  * ```
883
606
  * @since 1.0.0
884
- * @category components
607
+ * @category Command grouping
885
608
  */
886
609
  export declare function Group<const Options extends GroupOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, GroupProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
887
610
  /**
888
611
  * Consumer-facing alias of the canonical Menu component with identical behavior and lifetime.
889
612
  *
890
613
  * @remarks
891
- * ## Why
892
- *
893
- * The component applies the family behavior while leaving callers free to supply a custom host
894
- * through the shared DOM boundary.
895
- *
896
- * ## Ownership and lifetime
897
- *
898
614
  * The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
899
615
  * ownership contract.
900
616
  *
901
- * ## Example
902
- *
903
- * Import with `import { Dismiss } from "@typed/ui/Menu";` Extend the [Menu.makeState runnable
904
- * setup](/reference/%40typed%2Fui%2FMenu%23makeState). Replace the linked program's final snapshot
905
- * read with `Dismiss({ state, id: "close", content: "Close" })`; render that Fx before the same
906
- * Scope closes.
907
617
  * @since 1.0.0
908
- * @category components
618
+ * @category Commands
909
619
  */
910
620
  export declare const Dismiss: typeof Item;
911
621
  /**
912
622
  * Inputs accepted by Menu.Separator in addition to the shared DOM host options.
913
623
  *
914
624
  * @remarks
915
- * ## Why
916
- *
917
625
  * The model adds separator orientation to the shared host options. Orientation is consumed only
918
626
  * by the separator's `aria-orientation` attribute; it does not change menu navigation.
919
627
  *
920
- * ## Ownership and lifetime
921
- *
922
- * This declaration is data or schema metadata and acquires no resources.
923
- *
924
- * ## Example
925
- *
926
- * Import with `import type { SeparatorOptions } from "@typed/ui/Menu";` Extend the [Menu.makeState
927
- * runnable setup](/reference/%40typed%2Fui%2FMenu%23makeState). Choose only its announced axis:
928
- * `const options: SeparatorOptions = { orientation: "vertical" }`; this does not alter Arrow-key
929
- * behavior.
930
628
  * @since 1.0.0
931
- * @category models
629
+ * @category Command grouping
932
630
  */
933
631
  export interface SeparatorOptions extends Dom.HostOptions<HTMLHRElement> {
934
632
  /**
935
633
  * Value forwarded only to the separator's aria-orientation attribute.
936
634
  * @since 1.0.0
937
- * @category models
635
+ * @category Keyboard navigation
938
636
  */
939
637
  readonly orientation?: "horizontal" | "vertical";
940
638
  }
@@ -947,13 +645,6 @@ type SeparatorProps<Options extends SeparatorOptions> = ReturnType<ReturnType<ty
947
645
  * Renders a separator with explicit horizontal or vertical orientation.
948
646
  *
949
647
  * @remarks
950
- * ## Why
951
- *
952
- * The component applies the family behavior while leaving callers free to supply a custom host
953
- * through the shared DOM boundary.
954
- *
955
- * ## Ownership and lifetime
956
- *
957
648
  * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
958
649
  * collection registrations only when rendered. The rendering Scope removes those resources;
959
650
  * unrelated nodes and attributes remain caller-owned.
@@ -965,7 +656,7 @@ type SeparatorProps<Options extends SeparatorOptions> = ReturnType<ReturnType<ty
965
656
  * const view = Menu.Separator({ orientation: "horizontal" });
966
657
  * ```
967
658
  * @since 1.0.0
968
- * @category components
659
+ * @category Command grouping
969
660
  */
970
661
  export declare function Separator<const Options extends SeparatorOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, SeparatorProps<Options>>, "", Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
971
662
  export {};