@markuplint/ml-spec 3.0.0-alpha.82 → 3.0.0-dev.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +8 -3
  2. package/lib/dom-traverse/get-computed-aria-props.d.ts +12 -0
  3. package/lib/dom-traverse/get-computed-aria-props.js +106 -0
  4. package/lib/dom-traverse/get-computed-role.js +13 -25
  5. package/lib/dom-traverse/get-content-model.d.ts +3 -0
  6. package/lib/dom-traverse/get-content-model.js +28 -0
  7. package/lib/dom-traverse/get-explicit-role.js +1 -1
  8. package/lib/dom-traverse/get-spec.d.ts +2 -2
  9. package/lib/dom-traverse/get-spec.js +2 -2
  10. package/lib/dom-traverse/has-required-owned-elements.js +12 -0
  11. package/lib/dom-traverse/is-exposed.d.ts +11 -0
  12. package/lib/dom-traverse/is-exposed.js +181 -0
  13. package/lib/dom-traverse/may-be-focusable.d.ts +2 -0
  14. package/lib/dom-traverse/may-be-focusable.js +22 -0
  15. package/lib/index.d.ts +8 -1
  16. package/lib/index.js +8 -1
  17. package/lib/specs/content-model-category-to-tag-names.d.ts +2 -2
  18. package/lib/specs/content-model-category-to-tag-names.js +2 -2
  19. package/lib/specs/get-aria.js +3 -3
  20. package/lib/specs/get-attr-specs.d.ts +1 -1
  21. package/lib/specs/get-selectors-by-content-model-category.d.ts +1 -1
  22. package/lib/specs/get-spec-by-tag-name.d.ts +2 -2
  23. package/lib/specs/get-spec-by-tag-name.js +1 -1
  24. package/lib/specs/is-nothing-content-model.d.ts +5 -0
  25. package/lib/specs/is-nothing-content-model.js +12 -0
  26. package/lib/specs/is-palpable-elements.d.ts +5 -0
  27. package/lib/specs/is-palpable-elements.js +47 -0
  28. package/lib/specs/is-void-element.d.ts +1 -0
  29. package/lib/specs/is-void-element.js +25 -0
  30. package/lib/specs/schema-to-spec.d.ts +1 -1
  31. package/lib/specs/schema-to-spec.js +1 -1
  32. package/lib/types/aria.d.ts +10 -4
  33. package/lib/types/attributes.d.ts +94 -39
  34. package/lib/types/index.d.ts +27 -27
  35. package/lib/types/permitted-structres.d.ts +22 -28
  36. package/lib/types/permitted-structures.d.ts +54 -0
  37. package/lib/types/permitted-structures.js +8 -0
  38. package/lib/utils/get-ns.d.ts +2 -1
  39. package/lib/utils/get-ns.js +3 -0
  40. package/lib/utils/merge-array.d.ts +1 -1
  41. package/lib/utils/resolve-namespace.d.ts +4 -4
  42. package/lib/utils/resolve-namespace.js +18 -13
  43. package/package.json +7 -7
  44. package/schema.json +6 -6
  45. package/schemas/aria.schema.json +1 -1
  46. package/schemas/content-models.schema.json +33 -49
  47. package/src/dom-traverse/accname-computation.spec.ts +6 -6
  48. package/src/dom-traverse/get-computed-aria-props.spec.ts +368 -0
  49. package/src/dom-traverse/get-computed-aria-props.ts +130 -0
  50. package/src/dom-traverse/get-computed-role.spec.ts +1 -1
  51. package/src/dom-traverse/get-computed-role.ts +13 -25
  52. package/src/dom-traverse/get-content-model.ts +32 -0
  53. package/src/dom-traverse/get-explicit-role.ts +1 -1
  54. package/src/dom-traverse/get-spec.ts +3 -3
  55. package/src/dom-traverse/has-required-owned-elements.ts +13 -0
  56. package/src/dom-traverse/is-exposed.spec.ts +50 -0
  57. package/src/dom-traverse/is-exposed.ts +196 -0
  58. package/src/dom-traverse/may-be-focusable.ts +21 -0
  59. package/src/index.ts +8 -1
  60. package/src/specs/content-model-category-to-tag-names.ts +3 -3
  61. package/src/specs/get-aria.ts +3 -3
  62. package/src/specs/get-selectors-by-content-model-category.ts +1 -1
  63. package/src/specs/get-spec-by-tag-name.spec.ts +10 -10
  64. package/src/specs/get-spec-by-tag-name.ts +9 -5
  65. package/src/specs/is-nothing-content-model.ts +9 -0
  66. package/src/specs/is-palpable-elements.ts +55 -0
  67. package/src/specs/is-void-element.ts +22 -0
  68. package/src/specs/schema-to-spec.ts +1 -1
  69. package/src/types/aria.ts +7 -1
  70. package/src/types/attributes.ts +227 -121
  71. package/src/types/index.ts +8 -8
  72. package/src/types/permitted-structres.ts +24 -32
  73. package/src/types/permitted-structures.ts +96 -0
  74. package/src/utils/get-ns.ts +6 -1
  75. package/src/utils/resolve-namespace.spec.ts +37 -0
  76. package/src/utils/resolve-namespace.ts +22 -18
  77. package/tsconfig.tsbuildinfo +1 -1
  78. package/lib/dom-traverse/focusability-computation.d.ts +0 -1
  79. package/lib/dom-traverse/focusability-computation.js +0 -8
  80. package/lib/dom-traverse/get-aria.d.ts +0 -9
  81. package/lib/dom-traverse/get-aria.js +0 -54
  82. package/lib/specs/aria-spec.d.ts +0 -5
  83. package/lib/specs/aria-spec.js +0 -12
  84. package/lib/specs/get-spec.d.ts +0 -13
  85. package/lib/specs/get-spec.js +0 -85
  86. package/lib/specs/html-spec.d.ts +0 -6
  87. package/lib/specs/html-spec.js +0 -16
  88. package/lib/specs/resolve-namespace.d.ts +0 -9
  89. package/lib/specs/resolve-namespace.js +0 -26
  90. package/lib/utils.d.ts +0 -8
  91. package/lib/utils.js +0 -50
@@ -108,12 +108,14 @@ export type AttributeType =
108
108
  | "<'-webkit-text-stroke-width'>"
109
109
  | "<'-webkit-touch-callout'>"
110
110
  | "<'-webkit-user-modify'>"
111
+ | "<'accent-color'>"
111
112
  | "<'align-content'>"
112
113
  | "<'align-items'>"
113
114
  | "<'align-self'>"
114
115
  | "<'align-tracks'>"
115
116
  | "<'all'>"
116
117
  | "<'animation'>"
118
+ | "<'animation-composition'>"
117
119
  | "<'animation-delay'>"
118
120
  | "<'animation-direction'>"
119
121
  | "<'animation-duration'>"
@@ -122,6 +124,7 @@ export type AttributeType =
122
124
  | "<'animation-name'>"
123
125
  | "<'animation-play-state'>"
124
126
  | "<'animation-timing-function'>"
127
+ | "<'animation-timeline'>"
125
128
  | "<'appearance'>"
126
129
  | "<'aspect-ratio'>"
127
130
  | "<'azimuth'>"
@@ -218,12 +221,15 @@ export type AttributeType =
218
221
  | "<'break-before'>"
219
222
  | "<'break-inside'>"
220
223
  | "<'caption-side'>"
224
+ | "<'caret'>"
221
225
  | "<'caret-color'>"
226
+ | "<'caret-shape'>"
222
227
  | "<'clear'>"
223
228
  | "<'clip'>"
224
229
  | "<'clip-path'>"
225
230
  | "<'color'>"
226
- | "<'color-adjust'>"
231
+ | "<'print-color-adjust'>"
232
+ | "<'color-scheme'>"
227
233
  | "<'column-count'>"
228
234
  | "<'column-fill'>"
229
235
  | "<'column-gap'>"
@@ -235,7 +241,13 @@ export type AttributeType =
235
241
  | "<'column-width'>"
236
242
  | "<'columns'>"
237
243
  | "<'contain'>"
244
+ | "<'contain-intrinsic-size'>"
245
+ | "<'contain-intrinsic-block-size'>"
246
+ | "<'contain-intrinsic-height'>"
247
+ | "<'contain-intrinsic-inline-size'>"
248
+ | "<'contain-intrinsic-width'>"
238
249
  | "<'content'>"
250
+ | "<'content-visibility'>"
239
251
  | "<'counter-increment'>"
240
252
  | "<'counter-reset'>"
241
253
  | "<'counter-set'>"
@@ -273,6 +285,7 @@ export type AttributeType =
273
285
  | "<'font-variant-numeric'>"
274
286
  | "<'font-variant-position'>"
275
287
  | "<'font-weight'>"
288
+ | "<'forced-color-adjust'>"
276
289
  | "<'gap'>"
277
290
  | "<'grid'>"
278
291
  | "<'grid-area'>"
@@ -294,6 +307,7 @@ export type AttributeType =
294
307
  | "<'grid-template-rows'>"
295
308
  | "<'hanging-punctuation'>"
296
309
  | "<'height'>"
310
+ | "<'hyphenate-character'>"
297
311
  | "<'hyphens'>"
298
312
  | "<'image-orientation'>"
299
313
  | "<'image-rendering'>"
@@ -302,6 +316,7 @@ export type AttributeType =
302
316
  | "<'initial-letter'>"
303
317
  | "<'initial-letter-align'>"
304
318
  | "<'inline-size'>"
319
+ | "<'input-security'>"
305
320
  | "<'inset'>"
306
321
  | "<'inset-block'>"
307
322
  | "<'inset-block-end'>"
@@ -354,6 +369,8 @@ export type AttributeType =
354
369
  | "<'mask-size'>"
355
370
  | "<'mask-type'>"
356
371
  | "<'masonry-auto-flow'>"
372
+ | "<'math-depth'>"
373
+ | "<'math-shift'>"
357
374
  | "<'math-style'>"
358
375
  | "<'max-block-size'>"
359
376
  | "<'max-height'>"
@@ -385,6 +402,7 @@ export type AttributeType =
385
402
  | "<'overflow-anchor'>"
386
403
  | "<'overflow-block'>"
387
404
  | "<'overflow-clip-box'>"
405
+ | "<'overflow-clip-margin'>"
388
406
  | "<'overflow-inline'>"
389
407
  | "<'overflow-wrap'>"
390
408
  | "<'overflow-x'>"
@@ -460,6 +478,9 @@ export type AttributeType =
460
478
  | "<'scroll-snap-type'>"
461
479
  | "<'scroll-snap-type-x'>"
462
480
  | "<'scroll-snap-type-y'>"
481
+ | "<'scroll-timeline'>"
482
+ | "<'scroll-timeline-axis'>"
483
+ | "<'scroll-timeline-name'>"
463
484
  | "<'shape-image-threshold'>"
464
485
  | "<'shape-margin'>"
465
486
  | "<'shape-outside'>"
@@ -591,13 +612,18 @@ export type AttributeType =
591
612
  | "<'voice-rate'>"
592
613
  | "<'voice-stress'>"
593
614
  | "<'voice-volume'>"
615
+ | '<abs()>'
594
616
  | '<absolute-size>'
617
+ | '<acos()>'
595
618
  | '<alpha-value>'
596
619
  | '<angle-percentage>'
597
620
  | '<angular-color-hint>'
598
621
  | '<angular-color-stop>'
599
622
  | '<angular-color-stop-list>'
600
623
  | '<animateable-feature>'
624
+ | '<asin()>'
625
+ | '<atan()>'
626
+ | '<atan2()>'
601
627
  | '<attachment>'
602
628
  | '<attr()>'
603
629
  | '<attr-matcher>'
@@ -605,6 +631,7 @@ export type AttributeType =
605
631
  | '<attribute-selector>'
606
632
  | '<auto-repeat>'
607
633
  | '<auto-track-list>'
634
+ | '<axis>'
608
635
  | '<baseline-position>'
609
636
  | '<basic-shape>'
610
637
  | '<bg-image>'
@@ -619,6 +646,7 @@ export type AttributeType =
619
646
  | '<calc-sum>'
620
647
  | '<calc-product>'
621
648
  | '<calc-value>'
649
+ | '<calc-constant>'
622
650
  | '<cf-final-image>'
623
651
  | '<cf-mixing-image>'
624
652
  | '<circle()>'
@@ -646,7 +674,10 @@ export type AttributeType =
646
674
  | '<content-position>'
647
675
  | '<content-replacement>'
648
676
  | '<contrast()>'
677
+ | '<cos()>'
678
+ | '<counter>'
649
679
  | '<counter()>'
680
+ | '<counter-name>'
650
681
  | '<counter-style>'
651
682
  | '<counter-style-name>'
652
683
  | '<counters()>'
@@ -667,6 +698,7 @@ export type AttributeType =
667
698
  | '<ellipse()>'
668
699
  | '<ending-shape>'
669
700
  | '<env()>'
701
+ | '<exp()>'
670
702
  | '<explicit-track-list>'
671
703
  | '<family-name>'
672
704
  | '<feature-tag-value>'
@@ -680,7 +712,6 @@ export type AttributeType =
680
712
  | '<filter-function>'
681
713
  | '<filter-function-list>'
682
714
  | '<final-bg-layer>'
683
- | '<fit-content()>'
684
715
  | '<fixed-breadth>'
685
716
  | '<fixed-repeat>'
686
717
  | '<fixed-size>'
@@ -700,6 +731,8 @@ export type AttributeType =
700
731
  | '<hsla()>'
701
732
  | '<hue>'
702
733
  | '<hue-rotate()>'
734
+ | '<hwb()>'
735
+ | '<hypot()>'
703
736
  | '<id-selector>'
704
737
  | '<image>'
705
738
  | '<image()>'
@@ -714,6 +747,10 @@ export type AttributeType =
714
747
  | '<keyframe-block>'
715
748
  | '<keyframe-block-list>'
716
749
  | '<keyframe-selector>'
750
+ | '<lab()>'
751
+ | '<layer()>'
752
+ | '<layer-name>'
753
+ | '<lch()>'
717
754
  | '<leader()>'
718
755
  | '<leader-type>'
719
756
  | '<length-percentage>'
@@ -724,6 +761,7 @@ export type AttributeType =
724
761
  | '<linear-color-hint>'
725
762
  | '<linear-color-stop>'
726
763
  | '<linear-gradient()>'
764
+ | '<log()>'
727
765
  | '<mask-layer>'
728
766
  | '<mask-position>'
729
767
  | '<mask-reference>'
@@ -749,6 +787,8 @@ export type AttributeType =
749
787
  | '<mf-value>'
750
788
  | '<min()>'
751
789
  | '<minmax()>'
790
+ | '<mod()>'
791
+ | '<name-repeat>'
752
792
  | '<named-color>'
753
793
  | '<namespace-prefix>'
754
794
  | '<ns-prefix>'
@@ -765,22 +805,28 @@ export type AttributeType =
765
805
  | '<page-margin-box-type>'
766
806
  | '<page-selector-list>'
767
807
  | '<page-selector>'
808
+ | '<page-size>'
768
809
  | '<path()>'
769
810
  | '<paint()>'
770
811
  | '<perspective()>'
771
812
  | '<polygon()>'
772
813
  | '<position>'
814
+ | '<pow()>'
773
815
  | '<pseudo-class-selector>'
774
816
  | '<pseudo-element-selector>'
775
817
  | '<pseudo-page>'
776
818
  | '<quote>'
777
819
  | '<radial-gradient()>'
820
+ | '<ratio>'
778
821
  | '<relative-selector>'
779
822
  | '<relative-selector-list>'
780
823
  | '<relative-size>'
824
+ | '<rem()>'
781
825
  | '<repeat-style>'
826
+ | '<repeating-conic-gradient()>'
782
827
  | '<repeating-linear-gradient()>'
783
828
  | '<repeating-radial-gradient()>'
829
+ | '<reversed-counter-name>'
784
830
  | '<rgb()>'
785
831
  | '<rgba()>'
786
832
  | '<rotate()>'
@@ -788,14 +834,18 @@ export type AttributeType =
788
834
  | '<rotateX()>'
789
835
  | '<rotateY()>'
790
836
  | '<rotateZ()>'
837
+ | '<round()>'
838
+ | '<rounding-strategy>'
791
839
  | '<saturate()>'
792
840
  | '<scale()>'
793
841
  | '<scale3d()>'
794
842
  | '<scaleX()>'
795
843
  | '<scaleY()>'
796
844
  | '<scaleZ()>'
845
+ | '<scroller>'
797
846
  | '<self-position>'
798
847
  | '<shape-radius>'
848
+ | '<sign()>'
799
849
  | '<skew()>'
800
850
  | '<skewX()>'
801
851
  | '<skewY()>'
@@ -805,14 +855,17 @@ export type AttributeType =
805
855
  | '<shape>'
806
856
  | '<shape-box>'
807
857
  | '<side-or-corner>'
858
+ | '<sin()>'
808
859
  | '<single-animation>'
809
860
  | '<single-animation-direction>'
810
861
  | '<single-animation-fill-mode>'
811
862
  | '<single-animation-iteration-count>'
812
863
  | '<single-animation-play-state>'
864
+ | '<single-animation-timeline>'
813
865
  | '<single-transition>'
814
866
  | '<single-transition-property>'
815
867
  | '<size>'
868
+ | '<sqrt()>'
816
869
  | '<step-position>'
817
870
  | '<step-timing-function>'
818
871
  | '<subclass-selector>'
@@ -822,12 +875,14 @@ export type AttributeType =
822
875
  | '<supports-decl>'
823
876
  | '<supports-selector-fn>'
824
877
  | '<symbol>'
878
+ | '<tan()>'
825
879
  | '<target>'
826
880
  | '<target-counter()>'
827
881
  | '<target-counters()>'
828
882
  | '<target-text()>'
829
883
  | '<time-percentage>'
830
- | '<timing-function>'
884
+ | '<timeline-name>'
885
+ | '<easing-function>'
831
886
  | '<track-breadth>'
832
887
  | '<track-list>'
833
888
  | '<track-repeat>'
@@ -843,6 +898,7 @@ export type AttributeType =
843
898
  | '<type-selector>'
844
899
  | '<var()>'
845
900
  | '<viewport-length>'
901
+ | '<visual-box>'
846
902
  | '<wq-name>'
847
903
  | '<-legacy-gradient>'
848
904
  | '<-legacy-linear-gradient>'
@@ -873,23 +929,20 @@ export type AttributeType =
873
929
  | '<age>'
874
930
  | '<attr-name>'
875
931
  | '<attr-fallback>'
876
- | '<border-radius>'
932
+ | '<bg-clip>'
877
933
  | '<bottom>'
878
934
  | '<generic-voice>'
879
935
  | '<gender>'
880
936
  | '<left>'
881
937
  | '<mask-image>'
882
- | '<name-repeat>'
883
938
  | '<paint>'
884
- | '<page-size>'
885
- | '<ratio>'
886
939
  | '<right>'
940
+ | '<scroll-timeline-axis>'
941
+ | '<scroll-timeline-name>'
942
+ | '<single-animation-composition>'
887
943
  | '<svg-length>'
888
944
  | '<svg-writing-mode>'
889
945
  | '<top>'
890
- | '<track-group>'
891
- | '<track-list-v0>'
892
- | '<track-minmax>'
893
946
  | '<x>'
894
947
  | '<y>'
895
948
  | '<declaration>'
@@ -898,7 +951,6 @@ export type AttributeType =
898
951
  | '<url-modifier>'
899
952
  | '<number-zero-one>'
900
953
  | '<number-one-or-greater>'
901
- | '<positive-integer>'
902
954
  | '<-non-standard-display>'
903
955
  | '<ident-token>'
904
956
  | '<function-token>'
@@ -926,6 +978,10 @@ export type AttributeType =
926
978
  | '<}-token>'
927
979
  | '<string>'
928
980
  | '<ident>'
981
+ | '<percentage>'
982
+ | '<zero>'
983
+ | '<number>'
984
+ | '<integer>'
929
985
  | '<custom-ident>'
930
986
  | '<custom-property-name>'
931
987
  | '<hex-color>'
@@ -942,11 +998,6 @@ export type AttributeType =
942
998
  | '<resolution>'
943
999
  | '<semitones>'
944
1000
  | '<time>'
945
- | '<percentage>'
946
- | '<zero>'
947
- | '<number>'
948
- | '<integer>'
949
- | '<-ms-legacy-expression>'
950
1001
  | '<bcp-47>'
951
1002
  )
952
1003
  | (
@@ -1013,111 +1064,9 @@ export type AttributeType =
1013
1064
  )
1014
1065
  | 'Boolean'
1015
1066
  )
1016
- | {
1017
- token:
1018
- | (
1019
- | 'Any'
1020
- | 'NoEmptyAny'
1021
- | 'OneLineAny'
1022
- | 'Zero'
1023
- | 'Number'
1024
- | 'Int'
1025
- | 'Uint'
1026
- | 'XMLName'
1027
- | 'DOMID'
1028
- | 'FunctionBody'
1029
- | 'Pattern'
1030
- | 'DateTime'
1031
- | 'TabIndex'
1032
- | 'BCP47'
1033
- | 'URL'
1034
- | 'AbsoluteURL'
1035
- | 'HashName'
1036
- | 'OneCodePointChar'
1037
- | 'CustomElementName'
1038
- | 'BrowsingContextName'
1039
- | 'BrowsingContextNameOrKeyword'
1040
- | 'HTTPSchemaURL'
1041
- | 'MIMEType'
1042
- | 'ItemProp'
1043
- | 'Srcset'
1044
- | 'SourceSizeList'
1045
- | 'IconSize'
1046
- | 'AutoComplete'
1047
- | 'Accept'
1048
- | 'SerializedPermissionsPolicy'
1049
- | '<css-declaration-list>'
1050
- | '<class-list>'
1051
- | '<svg-font-size>'
1052
- | '<svg-font-size-adjust>'
1053
- | "<'color-profile'>"
1054
- | "<'color-rendering'>"
1055
- | "<'enable-background'>"
1056
- | '<list-of-svg-feature-string>'
1057
- | '<animatable-value>'
1058
- | '<begin-value-list>'
1059
- | '<end-value-list>'
1060
- | '<list-of-value>'
1061
- | '<clock-value>'
1062
- | '<color-matrix>'
1063
- | '<dasharray>'
1064
- | '<key-points>'
1065
- | '<key-splines>'
1066
- | '<key-times>'
1067
- | '<system-language>'
1068
- | '<origin>'
1069
- | '<svg-path>'
1070
- | '<points>'
1071
- | '<preserve-aspect-ratio>'
1072
- | '<view-box>'
1073
- | '<rotate>'
1074
- | '<text-coordinate>'
1075
- | '<list-of-lengths>'
1076
- | '<list-of-numbers>'
1077
- | '<list-of-percentages>'
1078
- | '<number-optional-number>'
1079
- )
1080
- | {
1081
- enum: [string, ...string[]];
1082
- disallowToSurroundBySpaces?: boolean;
1083
- caseInsensitive?: boolean;
1084
- invalidValueDefault?: string;
1085
- missingValueDefault?: string;
1086
- sameStates?: {
1087
- [k: string]: unknown;
1088
- };
1089
- };
1090
- disallowToSurroundBySpaces?: boolean;
1091
- allowEmpty?: boolean;
1092
- ordered?: boolean;
1093
- unique?: boolean;
1094
- caseInsensitive?: boolean;
1095
- number?:
1096
- | ('zeroOrMore' | 'oneOrMore')
1097
- | {
1098
- min: number;
1099
- max: number;
1100
- };
1101
- separator: 'space' | 'comma';
1102
- }
1103
- | {
1104
- enum: [string, ...string[]];
1105
- disallowToSurroundBySpaces?: boolean;
1106
- caseInsensitive?: boolean;
1107
- invalidValueDefault?: string;
1108
- missingValueDefault?: string;
1109
- sameStates?: {
1110
- [k: string]: unknown;
1111
- };
1112
- }
1113
- | {
1114
- type: 'float' | 'integer';
1115
- gt?: number;
1116
- gte?: number;
1117
- lt?: number;
1118
- lte?: number;
1119
- clampable?: boolean;
1120
- };
1067
+ | List
1068
+ | Enum
1069
+ | Number;
1121
1070
  export type AttributeCondition = string | [string, string, ...string[]];
1122
1071
 
1123
1072
  export interface AttributesSchema {
@@ -1208,6 +1157,9 @@ export interface GlobalAttributes {
1208
1157
  | 'onwheel'
1209
1158
  )[];
1210
1159
  '#DocumentElementEventAttrs'?: boolean | ('oncopy' | 'oncut' | 'onpaste')[];
1160
+ /**
1161
+ * @minItems 0
1162
+ */
1211
1163
  '#HTMLLinkAndFetchingAttrs'?: (
1212
1164
  | 'crossorigin'
1213
1165
  | 'download'
@@ -1223,6 +1175,9 @@ export interface GlobalAttributes {
1223
1175
  | 'type'
1224
1176
  | 'fetchpriority'
1225
1177
  )[];
1178
+ /**
1179
+ * @minItems 0
1180
+ */
1226
1181
  '#HTMLEmbededAndMediaContentAttrs'?: (
1227
1182
  | 'autoplay'
1228
1183
  | 'controls'
@@ -1235,6 +1190,9 @@ export interface GlobalAttributes {
1235
1190
  | 'srcset'
1236
1191
  | 'width'
1237
1192
  )[];
1193
+ /**
1194
+ * @minItems 0
1195
+ */
1238
1196
  '#HTMLFormControlElementAttrs'?: (
1239
1197
  | 'autocomplete'
1240
1198
  | 'dirname'
@@ -1251,12 +1209,30 @@ export interface GlobalAttributes {
1251
1209
  | 'readonly'
1252
1210
  | 'required'
1253
1211
  )[];
1212
+ /**
1213
+ * @minItems 0
1214
+ */
1254
1215
  '#HTMLTableCellElementAttrs'?: ('colspan' | 'headers' | 'rowspan')[];
1255
1216
  '#ARIAAttrs'?: boolean;
1217
+ /**
1218
+ * @minItems 0
1219
+ */
1256
1220
  '#SVGAnimationAdditionAttrs'?: ('additive' | 'accumulate')[];
1221
+ /**
1222
+ * @minItems 0
1223
+ */
1257
1224
  '#SVGAnimationAttributeTargetAttrs'?: ('attributeName' | 'attributeType')[];
1225
+ /**
1226
+ * @minItems 0
1227
+ */
1258
1228
  '#SVGAnimationEventAttrs'?: ('onbegin' | 'onend' | 'onrepeat')[];
1229
+ /**
1230
+ * @minItems 0
1231
+ */
1259
1232
  '#SVGAnimationTargetElementAttrs'?: ('href' | 'xlink:href')[];
1233
+ /**
1234
+ * @minItems 0
1235
+ */
1260
1236
  '#SVGAnimationTimingAttrs'?: (
1261
1237
  | 'begin'
1262
1238
  | 'dur'
@@ -1268,6 +1244,9 @@ export interface GlobalAttributes {
1268
1244
  | 'repeatDur'
1269
1245
  | 'fill'
1270
1246
  )[];
1247
+ /**
1248
+ * @minItems 0
1249
+ */
1271
1250
  '#SVGAnimationValueAttrs'?: (
1272
1251
  | 'calcMode'
1273
1252
  | 'values'
@@ -1281,7 +1260,13 @@ export interface GlobalAttributes {
1281
1260
  | 'autoReverse'
1282
1261
  | 'speed'
1283
1262
  )[];
1263
+ /**
1264
+ * @minItems 0
1265
+ */
1284
1266
  '#SVGConditionalProcessingAttrs'?: ('requiredExtensions' | 'systemLanguage' | 'requiredFeatures')[];
1267
+ /**
1268
+ * @minItems 0
1269
+ */
1285
1270
  '#SVGCoreAttrs'?: (
1286
1271
  | 'id'
1287
1272
  | 'tabindex'
@@ -1294,7 +1279,13 @@ export interface GlobalAttributes {
1294
1279
  | 'xml:lang'
1295
1280
  | 'xml:base'
1296
1281
  )[];
1282
+ /**
1283
+ * @minItems 0
1284
+ */
1297
1285
  '#SVGFilterPrimitiveAttrs'?: ('x' | 'y' | 'width' | 'height' | 'result' | 'in')[];
1286
+ /**
1287
+ * @minItems 0
1288
+ */
1298
1289
  '#SVGPresentationAttrs'?: (
1299
1290
  | 'cx'
1300
1291
  | 'cy'
@@ -1378,6 +1369,9 @@ export interface GlobalAttributes {
1378
1369
  | 'enable-background'
1379
1370
  | 'kerning'
1380
1371
  )[];
1372
+ /**
1373
+ * @minItems 0
1374
+ */
1381
1375
  '#SVGTransferFunctionAttrs'?: (
1382
1376
  | 'type'
1383
1377
  | 'tableValues'
@@ -1387,6 +1381,9 @@ export interface GlobalAttributes {
1387
1381
  | 'exponent'
1388
1382
  | 'offset'
1389
1383
  )[];
1384
+ /**
1385
+ * @minItems 0
1386
+ */
1390
1387
  '#XLinkAttrs'?: (
1391
1388
  | 'xlink:href'
1392
1389
  | 'xlink:title'
@@ -1416,3 +1413,112 @@ export interface AttributeJSON {
1416
1413
  animatable?: boolean;
1417
1414
  experimental?: boolean;
1418
1415
  }
1416
+ /**
1417
+ * - [Space-separated tokens](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#space-separated-tokens)
1418
+ * - [Comma-separated tokens](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#comma-separated-tokens)
1419
+ */
1420
+ export interface List {
1421
+ token:
1422
+ | (
1423
+ | 'Any'
1424
+ | 'NoEmptyAny'
1425
+ | 'OneLineAny'
1426
+ | 'Zero'
1427
+ | 'Number'
1428
+ | 'Int'
1429
+ | 'Uint'
1430
+ | 'XMLName'
1431
+ | 'DOMID'
1432
+ | 'FunctionBody'
1433
+ | 'Pattern'
1434
+ | 'DateTime'
1435
+ | 'TabIndex'
1436
+ | 'BCP47'
1437
+ | 'URL'
1438
+ | 'AbsoluteURL'
1439
+ | 'HashName'
1440
+ | 'OneCodePointChar'
1441
+ | 'CustomElementName'
1442
+ | 'BrowsingContextName'
1443
+ | 'BrowsingContextNameOrKeyword'
1444
+ | 'HTTPSchemaURL'
1445
+ | 'MIMEType'
1446
+ | 'ItemProp'
1447
+ | 'Srcset'
1448
+ | 'SourceSizeList'
1449
+ | 'IconSize'
1450
+ | 'AutoComplete'
1451
+ | 'Accept'
1452
+ | 'SerializedPermissionsPolicy'
1453
+ | '<css-declaration-list>'
1454
+ | '<class-list>'
1455
+ | '<svg-font-size>'
1456
+ | '<svg-font-size-adjust>'
1457
+ | "<'color-profile'>"
1458
+ | "<'color-rendering'>"
1459
+ | "<'enable-background'>"
1460
+ | '<list-of-svg-feature-string>'
1461
+ | '<animatable-value>'
1462
+ | '<begin-value-list>'
1463
+ | '<end-value-list>'
1464
+ | '<list-of-value>'
1465
+ | '<clock-value>'
1466
+ | '<color-matrix>'
1467
+ | '<dasharray>'
1468
+ | '<key-points>'
1469
+ | '<key-splines>'
1470
+ | '<key-times>'
1471
+ | '<system-language>'
1472
+ | '<origin>'
1473
+ | '<svg-path>'
1474
+ | '<points>'
1475
+ | '<preserve-aspect-ratio>'
1476
+ | '<view-box>'
1477
+ | '<rotate>'
1478
+ | '<text-coordinate>'
1479
+ | '<list-of-lengths>'
1480
+ | '<list-of-numbers>'
1481
+ | '<list-of-percentages>'
1482
+ | '<number-optional-number>'
1483
+ )
1484
+ | Enum;
1485
+ disallowToSurroundBySpaces?: boolean;
1486
+ allowEmpty?: boolean;
1487
+ ordered?: boolean;
1488
+ unique?: boolean;
1489
+ caseInsensitive?: boolean;
1490
+ number?:
1491
+ | ('zeroOrMore' | 'oneOrMore')
1492
+ | {
1493
+ min: number;
1494
+ max: number;
1495
+ };
1496
+ separator: 'space' | 'comma';
1497
+ }
1498
+ /**
1499
+ * [Enumerated attributes](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute)
1500
+ */
1501
+ export interface Enum {
1502
+ /**
1503
+ * @minItems 1
1504
+ */
1505
+ enum: [string, ...string[]];
1506
+ disallowToSurroundBySpaces?: boolean;
1507
+ caseInsensitive?: boolean;
1508
+ invalidValueDefault?: string;
1509
+ missingValueDefault?: string;
1510
+ sameStates?: {
1511
+ [k: string]: unknown;
1512
+ };
1513
+ }
1514
+ /**
1515
+ * [Numbers](https://html.spec.whatwg.org/dev/common-microsyntaxes.html#numbers)
1516
+ */
1517
+ export interface Number {
1518
+ type: 'float' | 'integer';
1519
+ gt?: number;
1520
+ gte?: number;
1521
+ lt?: number;
1522
+ lte?: number;
1523
+ clampable?: boolean;
1524
+ }