@markuplint/ml-core 2.3.2 → 2.3.3

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 (54) hide show
  1. package/lib/ml-core.d.ts +1 -1
  2. package/lib/ml-dom/helper/selector.d.ts +1 -1
  3. package/package.json +5 -5
  4. package/tsconfig.tsbuildinfo +1 -1
  5. package/lib/ml-dom/manipulations/child-node-methods.d.ts +0 -33
  6. package/lib/ml-dom/manipulations/child-node-methods.js +0 -73
  7. package/lib/ml-dom/manipulations/get-children.d.ts +0 -4
  8. package/lib/ml-dom/manipulations/get-children.js +0 -10
  9. package/lib/ml-dom/node/attr.d.ts +0 -93
  10. package/lib/ml-dom/node/attr.js +0 -144
  11. package/lib/ml-dom/node/block.d.ts +0 -38
  12. package/lib/ml-dom/node/block.js +0 -53
  13. package/lib/ml-dom/node/character-data.d.ts +0 -57
  14. package/lib/ml-dom/node/character-data.js +0 -87
  15. package/lib/ml-dom/node/child-node.d.ts +0 -9
  16. package/lib/ml-dom/node/child-node.js +0 -10
  17. package/lib/ml-dom/node/comment.d.ts +0 -17
  18. package/lib/ml-dom/node/comment.js +0 -24
  19. package/lib/ml-dom/node/document-fragment.d.ts +0 -24
  20. package/lib/ml-dom/node/document-fragment.js +0 -33
  21. package/lib/ml-dom/node/document-type.d.ts +0 -38
  22. package/lib/ml-dom/node/document-type.js +0 -52
  23. package/lib/ml-dom/node/document.d.ts +0 -1554
  24. package/lib/ml-dom/node/document.js +0 -2117
  25. package/lib/ml-dom/node/dom-token-list.d.ts +0 -15
  26. package/lib/ml-dom/node/dom-token-list.js +0 -61
  27. package/lib/ml-dom/node/element.d.ts +0 -1832
  28. package/lib/ml-dom/node/element.js +0 -2483
  29. package/lib/ml-dom/node/named-node-map.d.ts +0 -42
  30. package/lib/ml-dom/node/named-node-map.js +0 -64
  31. package/lib/ml-dom/node/node-list.d.ts +0 -6
  32. package/lib/ml-dom/node/node-list.js +0 -39
  33. package/lib/ml-dom/node/node-store.d.ts +0 -14
  34. package/lib/ml-dom/node/node-store.js +0 -32
  35. package/lib/ml-dom/node/node.d.ts +0 -475
  36. package/lib/ml-dom/node/node.js +0 -672
  37. package/lib/ml-dom/node/parent-node.d.ts +0 -66
  38. package/lib/ml-dom/node/parent-node.js +0 -131
  39. package/lib/ml-dom/node/rule-mapper.d.ts +0 -17
  40. package/lib/ml-dom/node/rule-mapper.js +0 -49
  41. package/lib/ml-dom/node/text.d.ts +0 -51
  42. package/lib/ml-dom/node/text.js +0 -76
  43. package/lib/ml-dom/node/types.d.ts +0 -25
  44. package/lib/ml-dom/node/types.js +0 -2
  45. package/lib/ml-dom/node/unexpected-call-error.d.ts +0 -2
  46. package/lib/ml-dom/node/unexpected-call-error.js +0 -5
  47. package/lib/ml-dom/token/token.d.ts +0 -47
  48. package/lib/ml-dom/token/token.js +0 -89
  49. package/lib/selector/is-pure-html-element.d.ts +0 -1
  50. package/lib/selector/is-pure-html-element.js +0 -7
  51. package/lib/selector/match-selector.d.ts +0 -14
  52. package/lib/selector/match-selector.js +0 -230
  53. package/lib/selector/selector.d.ts +0 -9
  54. package/lib/selector/selector.js +0 -561
@@ -1,15 +0,0 @@
1
- export declare class MLDomTokenList extends Array<string> implements DOMTokenList {
2
- #private;
3
- get value(): string;
4
- constructor(tokens: string);
5
- add(...tokens: string[]): void;
6
- contains(token: string): boolean;
7
- forEach(callbackfn: (value: string, index: number, parent: any) => void, thisArg?: any): void;
8
- item(index: number): string | null;
9
- remove(...tokens: string[]): void;
10
- replace(token: string, newToken: string): boolean;
11
- supports(token: string): boolean;
12
- toggle(token: string, force?: boolean): boolean;
13
- toString(): string;
14
- }
15
- export declare function toDOMTokenList(tokens: string): DOMTokenList;
@@ -1,61 +0,0 @@
1
- "use strict";
2
- var _MLDomTokenList_set;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.toDOMTokenList = exports.MLDomTokenList = void 0;
5
- const tslib_1 = require("tslib");
6
- const unexpected_call_error_1 = tslib_1.__importDefault(require("./unexpected-call-error"));
7
- class MLDomTokenList extends Array {
8
- constructor(tokens) {
9
- const list = tokens
10
- .split(/\s+/)
11
- .map(t => t.trim())
12
- .filter(t => !!t);
13
- super(...list);
14
- _MLDomTokenList_set.set(this, void 0);
15
- tslib_1.__classPrivateFieldSet(this, _MLDomTokenList_set, new Set(list), "f");
16
- }
17
- get value() {
18
- return this.join(' ');
19
- }
20
- add(...tokens) {
21
- for (const token of tokens) {
22
- if (tslib_1.__classPrivateFieldGet(this, _MLDomTokenList_set, "f").has(token)) {
23
- continue;
24
- }
25
- tslib_1.__classPrivateFieldGet(this, _MLDomTokenList_set, "f").add(token);
26
- this.push(token);
27
- }
28
- }
29
- contains(token) {
30
- return tslib_1.__classPrivateFieldGet(this, _MLDomTokenList_set, "f").has(token);
31
- }
32
- forEach(callbackfn, thisArg) {
33
- this.forEach.bind(this)((v, i) => callbackfn(v, i, thisArg !== null && thisArg !== void 0 ? thisArg : this));
34
- }
35
- item(index) {
36
- var _a;
37
- return (_a = this[index]) !== null && _a !== void 0 ? _a : null;
38
- }
39
- remove(...tokens) {
40
- throw new unexpected_call_error_1.default('Not supported "remove" method');
41
- }
42
- replace(token, newToken) {
43
- throw new unexpected_call_error_1.default('Not supported "replace" method');
44
- }
45
- supports(token) {
46
- throw new unexpected_call_error_1.default('Not supported "supports" method');
47
- }
48
- toggle(token, force) {
49
- throw new unexpected_call_error_1.default('Not supported "toggle" method');
50
- }
51
- toString() {
52
- return this.value;
53
- }
54
- }
55
- exports.MLDomTokenList = MLDomTokenList;
56
- _MLDomTokenList_set = new WeakMap();
57
- function toDOMTokenList(tokens) {
58
- const tokenList = new MLDomTokenList(tokens);
59
- return tokenList;
60
- }
61
- exports.toDOMTokenList = toDOMTokenList;