@symbo.ls/scratch 2.11.256 → 2.11.265
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.
- package/dist/cjs/factory.js +27 -27
- package/dist/cjs/index.js +86 -51
- package/dist/cjs/set.js +47 -45
- package/dist/cjs/system/color.js +27 -27
- package/dist/cjs/system/document.js +27 -27
- package/dist/cjs/system/font.js +27 -27
- package/dist/cjs/system/index.js +47 -45
- package/dist/cjs/system/reset.js +42 -40
- package/dist/cjs/system/shadow.js +32 -32
- package/dist/cjs/system/spacing.js +32 -32
- package/dist/cjs/system/svg.js +27 -27
- package/dist/cjs/system/theme.js +42 -40
- package/dist/cjs/system/timing.js +29 -29
- package/dist/cjs/system/typography.js +29 -29
- package/dist/cjs/transforms/index.js +143 -38
- package/dist/cjs/utils/color.js +27 -27
- package/dist/cjs/utils/index.js +29 -29
- package/dist/cjs/utils/sequence.js +29 -29
- package/dist/cjs/utils/sprite.js +27 -27
- package/dist/cjs/utils/var.js +27 -27
- package/package.json +2 -2
- package/src/system/spacing.js +4 -4
- package/src/system/theme.js +17 -11
- package/src/transforms/index.js +38 -2
- package/src/utils/sequence.js +2 -1
package/dist/cjs/factory.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// ../../node_modules/@domql/utils/dist/cjs/key.js
|
|
34
34
|
var require_key = __commonJS({
|
|
35
|
-
"
|
|
35
|
+
"../../node_modules/@domql/utils/dist/cjs/key.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var __defProp2 = Object.defineProperty;
|
|
38
38
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -57,7 +57,7 @@ var require_key = __commonJS({
|
|
|
57
57
|
generateKey: () => generateKey
|
|
58
58
|
});
|
|
59
59
|
module2.exports = __toCommonJS2(key_exports);
|
|
60
|
-
var generateKey = function() {
|
|
60
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
61
61
|
let index = 0;
|
|
62
62
|
function newId() {
|
|
63
63
|
index++;
|
|
@@ -69,9 +69,9 @@ var require_key = __commonJS({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
//
|
|
72
|
+
// ../../node_modules/@domql/utils/dist/cjs/env.js
|
|
73
73
|
var require_env = __commonJS({
|
|
74
|
-
"
|
|
74
|
+
"../../node_modules/@domql/utils/dist/cjs/env.js"(exports, module2) {
|
|
75
75
|
"use strict";
|
|
76
76
|
var __defProp2 = Object.defineProperty;
|
|
77
77
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -107,9 +107,9 @@ var require_env = __commonJS({
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// ../../node_modules/@domql/utils/dist/cjs/globals.js
|
|
111
111
|
var require_globals = __commonJS({
|
|
112
|
-
"
|
|
112
|
+
"../../node_modules/@domql/utils/dist/cjs/globals.js"(exports, module2) {
|
|
113
113
|
"use strict";
|
|
114
114
|
var __defProp2 = Object.defineProperty;
|
|
115
115
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -143,9 +143,9 @@ var require_globals = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// ../../node_modules/@domql/utils/dist/cjs/node.js
|
|
147
147
|
var require_node = __commonJS({
|
|
148
|
-
"
|
|
148
|
+
"../../node_modules/@domql/utils/dist/cjs/node.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
150
|
var __defProp2 = Object.defineProperty;
|
|
151
151
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -180,9 +180,9 @@ var require_node = __commonJS({
|
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
-
//
|
|
183
|
+
// ../../node_modules/@domql/utils/dist/cjs/types.js
|
|
184
184
|
var require_types = __commonJS({
|
|
185
|
-
"
|
|
185
|
+
"../../node_modules/@domql/utils/dist/cjs/types.js"(exports, module2) {
|
|
186
186
|
"use strict";
|
|
187
187
|
var __defProp2 = Object.defineProperty;
|
|
188
188
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -270,9 +270,9 @@ var require_types = __commonJS({
|
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
|
|
273
|
-
//
|
|
273
|
+
// ../../node_modules/@domql/utils/dist/cjs/array.js
|
|
274
274
|
var require_array = __commonJS({
|
|
275
|
-
"
|
|
275
|
+
"../../node_modules/@domql/utils/dist/cjs/array.js"(exports, module2) {
|
|
276
276
|
"use strict";
|
|
277
277
|
var __defProp2 = Object.defineProperty;
|
|
278
278
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -383,9 +383,9 @@ var require_array = __commonJS({
|
|
|
383
383
|
}
|
|
384
384
|
});
|
|
385
385
|
|
|
386
|
-
//
|
|
386
|
+
// ../../node_modules/@domql/utils/dist/cjs/string.js
|
|
387
387
|
var require_string = __commonJS({
|
|
388
|
-
"
|
|
388
|
+
"../../node_modules/@domql/utils/dist/cjs/string.js"(exports, module2) {
|
|
389
389
|
"use strict";
|
|
390
390
|
var __defProp2 = Object.defineProperty;
|
|
391
391
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -448,9 +448,9 @@ var require_string = __commonJS({
|
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
450
|
|
|
451
|
-
//
|
|
451
|
+
// ../../node_modules/@domql/utils/dist/cjs/object.js
|
|
452
452
|
var require_object = __commonJS({
|
|
453
|
-
"
|
|
453
|
+
"../../node_modules/@domql/utils/dist/cjs/object.js"(exports, module2) {
|
|
454
454
|
"use strict";
|
|
455
455
|
var __defProp2 = Object.defineProperty;
|
|
456
456
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -958,9 +958,9 @@ var require_object = __commonJS({
|
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
|
|
961
|
-
//
|
|
961
|
+
// ../../node_modules/@domql/utils/dist/cjs/function.js
|
|
962
962
|
var require_function = __commonJS({
|
|
963
|
-
"
|
|
963
|
+
"../../node_modules/@domql/utils/dist/cjs/function.js"(exports, module2) {
|
|
964
964
|
"use strict";
|
|
965
965
|
var __defProp2 = Object.defineProperty;
|
|
966
966
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1033,9 +1033,9 @@ var require_function = __commonJS({
|
|
|
1033
1033
|
}
|
|
1034
1034
|
});
|
|
1035
1035
|
|
|
1036
|
-
//
|
|
1036
|
+
// ../../node_modules/@domql/utils/dist/cjs/log.js
|
|
1037
1037
|
var require_log = __commonJS({
|
|
1038
|
-
"
|
|
1038
|
+
"../../node_modules/@domql/utils/dist/cjs/log.js"(exports, module2) {
|
|
1039
1039
|
"use strict";
|
|
1040
1040
|
var __defProp2 = Object.defineProperty;
|
|
1041
1041
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1074,9 +1074,9 @@ var require_log = __commonJS({
|
|
|
1074
1074
|
}
|
|
1075
1075
|
});
|
|
1076
1076
|
|
|
1077
|
-
//
|
|
1077
|
+
// ../../node_modules/@domql/utils/dist/cjs/cookie.js
|
|
1078
1078
|
var require_cookie = __commonJS({
|
|
1079
|
-
"
|
|
1079
|
+
"../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1080
1080
|
"use strict";
|
|
1081
1081
|
var __defProp2 = Object.defineProperty;
|
|
1082
1082
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1130,9 +1130,9 @@ var require_cookie = __commonJS({
|
|
|
1130
1130
|
}
|
|
1131
1131
|
});
|
|
1132
1132
|
|
|
1133
|
-
//
|
|
1133
|
+
// ../../node_modules/@domql/utils/dist/cjs/tags.js
|
|
1134
1134
|
var require_tags = __commonJS({
|
|
1135
|
-
"
|
|
1135
|
+
"../../node_modules/@domql/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1136
1136
|
"use strict";
|
|
1137
1137
|
var __defProp2 = Object.defineProperty;
|
|
1138
1138
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1295,9 +1295,9 @@ var require_tags = __commonJS({
|
|
|
1295
1295
|
}
|
|
1296
1296
|
});
|
|
1297
1297
|
|
|
1298
|
-
//
|
|
1298
|
+
// ../../node_modules/@domql/utils/dist/cjs/index.js
|
|
1299
1299
|
var require_cjs = __commonJS({
|
|
1300
|
-
"
|
|
1300
|
+
"../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
|
|
1301
1301
|
"use strict";
|
|
1302
1302
|
var __defProp2 = Object.defineProperty;
|
|
1303
1303
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
package/dist/cjs/index.js
CHANGED
|
@@ -66,9 +66,9 @@ var require_cjs = __commonJS({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// ../../node_modules/@domql/utils/dist/cjs/key.js
|
|
70
70
|
var require_key = __commonJS({
|
|
71
|
-
"
|
|
71
|
+
"../../node_modules/@domql/utils/dist/cjs/key.js"(exports, module2) {
|
|
72
72
|
"use strict";
|
|
73
73
|
var __defProp2 = Object.defineProperty;
|
|
74
74
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -93,7 +93,7 @@ var require_key = __commonJS({
|
|
|
93
93
|
generateKey: () => generateKey
|
|
94
94
|
});
|
|
95
95
|
module2.exports = __toCommonJS2(key_exports);
|
|
96
|
-
var generateKey = function() {
|
|
96
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
97
97
|
let index = 0;
|
|
98
98
|
function newId() {
|
|
99
99
|
index++;
|
|
@@ -105,9 +105,9 @@ var require_key = __commonJS({
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
//
|
|
108
|
+
// ../../node_modules/@domql/utils/dist/cjs/env.js
|
|
109
109
|
var require_env = __commonJS({
|
|
110
|
-
"
|
|
110
|
+
"../../node_modules/@domql/utils/dist/cjs/env.js"(exports, module2) {
|
|
111
111
|
"use strict";
|
|
112
112
|
var __defProp2 = Object.defineProperty;
|
|
113
113
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -143,9 +143,9 @@ var require_env = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// ../../node_modules/@domql/utils/dist/cjs/globals.js
|
|
147
147
|
var require_globals = __commonJS({
|
|
148
|
-
"
|
|
148
|
+
"../../node_modules/@domql/utils/dist/cjs/globals.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
150
|
var __defProp2 = Object.defineProperty;
|
|
151
151
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -179,9 +179,9 @@ var require_globals = __commonJS({
|
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
-
//
|
|
182
|
+
// ../../node_modules/@domql/utils/dist/cjs/node.js
|
|
183
183
|
var require_node = __commonJS({
|
|
184
|
-
"
|
|
184
|
+
"../../node_modules/@domql/utils/dist/cjs/node.js"(exports, module2) {
|
|
185
185
|
"use strict";
|
|
186
186
|
var __defProp2 = Object.defineProperty;
|
|
187
187
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -216,9 +216,9 @@ var require_node = __commonJS({
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
//
|
|
219
|
+
// ../../node_modules/@domql/utils/dist/cjs/types.js
|
|
220
220
|
var require_types = __commonJS({
|
|
221
|
-
"
|
|
221
|
+
"../../node_modules/@domql/utils/dist/cjs/types.js"(exports, module2) {
|
|
222
222
|
"use strict";
|
|
223
223
|
var __defProp2 = Object.defineProperty;
|
|
224
224
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -247,12 +247,12 @@ var require_types = __commonJS({
|
|
|
247
247
|
isDefined: () => isDefined2,
|
|
248
248
|
isFunction: () => isFunction2,
|
|
249
249
|
isNot: () => isNot,
|
|
250
|
-
isNull: () =>
|
|
250
|
+
isNull: () => isNull2,
|
|
251
251
|
isNumber: () => isNumber3,
|
|
252
252
|
isObject: () => isObject8,
|
|
253
253
|
isObjectLike: () => isObjectLike3,
|
|
254
254
|
isString: () => isString10,
|
|
255
|
-
isUndefined: () =>
|
|
255
|
+
isUndefined: () => isUndefined2
|
|
256
256
|
});
|
|
257
257
|
module2.exports = __toCommonJS2(types_exports);
|
|
258
258
|
var import_node = require_node();
|
|
@@ -265,7 +265,7 @@ var require_types = __commonJS({
|
|
|
265
265
|
var isNumber3 = (arg) => typeof arg === "number";
|
|
266
266
|
var isFunction2 = (arg) => typeof arg === "function";
|
|
267
267
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
268
|
-
var
|
|
268
|
+
var isNull2 = (arg) => arg === null;
|
|
269
269
|
var isArray9 = (arg) => Array.isArray(arg);
|
|
270
270
|
var isDate = (d) => d instanceof Date;
|
|
271
271
|
var isObjectLike3 = (arg) => {
|
|
@@ -274,9 +274,9 @@ var require_types = __commonJS({
|
|
|
274
274
|
return typeof arg === "object";
|
|
275
275
|
};
|
|
276
276
|
var isDefined2 = (arg) => {
|
|
277
|
-
return isObject8(arg) || isObjectLike3(arg) || isString10(arg) || isNumber3(arg) || isFunction2(arg) || isArray9(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) ||
|
|
277
|
+
return isObject8(arg) || isObjectLike3(arg) || isString10(arg) || isNumber3(arg) || isFunction2(arg) || isArray9(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull2(arg);
|
|
278
278
|
};
|
|
279
|
-
var
|
|
279
|
+
var isUndefined2 = (arg) => {
|
|
280
280
|
return arg === void 0;
|
|
281
281
|
};
|
|
282
282
|
var TYPES = {
|
|
@@ -286,7 +286,7 @@ var require_types = __commonJS({
|
|
|
286
286
|
string: isString10,
|
|
287
287
|
date: isDate,
|
|
288
288
|
number: isNumber3,
|
|
289
|
-
null:
|
|
289
|
+
null: isNull2,
|
|
290
290
|
function: isFunction2,
|
|
291
291
|
objectLike: isObjectLike3,
|
|
292
292
|
node: import_node.isNode,
|
|
@@ -306,9 +306,9 @@ var require_types = __commonJS({
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
//
|
|
309
|
+
// ../../node_modules/@domql/utils/dist/cjs/array.js
|
|
310
310
|
var require_array = __commonJS({
|
|
311
|
-
"
|
|
311
|
+
"../../node_modules/@domql/utils/dist/cjs/array.js"(exports, module2) {
|
|
312
312
|
"use strict";
|
|
313
313
|
var __defProp2 = Object.defineProperty;
|
|
314
314
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -419,9 +419,9 @@ var require_array = __commonJS({
|
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
421
|
|
|
422
|
-
//
|
|
422
|
+
// ../../node_modules/@domql/utils/dist/cjs/string.js
|
|
423
423
|
var require_string = __commonJS({
|
|
424
|
-
"
|
|
424
|
+
"../../node_modules/@domql/utils/dist/cjs/string.js"(exports, module2) {
|
|
425
425
|
"use strict";
|
|
426
426
|
var __defProp2 = Object.defineProperty;
|
|
427
427
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -484,9 +484,9 @@ var require_string = __commonJS({
|
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
|
|
487
|
-
//
|
|
487
|
+
// ../../node_modules/@domql/utils/dist/cjs/object.js
|
|
488
488
|
var require_object = __commonJS({
|
|
489
|
-
"
|
|
489
|
+
"../../node_modules/@domql/utils/dist/cjs/object.js"(exports, module2) {
|
|
490
490
|
"use strict";
|
|
491
491
|
var __defProp2 = Object.defineProperty;
|
|
492
492
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -994,9 +994,9 @@ var require_object = __commonJS({
|
|
|
994
994
|
}
|
|
995
995
|
});
|
|
996
996
|
|
|
997
|
-
//
|
|
997
|
+
// ../../node_modules/@domql/utils/dist/cjs/function.js
|
|
998
998
|
var require_function = __commonJS({
|
|
999
|
-
"
|
|
999
|
+
"../../node_modules/@domql/utils/dist/cjs/function.js"(exports, module2) {
|
|
1000
1000
|
"use strict";
|
|
1001
1001
|
var __defProp2 = Object.defineProperty;
|
|
1002
1002
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1069,9 +1069,9 @@ var require_function = __commonJS({
|
|
|
1069
1069
|
}
|
|
1070
1070
|
});
|
|
1071
1071
|
|
|
1072
|
-
//
|
|
1072
|
+
// ../../node_modules/@domql/utils/dist/cjs/log.js
|
|
1073
1073
|
var require_log = __commonJS({
|
|
1074
|
-
"
|
|
1074
|
+
"../../node_modules/@domql/utils/dist/cjs/log.js"(exports, module2) {
|
|
1075
1075
|
"use strict";
|
|
1076
1076
|
var __defProp2 = Object.defineProperty;
|
|
1077
1077
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1110,9 +1110,9 @@ var require_log = __commonJS({
|
|
|
1110
1110
|
}
|
|
1111
1111
|
});
|
|
1112
1112
|
|
|
1113
|
-
//
|
|
1113
|
+
// ../../node_modules/@domql/utils/dist/cjs/cookie.js
|
|
1114
1114
|
var require_cookie = __commonJS({
|
|
1115
|
-
"
|
|
1115
|
+
"../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1116
1116
|
"use strict";
|
|
1117
1117
|
var __defProp2 = Object.defineProperty;
|
|
1118
1118
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1166,9 +1166,9 @@ var require_cookie = __commonJS({
|
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
1168
1168
|
|
|
1169
|
-
//
|
|
1169
|
+
// ../../node_modules/@domql/utils/dist/cjs/tags.js
|
|
1170
1170
|
var require_tags = __commonJS({
|
|
1171
|
-
"
|
|
1171
|
+
"../../node_modules/@domql/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1172
1172
|
"use strict";
|
|
1173
1173
|
var __defProp2 = Object.defineProperty;
|
|
1174
1174
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1331,9 +1331,9 @@ var require_tags = __commonJS({
|
|
|
1331
1331
|
}
|
|
1332
1332
|
});
|
|
1333
1333
|
|
|
1334
|
-
//
|
|
1334
|
+
// ../../node_modules/@domql/utils/dist/cjs/index.js
|
|
1335
1335
|
var require_cjs2 = __commonJS({
|
|
1336
|
-
"
|
|
1336
|
+
"../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
|
|
1337
1337
|
"use strict";
|
|
1338
1338
|
var __defProp2 = Object.defineProperty;
|
|
1339
1339
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1410,6 +1410,7 @@ __export(src_exports, {
|
|
|
1410
1410
|
applyTimingSequence: () => applyTimingSequence,
|
|
1411
1411
|
applyTypographySequence: () => applyTypographySequence,
|
|
1412
1412
|
changeLightness: () => changeLightness,
|
|
1413
|
+
checkIfBoxSize: () => checkIfBoxSize,
|
|
1413
1414
|
colorStringToRgbaArray: () => colorStringToRgbaArray,
|
|
1414
1415
|
convertSvgToSymbol: () => convertSvgToSymbol,
|
|
1415
1416
|
findHeadingLetter: () => findHeadingLetter,
|
|
@@ -1483,6 +1484,8 @@ __export(src_exports, {
|
|
|
1483
1484
|
transformBoxShadow: () => transformBoxShadow,
|
|
1484
1485
|
transformDuration: () => transformDuration,
|
|
1485
1486
|
transformShadow: () => transformShadow,
|
|
1487
|
+
transformSize: () => transformSize,
|
|
1488
|
+
transformSizeRatio: () => transformSizeRatio,
|
|
1486
1489
|
transformTextStroke: () => transformTextStroke,
|
|
1487
1490
|
transformTransition: () => transformTransition,
|
|
1488
1491
|
transfromGap: () => transfromGap
|
|
@@ -2141,7 +2144,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
2141
2144
|
const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
|
|
2142
2145
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
2143
2146
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
2144
|
-
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || !startsWithDashOrLetter)
|
|
2147
|
+
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
|
|
2145
2148
|
return value;
|
|
2146
2149
|
const letterVal = value.toUpperCase();
|
|
2147
2150
|
const isNegative = letterVal.slice(0, 1) === "-" ? "-" : "";
|
|
@@ -2185,7 +2188,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
2185
2188
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
2186
2189
|
if (typeof value !== "string") {
|
|
2187
2190
|
console.warn(propertyName, value, "is not a string");
|
|
2188
|
-
return {};
|
|
2191
|
+
return { [propertyName]: value };
|
|
2189
2192
|
}
|
|
2190
2193
|
if (value === "-" || value === "")
|
|
2191
2194
|
return {};
|
|
@@ -2708,22 +2711,24 @@ var findModifier = (val, modifier) => {
|
|
|
2708
2711
|
else
|
|
2709
2712
|
return val;
|
|
2710
2713
|
};
|
|
2711
|
-
var getMediaTheme = (
|
|
2712
|
-
const
|
|
2713
|
-
if ((0, import_utils11.isString)(
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2714
|
+
var getMediaTheme = (value, modifier) => {
|
|
2715
|
+
const activeConfig = getActiveConfig();
|
|
2716
|
+
if ((0, import_utils11.isString)(value) && value.slice(0, 2) === "--") {
|
|
2717
|
+
value = getMediaTheme(value.slice(2));
|
|
2718
|
+
}
|
|
2719
|
+
if (!value || !(0, import_utils11.isString)(value)) {
|
|
2720
|
+
if (activeConfig.verbose) {
|
|
2721
|
+
console.warn(`${value} - Theme is not a string`);
|
|
2722
|
+
}
|
|
2718
2723
|
return;
|
|
2719
2724
|
}
|
|
2720
|
-
const [
|
|
2721
|
-
let
|
|
2722
|
-
if (
|
|
2723
|
-
|
|
2725
|
+
const [themeName, ...themeModifiers] = (0, import_utils11.isArray)(value) ? value : value.split(" ");
|
|
2726
|
+
let themeValue = activeConfig.THEME[themeName];
|
|
2727
|
+
if (themeValue && (themeModifiers || modifier)) {
|
|
2728
|
+
themeValue = findModifier(themeValue, themeModifiers.length ? themeModifiers : modifier);
|
|
2724
2729
|
}
|
|
2725
|
-
const
|
|
2726
|
-
return
|
|
2730
|
+
const resolvedTheme = recursiveTheme(themeValue);
|
|
2731
|
+
return resolvedTheme;
|
|
2727
2732
|
};
|
|
2728
2733
|
|
|
2729
2734
|
// src/system/font.js
|
|
@@ -2889,12 +2894,12 @@ var getSequence = (sequenceProps) => {
|
|
|
2889
2894
|
};
|
|
2890
2895
|
var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
|
|
2891
2896
|
const sequence = getSequence(sequenceProps);
|
|
2897
|
+
if ((0, import_utils18.isString)(value) && (value.includes("calc") || value.includes("var"))) {
|
|
2898
|
+
return { [propertyName]: value };
|
|
2899
|
+
}
|
|
2892
2900
|
const stack = arrayzeValue(value);
|
|
2893
2901
|
if (!(0, import_utils18.isArray)(stack))
|
|
2894
2902
|
return;
|
|
2895
|
-
if ((0, import_utils18.isString)(value) && value.includes("calc")) {
|
|
2896
|
-
return { [propertyName]: value };
|
|
2897
|
-
}
|
|
2898
2903
|
if (stack.length > 1) {
|
|
2899
2904
|
let suffix = "";
|
|
2900
2905
|
if (propertyName === "borderWidth") {
|
|
@@ -3310,6 +3315,36 @@ var splitTransition = (transition) => {
|
|
|
3310
3315
|
return;
|
|
3311
3316
|
return arr.map(transformTransition).join(",");
|
|
3312
3317
|
};
|
|
3318
|
+
var checkIfBoxSize = (propertyName) => {
|
|
3319
|
+
const prop = propertyName.toLowerCase();
|
|
3320
|
+
return (prop.includes("width") || prop.includes("height")) && !prop.includes("border");
|
|
3321
|
+
};
|
|
3322
|
+
var transformSize = (propertyName, val, props = {}, opts = {}) => {
|
|
3323
|
+
let value = val || props[propertyName];
|
|
3324
|
+
if ((0, import_utils27.isUndefined)(value) && (0, import_utils27.isNull)(value))
|
|
3325
|
+
return;
|
|
3326
|
+
const shouldScaleBoxSize = props.scaleBoxSize;
|
|
3327
|
+
const isBoxSize = checkIfBoxSize(propertyName);
|
|
3328
|
+
if (!shouldScaleBoxSize && isBoxSize && (0, import_utils27.isString)(value)) {
|
|
3329
|
+
value = value.split(" ").map((v) => {
|
|
3330
|
+
const isSingleLetter = v.length < 3 && /[A-Z]/.test(v);
|
|
3331
|
+
const hasUnits = ["%", "vw", "vh", "ch"].some((unit) => value.includes(unit));
|
|
3332
|
+
if (isSingleLetter && !hasUnits)
|
|
3333
|
+
return v + "_default";
|
|
3334
|
+
return v;
|
|
3335
|
+
}).join(" ");
|
|
3336
|
+
}
|
|
3337
|
+
if (opts.ratio) {
|
|
3338
|
+
return getSpacingBasedOnRatio(props, propertyName, value);
|
|
3339
|
+
} else {
|
|
3340
|
+
return getSpacingByKey(value, propertyName);
|
|
3341
|
+
}
|
|
3342
|
+
};
|
|
3343
|
+
var transformSizeRatio = (propertyName, props) => {
|
|
3344
|
+
return transformSize(propertyName, null, props, {
|
|
3345
|
+
ratio: true
|
|
3346
|
+
});
|
|
3347
|
+
};
|
|
3313
3348
|
|
|
3314
3349
|
// src/set.js
|
|
3315
3350
|
var import_utils28 = __toESM(require_cjs2(), 1);
|