@praxisjs/jsx 0.6.0 → 0.6.1

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/src/dom-types.ts CHANGED
@@ -109,43 +109,43 @@ export type CSSProperties = {
109
109
 
110
110
  export interface AriaAttributes {
111
111
  /** Identifies the currently active element when DOM focus is on a composite widget, combobox, textbox, group, or application. */
112
- "aria-activedescendant"?: string;
112
+ "aria-activedescendant"?: Reactive<string>;
113
113
  /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
114
114
  "aria-atomic"?: Reactive<Booleanish>;
115
115
  /** Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented. */
116
- "aria-autocomplete"?: LiteralUnion<"none" | "inline" | "list" | "both">;
116
+ "aria-autocomplete"?: Reactive<LiteralUnion<"none" | "inline" | "list" | "both">>;
117
117
  /** Indicates an element's "busy" status. */
118
118
  "aria-busy"?: Reactive<Booleanish>;
119
119
  /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. */
120
120
  "aria-checked"?: Reactive<Booleanish | LiteralUnion<"mixed">>;
121
121
  /** Defines the total number of columns in a table, grid, or treegrid. */
122
- "aria-colcount"?: number;
122
+ "aria-colcount"?: Reactive<number>;
123
123
  /** Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. */
124
- "aria-colindex"?: number;
124
+ "aria-colindex"?: Reactive<number>;
125
125
  /** Defines a human readable text alternative of aria-colindex. */
126
- "aria-colindextext"?: string;
126
+ "aria-colindextext"?: Reactive<string>;
127
127
  /** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. */
128
- "aria-colspan"?: number;
128
+ "aria-colspan"?: Reactive<number>;
129
129
  /** Identifies the element(s) whose contents or presence are controlled by the current element. */
130
- "aria-controls"?: string;
130
+ "aria-controls"?: Reactive<string>;
131
131
  /** Indicates the element that represents the current item within a container or set of related elements. */
132
132
  "aria-current"?: Reactive<
133
133
  Booleanish | LiteralUnion<"page" | "step" | "location" | "date" | "time">
134
134
  >;
135
135
  /** Identifies the element(s) that describes the object. */
136
- "aria-describedby"?: string;
136
+ "aria-describedby"?: Reactive<string>;
137
137
  /** Defines a string value that describes or annotates the current element. */
138
- "aria-description"?: string;
138
+ "aria-description"?: Reactive<string>;
139
139
  /** Identifies the element that provides a detailed, extended description for the object. */
140
- "aria-details"?: string;
140
+ "aria-details"?: Reactive<string>;
141
141
  /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. */
142
142
  "aria-disabled"?: Reactive<Booleanish>;
143
143
  /** Identifies the element that provides an error message for the current element. */
144
- "aria-errormessage"?: string;
144
+ "aria-errormessage"?: Reactive<string>;
145
145
  /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
146
146
  "aria-expanded"?: Reactive<Booleanish>;
147
147
  /** Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. */
148
- "aria-flowto"?: string;
148
+ "aria-flowto"?: Reactive<string>;
149
149
  /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
150
150
  "aria-haspopup"?: Reactive<
151
151
  Booleanish | LiteralUnion<"menu" | "listbox" | "tree" | "grid" | "dialog">
@@ -155,13 +155,13 @@ export interface AriaAttributes {
155
155
  /** Indicates the entered value does not conform to the format expected by the application. */
156
156
  "aria-invalid"?: Reactive<Booleanish | LiteralUnion<"grammar" | "spelling">>;
157
157
  /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
158
- "aria-keyshortcuts"?: string;
158
+ "aria-keyshortcuts"?: Reactive<string>;
159
159
  /** Defines a string value that labels the current element. */
160
160
  "aria-label"?: Reactive<string>;
161
161
  /** Identifies the element(s) that labels the current element. */
162
- "aria-labelledby"?: string;
162
+ "aria-labelledby"?: Reactive<string>;
163
163
  /** Defines the hierarchical level of an element within a structure. */
164
- "aria-level"?: number;
164
+ "aria-level"?: Reactive<number>;
165
165
  /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
166
166
  "aria-live"?: Reactive<LiteralUnion<"off" | "assertive" | "polite">>;
167
167
  /** Indicates whether an element is modal when displayed. */
@@ -171,13 +171,13 @@ export interface AriaAttributes {
171
171
  /** Indicates that the user may select more than one item from the current selectable descendants. */
172
172
  "aria-multiselectable"?: Reactive<Booleanish>;
173
173
  /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
174
- "aria-orientation"?: LiteralUnion<"horizontal" | "vertical">;
174
+ "aria-orientation"?: Reactive<LiteralUnion<"horizontal" | "vertical">>;
175
175
  /** Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. */
176
- "aria-owns"?: string;
176
+ "aria-owns"?: Reactive<string>;
177
177
  /** Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. */
178
- "aria-placeholder"?: string;
178
+ "aria-placeholder"?: Reactive<string>;
179
179
  /** Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. */
180
- "aria-posinset"?: number;
180
+ "aria-posinset"?: Reactive<number>;
181
181
  /** Indicates the current "pressed" state of toggle buttons. */
182
182
  "aria-pressed"?: Reactive<Booleanish | LiteralUnion<"mixed">>;
183
183
  /** Indicates that the element is not editable, but is otherwise operable. */
@@ -198,31 +198,31 @@ export interface AriaAttributes {
198
198
  /** Indicates that user input is required on the element before a form may be submitted. */
199
199
  "aria-required"?: Reactive<Booleanish>;
200
200
  /** Defines a human-readable, author-localized description for the role of an element. */
201
- "aria-roledescription"?: string;
201
+ "aria-roledescription"?: Reactive<string>;
202
202
  /** Defines the total number of rows in a table, grid, or treegrid. */
203
- "aria-rowcount"?: number;
203
+ "aria-rowcount"?: Reactive<number>;
204
204
  /** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. */
205
- "aria-rowindex"?: number;
205
+ "aria-rowindex"?: Reactive<number>;
206
206
  /** Defines a human readable text alternative of aria-rowindex. */
207
- "aria-rowindextext"?: string;
207
+ "aria-rowindextext"?: Reactive<string>;
208
208
  /** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. */
209
- "aria-rowspan"?: number;
209
+ "aria-rowspan"?: Reactive<number>;
210
210
  /** Indicates the current "selected" state of various widgets. */
211
211
  "aria-selected"?: Reactive<Booleanish>;
212
212
  /** Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. */
213
- "aria-setsize"?: number;
213
+ "aria-setsize"?: Reactive<number>;
214
214
  /** Indicates if items in a table or grid are sorted in ascending or descending order. */
215
- "aria-sort"?: LiteralUnion<"none" | "ascending" | "descending" | "other">;
215
+ "aria-sort"?: Reactive<LiteralUnion<"none" | "ascending" | "descending" | "other">>;
216
216
  /** Defines the maximum allowed value for a range widget. */
217
- "aria-valuemax"?: number;
217
+ "aria-valuemax"?: Reactive<number>;
218
218
  /** Defines the minimum allowed value for a range widget. */
219
- "aria-valuemin"?: number;
219
+ "aria-valuemin"?: Reactive<number>;
220
220
  /** Defines the current value for a range widget. */
221
- "aria-valuenow"?: number;
221
+ "aria-valuenow"?: Reactive<number>;
222
222
  /** Defines the human readable text alternative of aria-valuenow for a range widget. */
223
- "aria-valuetext"?: string;
223
+ "aria-valuetext"?: Reactive<string>;
224
224
  /** Defines the ARIA role of the element. */
225
- role?: LiteralUnion<
225
+ role?: Reactive<LiteralUnion<
226
226
  | "alert"
227
227
  | "alertdialog"
228
228
  | "application"
@@ -294,7 +294,7 @@ export interface AriaAttributes {
294
294
  | "tree"
295
295
  | "treegrid"
296
296
  | "treeitem"
297
- >;
297
+ >>;
298
298
  }
299
299
 
300
300
  // ---------------------------------------------------------------------------
@@ -400,24 +400,29 @@ export interface HTMLAttributes<T extends Element = HTMLElement>
400
400
  title?: Reactive<string>;
401
401
  lang?: Reactive<string>;
402
402
  dir?: Reactive<Dir>;
403
- slot?: string;
404
- accessKey?: string;
403
+ /** Web Components named-slot assignment. */
404
+ slot?: Reactive<string>;
405
+ accessKey?: Reactive<string>;
406
+ /** Content Security Policy nonce. Single-use: browsers blank this out after first read. */
405
407
  nonce?: string;
406
408
  // Visibility / interaction
407
409
  hidden?: Reactive<boolean>;
408
410
  tabIndex?: Reactive<number>;
409
411
  draggable?: Reactive<boolean>;
410
- /** Autofocus on mount (global HTML5 attribute). */
412
+ /**
413
+ * Autofocus on mount (global HTML5 attribute). One-shot by spec — the browser
414
+ * only consults this at insertion time, so it is not reactive.
415
+ */
411
416
  autoFocus?: boolean;
412
417
  contentEditable?: Reactive<Booleanish | LiteralUnion<"inherit" | "plaintext-only">>;
413
418
  spellcheck?: Reactive<Booleanish>;
414
- translate?: LiteralUnion<"yes" | "no">;
419
+ translate?: Reactive<LiteralUnion<"yes" | "no">>;
415
420
  /** Marks the element as inert — blocks all user interaction and assistive technology. */
416
421
  inert?: Reactive<boolean>;
417
422
  /** Declares the element as a popover. Use `"auto"` (default, light-dismiss) or `"manual"`. */
418
- popover?: boolean | LiteralUnion<"auto" | "manual">;
423
+ popover?: Reactive<boolean | LiteralUnion<"auto" | "manual">>;
419
424
  /** CSS `::part()` export list for shadow DOM styling. */
420
- part?: string;
425
+ part?: Reactive<string>;
421
426
  // Input hints
422
427
  inputMode?: Reactive<InputMode>;
423
428
  enterKeyHint?: Reactive<EnterKeyHint>;
@@ -426,12 +431,15 @@ export interface HTMLAttributes<T extends Element = HTMLElement>
426
431
  // Raw HTML injection
427
432
  innerHTML?: Reactive<string>;
428
433
  // Micro-data
429
- itemID?: string;
430
- itemProp?: string;
431
- itemRef?: string;
432
- itemScope?: boolean;
433
- itemType?: string;
434
- // Custom elements
434
+ itemID?: Reactive<string>;
435
+ itemProp?: Reactive<string>;
436
+ itemRef?: Reactive<string>;
437
+ itemScope?: Reactive<boolean>;
438
+ itemType?: Reactive<string>;
439
+ /**
440
+ * Customized built-in element name (`is="my-button"`). Fixed at
441
+ * `document.createElement(tag, { is })` time — cannot change post-construction.
442
+ */
435
443
  is?: string;
436
444
  // JSX internals
437
445
  key?: string | number | symbol;
@@ -450,14 +458,14 @@ export interface HTMLAttributes<T extends Element = HTMLElement>
450
458
  export interface BaseHTMLAttributes<
451
459
  T extends HTMLBaseElement = HTMLBaseElement,
452
460
  > extends HTMLAttributes<T> {
453
- href?: string;
454
- target?: LinkTarget;
461
+ href?: Reactive<string>;
462
+ target?: Reactive<LinkTarget>;
455
463
  }
456
464
 
457
465
  export interface LinkHTMLAttributes<
458
466
  T extends HTMLLinkElement = HTMLLinkElement,
459
467
  > extends HTMLAttributes<T> {
460
- as?: LiteralUnion<
468
+ as?: Reactive<LiteralUnion<
461
469
  | "audio"
462
470
  | "document"
463
471
  | "embed"
@@ -470,49 +478,49 @@ export interface LinkHTMLAttributes<
470
478
  | "track"
471
479
  | "video"
472
480
  | "worker"
473
- >;
474
- crossOrigin?: CrossOrigin;
475
- href?: string;
476
- hrefLang?: string;
477
- integrity?: string;
478
- media?: string;
479
- referrerPolicy?: ReferrerPolicy;
480
- rel?: string;
481
- sizes?: string;
482
- type?: string;
483
- charSet?: string;
481
+ >>;
482
+ crossOrigin?: Reactive<CrossOrigin>;
483
+ href?: Reactive<string>;
484
+ hrefLang?: Reactive<string>;
485
+ integrity?: Reactive<string>;
486
+ media?: Reactive<string>;
487
+ referrerPolicy?: Reactive<ReferrerPolicy>;
488
+ rel?: Reactive<string>;
489
+ sizes?: Reactive<string>;
490
+ type?: Reactive<string>;
491
+ charSet?: Reactive<string>;
484
492
  }
485
493
 
486
494
  export interface MetaHTMLAttributes<
487
495
  T extends HTMLMetaElement = HTMLMetaElement,
488
496
  > extends HTMLAttributes<T> {
489
- charSet?: string;
490
- content?: string;
491
- httpEquiv?: string;
492
- name?: string;
493
- media?: string;
497
+ charSet?: Reactive<string>;
498
+ content?: Reactive<string>;
499
+ httpEquiv?: Reactive<string>;
500
+ name?: Reactive<string>;
501
+ media?: Reactive<string>;
494
502
  }
495
503
 
496
504
  export interface ScriptHTMLAttributes<
497
505
  T extends HTMLScriptElement = HTMLScriptElement,
498
506
  > extends HTMLAttributes<T> {
499
- async?: boolean;
500
- crossOrigin?: CrossOrigin;
501
- defer?: boolean;
502
- integrity?: string;
503
- noModule?: boolean;
504
- referrerPolicy?: ReferrerPolicy;
505
- src?: string;
506
- type?: string;
507
- charSet?: string;
507
+ async?: Reactive<boolean>;
508
+ crossOrigin?: Reactive<CrossOrigin>;
509
+ defer?: Reactive<boolean>;
510
+ integrity?: Reactive<string>;
511
+ noModule?: Reactive<boolean>;
512
+ referrerPolicy?: Reactive<ReferrerPolicy>;
513
+ src?: Reactive<string>;
514
+ type?: Reactive<string>;
515
+ charSet?: Reactive<string>;
508
516
  }
509
517
 
510
518
  export interface StyleHTMLAttributes<
511
519
  T extends HTMLStyleElement = HTMLStyleElement,
512
520
  > extends HTMLAttributes<T> {
513
- media?: string;
514
- scoped?: boolean;
515
- type?: string;
521
+ media?: Reactive<string>;
522
+ scoped?: Reactive<boolean>;
523
+ type?: Reactive<string>;
516
524
  }
517
525
 
518
526
  // --- Sectioning / grouping ---
@@ -520,26 +528,26 @@ export interface StyleHTMLAttributes<
520
528
  export interface BlockquoteHTMLAttributes<
521
529
  T extends HTMLQuoteElement = HTMLQuoteElement,
522
530
  > extends HTMLAttributes<T> {
523
- cite?: string;
531
+ cite?: Reactive<string>;
524
532
  }
525
533
 
526
534
  export interface OlHTMLAttributes<
527
535
  T extends HTMLOListElement = HTMLOListElement,
528
536
  > extends HTMLAttributes<T> {
529
- reversed?: boolean;
530
- start?: number;
531
- type?: LiteralUnion<"1" | "a" | "A" | "i" | "I">;
537
+ reversed?: Reactive<boolean>;
538
+ start?: Reactive<number>;
539
+ type?: Reactive<LiteralUnion<"1" | "a" | "A" | "i" | "I">>;
532
540
  }
533
541
 
534
542
  export interface LiHTMLAttributes<T extends HTMLLIElement = HTMLLIElement>
535
543
  extends HTMLAttributes<T> {
536
- value?: number;
544
+ value?: Reactive<number>;
537
545
  }
538
546
 
539
547
  export interface MenuHTMLAttributes<
540
548
  T extends HTMLMenuElement = HTMLMenuElement,
541
549
  > extends HTMLAttributes<T> {
542
- type?: string;
550
+ type?: Reactive<string>;
543
551
  }
544
552
 
545
553
  // --- Text-level ---
@@ -549,13 +557,13 @@ export interface AnchorHTMLAttributes<
549
557
  > extends HTMLAttributes<T> {
550
558
  download?: Reactive<string | boolean>;
551
559
  href?: Reactive<string>;
552
- hrefLang?: string;
553
- media?: string;
554
- ping?: string;
555
- referrerPolicy?: ReferrerPolicy;
556
- rel?: string;
560
+ hrefLang?: Reactive<string>;
561
+ media?: Reactive<string>;
562
+ ping?: Reactive<string>;
563
+ referrerPolicy?: Reactive<ReferrerPolicy>;
564
+ rel?: Reactive<string>;
557
565
  target?: Reactive<LinkTarget>;
558
- type?: string;
566
+ type?: Reactive<string>;
559
567
  }
560
568
 
561
569
  export interface DataHTMLAttributes<
@@ -575,32 +583,32 @@ export interface TimeHTMLAttributes<
575
583
  export interface ImgHTMLAttributes<
576
584
  T extends HTMLImageElement = HTMLImageElement,
577
585
  > extends HTMLAttributes<T> {
578
- alt?: string;
579
- crossOrigin?: CrossOrigin;
580
- decoding?: Decoding;
586
+ alt?: Reactive<string>;
587
+ crossOrigin?: Reactive<CrossOrigin>;
588
+ decoding?: Reactive<Decoding>;
581
589
  height?: Reactive<number | string>;
582
- loading?: Loading;
583
- referrerPolicy?: ReferrerPolicy;
584
- sizes?: string;
590
+ loading?: Reactive<Loading>;
591
+ referrerPolicy?: Reactive<ReferrerPolicy>;
592
+ sizes?: Reactive<string>;
585
593
  src?: Reactive<string>;
586
594
  srcSet?: Reactive<string>;
587
- useMap?: string;
595
+ useMap?: Reactive<string>;
588
596
  width?: Reactive<number | string>;
589
- fetchPriority?: LiteralUnion<"high" | "low" | "auto">;
597
+ fetchPriority?: Reactive<LiteralUnion<"high" | "low" | "auto">>;
590
598
  }
591
599
 
592
600
  export interface IframeHTMLAttributes<
593
601
  T extends HTMLIFrameElement = HTMLIFrameElement,
594
602
  > extends HTMLAttributes<T> {
595
- allow?: string;
603
+ allow?: Reactive<string>;
596
604
  allowFullScreen?: Reactive<boolean>;
597
605
  height?: Reactive<number | string>;
598
- loading?: Loading;
599
- name?: string;
600
- referrerPolicy?: ReferrerPolicy;
606
+ loading?: Reactive<Loading>;
607
+ name?: Reactive<string>;
608
+ referrerPolicy?: Reactive<ReferrerPolicy>;
601
609
  sandbox?: Reactive<string>;
602
610
  src?: Reactive<string>;
603
- srcDoc?: string;
611
+ srcDoc?: Reactive<string>;
604
612
  title?: Reactive<string>;
605
613
  width?: Reactive<number | string>;
606
614
  }
@@ -610,19 +618,19 @@ export interface EmbedHTMLAttributes<
610
618
  > extends HTMLAttributes<T> {
611
619
  height?: Reactive<number | string>;
612
620
  src?: Reactive<string>;
613
- type?: string;
621
+ type?: Reactive<string>;
614
622
  width?: Reactive<number | string>;
615
623
  }
616
624
 
617
625
  export interface ObjectHTMLAttributes<
618
626
  T extends HTMLObjectElement = HTMLObjectElement,
619
627
  > extends HTMLAttributes<T> {
620
- data?: string;
621
- form?: string;
628
+ data?: Reactive<string>;
629
+ form?: Reactive<string>;
622
630
  height?: Reactive<number | string>;
623
- name?: string;
624
- type?: string;
625
- useMap?: string;
631
+ name?: Reactive<string>;
632
+ type?: Reactive<string>;
633
+ useMap?: Reactive<string>;
626
634
  width?: Reactive<number | string>;
627
635
  }
628
636
 
@@ -630,37 +638,41 @@ export interface SourceHTMLAttributes<
630
638
  T extends HTMLSourceElement = HTMLSourceElement,
631
639
  > extends HTMLAttributes<T> {
632
640
  height?: Reactive<number | string>;
633
- media?: string;
634
- sizes?: string;
641
+ media?: Reactive<string>;
642
+ sizes?: Reactive<string>;
635
643
  src?: Reactive<string>;
636
644
  srcSet?: Reactive<string>;
637
- type?: string;
645
+ type?: Reactive<string>;
638
646
  width?: Reactive<number | string>;
639
647
  }
640
648
 
641
649
  export interface TrackHTMLAttributes<
642
650
  T extends HTMLTrackElement = HTMLTrackElement,
643
651
  > extends HTMLAttributes<T> {
644
- default?: boolean;
645
- kind?: LiteralUnion<
652
+ default?: Reactive<boolean>;
653
+ kind?: Reactive<LiteralUnion<
646
654
  "subtitles" | "captions" | "descriptions" | "chapters" | "metadata"
647
- >;
648
- label?: string;
649
- src?: string;
650
- srcLang?: string;
655
+ >>;
656
+ label?: Reactive<string>;
657
+ src?: Reactive<string>;
658
+ srcLang?: Reactive<string>;
651
659
  }
652
660
 
653
661
  export interface MediaHTMLAttributes<T extends HTMLMediaElement = HTMLMediaElement>
654
662
  extends HTMLAttributes<T> {
663
+ /**
664
+ * One-shot by spec — the browser only consults `autoplay` at insertion
665
+ * time, so it is not reactive.
666
+ */
655
667
  autoPlay?: boolean;
656
668
  controls?: Reactive<boolean>;
657
- controlsList?: string;
658
- crossOrigin?: CrossOrigin;
669
+ controlsList?: Reactive<string>;
670
+ crossOrigin?: Reactive<CrossOrigin>;
659
671
  loop?: Reactive<boolean>;
660
- mediaGroup?: string;
672
+ mediaGroup?: Reactive<string>;
661
673
  muted?: Reactive<boolean>;
662
- playsInline?: boolean;
663
- preload?: LiteralUnion<"none" | "metadata" | "auto">;
674
+ playsInline?: Reactive<boolean>;
675
+ preload?: Reactive<LiteralUnion<"none" | "metadata" | "auto">>;
664
676
  src?: Reactive<string>;
665
677
  // Media events
666
678
  onAbort?: (e: NativeEventOf<Event, T>) => void;
@@ -694,11 +706,11 @@ export interface VideoHTMLAttributes<
694
706
  T extends HTMLVideoElement = HTMLVideoElement,
695
707
  > extends MediaHTMLAttributes<T> {
696
708
  height?: Reactive<number | string>;
697
- playsInline?: boolean;
709
+ playsInline?: Reactive<boolean>;
698
710
  poster?: Reactive<string>;
699
711
  width?: Reactive<number | string>;
700
- disablePictureInPicture?: boolean;
701
- disableRemotePlayback?: boolean;
712
+ disablePictureInPicture?: Reactive<boolean>;
713
+ disableRemotePlayback?: Reactive<boolean>;
702
714
  }
703
715
 
704
716
  export interface CanvasHTMLAttributes<
@@ -711,21 +723,21 @@ export interface CanvasHTMLAttributes<
711
723
  export interface MapHTMLAttributes<
712
724
  T extends HTMLMapElement = HTMLMapElement,
713
725
  > extends HTMLAttributes<T> {
714
- name?: string;
726
+ name?: Reactive<string>;
715
727
  }
716
728
 
717
729
  export interface AreaHTMLAttributes<
718
730
  T extends HTMLAreaElement = HTMLAreaElement,
719
731
  > extends HTMLAttributes<T> {
720
- alt?: string;
721
- coords?: string;
722
- download?: string;
732
+ alt?: Reactive<string>;
733
+ coords?: Reactive<string>;
734
+ download?: Reactive<string | boolean>;
723
735
  href?: Reactive<string>;
724
- hrefLang?: string;
725
- media?: string;
726
- referrerPolicy?: ReferrerPolicy;
727
- rel?: string;
728
- shape?: string;
736
+ hrefLang?: Reactive<string>;
737
+ media?: Reactive<string>;
738
+ referrerPolicy?: Reactive<ReferrerPolicy>;
739
+ rel?: Reactive<string>;
740
+ shape?: Reactive<string>;
729
741
  target?: Reactive<LinkTarget>;
730
742
  }
731
743
 
@@ -734,106 +746,120 @@ export interface AreaHTMLAttributes<
734
746
  export interface FormHTMLAttributes<
735
747
  T extends HTMLFormElement = HTMLFormElement,
736
748
  > extends HTMLAttributes<T> {
737
- acceptCharset?: string;
749
+ acceptCharset?: Reactive<string>;
738
750
  action?: Reactive<string>;
739
- autoComplete?: string;
740
- encType?: FormEncType;
741
- method?: FormMethod;
742
- name?: string;
743
- noValidate?: boolean;
744
- target?: LinkTarget;
745
- rel?: string;
751
+ autoComplete?: Reactive<string>;
752
+ encType?: Reactive<FormEncType>;
753
+ method?: Reactive<FormMethod>;
754
+ name?: Reactive<string>;
755
+ noValidate?: Reactive<boolean>;
756
+ target?: Reactive<LinkTarget>;
757
+ rel?: Reactive<string>;
746
758
  }
747
759
 
748
760
  export interface FieldsetHTMLAttributes<
749
761
  T extends HTMLFieldSetElement = HTMLFieldSetElement,
750
762
  > extends HTMLAttributes<T> {
751
763
  disabled?: Reactive<boolean>;
752
- form?: string;
753
- name?: string;
764
+ form?: Reactive<string>;
765
+ name?: Reactive<string>;
754
766
  }
755
767
 
756
768
  export interface InputHTMLAttributes<
757
769
  T extends HTMLInputElement = HTMLInputElement,
758
770
  > extends HTMLAttributes<T> {
759
- accept?: string;
760
- alt?: string;
761
- autoComplete?: LiteralUnion<string>;
771
+ accept?: Reactive<string>;
772
+ alt?: Reactive<string>;
773
+ autoComplete?: Reactive<LiteralUnion<string>>;
774
+ /**
775
+ * Autofocus on mount. One-shot by spec — the browser only consults this
776
+ * at insertion time, so it is not reactive.
777
+ */
762
778
  autoFocus?: boolean;
763
- capture?: boolean | LiteralUnion<"user" | "environment">;
779
+ capture?: Reactive<boolean | LiteralUnion<"user" | "environment">>;
764
780
  checked?: Reactive<boolean>;
765
- crossOrigin?: CrossOrigin;
781
+ crossOrigin?: Reactive<CrossOrigin>;
782
+ /** Uncontrolled-baseline value, set once on mount — not reactive. */
766
783
  defaultChecked?: boolean;
784
+ /** Uncontrolled-baseline value, set once on mount — not reactive. */
767
785
  defaultValue?: string | number | readonly string[];
768
- dirName?: string;
786
+ dirName?: Reactive<string>;
769
787
  disabled?: Reactive<boolean>;
770
788
  enterKeyHint?: Reactive<EnterKeyHint>;
771
- form?: string;
772
- formAction?: string;
773
- formEncType?: FormEncType;
774
- formMethod?: FormMethod;
775
- formNoValidate?: boolean;
776
- formTarget?: string;
789
+ form?: Reactive<string>;
790
+ formAction?: Reactive<string>;
791
+ formEncType?: Reactive<FormEncType>;
792
+ formMethod?: Reactive<FormMethod>;
793
+ formNoValidate?: Reactive<boolean>;
794
+ formTarget?: Reactive<string>;
777
795
  height?: Reactive<number | string>;
778
- list?: string;
796
+ list?: Reactive<string>;
779
797
  max?: Reactive<number | string>;
780
- maxLength?: number;
798
+ maxLength?: Reactive<number>;
781
799
  min?: Reactive<number | string>;
782
- minLength?: number;
783
- multiple?: boolean;
784
- name?: string;
785
- pattern?: string;
800
+ minLength?: Reactive<number>;
801
+ multiple?: Reactive<boolean>;
802
+ name?: Reactive<string>;
803
+ pattern?: Reactive<string>;
786
804
  placeholder?: Reactive<string>;
787
805
  readOnly?: Reactive<boolean>;
788
806
  required?: Reactive<boolean>;
789
- size?: number;
790
- src?: string;
807
+ size?: Reactive<number>;
808
+ src?: Reactive<string>;
791
809
  step?: Reactive<number | string>;
792
810
  type?: Reactive<HTMLInputTypeAttribute>;
793
811
  value?: Reactive<string | number | readonly string[]>;
794
812
  width?: Reactive<number | string>;
795
- popovertarget?: string;
796
- popovertargetaction?: LiteralUnion<"hide" | "show" | "toggle">;
813
+ popovertarget?: Reactive<string>;
814
+ popovertargetaction?: Reactive<LiteralUnion<"hide" | "show" | "toggle">>;
797
815
  }
798
816
 
799
817
  export interface ButtonHTMLAttributes<
800
818
  T extends HTMLButtonElement = HTMLButtonElement,
801
819
  > extends HTMLAttributes<T> {
820
+ /**
821
+ * Autofocus on mount. One-shot by spec — the browser only consults this
822
+ * at insertion time, so it is not reactive.
823
+ */
802
824
  autoFocus?: boolean;
803
825
  disabled?: Reactive<boolean>;
804
- form?: string;
805
- formAction?: string;
806
- formEncType?: FormEncType;
807
- formMethod?: FormMethod;
808
- formNoValidate?: boolean;
809
- formTarget?: string;
810
- name?: string;
826
+ form?: Reactive<string>;
827
+ formAction?: Reactive<string>;
828
+ formEncType?: Reactive<FormEncType>;
829
+ formMethod?: Reactive<FormMethod>;
830
+ formNoValidate?: Reactive<boolean>;
831
+ formTarget?: Reactive<string>;
832
+ name?: Reactive<string>;
811
833
  type?: Reactive<ButtonType>;
812
834
  value?: Reactive<string>;
813
- popovertarget?: string;
814
- popovertargetaction?: LiteralUnion<"hide" | "show" | "toggle">;
835
+ popovertarget?: Reactive<string>;
836
+ popovertargetaction?: Reactive<LiteralUnion<"hide" | "show" | "toggle">>;
815
837
  }
816
838
 
817
839
  export interface LabelHTMLAttributes<
818
840
  T extends HTMLLabelElement = HTMLLabelElement,
819
841
  > extends HTMLAttributes<T> {
820
- form?: string;
821
- htmlFor?: string;
842
+ form?: Reactive<string>;
843
+ htmlFor?: Reactive<string>;
822
844
  /** DOM attribute alias for `htmlFor`. */
823
- for?: string;
845
+ for?: Reactive<string>;
824
846
  }
825
847
 
826
848
  export interface SelectHTMLAttributes<
827
849
  T extends HTMLSelectElement = HTMLSelectElement,
828
850
  > extends HTMLAttributes<T> {
829
- autoComplete?: string;
851
+ autoComplete?: Reactive<string>;
852
+ /**
853
+ * Autofocus on mount. One-shot by spec — the browser only consults this
854
+ * at insertion time, so it is not reactive.
855
+ */
830
856
  autoFocus?: boolean;
831
857
  disabled?: Reactive<boolean>;
832
- form?: string;
833
- multiple?: boolean;
834
- name?: string;
858
+ form?: Reactive<string>;
859
+ multiple?: Reactive<boolean>;
860
+ name?: Reactive<string>;
835
861
  required?: Reactive<boolean>;
836
- size?: number;
862
+ size?: Reactive<number>;
837
863
  value?: Reactive<string | number | readonly string[]>;
838
864
  }
839
865
 
@@ -841,14 +867,14 @@ export interface OptgroupHTMLAttributes<
841
867
  T extends HTMLOptGroupElement = HTMLOptGroupElement,
842
868
  > extends HTMLAttributes<T> {
843
869
  disabled?: Reactive<boolean>;
844
- label?: string;
870
+ label?: Reactive<string>;
845
871
  }
846
872
 
847
873
  export interface OptionHTMLAttributes<
848
874
  T extends HTMLOptionElement = HTMLOptionElement,
849
875
  > extends HTMLAttributes<T> {
850
876
  disabled?: Reactive<boolean>;
851
- label?: string;
877
+ label?: Reactive<string>;
852
878
  selected?: Reactive<boolean>;
853
879
  value?: Reactive<string | number>;
854
880
  }
@@ -856,48 +882,53 @@ export interface OptionHTMLAttributes<
856
882
  export interface OutputHTMLAttributes<
857
883
  T extends HTMLOutputElement = HTMLOutputElement,
858
884
  > extends HTMLAttributes<T> {
859
- form?: string;
860
- htmlFor?: string;
861
- name?: string;
885
+ form?: Reactive<string>;
886
+ htmlFor?: Reactive<string>;
887
+ name?: Reactive<string>;
862
888
  }
863
889
 
864
890
  export interface TextareaHTMLAttributes<
865
891
  T extends HTMLTextAreaElement = HTMLTextAreaElement,
866
892
  > extends HTMLAttributes<T> {
867
- autoComplete?: string;
893
+ autoComplete?: Reactive<string>;
894
+ /**
895
+ * Autofocus on mount. One-shot by spec — the browser only consults this
896
+ * at insertion time, so it is not reactive.
897
+ */
868
898
  autoFocus?: boolean;
869
- cols?: number;
899
+ cols?: Reactive<number>;
900
+ /** Uncontrolled-baseline value, set once on mount — not reactive. */
870
901
  defaultValue?: string;
871
- dirName?: string;
902
+ dirName?: Reactive<string>;
872
903
  disabled?: Reactive<boolean>;
873
- form?: string;
874
- maxLength?: number;
875
- minLength?: number;
876
- name?: string;
904
+ form?: Reactive<string>;
905
+ maxLength?: Reactive<number>;
906
+ minLength?: Reactive<number>;
907
+ name?: Reactive<string>;
877
908
  placeholder?: Reactive<string>;
878
909
  readOnly?: Reactive<boolean>;
879
910
  required?: Reactive<boolean>;
880
- rows?: number;
911
+ rows?: Reactive<number>;
881
912
  value?: Reactive<string>;
882
- wrap?: LiteralUnion<"hard" | "soft" | "off">;
913
+ wrap?: Reactive<LiteralUnion<"hard" | "soft" | "off">>;
883
914
  }
884
915
 
885
916
  export interface MeterHTMLAttributes<
886
917
  T extends HTMLMeterElement = HTMLMeterElement,
887
918
  > extends HTMLAttributes<T> {
888
- form?: string;
889
- high?: number;
890
- low?: number;
919
+ form?: Reactive<string>;
920
+ high?: Reactive<number>;
921
+ low?: Reactive<number>;
891
922
  max?: Reactive<number | string>;
892
923
  min?: Reactive<number | string>;
893
- optimum?: number;
924
+ optimum?: Reactive<number>;
894
925
  value?: Reactive<string | number>;
895
926
  }
896
927
 
897
928
  export interface ProgressHTMLAttributes<
898
929
  T extends HTMLProgressElement = HTMLProgressElement,
899
930
  > extends HTMLAttributes<T> {
900
- max?: number | string;
931
+ max?: Reactive<number | string>;
901
932
  value?: Reactive<string | number>;
902
933
  }
903
934
 
@@ -911,7 +942,7 @@ export interface DetailsHTMLAttributes<
911
942
  T extends HTMLDetailsElement = HTMLDetailsElement,
912
943
  > extends HTMLAttributes<T> {
913
944
  open?: Reactive<boolean>;
914
- name?: string;
945
+ name?: Reactive<string>;
915
946
  onToggle?: (e: NativeEventOf<Event, T>) => void;
916
947
  onBeforeToggle?: (e: NativeEventOf<Event, T>) => void;
917
948
  }
@@ -929,7 +960,7 @@ export interface DialogHTMLAttributes<
929
960
  export interface SlotHTMLAttributes<
930
961
  T extends HTMLSlotElement = HTMLSlotElement,
931
962
  > extends HTMLAttributes<T> {
932
- name?: string;
963
+ name?: Reactive<string>;
933
964
  }
934
965
 
935
966
  // --- Tabular ---
@@ -937,48 +968,48 @@ export interface SlotHTMLAttributes<
937
968
  export interface TableHTMLAttributes<
938
969
  T extends HTMLTableElement = HTMLTableElement,
939
970
  > extends HTMLAttributes<T> {
940
- cellPadding?: number | string;
941
- cellSpacing?: number | string;
942
- summary?: string;
943
- width?: number | string;
971
+ cellPadding?: Reactive<number | string>;
972
+ cellSpacing?: Reactive<number | string>;
973
+ summary?: Reactive<string>;
974
+ width?: Reactive<number | string>;
944
975
  }
945
976
 
946
977
  export interface ColHTMLAttributes<
947
978
  T extends HTMLTableColElement = HTMLTableColElement,
948
979
  > extends HTMLAttributes<T> {
949
- span?: number;
950
- width?: number | string;
980
+ span?: Reactive<number>;
981
+ width?: Reactive<number | string>;
951
982
  }
952
983
 
953
984
  export interface ColgroupHTMLAttributes<
954
985
  T extends HTMLTableColElement = HTMLTableColElement,
955
986
  > extends HTMLAttributes<T> {
956
- span?: number;
987
+ span?: Reactive<number>;
957
988
  }
958
989
 
959
990
  export interface TdHTMLAttributes<
960
991
  T extends HTMLTableCellElement = HTMLTableCellElement,
961
992
  > extends HTMLAttributes<T> {
962
- align?: LiteralUnion<"left" | "center" | "right" | "justify" | "char">;
963
- colSpan?: number;
964
- headers?: string;
965
- rowSpan?: number;
966
- scope?: LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">;
967
- abbr?: string;
968
- height?: number | string;
969
- width?: number | string;
970
- valign?: LiteralUnion<"top" | "middle" | "bottom" | "baseline">;
993
+ align?: Reactive<LiteralUnion<"left" | "center" | "right" | "justify" | "char">>;
994
+ colSpan?: Reactive<number>;
995
+ headers?: Reactive<string>;
996
+ rowSpan?: Reactive<number>;
997
+ scope?: Reactive<LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">>;
998
+ abbr?: Reactive<string>;
999
+ height?: Reactive<number | string>;
1000
+ width?: Reactive<number | string>;
1001
+ valign?: Reactive<LiteralUnion<"top" | "middle" | "bottom" | "baseline">>;
971
1002
  }
972
1003
 
973
1004
  export interface ThHTMLAttributes<
974
1005
  T extends HTMLTableCellElement = HTMLTableCellElement,
975
1006
  > extends HTMLAttributes<T> {
976
- align?: LiteralUnion<"left" | "center" | "right" | "justify" | "char">;
977
- colSpan?: number;
978
- headers?: string;
979
- rowSpan?: number;
980
- scope?: LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">;
981
- abbr?: string;
1007
+ align?: Reactive<LiteralUnion<"left" | "center" | "right" | "justify" | "char">>;
1008
+ colSpan?: Reactive<number>;
1009
+ headers?: Reactive<string>;
1010
+ rowSpan?: Reactive<number>;
1011
+ scope?: Reactive<LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">>;
1012
+ abbr?: Reactive<string>;
982
1013
  }
983
1014
 
984
1015
  // --- Content edits ---
@@ -986,15 +1017,15 @@ export interface ThHTMLAttributes<
986
1017
  export interface DelHTMLAttributes<
987
1018
  T extends HTMLModElement = HTMLModElement,
988
1019
  > extends HTMLAttributes<T> {
989
- cite?: string;
990
- dateTime?: string;
1020
+ cite?: Reactive<string>;
1021
+ dateTime?: Reactive<string>;
991
1022
  }
992
1023
 
993
1024
  export interface InsHTMLAttributes<
994
1025
  T extends HTMLModElement = HTMLModElement,
995
1026
  > extends HTMLAttributes<T> {
996
- cite?: string;
997
- dateTime?: string;
1027
+ cite?: Reactive<string>;
1028
+ dateTime?: Reactive<string>;
998
1029
  }
999
1030
 
1000
1031
  // ---------------------------------------------------------------------------