@symbo.ls/scratch 2.11.237 → 2.11.247
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/defaultConfig/index.js +0 -20
- package/dist/cjs/defaultConfig/media.js +0 -20
- package/dist/cjs/factory.js +25 -22
- package/dist/cjs/index.js +31 -26
- package/dist/cjs/set.js +31 -26
- package/dist/cjs/system/color.js +29 -26
- package/dist/cjs/system/document.js +29 -26
- package/dist/cjs/system/font.js +31 -26
- package/dist/cjs/system/index.js +31 -26
- package/dist/cjs/system/reset.js +29 -26
- package/dist/cjs/system/shadow.js +31 -26
- package/dist/cjs/system/spacing.js +31 -26
- package/dist/cjs/system/svg.js +29 -26
- package/dist/cjs/system/theme.js +29 -26
- package/dist/cjs/system/timing.js +29 -26
- package/dist/cjs/system/typography.js +29 -26
- package/dist/cjs/transforms/index.js +31 -26
- package/dist/cjs/utils/color.js +25 -2
- package/dist/cjs/utils/index.js +29 -26
- package/dist/cjs/utils/sequence.js +29 -26
- package/dist/cjs/utils/sprite.js +25 -22
- package/dist/cjs/utils/var.js +29 -26
- package/package.json +2 -2
- package/src/defaultConfig/media.js +0 -21
package/dist/cjs/system/svg.js
CHANGED
|
@@ -248,7 +248,7 @@ var require_types = __commonJS({
|
|
|
248
248
|
isFunction: () => isFunction,
|
|
249
249
|
isNot: () => isNot,
|
|
250
250
|
isNull: () => isNull,
|
|
251
|
-
isNumber: () =>
|
|
251
|
+
isNumber: () => isNumber3,
|
|
252
252
|
isObject: () => isObject4,
|
|
253
253
|
isObjectLike: () => isObjectLike2,
|
|
254
254
|
isString: () => isString5,
|
|
@@ -262,7 +262,7 @@ var require_types = __commonJS({
|
|
|
262
262
|
return typeof arg === "object" && arg.constructor === Object;
|
|
263
263
|
};
|
|
264
264
|
var isString5 = (arg) => typeof arg === "string";
|
|
265
|
-
var
|
|
265
|
+
var isNumber3 = (arg) => typeof arg === "number";
|
|
266
266
|
var isFunction = (arg) => typeof arg === "function";
|
|
267
267
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
268
268
|
var isNull = (arg) => arg === null;
|
|
@@ -274,7 +274,7 @@ var require_types = __commonJS({
|
|
|
274
274
|
return typeof arg === "object";
|
|
275
275
|
};
|
|
276
276
|
var isDefined2 = (arg) => {
|
|
277
|
-
return isObject4(arg) || isObjectLike2(arg) || isString5(arg) ||
|
|
277
|
+
return isObject4(arg) || isObjectLike2(arg) || isString5(arg) || isNumber3(arg) || isFunction(arg) || isArray4(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
278
278
|
};
|
|
279
279
|
var isUndefined = (arg) => {
|
|
280
280
|
return arg === void 0;
|
|
@@ -285,7 +285,7 @@ var require_types = __commonJS({
|
|
|
285
285
|
object: isObject4,
|
|
286
286
|
string: isString5,
|
|
287
287
|
date: isDate,
|
|
288
|
-
number:
|
|
288
|
+
number: isNumber3,
|
|
289
289
|
null: isNull,
|
|
290
290
|
function: isFunction,
|
|
291
291
|
objectLike: isObjectLike2,
|
|
@@ -443,7 +443,8 @@ var require_string = __commonJS({
|
|
|
443
443
|
var string_exports = {};
|
|
444
444
|
__export2(string_exports, {
|
|
445
445
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
446
|
-
stringIncludesAny: () => stringIncludesAny
|
|
446
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
447
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
447
448
|
});
|
|
448
449
|
module2.exports = __toCommonJS2(string_exports);
|
|
449
450
|
var stringIncludesAny = (str, characters) => {
|
|
@@ -454,6 +455,10 @@ var require_string = __commonJS({
|
|
|
454
455
|
}
|
|
455
456
|
return false;
|
|
456
457
|
};
|
|
458
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
459
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
460
|
+
return str.replace(pattern, "");
|
|
461
|
+
};
|
|
457
462
|
var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
|
|
458
463
|
var replaceLiteralsWithObjectFields = (str, state) => {
|
|
459
464
|
if (!str.includes("{{"))
|
|
@@ -505,6 +510,7 @@ var require_object = __commonJS({
|
|
|
505
510
|
clone: () => clone,
|
|
506
511
|
deepClone: () => deepClone2,
|
|
507
512
|
deepCloneExclude: () => deepCloneExclude,
|
|
513
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
508
514
|
deepContains: () => deepContains,
|
|
509
515
|
deepDestringify: () => deepDestringify,
|
|
510
516
|
deepDiff: () => deepDiff,
|
|
@@ -635,6 +641,23 @@ var require_object = __commonJS({
|
|
|
635
641
|
}
|
|
636
642
|
return o;
|
|
637
643
|
};
|
|
644
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
645
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
646
|
+
for (const prop in obj) {
|
|
647
|
+
if (prop === "__proto__")
|
|
648
|
+
continue;
|
|
649
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
650
|
+
continue;
|
|
651
|
+
const objProp = obj[prop];
|
|
652
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
653
|
+
continue;
|
|
654
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
655
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
656
|
+
} else
|
|
657
|
+
o[prop] = objProp;
|
|
658
|
+
}
|
|
659
|
+
return o;
|
|
660
|
+
};
|
|
638
661
|
var deepStringify = (obj, stringified = {}) => {
|
|
639
662
|
for (const prop in obj) {
|
|
640
663
|
const objProp = obj[prop];
|
|
@@ -665,7 +688,7 @@ var require_object = __commonJS({
|
|
|
665
688
|
const spaces = " ".repeat(indent);
|
|
666
689
|
let str = "{\n";
|
|
667
690
|
for (const [key, value] of Object.entries(obj)) {
|
|
668
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!"]);
|
|
691
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
669
692
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
670
693
|
str += `${spaces} ${stringedKey}: `;
|
|
671
694
|
if ((0, import_types.isArray)(value)) {
|
|
@@ -1466,26 +1489,6 @@ var FONT_FACE = {};
|
|
|
1466
1489
|
// src/defaultConfig/media.js
|
|
1467
1490
|
var MEDIA = {
|
|
1468
1491
|
tv: "(min-width: 2780px)",
|
|
1469
|
-
screenL: "(max-width: 1920px)",
|
|
1470
|
-
"screenL<": "(min-width: 1920px)",
|
|
1471
|
-
screenM: "(max-width: 1680px)",
|
|
1472
|
-
"screenM<": "(min-width: 1680px)",
|
|
1473
|
-
screenS: "(max-width: 1440px)",
|
|
1474
|
-
"screenS<": "(min-width: 1440px)",
|
|
1475
|
-
tabletL: "(max-width: 1366px)",
|
|
1476
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1477
|
-
tabletM: "(max-width: 1280px)",
|
|
1478
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1479
|
-
tabletS: "(max-width: 1024px)",
|
|
1480
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1481
|
-
mobileL: "(max-width: 768px)",
|
|
1482
|
-
"mobileL<": "(min-width: 768px)",
|
|
1483
|
-
mobileM: "(max-width: 560px)",
|
|
1484
|
-
"mobileM<": "(min-width: 560px)",
|
|
1485
|
-
mobileS: "(max-width: 480px)",
|
|
1486
|
-
"mobileS<": "(min-width: 480px)",
|
|
1487
|
-
mobileXS: "(max-width: 375px)",
|
|
1488
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1489
1492
|
light: "(prefers-color-scheme: light)",
|
|
1490
1493
|
dark: "(prefers-color-scheme: dark)",
|
|
1491
1494
|
print: "print"
|
package/dist/cjs/system/theme.js
CHANGED
|
@@ -212,7 +212,7 @@ var require_types = __commonJS({
|
|
|
212
212
|
isFunction: () => isFunction,
|
|
213
213
|
isNot: () => isNot,
|
|
214
214
|
isNull: () => isNull,
|
|
215
|
-
isNumber: () =>
|
|
215
|
+
isNumber: () => isNumber3,
|
|
216
216
|
isObject: () => isObject6,
|
|
217
217
|
isObjectLike: () => isObjectLike3,
|
|
218
218
|
isString: () => isString7,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString7 = (arg) => typeof arg === "string";
|
|
229
|
-
var
|
|
229
|
+
var isNumber3 = (arg) => typeof arg === "number";
|
|
230
230
|
var isFunction = (arg) => typeof arg === "function";
|
|
231
231
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
232
232
|
var isNull = (arg) => arg === null;
|
|
@@ -238,7 +238,7 @@ var require_types = __commonJS({
|
|
|
238
238
|
return typeof arg === "object";
|
|
239
239
|
};
|
|
240
240
|
var isDefined2 = (arg) => {
|
|
241
|
-
return isObject6(arg) || isObjectLike3(arg) || isString7(arg) ||
|
|
241
|
+
return isObject6(arg) || isObjectLike3(arg) || isString7(arg) || isNumber3(arg) || isFunction(arg) || isArray6(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
242
242
|
};
|
|
243
243
|
var isUndefined = (arg) => {
|
|
244
244
|
return arg === void 0;
|
|
@@ -249,7 +249,7 @@ var require_types = __commonJS({
|
|
|
249
249
|
object: isObject6,
|
|
250
250
|
string: isString7,
|
|
251
251
|
date: isDate,
|
|
252
|
-
number:
|
|
252
|
+
number: isNumber3,
|
|
253
253
|
null: isNull,
|
|
254
254
|
function: isFunction,
|
|
255
255
|
objectLike: isObjectLike3,
|
|
@@ -407,7 +407,8 @@ var require_string = __commonJS({
|
|
|
407
407
|
var string_exports = {};
|
|
408
408
|
__export2(string_exports, {
|
|
409
409
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
410
|
-
stringIncludesAny: () => stringIncludesAny
|
|
410
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
411
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
411
412
|
});
|
|
412
413
|
module2.exports = __toCommonJS2(string_exports);
|
|
413
414
|
var stringIncludesAny = (str, characters) => {
|
|
@@ -418,6 +419,10 @@ var require_string = __commonJS({
|
|
|
418
419
|
}
|
|
419
420
|
return false;
|
|
420
421
|
};
|
|
422
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
423
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
424
|
+
return str.replace(pattern, "");
|
|
425
|
+
};
|
|
421
426
|
var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
|
|
422
427
|
var replaceLiteralsWithObjectFields = (str, state) => {
|
|
423
428
|
if (!str.includes("{{"))
|
|
@@ -469,6 +474,7 @@ var require_object = __commonJS({
|
|
|
469
474
|
clone: () => clone,
|
|
470
475
|
deepClone: () => deepClone2,
|
|
471
476
|
deepCloneExclude: () => deepCloneExclude,
|
|
477
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
472
478
|
deepContains: () => deepContains,
|
|
473
479
|
deepDestringify: () => deepDestringify,
|
|
474
480
|
deepDiff: () => deepDiff,
|
|
@@ -599,6 +605,23 @@ var require_object = __commonJS({
|
|
|
599
605
|
}
|
|
600
606
|
return o;
|
|
601
607
|
};
|
|
608
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
609
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
610
|
+
for (const prop in obj) {
|
|
611
|
+
if (prop === "__proto__")
|
|
612
|
+
continue;
|
|
613
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
614
|
+
continue;
|
|
615
|
+
const objProp = obj[prop];
|
|
616
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
617
|
+
continue;
|
|
618
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
619
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
620
|
+
} else
|
|
621
|
+
o[prop] = objProp;
|
|
622
|
+
}
|
|
623
|
+
return o;
|
|
624
|
+
};
|
|
602
625
|
var deepStringify = (obj, stringified = {}) => {
|
|
603
626
|
for (const prop in obj) {
|
|
604
627
|
const objProp = obj[prop];
|
|
@@ -629,7 +652,7 @@ var require_object = __commonJS({
|
|
|
629
652
|
const spaces = " ".repeat(indent);
|
|
630
653
|
let str = "{\n";
|
|
631
654
|
for (const [key, value] of Object.entries(obj)) {
|
|
632
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!"]);
|
|
655
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
633
656
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
634
657
|
str += `${spaces} ${stringedKey}: `;
|
|
635
658
|
if ((0, import_types.isArray)(value)) {
|
|
@@ -1455,26 +1478,6 @@ var FONT_FACE = {};
|
|
|
1455
1478
|
// src/defaultConfig/media.js
|
|
1456
1479
|
var MEDIA = {
|
|
1457
1480
|
tv: "(min-width: 2780px)",
|
|
1458
|
-
screenL: "(max-width: 1920px)",
|
|
1459
|
-
"screenL<": "(min-width: 1920px)",
|
|
1460
|
-
screenM: "(max-width: 1680px)",
|
|
1461
|
-
"screenM<": "(min-width: 1680px)",
|
|
1462
|
-
screenS: "(max-width: 1440px)",
|
|
1463
|
-
"screenS<": "(min-width: 1440px)",
|
|
1464
|
-
tabletL: "(max-width: 1366px)",
|
|
1465
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1466
|
-
tabletM: "(max-width: 1280px)",
|
|
1467
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1468
|
-
tabletS: "(max-width: 1024px)",
|
|
1469
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1470
|
-
mobileL: "(max-width: 768px)",
|
|
1471
|
-
"mobileL<": "(min-width: 768px)",
|
|
1472
|
-
mobileM: "(max-width: 560px)",
|
|
1473
|
-
"mobileM<": "(min-width: 560px)",
|
|
1474
|
-
mobileS: "(max-width: 480px)",
|
|
1475
|
-
"mobileS<": "(min-width: 480px)",
|
|
1476
|
-
mobileXS: "(max-width: 375px)",
|
|
1477
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1478
1481
|
light: "(prefers-color-scheme: light)",
|
|
1479
1482
|
dark: "(prefers-color-scheme: dark)",
|
|
1480
1483
|
print: "print"
|
|
@@ -212,7 +212,7 @@ var require_types = __commonJS({
|
|
|
212
212
|
isFunction: () => isFunction,
|
|
213
213
|
isNot: () => isNot,
|
|
214
214
|
isNull: () => isNull,
|
|
215
|
-
isNumber: () =>
|
|
215
|
+
isNumber: () => isNumber3,
|
|
216
216
|
isObject: () => isObject4,
|
|
217
217
|
isObjectLike: () => isObjectLike2,
|
|
218
218
|
isString: () => isString5,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString5 = (arg) => typeof arg === "string";
|
|
229
|
-
var
|
|
229
|
+
var isNumber3 = (arg) => typeof arg === "number";
|
|
230
230
|
var isFunction = (arg) => typeof arg === "function";
|
|
231
231
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
232
232
|
var isNull = (arg) => arg === null;
|
|
@@ -238,7 +238,7 @@ var require_types = __commonJS({
|
|
|
238
238
|
return typeof arg === "object";
|
|
239
239
|
};
|
|
240
240
|
var isDefined2 = (arg) => {
|
|
241
|
-
return isObject4(arg) || isObjectLike2(arg) || isString5(arg) ||
|
|
241
|
+
return isObject4(arg) || isObjectLike2(arg) || isString5(arg) || isNumber3(arg) || isFunction(arg) || isArray4(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
242
242
|
};
|
|
243
243
|
var isUndefined = (arg) => {
|
|
244
244
|
return arg === void 0;
|
|
@@ -249,7 +249,7 @@ var require_types = __commonJS({
|
|
|
249
249
|
object: isObject4,
|
|
250
250
|
string: isString5,
|
|
251
251
|
date: isDate,
|
|
252
|
-
number:
|
|
252
|
+
number: isNumber3,
|
|
253
253
|
null: isNull,
|
|
254
254
|
function: isFunction,
|
|
255
255
|
objectLike: isObjectLike2,
|
|
@@ -407,7 +407,8 @@ var require_string = __commonJS({
|
|
|
407
407
|
var string_exports = {};
|
|
408
408
|
__export2(string_exports, {
|
|
409
409
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
410
|
-
stringIncludesAny: () => stringIncludesAny
|
|
410
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
411
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
411
412
|
});
|
|
412
413
|
module2.exports = __toCommonJS2(string_exports);
|
|
413
414
|
var stringIncludesAny = (str, characters) => {
|
|
@@ -418,6 +419,10 @@ var require_string = __commonJS({
|
|
|
418
419
|
}
|
|
419
420
|
return false;
|
|
420
421
|
};
|
|
422
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
423
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
424
|
+
return str.replace(pattern, "");
|
|
425
|
+
};
|
|
421
426
|
var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
|
|
422
427
|
var replaceLiteralsWithObjectFields = (str, state) => {
|
|
423
428
|
if (!str.includes("{{"))
|
|
@@ -469,6 +474,7 @@ var require_object = __commonJS({
|
|
|
469
474
|
clone: () => clone,
|
|
470
475
|
deepClone: () => deepClone2,
|
|
471
476
|
deepCloneExclude: () => deepCloneExclude,
|
|
477
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
472
478
|
deepContains: () => deepContains,
|
|
473
479
|
deepDestringify: () => deepDestringify,
|
|
474
480
|
deepDiff: () => deepDiff,
|
|
@@ -599,6 +605,23 @@ var require_object = __commonJS({
|
|
|
599
605
|
}
|
|
600
606
|
return o;
|
|
601
607
|
};
|
|
608
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
609
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
610
|
+
for (const prop in obj) {
|
|
611
|
+
if (prop === "__proto__")
|
|
612
|
+
continue;
|
|
613
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
614
|
+
continue;
|
|
615
|
+
const objProp = obj[prop];
|
|
616
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
617
|
+
continue;
|
|
618
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
619
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
620
|
+
} else
|
|
621
|
+
o[prop] = objProp;
|
|
622
|
+
}
|
|
623
|
+
return o;
|
|
624
|
+
};
|
|
602
625
|
var deepStringify = (obj, stringified = {}) => {
|
|
603
626
|
for (const prop in obj) {
|
|
604
627
|
const objProp = obj[prop];
|
|
@@ -629,7 +652,7 @@ var require_object = __commonJS({
|
|
|
629
652
|
const spaces = " ".repeat(indent);
|
|
630
653
|
let str = "{\n";
|
|
631
654
|
for (const [key, value] of Object.entries(obj)) {
|
|
632
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!"]);
|
|
655
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
633
656
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
634
657
|
str += `${spaces} ${stringedKey}: `;
|
|
635
658
|
if ((0, import_types.isArray)(value)) {
|
|
@@ -1465,26 +1488,6 @@ var FONT_FACE = {};
|
|
|
1465
1488
|
// src/defaultConfig/media.js
|
|
1466
1489
|
var MEDIA = {
|
|
1467
1490
|
tv: "(min-width: 2780px)",
|
|
1468
|
-
screenL: "(max-width: 1920px)",
|
|
1469
|
-
"screenL<": "(min-width: 1920px)",
|
|
1470
|
-
screenM: "(max-width: 1680px)",
|
|
1471
|
-
"screenM<": "(min-width: 1680px)",
|
|
1472
|
-
screenS: "(max-width: 1440px)",
|
|
1473
|
-
"screenS<": "(min-width: 1440px)",
|
|
1474
|
-
tabletL: "(max-width: 1366px)",
|
|
1475
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1476
|
-
tabletM: "(max-width: 1280px)",
|
|
1477
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1478
|
-
tabletS: "(max-width: 1024px)",
|
|
1479
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1480
|
-
mobileL: "(max-width: 768px)",
|
|
1481
|
-
"mobileL<": "(min-width: 768px)",
|
|
1482
|
-
mobileM: "(max-width: 560px)",
|
|
1483
|
-
"mobileM<": "(min-width: 560px)",
|
|
1484
|
-
mobileS: "(max-width: 480px)",
|
|
1485
|
-
"mobileS<": "(min-width: 480px)",
|
|
1486
|
-
mobileXS: "(max-width: 375px)",
|
|
1487
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1488
1491
|
light: "(prefers-color-scheme: light)",
|
|
1489
1492
|
dark: "(prefers-color-scheme: dark)",
|
|
1490
1493
|
print: "print"
|
|
@@ -212,7 +212,7 @@ var require_types = __commonJS({
|
|
|
212
212
|
isFunction: () => isFunction,
|
|
213
213
|
isNot: () => isNot,
|
|
214
214
|
isNull: () => isNull,
|
|
215
|
-
isNumber: () =>
|
|
215
|
+
isNumber: () => isNumber3,
|
|
216
216
|
isObject: () => isObject4,
|
|
217
217
|
isObjectLike: () => isObjectLike2,
|
|
218
218
|
isString: () => isString5,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString5 = (arg) => typeof arg === "string";
|
|
229
|
-
var
|
|
229
|
+
var isNumber3 = (arg) => typeof arg === "number";
|
|
230
230
|
var isFunction = (arg) => typeof arg === "function";
|
|
231
231
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
232
232
|
var isNull = (arg) => arg === null;
|
|
@@ -238,7 +238,7 @@ var require_types = __commonJS({
|
|
|
238
238
|
return typeof arg === "object";
|
|
239
239
|
};
|
|
240
240
|
var isDefined2 = (arg) => {
|
|
241
|
-
return isObject4(arg) || isObjectLike2(arg) || isString5(arg) ||
|
|
241
|
+
return isObject4(arg) || isObjectLike2(arg) || isString5(arg) || isNumber3(arg) || isFunction(arg) || isArray4(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
242
242
|
};
|
|
243
243
|
var isUndefined = (arg) => {
|
|
244
244
|
return arg === void 0;
|
|
@@ -249,7 +249,7 @@ var require_types = __commonJS({
|
|
|
249
249
|
object: isObject4,
|
|
250
250
|
string: isString5,
|
|
251
251
|
date: isDate,
|
|
252
|
-
number:
|
|
252
|
+
number: isNumber3,
|
|
253
253
|
null: isNull,
|
|
254
254
|
function: isFunction,
|
|
255
255
|
objectLike: isObjectLike2,
|
|
@@ -407,7 +407,8 @@ var require_string = __commonJS({
|
|
|
407
407
|
var string_exports = {};
|
|
408
408
|
__export2(string_exports, {
|
|
409
409
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
410
|
-
stringIncludesAny: () => stringIncludesAny
|
|
410
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
411
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
411
412
|
});
|
|
412
413
|
module2.exports = __toCommonJS2(string_exports);
|
|
413
414
|
var stringIncludesAny = (str, characters) => {
|
|
@@ -418,6 +419,10 @@ var require_string = __commonJS({
|
|
|
418
419
|
}
|
|
419
420
|
return false;
|
|
420
421
|
};
|
|
422
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
423
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
424
|
+
return str.replace(pattern, "");
|
|
425
|
+
};
|
|
421
426
|
var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
|
|
422
427
|
var replaceLiteralsWithObjectFields = (str, state) => {
|
|
423
428
|
if (!str.includes("{{"))
|
|
@@ -469,6 +474,7 @@ var require_object = __commonJS({
|
|
|
469
474
|
clone: () => clone,
|
|
470
475
|
deepClone: () => deepClone2,
|
|
471
476
|
deepCloneExclude: () => deepCloneExclude,
|
|
477
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
472
478
|
deepContains: () => deepContains,
|
|
473
479
|
deepDestringify: () => deepDestringify,
|
|
474
480
|
deepDiff: () => deepDiff,
|
|
@@ -599,6 +605,23 @@ var require_object = __commonJS({
|
|
|
599
605
|
}
|
|
600
606
|
return o;
|
|
601
607
|
};
|
|
608
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
609
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
610
|
+
for (const prop in obj) {
|
|
611
|
+
if (prop === "__proto__")
|
|
612
|
+
continue;
|
|
613
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
614
|
+
continue;
|
|
615
|
+
const objProp = obj[prop];
|
|
616
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
617
|
+
continue;
|
|
618
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
619
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
620
|
+
} else
|
|
621
|
+
o[prop] = objProp;
|
|
622
|
+
}
|
|
623
|
+
return o;
|
|
624
|
+
};
|
|
602
625
|
var deepStringify = (obj, stringified = {}) => {
|
|
603
626
|
for (const prop in obj) {
|
|
604
627
|
const objProp = obj[prop];
|
|
@@ -629,7 +652,7 @@ var require_object = __commonJS({
|
|
|
629
652
|
const spaces = " ".repeat(indent);
|
|
630
653
|
let str = "{\n";
|
|
631
654
|
for (const [key, value] of Object.entries(obj)) {
|
|
632
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!"]);
|
|
655
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
633
656
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
634
657
|
str += `${spaces} ${stringedKey}: `;
|
|
635
658
|
if ((0, import_types.isArray)(value)) {
|
|
@@ -1453,26 +1476,6 @@ var FONT_FACE = {};
|
|
|
1453
1476
|
// src/defaultConfig/media.js
|
|
1454
1477
|
var MEDIA = {
|
|
1455
1478
|
tv: "(min-width: 2780px)",
|
|
1456
|
-
screenL: "(max-width: 1920px)",
|
|
1457
|
-
"screenL<": "(min-width: 1920px)",
|
|
1458
|
-
screenM: "(max-width: 1680px)",
|
|
1459
|
-
"screenM<": "(min-width: 1680px)",
|
|
1460
|
-
screenS: "(max-width: 1440px)",
|
|
1461
|
-
"screenS<": "(min-width: 1440px)",
|
|
1462
|
-
tabletL: "(max-width: 1366px)",
|
|
1463
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1464
|
-
tabletM: "(max-width: 1280px)",
|
|
1465
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1466
|
-
tabletS: "(max-width: 1024px)",
|
|
1467
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1468
|
-
mobileL: "(max-width: 768px)",
|
|
1469
|
-
"mobileL<": "(min-width: 768px)",
|
|
1470
|
-
mobileM: "(max-width: 560px)",
|
|
1471
|
-
"mobileM<": "(min-width: 560px)",
|
|
1472
|
-
mobileS: "(max-width: 480px)",
|
|
1473
|
-
"mobileS<": "(min-width: 480px)",
|
|
1474
|
-
mobileXS: "(max-width: 375px)",
|
|
1475
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1476
1479
|
light: "(prefers-color-scheme: light)",
|
|
1477
1480
|
dark: "(prefers-color-scheme: dark)",
|
|
1478
1481
|
print: "print"
|
|
@@ -212,7 +212,7 @@ var require_types = __commonJS({
|
|
|
212
212
|
isFunction: () => isFunction,
|
|
213
213
|
isNot: () => isNot,
|
|
214
214
|
isNull: () => isNull,
|
|
215
|
-
isNumber: () =>
|
|
215
|
+
isNumber: () => isNumber3,
|
|
216
216
|
isObject: () => isObject8,
|
|
217
217
|
isObjectLike: () => isObjectLike3,
|
|
218
218
|
isString: () => isString10,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString10 = (arg) => typeof arg === "string";
|
|
229
|
-
var
|
|
229
|
+
var isNumber3 = (arg) => typeof arg === "number";
|
|
230
230
|
var isFunction = (arg) => typeof arg === "function";
|
|
231
231
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
232
232
|
var isNull = (arg) => arg === null;
|
|
@@ -238,7 +238,7 @@ var require_types = __commonJS({
|
|
|
238
238
|
return typeof arg === "object";
|
|
239
239
|
};
|
|
240
240
|
var isDefined2 = (arg) => {
|
|
241
|
-
return isObject8(arg) || isObjectLike3(arg) || isString10(arg) ||
|
|
241
|
+
return isObject8(arg) || isObjectLike3(arg) || isString10(arg) || isNumber3(arg) || isFunction(arg) || isArray8(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
242
242
|
};
|
|
243
243
|
var isUndefined = (arg) => {
|
|
244
244
|
return arg === void 0;
|
|
@@ -249,7 +249,7 @@ var require_types = __commonJS({
|
|
|
249
249
|
object: isObject8,
|
|
250
250
|
string: isString10,
|
|
251
251
|
date: isDate,
|
|
252
|
-
number:
|
|
252
|
+
number: isNumber3,
|
|
253
253
|
null: isNull,
|
|
254
254
|
function: isFunction,
|
|
255
255
|
objectLike: isObjectLike3,
|
|
@@ -407,7 +407,8 @@ var require_string = __commonJS({
|
|
|
407
407
|
var string_exports = {};
|
|
408
408
|
__export2(string_exports, {
|
|
409
409
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
410
|
-
stringIncludesAny: () => stringIncludesAny
|
|
410
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
411
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
411
412
|
});
|
|
412
413
|
module2.exports = __toCommonJS2(string_exports);
|
|
413
414
|
var stringIncludesAny = (str, characters) => {
|
|
@@ -418,6 +419,10 @@ var require_string = __commonJS({
|
|
|
418
419
|
}
|
|
419
420
|
return false;
|
|
420
421
|
};
|
|
422
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
423
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
424
|
+
return str.replace(pattern, "");
|
|
425
|
+
};
|
|
421
426
|
var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
|
|
422
427
|
var replaceLiteralsWithObjectFields = (str, state) => {
|
|
423
428
|
if (!str.includes("{{"))
|
|
@@ -469,6 +474,7 @@ var require_object = __commonJS({
|
|
|
469
474
|
clone: () => clone,
|
|
470
475
|
deepClone: () => deepClone2,
|
|
471
476
|
deepCloneExclude: () => deepCloneExclude,
|
|
477
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
472
478
|
deepContains: () => deepContains,
|
|
473
479
|
deepDestringify: () => deepDestringify,
|
|
474
480
|
deepDiff: () => deepDiff,
|
|
@@ -599,6 +605,23 @@ var require_object = __commonJS({
|
|
|
599
605
|
}
|
|
600
606
|
return o;
|
|
601
607
|
};
|
|
608
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
609
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
610
|
+
for (const prop in obj) {
|
|
611
|
+
if (prop === "__proto__")
|
|
612
|
+
continue;
|
|
613
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
614
|
+
continue;
|
|
615
|
+
const objProp = obj[prop];
|
|
616
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
617
|
+
continue;
|
|
618
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
619
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
620
|
+
} else
|
|
621
|
+
o[prop] = objProp;
|
|
622
|
+
}
|
|
623
|
+
return o;
|
|
624
|
+
};
|
|
602
625
|
var deepStringify = (obj, stringified = {}) => {
|
|
603
626
|
for (const prop in obj) {
|
|
604
627
|
const objProp = obj[prop];
|
|
@@ -629,7 +652,7 @@ var require_object = __commonJS({
|
|
|
629
652
|
const spaces = " ".repeat(indent);
|
|
630
653
|
let str = "{\n";
|
|
631
654
|
for (const [key, value] of Object.entries(obj)) {
|
|
632
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!"]);
|
|
655
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
633
656
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
634
657
|
str += `${spaces} ${stringedKey}: `;
|
|
635
658
|
if ((0, import_types.isArray)(value)) {
|
|
@@ -1458,26 +1481,6 @@ var FONT_FACE = {};
|
|
|
1458
1481
|
// src/defaultConfig/media.js
|
|
1459
1482
|
var MEDIA = {
|
|
1460
1483
|
tv: "(min-width: 2780px)",
|
|
1461
|
-
screenL: "(max-width: 1920px)",
|
|
1462
|
-
"screenL<": "(min-width: 1920px)",
|
|
1463
|
-
screenM: "(max-width: 1680px)",
|
|
1464
|
-
"screenM<": "(min-width: 1680px)",
|
|
1465
|
-
screenS: "(max-width: 1440px)",
|
|
1466
|
-
"screenS<": "(min-width: 1440px)",
|
|
1467
|
-
tabletL: "(max-width: 1366px)",
|
|
1468
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1469
|
-
tabletM: "(max-width: 1280px)",
|
|
1470
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1471
|
-
tabletS: "(max-width: 1024px)",
|
|
1472
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1473
|
-
mobileL: "(max-width: 768px)",
|
|
1474
|
-
"mobileL<": "(min-width: 768px)",
|
|
1475
|
-
mobileM: "(max-width: 560px)",
|
|
1476
|
-
"mobileM<": "(min-width: 560px)",
|
|
1477
|
-
mobileS: "(max-width: 480px)",
|
|
1478
|
-
"mobileS<": "(min-width: 480px)",
|
|
1479
|
-
mobileXS: "(max-width: 375px)",
|
|
1480
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1481
1484
|
light: "(prefers-color-scheme: light)",
|
|
1482
1485
|
dark: "(prefers-color-scheme: dark)",
|
|
1483
1486
|
print: "print"
|
|
@@ -1716,6 +1719,8 @@ var arrayzeValue = (val) => {
|
|
|
1716
1719
|
return val.split(" ");
|
|
1717
1720
|
if ((0, import_utils4.isObject)(val))
|
|
1718
1721
|
return Object.keys(val).map((v) => val[v]);
|
|
1722
|
+
if ((0, import_utils4.isNumber)(val))
|
|
1723
|
+
return [val];
|
|
1719
1724
|
if ((0, import_utils4.isArray)(val))
|
|
1720
1725
|
return val;
|
|
1721
1726
|
};
|
package/dist/cjs/utils/color.js
CHANGED
|
@@ -443,7 +443,8 @@ var require_string = __commonJS({
|
|
|
443
443
|
var string_exports = {};
|
|
444
444
|
__export2(string_exports, {
|
|
445
445
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
446
|
-
stringIncludesAny: () => stringIncludesAny
|
|
446
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
447
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
447
448
|
});
|
|
448
449
|
module2.exports = __toCommonJS2(string_exports);
|
|
449
450
|
var stringIncludesAny = (str, characters) => {
|
|
@@ -454,6 +455,10 @@ var require_string = __commonJS({
|
|
|
454
455
|
}
|
|
455
456
|
return false;
|
|
456
457
|
};
|
|
458
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
459
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
460
|
+
return str.replace(pattern, "");
|
|
461
|
+
};
|
|
457
462
|
var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
|
|
458
463
|
var replaceLiteralsWithObjectFields = (str, state) => {
|
|
459
464
|
if (!str.includes("{{"))
|
|
@@ -505,6 +510,7 @@ var require_object = __commonJS({
|
|
|
505
510
|
clone: () => clone,
|
|
506
511
|
deepClone: () => deepClone,
|
|
507
512
|
deepCloneExclude: () => deepCloneExclude,
|
|
513
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
508
514
|
deepContains: () => deepContains,
|
|
509
515
|
deepDestringify: () => deepDestringify,
|
|
510
516
|
deepDiff: () => deepDiff,
|
|
@@ -635,6 +641,23 @@ var require_object = __commonJS({
|
|
|
635
641
|
}
|
|
636
642
|
return o;
|
|
637
643
|
};
|
|
644
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
645
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
646
|
+
for (const prop in obj) {
|
|
647
|
+
if (prop === "__proto__")
|
|
648
|
+
continue;
|
|
649
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
650
|
+
continue;
|
|
651
|
+
const objProp = obj[prop];
|
|
652
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
653
|
+
continue;
|
|
654
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
655
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
656
|
+
} else
|
|
657
|
+
o[prop] = objProp;
|
|
658
|
+
}
|
|
659
|
+
return o;
|
|
660
|
+
};
|
|
638
661
|
var deepStringify = (obj, stringified = {}) => {
|
|
639
662
|
for (const prop in obj) {
|
|
640
663
|
const objProp = obj[prop];
|
|
@@ -665,7 +688,7 @@ var require_object = __commonJS({
|
|
|
665
688
|
const spaces = " ".repeat(indent);
|
|
666
689
|
let str = "{\n";
|
|
667
690
|
for (const [key, value] of Object.entries(obj)) {
|
|
668
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!"]);
|
|
691
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
669
692
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
670
693
|
str += `${spaces} ${stringedKey}: `;
|
|
671
694
|
if ((0, import_types.isArray)(value)) {
|