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

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 (138) hide show
  1. package/README.md +8 -3
  2. package/lib/constant/aria-version.d.ts +2 -0
  3. package/lib/constant/aria-version.js +5 -0
  4. package/lib/dom-traverse/accname-computation.js +3 -1
  5. package/lib/dom-traverse/get-attr-specs.d.ts +1 -1
  6. package/lib/dom-traverse/get-attr-specs.js +3 -1
  7. package/lib/dom-traverse/get-computed-aria-props.d.ts +12 -0
  8. package/lib/dom-traverse/get-computed-aria-props.js +108 -0
  9. package/lib/dom-traverse/get-computed-role.d.ts +6 -1
  10. package/lib/dom-traverse/get-computed-role.js +54 -35
  11. package/lib/dom-traverse/get-content-model.d.ts +29 -0
  12. package/lib/dom-traverse/get-content-model.js +30 -0
  13. package/lib/dom-traverse/get-explicit-role.js +9 -4
  14. package/lib/dom-traverse/get-implicit-role.d.ts +6 -2
  15. package/lib/dom-traverse/get-implicit-role.js +6 -2
  16. package/lib/dom-traverse/get-non-presentational-ancestor.d.ts +10 -4
  17. package/lib/dom-traverse/get-non-presentational-ancestor.js +10 -2
  18. package/lib/dom-traverse/get-permitted-roles.d.ts +7 -3
  19. package/lib/dom-traverse/get-permitted-roles.js +3 -1
  20. package/lib/dom-traverse/get-spec.d.ts +5 -2
  21. package/lib/dom-traverse/get-spec.js +4 -2
  22. package/lib/dom-traverse/has-required-owned-elements.d.ts +8 -2
  23. package/lib/dom-traverse/has-required-owned-elements.js +26 -8
  24. package/lib/dom-traverse/is-exposed.d.ts +11 -0
  25. package/lib/dom-traverse/is-exposed.js +217 -0
  26. package/lib/dom-traverse/matches-context-role.d.ts +7 -0
  27. package/lib/dom-traverse/matches-context-role.js +27 -0
  28. package/lib/dom-traverse/may-be-focusable.d.ts +2 -0
  29. package/lib/dom-traverse/may-be-focusable.js +24 -0
  30. package/lib/index.d.ts +11 -1
  31. package/lib/index.js +11 -1
  32. package/lib/specs/aria-specs.d.ts +7 -4
  33. package/lib/specs/content-model-category-to-tag-names.d.ts +5 -2
  34. package/lib/specs/content-model-category-to-tag-names.js +2 -2
  35. package/lib/specs/get-aria.d.ts +8 -1
  36. package/lib/specs/get-aria.js +11 -5
  37. package/lib/specs/get-attr-specs.d.ts +7 -3
  38. package/lib/specs/get-attr-specs.js +2 -14
  39. package/lib/specs/get-implicit-role.d.ts +7 -1
  40. package/lib/specs/get-permitted-roles.d.ts +9 -3
  41. package/lib/specs/get-permitted-roles.js +19 -15
  42. package/lib/specs/get-role-spec.d.ts +10 -3
  43. package/lib/specs/get-role-spec.js +2 -2
  44. package/lib/specs/get-selectors-by-content-model-category.d.ts +2 -2
  45. package/lib/specs/get-selectors-by-content-model-category.js +1 -1
  46. package/lib/specs/get-spec-by-tag-name.d.ts +6 -2
  47. package/lib/specs/get-spec-by-tag-name.js +3 -2
  48. package/lib/specs/is-nothing-content-model.d.ts +5 -0
  49. package/lib/specs/is-nothing-content-model.js +14 -0
  50. package/lib/specs/is-palpable-elements.d.ts +9 -0
  51. package/lib/specs/is-palpable-elements.js +49 -0
  52. package/lib/specs/is-void-element.d.ts +1 -0
  53. package/lib/specs/is-void-element.js +27 -0
  54. package/lib/specs/resolve-version.d.ts +5 -1
  55. package/lib/specs/resolve-version.js +1 -1
  56. package/lib/specs/schema-to-spec.d.ts +4 -4
  57. package/lib/specs/schema-to-spec.js +29 -18
  58. package/lib/types/aria.d.ts +150 -109
  59. package/lib/types/attributes.d.ts +1507 -73
  60. package/lib/types/index.d.ts +195 -166
  61. package/{src/types/permitted-structres.ts → lib/types/permitted-structures.d.ts} +24 -35
  62. package/lib/utils/get-ns.d.ts +2 -1
  63. package/lib/utils/get-ns.js +3 -0
  64. package/lib/utils/merge-array.d.ts +9 -4
  65. package/lib/utils/resolve-namespace.d.ts +7 -7
  66. package/lib/utils/resolve-namespace.js +19 -13
  67. package/lib/utils/validateAriaVersion.d.ts +2 -0
  68. package/lib/utils/validateAriaVersion.js +8 -0
  69. package/package.json +13 -8
  70. package/schema.json +6 -6
  71. package/{src/dom-traverse/accname-computation.spec.ts → test/dom-traverse/accname-computation.spec.js} +8 -8
  72. package/test/dom-traverse/get-computed-aria-props.spec.js +758 -0
  73. package/test/dom-traverse/get-computed-role.spec.js +294 -0
  74. package/test/dom-traverse/get-implicit-role.spec.js +40 -0
  75. package/{src/dom-traverse/has-required-owned-elements.spec.ts → test/dom-traverse/has-required-owned-elements.spec.js} +7 -9
  76. package/test/dom-traverse/is-exposed.spec.js +70 -0
  77. package/test/dom-traverse/matches-context-role.spec.js +60 -0
  78. package/{src/specs/get-attr-specs.spec.ts → test/specs/get-attr-specs.spec.js} +2 -8
  79. package/{src/specs/get-implicit-role.spec.ts → test/specs/get-implicit-role.spec.js} +9 -11
  80. package/{src/specs/get-permitted-roles.spec.ts → test/specs/get-permitted-roles.spec.js} +8 -10
  81. package/{src/specs/get-role-spec.spec.ts → test/specs/get-role-spec.spec.js} +4 -4
  82. package/{src/specs/get-spec-by-tag-name.spec.ts → test/specs/get-spec-by-tag-name.spec.js} +11 -11
  83. package/test/specs/resolve-version.spec.js +34 -0
  84. package/test/specs/schema-to-spec.spec.js +61 -0
  85. package/test/utils/resolve-namespace.spec.js +37 -0
  86. package/lib/dom-traverse/focusability-computation.d.ts +0 -1
  87. package/lib/dom-traverse/focusability-computation.js +0 -8
  88. package/lib/dom-traverse/get-aria.d.ts +0 -9
  89. package/lib/dom-traverse/get-aria.js +0 -54
  90. package/lib/specs/aria-spec.d.ts +0 -5
  91. package/lib/specs/aria-spec.js +0 -12
  92. package/lib/specs/get-spec.d.ts +0 -13
  93. package/lib/specs/get-spec.js +0 -85
  94. package/lib/specs/html-spec.d.ts +0 -6
  95. package/lib/specs/html-spec.js +0 -16
  96. package/lib/specs/resolve-namespace.d.ts +0 -9
  97. package/lib/specs/resolve-namespace.js +0 -26
  98. package/lib/types/permitted-structres.d.ts +0 -64
  99. package/lib/utils.d.ts +0 -8
  100. package/lib/utils.js +0 -50
  101. package/schemas/aria.schema.json +0 -258
  102. package/schemas/attributes.schema.json +0 -204
  103. package/schemas/content-models.schema.json +0 -215
  104. package/schemas/element.schema.json +0 -11
  105. package/schemas/global-attributes.schema.json +0 -761
  106. package/src/dom-traverse/accname-computation.ts +0 -5
  107. package/src/dom-traverse/get-attr-specs.ts +0 -8
  108. package/src/dom-traverse/get-computed-role.spec.ts +0 -134
  109. package/src/dom-traverse/get-computed-role.ts +0 -193
  110. package/src/dom-traverse/get-explicit-role.ts +0 -112
  111. package/src/dom-traverse/get-implicit-role.ts +0 -36
  112. package/src/dom-traverse/get-non-presentational-ancestor.ts +0 -20
  113. package/src/dom-traverse/get-permitted-roles.ts +0 -7
  114. package/src/dom-traverse/get-spec.ts +0 -7
  115. package/src/dom-traverse/has-required-owned-elements.ts +0 -72
  116. package/src/index.ts +0 -17
  117. package/src/specs/aria-specs.ts +0 -6
  118. package/src/specs/content-model-category-to-tag-names.ts +0 -15
  119. package/src/specs/get-aria.ts +0 -85
  120. package/src/specs/get-attr-specs.ts +0 -116
  121. package/src/specs/get-implicit-role.ts +0 -17
  122. package/src/specs/get-permitted-roles.ts +0 -87
  123. package/src/specs/get-role-spec.ts +0 -72
  124. package/src/specs/get-selectors-by-content-model-category.ts +0 -10
  125. package/src/specs/get-spec-by-tag-name.ts +0 -16
  126. package/src/specs/is-presentational.ts +0 -6
  127. package/src/specs/resolve-version.ts +0 -20
  128. package/src/specs/schema-to-spec.spec.ts +0 -39
  129. package/src/specs/schema-to-spec.ts +0 -103
  130. package/src/types/aria.ts +0 -147
  131. package/src/types/attributes.ts +0 -1418
  132. package/src/types/index.ts +0 -255
  133. package/src/utils/get-ns.ts +0 -13
  134. package/src/utils/merge-array.ts +0 -35
  135. package/src/utils/resolve-namespace.ts +0 -36
  136. package/tsconfig.test.json +0 -3
  137. package/tsconfig.tsbuildinfo +0 -1
  138. /package/lib/types/{permitted-structres.js → permitted-structures.js} +0 -0
@@ -1,258 +0,0 @@
1
- {
2
- "definitions": {
3
- "PermittedRoles": {
4
- "description": "If `true`, this mean is \"Any\". If `false`, this mean is \"No\".",
5
- "oneOf": [
6
- {
7
- "type": "boolean"
8
- },
9
- {
10
- "type": "array",
11
- "items": {
12
- "oneOf": [
13
- {
14
- "type": "string"
15
- },
16
- {
17
- "type": "object",
18
- "required": ["name"],
19
- "minProperties": 2,
20
- "properties": {
21
- "name": { "type": "string" },
22
- "deprecated": { "type": "boolean", "enum": [true] }
23
- }
24
- }
25
- ]
26
- }
27
- },
28
- {
29
- "type": "object",
30
- "minProperties": 1,
31
- "additionalProperties": false,
32
- "properties": {
33
- "core-aam": {
34
- "type": "boolean",
35
- "enum": [true]
36
- },
37
- "graphics-aam": {
38
- "type": "boolean",
39
- "enum": [true]
40
- }
41
- }
42
- }
43
- ]
44
- },
45
- "PermittedARIAProperties": {
46
- "description": "If set false:\n> No role or aria-* attributes",
47
- "oneOf": [
48
- {
49
- "type": "boolean",
50
- "enum": [false]
51
- },
52
- {
53
- "type": "object",
54
- "minProperties": 1,
55
- "additionalProperties": false,
56
- "properties": {
57
- "global": {
58
- "type": "boolean",
59
- "enum": [true]
60
- },
61
- "role": {
62
- "description": "Set true if the spec says \"and any aria-* attributes applicable to the allowed roles.\"",
63
- "oneOf": [
64
- {
65
- "type": "boolean",
66
- "enum": [true]
67
- },
68
- {
69
- "type": "string"
70
- },
71
- {
72
- "type": "array",
73
- "minItems": 1,
74
- "items": { "type": "string" }
75
- }
76
- ]
77
- },
78
- "only": {
79
- "type": "array",
80
- "minItems": 1,
81
- "items": {
82
- "oneOf": [
83
- {
84
- "type": "string",
85
- "pattern": "^aria-.+"
86
- },
87
- {
88
- "type": "object",
89
- "required": ["name"],
90
- "additionalProperties": false,
91
- "properties": {
92
- "name": {
93
- "type": "string",
94
- "pattern": "^aria-.+"
95
- },
96
- "value": {
97
- "type": "string"
98
- }
99
- }
100
- }
101
- ]
102
- }
103
- },
104
- "whithout": {
105
- "type": "array",
106
- "minItems": 1,
107
- "items": {
108
- "type": "object",
109
- "required": ["type", "name"],
110
- "additionalProperties": false,
111
- "properties": {
112
- "type": {
113
- "type": "string",
114
- "enum": ["not-recommended", "should-not", "must-not"]
115
- },
116
- "name": {
117
- "type": "string",
118
- "pattern": "^aria-.+"
119
- },
120
- "value": {
121
- "type": "string"
122
- },
123
- "alt": {
124
- "type": "object",
125
- "required": ["method", "target"],
126
- "additionalProperties": false,
127
- "properties": {
128
- "method": {
129
- "type": "string",
130
- "enum": ["remove-attr", "set-attr"]
131
- },
132
- "target": {
133
- "type": "string"
134
- }
135
- }
136
- }
137
- }
138
- }
139
- }
140
- }
141
- }
142
- ]
143
- },
144
- "ImplicitRole": {
145
- "description": "If `false`, this mean is \"No corresponding role\".",
146
- "oneOf": [
147
- {
148
- "type": "boolean",
149
- "enum": [false]
150
- },
151
- {
152
- "type": "string"
153
- }
154
- ]
155
- },
156
- "ImplicitProperties": {
157
- "type": "object",
158
- "minProperties": 1,
159
- "patternProperties": {
160
- "^aria-.+": {
161
- "type": "string"
162
- }
163
- }
164
- },
165
- "ARIA": {
166
- "type": "object",
167
- "additionalProperties": false,
168
- "required": ["implicitRole", "permittedRoles"],
169
- "properties": {
170
- "implicitRole": { "$ref": "#/definitions/ImplicitRole" },
171
- "permittedRoles": { "$ref": "#/definitions/PermittedRoles" },
172
- "namingProhibited": { "type": "boolean", "enum": [true] },
173
- "implicitProperties": { "$ref": "#/definitions/ImplicitProperties" },
174
- "properties": { "$ref": "#/definitions/PermittedARIAProperties" },
175
- "conditions": {
176
- "type": "object",
177
- "minProperties": 1,
178
- "patternProperties": {
179
- ".+": {
180
- "type": "object",
181
- "minProperties": 1,
182
- "additionalProperties": false,
183
- "properties": {
184
- "implicitRole": { "$ref": "#/definitions/ImplicitRole" },
185
- "permittedRoles": { "$ref": "#/definitions/PermittedRoles" },
186
- "namingProhibited": { "type": "boolean", "enum": [true] },
187
- "implicitProperties": { "$ref": "#/definitions/ImplicitProperties" },
188
- "properties": { "$ref": "#/definitions/PermittedARIAProperties" }
189
- }
190
- }
191
- }
192
- },
193
- "1.2": {
194
- "type": "object",
195
- "additionalProperties": false,
196
- "minProperties": 1,
197
- "properties": {
198
- "implicitRole": { "$ref": "#/definitions/ImplicitRole" },
199
- "permittedRoles": { "$ref": "#/definitions/PermittedRoles" },
200
- "namingProhibited": { "type": "boolean", "enum": [true] },
201
- "implicitProperties": { "$ref": "#/definitions/ImplicitProperties" },
202
- "properties": { "$ref": "#/definitions/PermittedARIAProperties" },
203
- "conditions": {
204
- "type": "object",
205
- "minProperties": 1,
206
- "patternProperties": {
207
- ".+": {
208
- "type": "object",
209
- "minProperties": 1,
210
- "additionalProperties": false,
211
- "properties": {
212
- "implicitRole": { "$ref": "#/definitions/ImplicitRole" },
213
- "permittedRoles": { "$ref": "#/definitions/PermittedRoles" },
214
- "namingProhibited": { "type": "boolean", "enum": [true] },
215
- "implicitProperties": { "$ref": "#/definitions/ImplicitProperties" },
216
- "properties": { "$ref": "#/definitions/PermittedARIAProperties" }
217
- }
218
- }
219
- }
220
- }
221
- }
222
- },
223
- "1.1": {
224
- "type": "object",
225
- "additionalProperties": false,
226
- "minProperties": 1,
227
- "properties": {
228
- "implicitRole": { "$ref": "#/definitions/ImplicitRole" },
229
- "permittedRoles": { "$ref": "#/definitions/PermittedRoles" },
230
- "implicitProperties": { "$ref": "#/definitions/ImplicitProperties" },
231
- "properties": { "$ref": "#/definitions/PermittedARIAProperties" },
232
- "conditions": {
233
- "type": "object",
234
- "minProperties": 1,
235
- "patternProperties": {
236
- ".+": {
237
- "type": "object",
238
- "minProperties": 1,
239
- "additionalProperties": false,
240
- "properties": {
241
- "implicitRole": { "$ref": "#/definitions/ImplicitRole" },
242
- "permittedRoles": { "$ref": "#/definitions/PermittedRoles" },
243
- "implicitProperties": { "$ref": "#/definitions/ImplicitProperties" },
244
- "properties": { "$ref": "#/definitions/PermittedARIAProperties" }
245
- }
246
- }
247
- }
248
- }
249
- }
250
- }
251
- }
252
- }
253
- },
254
- "type": "object",
255
- "properties": {
256
- "_": { "$ref": "#/definitions/ARIA" }
257
- }
258
- }
@@ -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,215 +0,0 @@
1
- {
2
- "definitions": {
3
- "ContentModel": {
4
- "type": "object",
5
- "additionalProperties": false,
6
- "required": ["contents"],
7
- "properties": {
8
- "contents": {
9
- "oneOf": [
10
- {
11
- "$ref": "#/definitions/PermittedContentSpec"
12
- },
13
- { "type": "boolean" }
14
- ]
15
- },
16
- "descendantOf": { "type": "string" },
17
- "conditional": {
18
- "type": "array",
19
- "items": {
20
- "type": "object",
21
- "additionalProperties": false,
22
- "required": ["condition", "contents"],
23
- "properties": {
24
- "condition": {
25
- "type": "string"
26
- },
27
- "contents": {
28
- "oneOf": [
29
- {
30
- "$ref": "#/definitions/PermittedContentSpec"
31
- },
32
- { "type": "boolean" }
33
- ]
34
- }
35
- }
36
- }
37
- }
38
- }
39
- },
40
- "ContentType": {
41
- "oneOf": [
42
- {
43
- "description": "Element",
44
- "type": "string",
45
- "pattern": "^[^#]+$"
46
- },
47
- { "$ref": "#/definitions/Category" }
48
- ]
49
- },
50
- "Category": {
51
- "type": "string",
52
- "enum": [
53
- "#text",
54
- "#phrasing",
55
- "#flow",
56
- "#interactive",
57
- "#heading",
58
- "#sectioning",
59
- "#metadata",
60
- "#transparent",
61
- "#embedded",
62
- "#palpable",
63
- "#script-supporting",
64
- "#SVGAnimation",
65
- "#SVGBasicShapes",
66
- "#SVGContainer",
67
- "#SVGDescriptive",
68
- "#SVGFilterPrimitive",
69
- "#SVGFont",
70
- "#SVGGradient",
71
- "#SVGGraphics",
72
- "#SVGGraphicsReferencing",
73
- "#SVGLightSource",
74
- "#SVGNeverRendered",
75
- "#SVGNone",
76
- "#SVGPaintServer",
77
- "#SVGRenderable",
78
- "#SVGShape",
79
- "#SVGStructural",
80
- "#SVGStructurallyExternal",
81
- "#SVGTextContent",
82
- "#SVGTextContentChild",
83
- "#SVGOtherXMLNamespace"
84
- ]
85
- },
86
- "Target": {
87
- "oneOf": [
88
- { "$ref": "#/definitions/ContentType" },
89
- {
90
- "type": "array",
91
- "items": { "$ref": "#/definitions/ContentType" },
92
- "uniqueItems": true
93
- }
94
- ]
95
- },
96
- "PermittedContentSpec": {
97
- "type": "array",
98
- "items": { "$ref": "#/definitions/PermittedContent" }
99
- },
100
- "PermittedContent": {
101
- "type": "object",
102
- "oneOf": [
103
- { "$ref": "#/definitions/PermittedContentRequire" },
104
- { "$ref": "#/definitions/PermittedContentOptional" },
105
- { "$ref": "#/definitions/PermittedContentOneOrMore" },
106
- { "$ref": "#/definitions/PermittedContentZeroOrMore" },
107
- { "$ref": "#/definitions/PermittedContentChoice" },
108
- { "$ref": "#/definitions/PermittedContentInterleave" }
109
- ]
110
- },
111
- "PermittedContentRequire": {
112
- "type": "object",
113
- "additionalProperties": false,
114
- "required": ["require"],
115
- "properties": {
116
- "require": { "$ref": "#/definitions/Target" },
117
- "ignore": { "$ref": "#/definitions/Target" },
118
- "notAllowedDescendants": {
119
- "type": "array",
120
- "items": { "$ref": "#/definitions/ContentType" },
121
- "uniqueItems": true
122
- },
123
- "max": { "type": "number" },
124
- "min": { "type": "number" },
125
- "_TODO_": { "type": "string" }
126
- }
127
- },
128
- "PermittedContentOptional": {
129
- "type": "object",
130
- "additionalProperties": false,
131
- "required": ["optional"],
132
- "properties": {
133
- "optional": { "$ref": "#/definitions/Target" },
134
- "ignore": { "$ref": "#/definitions/Target" },
135
- "notAllowedDescendants": {
136
- "type": "array",
137
- "items": { "$ref": "#/definitions/ContentType" },
138
- "uniqueItems": true
139
- },
140
- "max": { "type": "number" },
141
- "_TODO_": { "type": "string" }
142
- }
143
- },
144
- "PermittedContentOneOrMore": {
145
- "type": "object",
146
- "additionalProperties": false,
147
- "required": ["oneOrMore"],
148
- "properties": {
149
- "oneOrMore": {
150
- "oneOf": [{ "$ref": "#/definitions/Target" }, { "$ref": "#/definitions/PermittedContentSpec" }]
151
- },
152
- "ignore": { "$ref": "#/definitions/Target" },
153
- "notAllowedDescendants": {
154
- "type": "array",
155
- "items": { "$ref": "#/definitions/ContentType" },
156
- "uniqueItems": true
157
- },
158
- "max": { "type": "number" },
159
- "_TODO_": { "type": "string" }
160
- }
161
- },
162
- "PermittedContentZeroOrMore": {
163
- "type": "object",
164
- "additionalProperties": false,
165
- "required": ["zeroOrMore"],
166
- "properties": {
167
- "zeroOrMore": {
168
- "oneOf": [{ "$ref": "#/definitions/Target" }, { "$ref": "#/definitions/PermittedContentSpec" }]
169
- },
170
- "ignore": { "$ref": "#/definitions/Target" },
171
- "notAllowedDescendants": {
172
- "type": "array",
173
- "items": { "$ref": "#/definitions/ContentType" },
174
- "uniqueItems": true
175
- },
176
- "max": { "type": "number" },
177
- "_TODO_": { "type": "string" }
178
- }
179
- },
180
- "PermittedContentChoice": {
181
- "type": "object",
182
- "additionalProperties": false,
183
- "required": ["choice"],
184
- "properties": {
185
- "choice": {
186
- "type": "array",
187
- "items": { "$ref": "#/definitions/PermittedContentSpec" },
188
- "minItems": 2,
189
- "maxItems": 5
190
- },
191
- "_TODO_": { "type": "string" }
192
- }
193
- },
194
- "PermittedContentInterleave": {
195
- "type": "object",
196
- "additionalProperties": false,
197
- "required": ["interleave"],
198
- "properties": {
199
- "interleave": {
200
- "type": "array",
201
- "items": { "$ref": "#/definitions/PermittedContentSpec" },
202
- "minItems": 2
203
- },
204
- "_TODO_": { "type": "string" }
205
- }
206
- }
207
- },
208
- "type": "object",
209
- "additionalProperties": false,
210
- "properties": {
211
- "__contentModel": {
212
- "$ref": "#/definitions/ContentModel"
213
- }
214
- }
215
- }
@@ -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
- }