@markuplint/ml-core 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/configs.js +5 -1
- package/lib/index.d.ts +11 -1
- package/lib/ml-core.d.ts +23 -12
- package/lib/ml-dom/helper/create-node.d.ts +4 -1
- package/lib/ml-dom/helper/getIndent.d.ts +7 -7
- package/lib/ml-dom/helper/walkers.d.ts +12 -4
- package/lib/ml-dom/index.d.ts +1 -0
- package/lib/ml-dom/manipulations/child-node-methods.d.ts +18 -5
- package/lib/ml-dom/manipulations/get-children.d.ts +3 -1
- package/lib/ml-dom/node/attr.d.ts +89 -89
- package/lib/ml-dom/node/block.d.ts +30 -30
- package/lib/ml-dom/node/character-data.d.ts +59 -52
- package/lib/ml-dom/node/child-node.d.ts +6 -1
- package/lib/ml-dom/node/comment.d.ts +15 -12
- package/lib/ml-dom/node/document-fragment.d.ts +22 -19
- package/lib/ml-dom/node/document-type.d.ts +34 -31
- package/lib/ml-dom/node/document.d.ts +1596 -1562
- package/lib/ml-dom/node/document.js +31 -0
- package/lib/ml-dom/node/dom-token-list.d.ts +27 -27
- package/lib/ml-dom/node/element.d.ts +1894 -1840
- package/lib/ml-dom/node/element.js +60 -0
- package/lib/ml-dom/node/named-node-map.d.ts +44 -39
- package/lib/ml-dom/node/node-list.d.ts +9 -3
- package/lib/ml-dom/node/node-store.d.ts +3 -3
- package/lib/ml-dom/node/node.d.ts +491 -471
- package/lib/ml-dom/node/node.js +3 -3
- package/lib/ml-dom/node/parent-node.d.ts +66 -57
- package/lib/ml-dom/node/rule-mapper.d.ts +9 -9
- package/lib/ml-dom/node/text.d.ts +49 -46
- package/lib/ml-dom/node/types.d.ts +78 -22
- package/lib/ml-dom/node/unexpected-call-error.d.ts +1 -2
- package/lib/ml-dom/token/token.d.ts +44 -44
- package/lib/ml-rule/create-test-rule.d.ts +5 -3
- package/lib/ml-rule/ml-rule-context.d.ts +55 -47
- package/lib/ml-rule/ml-rule.d.ts +25 -23
- package/lib/ml-rule/types.d.ts +21 -15
- package/lib/plugin/types.d.ts +8 -8
- package/lib/ruleset/index.d.ts +4 -4
- package/lib/test/index.d.ts +20 -8
- package/lib/types.d.ts +9 -9
- package/lib/utils/get-location-from-chars.d.ts +9 -4
- package/package.json +10 -10
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -499,6 +499,16 @@ class MLDocument extends parent_node_1.MLParentNode {
|
|
|
499
499
|
get onauxclick() {
|
|
500
500
|
throw new unexpected_call_error_1.default('Not supported "onauxclick" property');
|
|
501
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
504
|
+
*
|
|
505
|
+
* @deprecated
|
|
506
|
+
* @unsupported
|
|
507
|
+
* @implements DOM API: `Document`
|
|
508
|
+
*/
|
|
509
|
+
get onbeforeinput() {
|
|
510
|
+
throw new unexpected_call_error_1.default('Not supported "onbeforeinput" property');
|
|
511
|
+
}
|
|
502
512
|
/**
|
|
503
513
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
504
514
|
*
|
|
@@ -509,6 +519,16 @@ class MLDocument extends parent_node_1.MLParentNode {
|
|
|
509
519
|
get onblur() {
|
|
510
520
|
throw new unexpected_call_error_1.default('Not supported "onblur" property');
|
|
511
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
524
|
+
*
|
|
525
|
+
* @deprecated
|
|
526
|
+
* @unsupported
|
|
527
|
+
* @implements DOM API: `Document`
|
|
528
|
+
*/
|
|
529
|
+
get oncancel() {
|
|
530
|
+
throw new unexpected_call_error_1.default('Not supported "oncanplay" property');
|
|
531
|
+
}
|
|
512
532
|
/**
|
|
513
533
|
* **IT THROWS AN ERROR WHEN CALLING THIS.**
|
|
514
534
|
*
|
|
@@ -1956,6 +1976,17 @@ class MLDocument extends parent_node_1.MLParentNode {
|
|
|
1956
1976
|
requestStorageAccess() {
|
|
1957
1977
|
throw new unexpected_call_error_1.default('Not supported "requestStorageAccess" method');
|
|
1958
1978
|
}
|
|
1979
|
+
/**
|
|
1980
|
+
* @implements `@markuplint/ml-core` API: `MLDocument`
|
|
1981
|
+
*/
|
|
1982
|
+
searchNodeByLocation(line, col) {
|
|
1983
|
+
for (const node of this.nodeList) {
|
|
1984
|
+
if (node.startLine <= line && line <= node.endLine && node.startCol <= col && col <= node.endCol) {
|
|
1985
|
+
return node;
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
return null;
|
|
1989
|
+
}
|
|
1959
1990
|
/**
|
|
1960
1991
|
* @implements `@markuplint/ml-core` API: `MLDocument`
|
|
1961
1992
|
*/
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import type { MLAttr } from './attr';
|
|
2
2
|
import type { RuleInfo } from '@markuplint/ml-config';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
type Scope = {
|
|
4
|
+
raw: string;
|
|
5
|
+
startOffset: number;
|
|
6
|
+
startLine: number;
|
|
7
|
+
startCol: number;
|
|
8
|
+
rule: RuleInfo<any, any>;
|
|
9
9
|
};
|
|
10
10
|
export declare class MLDomTokenList extends Array<string> implements DOMTokenList {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
#private;
|
|
12
|
+
constructor(tokens: string, ownerAttrs: MLAttr<any, any>[]);
|
|
13
|
+
get value(): string;
|
|
14
|
+
add(...tokens: string[]): void;
|
|
15
|
+
/**
|
|
16
|
+
* @implements `@markuplint/ml-core` API: `MLDomTokenList`
|
|
17
|
+
*/
|
|
18
|
+
allTokens(): Scope[];
|
|
19
|
+
contains(token: string): boolean;
|
|
20
|
+
forEach(callbackfn: (value: string, index: number, parent: any) => void, thisArg?: any): void;
|
|
21
|
+
item(index: number): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* @implements `@markuplint/ml-core` API: `MLDomTokenList`
|
|
24
|
+
*/
|
|
25
|
+
pick(token: string): Scope | null;
|
|
26
|
+
remove(...tokens: string[]): void;
|
|
27
|
+
replace(token: string, newToken: string): boolean;
|
|
28
|
+
supports(token: string): boolean;
|
|
29
|
+
toString(): string;
|
|
30
|
+
toggle(token: string, force?: boolean): boolean;
|
|
31
|
+
private _pick;
|
|
32
32
|
}
|
|
33
33
|
export {};
|