@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
@@ -7,187 +7,215 @@ import type { ReadonlyDeep } from 'type-fest';
7
7
  * markuplint Markup-language spec
8
8
  */
9
9
  export interface MLMLSpec {
10
- readonly cites: Cites;
11
- readonly def: SpecDefs;
12
- readonly specs: readonly ElementSpec[];
10
+ readonly cites: Cites;
11
+ readonly def: SpecDefs;
12
+ readonly specs: readonly ElementSpec[];
13
13
  }
14
14
  export type ExtendedElementSpec = Partial<Omit<ElementSpec, 'name' | 'attributes'>> & {
15
- readonly name: ElementSpec['name'];
16
- readonly attributes?: Readonly<Record<string, Partial<Attribute>>>;
15
+ readonly name: ElementSpec['name'];
16
+ readonly attributes?: Readonly<Record<string, Partial<Attribute>>>;
17
17
  };
18
18
  export type ExtendedSpec = {
19
- readonly cites?: Cites;
20
- readonly def?: Partial<SpecDefs>;
21
- readonly specs?: readonly ExtendedElementSpec[];
19
+ readonly cites?: Cites;
20
+ readonly def?: Partial<SpecDefs>;
21
+ readonly specs?: readonly ExtendedElementSpec[];
22
22
  };
23
23
  /**
24
24
  * Reference URLs
25
25
  */
26
26
  export type Cites = readonly string[];
27
27
  export type SpecDefs = {
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
- };
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
+ };
38
38
  };
39
39
  type ARIASpec = {
40
- readonly roles: readonly ARIARoleInSchema[];
41
- readonly graphicsRoles: readonly ARIARoleInSchema[];
42
- readonly props: readonly ARIAProperty[];
40
+ readonly roles: readonly ARIARoleInSchema[];
41
+ readonly graphicsRoles: readonly ARIARoleInSchema[];
42
+ readonly props: readonly ARIAProperty[];
43
43
  };
44
44
  /**
45
45
  * Element spec
46
46
  */
47
47
  export type ElementSpec = {
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;
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?:
73
+ | true
74
+ | {
75
+ readonly alt: string;
76
+ };
77
+ /**
78
+ * Deprecated
79
+ */
80
+ readonly deprecated?: true;
81
+ /**
82
+ * Non-standard
83
+ */
84
+ readonly nonStandard?: true;
85
+ /**
86
+ * Element categories
87
+ */
88
+ readonly categories: readonly Category[];
89
+ /**
90
+ * Permitted contents and permitted parents
91
+ */
92
+ readonly contentModel: ReadonlyDeep<ContentModel>;
93
+ /**
94
+ * Tag omission
95
+ */
96
+ readonly omission: ElementSpecOmission;
97
+ /**
98
+ * Global Attributes
99
+ */
100
+ readonly globalAttrs: ReadonlyDeep<GlobalAttributes>;
101
+ /**
102
+ * Attributes
103
+ */
104
+ readonly attributes: Readonly<Record<string, Attribute>>;
105
+ /**
106
+ * WAI-ARIA role and properties
107
+ */
108
+ readonly aria: ReadonlyDeep<ARIA>;
109
+ /**
110
+ * If true, it is possible to add any properties as attributes,
111
+ * for example, when using a template engine or a view language.
112
+ *
113
+ * @see https://v2.vuejs.org/v2/guide/components-slots.html#Scoped-Slots
114
+ *
115
+ * **It assumes to specify it on the parser plugin.**
116
+ */
117
+ readonly possibleToAddProperties?: true;
116
118
  };
117
119
  type ElementSpecOmission = false | ElementSpecOmissionTags;
118
120
  type ElementSpecOmissionTags = {
119
- readonly startTag: boolean | ElementCondition;
120
- readonly endTag: boolean | ElementCondition;
121
+ readonly startTag: boolean | ElementCondition;
122
+ readonly endTag: boolean | ElementCondition;
121
123
  };
122
124
  type ElementCondition = {
123
- readonly __WIP__: 'WORK_IN_PROGRESS';
125
+ readonly __WIP__: 'WORK_IN_PROGRESS';
124
126
  };
125
127
  export type Attribute = {
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;
128
+ readonly name: string;
129
+ readonly type: ReadonlyDeep<AttributeType> | readonly ReadonlyDeep<AttributeType>[];
130
+ readonly description?: string;
131
+ readonly caseSensitive?: true;
132
+ readonly experimental?: boolean;
133
+ readonly obsolete?: true;
134
+ readonly deprecated?: boolean;
135
+ readonly nonStandard?: true;
134
136
  } & ExtendableAttributeSpec;
135
137
  type ExtendableAttributeSpec = Omit<ReadonlyDeep<AttributeJSON>, 'type'>;
136
138
  export type ARIARole = {
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[];
139
+ readonly name: string;
140
+ readonly isAbstract: boolean;
141
+ readonly requiredContextRole: readonly string[];
142
+ readonly requiredOwnedElements: readonly string[];
143
+ readonly accessibleNameRequired: boolean;
144
+ readonly accessibleNameFromAuthor: boolean;
145
+ readonly accessibleNameFromContent: boolean;
146
+ readonly accessibleNameProhibited: boolean;
147
+ readonly childrenPresentational: boolean;
148
+ readonly ownedProperties: readonly ARIARoleOwnedProperties[];
149
+ readonly prohibitedProperties: readonly string[];
148
150
  };
149
- export type ARIARoleInSchema = Partial<ARIARole & {
150
- readonly description: string;
151
- readonly generalization: readonly string[];
152
- }> & {
153
- readonly name: string;
151
+ export type ARIARoleInSchema = Partial<
152
+ ARIARole & {
153
+ readonly description: string;
154
+ readonly generalization: readonly string[];
155
+ }
156
+ > & {
157
+ readonly name: string;
154
158
  };
155
159
  export type ARIARoleOwnedProperties = {
156
- readonly name: string;
157
- readonly inherited?: true;
158
- readonly required?: true;
159
- readonly deprecated?: true;
160
+ readonly name: string;
161
+ readonly inherited?: true;
162
+ readonly required?: true;
163
+ readonly deprecated?: true;
160
164
  };
161
165
  export type ARIAProperty = {
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>>;
166
+ readonly name: string;
167
+ readonly type: 'property' | 'state';
168
+ readonly deprecated?: true;
169
+ readonly isGlobal?: true;
170
+ readonly value: ARIAAttributeValue;
171
+ readonly conditionalValue?: readonly {
172
+ readonly role: readonly string[];
173
+ readonly value: ARIAAttributeValue;
174
+ }[];
175
+ readonly enum: readonly string[];
176
+ readonly defaultValue?: string;
177
+ readonly equivalentHtmlAttrs?: readonly EquivalentHtmlAttr[];
178
+ readonly valueDescriptions?: Readonly<Record<string, string>>;
175
179
  };
176
- export type ARIAAttributeValue = 'true/false' | 'tristate' | 'true/false/undefined' | 'ID reference' | 'ID reference list' | 'integer' | 'number' | 'string' | 'token' | 'token list' | 'URI';
180
+ export type ARIAAttributeValue =
181
+ | 'true/false'
182
+ | 'tristate'
183
+ | 'true/false/undefined'
184
+ | 'ID reference'
185
+ | 'ID reference list'
186
+ | 'integer'
187
+ | 'number'
188
+ | 'string'
189
+ | 'token'
190
+ | 'token list'
191
+ | 'URI';
177
192
  export type ARIAVersion = '1.1' | '1.2';
178
193
  export type EquivalentHtmlAttr = {
179
- readonly htmlAttrName: string;
180
- readonly isNotStrictEquivalent?: true;
181
- readonly value: string | null;
194
+ readonly htmlAttrName: string;
195
+ readonly isNotStrictEquivalent?: true;
196
+ readonly value: string | null;
182
197
  };
183
198
  export type Matches = (selector: string) => boolean;
184
199
  export type ComputedRole = {
185
- readonly el: Element;
186
- readonly role: (ARIARole & {
187
- readonly superClassRoles: readonly ARIARoleInSchema[];
188
- readonly isImplicit?: boolean;
189
- }) | null;
190
- readonly errorType?: RoleComputationError;
200
+ readonly el: Element;
201
+ readonly role:
202
+ | (ARIARole & {
203
+ readonly superClassRoles: readonly ARIARoleInSchema[];
204
+ readonly isImplicit?: boolean;
205
+ })
206
+ | null;
207
+ readonly errorType?: RoleComputationError;
191
208
  };
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';
209
+ export type RoleComputationError =
210
+ | 'ABSTRACT'
211
+ | 'GLOBAL_PROP_MUST_NOT_BE_PRESENTATIONAL'
212
+ | 'IMPLICIT_ROLE_NAMESPACE_ERROR'
213
+ | 'INTERACTIVE_ELEMENT_MUST_NOT_BE_PRESENTATIONAL'
214
+ | 'INVALID_LANDMARK'
215
+ | 'INVALID_REQUIRED_CONTEXT_ROLE'
216
+ | 'NO_EXPLICIT'
217
+ | 'NO_OWNER'
218
+ | 'NO_PERMITTED'
219
+ | 'REQUIRED_OWNED_ELEMENT_MUST_NOT_BE_PRESENTATIONAL'
220
+ | 'ROLE_NO_EXISTS';
193
221
  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 type PermittedContentPattern = PermittedContentRequire | PermittedContentOptional | PermittedContentOneOrMore | PermittedContentZeroOrMore | PermittedContentChoice | PermittedContentTransparent;
6
+ export type PermittedContentPattern =
7
+ | PermittedContentRequire
8
+ | PermittedContentOptional
9
+ | PermittedContentOneOrMore
10
+ | PermittedContentZeroOrMore
11
+ | PermittedContentChoice
12
+ | PermittedContentTransparent;
7
13
  export type Model = ContentType | ContentType[];
8
14
  export type ContentType = string | Category;
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';
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
- __contentModel?: ContentModel;
46
+ __contentModel?: ContentModel;
12
47
  }
13
48
  export interface ContentModel {
14
- contents: PermittedContentPattern[] | boolean;
15
- descendantOf?: string;
16
- conditional?: {
17
- condition: string;
18
- contents: PermittedContentPattern[] | boolean;
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
- require: Model | PermittedContentPattern[];
23
- max?: number;
24
- min?: number;
25
- _TODO_?: string;
57
+ require: Model | PermittedContentPattern[];
58
+ max?: number;
59
+ min?: number;
60
+ _TODO_?: string;
26
61
  }
27
62
  export interface PermittedContentOptional {
28
- optional: Model | PermittedContentPattern[];
29
- max?: number;
30
- _TODO_?: string;
63
+ optional: Model | PermittedContentPattern[];
64
+ max?: number;
65
+ _TODO_?: string;
31
66
  }
32
67
  export interface PermittedContentOneOrMore {
33
- oneOrMore: Model | PermittedContentPattern[];
34
- max?: number;
35
- _TODO_?: string;
68
+ oneOrMore: Model | PermittedContentPattern[];
69
+ max?: number;
70
+ _TODO_?: string;
36
71
  }
37
72
  export interface PermittedContentZeroOrMore {
38
- zeroOrMore: Model | PermittedContentPattern[];
39
- max?: number;
40
- _TODO_?: string;
73
+ zeroOrMore: Model | PermittedContentPattern[];
74
+ max?: number;
75
+ _TODO_?: string;
41
76
  }
42
77
  export interface PermittedContentChoice {
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;
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
- transparent: string;
96
+ transparent: string;
58
97
  }
@@ -1,5 +1,10 @@
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[];
1
+ type NamedDefinition =
2
+ | string
3
+ | {
4
+ readonly name: string;
5
+ };
6
+ export declare function mergeArray<T extends NamedDefinition>(
7
+ a: readonly T[],
8
+ b: readonly T[] | null | undefined,
9
+ ): readonly T[];
5
10
  export {};
@@ -1,9 +1,9 @@
1
1
  import type { NamespaceURI, Namespace } from '@markuplint/ml-ast';
2
2
  type NamespacedElementName = {
3
- localNameWithNS: string;
4
- localName: string;
5
- namespace: Namespace;
6
- namespaceURI: NamespaceURI;
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 {};
@@ -18,7 +18,7 @@ function resolveNamespace(name, namespaceURI = 'http://www.w3.org/1999/xhtml') {
18
18
  const [_explicitNS, _localName] = name.split(':');
19
19
  const explicitNS = _localName ? _explicitNS : null;
20
20
  const localName = (_a = _localName !== null && _localName !== void 0 ? _localName : _explicitNS) !== null && _a !== void 0 ? _a : '';
21
- const namespace = ['html', 'svg', 'mml', 'xlink'].find(_ns => _ns === (explicitNS || (0, get_ns_1.getNS)(namespaceURI || null))) ||
21
+ const namespace = ['html', 'svg', 'mml', 'xlink'].find(_ns => _ns === (explicitNS || (0, get_ns_1.getNS)(namespaceURI !== null && namespaceURI !== void 0 ? namespaceURI : null))) ||
22
22
  'html';
23
23
  const result = {
24
24
  localNameWithNS: `${namespace === 'html' ? '' : `${namespace}:`}${localName}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/ml-spec",
3
- "version": "3.5.0",
3
+ "version": "3.6.1",
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>",
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@markuplint/test-tools": "3.1.0",
35
- "@markuplint/types": "3.4.0",
35
+ "@markuplint/types": "3.5.1",
36
36
  "json-schema-to-typescript": "11.0.2",
37
37
  "type-fest": "^3.6.1"
38
38
  },
39
- "gitHead": "0c47b2c2722f6823a17f36edbab98486275f8ab4"
39
+ "gitHead": "3cdf5a088b2da03773d5d4461d0e65ec32290a00"
40
40
  }