@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.
Files changed (43) 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/index.d.ts +1 -0
  8. package/lib/ml-dom/manipulations/child-node-methods.d.ts +18 -5
  9. package/lib/ml-dom/manipulations/get-children.d.ts +3 -1
  10. package/lib/ml-dom/node/attr.d.ts +89 -89
  11. package/lib/ml-dom/node/block.d.ts +30 -30
  12. package/lib/ml-dom/node/character-data.d.ts +59 -52
  13. package/lib/ml-dom/node/child-node.d.ts +6 -1
  14. package/lib/ml-dom/node/comment.d.ts +15 -12
  15. package/lib/ml-dom/node/document-fragment.d.ts +22 -19
  16. package/lib/ml-dom/node/document-type.d.ts +34 -31
  17. package/lib/ml-dom/node/document.d.ts +1596 -1562
  18. package/lib/ml-dom/node/document.js +31 -0
  19. package/lib/ml-dom/node/dom-token-list.d.ts +27 -27
  20. package/lib/ml-dom/node/element.d.ts +1894 -1840
  21. package/lib/ml-dom/node/element.js +60 -0
  22. package/lib/ml-dom/node/named-node-map.d.ts +44 -39
  23. package/lib/ml-dom/node/node-list.d.ts +9 -3
  24. package/lib/ml-dom/node/node-store.d.ts +3 -3
  25. package/lib/ml-dom/node/node.d.ts +491 -471
  26. package/lib/ml-dom/node/node.js +3 -3
  27. package/lib/ml-dom/node/parent-node.d.ts +66 -57
  28. package/lib/ml-dom/node/rule-mapper.d.ts +9 -9
  29. package/lib/ml-dom/node/text.d.ts +49 -46
  30. package/lib/ml-dom/node/types.d.ts +78 -22
  31. package/lib/ml-dom/node/unexpected-call-error.d.ts +1 -2
  32. package/lib/ml-dom/token/token.d.ts +44 -44
  33. package/lib/ml-rule/create-test-rule.d.ts +5 -3
  34. package/lib/ml-rule/ml-rule-context.d.ts +55 -47
  35. package/lib/ml-rule/ml-rule.d.ts +25 -23
  36. package/lib/ml-rule/types.d.ts +21 -15
  37. package/lib/plugin/types.d.ts +8 -8
  38. package/lib/ruleset/index.d.ts +4 -4
  39. package/lib/test/index.d.ts +20 -8
  40. package/lib/types.d.ts +9 -9
  41. package/lib/utils/get-location-from-chars.d.ts +9 -4
  42. package/package.json +10 -10
  43. package/tsconfig.tsbuildinfo +1 -1
@@ -2,23 +2,26 @@ import type { DocumentFragmentNodeType } from './types';
2
2
  import type { MLASTAbstractNode } from '@markuplint/ml-ast';
3
3
  import type { RuleConfigValue } from '@markuplint/ml-config';
4
4
  import { MLParentNode } from './parent-node';
5
- export declare class MLDocumentFragment<T extends RuleConfigValue, O = null> extends MLParentNode<T, O, MLASTAbstractNode> implements DocumentFragment {
6
- /**
7
- * Returns a string appropriate for the type of node as `DocumentFragment`
8
- *
9
- * @see https://dom.spec.whatwg.org/#ref-for-documentfragment%E2%91%A0%E2%91%A6
10
- */
11
- get nodeName(): "#document-fragment";
12
- /**
13
- * Returns a number appropriate for the type of `DocumentFragment`
14
- */
15
- get nodeType(): DocumentFragmentNodeType;
16
- /**
17
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
18
- *
19
- * @deprecated
20
- * @unsupported
21
- * @implements DOM API: `DocumentFragment`
22
- */
23
- getElementById(elementId: string): HTMLElement | null;
5
+ export declare class MLDocumentFragment<T extends RuleConfigValue, O = null>
6
+ extends MLParentNode<T, O, MLASTAbstractNode>
7
+ implements DocumentFragment
8
+ {
9
+ /**
10
+ * Returns a string appropriate for the type of node as `DocumentFragment`
11
+ *
12
+ * @see https://dom.spec.whatwg.org/#ref-for-documentfragment%E2%91%A0%E2%91%A6
13
+ */
14
+ get nodeName(): '#document-fragment';
15
+ /**
16
+ * Returns a number appropriate for the type of `DocumentFragment`
17
+ */
18
+ get nodeType(): DocumentFragmentNodeType;
19
+ /**
20
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
21
+ *
22
+ * @deprecated
23
+ * @unsupported
24
+ * @implements DOM API: `DocumentFragment`
25
+ */
26
+ getElementById(elementId: string): HTMLElement | null;
24
27
  }
@@ -4,35 +4,38 @@ import type { DocumentTypeNodeType } from './types';
4
4
  import type { MLASTDoctype } from '@markuplint/ml-ast';
5
5
  import type { RuleConfigValue } from '@markuplint/ml-config';
6
6
  import { MLNode } from './node';
7
- export declare class MLDocumentType<T extends RuleConfigValue, O = null> extends MLNode<T, O, MLASTDoctype> implements DocumentType {
8
- readonly name: string;
9
- readonly publicId: string;
10
- readonly systemId: string;
11
- constructor(astNode: MLASTDoctype, document: MLDocument<T, O>);
12
- /**
13
- * Returns a string appropriate for the type of node as `DocumentType`
14
- *
15
- * @see https://dom.spec.whatwg.org/#ref-for-documenttype%E2%91%A0%E2%93%AA
16
- */
17
- get nodeName(): string;
18
- /**
19
- * Returns a number appropriate for the type of `DocumentType`
20
- */
21
- get nodeType(): DocumentTypeNodeType;
22
- /**
23
- * @implements DOM API: `CharacterData`
24
- */
25
- after(...nodes: (string | MLElement<any, any>)[]): void;
26
- /**
27
- * @implements DOM API: `CharacterData`
28
- */
29
- before(...nodes: (string | MLElement<any, any>)[]): void;
30
- /**
31
- * @implements DOM API: `CharacterData`
32
- */
33
- remove(): void;
34
- /**
35
- * @implements DOM API: `CharacterData`
36
- */
37
- replaceWith(...nodes: (string | MLElement<any, any>)[]): void;
7
+ export declare class MLDocumentType<T extends RuleConfigValue, O = null>
8
+ extends MLNode<T, O, MLASTDoctype>
9
+ implements DocumentType
10
+ {
11
+ readonly name: string;
12
+ readonly publicId: string;
13
+ readonly systemId: string;
14
+ constructor(astNode: MLASTDoctype, document: MLDocument<T, O>);
15
+ /**
16
+ * Returns a string appropriate for the type of node as `DocumentType`
17
+ *
18
+ * @see https://dom.spec.whatwg.org/#ref-for-documenttype%E2%91%A0%E2%93%AA
19
+ */
20
+ get nodeName(): string;
21
+ /**
22
+ * Returns a number appropriate for the type of `DocumentType`
23
+ */
24
+ get nodeType(): DocumentTypeNodeType;
25
+ /**
26
+ * @implements DOM API: `CharacterData`
27
+ */
28
+ after(...nodes: (string | MLElement<any, any>)[]): void;
29
+ /**
30
+ * @implements DOM API: `CharacterData`
31
+ */
32
+ before(...nodes: (string | MLElement<any, any>)[]): void;
33
+ /**
34
+ * @implements DOM API: `CharacterData`
35
+ */
36
+ remove(): void;
37
+ /**
38
+ * @implements DOM API: `CharacterData`
39
+ */
40
+ replaceWith(...nodes: (string | MLElement<any, any>)[]): void;
38
41
  }