@molecule/app-ui 1.5.0 → 1.14.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.
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-19T18:11:48.672Z
6
+ Generated: 2026-11-26T08:58:25.815Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-ui
@@ -37,13 +37,1572 @@ const cm = getClassMap()
37
37
  ## Installation
38
38
 
39
39
  ```bash
40
- npm install @molecule/app-ui @molecule/app-bond @molecule/app-i18n
40
+ npm install @molecule/app-ui @molecule/app-bond @molecule/app-filesystem @molecule/app-i18n
41
41
  ```
42
42
 
43
43
  ## API
44
44
 
45
45
  ### Interfaces
46
46
 
47
+ #### `ElementHandle`
48
+
49
+ What an element's `ref` receives on every renderer: a DOM element and a React Native host
50
+ instance both satisfy it. Measure an element with the kit's `measureElement`, never with
51
+ `getBoundingClientRect`.
52
+
53
+ ```typescript
54
+ interface ElementHandle {
55
+ /** Moves focus to the element. */
56
+ focus(): void
57
+ /** Removes focus from the element. */
58
+ blur(): void
59
+ /** Selects the entire current text field value, via DOM selection or native TextInput selection. */
60
+ select?(): void
61
+ }
62
+ ```
63
+
64
+ #### `ElementBox`
65
+
66
+ An element's box in the window, in CSS pixels on the web and density-independent pixels on native.
67
+
68
+ ```typescript
69
+ interface ElementBox {
70
+ /** Distance from the window's left edge. */
71
+ x: number
72
+ /** Distance from the window's top edge. */
73
+ y: number
74
+ /** Width of the box. */
75
+ width: number
76
+ /** Height of the box. */
77
+ height: number
78
+ }
79
+ ```
80
+
81
+ #### `ElementViewport`
82
+
83
+ The visible window containing a registered element.
84
+
85
+ ```typescript
86
+ interface ElementViewport {
87
+ /** Available width, excluding the browser's scrollbar, or the native window width. */
88
+ readonly width: number
89
+ /** Full browser viewport or native window height. */
90
+ readonly height: number
91
+ /** Height excluding the browser's scrollbar. Equal to height on a device. */
92
+ readonly contentHeight: number
93
+ /** Web content uses the document scroll. Device content scrolls in an element. */
94
+ readonly scrollOwner: 'document' | 'element'
95
+ }
96
+ ```
97
+
98
+ #### `ElementDragPoint`
99
+
100
+ One sample from the contact that owns a drag, in CSS pixels on web or dp on native.
101
+
102
+ ```typescript
103
+ interface ElementDragPoint extends KitModifierKeys {
104
+ /** Unclamped horizontal offset from the current HTML box, SVG viewport, or native frame. */
105
+ readonly x: number
106
+ /** Unclamped vertical offset from the current HTML box, SVG viewport, or native frame. */
107
+ readonly y: number
108
+ /** Horizontal displacement from contact-down in viewport axes on either renderer. */
109
+ readonly dx: number
110
+ /** Vertical displacement from contact-down in viewport axes on either renderer. */
111
+ readonly dy: number
112
+ /** Current frame in the same window space as the renderer's `measureElement`. */
113
+ readonly bounds: Readonly<ElementBox>
114
+ }
115
+ ```
116
+
117
+ #### `ElementDrag`
118
+
119
+ One primary contact, owned until release or interruption on web and native.
120
+
121
+ ```typescript
122
+ interface ElementDrag {
123
+ /** Axis used to negotiate with an enclosing scroller on either renderer. Defaults to both. */
124
+ axis?: 'horizontal' | 'vertical' | 'both'
125
+ /** Whether touch acquires on contact or waits for a long press so an ordinary swipe can scroll. */
126
+ touchStart?: 'immediate' | 'longPress'
127
+ /** Acquires once, including a stationary mouse, pen, or touch on either renderer. */
128
+ onStart(point: ElementDragPoint): void
129
+ /** Reports motion of the owned pointer or native responder, including outside the surface. */
130
+ onMove?(point: ElementDragPoint): void
131
+ /** Reports the final position on web pointer-up or native touch release. */
132
+ onEnd?(point: ElementDragPoint): void
133
+ /** Reports the last reliable sample on web capture loss or native responder interruption. */
134
+ onCancel?(point: ElementDragPoint): void
135
+ }
136
+ ```
137
+
138
+ #### `ElementDragProps`
139
+
140
+ Continuous manipulation of an element, through pointer capture or the native touch responder.
141
+
142
+ ```typescript
143
+ interface ElementDragProps {
144
+ /** Binds one contact on the current box or the enclosing SVG viewport. */
145
+ drag?: ElementDrag
146
+ }
147
+ ```
148
+
149
+ #### `BoxStyle`
150
+
151
+ Inline layout and paint that CSS and React Native apply the same way. Numbers are CSS pixels on
152
+ the web and density-independent pixels on native. Shorthand strings (`padding: '8px 12px'`,
153
+ `border: '1px solid'`), CSS grid, `calc()`, `var()` and units other than pixels and percent are
154
+ not accepted: write longhands, or use a ClassMap class (the nativewind ClassMap translates
155
+ classes for native).
156
+
157
+ ```typescript
158
+ interface BoxStyle {
159
+ /** `'flex'` or `'none'`; every native view is a flex container. */
160
+ display?: 'flex' | 'none'
161
+ /** Positioning scheme. */
162
+ position?: 'relative' | 'absolute'
163
+ /** Offset from the containing block's top. */
164
+ top?: ElementLength
165
+ /** Offset from the containing block's right. */
166
+ right?: ElementLength
167
+ /** Offset from the containing block's bottom. */
168
+ bottom?: ElementLength
169
+ /** Offset from the containing block's left. */
170
+ left?: ElementLength
171
+ /** Width. */
172
+ width?: ElementLength
173
+ /** Height. */
174
+ height?: ElementLength
175
+ /** Minimum width. */
176
+ minWidth?: ElementLength
177
+ /** Minimum height. */
178
+ minHeight?: ElementLength
179
+ /** Maximum width. */
180
+ maxWidth?: ElementLength
181
+ /** Maximum height. */
182
+ maxHeight?: ElementLength
183
+ /** Margin on all sides. */
184
+ margin?: ElementLength | 'auto'
185
+ /** Top margin. */
186
+ marginTop?: ElementLength | 'auto'
187
+ /** Right margin. */
188
+ marginRight?: ElementLength | 'auto'
189
+ /** Bottom margin. */
190
+ marginBottom?: ElementLength | 'auto'
191
+ /** Left margin. */
192
+ marginLeft?: ElementLength | 'auto'
193
+ /** Padding on all sides. */
194
+ padding?: ElementLength
195
+ /** Top padding. */
196
+ paddingTop?: ElementLength
197
+ /** Right padding. */
198
+ paddingRight?: ElementLength
199
+ /** Bottom padding. */
200
+ paddingBottom?: ElementLength
201
+ /** Left padding. */
202
+ paddingLeft?: ElementLength
203
+ /** Grow and shrink factor with a zero basis (`flex: 1`). */
204
+ flex?: number
205
+ /** Grow factor. */
206
+ flexGrow?: number
207
+ /** Shrink factor. */
208
+ flexShrink?: number
209
+ /** Initial main size. */
210
+ flexBasis?: ElementLength | 'auto'
211
+ /** Main axis direction. */
212
+ flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse'
213
+ /** Whether lines wrap. */
214
+ flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
215
+ /** Cross-axis alignment of children. */
216
+ alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'
217
+ /** Cross-axis alignment of this element. */
218
+ alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'
219
+ /** Cross-axis alignment of wrapped lines. */
220
+ alignContent?:
221
+ | 'flex-start'
222
+ | 'flex-end'
223
+ | 'center'
224
+ | 'stretch'
225
+ | 'space-between'
226
+ | 'space-around'
227
+ | 'space-evenly'
228
+ /** Main-axis alignment of children. */
229
+ justifyContent?:
230
+ 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'
231
+ /** Gap between children. */
232
+ gap?: number
233
+ /** Gap between rows. */
234
+ rowGap?: number
235
+ /** Gap between columns. */
236
+ columnGap?: number
237
+ /** Clipping of overflowing children (scrolling content belongs in a `ScrollArea`). */
238
+ overflow?: 'visible' | 'hidden'
239
+ /** Stacking order. */
240
+ zIndex?: number
241
+ /** Width-to-height ratio. */
242
+ aspectRatio?: number
243
+ /** Whether the element receives pointer and touch events. */
244
+ pointerEvents?: 'auto' | 'none'
245
+ /** Opacity, 0 to 1. */
246
+ opacity?: number
247
+ /** Background colour (a theme colour belongs in a ClassMap class). */
248
+ backgroundColor?: string
249
+ /** Border width on all sides. */
250
+ borderWidth?: number
251
+ /** Top border width. */
252
+ borderTopWidth?: number
253
+ /** Right border width. */
254
+ borderRightWidth?: number
255
+ /** Bottom border width. */
256
+ borderBottomWidth?: number
257
+ /** Left border width. */
258
+ borderLeftWidth?: number
259
+ /** Border colour on all sides. */
260
+ borderColor?: string
261
+ /** Top border colour. */
262
+ borderTopColor?: string
263
+ /** Right border colour. */
264
+ borderRightColor?: string
265
+ /** Bottom border colour. */
266
+ borderBottomColor?: string
267
+ /** Left border colour. */
268
+ borderLeftColor?: string
269
+ /** Border line style. */
270
+ borderStyle?: 'solid' | 'dotted' | 'dashed'
271
+ /** Corner radius on all corners. */
272
+ borderRadius?: number
273
+ /** Top-left corner radius. */
274
+ borderTopLeftRadius?: number
275
+ /** Top-right corner radius. */
276
+ borderTopRightRadius?: number
277
+ /** Bottom-left corner radius. */
278
+ borderBottomLeftRadius?: number
279
+ /** Bottom-right corner radius. */
280
+ borderBottomRightRadius?: number
281
+ }
282
+ ```
283
+
284
+ #### `TextStyle`
285
+
286
+ {@link BoxStyle} plus the text properties, for a {@link TextProps} element only: on native,
287
+ text styles apply to a `Text` and are not inherited from a view.
288
+
289
+ ```typescript
290
+ interface TextStyle extends BoxStyle {
291
+ /** Text colour (a theme colour belongs in a ClassMap class). */
292
+ color?: string
293
+ /** Font size. */
294
+ fontSize?: number
295
+ /** Font weight. */
296
+ fontWeight?:
297
+ 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
298
+ /** Font style. */
299
+ fontStyle?: 'normal' | 'italic'
300
+ /** Line height in pixels (a multiplier such as `1.5` belongs in a ClassMap class). */
301
+ lineHeight?: `${number}px`
302
+ /** Spacing between letters. */
303
+ letterSpacing?: number
304
+ /** Horizontal alignment. */
305
+ textAlign?: 'left' | 'right' | 'center' | 'justify'
306
+ /** Letter case. */
307
+ textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize'
308
+ /** Underline and strike-through. */
309
+ textDecorationLine?: 'none' | 'underline' | 'line-through' | 'underline line-through'
310
+ }
311
+ ```
312
+
313
+ #### `AriaAttributes`
314
+
315
+ The accessibility attributes both renderers apply.
316
+
317
+ ```typescript
318
+ interface AriaAttributes {
319
+ 'aria-label'?: string
320
+ 'aria-labelledby'?: string
321
+ 'aria-describedby'?: string
322
+ 'aria-hidden'?: AriaBoolean
323
+ 'aria-disabled'?: AriaBoolean
324
+ 'aria-expanded'?: AriaBoolean
325
+ 'aria-selected'?: AriaBoolean
326
+ 'aria-checked'?: AriaBoolean | 'mixed'
327
+ 'aria-pressed'?: AriaBoolean | 'mixed'
328
+ 'aria-busy'?: AriaBoolean
329
+ 'aria-live'?: 'off' | 'polite' | 'assertive'
330
+ 'aria-valuenow'?: number
331
+ 'aria-valuemin'?: number
332
+ 'aria-valuemax'?: number
333
+ 'aria-valuetext'?: string
334
+ 'aria-current'?: AriaBoolean | 'page' | 'step' | 'location' | 'date' | 'time'
335
+ 'aria-controls'?: string
336
+ 'aria-haspopup'?: AriaBoolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'
337
+ 'aria-modal'?: AriaBoolean
338
+ 'aria-invalid'?: AriaBoolean
339
+ 'aria-required'?: AriaBoolean
340
+ 'aria-readonly'?: AriaBoolean
341
+ 'aria-orientation'?: 'horizontal' | 'vertical'
342
+ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'
343
+ /** Web heading or tree depth. Native announces the depth and keeps the element's role. */
344
+ 'aria-level'?: number
345
+ /** Web row total. Native exposes collection metadata or announces the localized total. */
346
+ 'aria-rowcount'?: number
347
+ /** Web column total. Native exposes collection metadata or announces the localized total. */
348
+ 'aria-colcount'?: number
349
+ /** One-based web row position. Native converts to collection metadata or announces the position. */
350
+ 'aria-rowindex'?: number
351
+ /** One-based web column position. Native converts to collection metadata or announces the position. */
352
+ 'aria-colindex'?: number
353
+ }
354
+ ```
355
+
356
+ #### `ElementProps`
357
+
358
+ Props every element takes.
359
+
360
+ ```typescript
361
+ interface ElementProps extends AriaAttributes, DataAttributes {
362
+ /** Element id (native `nativeID`). */
363
+ id?: string
364
+ /** ClassMap classes (`cm.*`). */
365
+ className?: string
366
+ /** Accessibility role, when it differs from the one `as` implies. */
367
+ role?: ElementRole
368
+ }
369
+ ```
370
+
371
+ #### `InteractionProps`
372
+
373
+ The interaction handlers a focusable element takes on both renderers.
374
+
375
+ ```typescript
376
+ interface InteractionProps {
377
+ /** Activation: a click on the web, a press on native. */
378
+ onClick?: MouseEventHandler
379
+ /** Pointer enters (native: hover in, where the device has a pointer). */
380
+ onMouseEnter?: MouseEventHandler
381
+ /** Pointer leaves (native: hover out). */
382
+ onMouseLeave?: MouseEventHandler
383
+ /** The element gains focus. */
384
+ onFocus?: FocusEventHandler
385
+ /** The element loses focus. */
386
+ onBlur?: FocusEventHandler
387
+ /** A hardware key goes down; every key action also needs a touch route. */
388
+ onKeyDown?: KeyboardEventHandler
389
+ /** A hardware key goes up. */
390
+ onKeyUp?: KeyboardEventHandler
391
+ /** Web-only: a device has no double click. */
392
+ onDoubleClick?: MouseEventHandler
393
+ /** Web-only (deprecated on the web too); a hardware key press. */
394
+ onKeyPress?: KeyboardEventHandler
395
+ /** Tab order: in it (`0`) or only programmatically focusable (`-1`). */
396
+ tabIndex?: number
397
+ }
398
+ ```
399
+
400
+ #### `MousePressProps`
401
+
402
+ Mouse handlers for containers and controls with corresponding device gestures.
403
+
404
+ ```typescript
405
+ interface MousePressProps {
406
+ /** DOM context menu. Native calls this for a stationary long press or secondary activation. */
407
+ onContextMenu?: MouseEventHandler
408
+ /** DOM mouse down. Native calls this on press-in and observes canceled activation. */
409
+ onMouseDown?: MouseEventHandler
410
+ }
411
+ ```
412
+
413
+ #### `BoxProps`
414
+
415
+ A container (native `View`; a native `Pressable` when it has a press, hover or focus handler or a
416
+ tab stop, as a `div` with `onClick` is). Bare text inside it is laid out as the web lays it out
417
+ (in a flex container, its own flex item; in any other, a line with its inline siblings). Use
418
+ {@link PressableProps} for a control: a button, or anything announced as one.
419
+
420
+ ```typescript
421
+ interface BoxProps<Node = unknown>
422
+ extends ElementProps, InteractionProps, MousePressProps, ElementDragProps {
423
+ /** The web tag. A label activates the first labelable control it wraps. */
424
+ as: BoxTag | 'label'
425
+ /** Tooltip text (native: the accessibility label when there is no `aria-label`). */
426
+ title?: string
427
+ /** HTML hidden state. Native excludes the box from layout, hits and accessibility while mounted. */
428
+ hidden?: boolean
429
+ /** Native groups the box and its contents as one screen-reader element when true. Web ignores this. */
430
+ accessibilityGroup?: boolean
431
+ /** Web outside mouse down. Native observes outside touches in the enclosing box tree. */
432
+ onPressOutside?: () => void
433
+ /** Observes touch-down, including on a child, without claiming it on web or native. */
434
+ onTouchStart?: () => void
435
+ /** A browser double-click, native double tap, or native assistive action. */
436
+ secondaryAction?: {
437
+ /** Localized name for the native accessibility action. The browser adds no attribute. */
438
+ label: string
439
+ /** Runs the secondary action from the browser event or native gesture or assistive action. */
440
+ run: () => void
441
+ }
442
+ /** Consumes plain-text paste on the web or through a native field or focused Paste command. */
443
+ onPasteText?: (text: string) => void
444
+ /** Layout and paint both renderers apply. */
445
+ style?: BoxStyle & {
446
+ /**
447
+ * URI painted behind the contents, centered and sized to cover the box. Web emits
448
+ * CSS background declarations here. Native draws a decorative image within the box.
449
+ * An empty URI leaves the box's background color visible.
450
+ */
451
+ coverImage?: string
452
+ }
453
+ /** Web-only paint. */
454
+ webStyle?: WebStyle
455
+ /** Child elements. */
456
+ children?: Node
457
+ }
458
+ ```
459
+
460
+ #### `DisclosureSummaryProps`
461
+
462
+ Attributes of the browser summary or its native pressable control.
463
+
464
+ ```typescript
465
+ interface DisclosureSummaryProps extends ElementProps {
466
+ /** Layout and paint for the summary on web and device. */
467
+ style?: BoxStyle
468
+ /** CSS for the summary. Devices apply the subset they can draw. */
469
+ webStyle?: WebStyle
470
+ }
471
+ ```
472
+
473
+ #### `DisclosureProps`
474
+
475
+ A disclosure with a first-child summary and a body that stays mounted while closed.
476
+
477
+ ```typescript
478
+ interface DisclosureProps<Node = unknown> extends ElementProps {
479
+ /** A literal details element on web and a view on device. */
480
+ as: 'details'
481
+ /** Initial open state and subsequent parent changes. Both renderers default to closed. */
482
+ open?: boolean
483
+ /** Content of the browser summary or native pressable summary. */
484
+ summary: Node
485
+ /** Attributes on the summary element or native pressable itself. */
486
+ summaryProps?: DisclosureSummaryProps
487
+ /** Reports the resulting state after the browser toggle event or a queued native transition. */
488
+ onToggle?: (open: boolean) => void
489
+ /** Layout and paint for the whole disclosure on web and device. */
490
+ style?: BoxStyle
491
+ /** CSS for the details element. Devices apply the subset they can draw. */
492
+ webStyle?: WebStyle
493
+ /** Body content. Both renderers hide it while closed and preserve its state. */
494
+ children?: Node
495
+ }
496
+ ```
497
+
498
+ #### `RuleProps`
499
+
500
+ A horizontal thematic break. Web renders a void element and native draws a themed line.
501
+
502
+ ```typescript
503
+ interface RuleProps extends ElementProps, Pick<BoxProps, 'style' | 'webStyle'> {
504
+ /** A literal hr on web and a separator view on device. */
505
+ as: 'hr'
506
+ /** A thematic break has no children on either renderer. */
507
+ children?: never
508
+ }
509
+ ```
510
+
511
+ #### `GlyphIconProps`
512
+
513
+ A glyph of the icon font (Material Symbols): text on the web, which the font draws by ligature
514
+ (`<span class="…">check_circle</span>`); its codepoint on native, which draws neither ligatures
515
+ nor variable axes. It flows inline, as text.
516
+
517
+ ```typescript
518
+ interface GlyphIconProps extends ElementProps {
519
+ /** The glyph's name (`check_circle`). On native, a name the font does not draw renders nothing. */
520
+ name: string
521
+ /** Draws the filled form (the font's `FILL` axis at 1). */
522
+ filled?: boolean
523
+ /** Layout and text paint both renderers apply (`fontSize`). */
524
+ style?: TextStyle
525
+ /** CSS for the web. */
526
+ webStyle?: WebStyle
527
+ }
528
+ ```
529
+
530
+ #### `DotPulseMotion`
531
+
532
+ Fractions of one cycle and the paint at its dimmest point.
533
+
534
+ ```typescript
535
+ interface DotPulseMotion {
536
+ /** Full brightness as a fraction of the CSS keyframes and the native cycle, after zero. */
537
+ readonly peakAt: number
538
+ /** Return to dim paint in the CSS keyframes and native cycle, after the peak and at or before one. */
539
+ readonly restAt: number
540
+ /** Delay between dots as a fraction of a cycle, in the CSS animation and native driver. */
541
+ readonly stagger: number
542
+ /** Opacity from zero to one at rest, set by the stylesheet and the native view animation. */
543
+ readonly dimOpacity: number
544
+ /** Scale from zero to one at rest, set by the stylesheet and the native view animation. */
545
+ readonly dimScale: number
546
+ }
547
+ ```
548
+
549
+ #### `PulseDotsProps`
550
+
551
+ Three decorative dots drawn in the inherited text colour.
552
+
553
+ ```typescript
554
+ interface PulseDotsProps {
555
+ /** Dot diameter, applied to the span in CSS px and the native view in dp. */
556
+ size: number
557
+ /** Duration of one CSS animation cycle on web or one native loop iteration on device, in ms. */
558
+ durationMs: number
559
+ }
560
+ ```
561
+
562
+ #### `PressableProps`
563
+
564
+ Something the user activates (native `Pressable`). A string child renders as the web tag's own
565
+ text and inside a native `Text`.
566
+
567
+ ```typescript
568
+ interface PressableProps<Node = unknown>
569
+ extends ElementProps, InteractionProps, MousePressProps, ElementDragProps {
570
+ /** The web tag. */
571
+ as: PressableTag
572
+ /** A button's type: always set it, a button inside a form submits it by default. */
573
+ type?: 'button' | 'submit' | 'reset'
574
+ /** Web-only: the form field name a submit button sends. */
575
+ name?: string
576
+ /** Web-only: the value a submit button sends. */
577
+ value?: string
578
+ /** Web-only: the id of the form the button belongs to. */
579
+ form?: string
580
+ /** Whether it is disabled. */
581
+ disabled?: boolean
582
+ /** A browser double-click, device double tap, or device assistive action. */
583
+ secondaryAction?: BoxProps['secondaryAction']
584
+ /** Tooltip text (native: the accessibility label when there is no `aria-label`). */
585
+ title?: string
586
+ /** Layout and paint both renderers apply. */
587
+ style?: BoxStyle
588
+ /** Web-only paint. */
589
+ webStyle?: WebStyle
590
+ /** Content: elements, or a string or number. */
591
+ children?: Node
592
+ }
593
+ ```
594
+
595
+ #### `ElementLinkProps`
596
+
597
+ A link (native `Pressable` with the link role): an app path navigates through the router, a
598
+ URL on another origin opens outside the app. A string child renders as the link's text.
599
+
600
+ ```typescript
601
+ interface ElementLinkProps<Node = unknown> extends ElementProps, InteractionProps {
602
+ /** Destination: an app path (`/settings?tab=billing`) or a URL. */
603
+ to: string
604
+ /** Replace the current history entry instead of pushing one. */
605
+ replace?: boolean
606
+ /** State stored with the new history entry. */
607
+ state?: unknown
608
+ /**
609
+ * Where a URL opens on the web: a browsing-context keyword or name (`_self`, `_blank`, `_parent`,
610
+ * `_top`, or a frame's name). On a device a URL opens outside the app whatever its target.
611
+ */
612
+ target?: string
613
+ /** Relationship of a URL to the page (`'noopener noreferrer'`). */
614
+ rel?: string
615
+ /** Tooltip text (native: the accessibility label when there is no `aria-label`). */
616
+ title?: string
617
+ /** Layout and paint both renderers apply. */
618
+ style?: BoxStyle
619
+ /** Web-only paint. */
620
+ webStyle?: WebStyle
621
+ /** Content: elements, or a string or number. */
622
+ children?: Node
623
+ }
624
+ ```
625
+
626
+ #### `TextFieldKeyEvent`
627
+
628
+ Keyboard input received by a browser text field or native TextInput.
629
+
630
+ ```typescript
631
+ interface TextFieldKeyEvent extends KitKeyboardEvent {
632
+ /** The browser reports IME-owned keystrokes, including legacy key code 229. Device key events omit it. */
633
+ readonly isComposing?: boolean
634
+ }
635
+ ```
636
+
637
+ #### `TextFieldBaseProps`
638
+
639
+ Props common to a browser text field or text area and the native TextInput.
640
+
641
+ ```typescript
642
+ interface TextFieldBaseProps extends ElementProps, Omit<InteractionProps, 'onKeyDown'> {
643
+ /** `input` for one line, `textarea` for several. */
644
+ as: 'input' | 'textarea'
645
+ /**
646
+ * The kind of text (`input` only). A device takes a date or time as text in the web's value
647
+ * format (`YYYY-MM-DD`, `HH:MM`, `YYYY-MM-DDTHH:MM`), so a form receives the same value.
648
+ */
649
+ type?:
650
+ | 'text'
651
+ | 'email'
652
+ | 'password'
653
+ | 'search'
654
+ | 'number'
655
+ | 'tel'
656
+ | 'url'
657
+ | 'date'
658
+ | 'time'
659
+ | 'datetime-local'
660
+ /** The on-screen keyboard to show. */
661
+ inputMode?: 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'
662
+ /** The field's text. */
663
+ value?: string
664
+ /** The text of a field whose text the caller does not hold, when it mounts. */
665
+ defaultValue?: string
666
+ /** Text shown while the field is empty. */
667
+ placeholder?: string
668
+ /** Whether the user can edit the text. */
669
+ readOnly?: boolean
670
+ /** Whether it is disabled. */
671
+ disabled?: boolean
672
+ /** Whether a form refuses to submit while the field is empty. */
673
+ required?: boolean
674
+ /** Longest text the field accepts. */
675
+ maxLength?: number
676
+ /** Shortest text a form accepts in the field. */
677
+ minLength?: number
678
+ /** Web-only: a pattern a form checks the text against. */
679
+ pattern?: string
680
+ /** Visible lines (`textarea` only). */
681
+ rows?: number
682
+ /** Web-only: visible columns (`textarea` only). */
683
+ cols?: number
684
+ /** Web-only: how a form sends the text's line breaks (`textarea` only). */
685
+ wrap?: 'hard' | 'soft' | 'off'
686
+ /**
687
+ * Grows the field with its text, between these line counts (`textarea` only): the field is
688
+ * `minRows` lines tall when nearly empty and scrolls past `maxRows`.
689
+ */
690
+ autoGrow?: { minRows: number; maxRows?: number }
691
+ /** Tooltip text (native: the accessibility label when there is no `aria-label`). */
692
+ title?: string
693
+ /** The autofill hint. */
694
+ autoComplete?: string
695
+ /** Web spell checking. Native passes the boolean on devices with a spell-check control. */
696
+ spellCheck?: boolean
697
+ /** Web autocorrection hint. Native maps `'on'` and `'off'` to a boolean. */
698
+ autoCorrect?: 'on' | 'off'
699
+ /** Web return-key label. Native uses the hint when the platform supports it. */
700
+ enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'
701
+ /** Moves focus to the field when it mounts. */
702
+ autoFocus?: boolean
703
+ /** Selects the field's text on focus in the browser and on a device. */
704
+ selectTextOnFocus?: boolean
705
+ /** Consumes nonempty plain-text paste before insertion and length limits on web and native. */
706
+ onPasteText?: (text: string) => void
707
+ /** Field name. */
708
+ name?: string
709
+ /**
710
+ * The text changed; read `(event.target as HTMLInputElement).value` on the web. Prefer
711
+ * {@link TextFieldProps.onValueChange}, which native can supply too.
712
+ */
713
+ onChange?: ChangeEventHandler
714
+ /** The text changed, with the new text. */
715
+ onValueChange?: (value: string) => void
716
+ /** Browser key-down with composition state, or a key delivered by the device's TextInput. */
717
+ onKeyDown?: EventHandler<TextFieldKeyEvent>
718
+ /** The text changed: fires with {@link TextFieldProps.onChange} on each edit, on both renderers. */
719
+ onInput?: FormEventHandler
720
+ /** Layout, paint and text styles both renderers apply. */
721
+ style?: TextStyle
722
+ /** Web-only paint (a field's border and outline resets). */
723
+ webStyle?: WebStyle
724
+ }
725
+ ```
726
+
727
+ #### `FieldBounds`
728
+
729
+ Inclusive bounds and step for a number or calendar-date field.
730
+
731
+ ```typescript
732
+ interface FieldBounds<T> {
733
+ /** HTML minimum attribute. Native uses it as an inclusive lower bound and step base. */
734
+ min?: T
735
+ /** HTML maximum attribute. Native uses it as an inclusive upper bound. */
736
+ max?: T
737
+ /** Increment on both renderers, in days for dates. 'any' disables step validation. */
738
+ step?: number | 'any'
739
+ }
740
+ ```
741
+
742
+ #### `RangeFieldProps`
743
+
744
+ A numeric range rendered by the browser's range input or the device's adjustable slider.
745
+
746
+ ```typescript
747
+ interface RangeFieldProps extends ElementProps, InteractionProps {
748
+ /** Optional position of the fixed web type attribute. Native always uses a slider. */
749
+ type?: 'range'
750
+ /** Lower bound. The browser and device use 0 when it is omitted. */
751
+ min?: number
752
+ /** Upper bound. The browser and device use 100 when it is omitted. */
753
+ max?: number
754
+ /** Controlled value. The browser and device clamp and align it to their range. */
755
+ value?: number
756
+ /** Initial and reset value when uncontrolled. The browser and device otherwise use the midpoint. */
757
+ defaultValue?: number
758
+ /** Allowed value spacing. Both renderers default to 1. Use `'any'` for continuous values. */
759
+ step?: number | 'any'
760
+ /** Disables pointer and keyboard edits and excludes the field from forms on both renderers. */
761
+ disabled?: boolean
762
+ /** Field name used for form submission on the browser and device. */
763
+ name?: string
764
+ /** Called with the numeric value of each user edit on the browser and device. */
765
+ onValueChange?: (value: number) => void
766
+ /** Layout and paint applied by both the browser and device. */
767
+ style?: BoxStyle
768
+ /** CSS layered over `style` in the browser. The device applies the subset it can draw. */
769
+ webStyle?: WebStyle
770
+ }
771
+ ```
772
+
773
+ #### `FileFieldHandle`
774
+
775
+ Opens the chooser from an external button on either renderer.
776
+
777
+ ```typescript
778
+ interface FileFieldHandle {
779
+ /** Starts a file pick. Call from the activation handler of a button. */
780
+ pick(): void
781
+ }
782
+ ```
783
+
784
+ #### `FileFieldProps`
785
+
786
+ A browse target that delivers an ordered batch of selected files.
787
+
788
+ ```typescript
789
+ interface FileFieldProps<Node = unknown> extends ElementProps {
790
+ /** Content of the browse target. */
791
+ children?: Node
792
+ /** Comma-separated extensions, MIME types, MIME wildcards or `*`. */
793
+ accept?: string
794
+ /** Deliver all accepted files. Defaults to delivering the first accepted file. */
795
+ multiple?: boolean
796
+ /** Inclusive per-file limit in bytes. */
797
+ maxSize?: number
798
+ /** Prevents opening the chooser or delivering files. */
799
+ disabled?: boolean
800
+ /** Receives a nonempty batch of accepted files in selection order. */
801
+ onValueChange(files: readonly PickedFile[]): void
802
+ /** Receives a nonempty batch of files rejected by the type or size filter. */
803
+ onRejected?(files: readonly PickedFile[]): void
804
+ /** Receives a failure to open the chooser or read its selection. */
805
+ onPickError?(error: Error): void
806
+ /** Tab order of the browse target. Defaults to 0 when enabled and -1 when disabled. */
807
+ tabIndex?: number
808
+ /** Layout and paint applied by both the browser and device. */
809
+ style?: BoxStyle
810
+ /** CSS layered over `style` in the browser. */
811
+ webStyle?: WebStyle
812
+ /** Use separately rendered buttons and open the chooser through its handle. */
813
+ externalTrigger?: boolean
814
+ /** Web-only: hide the chooser with inline display:none instead of the hidden attribute. */
815
+ webInputDisplayNone?: boolean
816
+ /** Web-only enhancement of the browse target. */
817
+ webDrop?: {
818
+ /** Use another element as the drop target. Null waits for its ref to mount. */
819
+ target?: ElementHandle | null
820
+ /** Reports when an enabled drag enters or the drag leaves or drops. */
821
+ onActiveChange?: (active: boolean) => void
822
+ /** Overrides the chooser's multiple setting for drops alone. */
823
+ multiple?: boolean
824
+ /** Reject the entire drop if any file fails the type or size filter. */
825
+ rejectBatch?: boolean
826
+ /** Receives drops separately from chooser selections when provided. */
827
+ onValueChange?: (files: readonly PickedFile[]) => void
828
+ }
829
+ }
830
+ ```
831
+
832
+ #### `SelectFieldOption`
833
+
834
+ One selectable row in the browser's select and the device's option list.
835
+
836
+ ```typescript
837
+ interface SelectFieldOption {
838
+ /** Value reported on selection and submitted by either renderer. */
839
+ value: string
840
+ /** Plain text shown by the browser and by the device. */
841
+ label: string
842
+ /** Both renderers keep the row visible but exclude it from edits and form entries. */
843
+ disabled?: boolean
844
+ /** Reflects this option's initial selection as a web reset attribute. Device uses the field value. */
845
+ webDefaultSelected?: true
846
+ }
847
+ ```
848
+
849
+ #### `SelectFieldGroup`
850
+
851
+ A browser optgroup and the corresponding device list section.
852
+
853
+ ```typescript
854
+ interface SelectFieldGroup {
855
+ /** The browser's optgroup label and the device's noninteractive heading. */
856
+ label: string
857
+ /** Options in display and submission order on both renderers. */
858
+ options: readonly SelectFieldOption[]
859
+ }
860
+ ```
861
+
862
+ #### `FormAreaHandle`
863
+
864
+ The form element's focus and submission methods.
865
+
866
+ ```typescript
867
+ interface FormAreaHandle extends ElementHandle {
868
+ /** Attempts submission through normal form validation. */
869
+ requestSubmit(): void
870
+ }
871
+ ```
872
+
873
+ #### `FormAreaProps`
874
+
875
+ A form and its submission, validation and reset handlers.
876
+
877
+ ```typescript
878
+ interface FormAreaProps<Node = unknown> extends ElementProps {
879
+ /** The web tag. */
880
+ as: 'form'
881
+ /** Web-only: browser submission destination. */
882
+ action?: string
883
+ /** Web-only: browser submission method. */
884
+ method?: 'get' | 'post' | 'dialog'
885
+ /** Submits even if a field fails validation. */
886
+ noValidate?: boolean
887
+ /** Whether browser autofill is enabled for the form. */
888
+ autoComplete?: 'on' | 'off'
889
+ /** Receives the event and the same entries as `new FormData(form)` on the web. */
890
+ onSubmit?: (event: KitEvent, entries: FormEntries) => void
891
+ /** Fires before uncontrolled fields return to their defaults. Calling preventDefault cancels reset. */
892
+ onReset?: FormEventHandler
893
+ /** Layout and paint both renderers apply. */
894
+ style?: BoxStyle
895
+ /** Web-only paint. */
896
+ webStyle?: WebStyle
897
+ /** The form's content. */
898
+ children?: Node
899
+ }
900
+ ```
901
+
902
+ #### `FieldsetProps`
903
+
904
+ Groups controls and disables them together when necessary.
905
+
906
+ ```typescript
907
+ interface FieldsetProps<Node = unknown> extends ElementProps {
908
+ /** The web tag. */
909
+ as: 'fieldset'
910
+ /** Disables the form controls inside it. */
911
+ disabled?: boolean
912
+ /** The group name. */
913
+ name?: string
914
+ /** Layout and paint both renderers apply. */
915
+ style?: BoxStyle
916
+ /** Web-only paint. */
917
+ webStyle?: WebStyle
918
+ /** The group's content. */
919
+ children?: Node
920
+ }
921
+ ```
922
+
923
+ #### `CheckFieldHandle`
924
+
925
+ A checkbox or radio's state and activation methods.
926
+
927
+ ```typescript
928
+ interface CheckFieldHandle extends ElementHandle {
929
+ /** Activates the control as a user click or press would. */
930
+ click(): void
931
+ /** The checked state at the time the handle is read. */
932
+ readonly checked: boolean
933
+ }
934
+ ```
935
+
936
+ #### `TableBoxProps`
937
+
938
+ A table, a group of rows, or a row.
939
+
940
+ ```typescript
941
+ interface TableBoxProps<Node = unknown> extends ElementProps, InteractionProps {
942
+ as: TableBoxTag
943
+ /** Layout and paint both renderers apply. */
944
+ style?: BoxStyle
945
+ /** Web-only paint. */
946
+ webStyle?: WebStyle
947
+ /** The table parts this element contains. */
948
+ children?: Node
949
+ }
950
+ ```
951
+
952
+ #### `ImageProps`
953
+
954
+ An image (native `Image`).
955
+
956
+ ```typescript
957
+ interface ImageProps extends ElementProps {
958
+ /** Image URL. */
959
+ src: string
960
+ /** Text alternative; an empty string marks a decorative image. */
961
+ alt: string
962
+ /** Rendered width. */
963
+ width?: number
964
+ /** Rendered height. */
965
+ height?: number
966
+ /** Tooltip text. */
967
+ title?: string
968
+ /** Called once the image has loaded. */
969
+ onLoad?: () => void
970
+ /** Called when the image fails to load (a broken URL, no network). */
971
+ onError?: () => void
972
+ /** Layout and paint both renderers apply. */
973
+ style?: BoxStyle & { objectFit?: 'cover' | 'contain' | 'fill' | 'none' }
974
+ /** Web-only paint. */
975
+ webStyle?: WebStyle
976
+ }
977
+ ```
978
+
979
+ #### `ScrollOffset`
980
+
981
+ The physical scroll position, in CSS pixels on web or density-independent pixels on device.
982
+
983
+ ```typescript
984
+ interface ScrollOffset {
985
+ /** Distance from the content's left edge on both renderers, including in RTL layouts. */
986
+ readonly x: number
987
+ /** Distance from the content's top edge on both renderers. */
988
+ readonly y: number
989
+ }
990
+ ```
991
+
992
+ #### `ScrollAreaProps`
993
+
994
+ A container that scrolls its children (native `ScrollView`).
995
+
996
+ ```typescript
997
+ interface ScrollAreaProps<Node = unknown> extends ElementProps {
998
+ /** The web tag. */
999
+ as: BoxTag
1000
+ /** Axes enabled on device, default vertical. On web the authored overflow styles set the axes. */
1001
+ direction?: 'vertical' | 'horizontal' | 'both'
1002
+ /** Supplies both offsets when either changes on the web host or its native scroll view. */
1003
+ onScroll?: (offset: ScrollOffset) => void
1004
+ /** Focus order on the scroll area's outer frame. */
1005
+ tabIndex?: InteractionProps['tabIndex']
1006
+ /** Layout and paint both renderers apply. */
1007
+ style?: BoxStyle
1008
+ /** Web-only paint. */
1009
+ webStyle?: WebStyle
1010
+ /** Child elements. */
1011
+ children?: Node
1012
+ }
1013
+ ```
1014
+
1015
+ #### `SvgPaintProps`
1016
+
1017
+ Paint props every SVG shape takes.
1018
+
1019
+ ```typescript
1020
+ interface SvgPaintProps {
1021
+ /** Fill colour or `'none'`. */
1022
+ fill?: string
1023
+ /** Fill opacity, 0 to 1. */
1024
+ fillOpacity?: number
1025
+ /** Stroke colour or `'none'`. */
1026
+ stroke?: string
1027
+ /** Stroke width. */
1028
+ strokeWidth?: number
1029
+ /** Stroke opacity, 0 to 1. */
1030
+ strokeOpacity?: number
1031
+ /** Stroke end caps. */
1032
+ strokeLinecap?: 'butt' | 'round' | 'square'
1033
+ /** Stroke corners. */
1034
+ strokeLinejoin?: 'miter' | 'round' | 'bevel'
1035
+ /** Dash pattern. */
1036
+ strokeDasharray?: string | number
1037
+ /** Dash offset. */
1038
+ strokeDashoffset?: number
1039
+ /** Opacity, 0 to 1. */
1040
+ opacity?: number
1041
+ /** SVG transform (`'rotate(-90 12 12)'`). */
1042
+ transform?: string
1043
+ /** ClassMap classes. */
1044
+ className?: string
1045
+ }
1046
+ ```
1047
+
1048
+ #### `SvgStyle`
1049
+
1050
+ SVG inline paint and hit-testing supported by both renderers.
1051
+
1052
+ ```typescript
1053
+ interface SvgStyle extends Omit<SvgPaintProps, 'className' | 'transform'> {
1054
+ /** The CSS hit-testing mode on web and the shape's native hit-testing mode. */
1055
+ pointerEvents?: 'auto' | 'none'
1056
+ }
1057
+ ```
1058
+
1059
+ #### `SvgElementProps`
1060
+
1061
+ Identity, interaction and paint shared by an SVG canvas and its shapes.
1062
+
1063
+ ```typescript
1064
+ interface SvgElementProps extends ElementProps, SvgPaintProps {
1065
+ /** DOM tab order. On a device, a nonnegative value supplies a focusable target. */
1066
+ tabIndex?: number
1067
+ /** DOM click. On a device, draws a shape that can be pressed. */
1068
+ onClick?: MouseEventHandler
1069
+ /** DOM key down. Native routes focused activation through the supplied key handler. */
1070
+ onKeyDown?: KeyboardEventHandler
1071
+ /** Inline SVG paint and hit-testing, applied by the browser and on a device. */
1072
+ style?: SvgStyle
1073
+ /** Additional CSS, applied after `style` by the browser. Shape CSS is omitted on a device. */
1074
+ webStyle?: WebStyle
1075
+ }
1076
+ ```
1077
+
1078
+ #### `SvgDefsProps`
1079
+
1080
+ Definitions in the enclosing SVG's ID namespace on both renderers.
1081
+
1082
+ ```typescript
1083
+ interface SvgDefsProps<Node = unknown> {
1084
+ /** Definition elements drawn through references on web and native. */
1085
+ children: Node
1086
+ }
1087
+ ```
1088
+
1089
+ #### `SvgClipPathProps`
1090
+
1091
+ Geometry referenced by `url(#id)` as a clipping region.
1092
+
1093
+ ```typescript
1094
+ interface SvgClipPathProps<Node = unknown> extends SvgDefsProps<Node> {
1095
+ /** Local ID used by the browser's and device's SVG clipping engines. */
1096
+ id: string
1097
+ }
1098
+ ```
1099
+
1100
+ #### `SvgGradientStop`
1101
+
1102
+ One gradient stop. Equal offsets retain their input order on both renderers.
1103
+
1104
+ ```typescript
1105
+ interface SvgGradientStop {
1106
+ /** A fraction or percentage such as `'50%'`, passed to each renderer's stop. */
1107
+ offset: ElementLength
1108
+ /** CSS colour, including `currentColor`, which native resolves to the inherited ink. */
1109
+ stopColor: string
1110
+ /** Opacity from zero to one for the browser and native stop. */
1111
+ stopOpacity?: number
1112
+ }
1113
+ ```
1114
+
1115
+ #### `SvgLinearGradientProps`
1116
+
1117
+ A named linear paint server and its stops.
1118
+
1119
+ ```typescript
1120
+ interface SvgLinearGradientProps {
1121
+ /** Local ID used by paint references on web and native. */
1122
+ id: string
1123
+ /** Horizontal start in the selected coordinate system, on web and native. */
1124
+ x1?: ElementLength
1125
+ /** Vertical start in the selected coordinate system, on web and native. */
1126
+ y1?: ElementLength
1127
+ /** Horizontal end in the selected coordinate system, on web and native. */
1128
+ x2?: ElementLength
1129
+ /** Vertical end in the selected coordinate system, on web and native. */
1130
+ y2?: ElementLength
1131
+ /** Coordinate system for the gradient on both renderers. */
1132
+ gradientUnits?: 'objectBoundingBox' | 'userSpaceOnUse'
1133
+ /** In-order stop elements for the browser's SVG painter and react-native-svg. */
1134
+ stops: readonly SvgGradientStop[]
1135
+ }
1136
+ ```
1137
+
1138
+ #### `SvgPatternProps`
1139
+
1140
+ A named, repeating SVG tile.
1141
+
1142
+ ```typescript
1143
+ interface SvgPatternProps<Node = unknown> extends SvgDefsProps<Node> {
1144
+ /** Local ID used by paint references on web and native. */
1145
+ id: string
1146
+ /** Tile's horizontal origin for the browser and native SVG painter. */
1147
+ x?: ElementLength
1148
+ /** Tile's vertical origin for the browser and native SVG painter. */
1149
+ y?: ElementLength
1150
+ /** Tile width for the browser and native SVG painter. */
1151
+ width: ElementLength
1152
+ /** Tile height for the browser and native SVG painter. */
1153
+ height: ElementLength
1154
+ /** Coordinate system for the tile's origin and size, on both renderers. */
1155
+ patternUnits?: 'objectBoundingBox' | 'userSpaceOnUse'
1156
+ }
1157
+ ```
1158
+
1159
+ #### `SvgImageProps`
1160
+
1161
+ An image positioned in SVG user space.
1162
+
1163
+ ```typescript
1164
+ interface SvgImageProps extends SvgElementProps {
1165
+ /** Literal browser URL. Native resolves relative URLs against the public document URL. */
1166
+ href: string
1167
+ /** Horizontal origin on web and native. */
1168
+ x?: ElementLength
1169
+ /** Vertical origin on web and native. */
1170
+ y?: ElementLength
1171
+ /** Image viewport width on web and native. */
1172
+ width: ElementLength
1173
+ /** Image viewport height on web and native. */
1174
+ height: ElementLength
1175
+ /** Alignment and fit of the image in its viewport on both renderers. */
1176
+ preserveAspectRatio?: string
1177
+ }
1178
+ ```
1179
+
1180
+ #### `SvgMetadata`
1181
+
1182
+ Descriptive SVG children. They precede geometry on web and name the native graphic.
1183
+
1184
+ ```typescript
1185
+ interface SvgMetadata {
1186
+ /** Browser `<title>` and the device's fallback accessible name. */
1187
+ title?: string
1188
+ /** Browser `<desc>` and the device's accessible description. */
1189
+ description?: {
1190
+ /** ID that `aria-describedby` can reference on either renderer. */
1191
+ id?: string
1192
+ /** Description drawn as SVG metadata on web and spoken by the device. */
1193
+ text: string
1194
+ }
1195
+ }
1196
+ ```
1197
+
1198
+ #### `SvgProps`
1199
+
1200
+ An SVG canvas (native react-native-svg `Svg`).
1201
+
1202
+ ```typescript
1203
+ interface SvgProps<Node = unknown> extends SvgElementProps, ElementDragProps {
1204
+ /** Rendered width. */
1205
+ width?: number | `${number}%`
1206
+ /** Rendered height. */
1207
+ height?: number | `${number}%`
1208
+ /** The user coordinate system (`'0 0 24 24'`). */
1209
+ viewBox?: string
1210
+ /** How the view box fits the element. */
1211
+ preserveAspectRatio?: string
1212
+ /** Whether the canvas takes keyboard focus (web). */
1213
+ focusable?: boolean
1214
+ /** The SVG namespace attribute (web; a device ignores it). */
1215
+ xmlns?: string
1216
+ /** CSS for the web, and the style a device can draw of it. */
1217
+ webStyle?: WebStyle
1218
+ /** Descriptive SVG children on web, and name and description for native accessibility. */
1219
+ metadata?: SvgMetadata
1220
+ /** The browser's `shape-rendering` presentation hint. The device uses its SVG painter. */
1221
+ webShapeRendering?: 'auto' | 'optimizeSpeed' | 'crispEdges' | 'geometricPrecision'
1222
+ /** Language metadata emitted as `translate` on web and consumed before native drawing. */
1223
+ translate?: 'yes' | 'no'
1224
+ /** Shapes. */
1225
+ children?: Node
1226
+ }
1227
+ ```
1228
+
1229
+ #### `SvgMarkupProps`
1230
+
1231
+ An SVG canvas drawn from inner SVG markup (an icon set's prebuilt glyph; native react-native-svg
1232
+ `SvgXml`). The markup is trusted: it comes from a bonded set, never from a user.
1233
+
1234
+ ```typescript
1235
+ interface SvgMarkupProps extends Omit<SvgProps, 'children' | 'drag' | 'metadata'> {
1236
+ /** The markup inside the `<svg>` element. */
1237
+ markup: string
1238
+ }
1239
+ ```
1240
+
1241
+ #### `SvgPathProps`
1242
+
1243
+ An SVG path.
1244
+
1245
+ ```typescript
1246
+ interface SvgPathProps extends SvgElementProps {
1247
+ /** Path data. */
1248
+ d: string
1249
+ /** Which areas the path fills. */
1250
+ fillRule?: 'nonzero' | 'evenodd'
1251
+ /** Which areas the path clips. */
1252
+ clipRule?: 'nonzero' | 'evenodd'
1253
+ }
1254
+ ```
1255
+
1256
+ #### `SvgRectProps`
1257
+
1258
+ An SVG rectangle.
1259
+
1260
+ ```typescript
1261
+ interface SvgRectProps extends SvgElementProps {
1262
+ /** Left edge. */
1263
+ x?: number
1264
+ /** Top edge. */
1265
+ y?: number
1266
+ /** Width. */
1267
+ width: number
1268
+ /** Height. */
1269
+ height: number
1270
+ /** Corner radius on x. */
1271
+ rx?: number
1272
+ /** Corner radius on y. */
1273
+ ry?: number
1274
+ /** Web `<title>` and `<desc>` inside this rectangle, mapped to its device focus target. */
1275
+ metadata?: SvgMetadata
1276
+ /** Web presentation attribute and native hit testing. Inline `style.pointerEvents` wins. */
1277
+ pointerEvents?: SvgStyle['pointerEvents']
1278
+ /** Web mouse entry or native hover into this rectangle when pointing hardware delivers it. */
1279
+ onMouseEnter?: InteractionProps['onMouseEnter']
1280
+ }
1281
+ ```
1282
+
1283
+ #### `SvgCircleProps`
1284
+
1285
+ An SVG circle.
1286
+
1287
+ ```typescript
1288
+ interface SvgCircleProps extends SvgElementProps {
1289
+ /** Centre x. The web and native SVG defaults are zero. */
1290
+ cx?: number
1291
+ /** Centre y. The web and native SVG defaults are zero. */
1292
+ cy?: number
1293
+ /** Radius. */
1294
+ r: number
1295
+ }
1296
+ ```
1297
+
1298
+ #### `SvgEllipseProps`
1299
+
1300
+ An SVG ellipse.
1301
+
1302
+ ```typescript
1303
+ interface SvgEllipseProps extends SvgElementProps {
1304
+ /** Centre x. */
1305
+ cx: number
1306
+ /** Centre y. */
1307
+ cy: number
1308
+ /** Radius on x. */
1309
+ rx: number
1310
+ /** Radius on y. */
1311
+ ry: number
1312
+ }
1313
+ ```
1314
+
1315
+ #### `SvgLineProps`
1316
+
1317
+ An SVG line.
1318
+
1319
+ ```typescript
1320
+ interface SvgLineProps extends SvgElementProps {
1321
+ /** Start x. */
1322
+ x1: number
1323
+ /** Start y. */
1324
+ y1: number
1325
+ /** End x. */
1326
+ x2: number
1327
+ /** End y. */
1328
+ y2: number
1329
+ }
1330
+ ```
1331
+
1332
+ #### `SvgPolyProps`
1333
+
1334
+ An SVG polyline or polygon.
1335
+
1336
+ ```typescript
1337
+ interface SvgPolyProps extends SvgElementProps {
1338
+ /** Points (`'0,0 10,10'`). */
1339
+ points: string
1340
+ }
1341
+ ```
1342
+
1343
+ #### `SvgGroupProps`
1344
+
1345
+ An SVG group.
1346
+
1347
+ ```typescript
1348
+ interface SvgGroupProps<Node = unknown> extends SvgElementProps, ElementDragProps {
1349
+ /** Local clipping region reference for the web or native SVG painter. */
1350
+ clipPath?: `url(#${string})`
1351
+ /** Shapes. */
1352
+ children?: Node
1353
+ }
1354
+ ```
1355
+
1356
+ #### `SvgTextProps`
1357
+
1358
+ SVG text.
1359
+
1360
+ ```typescript
1361
+ interface SvgTextProps<Node = unknown> extends SvgElementProps {
1362
+ /** Anchor x. */
1363
+ x?: number
1364
+ /** Anchor y. */
1365
+ y?: number
1366
+ /** Horizontal anchor. */
1367
+ textAnchor?: 'start' | 'middle' | 'end'
1368
+ /** SVG baseline on the web. Native maps explicit baselines to `alignmentBaseline`. */
1369
+ dominantBaseline?: 'auto' | 'alphabetic' | 'middle' | 'central'
1370
+ /** Font size. */
1371
+ fontSize?: number
1372
+ /** Font weight. */
1373
+ fontWeight?: 'normal' | 'bold' | number
1374
+ /** CSS font-family on web. The device selects an available family or its system font. */
1375
+ fontFamily?: string
1376
+ /** Text. */
1377
+ children?: Node
1378
+ }
1379
+ ```
1380
+
1381
+ #### `NativeGridClasses`
1382
+
1383
+ A CSS grid's classes ({@link NativeClassSplit.grid}), by breakpoint variant: `''` at the base
1384
+ size, then `sm`, `md`, … ({@link UIClassMapNativeSplit.nativeBreakpoints}). A device has no grid
1385
+ layout, so a native element lays its children out from these.
1386
+
1387
+ ```typescript
1388
+ interface NativeGridClasses {
1389
+ /**
1390
+ * Its columns: a count of equal columns (`grid-cols-3` is 3), or a CSS track list
1391
+ * (`grid-cols-[1fr_2fr]` is `'1fr 2fr'`). No entry at the base size is one column.
1392
+ */
1393
+ columns: Readonly<Record<string, number | string>>
1394
+ /**
1395
+ * Its explicit rows: a count of equal rows (`grid-rows-3`) or a CSS track list
1396
+ * (`grid-rows-[auto_1fr]`). No entry: rows only as its items need them.
1397
+ */
1398
+ rows?: Readonly<Record<string, number | string>>
1399
+ /** The gap between its columns, in pixels (`gap-4` and `gap-x-4` are 16). */
1400
+ columnGap: Readonly<Record<string, number>>
1401
+ /** The gap between its rows, in pixels. */
1402
+ rowGap: Readonly<Record<string, number>>
1403
+ /** How its items sit in their rows (`items-center`); stretched when it sets none. */
1404
+ alignItems: Readonly<Record<string, 'start' | 'end' | 'center' | 'stretch' | 'baseline'>>
1405
+ }
1406
+ ```
1407
+
1408
+ #### `NativeClassSplit`
1409
+
1410
+ A class string divided for a native renderer, which has no CSS cascade (see
1411
+ {@link UIClassMapNativeSplit}).
1412
+
1413
+ ```typescript
1414
+ interface NativeClassSplit {
1415
+ /** Classes the native view itself applies (no display class: {@link NativeClassSplit.display}). */
1416
+ view: string
1417
+ /**
1418
+ * The text classes in effect for the element's text, as the CSS cascade would give them (text
1419
+ * properties only: `visibility`, `cursor` and other inherited CSS properties do not pass down): the
1420
+ * inherited ones the element's own text classes (colour, font, size, line height, letter
1421
+ * spacing, alignment, case, decoration, white space) do not override, then its own. A native
1422
+ * container hands them to the text inside it.
1423
+ */
1424
+ text: string
1425
+ /**
1426
+ * The display the classes give the element at its base size (no responsive or state variant), or
1427
+ * `null` when they set none: `flex`/`inline-flex` make its children flex items, `inline` and
1428
+ * `inline-*` put it in a line with its inline siblings, `block` takes it out of one and
1429
+ * `contents` lets a fieldset's children participate directly in its parent's layout.
1430
+ */
1431
+ display:
1432
+ | 'block'
1433
+ | 'inline'
1434
+ | 'inline-block'
1435
+ | 'flex'
1436
+ | 'inline-flex'
1437
+ | 'grid'
1438
+ | 'inline-grid'
1439
+ | 'contents'
1440
+ | 'none'
1441
+ | null
1442
+ /** The vertical alignment requested for a native table cell. */
1443
+ verticalAlign?: 'middle'
1444
+ /**
1445
+ * The lines the element's text is clamped to with an ellipsis (`truncate` is 1,
1446
+ * `line-clamp-3` is 3), or `null`. The clamp is the element's own: it is not inherited.
1447
+ */
1448
+ lines: number | null
1449
+ /**
1450
+ * The font weight {@link NativeClassSplit.text} sets at its base size (`font-bold` is 700), or
1451
+ * `null` when it sets none (the platform's normal weight). A `<strong>` draws `bolder` than it.
1452
+ */
1453
+ weight: number | null
1454
+ /**
1455
+ * The line height in pixels for a field that grows by lines, keyed by breakpoint like the grid
1456
+ * classes (`''` at the base size). A bond can omit this if it does not resolve text metrics.
1457
+ */
1458
+ lineHeight?: Readonly<Record<string, number>>
1459
+ /**
1460
+ * Whether the classes set the element's width or height (`w-5`, `h-5`, `size-5`, at any
1461
+ * breakpoint). On the web a class beats a replaced element's `width` and `height` attributes, so
1462
+ * a native image or drawing takes those attributes only for the sizes its classes leave unset.
1463
+ */
1464
+ sized?: { width: boolean; height: boolean }
1465
+ /**
1466
+ * Classes the element gives its descendants with one tag, as a CSS descendant selector does
1467
+ * (`[&_p]:leading-relaxed` is `{ p: 'leading-relaxed' }`): left out of `view` and `text`, and
1468
+ * applied by each descendant element whose tag it names, after that element's own classes.
1469
+ */
1470
+ descendants?: Readonly<Record<string, string>>
1471
+ /**
1472
+ * The element's grid when {@link NativeClassSplit.display} is `grid` or `inline-grid`, else
1473
+ * `null`. Its column and span classes are left out of `view`.
1474
+ */
1475
+ grid?: NativeGridClasses | null
1476
+ /**
1477
+ * The columns the element spans as a grid item, by breakpoint variant (`col-span-2` is
1478
+ * `{ '': 2 }`; `col-span-full` is every column).
1479
+ */
1480
+ span?: Readonly<Record<string, number | 'full'>>
1481
+ }
1482
+ ```
1483
+
1484
+ #### `UIClassMapNativeSplit`
1485
+
1486
+ The ClassMap member a device ClassMap (the nativewind bond) adds so native elements can do what
1487
+ the CSS cascade does on the web. Web ClassMaps leave it out.
1488
+
1489
+ ```typescript
1490
+ interface UIClassMapNativeSplit {
1491
+ /**
1492
+ * Divides a class string for a native element.
1493
+ *
1494
+ * @param className - The element's classes.
1495
+ * @param inheritedText - The text classes in effect for its container's text.
1496
+ * @param data - The element's `data-*` attributes by name without the prefix (`{ state: 'open' }`):
1497
+ * a class with a `data-[state=open]:` variant applies only when they match, as on the web.
1498
+ * @returns The view classes, the text classes in effect for its own text, and its display.
1499
+ */
1500
+ splitForNative?(
1501
+ className: string,
1502
+ inheritedText?: string,
1503
+ data?: Readonly<Record<string, string | undefined>>,
1504
+ ): NativeClassSplit
1505
+ /**
1506
+ * The text classes a browser's stylesheet gives a `<button>` (its text is centred), which a
1507
+ * native button hands to its text beneath the button's own classes.
1508
+ */
1509
+ nativeButtonText?: string
1510
+ /**
1511
+ * The text classes the web's stylesheet gives the document (`html`, `body`), which every text
1512
+ * inherits there: native text starts from them.
1513
+ */
1514
+ nativeRootText?: string
1515
+ /**
1516
+ * Lets the native styling runtime supply resolved text colour to paint computed in JavaScript.
1517
+ * The browser applies its own CSS cascade.
1518
+ *
1519
+ * @param classes - Text classes after native inheritance and overrides.
1520
+ * @param render - Draws the renderer's element with the resolved colour, if any.
1521
+ * @returns The renderer's element wrapped by the native styling runtime.
1522
+ */
1523
+ renderNativeTextColor?(classes: string, render: (color: string | undefined) => unknown): unknown
1524
+ /**
1525
+ * The tags the web's stylesheet makes blocks although a browser draws them inline (Tailwind's
1526
+ * reset makes `img` and `svg` blocks): a native image or drawing with one of these tags stacks
1527
+ * like a block unless a class puts it in a line (`inline`, `inline-block`).
1528
+ */
1529
+ nativeBlockTags?: readonly string[]
1530
+ /**
1531
+ * The window width, in pixels, from which each breakpoint variant applies (`sm:` from 640):
1532
+ * a native grid picks its columns and gaps by it.
1533
+ */
1534
+ nativeBreakpoints?: Readonly<Record<string, number>>
1535
+ }
1536
+ ```
1537
+
1538
+ #### `OverlayPosition`
1539
+
1540
+ The positioned surface's origin, and the side it ended up on.
1541
+
1542
+ ```typescript
1543
+ interface OverlayPosition {
1544
+ top: number
1545
+ left: number
1546
+ placement: TooltipPlacement
1547
+ }
1548
+ ```
1549
+
1550
+ #### `OverlayTarget`
1551
+
1552
+ A mounted element that a layer can use for focus or ownership.
1553
+
1554
+ ```typescript
1555
+ interface OverlayTarget {
1556
+ readonly current: ElementHandle | null
1557
+ }
1558
+ ```
1559
+
1560
+ #### `OverlayFocusOptions`
1561
+
1562
+ Initial focus and focus restoration for a blocking layer.
1563
+
1564
+ ```typescript
1565
+ interface OverlayFocusOptions {
1566
+ trap: true
1567
+ initial?: OverlayTarget
1568
+ restore: 'opener' | OverlayTarget | false
1569
+ }
1570
+ ```
1571
+
1572
+ #### `OverlayLayerOptions`
1573
+
1574
+ Registration for an overlay, independent of where its surface is presented.
1575
+
1576
+ ```typescript
1577
+ interface OverlayLayerOptions {
1578
+ open: boolean
1579
+ kind: OverlayLayerKind
1580
+ surface: OverlayTarget
1581
+ anchor?: OverlayTarget
1582
+ dismissKey?: boolean
1583
+ dismissBackdrop?: boolean
1584
+ /** Dismiss outside the given elements on press start or activation. */
1585
+ outside?: { inside: readonly OverlayTarget[]; phase: 'start' | 'activate' }
1586
+ focus?: OverlayFocusOptions
1587
+ lockScroll?: boolean
1588
+ onDismiss?: (reason: OverlayDismissReason) => void
1589
+ }
1590
+ ```
1591
+
1592
+ #### `OverlayAnchorGeometry`
1593
+
1594
+ Placement and collision policy for an anchored layer, in renderer-local units.
1595
+
1596
+ ```typescript
1597
+ interface OverlayAnchorGeometry {
1598
+ placement: TooltipPlacement
1599
+ align?: 'start' | 'center' | 'end'
1600
+ offset: number
1601
+ padding: number
1602
+ collision: 'none' | 'shift' | 'flip-shift'
1603
+ }
1604
+ ```
1605
+
47
1606
  #### `UIProvider`
48
1607
 
49
1608
  Identifies the bonded UI styling library. Providers set `name`
@@ -129,8 +1688,8 @@ interface CSSProperties {
129
1688
 
130
1689
  #### `KitEvent`
131
1690
 
132
- The event a UI kit hands a component's handler: the members that behave the same on every kit. React's kit
133
- passes React's event (so `stopPropagation()` stops React parent handlers), the other kits pass the DOM event;
1691
+ The event a web UI kit hands a component's handler: the members shared by the web kits. React's kit
1692
+ passes React's event (so `stopPropagation()` stops React parent handlers), the other web kits pass the DOM event;
134
1693
  both satisfy this type. A handler that needs a member only one of them has (`nativeEvent`, `composedPath()`,
135
1694
  `isComposing`) takes the component's ref element (see {@link BaseProps}) and listens on it.
136
1695
 
@@ -276,7 +1835,7 @@ interface HTMLElementProps extends BaseProps {
276
1835
  id?: string
277
1836
  title?: string
278
1837
  tabIndex?: number
279
- role?: string
1838
+ role?: ElementRole
280
1839
  'aria-label'?: string
281
1840
  'aria-labelledby'?: string
282
1841
  'aria-describedby'?: string
@@ -320,6 +1879,7 @@ interface InputElementProps extends HTMLElementProps {
320
1879
  maxLength?: number
321
1880
  minLength?: number
322
1881
  pattern?: string
1882
+ /** Web change event. Prefer the control's value callback for shared web and native code. */
323
1883
  onChange?: ChangeEventHandler
324
1884
  onInput?: FormEventHandler
325
1885
  }
@@ -361,6 +1921,7 @@ interface TextareaElementProps extends HTMLElementProps {
361
1921
  maxLength?: number
362
1922
  minLength?: number
363
1923
  wrap?: 'hard' | 'soft' | 'off'
1924
+ /** Web change event. {@link TextareaProps.onValueChange} also works on native. */
364
1925
  onChange?: ChangeEventHandler
365
1926
  onInput?: FormEventHandler
366
1927
  }
@@ -376,6 +1937,7 @@ interface SelectElementProps extends HTMLElementProps {
376
1937
  required?: boolean
377
1938
  autoFocus?: boolean
378
1939
  multiple?: boolean
1940
+ /** Web change event. {@link SelectProps.onValueChange} also works on native. */
379
1941
  onChange?: ChangeEventHandler
380
1942
  }
381
1943
  ```
@@ -457,7 +2019,7 @@ Props for the Input component (text field, email, password, etc.).
457
2019
  Ref element: the native `<input>`.
458
2020
 
459
2021
  ```typescript
460
- interface InputProps extends InputElementProps {
2022
+ interface InputProps extends InputElementProps, Pick<TextFieldProps, 'onValueChange'> {
461
2023
  /**
462
2024
  * Input type.
463
2025
  */
@@ -517,6 +2079,22 @@ interface InputProps extends InputElementProps {
517
2079
  }
518
2080
  ```
519
2081
 
2082
+ #### `FloatingInputProps`
2083
+
2084
+ Props for the FloatingInput component: an input whose placeholder is also its label, drawn
2085
+ above the text.
2086
+
2087
+ Ref element: the native `<input>`.
2088
+
2089
+ ```typescript
2090
+ interface FloatingInputProps extends InputElementProps {
2091
+ /**
2092
+ * Input type.
2093
+ */
2094
+ type?: InputType
2095
+ }
2096
+ ```
2097
+
520
2098
  #### `TextareaProps`
521
2099
 
522
2100
  Props for the Textarea component.
@@ -524,7 +2102,7 @@ Props for the Textarea component.
524
2102
  Ref element: the native `<textarea>`.
525
2103
 
526
2104
  ```typescript
527
- interface TextareaProps extends TextareaElementProps {
2105
+ interface TextareaProps extends TextareaElementProps, Pick<TextFieldProps, 'onValueChange'> {
528
2106
  /**
529
2107
  * Text size tier (see {@link TextareaClassOptions.size}) — pass the same
530
2108
  * `size` as a neighboring Input for identical font sizes.
@@ -610,7 +2188,7 @@ interface SelectProps<T = string> extends SelectElementProps {
610
2188
  value?: T
611
2189
 
612
2190
  /**
613
- * Change handler (with typed value).
2191
+ * Called with the selected value on web and native.
614
2192
  */
615
2193
  onValueChange?: (value: T) => void
616
2194
 
@@ -653,7 +2231,7 @@ Props for the Checkbox component.
653
2231
  Ref element: the native `<input type="checkbox">`.
654
2232
 
655
2233
  ```typescript
656
- interface CheckboxProps extends InputElementProps {
2234
+ interface CheckboxProps extends InputElementProps, Pick<CheckFieldProps, 'onCheckedChange'> {
657
2235
  /**
658
2236
  * Checkbox label.
659
2237
  */
@@ -764,7 +2342,7 @@ Props for the Switch/Toggle component.
764
2342
  Ref element: the `role="switch"` button.
765
2343
 
766
2344
  ```typescript
767
- interface SwitchProps extends InputElementProps {
2345
+ interface SwitchProps extends InputElementProps, Pick<CheckFieldProps, 'onCheckedChange'> {
768
2346
  /**
769
2347
  * Switch label.
770
2348
  */
@@ -855,6 +2433,14 @@ interface ModalProps extends HTMLElementProps {
855
2433
  * @default 'Close'
856
2434
  */
857
2435
  closeLabel?: string
2436
+
2437
+ /**
2438
+ * The control that takes focus when the modal opens, such as the field a dialog exists to fill.
2439
+ * Without it, focus goes to the first focusable control, or to the dialog when it has none. The
2440
+ * modal reads it once the open dialog is in the document, so a control rendered in the
2441
+ * children can be named here.
2442
+ */
2443
+ initialFocus?: OverlayTarget
858
2444
  }
859
2445
  ```
860
2446
 
@@ -1020,6 +2606,23 @@ interface CardProps extends HTMLElementProps {
1020
2606
  }
1021
2607
  ```
1022
2608
 
2609
+ #### `CardSectionProps`
2610
+
2611
+ Props of a card's header, title, description, content and footer.
2612
+
2613
+ ```typescript
2614
+ interface CardSectionProps extends ElementProps {
2615
+ /** Tooltip text. */
2616
+ title?: string
2617
+
2618
+ /** CSS for the web. */
2619
+ style?: CSSProperties
2620
+
2621
+ /** Contents. */
2622
+ children?: Children
2623
+ }
2624
+ ```
2625
+
1023
2626
  #### `ContainerProps`
1024
2627
 
1025
2628
  Props for the Container layout component.
@@ -2099,7 +3702,7 @@ at render time to resolve classes without knowing which styling library
2099
3702
  is active.
2100
3703
 
2101
3704
  ```typescript
2102
- interface UIClassMap {
3705
+ interface UIClassMap extends UIClassMapNativeSplit {
2103
3706
  cn(...classes: ClassMapValue[]): string
2104
3707
 
2105
3708
 
@@ -2109,6 +3712,10 @@ interface UIClassMap {
2109
3712
  select(opts?: SelectClassOptions): string
2110
3713
  checkbox(opts?: CheckboxClassOptions): string
2111
3714
  radio(opts?: RadioClassOptions): string
3715
+ checkFieldMark?: (
3716
+ mark: 'checked' | 'mixed' | 'radio',
3717
+ controlClasses?: string,
3718
+ ) => { path: string; className: string }
2112
3719
  switchBase(opts?: SwitchClassOptions): string
2113
3720
  switchThumb(opts?: SwitchClassOptions): string
2114
3721
  label(opts?: LabelClassOptions): string
@@ -2178,6 +3785,7 @@ interface UIClassMap {
2178
3785
  tableRow: string
2179
3786
  tableHead: string
2180
3787
  tableCell: string
3788
+ tableCellWithCheckbox?: string
2181
3789
  tableCaption: string
2182
3790
  tooltipContent: string
2183
3791
  toastViewport: string
@@ -2282,6 +3890,7 @@ interface UIClassMap {
2282
3890
  progressLabelContainer: string
2283
3891
  progressLabelText: string
2284
3892
  progressIndeterminate: string
3893
+ typingPulse?: DotPulseMotion
2285
3894
 
2286
3895
 
2287
3896
  tableWrapper: string
@@ -2396,6 +4005,7 @@ interface UIClassMap {
2396
4005
 
2397
4006
 
2398
4007
  sp(property: SpacingProperty, scale: SpacingScale): string
4008
+ sp(property: 'm' | 'mx' | 'my' | 'mt' | 'mb' | 'ml' | 'mr', scale: SpacingScale | 'auto'): string
2399
4009
  sp(overrides: SpacingOverrides): Record<string, string>
2400
4010
  stack(scale: SpacingScale): string
2401
4011
 
@@ -2464,31 +4074,374 @@ interface UIClassMap {
2464
4074
  authLoginSubmitFull: string
2465
4075
  authHidden: string
2466
4076
  authArrowIcon: string
4077
+ // … truncated — 214 more members: appLayout, flex1, oauthProviderLabel, pageShell, pageShellSidebar, pageShellSidebarCollapsed, pageShellTopbar, pageShellContent, pageShellSidebarToggle, sidebarUserCardTrigger, userMenuPopoverTrigger, userMenuPopoverPanel, userMenuPopoverHeader, userMenuPopoverSignOut, emptyState, emptyStateIcon, emptyStateTitle, emptyStateDescription, emptyStateAction, pageHeader, pageHeaderTitle, pageHeaderDescription, pageHeaderActions, pageHeaderBreadcrumbs, pageHeaderBreadcrumbItem, pageHeaderBreadcrumbSeparator, searchField, searchFieldIcon, searchFieldInput, searchFieldActions, searchFieldClear, searchStatusRow, searchTips, kbd, filterChip, filterChipNegated, filterChipRemove, resultList, resultItem, resultItemActive, resultBody, resultTitle, resultTitleMono, resultMeta, resultDescription, resultMark, resultAction, resultEmpty, iconGlyphFont, authBrandHeaderChipSquare, authBrandHeaderChipShadow, authBrandHeaderChipIcon, authBrandHeaderWordmark, authBrandHeaderTagline, authShellContainer, authShellDecoration, authShellCardSurface, authShellCardOuter, authShellHeadingEyebrow, authShellHeadingTitle, authShellHeadingSub, authShellFooter, authShellBackLink, authShellBackLinkAnchor, authShellPanel, chatbotTesterBotBar, chatbotTesterBotSelect, chatbotTesterInputRow, chatbotTesterInputField, chatbotTesterMessageList, chatbotTesterMessageBubble, chatbotTesterMessageBubbleUser, chatbotTesterMessageBubbleBot, chatbotTesterMessageTimeUser, chatbotTesterMessageTimeBot and 139 more; the full declaration is in node_modules/@molecule/app-ui/dist/types.d.ts
4078
+ ```
4079
+
4080
+ _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui/dist/types.d.ts`.)_
4081
+
4082
+ ### Types
4083
+
4084
+ #### `ElementMeasureTarget`
4085
+
4086
+ Which part of a registered element to measure, in window coordinates.
2467
4087
 
4088
+ ```typescript
4089
+ type ElementMeasureTarget =
4090
+ /** The element's own rendered frame on web and device. */
4091
+ | 'frame'
4092
+ /** The browser's first child element, falling back to the registered frame on either renderer. */
4093
+ | 'content-start'
4094
+ ```
2468
4095
 
2469
- appLayout: string
4096
+ #### `ElementLength`
2470
4097
 
2471
- flex1: string
4098
+ A length both renderers accept: pixels as a number, or a percentage of the parent.
2472
4099
 
4100
+ ```typescript
4101
+ type ElementLength = number | `${number}%`
4102
+ ```
2473
4103
 
2474
- oauthProviderLabel: string
4104
+ #### `WebStyle`
2475
4105
 
4106
+ An element's `webStyle`: CSS for the web (resets of browser defaults such as a button's border
4107
+ and outline, cursors, shadows, or a consumer's `style` a kit component passes on). The web kit
4108
+ applies it after `style`. The native kit applies only the keys {@link TextStyle} names whose
4109
+ values a device can draw (`width: 200`, not `width: '10rem'`), so layout a feature means for
4110
+ both renderers belongs in `style`, which the compiler holds to that subset.
2476
4111
 
2477
- pageShell: string
2478
- pageShellSidebar: string
2479
- pageShellSidebarCollapsed: string
2480
- pageShellTopbar: string
2481
- pageShellContent: string
2482
- pageShellSidebarToggle: string
2483
- sidebarUserCardTrigger: string
2484
- userMenuPopoverTrigger: string
2485
- userMenuPopoverPanel: string
2486
- // … truncated — 202 more members: userMenuPopoverHeader, userMenuPopoverSignOut, emptyState, emptyStateIcon, emptyStateTitle, emptyStateDescription, emptyStateAction, pageHeader, pageHeaderTitle, pageHeaderDescription, pageHeaderActions, pageHeaderBreadcrumbs, pageHeaderBreadcrumbItem, pageHeaderBreadcrumbSeparator, searchField, searchFieldIcon, searchFieldInput, searchFieldActions, searchFieldClear, searchStatusRow, searchTips, kbd, filterChip, filterChipNegated, filterChipRemove, resultList, resultItem, resultItemActive, resultBody, resultTitle, resultTitleMono, resultMeta, resultDescription, resultMark, resultAction, resultEmpty, iconGlyphFont, authBrandHeaderChipSquare, authBrandHeaderChipShadow, authBrandHeaderChipIcon, authBrandHeaderWordmark, authBrandHeaderTagline, authShellContainer, authShellDecoration, authShellCardSurface, authShellCardOuter, authShellHeadingEyebrow, authShellHeadingTitle, authShellHeadingSub, authShellFooter, authShellBackLink, authShellBackLinkAnchor, authShellPanel, chatbotTesterBotBar, chatbotTesterBotSelect, chatbotTesterInputRow, chatbotTesterInputField, chatbotTesterMessageList, chatbotTesterMessageBubble, chatbotTesterMessageBubbleUser, chatbotTesterMessageBubbleBot, chatbotTesterMessageTimeUser, chatbotTesterMessageTimeBot, chatbotTesterTypingIndicator, dataTableCardShell, dataTableCardTitle, dataTableCardScroller, dataTableCardTable, dataTableCardHead, dataTableCardHeaderCell, dataTableCardBody, dataTableCardSkeletonBar, dataTableCardEmptyCell, dataTableCardRowHover and 128 more; the full declaration is in node_modules/@molecule/app-ui/dist/types.d.ts
4112
+ ```typescript
4113
+ type WebStyle = CSSProperties
2487
4114
  ```
2488
4115
 
2489
- _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui/dist/types.d.ts`.)_
4116
+ #### `ElementRole`
2490
4117
 
2491
- ### Types
4118
+ Roles a feature gives an element (an explicit role overrides the one its `as` implies).
4119
+
4120
+ ```typescript
4121
+ type ElementRole =
4122
+ | 'alert'
4123
+ | 'alertdialog'
4124
+ | 'application'
4125
+ | 'article'
4126
+ | 'banner'
4127
+ | 'blockquote'
4128
+ | 'button'
4129
+ | 'caption'
4130
+ | 'cell'
4131
+ | 'checkbox'
4132
+ | 'code'
4133
+ | 'columnheader'
4134
+ | 'combobox'
4135
+ | 'complementary'
4136
+ | 'contentinfo'
4137
+ | 'definition'
4138
+ | 'deletion'
4139
+ | 'dialog'
4140
+ | 'directory'
4141
+ | 'document'
4142
+ | 'emphasis'
4143
+ | 'feed'
4144
+ | 'figure'
4145
+ | 'form'
4146
+ | 'generic'
4147
+ | 'grid'
4148
+ | 'gridcell'
4149
+ | 'group'
4150
+ | 'heading'
4151
+ | 'img'
4152
+ | 'insertion'
4153
+ | 'link'
4154
+ | 'list'
4155
+ | 'listbox'
4156
+ | 'listitem'
4157
+ | 'log'
4158
+ | 'main'
4159
+ | 'marquee'
4160
+ | 'math'
4161
+ | 'menu'
4162
+ | 'menubar'
4163
+ | 'menuitem'
4164
+ | 'menuitemcheckbox'
4165
+ | 'menuitemradio'
4166
+ | 'meter'
4167
+ | 'navigation'
4168
+ | 'none'
4169
+ | 'note'
4170
+ | 'option'
4171
+ | 'paragraph'
4172
+ | 'presentation'
4173
+ | 'progressbar'
4174
+ | 'radio'
4175
+ | 'radiogroup'
4176
+ | 'region'
4177
+ | 'row'
4178
+ | 'rowgroup'
4179
+ | 'rowheader'
4180
+ | 'scrollbar'
4181
+ | 'search'
4182
+ | 'searchbox'
4183
+ | 'separator'
4184
+ | 'slider'
4185
+ | 'spinbutton'
4186
+ | 'status'
4187
+ | 'strong'
4188
+ | 'subscript'
4189
+ | 'superscript'
4190
+ | 'switch'
4191
+ | 'tab'
4192
+ | 'table'
4193
+ | 'tablist'
4194
+ | 'tabpanel'
4195
+ | 'term'
4196
+ | 'textbox'
4197
+ | 'time'
4198
+ | 'timer'
4199
+ | 'toolbar'
4200
+ | 'tooltip'
4201
+ | 'tree'
4202
+ | 'treegrid'
4203
+ | 'treeitem'
4204
+ ```
4205
+
4206
+ #### `DataAttributes`
4207
+
4208
+ `data-*` attributes: `data-mol-id` becomes the native `testID`; the rest are web-only.
4209
+
4210
+ ```typescript
4211
+ type DataAttributes = { [key: `data-${string}`]: string | number | boolean | undefined }
4212
+ ```
4213
+
4214
+ #### `AriaBoolean`
4215
+
4216
+ A boolean ARIA value, as React DOM takes one: `true`/`false`, or the attribute's own spelling
4217
+ `'true'`/`'false'` (`aria-hidden="true"`). A device reads `'false'` as false.
4218
+
4219
+ ```typescript
4220
+ type AriaBoolean = boolean | 'true' | 'false'
4221
+ ```
4222
+
4223
+ #### `ForwardedElementProps`
4224
+
4225
+ Pass-through props of each element variant after the component's own keys are removed.
4226
+
4227
+ ```typescript
4228
+ type ForwardedElementProps<P, Owned extends PropertyKey = never> = P extends unknown
4229
+ ? Omit<P, 'as' | Owned>
4230
+ : never
4231
+ ```
4232
+
4233
+ #### `BoxTag`
4234
+
4235
+ Web container tags and their native view counterparts, including paragraphs with controls.
4236
+
4237
+ ```typescript
4238
+ type BoxTag =
4239
+ | 'div'
4240
+ | 'span'
4241
+ | 'p'
4242
+ | 'section'
4243
+ | 'header'
4244
+ | 'footer'
4245
+ | 'main'
4246
+ | 'aside'
4247
+ | 'nav'
4248
+ | 'article'
4249
+ | 'ul'
4250
+ | 'ol'
4251
+ | 'li'
4252
+ | 'dl'
4253
+ | 'dd'
4254
+ | 'figure'
4255
+ | 'address'
4256
+ ```
4257
+
4258
+ #### `InlineKind`
4259
+
4260
+ How a component takes part in a line of a container that is not a flex container: inline text
4261
+ (it renders a text element that joins the line), an inline box (a button, a badge, an icon:
4262
+ it sits in the line beside text), or `null` for a block. The web reads this from CSS; React
4263
+ Native has no inline layout, so the native kit is told (`registerInline` in each React kit).
4264
+
4265
+ ```typescript
4266
+ type InlineKind = 'text' | 'box' | null
4267
+ ```
4268
+
4269
+ #### `TextTag`
4270
+
4271
+ Web tags a {@link TextProps} element renders.
4272
+
4273
+ ```typescript
4274
+ type TextTag =
4275
+ | 'span'
4276
+ | 'p'
4277
+ | 'h1'
4278
+ | 'h2'
4279
+ | 'h3'
4280
+ | 'h4'
4281
+ | 'h5'
4282
+ | 'h6'
4283
+ | 'strong'
4284
+ | 'em'
4285
+ | 'small'
4286
+ | 'code'
4287
+ | 'pre'
4288
+ | 'kbd'
4289
+ | 'mark'
4290
+ | 'dt'
4291
+ | 'dd'
4292
+ | 'li'
4293
+ | 'figcaption'
4294
+ ```
4295
+
4296
+ #### `TextProps`
4297
+
4298
+ Text (native `Text`); `h1`–`h6` read as headings on native.
4299
+
4300
+ ```typescript
4301
+ type TextProps<Node = unknown> =
4302
+ | (TextCommonProps<Node> & { as: TextTag })
4303
+ | (TextCommonProps<Node> & {
4304
+ as: 'label'
4305
+ /** The id of the control this label names and activates. */
4306
+ htmlFor?: string
4307
+ })
4308
+ | (TextCommonProps<Node> & {
4309
+ as: 'time'
4310
+ /** The machine-readable date or time. */
4311
+ dateTime?: string
4312
+ })
4313
+ ```
4314
+
4315
+ #### `PressableTag`
4316
+
4317
+ Web tags a {@link PressableProps} element renders.
4318
+
4319
+ ```typescript
4320
+ type PressableTag = 'button' | 'div' | 'span' | 'li'
4321
+ ```
4322
+
4323
+ #### `AnchorProps`
4324
+
4325
+ A literal anchor with no router. Web keeps the browsing context (`target`) and link
4326
+ relationship (`rel`), which have no device equivalent. Both renderers call `onClick` before
4327
+ the default action and honor `preventDefault()`.
4328
+
4329
+ ```typescript
4330
+ type AnchorProps<Node = unknown> = Omit<ElementLinkProps<Node>, 'to' | 'replace' | 'state'> & {
4331
+ /**
4332
+ * The literal `href` on the web. A device passes absolute URLs to the OS, resolves relative
4333
+ * URLs against the app's configured public document URL, and stays on the current screen for
4334
+ * `'#'`. A relative URL with no configured base reports a diagnostic on press.
4335
+ */
4336
+ href: string
4337
+ }
4338
+ ```
4339
+
4340
+ #### `TextFieldProps`
4341
+
4342
+ Web and native text fields accept bounds only on number and date inputs.
4343
+
4344
+ ```typescript
4345
+ type TextFieldProps = TextFieldBaseProps &
4346
+ (
4347
+ | { min?: never; max?: never; step?: never }
4348
+ | ({ as: 'input'; type: 'number' } & FieldBounds<number>)
4349
+ | ({ as: 'input'; type: 'date' } & FieldBounds<string>)
4350
+ )
4351
+ ```
4352
+
4353
+ #### `SelectFieldProps`
4354
+
4355
+ A single or multiple select with the same option and value contract on web and device.
4356
+
4357
+ ```typescript
4358
+ type SelectFieldProps = SelectFieldCommonProps &
4359
+ (
4360
+ | ({
4361
+ /** The browser select and the device list allow one selected option. */
4362
+ multiple?: false
4363
+ /** Reports the selected string on user edits in either renderer. */
4364
+ onValueChange?: (value: string) => void
4365
+ } & SelectFieldValue<string>)
4366
+ | ({
4367
+ /** The browser select and the device list allow multiple selected options. */
4368
+ multiple: true
4369
+ /** Reports every selected string in option order on a user edit in either renderer. */
4370
+ onValueChange?: (values: readonly string[]) => void
4371
+ } & SelectFieldValue<readonly string[]>)
4372
+ )
4373
+ ```
4374
+
4375
+ #### `FormEntryValue`
4376
+
4377
+ A successful control's value, including files from a web form.
4378
+
4379
+ ```typescript
4380
+ type FormEntryValue = string | Blob
4381
+ ```
4382
+
4383
+ #### `FormEntries`
4384
+
4385
+ A form's successful controls in order, with repeated names preserved.
4386
+
4387
+ ```typescript
4388
+ type FormEntries = ReadonlyArray<readonly [name: string, value: FormEntryValue]>
4389
+ ```
4390
+
4391
+ #### `CheckFieldProps`
4392
+
4393
+ A checkbox, or a radio whose checked state is owned by its group.
4394
+
4395
+ ```typescript
4396
+ type CheckFieldProps =
4397
+ | (CheckFieldCommonProps & {
4398
+ type: 'checkbox'
4399
+ checked?: boolean
4400
+ defaultChecked?: boolean
4401
+ /** Draws the mixed state. */
4402
+ indeterminate?: boolean
4403
+ })
4404
+ | (CheckFieldCommonProps & {
4405
+ type: 'radio'
4406
+ checked: boolean
4407
+ defaultChecked?: never
4408
+ indeterminate?: never
4409
+ })
4410
+ ```
4411
+
4412
+ #### `TableBoxTag`
4413
+
4414
+ The table and row container tags.
4415
+
4416
+ ```typescript
4417
+ type TableBoxTag = 'table' | 'thead' | 'tbody' | 'tfoot' | 'tr'
4418
+ ```
4419
+
4420
+ #### `TableCellProps`
4421
+
4422
+ A data cell or a header cell, with optional row or column scope on headers.
4423
+
4424
+ ```typescript
4425
+ type TableCellProps<Node = unknown> =
4426
+ | (TableCellCommonProps<Node> & { as: 'td'; scope?: never })
4427
+ | (TableCellCommonProps<Node> & { as: 'th'; scope?: 'col' | 'row' })
4428
+ ```
4429
+
4430
+ #### `OverlayDismissReason`
4431
+
4432
+ Why the platform requested that an overlay close.
4433
+
4434
+ ```typescript
4435
+ type OverlayDismissReason = 'escape' | 'back' | 'outside' | 'backdrop'
4436
+ ```
4437
+
4438
+ #### `OverlayLayerKind`
4439
+
4440
+ Modal layers block dismissal below them. Toast layers are passive.
4441
+
4442
+ ```typescript
4443
+ type OverlayLayerKind = 'modal' | 'popover' | 'tooltip' | 'toast'
4444
+ ```
2492
4445
 
2493
4446
  #### `Children`
2494
4447
 
@@ -2783,6 +4736,69 @@ functions while preserving the base behavior).
2783
4736
  type ClassMapOverrides = Partial<UIClassMap> | ((base: UIClassMap) => Partial<UIClassMap>)
2784
4737
  ```
2785
4738
 
4739
+ ### Classes
4740
+
4741
+ #### `ToastCountdown`
4742
+
4743
+ Auto-dismisses once, pausing independently for hover and focus.
4744
+
4745
+ ```typescript
4746
+ class ToastCountdown {
4747
+ private readonly pauses = new Set<'hover' | 'focus'>()
4748
+ private duration = 0
4749
+ private remaining = 0
4750
+ private startedAt?: number
4751
+ private timer?: ReturnType<typeof setTimeout>
4752
+ private dismissed = false
4753
+
4754
+ constructor(private readonly onDismiss: () => void) {}
4755
+
4756
+ /** Sets the duration on mount or when it changes. Zero stays open until dismissed. */
4757
+ start(duration: number): void {
4758
+ this.stop()
4759
+ this.duration = duration
4760
+ this.remaining = duration
4761
+ this.resume()
4762
+ }
4763
+
4764
+ /** Suspends the countdown until every active reason for pausing has left. */
4765
+ setPaused(reason: 'hover' | 'focus', paused: boolean): void {
4766
+ if (paused) {
4767
+ this.pauses.add(reason)
4768
+ if (this.startedAt !== undefined) {
4769
+ this.remaining = Math.max(0, this.remaining - (Date.now() - this.startedAt))
4770
+ this.stop()
4771
+ }
4772
+ } else if (this.pauses.delete(reason)) {
4773
+ this.resume()
4774
+ }
4775
+ }
4776
+
4777
+ /** Hides the notification once, whether a timer or a control dismissed it. */
4778
+ readonly dismiss = (): void => {
4779
+ if (this.dismissed) return
4780
+ this.dismissed = true
4781
+ this.stop()
4782
+ this.onDismiss()
4783
+ }
4784
+
4785
+ /** Cancels the timer during unmount or before restarting it. */
4786
+ readonly stop = (): void => {
4787
+ clearTimeout(this.timer)
4788
+ this.timer = undefined
4789
+ this.startedAt = undefined
4790
+ }
4791
+
4792
+ /** Schedules the remaining time once a visible toast has no active pause. */
4793
+ private resume(): void {
4794
+ if (this.duration <= 0 || this.dismissed || this.pauses.size > 0 || this.timer !== undefined)
4795
+ return
4796
+ this.startedAt = Date.now()
4797
+ this.timer = setTimeout(this.dismiss, this.remaining)
4798
+ }
4799
+ }
4800
+ ```
4801
+
2786
4802
  ### Functions
2787
4803
 
2788
4804
  #### `molId(component, context, qualifier)`
@@ -2836,6 +4852,55 @@ function molSelectorPrefix(prefix: string): string
2836
4852
 
2837
4853
  **Returns:** A CSS attribute prefix selector string.
2838
4854
 
4855
+ #### `fieldLayout(cm)`
4856
+
4857
+ The classes for the two wrappers a closed form control (`Input`, `Select`, `Textarea`) puts
4858
+ around its native element.
4859
+
4860
+ Both wrappers are flex columns. On the web, a control's top and bottom margins collapse
4861
+ through a block wrapper: the wrapper's neighbours move instead of the control, and a label
4862
+ above the control changes where the control's margin shows up. React Native keeps the margins
4863
+ inside. A column keeps them inside on every renderer, so a field sits at the same place in a
4864
+ browser and on a device.
4865
+
4866
+ - `root` goes on the outer wrapper: the field's full-width column, which holds the label, the
4867
+ control's row and the error or hint line.
4868
+ - `inner` goes on the row that holds the control and its adornments (a leading icon, a clear
4869
+ button), which the row positions. `Textarea` has no adornments and uses `root` alone.
4870
+
4871
+ A caller's `className`, `style`, ref and test id stay on the control itself. Moving them to a
4872
+ wrapper would move the caller's border, focus ring and typography with them. A wrapper that
4873
+ takes arbitrary children (`FormField`) keeps the plain `inputWrapper` token.
4874
+
4875
+ ```typescript
4876
+ function fieldLayout(cm: UIClassMap): { root: string; inner: string }
4877
+ ```
4878
+
4879
+ - `cm` — The ClassMap the control renders with.
4880
+
4881
+ **Returns:** `root`, the outer wrapper's classes, and `inner`, the control row's classes.
4882
+
4883
+ #### `calculateOverlayPosition(anchor, surface, viewport, geometry)`
4884
+
4885
+ Positions an anchored surface. All inputs use the same coordinate space.
4886
+ When flipping is enabled, the less obstructed side wins and ties keep the requested side.
4887
+
4888
+ ```typescript
4889
+ function calculateOverlayPosition(
4890
+ anchor: ElementBox,
4891
+ surface: Pick<ElementBox, 'width' | 'height'>,
4892
+ viewport: ElementBox,
4893
+ { placement, align, offset, padding, collision }: OverlayAnchorGeometry,
4894
+ ): OverlayPosition
4895
+ ```
4896
+
4897
+ - `anchor` — Bounds of the reference element.
4898
+ - `surface` — Dimensions of the surface to position.
4899
+ - `viewport` — Available bounds before applying padding.
4900
+ - `geometry` — Placement, gap, padding and collision policy.
4901
+
4902
+ **Returns:** Coordinates in the input space and the resolved placement.
4903
+
2839
4904
  #### `setProvider(provider)`
2840
4905
 
2841
4906
  Registers a UI provider as the active singleton.
@@ -2938,6 +5003,14 @@ The HTML attribute name for automation IDs.
2938
5003
  const MOL_ID_ATTR: 'data-mol-id'
2939
5004
  ```
2940
5005
 
5006
+ #### `DEFAULT_TYPING_PULSE`
5007
+
5008
+ The motion both renderers use when the ClassMap omits its typing pulse.
5009
+
5010
+ ```typescript
5011
+ const DEFAULT_TYPING_PULSE: DotPulseMotion
5012
+ ```
5013
+
2941
5014
  ## Available Providers
2942
5015
 
2943
5016
  | Provider | Package |
@@ -2959,11 +5032,13 @@ const MOL_ID_ATTR: 'data-mol-id'
2959
5032
  Peer dependencies:
2960
5033
 
2961
5034
  - `@molecule/app-bond` ^1.0.1
5035
+ - `@molecule/app-filesystem` ^1.1.0
2962
5036
  - `@molecule/app-i18n` ^1.0.1
2963
5037
 
2964
5038
  ### Runtime Dependencies
2965
5039
 
2966
5040
  - `@molecule/app-bond`
5041
+ - `@molecule/app-filesystem`
2967
5042
  - `@molecule/app-i18n`
2968
5043
 
2969
5044
  **Style through {@link getClassMap} — NEVER write raw CSS/Tailwind class names in a