@markuplint/ml-core 3.0.0-dev.25 → 3.0.0-dev.290
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/configs.browser.js +1 -5
- package/lib/configs.js +33 -31
- package/lib/convert-ruleset.d.ts +1 -1
- package/lib/convert-ruleset.js +3 -8
- package/lib/debug.js +9 -14
- package/lib/index.d.ts +13 -12
- package/lib/index.js +13 -29
- package/lib/ml-core.d.ts +7 -7
- package/lib/ml-core.js +60 -66
- package/lib/ml-dom/helper/accname.d.ts +1 -1
- package/lib/ml-dom/helper/accname.js +23 -19
- package/lib/ml-dom/helper/create-node.d.ts +4 -4
- package/lib/ml-dom/helper/create-node.js +13 -15
- package/lib/ml-dom/helper/debug.d.ts +1 -1
- package/lib/ml-dom/helper/debug.js +8 -8
- package/lib/ml-dom/helper/getIndent.d.ts +2 -2
- package/lib/ml-dom/helper/getIndent.js +30 -28
- package/lib/ml-dom/helper/walkers.d.ts +6 -6
- package/lib/ml-dom/helper/walkers.js +23 -22
- package/lib/ml-dom/index.d.ts +9 -9
- package/lib/ml-dom/index.js +1 -5
- package/lib/ml-dom/manipulations/child-node-methods.d.ts +9 -9
- package/lib/ml-dom/manipulations/child-node-methods.js +31 -25
- package/lib/ml-dom/manipulations/get-children.d.ts +4 -4
- package/lib/ml-dom/manipulations/get-children.js +5 -7
- package/lib/ml-dom/node/attr.d.ts +7 -7
- package/lib/ml-dom/node/attr.js +33 -34
- package/lib/ml-dom/node/block.d.ts +6 -6
- package/lib/ml-dom/node/block.js +21 -15
- package/lib/ml-dom/node/character-data.d.ts +4 -4
- package/lib/ml-dom/node/character-data.js +20 -19
- package/lib/ml-dom/node/child-node.d.ts +9 -9
- package/lib/ml-dom/node/child-node.js +3 -5
- package/lib/ml-dom/node/comment.d.ts +4 -4
- package/lib/ml-dom/node/comment.js +2 -6
- package/lib/ml-dom/node/document-fragment.d.ts +4 -4
- package/lib/ml-dom/node/document-fragment.js +4 -9
- package/lib/ml-dom/node/document-type.d.ts +6 -6
- package/lib/ml-dom/node/document-type.js +21 -15
- package/lib/ml-dom/node/document.d.ts +32 -29
- package/lib/ml-dom/node/document.js +329 -246
- package/lib/ml-dom/node/dom-token-list.d.ts +3 -3
- package/lib/ml-dom/node/dom-token-list.js +29 -33
- package/lib/ml-dom/node/element.d.ts +65 -16
- package/lib/ml-dom/node/element.js +396 -306
- package/lib/ml-dom/node/named-node-map.d.ts +4 -4
- package/lib/ml-dom/node/named-node-map.js +18 -18
- package/lib/ml-dom/node/node-list.d.ts +6 -6
- package/lib/ml-dom/node/node-list.js +25 -13
- package/lib/ml-dom/node/node-store.d.ts +5 -5
- package/lib/ml-dom/node/node-store.js +25 -10
- package/lib/ml-dom/node/node.d.ts +12 -12
- package/lib/ml-dom/node/node.js +101 -76
- package/lib/ml-dom/node/parent-node.d.ts +6 -6
- package/lib/ml-dom/node/parent-node.js +31 -29
- package/lib/ml-dom/node/rule-mapper.d.ts +5 -5
- package/lib/ml-dom/node/rule-mapper.js +20 -17
- package/lib/ml-dom/node/text.d.ts +4 -4
- package/lib/ml-dom/node/text.js +6 -11
- package/lib/ml-dom/node/types.d.ts +30 -16
- package/lib/ml-dom/node/types.js +1 -2
- package/lib/ml-dom/node/unexpected-call-error.js +1 -4
- package/lib/ml-dom/token/token.js +19 -23
- package/lib/ml-rule/create-rule.d.ts +3 -3
- package/lib/ml-rule/create-rule.js +1 -5
- package/lib/ml-rule/create-test-rule.d.ts +5 -5
- package/lib/ml-rule/create-test-rule.js +3 -7
- package/lib/ml-rule/index.d.ts +3 -3
- package/lib/ml-rule/index.js +3 -6
- package/lib/ml-rule/ml-rule-context.d.ts +4 -4
- package/lib/ml-rule/ml-rule-context.js +11 -13
- package/lib/ml-rule/ml-rule.d.ts +9 -9
- package/lib/ml-rule/ml-rule.js +48 -45
- package/lib/ml-rule/types.d.ts +12 -12
- package/lib/ml-rule/types.js +1 -2
- package/lib/plugin/index.d.ts +2 -2
- package/lib/plugin/index.js +2 -5
- package/lib/plugin/plugin.d.ts +2 -2
- package/lib/plugin/plugin.js +1 -5
- package/lib/plugin/types.d.ts +6 -6
- package/lib/plugin/types.js +1 -2
- package/lib/ruleset/index.d.ts +3 -3
- package/lib/ruleset/index.js +4 -8
- package/lib/test/index.d.ts +9 -9
- package/lib/test/index.js +14 -24
- package/lib/types.d.ts +11 -10
- package/lib/types.js +1 -2
- package/lib/utils/get-location-from-chars.d.ts +1 -1
- package/lib/utils/get-location-from-chars.js +1 -5
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -5
- package/lib/utils/string-splice.js +1 -5
- package/package.json +25 -16
- package/tsconfig.test.json +0 -3
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { MLElement } from './element';
|
|
1
|
+
import type { MLElement } from './element.js';
|
|
2
2
|
import type { MLASTAbstractNode } from '@markuplint/ml-ast';
|
|
3
|
-
import type { RuleConfigValue } from '@markuplint/ml-config';
|
|
4
|
-
import { MLNode } from './node';
|
|
5
|
-
export declare abstract class MLCharacterData<T extends RuleConfigValue, O =
|
|
3
|
+
import type { PlainData, RuleConfigValue } from '@markuplint/ml-config';
|
|
4
|
+
import { MLNode } from './node.js';
|
|
5
|
+
export declare abstract class MLCharacterData<T extends RuleConfigValue, O extends PlainData = undefined, A extends MLASTAbstractNode = MLASTAbstractNode> extends MLNode<T, O, A> implements CharacterData {
|
|
6
6
|
/**
|
|
7
7
|
* @implements DOM API: `CharacterData`
|
|
8
8
|
* @see https://dom.spec.whatwg.org/#dom-characterdata-data
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const child_node_methods_1 = require("../manipulations/child-node-methods");
|
|
6
|
-
const node_1 = require("./node");
|
|
7
|
-
const unexpected_call_error_1 = tslib_1.__importDefault(require("./unexpected-call-error"));
|
|
8
|
-
class MLCharacterData extends node_1.MLNode {
|
|
1
|
+
import { after, before, nextElementSibling, previousElementSibling, remove, replaceWith, } from '../manipulations/child-node-methods.js';
|
|
2
|
+
import { MLNode } from './node.js';
|
|
3
|
+
import UnexpectedCallError from './unexpected-call-error.js';
|
|
4
|
+
export class MLCharacterData extends MLNode {
|
|
9
5
|
/**
|
|
10
6
|
* @implements DOM API: `CharacterData`
|
|
11
7
|
* @see https://dom.spec.whatwg.org/#dom-characterdata-data
|
|
@@ -22,7 +18,7 @@ class MLCharacterData extends node_1.MLNode {
|
|
|
22
18
|
* @see https://dom.spec.whatwg.org/#dom-characterdata-length
|
|
23
19
|
*/
|
|
24
20
|
get length() {
|
|
25
|
-
throw new
|
|
21
|
+
throw new UnexpectedCallError('Not supported "length" property');
|
|
26
22
|
}
|
|
27
23
|
/**
|
|
28
24
|
* The element immediately following the specified one in its parent's children list.
|
|
@@ -32,7 +28,7 @@ class MLCharacterData extends node_1.MLNode {
|
|
|
32
28
|
* @see https://dom.spec.whatwg.org/#ref-for-dom-nondocumenttypechildnode-nextelementsibling%E2%91%A1
|
|
33
29
|
*/
|
|
34
30
|
get nextElementSibling() {
|
|
35
|
-
return
|
|
31
|
+
return nextElementSibling(this);
|
|
36
32
|
}
|
|
37
33
|
get nodeValue() {
|
|
38
34
|
return this.data;
|
|
@@ -45,21 +41,25 @@ class MLCharacterData extends node_1.MLNode {
|
|
|
45
41
|
* @see https://dom.spec.whatwg.org/#ref-for-dom-nondocumenttypechildnode-previouselementsibling%E2%91%A1
|
|
46
42
|
*/
|
|
47
43
|
get previousElementSibling() {
|
|
48
|
-
return
|
|
44
|
+
return previousElementSibling(this);
|
|
49
45
|
}
|
|
50
46
|
/**
|
|
51
47
|
* @implements DOM API: `CharacterData`
|
|
52
48
|
*/
|
|
53
|
-
after(
|
|
54
|
-
|
|
49
|
+
after(
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
51
|
+
...nodes) {
|
|
52
|
+
after(this, ...nodes);
|
|
55
53
|
}
|
|
56
54
|
// TODO
|
|
57
55
|
appendData(data) { }
|
|
58
56
|
/**
|
|
59
57
|
* @implements DOM API: `CharacterData`
|
|
60
58
|
*/
|
|
61
|
-
before(
|
|
62
|
-
|
|
59
|
+
before(
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
61
|
+
...nodes) {
|
|
62
|
+
before(this, ...nodes);
|
|
63
63
|
}
|
|
64
64
|
// TODO
|
|
65
65
|
deleteData(offset, count) { }
|
|
@@ -69,19 +69,20 @@ class MLCharacterData extends node_1.MLNode {
|
|
|
69
69
|
* @implements DOM API: `CharacterData`
|
|
70
70
|
*/
|
|
71
71
|
remove() {
|
|
72
|
-
|
|
72
|
+
remove(this);
|
|
73
73
|
}
|
|
74
74
|
// TODO
|
|
75
75
|
replaceData(offset, count, data) { }
|
|
76
76
|
/**
|
|
77
77
|
* @implements DOM API: `CharacterData`
|
|
78
78
|
*/
|
|
79
|
-
replaceWith(
|
|
80
|
-
|
|
79
|
+
replaceWith(
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
81
|
+
...nodes) {
|
|
82
|
+
replaceWith(this, ...nodes);
|
|
81
83
|
}
|
|
82
84
|
// TODO
|
|
83
85
|
substringData(offset, count) {
|
|
84
86
|
return '';
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
|
-
exports.MLCharacterData = MLCharacterData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { MLBlock } from './block';
|
|
2
|
-
import type { MLCharacterData } from './character-data';
|
|
3
|
-
import type { MLDocumentType } from './document-type';
|
|
4
|
-
import type { MLElement } from './element';
|
|
5
|
-
import type { MLNode } from './node';
|
|
6
|
-
import type { MLText } from './text';
|
|
7
|
-
import type { RuleConfigValue } from '@markuplint/ml-config';
|
|
8
|
-
export type MLChildNode<T extends RuleConfigValue, O =
|
|
9
|
-
export declare function isChildNode<T extends RuleConfigValue, O =
|
|
1
|
+
import type { MLBlock } from './block.js';
|
|
2
|
+
import type { MLCharacterData } from './character-data.js';
|
|
3
|
+
import type { MLDocumentType } from './document-type.js';
|
|
4
|
+
import type { MLElement } from './element.js';
|
|
5
|
+
import type { MLNode } from './node.js';
|
|
6
|
+
import type { MLText } from './text.js';
|
|
7
|
+
import type { PlainData, RuleConfigValue } from '@markuplint/ml-config';
|
|
8
|
+
export type MLChildNode<T extends RuleConfigValue, O extends PlainData = undefined> = MLDocumentType<T, O> | MLCharacterData<T, O> | MLText<T, O> | MLElement<T, O> | MLBlock<T, O>;
|
|
9
|
+
export declare function isChildNode<T extends RuleConfigValue, O extends PlainData = undefined>(node: MLNode<T, O>): node is MLChildNode<T, O>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function isChildNode(node) {
|
|
1
|
+
export function isChildNode(
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
3
|
+
node) {
|
|
5
4
|
return (node.is(node.DOCUMENT_TYPE_NODE) ||
|
|
6
5
|
node.is(node.TEXT_NODE) ||
|
|
7
6
|
node.is(node.ELEMENT_NODE) ||
|
|
8
7
|
node.is(node.MARKUPLINT_PREPROCESSOR_BLOCK));
|
|
9
8
|
}
|
|
10
|
-
exports.isChildNode = isChildNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CommentNodeType } from './types';
|
|
1
|
+
import type { CommentNodeType } from './types.js';
|
|
2
2
|
import type { MLASTComment } from '@markuplint/ml-ast';
|
|
3
|
-
import type { RuleConfigValue } from '@markuplint/ml-config';
|
|
4
|
-
import { MLCharacterData } from './character-data';
|
|
5
|
-
export declare class MLComment<T extends RuleConfigValue, O =
|
|
3
|
+
import type { PlainData, RuleConfigValue } from '@markuplint/ml-config';
|
|
4
|
+
import { MLCharacterData } from './character-data.js';
|
|
5
|
+
export declare class MLComment<T extends RuleConfigValue, O extends PlainData = undefined> extends MLCharacterData<T, O, MLASTComment> implements Comment {
|
|
6
6
|
/**
|
|
7
7
|
* Returns a string appropriate for the type of node as `Attr`
|
|
8
8
|
*
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.MLComment = void 0;
|
|
4
|
-
const character_data_1 = require("./character-data");
|
|
5
|
-
class MLComment extends character_data_1.MLCharacterData {
|
|
1
|
+
import { MLCharacterData } from './character-data.js';
|
|
2
|
+
export class MLComment extends MLCharacterData {
|
|
6
3
|
/**
|
|
7
4
|
* Returns a string appropriate for the type of node as `Attr`
|
|
8
5
|
*
|
|
@@ -21,4 +18,3 @@ class MLComment extends character_data_1.MLCharacterData {
|
|
|
21
18
|
return this.nodeValue;
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.MLComment = MLComment;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { DocumentFragmentNodeType } from './types';
|
|
1
|
+
import type { DocumentFragmentNodeType } from './types.js';
|
|
2
2
|
import type { MLASTAbstractNode } from '@markuplint/ml-ast';
|
|
3
|
-
import type { RuleConfigValue } from '@markuplint/ml-config';
|
|
4
|
-
import { MLParentNode } from './parent-node';
|
|
5
|
-
export declare class MLDocumentFragment<T extends RuleConfigValue, O =
|
|
3
|
+
import type { PlainData, RuleConfigValue } from '@markuplint/ml-config';
|
|
4
|
+
import { MLParentNode } from './parent-node.js';
|
|
5
|
+
export declare class MLDocumentFragment<T extends RuleConfigValue, O extends PlainData = undefined> extends MLParentNode<T, O, MLASTAbstractNode> implements DocumentFragment {
|
|
6
6
|
/**
|
|
7
7
|
* Returns a string appropriate for the type of node as `DocumentFragment`
|
|
8
8
|
*
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const parent_node_1 = require("./parent-node");
|
|
6
|
-
const unexpected_call_error_1 = tslib_1.__importDefault(require("./unexpected-call-error"));
|
|
7
|
-
class MLDocumentFragment extends parent_node_1.MLParentNode {
|
|
1
|
+
import { MLParentNode } from './parent-node.js';
|
|
2
|
+
import UnexpectedCallError from './unexpected-call-error.js';
|
|
3
|
+
export class MLDocumentFragment extends MLParentNode {
|
|
8
4
|
/**
|
|
9
5
|
* Returns a string appropriate for the type of node as `DocumentFragment`
|
|
10
6
|
*
|
|
@@ -27,7 +23,6 @@ class MLDocumentFragment extends parent_node_1.MLParentNode {
|
|
|
27
23
|
* @implements DOM API: `DocumentFragment`
|
|
28
24
|
*/
|
|
29
25
|
getElementById(elementId) {
|
|
30
|
-
throw new
|
|
26
|
+
throw new UnexpectedCallError('Not supported "getElementById" method');
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
|
-
exports.MLDocumentFragment = MLDocumentFragment;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { MLDocument } from './document';
|
|
2
|
-
import type { MLElement } from './element';
|
|
3
|
-
import type { DocumentTypeNodeType } from './types';
|
|
1
|
+
import type { MLDocument } from './document.js';
|
|
2
|
+
import type { MLElement } from './element.js';
|
|
3
|
+
import type { DocumentTypeNodeType } from './types.js';
|
|
4
4
|
import type { MLASTDoctype } from '@markuplint/ml-ast';
|
|
5
|
-
import type { RuleConfigValue } from '@markuplint/ml-config';
|
|
6
|
-
import { MLNode } from './node';
|
|
7
|
-
export declare class MLDocumentType<T extends RuleConfigValue, O =
|
|
5
|
+
import type { PlainData, RuleConfigValue } from '@markuplint/ml-config';
|
|
6
|
+
import { MLNode } from './node.js';
|
|
7
|
+
export declare class MLDocumentType<T extends RuleConfigValue, O extends PlainData = undefined> extends MLNode<T, O, MLASTDoctype> implements DocumentType {
|
|
8
8
|
readonly name: string;
|
|
9
9
|
readonly publicId: string;
|
|
10
10
|
readonly systemId: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { after, before, remove, replaceWith } from '../manipulations/child-node-methods.js';
|
|
2
|
+
import { MLNode } from './node.js';
|
|
3
|
+
export class MLDocumentType extends MLNode {
|
|
4
|
+
constructor(
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
6
|
+
astNode,
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
8
|
+
document) {
|
|
8
9
|
super(astNode, document);
|
|
9
10
|
this.name = astNode.name;
|
|
10
11
|
this.publicId = astNode.publicId;
|
|
@@ -27,26 +28,31 @@ class MLDocumentType extends node_1.MLNode {
|
|
|
27
28
|
/**
|
|
28
29
|
* @implements DOM API: `CharacterData`
|
|
29
30
|
*/
|
|
30
|
-
after(
|
|
31
|
-
|
|
31
|
+
after(
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
33
|
+
...nodes) {
|
|
34
|
+
after(this, ...nodes);
|
|
32
35
|
}
|
|
33
36
|
/**
|
|
34
37
|
* @implements DOM API: `CharacterData`
|
|
35
38
|
*/
|
|
36
|
-
before(
|
|
37
|
-
|
|
39
|
+
before(
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
41
|
+
...nodes) {
|
|
42
|
+
before(this, ...nodes);
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
45
|
* @implements DOM API: `CharacterData`
|
|
41
46
|
*/
|
|
42
47
|
remove() {
|
|
43
|
-
|
|
48
|
+
remove(this);
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
51
|
* @implements DOM API: `CharacterData`
|
|
47
52
|
*/
|
|
48
|
-
replaceWith(
|
|
49
|
-
|
|
53
|
+
replaceWith(
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
55
|
+
...nodes) {
|
|
56
|
+
replaceWith(this, ...nodes);
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
|
-
exports.MLDocumentType = MLDocumentType;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
1
|
+
import type { MLAttr } from './attr.js';
|
|
2
|
+
import type { MLComment } from './comment.js';
|
|
3
|
+
import type { MLDocumentType } from './document-type.js';
|
|
4
|
+
import type { MLElement } from './element.js';
|
|
5
|
+
import type { MLNode } from './node.js';
|
|
6
|
+
import type { MLText } from './text.js';
|
|
7
|
+
import type { AccessibilityProperties, DocumentNodeType } from './types.js';
|
|
8
|
+
import type { MLRule } from '../../ml-rule/index.js';
|
|
9
|
+
import type Ruleset from '../../ruleset/index.js';
|
|
10
|
+
import type { MLSchema } from '../../types.js';
|
|
11
|
+
import type { Walker } from '../helper/walkers.js';
|
|
12
|
+
import type { MLToken } from '../token/token.js';
|
|
12
13
|
import type { EndTagType, MLASTDocument } from '@markuplint/ml-ast';
|
|
13
|
-
import type { Pretender, RuleConfigValue } from '@markuplint/ml-config';
|
|
14
|
-
import type {
|
|
15
|
-
import { MLParentNode } from './parent-node';
|
|
16
|
-
export declare class MLDocument<T extends RuleConfigValue, O =
|
|
14
|
+
import type { PlainData, Pretender, RuleConfigValue } from '@markuplint/ml-config';
|
|
15
|
+
import type { MLMLSpec } from '@markuplint/ml-spec';
|
|
16
|
+
import { MLParentNode } from './parent-node.js';
|
|
17
|
+
export declare class MLDocument<T extends RuleConfigValue, O extends PlainData = undefined> extends MLParentNode<T, O> implements Document {
|
|
17
18
|
#private;
|
|
18
19
|
/**
|
|
19
20
|
* Detect value as a true if its attribute is booleanish value and omitted.
|
|
@@ -31,7 +32,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
31
32
|
/**
|
|
32
33
|
*
|
|
33
34
|
*/
|
|
34
|
-
currentRule: MLRule<T, O
|
|
35
|
+
currentRule: Readonly<MLRule<T, O>> | null;
|
|
35
36
|
/**
|
|
36
37
|
* This is defined by the parser.
|
|
37
38
|
*
|
|
@@ -53,17 +54,17 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
53
54
|
/**
|
|
54
55
|
*
|
|
55
56
|
*/
|
|
56
|
-
readonly specs:
|
|
57
|
+
readonly specs: MLMLSpec;
|
|
57
58
|
/**
|
|
58
59
|
*
|
|
59
60
|
* @param ast node list of markuplint AST
|
|
60
61
|
* @param ruleset ruleset object
|
|
61
62
|
*/
|
|
62
|
-
constructor(ast: MLASTDocument, ruleset: Ruleset, schemas:
|
|
63
|
-
filename?: string;
|
|
64
|
-
endTag?: 'xml' | 'omittable' | 'never';
|
|
65
|
-
booleanish?: boolean;
|
|
66
|
-
pretenders?: Pretender[];
|
|
63
|
+
constructor(ast: MLASTDocument, ruleset: Ruleset, schemas: MLSchema, options?: {
|
|
64
|
+
readonly filename?: string;
|
|
65
|
+
readonly endTag?: 'xml' | 'omittable' | 'never';
|
|
66
|
+
readonly booleanish?: boolean;
|
|
67
|
+
readonly pretenders?: readonly Pretender[];
|
|
67
68
|
});
|
|
68
69
|
/**
|
|
69
70
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
@@ -483,7 +484,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
483
484
|
* @unsupported
|
|
484
485
|
* @implements DOM API: `Document`
|
|
485
486
|
*/
|
|
486
|
-
get oncopy(): ((this:
|
|
487
|
+
get oncopy(): ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
487
488
|
/**
|
|
488
489
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
489
490
|
*
|
|
@@ -499,7 +500,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
499
500
|
* @unsupported
|
|
500
501
|
* @implements DOM API: `Document`
|
|
501
502
|
*/
|
|
502
|
-
get oncut(): ((this:
|
|
503
|
+
get oncut(): ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
503
504
|
/**
|
|
504
505
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
505
506
|
*
|
|
@@ -779,7 +780,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
779
780
|
* @unsupported
|
|
780
781
|
* @implements DOM API: `Document`
|
|
781
782
|
*/
|
|
782
|
-
get onpaste(): ((this:
|
|
783
|
+
get onpaste(): ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
783
784
|
/**
|
|
784
785
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
785
786
|
*
|
|
@@ -932,6 +933,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
932
933
|
* @implements DOM API: `Document`
|
|
933
934
|
*/
|
|
934
935
|
get onscroll(): ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
936
|
+
get onscrollend(): ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
935
937
|
/**
|
|
936
938
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
937
939
|
*
|
|
@@ -1337,7 +1339,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
1337
1339
|
* @unsupported
|
|
1338
1340
|
* @implements DOM API: `Document`
|
|
1339
1341
|
*/
|
|
1340
|
-
createNSResolver(nodeResolver: Node):
|
|
1342
|
+
createNSResolver(nodeResolver: Node): Node;
|
|
1341
1343
|
/**
|
|
1342
1344
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
1343
1345
|
*
|
|
@@ -1427,6 +1429,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
1427
1429
|
* @implements DOM API: `Document`
|
|
1428
1430
|
*/
|
|
1429
1431
|
exitPointerLock(): void;
|
|
1432
|
+
getAccessibilityProp(node: MLNode<T, O>, ariaVersion?: "1.2"): AccessibilityProperties | null;
|
|
1430
1433
|
/**
|
|
1431
1434
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
1432
1435
|
*
|
|
@@ -1567,7 +1570,7 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
1567
1570
|
/**
|
|
1568
1571
|
* @implements `@markuplint/ml-core` API: `MLDocument`
|
|
1569
1572
|
*/
|
|
1570
|
-
setRule(rule: MLRule<T, O
|
|
1573
|
+
setRule(rule: Readonly<MLRule<T, O>> | null): void;
|
|
1571
1574
|
/**
|
|
1572
1575
|
* @implements `@markuplint/ml-core` API: `MLDocument`
|
|
1573
1576
|
*/
|
|
@@ -1586,14 +1589,14 @@ export declare class MLDocument<T extends RuleConfigValue, O = null> extends MLP
|
|
|
1586
1589
|
* @unsupported
|
|
1587
1590
|
* @implements DOM API: `Document`
|
|
1588
1591
|
*/
|
|
1589
|
-
write(...text: string[]): void;
|
|
1592
|
+
write(...text: readonly string[]): void;
|
|
1590
1593
|
/**
|
|
1591
1594
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
1592
1595
|
*
|
|
1593
1596
|
* @unsupported
|
|
1594
1597
|
* @implements DOM API: `Document`
|
|
1595
1598
|
*/
|
|
1596
|
-
writeln(...text: string[]): void;
|
|
1599
|
+
writeln(...text: readonly string[]): void;
|
|
1597
1600
|
private _pretending;
|
|
1598
1601
|
private _ruleMapping;
|
|
1599
1602
|
}
|