@markuplint/ml-spec 3.0.0-dev.25 → 3.0.0-dev.40

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 (59) hide show
  1. package/lib/dom-traverse/is-exposed.js +8 -0
  2. package/lib/types/attributes.d.ts +1 -1
  3. package/package.json +4 -4
  4. package/schemas/aria.schema.json +0 -258
  5. package/schemas/attributes.schema.json +0 -204
  6. package/schemas/content-models.schema.json +0 -199
  7. package/schemas/element.schema.json +0 -11
  8. package/schemas/global-attributes.schema.json +0 -761
  9. package/src/dom-traverse/accname-computation.spec.ts +0 -69
  10. package/src/dom-traverse/accname-computation.ts +0 -5
  11. package/src/dom-traverse/get-attr-specs.ts +0 -8
  12. package/src/dom-traverse/get-computed-aria-props.spec.ts +0 -368
  13. package/src/dom-traverse/get-computed-aria-props.ts +0 -130
  14. package/src/dom-traverse/get-computed-role.spec.ts +0 -134
  15. package/src/dom-traverse/get-computed-role.ts +0 -181
  16. package/src/dom-traverse/get-content-model.ts +0 -32
  17. package/src/dom-traverse/get-explicit-role.ts +0 -112
  18. package/src/dom-traverse/get-implicit-role.ts +0 -36
  19. package/src/dom-traverse/get-non-presentational-ancestor.ts +0 -20
  20. package/src/dom-traverse/get-permitted-roles.ts +0 -7
  21. package/src/dom-traverse/get-spec.ts +0 -7
  22. package/src/dom-traverse/has-required-owned-elements.spec.ts +0 -36
  23. package/src/dom-traverse/has-required-owned-elements.ts +0 -85
  24. package/src/dom-traverse/is-exposed.spec.ts +0 -50
  25. package/src/dom-traverse/is-exposed.ts +0 -196
  26. package/src/dom-traverse/may-be-focusable.ts +0 -21
  27. package/src/index.ts +0 -24
  28. package/src/specs/aria-specs.ts +0 -6
  29. package/src/specs/content-model-category-to-tag-names.ts +0 -15
  30. package/src/specs/get-aria.ts +0 -85
  31. package/src/specs/get-attr-specs.spec.ts +0 -47
  32. package/src/specs/get-attr-specs.ts +0 -116
  33. package/src/specs/get-implicit-role.spec.ts +0 -81
  34. package/src/specs/get-implicit-role.ts +0 -17
  35. package/src/specs/get-permitted-roles.spec.ts +0 -420
  36. package/src/specs/get-permitted-roles.ts +0 -87
  37. package/src/specs/get-role-spec.spec.ts +0 -67
  38. package/src/specs/get-role-spec.ts +0 -72
  39. package/src/specs/get-selectors-by-content-model-category.ts +0 -10
  40. package/src/specs/get-spec-by-tag-name.spec.ts +0 -68
  41. package/src/specs/get-spec-by-tag-name.ts +0 -20
  42. package/src/specs/is-nothing-content-model.ts +0 -9
  43. package/src/specs/is-palpable-elements.ts +0 -55
  44. package/src/specs/is-presentational.ts +0 -6
  45. package/src/specs/is-void-element.ts +0 -22
  46. package/src/specs/resolve-version.ts +0 -20
  47. package/src/specs/schema-to-spec.spec.ts +0 -39
  48. package/src/specs/schema-to-spec.ts +0 -103
  49. package/src/types/aria.ts +0 -153
  50. package/src/types/attributes.ts +0 -1524
  51. package/src/types/index.ts +0 -255
  52. package/src/types/permitted-structres.ts +0 -100
  53. package/src/types/permitted-structures.ts +0 -96
  54. package/src/utils/get-ns.ts +0 -18
  55. package/src/utils/merge-array.ts +0 -35
  56. package/src/utils/resolve-namespace.spec.ts +0 -37
  57. package/src/utils/resolve-namespace.ts +0 -40
  58. package/tsconfig.test.json +0 -3
  59. package/tsconfig.tsbuildinfo +0 -1
@@ -1,204 +0,0 @@
1
- {
2
- "definitions": {
3
- "AttributeName": { "type": "string", "pattern": "^(?:(xml|xlink):)?[a-z][a-zA-Z0-9-]*$" },
4
- "AttributeCondition": { "$ref": "#/definitions/Selectors" },
5
- "Selectors": {
6
- "oneOf": [{ "type": "string" }, { "type": "array", "minItems": 2, "items": { "type": "string" } }]
7
- },
8
- "AttributeType": { "$ref": "../../types/types.schema.json#/definitions/type" },
9
- "AttributeJSON": {
10
- "type": "object",
11
- "additionalProperties": false,
12
- "minProperties": 1,
13
- "properties": {
14
- "type": {
15
- "oneOf": [
16
- { "$ref": "#/definitions/AttributeType" },
17
- {
18
- "type": "array",
19
- "minItems": 1,
20
- "uniqueItems": true,
21
- "items": { "$ref": "#/definitions/AttributeType" }
22
- }
23
- ]
24
- },
25
- "defaultValue": { "type": "string" },
26
- "deprecated": { "type": "boolean" },
27
- "required": { "oneOf": [{ "type": "boolean" }, { "$ref": "#/definitions/AttributeCondition" }] },
28
- "requiredEither": { "type": "array", "items": { "type": "string" } },
29
- "noUse": { "type": "boolean" },
30
- "condition": { "$ref": "#/definitions/AttributeCondition" },
31
- "ineffective": { "$ref": "#/definitions/Selectors" },
32
- "animatable": { "type": "boolean" },
33
- "experimental": { "type": "boolean" }
34
- }
35
- },
36
- "GlobalAttributes": {
37
- "type": "object",
38
- "additionalProperties": false,
39
- "propertyNames": {
40
- "type": "string",
41
- "enum": [
42
- "#HTMLGlobalAttrs",
43
- "#GlobalEventAttrs",
44
- "#DocumentElementEventAttrs",
45
- "#HTMLLinkAndFetchingAttrs",
46
- "#HTMLEmbededAndMediaContentAttrs",
47
- "#HTMLFormControlElementAttrs",
48
- "#HTMLTableCellElementAttrs",
49
- "#ARIAAttrs",
50
- "#SVGAnimationAdditionAttrs",
51
- "#SVGAnimationAttributeTargetAttrs",
52
- "#SVGAnimationEventAttrs",
53
- "#SVGAnimationTargetElementAttrs",
54
- "#SVGAnimationTimingAttrs",
55
- "#SVGAnimationValueAttrs",
56
- "#SVGConditionalProcessingAttrs",
57
- "#SVGCoreAttrs",
58
- "#SVGFilterPrimitiveAttrs",
59
- "#SVGPresentationAttrs",
60
- "#SVGTransferFunctionAttrs",
61
- "#XLinkAttrs"
62
- ]
63
- },
64
- "properties": {
65
- "#HTMLGlobalAttrs": { "type": "boolean" },
66
- "#GlobalEventAttrs": {
67
- "oneOf": [
68
- { "type": "boolean" },
69
- {
70
- "type": "array",
71
- "minItems": 0,
72
- "uniqueItems": true,
73
- "items": { "$ref": "./global-attributes.schema.json#/definitions/GlobalEventAttrs" }
74
- }
75
- ]
76
- },
77
- "#DocumentElementEventAttrs": {
78
- "oneOf": [
79
- { "type": "boolean" },
80
- {
81
- "type": "array",
82
- "minItems": 0,
83
- "uniqueItems": true,
84
- "items": {
85
- "$ref": "./global-attributes.schema.json#/definitions/DocumentElementEventAttrs"
86
- }
87
- }
88
- ]
89
- },
90
- "#HTMLLinkAndFetchingAttrs": {
91
- "type": "array",
92
- "minItems": 0,
93
- "uniqueItems": true,
94
- "items": { "$ref": "./global-attributes.schema.json#/definitions/HTMLLinkAndFetchingAttrs" }
95
- },
96
- "#HTMLEmbededAndMediaContentAttrs": {
97
- "type": "array",
98
- "minItems": 0,
99
- "uniqueItems": true,
100
- "items": { "$ref": "./global-attributes.schema.json#/definitions/HTMLEmbededAndMediaContentAttrs" }
101
- },
102
- "#HTMLFormControlElementAttrs": {
103
- "type": "array",
104
- "minItems": 0,
105
- "uniqueItems": true,
106
- "items": { "$ref": "./global-attributes.schema.json#/definitions/HTMLFormControlElementAttrs" }
107
- },
108
- "#HTMLTableCellElementAttrs": {
109
- "type": "array",
110
- "minItems": 0,
111
- "uniqueItems": true,
112
- "items": { "$ref": "./global-attributes.schema.json#/definitions/HTMLTableCellElementAttrs" }
113
- },
114
- "#ARIAAttrs": { "type": "boolean" },
115
- "#SVGAnimationAdditionAttrs": {
116
- "type": "array",
117
- "minItems": 0,
118
- "uniqueItems": true,
119
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGAnimationAdditionAttrs" }
120
- },
121
- "#SVGAnimationAttributeTargetAttrs": {
122
- "type": "array",
123
- "minItems": 0,
124
- "uniqueItems": true,
125
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGAnimationAttributeTargetAttrs" }
126
- },
127
- "#SVGAnimationEventAttrs": {
128
- "type": "array",
129
- "minItems": 0,
130
- "uniqueItems": true,
131
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGAnimationEventAttrs" }
132
- },
133
- "#SVGAnimationTargetElementAttrs": {
134
- "type": "array",
135
- "minItems": 0,
136
- "uniqueItems": true,
137
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGAnimationTargetElementAttrs" }
138
- },
139
- "#SVGAnimationTimingAttrs": {
140
- "type": "array",
141
- "minItems": 0,
142
- "uniqueItems": true,
143
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGAnimationTimingAttrs" }
144
- },
145
- "#SVGAnimationValueAttrs": {
146
- "type": "array",
147
- "minItems": 0,
148
- "uniqueItems": true,
149
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGAnimationValueAttrs" }
150
- },
151
- "#SVGConditionalProcessingAttrs": {
152
- "type": "array",
153
- "minItems": 0,
154
- "uniqueItems": true,
155
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGConditionalProcessingAttrs" }
156
- },
157
- "#SVGCoreAttrs": {
158
- "type": "array",
159
- "minItems": 0,
160
- "uniqueItems": true,
161
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGCoreAttrs" }
162
- },
163
- "#SVGFilterPrimitiveAttrs": {
164
- "type": "array",
165
- "minItems": 0,
166
- "uniqueItems": true,
167
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGFilterPrimitiveAttrs" }
168
- },
169
- "#SVGPresentationAttrs": {
170
- "type": "array",
171
- "minItems": 0,
172
- "uniqueItems": true,
173
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGPresentationAttrs" }
174
- },
175
- "#SVGTransferFunctionAttrs": {
176
- "type": "array",
177
- "minItems": 0,
178
- "uniqueItems": true,
179
- "items": { "$ref": "./global-attributes.schema.json#/definitions/SVGTransferFunctionAttrs" }
180
- },
181
- "#XLinkAttrs": {
182
- "type": "array",
183
- "minItems": 0,
184
- "uniqueItems": true,
185
- "items": { "$ref": "./global-attributes.schema.json#/definitions/XLinkAttrs" }
186
- }
187
- }
188
- },
189
- "Attributes": {
190
- "type": "object",
191
- "additionalProperties": false,
192
- "propertyNames": { "$ref": "#/definitions/AttributeName" },
193
- "patternProperties": { ".*": { "$ref": "#/definitions/AttributeJSON" } }
194
- }
195
- },
196
- "type": "object",
197
- "additionalProperties": false,
198
- "required": ["tag", "attributes"],
199
- "properties": {
200
- "tag": { "type": "string" },
201
- "global": { "$ref": "#/definitions/GlobalAttributes" },
202
- "attributes": { "$ref": "#/definitions/Attributes" }
203
- }
204
- }
@@ -1,199 +0,0 @@
1
- {
2
- "definitions": {
3
- "ContentModel": {
4
- "type": "object",
5
- "additionalProperties": false,
6
- "required": ["contents"],
7
- "properties": {
8
- "contents": {
9
- "oneOf": [
10
- {
11
- "type": "array",
12
- "items": { "$ref": "#/definitions/PermittedContentPattern" }
13
- },
14
- { "type": "boolean" }
15
- ]
16
- },
17
- "descendantOf": { "type": "string" },
18
- "conditional": {
19
- "type": "array",
20
- "items": {
21
- "type": "object",
22
- "additionalProperties": false,
23
- "required": ["condition", "contents"],
24
- "properties": {
25
- "condition": {
26
- "type": "string"
27
- },
28
- "contents": {
29
- "oneOf": [
30
- {
31
- "type": "array",
32
- "items": { "$ref": "#/definitions/PermittedContentPattern" }
33
- },
34
- { "type": "boolean" }
35
- ]
36
- }
37
- }
38
- }
39
- }
40
- }
41
- },
42
- "ContentType": {
43
- "oneOf": [
44
- {
45
- "description": "Element",
46
- "type": "string",
47
- "pattern": "^[^#]+$"
48
- },
49
- { "$ref": "#/definitions/Category" }
50
- ]
51
- },
52
- "Category": {
53
- "type": "string",
54
- "enum": [
55
- "#text",
56
- "#phrasing",
57
- "#flow",
58
- "#interactive",
59
- "#heading",
60
- "#sectioning",
61
- "#metadata",
62
- "#embedded",
63
- "#palpable",
64
- "#script-supporting",
65
- "#SVGAnimation",
66
- "#SVGBasicShapes",
67
- "#SVGContainer",
68
- "#SVGDescriptive",
69
- "#SVGFilterPrimitive",
70
- "#SVGFont",
71
- "#SVGGradient",
72
- "#SVGGraphics",
73
- "#SVGGraphicsReferencing",
74
- "#SVGLightSource",
75
- "#SVGNeverRendered",
76
- "#SVGNone",
77
- "#SVGPaintServer",
78
- "#SVGRenderable",
79
- "#SVGShape",
80
- "#SVGStructural",
81
- "#SVGStructurallyExternal",
82
- "#SVGTextContent",
83
- "#SVGTextContentChild"
84
- ]
85
- },
86
- "Model": {
87
- "oneOf": [
88
- { "$ref": "#/definitions/ContentType" },
89
- {
90
- "type": "array",
91
- "items": { "$ref": "#/definitions/ContentType" },
92
- "uniqueItems": true
93
- }
94
- ]
95
- },
96
- "PermittedContentPattern": {
97
- "type": "object",
98
- "oneOf": [
99
- { "$ref": "#/definitions/PermittedContentRequire" },
100
- { "$ref": "#/definitions/PermittedContentOptional" },
101
- { "$ref": "#/definitions/PermittedContentOneOrMore" },
102
- { "$ref": "#/definitions/PermittedContentZeroOrMore" },
103
- { "$ref": "#/definitions/PermittedContentChoice" },
104
- { "$ref": "#/definitions/PermittedContentTransparent" }
105
- ]
106
- },
107
- "PermittedContentRequire": {
108
- "type": "object",
109
- "additionalProperties": false,
110
- "required": ["require"],
111
- "properties": {
112
- "require": { "$ref": "#/definitions/Model" },
113
- "max": { "type": "number" },
114
- "min": { "type": "number" },
115
- "_TODO_": { "type": "string" }
116
- }
117
- },
118
- "PermittedContentOptional": {
119
- "type": "object",
120
- "additionalProperties": false,
121
- "required": ["optional"],
122
- "properties": {
123
- "optional": { "$ref": "#/definitions/Model" },
124
- "max": { "type": "number" },
125
- "_TODO_": { "type": "string" }
126
- }
127
- },
128
- "PermittedContentOneOrMore": {
129
- "type": "object",
130
- "additionalProperties": false,
131
- "required": ["oneOrMore"],
132
- "properties": {
133
- "oneOrMore": {
134
- "oneOf": [
135
- { "$ref": "#/definitions/Model" },
136
- {
137
- "type": "array",
138
- "items": { "$ref": "#/definitions/PermittedContentPattern" }
139
- }
140
- ]
141
- },
142
- "max": { "type": "number" },
143
- "_TODO_": { "type": "string" }
144
- }
145
- },
146
- "PermittedContentZeroOrMore": {
147
- "type": "object",
148
- "additionalProperties": false,
149
- "required": ["zeroOrMore"],
150
- "properties": {
151
- "zeroOrMore": {
152
- "oneOf": [
153
- { "$ref": "#/definitions/Model" },
154
- {
155
- "type": "array",
156
- "items": { "$ref": "#/definitions/PermittedContentPattern" }
157
- }
158
- ]
159
- },
160
- "max": { "type": "number" },
161
- "_TODO_": { "type": "string" }
162
- }
163
- },
164
- "PermittedContentChoice": {
165
- "type": "object",
166
- "additionalProperties": false,
167
- "required": ["choice"],
168
- "properties": {
169
- "choice": {
170
- "type": "array",
171
- "items": {
172
- "type": "array",
173
- "items": { "$ref": "#/definitions/PermittedContentPattern" }
174
- },
175
- "minItems": 2,
176
- "maxItems": 5
177
- },
178
- "_TODO_": { "type": "string" }
179
- }
180
- },
181
- "PermittedContentTransparent": {
182
- "type": "object",
183
- "additionalProperties": false,
184
- "required": ["transparent"],
185
- "properties": {
186
- "transparent": {
187
- "type": "string"
188
- }
189
- }
190
- }
191
- },
192
- "type": "object",
193
- "additionalProperties": false,
194
- "properties": {
195
- "__contentModel": {
196
- "$ref": "#/definitions/ContentModel"
197
- }
198
- }
199
- }
@@ -1,11 +0,0 @@
1
- {
2
- "type": "object",
3
- "additionalProperties": false,
4
- "required": ["contentModel", "globalAttrs", "attributes", "aria"],
5
- "properties": {
6
- "contentModel": { "$ref": "./content-models.schema.json#/definitions/ContentModel" },
7
- "globalAttrs": { "$ref": "./attributes.schema.json#/definitions/GlobalAttributes" },
8
- "attributes": { "$ref": "./attributes.schema.json#/definitions/Attributes" },
9
- "aria": { "$ref": "./aria.schema.json#/definitions/ARIA" }
10
- }
11
- }