@design-edito/tools 0.1.35 → 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 +6 -6
- package/agnostic/html/hyper-json/cast/index.js +3 -2
- package/agnostic/html/hyper-json/index.js +4 -3
- package/agnostic/html/hyper-json/transformers/append/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/classList/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/join/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/length/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/print/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/push/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/querySelector/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/ref/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/replace/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/split/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toArray/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toBoolean/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toElement/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toNodeList/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toNull/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toNumber/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toRecord/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toRef/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toString/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toText/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/toTransformer/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/transformSelected/index.js +3 -2
- package/agnostic/html/hyper-json/transformers/trim/index.js +3 -2
- package/agnostic/html/hyper-json/tree/index.js +3 -2
- package/agnostic/html/hyper-json/utils/index.js +3 -2
- package/agnostic/html/index.js +12 -12
- package/agnostic/html/replace-in-element/index.d.ts +1 -1
- package/agnostic/html/replace-in-element/index.js +2 -1
- package/agnostic/misc/index.js +5 -5
- package/agnostic/misc/logs/index.js +2 -2
- package/agnostic/misc/lorem-ipsum/index.js +3 -3
- package/agnostic/numbers/index.js +6 -6
- package/agnostic/objects/index.d.ts +0 -2
- package/agnostic/objects/index.js +10 -14
- package/agnostic/strings/index.js +4 -4
- package/agnostic/time/index.js +3 -3
- package/chunks/chunk-2IV3O7FX.js +27 -0
- package/chunks/chunk-7YW5HL6N.js +168 -0
- package/chunks/chunk-BPOJYE4X.js +1108 -0
- package/chunks/chunk-CB52KVOZ.js +22 -0
- package/chunks/chunk-EVOTJ7SU.js +35 -0
- package/chunks/chunk-FONURDTX.js +211 -0
- package/chunks/chunk-HE6F5XJQ.js +20 -0
- package/chunks/chunk-NWFX6TEY.js +28 -0
- package/chunks/chunk-OVG5RGI3.js +29 -0
- package/chunks/chunk-R57V5HA7.js +211 -0
- package/chunks/chunk-TLTLM47Y.js +27 -0
- package/chunks/chunk-UFKH5WD2.js +21 -0
- package/chunks/chunk-W4OFHYWN.js +1108 -0
- package/chunks/chunk-WABWQCFE.js +127 -0
- package/chunks/chunk-XWLQR4UY.js +25 -0
- package/package.json +1 -1
@@ -1,30 +1,27 @@
|
|
1
|
-
import {
|
2
|
-
recordFormat
|
3
|
-
} from "../../chunks/chunk-YP64J65L.js";
|
4
1
|
import {
|
5
2
|
flattenGetters
|
6
3
|
} from "../../chunks/chunk-VFJYLXCI.js";
|
7
|
-
import
|
4
|
+
import {
|
5
|
+
isNonNullObject,
|
6
|
+
isObject
|
7
|
+
} from "../../chunks/chunk-HQLRJ7XW.js";
|
8
8
|
import {
|
9
9
|
isRecord
|
10
10
|
} from "../../chunks/chunk-YDIBNEGA.js";
|
11
|
-
import {
|
12
|
-
recordMap
|
13
|
-
} from "../../chunks/chunk-XNF5MLCQ.js";
|
14
11
|
import {
|
15
12
|
Validation
|
16
13
|
} from "../../chunks/chunk-FPEW3A27.js";
|
17
14
|
import {
|
18
|
-
|
19
|
-
} from "../../chunks/chunk-
|
15
|
+
recordMap
|
16
|
+
} from "../../chunks/chunk-XNF5MLCQ.js";
|
17
|
+
import {
|
18
|
+
recordFormat
|
19
|
+
} from "../../chunks/chunk-YP64J65L.js";
|
20
20
|
import {
|
21
21
|
Enums
|
22
22
|
} from "../../chunks/chunk-WOAYU6LB.js";
|
23
23
|
import "../../chunks/chunk-E6MSDKON.js";
|
24
|
-
import
|
25
|
-
isNonNullObject,
|
26
|
-
isObject
|
27
|
-
} from "../../chunks/chunk-HQLRJ7XW.js";
|
24
|
+
import "../../chunks/chunk-SNJJII7A.js";
|
28
25
|
import "../../chunks/chunk-QXAJXTXV.js";
|
29
26
|
import "../../chunks/chunk-HC6ZOHCS.js";
|
30
27
|
|
@@ -36,7 +33,6 @@ var Objects;
|
|
36
33
|
Objects2.isObject = isObject;
|
37
34
|
Objects2.isNonNullObject = isNonNullObject;
|
38
35
|
Objects2.isRecord = isRecord;
|
39
|
-
Objects2.recordFilter = recordFilter;
|
40
36
|
Objects2.recordFormat = recordFormat;
|
41
37
|
Objects2.recordMap = recordMap;
|
42
38
|
Objects2.Validation = Validation;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../../chunks/chunk-
|
2
|
+
replaceAll
|
3
|
+
} from "../../chunks/chunk-MF56TTC5.js";
|
4
4
|
import {
|
5
5
|
CharCodes
|
6
6
|
} from "../../chunks/chunk-34U4HX4V.js";
|
@@ -13,8 +13,8 @@ import {
|
|
13
13
|
normalizeIndent
|
14
14
|
} from "../../chunks/chunk-JQXNEJAP.js";
|
15
15
|
import {
|
16
|
-
|
17
|
-
} from "../../chunks/chunk-
|
16
|
+
toAlphanum
|
17
|
+
} from "../../chunks/chunk-COVPTTAD.js";
|
18
18
|
|
19
19
|
// src/agnostic/strings/index.ts
|
20
20
|
var Strings;
|
package/agnostic/time/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import {
|
2
2
|
Duration
|
3
3
|
} from "../../chunks/chunk-6NYUQXJT.js";
|
4
|
-
import {
|
5
|
-
Transitions
|
6
|
-
} from "../../chunks/chunk-ENMBK6H7.js";
|
7
4
|
import {
|
8
5
|
timeout
|
9
6
|
} from "../../chunks/chunk-Z7ZDDBV5.js";
|
7
|
+
import {
|
8
|
+
Transitions
|
9
|
+
} from "../../chunks/chunk-ENMBK6H7.js";
|
10
10
|
import {
|
11
11
|
wait
|
12
12
|
} from "../../chunks/chunk-4CIS3R7T.js";
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import {
|
2
|
+
Cast,
|
3
|
+
Transformers,
|
4
|
+
Tree,
|
5
|
+
Utils
|
6
|
+
} from "./chunk-W4OFHYWN.js";
|
7
|
+
import {
|
8
|
+
Serialize
|
9
|
+
} from "./chunk-ZCPGE7H7.js";
|
10
|
+
import {
|
11
|
+
Types
|
12
|
+
} from "./chunk-5GI5G45R.js";
|
13
|
+
|
14
|
+
// src/agnostic/html/hyper-json/index.ts
|
15
|
+
var HyperJson;
|
16
|
+
((HyperJson2) => {
|
17
|
+
HyperJson2.Cast = Cast;
|
18
|
+
HyperJson2.Serialize = Serialize;
|
19
|
+
HyperJson2.Transformers = Transformers;
|
20
|
+
HyperJson2.Tree = Tree;
|
21
|
+
HyperJson2.Types = Types;
|
22
|
+
HyperJson2.Utils = Utils;
|
23
|
+
})(HyperJson || (HyperJson = {}));
|
24
|
+
|
25
|
+
export {
|
26
|
+
HyperJson
|
27
|
+
};
|
@@ -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
|
+
};
|