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