@markuplint/ml-spec 3.0.0-alpha.4 → 3.0.0-alpha.6
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/lib/dom-traverse/get-attr-specs.d.ts +1 -1
- package/lib/dom-traverse/get-computed-aria-props.d.ts +12 -0
- package/lib/dom-traverse/get-computed-aria-props.js +106 -0
- package/lib/dom-traverse/get-content-model.d.ts +4 -1
- package/lib/dom-traverse/get-implicit-role.d.ts +5 -1
- package/lib/dom-traverse/get-non-presentational-ancestor.d.ts +10 -4
- package/lib/dom-traverse/get-permitted-roles.d.ts +7 -3
- package/lib/dom-traverse/get-spec.d.ts +4 -1
- package/lib/dom-traverse/has-required-owned-elements.d.ts +6 -1
- package/lib/dom-traverse/is-exposed.d.ts +11 -0
- package/lib/dom-traverse/is-exposed.js +181 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/lib/specs/aria-specs.d.ts +7 -4
- package/lib/specs/content-model-category-to-tag-names.d.ts +4 -1
- package/lib/specs/get-aria.d.ts +7 -1
- package/lib/specs/get-attr-specs.d.ts +7 -3
- package/lib/specs/get-implicit-role.d.ts +7 -1
- package/lib/specs/get-permitted-roles.d.ts +9 -3
- package/lib/specs/get-role-spec.d.ts +10 -3
- package/lib/specs/get-selectors-by-content-model-category.d.ts +4 -1
- package/lib/specs/get-spec-by-tag-name.d.ts +5 -1
- package/lib/specs/is-palpable-elements.d.ts +9 -0
- package/lib/specs/is-palpable-elements.js +47 -0
- package/lib/specs/is-void-element.d.ts +1 -0
- package/lib/specs/is-void-element.js +25 -0
- package/lib/specs/schema-to-spec.d.ts +3 -3
- package/lib/types/aria.d.ts +129 -115
- package/lib/types/attributes.d.ts +1437 -112
- package/lib/types/index.d.ts +192 -164
- package/lib/types/permitted-structres.d.ts +76 -37
- package/lib/types/permitted-structures.d.ts +72 -33
- package/lib/utils/merge-array.d.ts +5 -3
- package/lib/utils/resolve-namespace.d.ts +5 -5
- package/package.json +5 -5
- package/schemas/content-models.schema.json +1 -2
- package/src/dom-traverse/accname-computation.spec.ts +1 -1
- package/src/dom-traverse/get-computed-aria-props.spec.ts +368 -0
- package/src/dom-traverse/get-computed-aria-props.ts +130 -0
- package/src/dom-traverse/is-exposed.spec.ts +50 -0
- package/src/dom-traverse/is-exposed.ts +196 -0
- package/src/index.ts +4 -0
- package/src/specs/is-palpable-elements.ts +55 -0
- package/src/specs/is-void-element.ts +22 -0
- package/src/types/permitted-structres.ts +1 -2
- package/src/types/permitted-structures.ts +1 -2
- package/tsconfig.tsbuildinfo +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -6,189 +6,217 @@ import type { NamespaceURI } from '@markuplint/ml-ast';
|
|
|
6
6
|
* markuplint Markup-language spec
|
|
7
7
|
*/
|
|
8
8
|
export interface MLMLSpec {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
cites: Cites;
|
|
10
|
+
def: SpecDefs;
|
|
11
|
+
specs: ElementSpec[];
|
|
12
12
|
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export type ExtendedElementSpec = Partial<Omit<ElementSpec, 'name' | 'attributes'>> & {
|
|
14
|
+
name: ElementSpec['name'];
|
|
15
|
+
attributes?: Record<string, Partial<Attribute>>;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
export type ExtendedSpec = {
|
|
18
|
+
cites?: Cites;
|
|
19
|
+
def?: Partial<SpecDefs>;
|
|
20
|
+
specs?: ExtendedElementSpec[];
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
23
|
* Reference URLs
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
export type Cites = string[];
|
|
26
|
+
export type SpecDefs = {
|
|
27
|
+
'#globalAttrs': Partial<{
|
|
28
|
+
'#extends': Record<string, Partial<Attribute>>;
|
|
29
|
+
'#HTMLGlobalAttrs': Record<string, Partial<Attribute>>;
|
|
30
|
+
[OtherGlobalAttrs: string]: Record<string, Partial<Attribute>>;
|
|
31
|
+
}>;
|
|
32
|
+
'#aria': {
|
|
33
|
+
'1.2': ARIASpec;
|
|
34
|
+
'1.1': ARIASpec;
|
|
35
|
+
};
|
|
36
|
+
'#contentModels': {
|
|
37
|
+
[model in Category]?: string[];
|
|
38
|
+
};
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
type ARIASpec = {
|
|
41
|
+
roles: ARIARoleInSchema[];
|
|
42
|
+
graphicsRoles: ARIARoleInSchema[];
|
|
43
|
+
props: ARIAProperty[];
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
46
|
* Element spec
|
|
47
47
|
*/
|
|
48
|
-
export
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
48
|
+
export type ElementSpec = {
|
|
49
|
+
/**
|
|
50
|
+
* Tag name
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* Namespaces in XML
|
|
55
|
+
* @see https://www.w3.org/TR/xml-names/
|
|
56
|
+
*/
|
|
57
|
+
namespace?: NamespaceURI;
|
|
58
|
+
/**
|
|
59
|
+
* Reference URL
|
|
60
|
+
*/
|
|
61
|
+
cite: string;
|
|
62
|
+
/**
|
|
63
|
+
* Description
|
|
64
|
+
*/
|
|
65
|
+
description?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Experimental technology
|
|
68
|
+
*/
|
|
69
|
+
experimental?: true;
|
|
70
|
+
/**
|
|
71
|
+
* Obsolete or alternative elements
|
|
72
|
+
*/
|
|
73
|
+
obsolete?:
|
|
74
|
+
| true
|
|
75
|
+
| {
|
|
76
|
+
alt: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Deprecated
|
|
80
|
+
*/
|
|
81
|
+
deprecated?: true;
|
|
82
|
+
/**
|
|
83
|
+
* Non-standard
|
|
84
|
+
*/
|
|
85
|
+
nonStandard?: true;
|
|
86
|
+
/**
|
|
87
|
+
* Element categories
|
|
88
|
+
*/
|
|
89
|
+
categories: Category[];
|
|
90
|
+
/**
|
|
91
|
+
* Permitted contents and permitted parents
|
|
92
|
+
*/
|
|
93
|
+
contentModel: ContentModel;
|
|
94
|
+
/**
|
|
95
|
+
* Tag omission
|
|
96
|
+
*/
|
|
97
|
+
omission: ElementSpecOmission;
|
|
98
|
+
/**
|
|
99
|
+
* Global Attributes
|
|
100
|
+
*/
|
|
101
|
+
globalAttrs: GlobalAttributes;
|
|
102
|
+
/**
|
|
103
|
+
* Attributes
|
|
104
|
+
*/
|
|
105
|
+
attributes: Record<string, Attribute>;
|
|
106
|
+
/**
|
|
107
|
+
* WAI-ARIA role and properties
|
|
108
|
+
*/
|
|
109
|
+
aria: ARIA;
|
|
110
|
+
/**
|
|
111
|
+
* If true, it is possible to add any properties as attributes,
|
|
112
|
+
* for example, when using a template engine or a view language.
|
|
113
|
+
*
|
|
114
|
+
* @see https://v2.vuejs.org/v2/guide/components-slots.html#Scoped-Slots
|
|
115
|
+
*
|
|
116
|
+
* **It assumes to specify it on the parser plugin.**
|
|
117
|
+
*/
|
|
118
|
+
possibleToAddProperties?: true;
|
|
117
119
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
type ElementSpecOmission = false | ElementSpecOmissionTags;
|
|
121
|
+
type ElementSpecOmissionTags = {
|
|
122
|
+
startTag: boolean | ElementCondition;
|
|
123
|
+
endTag: boolean | ElementCondition;
|
|
122
124
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
type ElementCondition = {
|
|
126
|
+
__WIP__: 'WORK_IN_PROGRESS';
|
|
125
127
|
};
|
|
126
|
-
export
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
export type Attribute = {
|
|
129
|
+
name: string;
|
|
130
|
+
type: AttributeType | AttributeType[];
|
|
131
|
+
description?: string;
|
|
132
|
+
caseSensitive?: true;
|
|
133
|
+
experimental?: boolean;
|
|
134
|
+
obsolete?: true;
|
|
135
|
+
deprecated?: boolean;
|
|
136
|
+
nonStandard?: true;
|
|
135
137
|
} & ExtendableAttributeSpec;
|
|
136
|
-
|
|
137
|
-
export
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
type ExtendableAttributeSpec = Omit<AttributeJSON, 'type'>;
|
|
139
|
+
export type ARIARole = {
|
|
140
|
+
name: string;
|
|
141
|
+
isAbstract: boolean;
|
|
142
|
+
requiredContextRole: string[];
|
|
143
|
+
requiredOwnedElements: string[];
|
|
144
|
+
accessibleNameRequired: boolean;
|
|
145
|
+
accessibleNameFromAuthor: boolean;
|
|
146
|
+
accessibleNameFromContent: boolean;
|
|
147
|
+
accessibleNameProhibited: boolean;
|
|
148
|
+
childrenPresentational: boolean;
|
|
149
|
+
ownedProperties: ARIARoleOwnedProperties[];
|
|
150
|
+
prohibitedProperties: string[];
|
|
149
151
|
};
|
|
150
|
-
export
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
export type ARIARoleInSchema = Partial<
|
|
153
|
+
ARIARole & {
|
|
154
|
+
description: string;
|
|
155
|
+
generalization: string[];
|
|
156
|
+
}
|
|
157
|
+
> & {
|
|
158
|
+
name: string;
|
|
155
159
|
};
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
export type ARIARoleOwnedProperties = {
|
|
161
|
+
name: string;
|
|
162
|
+
inherited?: true;
|
|
163
|
+
required?: true;
|
|
164
|
+
deprecated?: true;
|
|
161
165
|
};
|
|
162
|
-
export
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
export type ARIAProperty = {
|
|
167
|
+
name: string;
|
|
168
|
+
type: 'property' | 'state';
|
|
169
|
+
deprecated?: true;
|
|
170
|
+
isGlobal?: true;
|
|
171
|
+
value: ARIAAttributeValue;
|
|
172
|
+
conditionalValue?: {
|
|
173
|
+
role: string[];
|
|
174
|
+
value: ARIAAttributeValue;
|
|
175
|
+
}[];
|
|
176
|
+
enum: string[];
|
|
177
|
+
defaultValue?: string;
|
|
178
|
+
equivalentHtmlAttrs?: EquivalentHtmlAttr[];
|
|
179
|
+
valueDescriptions?: Record<string, string>;
|
|
176
180
|
};
|
|
177
|
-
export
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
export type ARIAAttributeValue =
|
|
182
|
+
| 'true/false'
|
|
183
|
+
| 'tristate'
|
|
184
|
+
| 'true/false/undefined'
|
|
185
|
+
| 'ID reference'
|
|
186
|
+
| 'ID reference list'
|
|
187
|
+
| 'integer'
|
|
188
|
+
| 'number'
|
|
189
|
+
| 'string'
|
|
190
|
+
| 'token'
|
|
191
|
+
| 'token list'
|
|
192
|
+
| 'URI';
|
|
193
|
+
export type ARIAVersion = '1.1' | '1.2';
|
|
194
|
+
export type EquivalentHtmlAttr = {
|
|
195
|
+
htmlAttrName: string;
|
|
196
|
+
isNotStrictEquivalent?: true;
|
|
197
|
+
value: string | null;
|
|
183
198
|
};
|
|
184
|
-
export
|
|
185
|
-
export
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
export type Matches = (selector: string) => boolean;
|
|
200
|
+
export type ComputedRole = {
|
|
201
|
+
el: Element;
|
|
202
|
+
role:
|
|
203
|
+
| (ARIARole & {
|
|
204
|
+
superClassRoles: ARIARoleInSchema[];
|
|
205
|
+
isImplicit?: boolean;
|
|
206
|
+
})
|
|
207
|
+
| null;
|
|
208
|
+
errorType?: RoleComputationError;
|
|
192
209
|
};
|
|
193
|
-
export
|
|
210
|
+
export type RoleComputationError =
|
|
211
|
+
| 'ABSTRACT'
|
|
212
|
+
| 'GLOBAL_PROP_MUST_NOT_BE_PRESENTATIONAL'
|
|
213
|
+
| 'IMPLICIT_ROLE_NAMESPACE_ERROR'
|
|
214
|
+
| 'INTERACTIVE_ELEMENT_MUST_NOT_BE_PRESENTATIONAL'
|
|
215
|
+
| 'INVALID_LANDMARK'
|
|
216
|
+
| 'INVALID_REQUIRED_CONTEXT_ROLE'
|
|
217
|
+
| 'NO_EXPLICIT'
|
|
218
|
+
| 'NO_OWNER'
|
|
219
|
+
| 'NO_PERMITTED'
|
|
220
|
+
| 'REQUIRED_OWNED_ELEMENT_MUST_NOT_BE_PRESENTATIONAL'
|
|
221
|
+
| 'ROLE_NO_EXISTS';
|
|
194
222
|
export {};
|
|
@@ -3,56 +3,95 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export type PermittedContentPattern =
|
|
7
|
+
| PermittedContentRequire
|
|
8
|
+
| PermittedContentOptional
|
|
9
|
+
| PermittedContentOneOrMore
|
|
10
|
+
| PermittedContentZeroOrMore
|
|
11
|
+
| PermittedContentChoice
|
|
12
|
+
| PermittedContentTransparent;
|
|
13
|
+
export type Model = ContentType | ContentType[];
|
|
14
|
+
export type ContentType = string | Category;
|
|
15
|
+
export type Category =
|
|
16
|
+
| '#text'
|
|
17
|
+
| '#phrasing'
|
|
18
|
+
| '#flow'
|
|
19
|
+
| '#interactive'
|
|
20
|
+
| '#heading'
|
|
21
|
+
| '#sectioning'
|
|
22
|
+
| '#metadata'
|
|
23
|
+
| '#embedded'
|
|
24
|
+
| '#palpable'
|
|
25
|
+
| '#script-supporting'
|
|
26
|
+
| '#SVGAnimation'
|
|
27
|
+
| '#SVGBasicShapes'
|
|
28
|
+
| '#SVGContainer'
|
|
29
|
+
| '#SVGDescriptive'
|
|
30
|
+
| '#SVGFilterPrimitive'
|
|
31
|
+
| '#SVGFont'
|
|
32
|
+
| '#SVGGradient'
|
|
33
|
+
| '#SVGGraphics'
|
|
34
|
+
| '#SVGGraphicsReferencing'
|
|
35
|
+
| '#SVGLightSource'
|
|
36
|
+
| '#SVGNeverRendered'
|
|
37
|
+
| '#SVGNone'
|
|
38
|
+
| '#SVGPaintServer'
|
|
39
|
+
| '#SVGRenderable'
|
|
40
|
+
| '#SVGShape'
|
|
41
|
+
| '#SVGStructural'
|
|
42
|
+
| '#SVGStructurallyExternal'
|
|
43
|
+
| '#SVGTextContent'
|
|
44
|
+
| '#SVGTextContentChild';
|
|
10
45
|
export interface ContentModelsSchema {
|
|
11
|
-
|
|
46
|
+
__contentModel?: ContentModel;
|
|
12
47
|
}
|
|
13
48
|
export interface ContentModel {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
49
|
+
contents: PermittedContentPattern[] | boolean;
|
|
50
|
+
descendantOf?: string;
|
|
51
|
+
conditional?: {
|
|
52
|
+
condition: string;
|
|
53
|
+
contents: PermittedContentPattern[] | boolean;
|
|
54
|
+
}[];
|
|
20
55
|
}
|
|
21
56
|
export interface PermittedContentRequire {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
57
|
+
require: Model;
|
|
58
|
+
max?: number;
|
|
59
|
+
min?: number;
|
|
60
|
+
_TODO_?: string;
|
|
26
61
|
}
|
|
27
62
|
export interface PermittedContentOptional {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
63
|
+
optional: Model;
|
|
64
|
+
max?: number;
|
|
65
|
+
_TODO_?: string;
|
|
31
66
|
}
|
|
32
67
|
export interface PermittedContentOneOrMore {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
68
|
+
oneOrMore: Model | PermittedContentPattern[];
|
|
69
|
+
max?: number;
|
|
70
|
+
_TODO_?: string;
|
|
36
71
|
}
|
|
37
72
|
export interface PermittedContentZeroOrMore {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
73
|
+
zeroOrMore: Model | PermittedContentPattern[];
|
|
74
|
+
max?: number;
|
|
75
|
+
_TODO_?: string;
|
|
41
76
|
}
|
|
42
77
|
export interface PermittedContentChoice {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
78
|
+
/**
|
|
79
|
+
* @minItems 2
|
|
80
|
+
* @maxItems 5
|
|
81
|
+
*/
|
|
82
|
+
choice:
|
|
83
|
+
| [PermittedContentPattern[], PermittedContentPattern[]]
|
|
84
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
85
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
86
|
+
| [
|
|
87
|
+
PermittedContentPattern[],
|
|
88
|
+
PermittedContentPattern[],
|
|
89
|
+
PermittedContentPattern[],
|
|
90
|
+
PermittedContentPattern[],
|
|
91
|
+
PermittedContentPattern[],
|
|
92
|
+
];
|
|
93
|
+
_TODO_?: string;
|
|
55
94
|
}
|
|
56
95
|
export interface PermittedContentTransparent {
|
|
57
|
-
|
|
96
|
+
transparent: string;
|
|
58
97
|
}
|
|
@@ -3,52 +3,91 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export type PermittedContentPattern =
|
|
7
|
+
| PermittedContentRequire
|
|
8
|
+
| PermittedContentOptional
|
|
9
|
+
| PermittedContentOneOrMore
|
|
10
|
+
| PermittedContentZeroOrMore
|
|
11
|
+
| PermittedContentChoice
|
|
12
|
+
| PermittedContentTransparent;
|
|
13
|
+
export type Model = ContentType | ContentType[];
|
|
14
|
+
export type ContentType = string | Category;
|
|
15
|
+
export type Category =
|
|
16
|
+
| '#text'
|
|
17
|
+
| '#phrasing'
|
|
18
|
+
| '#flow'
|
|
19
|
+
| '#interactive'
|
|
20
|
+
| '#heading'
|
|
21
|
+
| '#sectioning'
|
|
22
|
+
| '#metadata'
|
|
23
|
+
| '#embedded'
|
|
24
|
+
| '#palpable'
|
|
25
|
+
| '#script-supporting'
|
|
26
|
+
| '#SVGAnimation'
|
|
27
|
+
| '#SVGBasicShapes'
|
|
28
|
+
| '#SVGContainer'
|
|
29
|
+
| '#SVGDescriptive'
|
|
30
|
+
| '#SVGFilterPrimitive'
|
|
31
|
+
| '#SVGFont'
|
|
32
|
+
| '#SVGGradient'
|
|
33
|
+
| '#SVGGraphics'
|
|
34
|
+
| '#SVGGraphicsReferencing'
|
|
35
|
+
| '#SVGLightSource'
|
|
36
|
+
| '#SVGNeverRendered'
|
|
37
|
+
| '#SVGNone'
|
|
38
|
+
| '#SVGPaintServer'
|
|
39
|
+
| '#SVGRenderable'
|
|
40
|
+
| '#SVGShape'
|
|
41
|
+
| '#SVGStructural'
|
|
42
|
+
| '#SVGStructurallyExternal'
|
|
43
|
+
| '#SVGTextContent'
|
|
44
|
+
| '#SVGTextContentChild';
|
|
10
45
|
export interface ContentModelsSchema {
|
|
11
|
-
|
|
46
|
+
__contentModel?: ContentModel;
|
|
12
47
|
}
|
|
13
48
|
export interface ContentModel {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
49
|
+
contents: PermittedContentPattern[] | boolean;
|
|
50
|
+
descendantOf?: string;
|
|
51
|
+
conditional?: {
|
|
52
|
+
condition: string;
|
|
53
|
+
contents: PermittedContentPattern[] | boolean;
|
|
54
|
+
}[];
|
|
20
55
|
}
|
|
21
56
|
export interface PermittedContentRequire {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
57
|
+
require: Model;
|
|
58
|
+
max?: number;
|
|
59
|
+
min?: number;
|
|
60
|
+
_TODO_?: string;
|
|
26
61
|
}
|
|
27
62
|
export interface PermittedContentOptional {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
63
|
+
optional: Model;
|
|
64
|
+
max?: number;
|
|
65
|
+
_TODO_?: string;
|
|
31
66
|
}
|
|
32
67
|
export interface PermittedContentOneOrMore {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
68
|
+
oneOrMore: Model | PermittedContentPattern[];
|
|
69
|
+
max?: number;
|
|
70
|
+
_TODO_?: string;
|
|
36
71
|
}
|
|
37
72
|
export interface PermittedContentZeroOrMore {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
73
|
+
zeroOrMore: Model | PermittedContentPattern[];
|
|
74
|
+
max?: number;
|
|
75
|
+
_TODO_?: string;
|
|
41
76
|
}
|
|
42
77
|
export interface PermittedContentChoice {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
78
|
+
choice:
|
|
79
|
+
| [PermittedContentPattern[], PermittedContentPattern[]]
|
|
80
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
81
|
+
| [PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[], PermittedContentPattern[]]
|
|
82
|
+
| [
|
|
83
|
+
PermittedContentPattern[],
|
|
84
|
+
PermittedContentPattern[],
|
|
85
|
+
PermittedContentPattern[],
|
|
86
|
+
PermittedContentPattern[],
|
|
87
|
+
PermittedContentPattern[],
|
|
88
|
+
];
|
|
89
|
+
_TODO_?: string;
|
|
51
90
|
}
|
|
52
91
|
export interface PermittedContentTransparent {
|
|
53
|
-
|
|
92
|
+
transparent: string;
|
|
54
93
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { NamespaceURI, Namespace } from '@markuplint/ml-ast';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
type NamespacedElementName = {
|
|
3
|
+
localNameWithNS: string;
|
|
4
|
+
localName: string;
|
|
5
|
+
namespace: Namespace;
|
|
6
|
+
namespaceURI: NamespaceURI;
|
|
7
7
|
};
|
|
8
8
|
export declare function resolveNamespace(name: string, namespaceURI?: string | null): NamespacedElementName;
|
|
9
9
|
export {};
|