@design-edito/tools 0.1.36 → 0.1.37
Sign up to get free protection for your applications and to get access to all the features.
- package/agnostic/css/bem/index.js +2 -2
- package/agnostic/css/index.js +11 -11
- package/agnostic/errors/index.js +2 -2
- package/agnostic/html/hyper-json/cast/index.js +2 -2
- package/agnostic/html/hyper-json/index.js +3 -3
- package/agnostic/html/hyper-json/transformers/append/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/classList/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/join/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/length/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/print/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/push/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/querySelector/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/ref/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/replace/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/split/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toArray/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toBoolean/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toElement/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toNodeList/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toNull/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toNumber/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toRecord/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toRef/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toString/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toText/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toTransformer/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/transformSelected/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/trim/index.js +2 -2
- package/agnostic/html/hyper-json/tree/index.js +2 -2
- package/agnostic/html/hyper-json/utils/index.js +2 -2
- package/agnostic/html/index.js +18 -18
- package/agnostic/html/replace-in-element/index.d.ts +1 -1
- package/agnostic/html/replace-in-element/index.js +1 -1
- package/agnostic/html/sanitize/index.js +6 -6
- package/agnostic/html/selector-to-element/index.js +6 -6
- package/agnostic/html/string-to-nodes/index.js +7 -7
- package/agnostic/misc/crossenv/index.js +2 -2
- package/agnostic/misc/index.js +7 -7
- package/agnostic/misc/lorem-ipsum/index.js +5 -5
- package/agnostic/numbers/index.js +6 -6
- package/agnostic/objects/index.js +7 -7
- package/agnostic/random/index.js +2 -2
- package/agnostic/time/index.js +6 -6
- package/chunks/chunk-7YW5HL6N.js +168 -0
- package/chunks/chunk-BPOJYE4X.js +1108 -0
- package/chunks/chunk-R57V5HA7.js +211 -0
- package/chunks/chunk-TLTLM47Y.js +27 -0
- package/chunks/chunk-XWLQR4UY.js +25 -0
- package/node/files/index.js +3 -3
- package/package.json +1 -1
package/agnostic/misc/index.js
CHANGED
@@ -15,36 +15,36 @@ import {
|
|
15
15
|
} from "../../chunks/chunk-7AWTHZLY.js";
|
16
16
|
import {
|
17
17
|
LoremIpsum
|
18
|
-
} from "../../chunks/chunk-
|
18
|
+
} from "../../chunks/chunk-R57V5HA7.js";
|
19
19
|
import "../../chunks/chunk-4CIS3R7T.js";
|
20
20
|
import {
|
21
21
|
Cast
|
22
22
|
} from "../../chunks/chunk-SNJJII7A.js";
|
23
|
-
import "../../chunks/chunk-
|
23
|
+
import "../../chunks/chunk-RLAZR3NL.js";
|
24
24
|
import "../../chunks/chunk-6RGDWX4A.js";
|
25
25
|
import {
|
26
26
|
isConstructorFunction
|
27
27
|
} from "../../chunks/chunk-RCO57B6F.js";
|
28
28
|
import "../../chunks/chunk-FCU6IHKD.js";
|
29
|
-
import "../../chunks/chunk-RLAZR3NL.js";
|
30
29
|
import {
|
31
30
|
Crossenv
|
32
|
-
} from "../../chunks/chunk-
|
33
|
-
import "../../chunks/chunk-RLJOYG64.js";
|
31
|
+
} from "../../chunks/chunk-FR5H2OCV.js";
|
34
32
|
import "../../chunks/chunk-S2NMAH7K.js";
|
35
33
|
import "../../chunks/chunk-LV2VMOWR.js";
|
34
|
+
import "../../chunks/chunk-RLJOYG64.js";
|
36
35
|
import {
|
37
36
|
Random
|
38
|
-
} from "../../chunks/chunk-
|
37
|
+
} from "../../chunks/chunk-S32K7POB.js";
|
38
|
+
import "../../chunks/chunk-D3ERTRDW.js";
|
39
39
|
import "../../chunks/chunk-75BICI4L.js";
|
40
40
|
import "../../chunks/chunk-OGBUSUE6.js";
|
41
|
-
import "../../chunks/chunk-D3ERTRDW.js";
|
42
41
|
import "../../chunks/chunk-QXAJXTXV.js";
|
43
42
|
import {
|
44
43
|
isNotNullish,
|
45
44
|
isNullish,
|
46
45
|
nullishValues
|
47
46
|
} from "../../chunks/chunk-HC6ZOHCS.js";
|
47
|
+
import "../../chunks/chunk-YS6WMSWC.js";
|
48
48
|
|
49
49
|
// src/agnostic/misc/index.ts
|
50
50
|
var Misc;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import {
|
2
2
|
LoremIpsum
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
3
|
+
} from "../../../chunks/chunk-R57V5HA7.js";
|
4
|
+
import "../../../chunks/chunk-RLAZR3NL.js";
|
5
5
|
import "../../../chunks/chunk-6RGDWX4A.js";
|
6
6
|
import "../../../chunks/chunk-RCO57B6F.js";
|
7
7
|
import "../../../chunks/chunk-FCU6IHKD.js";
|
8
|
-
import "../../../chunks/chunk-
|
9
|
-
import "../../../chunks/chunk-
|
8
|
+
import "../../../chunks/chunk-S32K7POB.js";
|
9
|
+
import "../../../chunks/chunk-D3ERTRDW.js";
|
10
10
|
import "../../../chunks/chunk-75BICI4L.js";
|
11
11
|
import "../../../chunks/chunk-OGBUSUE6.js";
|
12
|
-
import "../../../chunks/chunk-
|
12
|
+
import "../../../chunks/chunk-YS6WMSWC.js";
|
13
13
|
export {
|
14
14
|
LoremIpsum
|
15
15
|
};
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import {
|
2
2
|
absoluteModulo
|
3
3
|
} from "../../chunks/chunk-DNIOWD7K.js";
|
4
|
-
import {
|
5
|
-
interpolate
|
6
|
-
} from "../../chunks/chunk-BJAYUP7M.js";
|
7
4
|
import {
|
8
5
|
createScale,
|
9
6
|
getHarmonic
|
10
7
|
} from "../../chunks/chunk-UYTXXUU7.js";
|
11
|
-
import {
|
12
|
-
round
|
13
|
-
} from "../../chunks/chunk-32IRF4OP.js";
|
14
8
|
import {
|
15
9
|
clamp
|
16
10
|
} from "../../chunks/chunk-OSAXBA7G.js";
|
11
|
+
import {
|
12
|
+
interpolate
|
13
|
+
} from "../../chunks/chunk-BJAYUP7M.js";
|
14
|
+
import {
|
15
|
+
round
|
16
|
+
} from "../../chunks/chunk-32IRF4OP.js";
|
17
17
|
|
18
18
|
// src/agnostic/numbers/index.ts
|
19
19
|
var Numbers;
|
@@ -1,26 +1,26 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../../chunks/chunk-
|
2
|
+
flattenGetters
|
3
|
+
} from "../../chunks/chunk-VFJYLXCI.js";
|
4
4
|
import {
|
5
5
|
isNonNullObject,
|
6
6
|
isObject
|
7
7
|
} from "../../chunks/chunk-HQLRJ7XW.js";
|
8
8
|
import {
|
9
|
-
|
10
|
-
} from "../../chunks/chunk-
|
9
|
+
isRecord
|
10
|
+
} from "../../chunks/chunk-YDIBNEGA.js";
|
11
11
|
import {
|
12
12
|
Validation
|
13
13
|
} from "../../chunks/chunk-FPEW3A27.js";
|
14
14
|
import {
|
15
15
|
recordMap
|
16
16
|
} from "../../chunks/chunk-XNF5MLCQ.js";
|
17
|
+
import {
|
18
|
+
recordFormat
|
19
|
+
} from "../../chunks/chunk-YP64J65L.js";
|
17
20
|
import {
|
18
21
|
Enums
|
19
22
|
} from "../../chunks/chunk-WOAYU6LB.js";
|
20
23
|
import "../../chunks/chunk-E6MSDKON.js";
|
21
|
-
import {
|
22
|
-
flattenGetters
|
23
|
-
} from "../../chunks/chunk-VFJYLXCI.js";
|
24
24
|
import "../../chunks/chunk-SNJJII7A.js";
|
25
25
|
import "../../chunks/chunk-QXAJXTXV.js";
|
26
26
|
import "../../chunks/chunk-HC6ZOHCS.js";
|
package/agnostic/random/index.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
Random
|
3
|
-
} from "../../chunks/chunk-
|
3
|
+
} from "../../chunks/chunk-S32K7POB.js";
|
4
|
+
import "../../chunks/chunk-D3ERTRDW.js";
|
4
5
|
import "../../chunks/chunk-75BICI4L.js";
|
5
6
|
import "../../chunks/chunk-OGBUSUE6.js";
|
6
|
-
import "../../chunks/chunk-D3ERTRDW.js";
|
7
7
|
export {
|
8
8
|
Random
|
9
9
|
};
|
package/agnostic/time/index.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
Transitions
|
3
|
-
} from "../../chunks/chunk-ENMBK6H7.js";
|
4
1
|
import {
|
5
2
|
Duration
|
6
3
|
} from "../../chunks/chunk-6NYUQXJT.js";
|
7
|
-
import {
|
8
|
-
wait
|
9
|
-
} from "../../chunks/chunk-4CIS3R7T.js";
|
10
4
|
import {
|
11
5
|
timeout
|
12
6
|
} from "../../chunks/chunk-Z7ZDDBV5.js";
|
7
|
+
import {
|
8
|
+
Transitions
|
9
|
+
} from "../../chunks/chunk-ENMBK6H7.js";
|
10
|
+
import {
|
11
|
+
wait
|
12
|
+
} from "../../chunks/chunk-4CIS3R7T.js";
|
13
13
|
|
14
14
|
// src/agnostic/time/index.ts
|
15
15
|
var Time;
|
@@ -0,0 +1,168 @@
|
|
1
|
+
import {
|
2
|
+
isFalsy
|
3
|
+
} from "./chunk-QXAJXTXV.js";
|
4
|
+
import {
|
5
|
+
isValidClassName
|
6
|
+
} from "./chunk-W5A2TON3.js";
|
7
|
+
|
8
|
+
// src/agnostic/css/bem/getNamesArr.ts
|
9
|
+
function getNamesArr(arg) {
|
10
|
+
const returned = [];
|
11
|
+
if (typeof arg === "string") {
|
12
|
+
arg.trim().split(/\s+/gm).forEach((name) => {
|
13
|
+
if (isValidClassName(name)) returned.push(name);
|
14
|
+
});
|
15
|
+
} else if (Array.isArray(arg)) {
|
16
|
+
arg.forEach((elt) => returned.push(...getNamesArr(elt)));
|
17
|
+
} else if (typeof arg === "object" && arg !== null) {
|
18
|
+
Object.entries(arg).forEach(([key, val]) => {
|
19
|
+
if (!isFalsy(val)) returned.push(...getNamesArr(key));
|
20
|
+
});
|
21
|
+
}
|
22
|
+
return returned;
|
23
|
+
}
|
24
|
+
var getNamesArr_default = getNamesArr;
|
25
|
+
|
26
|
+
// src/agnostic/css/bem/BEM.ts
|
27
|
+
var BEM = class _BEM {
|
28
|
+
constructor() {
|
29
|
+
this.findBlockByName = this.findBlockByName.bind(this);
|
30
|
+
this.addBlock = this.addBlock.bind(this);
|
31
|
+
this.addElement = this.addElement.bind(this);
|
32
|
+
this.addModifier = this.addModifier.bind(this);
|
33
|
+
this.copy = this.copy.bind(this);
|
34
|
+
this.block = this.block.bind(this);
|
35
|
+
this.element = this.element.bind(this);
|
36
|
+
this.modifier = this.modifier.bind(this);
|
37
|
+
this.blk = this.blk.bind(this);
|
38
|
+
this.elt = this.elt.bind(this);
|
39
|
+
this.mod = this.mod.bind(this);
|
40
|
+
this.cp = this.cp.bind(this);
|
41
|
+
this.addSingleBlock = this.addSingleBlock.bind(this);
|
42
|
+
this.addSingleElement = this.addSingleElement.bind(this);
|
43
|
+
this.addSingleModifier = this.addSingleModifier.bind(this);
|
44
|
+
this.setCurrentBlockByName = this.setCurrentBlockByName.bind(this);
|
45
|
+
this.createBlockByName = this.createBlockByName.bind(this);
|
46
|
+
this.getCurrentBlock = this.getCurrentBlock.bind(this);
|
47
|
+
}
|
48
|
+
addBlock(blockNameArg) {
|
49
|
+
const blocksNames = getNamesArr_default(blockNameArg);
|
50
|
+
blocksNames.forEach(this.addSingleBlock);
|
51
|
+
return this;
|
52
|
+
}
|
53
|
+
addElement(elementNameArg) {
|
54
|
+
const elementsNames = getNamesArr_default(elementNameArg);
|
55
|
+
elementsNames.forEach(this.addSingleElement);
|
56
|
+
return this;
|
57
|
+
}
|
58
|
+
addModifier(modifierNameArg) {
|
59
|
+
const currentBlock = this.getCurrentBlock();
|
60
|
+
if (currentBlock === void 0) return this;
|
61
|
+
const modifiersNames = getNamesArr_default(modifierNameArg);
|
62
|
+
modifiersNames.forEach(this.addSingleModifier);
|
63
|
+
return this;
|
64
|
+
}
|
65
|
+
copy() {
|
66
|
+
const copy = new _BEM();
|
67
|
+
this.blocks.forEach((block) => {
|
68
|
+
copy.addBlock(block.name);
|
69
|
+
block.modifiers.forEach(copy.addModifier);
|
70
|
+
});
|
71
|
+
return copy;
|
72
|
+
}
|
73
|
+
block(blockNameArg) {
|
74
|
+
return this.copy().addBlock(blockNameArg);
|
75
|
+
}
|
76
|
+
element(elementNameArg) {
|
77
|
+
return this.copy().addElement(elementNameArg);
|
78
|
+
}
|
79
|
+
modifier(modifierNameArg) {
|
80
|
+
return this.copy().addModifier(modifierNameArg);
|
81
|
+
}
|
82
|
+
blk(blockNameArg) {
|
83
|
+
return this.block(blockNameArg);
|
84
|
+
}
|
85
|
+
elt(elementNameArg) {
|
86
|
+
return this.element(elementNameArg);
|
87
|
+
}
|
88
|
+
mod(modifierNameArg) {
|
89
|
+
return this.modifier(modifierNameArg);
|
90
|
+
}
|
91
|
+
cp() {
|
92
|
+
return this.copy();
|
93
|
+
}
|
94
|
+
get value() {
|
95
|
+
return this.blocks.map((block) => {
|
96
|
+
return [block.name, ...block.modifiers.map((modifier) => {
|
97
|
+
return `${block.name}_${modifier}`;
|
98
|
+
})].join(" ");
|
99
|
+
}).join(" ");
|
100
|
+
}
|
101
|
+
get val() {
|
102
|
+
return this.value;
|
103
|
+
}
|
104
|
+
blocks = [];
|
105
|
+
findBlockByName(name) {
|
106
|
+
return this.blocks.find((block) => block.name === name);
|
107
|
+
}
|
108
|
+
addSingleBlock(blockName) {
|
109
|
+
if (this.findBlockByName(blockName) !== void 0) {
|
110
|
+
this.setCurrentBlockByName(blockName);
|
111
|
+
} else {
|
112
|
+
const block = this.createBlockByName(blockName);
|
113
|
+
this.blocks.push(block);
|
114
|
+
}
|
115
|
+
return this;
|
116
|
+
}
|
117
|
+
addSingleElement(elementName) {
|
118
|
+
const currentBlock = this.getCurrentBlock();
|
119
|
+
if (currentBlock === void 0) this.addBlock(elementName);
|
120
|
+
else {
|
121
|
+
currentBlock.name = currentBlock.name + "__" + elementName;
|
122
|
+
}
|
123
|
+
return this;
|
124
|
+
}
|
125
|
+
addSingleModifier(modifierName) {
|
126
|
+
const currentBlock = this.getCurrentBlock();
|
127
|
+
if (currentBlock !== void 0) {
|
128
|
+
currentBlock.modifiers.push(modifierName);
|
129
|
+
}
|
130
|
+
return this;
|
131
|
+
}
|
132
|
+
setCurrentBlockByName(blockName) {
|
133
|
+
const block = this.findBlockByName(blockName);
|
134
|
+
if (block !== void 0) {
|
135
|
+
const blockPos = this.blocks.indexOf(block);
|
136
|
+
this.blocks = [
|
137
|
+
...this.blocks.slice(0, blockPos),
|
138
|
+
...this.blocks.slice(blockPos + 1),
|
139
|
+
block
|
140
|
+
];
|
141
|
+
}
|
142
|
+
return this;
|
143
|
+
}
|
144
|
+
createBlockByName(blockName) {
|
145
|
+
return { name: blockName, modifiers: [] };
|
146
|
+
}
|
147
|
+
getCurrentBlock() {
|
148
|
+
return this.blocks.slice(-1)[0];
|
149
|
+
}
|
150
|
+
};
|
151
|
+
var BEM_default = BEM;
|
152
|
+
|
153
|
+
// src/agnostic/css/bem/index.ts
|
154
|
+
var Bem;
|
155
|
+
((Bem2) => {
|
156
|
+
Bem2.BEM = BEM_default;
|
157
|
+
function bem(blockNameArg) {
|
158
|
+
const bem2 = new BEM_default();
|
159
|
+
if (blockNameArg instanceof BEM_default) return blockNameArg.copy();
|
160
|
+
return bem2.addBlock(blockNameArg);
|
161
|
+
}
|
162
|
+
Bem2.bem = bem;
|
163
|
+
Bem2.getNamesArr = getNamesArr_default;
|
164
|
+
})(Bem || (Bem = {}));
|
165
|
+
|
166
|
+
export {
|
167
|
+
Bem
|
168
|
+
};
|