@markuplint/ml-core 3.0.0-alpha.5 → 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.
Files changed (41) hide show
  1. package/lib/configs.js +5 -1
  2. package/lib/index.d.ts +11 -1
  3. package/lib/ml-core.d.ts +23 -12
  4. package/lib/ml-dom/helper/create-node.d.ts +4 -1
  5. package/lib/ml-dom/helper/getIndent.d.ts +7 -7
  6. package/lib/ml-dom/helper/walkers.d.ts +12 -4
  7. package/lib/ml-dom/manipulations/child-node-methods.d.ts +18 -5
  8. package/lib/ml-dom/manipulations/get-children.d.ts +3 -1
  9. package/lib/ml-dom/node/attr.d.ts +89 -89
  10. package/lib/ml-dom/node/block.d.ts +30 -30
  11. package/lib/ml-dom/node/character-data.d.ts +59 -52
  12. package/lib/ml-dom/node/child-node.d.ts +6 -1
  13. package/lib/ml-dom/node/comment.d.ts +15 -12
  14. package/lib/ml-dom/node/document-fragment.d.ts +22 -19
  15. package/lib/ml-dom/node/document-type.d.ts +34 -31
  16. package/lib/ml-dom/node/document.d.ts +1596 -1566
  17. package/lib/ml-dom/node/document.js +20 -0
  18. package/lib/ml-dom/node/dom-token-list.d.ts +27 -27
  19. package/lib/ml-dom/node/element.d.ts +1894 -1840
  20. package/lib/ml-dom/node/element.js +60 -0
  21. package/lib/ml-dom/node/named-node-map.d.ts +44 -39
  22. package/lib/ml-dom/node/node-list.d.ts +9 -3
  23. package/lib/ml-dom/node/node-store.d.ts +3 -3
  24. package/lib/ml-dom/node/node.d.ts +491 -471
  25. package/lib/ml-dom/node/parent-node.d.ts +66 -57
  26. package/lib/ml-dom/node/rule-mapper.d.ts +9 -9
  27. package/lib/ml-dom/node/text.d.ts +49 -46
  28. package/lib/ml-dom/node/types.d.ts +78 -22
  29. package/lib/ml-dom/node/unexpected-call-error.d.ts +1 -2
  30. package/lib/ml-dom/token/token.d.ts +44 -44
  31. package/lib/ml-rule/create-test-rule.d.ts +5 -3
  32. package/lib/ml-rule/ml-rule-context.d.ts +55 -47
  33. package/lib/ml-rule/ml-rule.d.ts +25 -23
  34. package/lib/ml-rule/types.d.ts +21 -15
  35. package/lib/plugin/types.d.ts +8 -8
  36. package/lib/ruleset/index.d.ts +4 -4
  37. package/lib/test/index.d.ts +20 -8
  38. package/lib/types.d.ts +9 -9
  39. package/lib/utils/get-location-from-chars.d.ts +9 -4
  40. package/package.json +10 -10
  41. package/tsconfig.tsbuildinfo +1 -1
@@ -121,6 +121,16 @@ class MLElement extends parent_node_1.MLParentNode {
121
121
  get ariaColIndex() {
122
122
  throw new unexpected_call_error_1.default('Not supported "ariaColIndex" property');
123
123
  }
124
+ /**
125
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
126
+ *
127
+ * @deprecated
128
+ * @unsupported
129
+ * @implements DOM API: `Element`
130
+ */
131
+ get ariaColIndexText() {
132
+ throw new unexpected_call_error_1.default('Not supported "ariaColIndexText" property');
133
+ }
124
134
  /**
125
135
  * **IT THROWS AN ERROR WHEN CALLING THIS.**
126
136
  *
@@ -181,6 +191,16 @@ class MLElement extends parent_node_1.MLParentNode {
181
191
  get ariaHidden() {
182
192
  throw new unexpected_call_error_1.default('Not supported "ariaHidden" property');
183
193
  }
194
+ /**
195
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
196
+ *
197
+ * @deprecated
198
+ * @unsupported
199
+ * @implements DOM API: `Element`
200
+ */
201
+ get ariaInvalid() {
202
+ throw new unexpected_call_error_1.default('Not supported "ariaInvalid" property');
203
+ }
184
204
  /**
185
205
  * **IT THROWS AN ERROR WHEN CALLING THIS.**
186
206
  *
@@ -341,6 +361,16 @@ class MLElement extends parent_node_1.MLParentNode {
341
361
  get ariaRowIndex() {
342
362
  throw new unexpected_call_error_1.default('Not supported "ariaRowIndex" property');
343
363
  }
364
+ /**
365
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
366
+ *
367
+ * @deprecated
368
+ * @unsupported
369
+ * @implements DOM API: `Element`
370
+ */
371
+ get ariaRowIndexText() {
372
+ throw new unexpected_call_error_1.default('Not supported "ariaRowIndexText" property');
373
+ }
344
374
  /**
345
375
  * **IT THROWS AN ERROR WHEN CALLING THIS.**
346
376
  *
@@ -844,6 +874,16 @@ class MLElement extends parent_node_1.MLParentNode {
844
874
  get onauxclick() {
845
875
  throw new unexpected_call_error_1.default('Not supported "onauxclick" property');
846
876
  }
877
+ /**
878
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
879
+ *
880
+ * @deprecated
881
+ * @unsupported
882
+ * @implements DOM API: `Element`
883
+ */
884
+ get onbeforeinput() {
885
+ throw new unexpected_call_error_1.default('Not supported "onbeforeinput" property');
886
+ }
847
887
  /**
848
888
  * **IT THROWS AN ERROR WHEN CALLING THIS.**
849
889
  *
@@ -854,6 +894,16 @@ class MLElement extends parent_node_1.MLParentNode {
854
894
  get onblur() {
855
895
  throw new unexpected_call_error_1.default('Not supported "onblur" property');
856
896
  }
897
+ /**
898
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
899
+ *
900
+ * @deprecated
901
+ * @unsupported
902
+ * @implements DOM API: `Element`
903
+ */
904
+ get oncancel() {
905
+ throw new unexpected_call_error_1.default('Not supported "oncanplay" property');
906
+ }
857
907
  /**
858
908
  * **IT THROWS AN ERROR WHEN CALLING THIS.**
859
909
  *
@@ -1761,6 +1811,16 @@ class MLElement extends parent_node_1.MLParentNode {
1761
1811
  get rawName() {
1762
1812
  return this._astToken.nodeName;
1763
1813
  }
1814
+ /**
1815
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1816
+ *
1817
+ * @unsupported
1818
+ * @implements DOM API: `Element`
1819
+ * @see https://w3c.github.io/aria/#ARIAMixin
1820
+ */
1821
+ get role() {
1822
+ throw new unexpected_call_error_1.default('Not supported "role" property');
1823
+ }
1764
1824
  /**
1765
1825
  * @implements `@markuplint/ml-core` API: `MLNode`
1766
1826
  */
@@ -1,42 +1,47 @@
1
1
  import type { MLAttr } from './attr';
2
2
  import type { RuleConfigValue } from '@markuplint/ml-config';
3
- export declare class MLNamedNodeMap<T extends RuleConfigValue, O = null> extends Array<MLAttr<T, O>> implements NamedNodeMap {
4
- getNamedItem(qualifiedName: string): MLAttr<T, O> | null;
5
- /**
6
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
7
- *
8
- * @unsupported
9
- * @implements DOM API: `NamedNodeMap`
10
- */
11
- getNamedItemNS(namespace: string | null, localName: string): Attr | null;
12
- item(index: number): MLAttr<T, O> | null;
13
- /**
14
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
15
- *
16
- * @unsupported
17
- * @implements DOM API: `NamedNodeMap`
18
- */
19
- removeNamedItem(qualifiedName: string): MLAttr<T, O>;
20
- /**
21
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
22
- *
23
- * @unsupported
24
- * @implements DOM API: `NamedNodeMap`
25
- */
26
- removeNamedItemNS(namespace: string | null, localName: string): MLAttr<T, O>;
27
- /**
28
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
29
- *
30
- * @unsupported
31
- * @implements DOM API: `NamedNodeMap`
32
- */
33
- setNamedItem(attr: MLAttr<T, O>): MLAttr<T, O> | null;
34
- /**
35
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
36
- *
37
- * @unsupported
38
- * @implements DOM API: `NamedNodeMap`
39
- */
40
- setNamedItemNS(attr: MLAttr<T, O>): MLAttr<T, O> | null;
3
+ export declare class MLNamedNodeMap<T extends RuleConfigValue, O = null>
4
+ extends Array<MLAttr<T, O>>
5
+ implements NamedNodeMap
6
+ {
7
+ getNamedItem(qualifiedName: string): MLAttr<T, O> | null;
8
+ /**
9
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
10
+ *
11
+ * @unsupported
12
+ * @implements DOM API: `NamedNodeMap`
13
+ */
14
+ getNamedItemNS(namespace: string | null, localName: string): Attr | null;
15
+ item(index: number): MLAttr<T, O> | null;
16
+ /**
17
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
18
+ *
19
+ * @unsupported
20
+ * @implements DOM API: `NamedNodeMap`
21
+ */
22
+ removeNamedItem(qualifiedName: string): MLAttr<T, O>;
23
+ /**
24
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
25
+ *
26
+ * @unsupported
27
+ * @implements DOM API: `NamedNodeMap`
28
+ */
29
+ removeNamedItemNS(namespace: string | null, localName: string): MLAttr<T, O>;
30
+ /**
31
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
32
+ *
33
+ * @unsupported
34
+ * @implements DOM API: `NamedNodeMap`
35
+ */
36
+ setNamedItem(attr: MLAttr<T, O>): MLAttr<T, O> | null;
37
+ /**
38
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
39
+ *
40
+ * @unsupported
41
+ * @implements DOM API: `NamedNodeMap`
42
+ */
43
+ setNamedItemNS(attr: MLAttr<T, O>): MLAttr<T, O> | null;
41
44
  }
42
- export declare function toNamedNodeMap<T extends RuleConfigValue, O = null>(nodes: ReadonlyArray<MLAttr<T, O>>): MLNamedNodeMap<T, O>;
45
+ export declare function toNamedNodeMap<T extends RuleConfigValue, O = null>(
46
+ nodes: ReadonlyArray<MLAttr<T, O>>,
47
+ ): MLNamedNodeMap<T, O>;
@@ -1,6 +1,12 @@
1
1
  import type { MLChildNode } from './child-node';
2
2
  import type { MLElement } from './element';
3
3
  import type { RuleConfigValue } from '@markuplint/ml-config';
4
- export declare function toNodeList<T extends RuleConfigValue, O, N extends MLChildNode<T, O>>(nodes: ReadonlyArray<N>): NodeListOf<N>;
5
- export declare function toHTMLCollection<T extends RuleConfigValue, O = null>(nodes: ReadonlyArray<MLElement<T, O>>): HTMLCollectionOf<MLElement<T, O>>;
6
- export declare function nodeListToHTMLCollection<T extends RuleConfigValue, O = null>(nodeList: NodeListOf<MLChildNode<T, O>>): HTMLCollectionOf<MLElement<T, O>>;
4
+ export declare function toNodeList<T extends RuleConfigValue, O, N extends MLChildNode<T, O>>(
5
+ nodes: ReadonlyArray<N>,
6
+ ): NodeListOf<N>;
7
+ export declare function toHTMLCollection<T extends RuleConfigValue, O = null>(
8
+ nodes: ReadonlyArray<MLElement<T, O>>,
9
+ ): HTMLCollectionOf<MLElement<T, O>>;
10
+ export declare function nodeListToHTMLCollection<T extends RuleConfigValue, O = null>(
11
+ nodeList: NodeListOf<MLChildNode<T, O>>,
12
+ ): HTMLCollectionOf<MLElement<T, O>>;
@@ -3,9 +3,9 @@ import type { MappedNode } from './types';
3
3
  import type { MLASTAbstractNode } from '@markuplint/ml-ast';
4
4
  import type { RuleConfigValue } from '@markuplint/ml-config';
5
5
  declare class NodeStore {
6
- #private;
7
- getNode<N extends MLASTAbstractNode, T extends RuleConfigValue, O = null>(astNode: N): MappedNode<N, T, O>;
8
- setNode<A extends MLASTAbstractNode, T extends RuleConfigValue, O = null>(astNode: A, node: MLNode<T, O, A>): void;
6
+ #private;
7
+ getNode<N extends MLASTAbstractNode, T extends RuleConfigValue, O = null>(astNode: N): MappedNode<N, T, O>;
8
+ setNode<A extends MLASTAbstractNode, T extends RuleConfigValue, O = null>(astNode: A, node: MLNode<T, O, A>): void;
9
9
  }
10
10
  /**
11
11
  * `NodeStore` Singleton