@markuplint/ml-spec 3.5.0 → 3.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.
Files changed (39) hide show
  1. package/lib/dom-traverse/get-attr-specs.d.ts +1 -1
  2. package/lib/dom-traverse/get-computed-aria-props.d.ts +5 -5
  3. package/lib/dom-traverse/get-computed-aria-props.js +1 -1
  4. package/lib/dom-traverse/get-computed-role.js +5 -5
  5. package/lib/dom-traverse/get-content-model.d.ts +26 -1
  6. package/lib/dom-traverse/get-content-model.js +1 -1
  7. package/lib/dom-traverse/get-explicit-role.js +2 -1
  8. package/lib/dom-traverse/get-implicit-role.d.ts +5 -1
  9. package/lib/dom-traverse/get-non-presentational-ancestor.d.ts +10 -4
  10. package/lib/dom-traverse/get-permitted-roles.d.ts +7 -3
  11. package/lib/dom-traverse/get-spec.d.ts +4 -1
  12. package/lib/dom-traverse/has-required-owned-elements.d.ts +7 -1
  13. package/lib/dom-traverse/is-exposed.js +3 -2
  14. package/lib/specs/aria-specs.d.ts +7 -4
  15. package/lib/specs/content-model-category-to-tag-names.d.ts +4 -1
  16. package/lib/specs/get-aria.d.ts +7 -1
  17. package/lib/specs/get-aria.js +1 -1
  18. package/lib/specs/get-attr-specs.d.ts +6 -2
  19. package/lib/specs/get-attr-specs.js +2 -14
  20. package/lib/specs/get-implicit-role.d.ts +7 -1
  21. package/lib/specs/get-permitted-roles.d.ts +9 -3
  22. package/lib/specs/get-permitted-roles.js +4 -4
  23. package/lib/specs/get-role-spec.d.ts +10 -3
  24. package/lib/specs/get-role-spec.js +2 -2
  25. package/lib/specs/get-selectors-by-content-model-category.js +1 -1
  26. package/lib/specs/get-spec-by-tag-name.d.ts +5 -1
  27. package/lib/specs/get-spec-by-tag-name.js +3 -2
  28. package/lib/specs/is-palpable-elements.d.ts +8 -4
  29. package/lib/specs/is-palpable-elements.js +3 -3
  30. package/lib/specs/resolve-version.d.ts +4 -1
  31. package/lib/specs/schema-to-spec.d.ts +3 -3
  32. package/lib/types/aria.d.ts +127 -113
  33. package/lib/types/attributes.d.ts +1490 -110
  34. package/lib/types/index.d.ts +172 -144
  35. package/lib/types/permitted-structures.d.ts +74 -35
  36. package/lib/utils/merge-array.d.ts +9 -4
  37. package/lib/utils/resolve-namespace.d.ts +4 -4
  38. package/lib/utils/resolve-namespace.js +1 -1
  39. package/package.json +3 -3
@@ -10,128 +10,142 @@ export type ImplicitRole = false | string;
10
10
  /**
11
11
  * If `true`, this mean is "Any". If `false`, this mean is "No".
12
12
  */
13
- export type PermittedRoles = boolean | (string | {
14
- name: string;
15
- deprecated?: true;
16
- [k: string]: unknown;
17
- })[] | PermittedARIAAAMInfo;
13
+ export type PermittedRoles =
14
+ | boolean
15
+ | (
16
+ | string
17
+ | {
18
+ name: string;
19
+ deprecated?: true;
20
+ [k: string]: unknown;
21
+ }
22
+ )[]
23
+ | PermittedARIAAAMInfo;
18
24
  /**
19
25
  * If set false:
20
26
  * > No role or aria-* attributes
21
27
  */
22
- export type PermittedARIAProperties = false | {
23
- global?: true;
24
- /**
25
- * Set true if the spec says "and any aria-* attributes applicable to the allowed roles."
26
- */
27
- role?: true | string | [string, ...string[]];
28
- /**
29
- * @minItems 1
30
- */
31
- only?: [
32
- (string | {
33
- name: string;
34
- value?: string;
35
- }),
36
- ...(string | {
37
- name: string;
38
- value?: string;
39
- })[]
40
- ];
41
- /**
42
- * @minItems 1
43
- */
44
- without?: [
45
- {
46
- type: 'not-recommended' | 'should-not' | 'must-not';
47
- name: string;
48
- value?: string;
49
- alt?: {
50
- method: 'remove-attr' | 'set-attr';
51
- target: string;
52
- };
53
- },
54
- ...{
55
- type: 'not-recommended' | 'should-not' | 'must-not';
56
- name: string;
57
- value?: string;
58
- alt?: {
59
- method: 'remove-attr' | 'set-attr';
60
- target: string;
61
- };
62
- }[]
63
- ];
64
- };
28
+ export type PermittedARIAProperties =
29
+ | false
30
+ | {
31
+ global?: true;
32
+ /**
33
+ * Set true if the spec says "and any aria-* attributes applicable to the allowed roles."
34
+ */
35
+ role?: true | string | [string, ...string[]];
36
+ /**
37
+ * @minItems 1
38
+ */
39
+ only?: [
40
+ (
41
+ | string
42
+ | {
43
+ name: string;
44
+ value?: string;
45
+ }
46
+ ),
47
+ ...(
48
+ | string
49
+ | {
50
+ name: string;
51
+ value?: string;
52
+ }
53
+ )[],
54
+ ];
55
+ /**
56
+ * @minItems 1
57
+ */
58
+ without?: [
59
+ {
60
+ type: 'not-recommended' | 'should-not' | 'must-not';
61
+ name: string;
62
+ value?: string;
63
+ alt?: {
64
+ method: 'remove-attr' | 'set-attr';
65
+ target: string;
66
+ };
67
+ },
68
+ ...{
69
+ type: 'not-recommended' | 'should-not' | 'must-not';
70
+ name: string;
71
+ value?: string;
72
+ alt?: {
73
+ method: 'remove-attr' | 'set-attr';
74
+ target: string;
75
+ };
76
+ }[],
77
+ ];
78
+ };
65
79
  export interface AriaSchema {
66
- _?: ARIA;
67
- [k: string]: unknown;
80
+ _?: ARIA;
81
+ [k: string]: unknown;
68
82
  }
69
83
  export interface ARIA {
70
- implicitRole: ImplicitRole;
71
- permittedRoles: PermittedRoles;
72
- namingProhibited?: true;
73
- implicitProperties?: ImplicitProperties;
74
- properties?: PermittedARIAProperties;
75
- conditions?: {
76
- /**
77
- * This interface was referenced by `undefined`'s JSON-Schema definition
78
- * via the `patternProperty` ".+".
79
- */
80
- [k: string]: {
81
- implicitRole?: ImplicitRole;
82
- permittedRoles?: PermittedRoles;
83
- namingProhibited?: true;
84
- implicitProperties?: ImplicitProperties;
85
- properties?: PermittedARIAProperties;
86
- };
87
- };
88
- '1.2'?: {
89
- implicitRole?: ImplicitRole;
90
- permittedRoles?: PermittedRoles;
91
- namingProhibited?: true;
92
- implicitProperties?: ImplicitProperties;
93
- properties?: PermittedARIAProperties;
94
- conditions?: {
95
- /**
96
- * This interface was referenced by `undefined`'s JSON-Schema definition
97
- * via the `patternProperty` ".+".
98
- */
99
- [k: string]: {
100
- implicitRole?: ImplicitRole;
101
- permittedRoles?: PermittedRoles;
102
- namingProhibited?: true;
103
- implicitProperties?: ImplicitProperties;
104
- properties?: PermittedARIAProperties;
105
- };
106
- };
107
- };
108
- '1.1'?: {
109
- implicitRole?: ImplicitRole;
110
- permittedRoles?: PermittedRoles;
111
- implicitProperties?: ImplicitProperties;
112
- properties?: PermittedARIAProperties;
113
- conditions?: {
114
- /**
115
- * This interface was referenced by `undefined`'s JSON-Schema definition
116
- * via the `patternProperty` ".+".
117
- */
118
- [k: string]: {
119
- implicitRole?: ImplicitRole;
120
- permittedRoles?: PermittedRoles;
121
- implicitProperties?: ImplicitProperties;
122
- properties?: PermittedARIAProperties;
123
- };
124
- };
125
- };
84
+ implicitRole: ImplicitRole;
85
+ permittedRoles: PermittedRoles;
86
+ namingProhibited?: true;
87
+ implicitProperties?: ImplicitProperties;
88
+ properties?: PermittedARIAProperties;
89
+ conditions?: {
90
+ /**
91
+ * This interface was referenced by `undefined`'s JSON-Schema definition
92
+ * via the `patternProperty` ".+".
93
+ */
94
+ [k: string]: {
95
+ implicitRole?: ImplicitRole;
96
+ permittedRoles?: PermittedRoles;
97
+ namingProhibited?: true;
98
+ implicitProperties?: ImplicitProperties;
99
+ properties?: PermittedARIAProperties;
100
+ };
101
+ };
102
+ '1.2'?: {
103
+ implicitRole?: ImplicitRole;
104
+ permittedRoles?: PermittedRoles;
105
+ namingProhibited?: true;
106
+ implicitProperties?: ImplicitProperties;
107
+ properties?: PermittedARIAProperties;
108
+ conditions?: {
109
+ /**
110
+ * This interface was referenced by `undefined`'s JSON-Schema definition
111
+ * via the `patternProperty` ".+".
112
+ */
113
+ [k: string]: {
114
+ implicitRole?: ImplicitRole;
115
+ permittedRoles?: PermittedRoles;
116
+ namingProhibited?: true;
117
+ implicitProperties?: ImplicitProperties;
118
+ properties?: PermittedARIAProperties;
119
+ };
120
+ };
121
+ };
122
+ '1.1'?: {
123
+ implicitRole?: ImplicitRole;
124
+ permittedRoles?: PermittedRoles;
125
+ implicitProperties?: ImplicitProperties;
126
+ properties?: PermittedARIAProperties;
127
+ conditions?: {
128
+ /**
129
+ * This interface was referenced by `undefined`'s JSON-Schema definition
130
+ * via the `patternProperty` ".+".
131
+ */
132
+ [k: string]: {
133
+ implicitRole?: ImplicitRole;
134
+ permittedRoles?: PermittedRoles;
135
+ implicitProperties?: ImplicitProperties;
136
+ properties?: PermittedARIAProperties;
137
+ };
138
+ };
139
+ };
126
140
  }
127
141
  export interface PermittedARIAAAMInfo {
128
- 'core-aam'?: true;
129
- 'graphics-aam'?: true;
142
+ 'core-aam'?: true;
143
+ 'graphics-aam'?: true;
130
144
  }
131
145
  export interface ImplicitProperties {
132
- /**
133
- * This interface was referenced by `ImplicitProperties`'s JSON-Schema definition
134
- * via the `patternProperty` "^aria-.+".
135
- */
136
- [k: string]: string;
146
+ /**
147
+ * This interface was referenced by `ImplicitProperties`'s JSON-Schema definition
148
+ * via the `patternProperty` "^aria-.+".
149
+ */
150
+ [k: string]: string;
137
151
  }