@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/font.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: () => isObject5,
|
|
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 isObject5(arg) || isObjectLike2(arg) || isString5(arg) ||
|
|
241
|
+
return isObject5(arg) || isObjectLike2(arg) || isString5(arg) || isNumber3(arg) || isFunction(arg) || isArray5(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: isObject5,
|
|
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)) {
|
|
@@ -1365,6 +1388,8 @@ var arrayzeValue = (val) => {
|
|
|
1365
1388
|
return val.split(" ");
|
|
1366
1389
|
if ((0, import_utils2.isObject)(val))
|
|
1367
1390
|
return Object.keys(val).map((v) => val[v]);
|
|
1391
|
+
if ((0, import_utils2.isNumber)(val))
|
|
1392
|
+
return [val];
|
|
1368
1393
|
if ((0, import_utils2.isArray)(val))
|
|
1369
1394
|
return val;
|
|
1370
1395
|
};
|
|
@@ -1468,26 +1493,6 @@ var FONT_FACE = {};
|
|
|
1468
1493
|
// src/defaultConfig/media.js
|
|
1469
1494
|
var MEDIA = {
|
|
1470
1495
|
tv: "(min-width: 2780px)",
|
|
1471
|
-
screenL: "(max-width: 1920px)",
|
|
1472
|
-
"screenL<": "(min-width: 1920px)",
|
|
1473
|
-
screenM: "(max-width: 1680px)",
|
|
1474
|
-
"screenM<": "(min-width: 1680px)",
|
|
1475
|
-
screenS: "(max-width: 1440px)",
|
|
1476
|
-
"screenS<": "(min-width: 1440px)",
|
|
1477
|
-
tabletL: "(max-width: 1366px)",
|
|
1478
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1479
|
-
tabletM: "(max-width: 1280px)",
|
|
1480
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1481
|
-
tabletS: "(max-width: 1024px)",
|
|
1482
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1483
|
-
mobileL: "(max-width: 768px)",
|
|
1484
|
-
"mobileL<": "(min-width: 768px)",
|
|
1485
|
-
mobileM: "(max-width: 560px)",
|
|
1486
|
-
"mobileM<": "(min-width: 560px)",
|
|
1487
|
-
mobileS: "(max-width: 480px)",
|
|
1488
|
-
"mobileS<": "(min-width: 480px)",
|
|
1489
|
-
mobileXS: "(max-width: 375px)",
|
|
1490
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1491
1496
|
light: "(prefers-color-scheme: light)",
|
|
1492
1497
|
dark: "(prefers-color-scheme: dark)",
|
|
1493
1498
|
print: "print"
|
package/dist/cjs/system/index.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: () => isObject8,
|
|
217
217
|
isObjectLike: () => isObjectLike3,
|
|
218
218
|
isString: () => isString9,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString9 = (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) || isString9(arg) ||
|
|
241
|
+
return isObject8(arg) || isObjectLike3(arg) || isString9(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: isString9,
|
|
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)) {
|
|
@@ -1480,26 +1503,6 @@ var FONT_FACE = {};
|
|
|
1480
1503
|
// src/defaultConfig/media.js
|
|
1481
1504
|
var MEDIA = {
|
|
1482
1505
|
tv: "(min-width: 2780px)",
|
|
1483
|
-
screenL: "(max-width: 1920px)",
|
|
1484
|
-
"screenL<": "(min-width: 1920px)",
|
|
1485
|
-
screenM: "(max-width: 1680px)",
|
|
1486
|
-
"screenM<": "(min-width: 1680px)",
|
|
1487
|
-
screenS: "(max-width: 1440px)",
|
|
1488
|
-
"screenS<": "(min-width: 1440px)",
|
|
1489
|
-
tabletL: "(max-width: 1366px)",
|
|
1490
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1491
|
-
tabletM: "(max-width: 1280px)",
|
|
1492
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1493
|
-
tabletS: "(max-width: 1024px)",
|
|
1494
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1495
|
-
mobileL: "(max-width: 768px)",
|
|
1496
|
-
"mobileL<": "(min-width: 768px)",
|
|
1497
|
-
mobileM: "(max-width: 560px)",
|
|
1498
|
-
"mobileM<": "(min-width: 560px)",
|
|
1499
|
-
mobileS: "(max-width: 480px)",
|
|
1500
|
-
"mobileS<": "(min-width: 480px)",
|
|
1501
|
-
mobileXS: "(max-width: 375px)",
|
|
1502
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1503
1506
|
light: "(prefers-color-scheme: light)",
|
|
1504
1507
|
dark: "(prefers-color-scheme: dark)",
|
|
1505
1508
|
print: "print"
|
|
@@ -1761,6 +1764,8 @@ var arrayzeValue = (val) => {
|
|
|
1761
1764
|
return val.split(" ");
|
|
1762
1765
|
if ((0, import_utils4.isObject)(val))
|
|
1763
1766
|
return Object.keys(val).map((v) => val[v]);
|
|
1767
|
+
if ((0, import_utils4.isNumber)(val))
|
|
1768
|
+
return [val];
|
|
1764
1769
|
if ((0, import_utils4.isArray)(val))
|
|
1765
1770
|
return val;
|
|
1766
1771
|
};
|
package/dist/cjs/system/reset.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)) {
|
|
@@ -1450,26 +1473,6 @@ var FONT_FACE = {};
|
|
|
1450
1473
|
// src/defaultConfig/media.js
|
|
1451
1474
|
var MEDIA = {
|
|
1452
1475
|
tv: "(min-width: 2780px)",
|
|
1453
|
-
screenL: "(max-width: 1920px)",
|
|
1454
|
-
"screenL<": "(min-width: 1920px)",
|
|
1455
|
-
screenM: "(max-width: 1680px)",
|
|
1456
|
-
"screenM<": "(min-width: 1680px)",
|
|
1457
|
-
screenS: "(max-width: 1440px)",
|
|
1458
|
-
"screenS<": "(min-width: 1440px)",
|
|
1459
|
-
tabletL: "(max-width: 1366px)",
|
|
1460
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1461
|
-
tabletM: "(max-width: 1280px)",
|
|
1462
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1463
|
-
tabletS: "(max-width: 1024px)",
|
|
1464
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1465
|
-
mobileL: "(max-width: 768px)",
|
|
1466
|
-
"mobileL<": "(min-width: 768px)",
|
|
1467
|
-
mobileM: "(max-width: 560px)",
|
|
1468
|
-
"mobileM<": "(min-width: 560px)",
|
|
1469
|
-
mobileS: "(max-width: 480px)",
|
|
1470
|
-
"mobileS<": "(min-width: 480px)",
|
|
1471
|
-
mobileXS: "(max-width: 375px)",
|
|
1472
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1473
1476
|
light: "(prefers-color-scheme: light)",
|
|
1474
1477
|
dark: "(prefers-color-scheme: dark)",
|
|
1475
1478
|
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: () => isObject6,
|
|
217
217
|
isObjectLike: () => isObjectLike2,
|
|
218
218
|
isString: () => isString8,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString8 = (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) || isObjectLike2(arg) || isString8(arg) ||
|
|
241
|
+
return isObject6(arg) || isObjectLike2(arg) || isString8(arg) || isNumber3(arg) || isFunction(arg) || isArray6(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: isObject6,
|
|
250
250
|
string: isString8,
|
|
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)) {
|
|
@@ -1450,26 +1473,6 @@ var FONT_FACE = {};
|
|
|
1450
1473
|
// src/defaultConfig/media.js
|
|
1451
1474
|
var MEDIA = {
|
|
1452
1475
|
tv: "(min-width: 2780px)",
|
|
1453
|
-
screenL: "(max-width: 1920px)",
|
|
1454
|
-
"screenL<": "(min-width: 1920px)",
|
|
1455
|
-
screenM: "(max-width: 1680px)",
|
|
1456
|
-
"screenM<": "(min-width: 1680px)",
|
|
1457
|
-
screenS: "(max-width: 1440px)",
|
|
1458
|
-
"screenS<": "(min-width: 1440px)",
|
|
1459
|
-
tabletL: "(max-width: 1366px)",
|
|
1460
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1461
|
-
tabletM: "(max-width: 1280px)",
|
|
1462
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1463
|
-
tabletS: "(max-width: 1024px)",
|
|
1464
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1465
|
-
mobileL: "(max-width: 768px)",
|
|
1466
|
-
"mobileL<": "(min-width: 768px)",
|
|
1467
|
-
mobileM: "(max-width: 560px)",
|
|
1468
|
-
"mobileM<": "(min-width: 560px)",
|
|
1469
|
-
mobileS: "(max-width: 480px)",
|
|
1470
|
-
"mobileS<": "(min-width: 480px)",
|
|
1471
|
-
mobileXS: "(max-width: 375px)",
|
|
1472
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1473
1476
|
light: "(prefers-color-scheme: light)",
|
|
1474
1477
|
dark: "(prefers-color-scheme: dark)",
|
|
1475
1478
|
print: "print"
|
|
@@ -1703,6 +1706,8 @@ var arrayzeValue = (val) => {
|
|
|
1703
1706
|
return val.split(" ");
|
|
1704
1707
|
if ((0, import_utils4.isObject)(val))
|
|
1705
1708
|
return Object.keys(val).map((v) => val[v]);
|
|
1709
|
+
if ((0, import_utils4.isNumber)(val))
|
|
1710
|
+
return [val];
|
|
1706
1711
|
if ((0, import_utils4.isArray)(val))
|
|
1707
1712
|
return val;
|
|
1708
1713
|
};
|
|
@@ -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: () => isString6,
|
|
@@ -226,7 +226,7 @@ var require_types = __commonJS({
|
|
|
226
226
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
227
|
};
|
|
228
228
|
var isString6 = (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) || isString6(arg) ||
|
|
241
|
+
return isObject4(arg) || isObjectLike2(arg) || isString6(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: isString6,
|
|
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)) {
|
|
@@ -1365,6 +1388,8 @@ var arrayzeValue = (val) => {
|
|
|
1365
1388
|
return val.split(" ");
|
|
1366
1389
|
if ((0, import_utils2.isObject)(val))
|
|
1367
1390
|
return Object.keys(val).map((v) => val[v]);
|
|
1391
|
+
if ((0, import_utils2.isNumber)(val))
|
|
1392
|
+
return [val];
|
|
1368
1393
|
if ((0, import_utils2.isArray)(val))
|
|
1369
1394
|
return val;
|
|
1370
1395
|
};
|
|
@@ -1471,26 +1496,6 @@ var FONT_FACE = {};
|
|
|
1471
1496
|
// src/defaultConfig/media.js
|
|
1472
1497
|
var MEDIA = {
|
|
1473
1498
|
tv: "(min-width: 2780px)",
|
|
1474
|
-
screenL: "(max-width: 1920px)",
|
|
1475
|
-
"screenL<": "(min-width: 1920px)",
|
|
1476
|
-
screenM: "(max-width: 1680px)",
|
|
1477
|
-
"screenM<": "(min-width: 1680px)",
|
|
1478
|
-
screenS: "(max-width: 1440px)",
|
|
1479
|
-
"screenS<": "(min-width: 1440px)",
|
|
1480
|
-
tabletL: "(max-width: 1366px)",
|
|
1481
|
-
"tabletL<": "(min-width: 1366px)",
|
|
1482
|
-
tabletM: "(max-width: 1280px)",
|
|
1483
|
-
"tabletM<": "(min-width: 1280px)",
|
|
1484
|
-
tabletS: "(max-width: 1024px)",
|
|
1485
|
-
"tabletS<": "(min-width: 1024px)",
|
|
1486
|
-
mobileL: "(max-width: 768px)",
|
|
1487
|
-
"mobileL<": "(min-width: 768px)",
|
|
1488
|
-
mobileM: "(max-width: 560px)",
|
|
1489
|
-
"mobileM<": "(min-width: 560px)",
|
|
1490
|
-
mobileS: "(max-width: 480px)",
|
|
1491
|
-
"mobileS<": "(min-width: 480px)",
|
|
1492
|
-
mobileXS: "(max-width: 375px)",
|
|
1493
|
-
"mobileXS<": "(min-width: 375px)",
|
|
1494
1499
|
light: "(prefers-color-scheme: light)",
|
|
1495
1500
|
dark: "(prefers-color-scheme: dark)",
|
|
1496
1501
|
print: "print"
|