@symbo.ls/scratch 2.27.0 → 2.27.8
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 +4 -8
- package/dist/cjs/index.js +165 -334
- package/dist/cjs/set.js +116 -236
- package/dist/cjs/system/color.js +44 -85
- package/dist/cjs/system/document.js +16 -29
- package/dist/cjs/system/font.js +20 -37
- package/dist/cjs/system/index.js +116 -239
- package/dist/cjs/system/reset.js +23 -43
- package/dist/cjs/system/shadow.js +59 -115
- package/dist/cjs/system/spacing.js +31 -59
- package/dist/cjs/system/svg.js +21 -39
- package/dist/cjs/system/theme.js +57 -111
- package/dist/cjs/system/timing.js +24 -45
- package/dist/cjs/system/typography.js +33 -73
- package/dist/cjs/transforms/index.js +82 -161
- package/dist/cjs/utils/color.js +13 -26
- package/dist/cjs/utils/font.js +3 -6
- package/dist/cjs/utils/index.js +50 -97
- package/dist/cjs/utils/sequence.js +24 -45
- package/dist/cjs/utils/sprite.js +5 -10
- package/dist/cjs/utils/theme.js +3 -6
- package/dist/cjs/utils/var.js +18 -33
- package/package.json +7 -7
- package/src/system/typography.js +12 -20
package/dist/cjs/index.js
CHANGED
|
@@ -51,8 +51,8 @@ var require_cjs = __commonJS({
|
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
53
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp3({}, "__esModule", { value: true }), mod);
|
|
54
|
-
var
|
|
55
|
-
__export2(
|
|
54
|
+
var index_exports2 = {};
|
|
55
|
+
__export2(index_exports2, {
|
|
56
56
|
arrayzeValue: () => arrayzeValue3,
|
|
57
57
|
copyJavaScriptToClipboard: () => copyJavaScriptToClipboard,
|
|
58
58
|
copyStringToClipboard: () => copyStringToClipboard,
|
|
@@ -73,12 +73,11 @@ var require_cjs = __commonJS({
|
|
|
73
73
|
toTitleCase: () => toTitleCase,
|
|
74
74
|
toggleFullscreen: () => toggleFullscreen
|
|
75
75
|
});
|
|
76
|
-
module2.exports = __toCommonJS2(
|
|
76
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
77
77
|
var window22 = globalThis;
|
|
78
78
|
var document22 = window22.document;
|
|
79
79
|
var isObject2 = (arg) => {
|
|
80
|
-
if (arg === null)
|
|
81
|
-
return false;
|
|
80
|
+
if (arg === null) return false;
|
|
82
81
|
return typeof arg === "object" && arg.constructor === Object;
|
|
83
82
|
};
|
|
84
83
|
var isString2 = (arg) => typeof arg === "string";
|
|
@@ -103,13 +102,11 @@ var require_cjs = __commonJS({
|
|
|
103
102
|
};
|
|
104
103
|
var findClosestNumberInFactory = (val, factory) => {
|
|
105
104
|
val = parseFloat(val);
|
|
106
|
-
if (isObject2(factory))
|
|
107
|
-
factory = Object.values(factory);
|
|
105
|
+
if (isObject2(factory)) factory = Object.values(factory);
|
|
108
106
|
return findClosestNumber(val, factory);
|
|
109
107
|
};
|
|
110
108
|
var formatDate = (timestamp) => {
|
|
111
|
-
if (!timestamp)
|
|
112
|
-
return "";
|
|
109
|
+
if (!timestamp) return "";
|
|
113
110
|
const d = new Date(timestamp);
|
|
114
111
|
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
115
112
|
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
@@ -176,8 +173,7 @@ var require_cjs = __commonJS({
|
|
|
176
173
|
scriptEle.type = type;
|
|
177
174
|
scriptEle.text = xhr.responseText;
|
|
178
175
|
doc.body.appendChild(scriptEle);
|
|
179
|
-
if (typeof fallback === "function")
|
|
180
|
-
fallback();
|
|
176
|
+
if (typeof fallback === "function") fallback();
|
|
181
177
|
} else {
|
|
182
178
|
throw new Error(`Failed to load the script ${FILE_URL}`);
|
|
183
179
|
}
|
|
@@ -245,27 +241,22 @@ var require_cjs = __commonJS({
|
|
|
245
241
|
);
|
|
246
242
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
247
243
|
var toDescriptionCase = (str = "") => {
|
|
248
|
-
if (typeof str !== "string")
|
|
249
|
-
return;
|
|
244
|
+
if (typeof str !== "string") return;
|
|
250
245
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
251
246
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
252
247
|
};
|
|
253
248
|
var arrayzeValue3 = (val) => {
|
|
254
|
-
if (isArray2(val))
|
|
255
|
-
|
|
256
|
-
if (
|
|
257
|
-
|
|
258
|
-
if (isObject2(val))
|
|
259
|
-
return Object.values(val);
|
|
260
|
-
if (isNumber2(val))
|
|
261
|
-
return [val];
|
|
249
|
+
if (isArray2(val)) return val;
|
|
250
|
+
if (isString2(val)) return val.split(" ");
|
|
251
|
+
if (isObject2(val)) return Object.values(val);
|
|
252
|
+
if (isNumber2(val)) return [val];
|
|
262
253
|
};
|
|
263
254
|
}
|
|
264
255
|
});
|
|
265
256
|
|
|
266
257
|
// src/index.js
|
|
267
|
-
var
|
|
268
|
-
__export(
|
|
258
|
+
var index_exports = {};
|
|
259
|
+
__export(index_exports, {
|
|
269
260
|
ANIMATION: () => ANIMATION,
|
|
270
261
|
BREAKPOINTS: () => BREAKPOINTS,
|
|
271
262
|
CASES: () => CASES,
|
|
@@ -391,7 +382,7 @@ __export(src_exports, {
|
|
|
391
382
|
transformTransition: () => transformTransition,
|
|
392
383
|
transfromGap: () => transfromGap
|
|
393
384
|
});
|
|
394
|
-
module.exports = __toCommonJS(
|
|
385
|
+
module.exports = __toCommonJS(index_exports);
|
|
395
386
|
|
|
396
387
|
// src/utils/index.js
|
|
397
388
|
var utils_exports = {};
|
|
@@ -458,8 +449,7 @@ var isDOMNode = (obj) => {
|
|
|
458
449
|
|
|
459
450
|
// ../../../domql/packages/utils/dist/esm/types.js
|
|
460
451
|
var isObject = (arg) => {
|
|
461
|
-
if (arg === null)
|
|
462
|
-
return false;
|
|
452
|
+
if (arg === null) return false;
|
|
463
453
|
return typeof arg === "object" && arg.constructor === Object;
|
|
464
454
|
};
|
|
465
455
|
var isString = (arg) => typeof arg === "string";
|
|
@@ -470,8 +460,7 @@ var isNull = (arg) => arg === null;
|
|
|
470
460
|
var isArray = (arg) => Array.isArray(arg);
|
|
471
461
|
var isDate = (d) => d instanceof Date;
|
|
472
462
|
var isObjectLike = (arg) => {
|
|
473
|
-
if (arg === null)
|
|
474
|
-
return false;
|
|
463
|
+
if (arg === null) return false;
|
|
475
464
|
return typeof arg === "object";
|
|
476
465
|
};
|
|
477
466
|
var isDefined = (arg) => {
|
|
@@ -555,8 +544,7 @@ var deepClone = (obj, options = {}) => {
|
|
|
555
544
|
const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
|
|
556
545
|
visited.set(obj, clone2);
|
|
557
546
|
for (const key in obj) {
|
|
558
|
-
if (!Object.prototype.hasOwnProperty.call(obj, key))
|
|
559
|
-
continue;
|
|
547
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
560
548
|
if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
|
|
561
549
|
continue;
|
|
562
550
|
const value = obj[key];
|
|
@@ -590,14 +578,11 @@ var overwriteDeep = (obj, params, opts = {}, visited = /* @__PURE__ */ new WeakM
|
|
|
590
578
|
if (!isObjectLike(obj) || !isObjectLike(params) || isDOMNode(obj) || isDOMNode(params)) {
|
|
591
579
|
return params;
|
|
592
580
|
}
|
|
593
|
-
if (visited.has(obj))
|
|
594
|
-
return visited.get(obj);
|
|
581
|
+
if (visited.has(obj)) return visited.get(obj);
|
|
595
582
|
visited.set(obj, obj);
|
|
596
583
|
for (const e in params) {
|
|
597
|
-
if (!Object.hasOwnProperty.call(params, e))
|
|
598
|
-
|
|
599
|
-
if (excl.includes(e) || forcedExclude && e.startsWith("__"))
|
|
600
|
-
continue;
|
|
584
|
+
if (!Object.hasOwnProperty.call(params, e)) continue;
|
|
585
|
+
if (excl.includes(e) || forcedExclude && e.startsWith("__")) continue;
|
|
601
586
|
const objProp = obj[e];
|
|
602
587
|
const paramsProp = params[e];
|
|
603
588
|
if (isDOMNode(paramsProp)) {
|
|
@@ -617,10 +602,8 @@ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(nav
|
|
|
617
602
|
// src/utils/color.js
|
|
618
603
|
var ENV = "development";
|
|
619
604
|
var colorStringToRgbaArray = (color) => {
|
|
620
|
-
if (color === "")
|
|
621
|
-
|
|
622
|
-
if (color.toLowerCase() === "transparent")
|
|
623
|
-
return [0, 0, 0, 0];
|
|
605
|
+
if (color === "") return [0, 0, 0, 0];
|
|
606
|
+
if (color.toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
624
607
|
if (color[0] === "#") {
|
|
625
608
|
if (color.length < 7) {
|
|
626
609
|
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
@@ -651,8 +634,7 @@ var colorStringToRgbaArray = (color) => {
|
|
|
651
634
|
}
|
|
652
635
|
}
|
|
653
636
|
if (color.indexOf("rgb") === 0) {
|
|
654
|
-
if (color.indexOf("rgba") === -1)
|
|
655
|
-
color = `${color}, 1`;
|
|
637
|
+
if (color.indexOf("rgba") === -1) color = `${color}, 1`;
|
|
656
638
|
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
657
639
|
}
|
|
658
640
|
return [0, 0, 0, 0];
|
|
@@ -709,20 +691,14 @@ var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) %
|
|
|
709
691
|
var getColorShade = (col, amt) => {
|
|
710
692
|
const num = parseInt(col, 16);
|
|
711
693
|
let r = (num >> 16) + amt;
|
|
712
|
-
if (r > 255)
|
|
713
|
-
|
|
714
|
-
else if (r < 0)
|
|
715
|
-
r = 0;
|
|
694
|
+
if (r > 255) r = 255;
|
|
695
|
+
else if (r < 0) r = 0;
|
|
716
696
|
let b = (num >> 8 & 255) + amt;
|
|
717
|
-
if (b > 255)
|
|
718
|
-
|
|
719
|
-
else if (b < 0)
|
|
720
|
-
b = 0;
|
|
697
|
+
if (b > 255) b = 255;
|
|
698
|
+
else if (b < 0) b = 0;
|
|
721
699
|
let g = (num & 255) + amt;
|
|
722
|
-
if (g > 255)
|
|
723
|
-
|
|
724
|
-
else if (g < 0)
|
|
725
|
-
g = 0;
|
|
700
|
+
if (g > 255) g = 255;
|
|
701
|
+
else if (g < 0) g = 0;
|
|
726
702
|
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
727
703
|
};
|
|
728
704
|
var mixTwoRgba = (colorA, colorB, range = 0.5) => {
|
|
@@ -738,20 +714,16 @@ var mixTwoRgba = (colorA, colorB, range = 0.5) => {
|
|
|
738
714
|
var opacify = (color, opacity) => {
|
|
739
715
|
const arr = colorStringToRgbaArray(color);
|
|
740
716
|
if (!arr) {
|
|
741
|
-
if (ENV === "testing" || ENV === "development")
|
|
742
|
-
console.warn(color + " color is not rgba");
|
|
717
|
+
if (ENV === "testing" || ENV === "development") console.warn(color + " color is not rgba");
|
|
743
718
|
return;
|
|
744
719
|
}
|
|
745
720
|
arr[3] = opacity;
|
|
746
721
|
return `rgba(${arr})`;
|
|
747
722
|
};
|
|
748
723
|
var getRgbTone = (rgb, tone) => {
|
|
749
|
-
if (isString(rgb) && rgb.includes("rgb"))
|
|
750
|
-
|
|
751
|
-
if (
|
|
752
|
-
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
753
|
-
if (isNumber(tone))
|
|
754
|
-
tone += "";
|
|
724
|
+
if (isString(rgb) && rgb.includes("rgb")) rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
725
|
+
if (isString(rgb)) rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
726
|
+
if (isNumber(tone)) tone += "";
|
|
755
727
|
const toHex = rgbArrayToHex(rgb);
|
|
756
728
|
const abs = tone.slice(0, 1);
|
|
757
729
|
if (abs === "-" || abs === "+") {
|
|
@@ -768,21 +740,16 @@ var getRgbTone = (rgb, tone) => {
|
|
|
768
740
|
|
|
769
741
|
// src/utils/theme.js
|
|
770
742
|
var returnSubThemeOrDefault = (orig, theme) => {
|
|
771
|
-
if (!orig)
|
|
772
|
-
|
|
773
|
-
if (orig
|
|
774
|
-
return orig.themes[theme];
|
|
775
|
-
if (orig[theme])
|
|
776
|
-
return [orig, orig[theme]];
|
|
743
|
+
if (!orig) return;
|
|
744
|
+
if (orig.themes && orig.themes[theme]) return orig.themes[theme];
|
|
745
|
+
if (orig[theme]) return [orig, orig[theme]];
|
|
777
746
|
return orig;
|
|
778
747
|
};
|
|
779
748
|
|
|
780
749
|
// src/utils/font.js
|
|
781
750
|
var getDefaultOrFirstKey = (LIBRARY, key) => {
|
|
782
|
-
if (LIBRARY[key])
|
|
783
|
-
|
|
784
|
-
if (LIBRARY.default)
|
|
785
|
-
return LIBRARY[LIBRARY.default].value;
|
|
751
|
+
if (LIBRARY[key]) return LIBRARY[key].value;
|
|
752
|
+
if (LIBRARY.default) return LIBRARY[LIBRARY.default].value;
|
|
786
753
|
const hasValue = Object.keys(LIBRARY)[0];
|
|
787
754
|
return hasValue && LIBRARY[hasValue] && LIBRARY[hasValue].value;
|
|
788
755
|
};
|
|
@@ -809,8 +776,7 @@ var getFontFace = (LIBRARY) => {
|
|
|
809
776
|
};
|
|
810
777
|
var getFontFaceEachString = (name, weights) => {
|
|
811
778
|
const isArr = weights[0];
|
|
812
|
-
if (isArr)
|
|
813
|
-
return getFontFaceEach(name, weights).map(setInCustomFontMedia);
|
|
779
|
+
if (isArr) return getFontFaceEach(name, weights).map(setInCustomFontMedia);
|
|
814
780
|
return setCustomFontMedia(name, weights.url);
|
|
815
781
|
};
|
|
816
782
|
var getFontFaceString = (LIBRARY) => {
|
|
@@ -1048,8 +1014,7 @@ var getActiveConfig = (def) => {
|
|
|
1048
1014
|
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
1049
1015
|
};
|
|
1050
1016
|
var setActiveConfig = (newConfig) => {
|
|
1051
|
-
if (!isObject(newConfig))
|
|
1052
|
-
return;
|
|
1017
|
+
if (!isObject(newConfig)) return;
|
|
1053
1018
|
FACTORY.active = "1";
|
|
1054
1019
|
FACTORY["1"] = deepMerge(newConfig, deepClone(cachedConfig));
|
|
1055
1020
|
return newConfig;
|
|
@@ -1101,8 +1066,7 @@ var setSequenceValue = (props, sequenceProps) => {
|
|
|
1101
1066
|
var setScalingVar = (key, sequenceProps) => {
|
|
1102
1067
|
const { base, type, unit } = sequenceProps;
|
|
1103
1068
|
const defaultVal = (isScalingUnit(unit) ? 1 : base) + unit;
|
|
1104
|
-
if (key === 0)
|
|
1105
|
-
return defaultVal;
|
|
1069
|
+
if (key === 0) return defaultVal;
|
|
1106
1070
|
const prefix = "--" + (type && type.replace(".", "-"));
|
|
1107
1071
|
const ratioVar = `${prefix}-ratio`;
|
|
1108
1072
|
if (key > 0) {
|
|
@@ -1139,10 +1103,8 @@ var generateSubSequence = (props, sequenceProps) => {
|
|
|
1139
1103
|
const diffRounded = ~~next - ~~value;
|
|
1140
1104
|
let arr;
|
|
1141
1105
|
const [first, middle, second] = getSubratioDifference(value, ratio);
|
|
1142
|
-
if (diffRounded > 16)
|
|
1143
|
-
|
|
1144
|
-
else
|
|
1145
|
-
arr = [first, second];
|
|
1106
|
+
if (diffRounded > 16) arr = [first, middle, second];
|
|
1107
|
+
else arr = [first, second];
|
|
1146
1108
|
arr.forEach((v, k) => {
|
|
1147
1109
|
const scaling = ~~(v / base * 1e3) / 1e3;
|
|
1148
1110
|
const newVar = variable + (k + 1);
|
|
@@ -1184,8 +1146,7 @@ var generateSequence = (sequenceProps) => {
|
|
|
1184
1146
|
index: key
|
|
1185
1147
|
};
|
|
1186
1148
|
setSequenceValue(props, sequenceProps);
|
|
1187
|
-
if (subSequence)
|
|
1188
|
-
generateSubSequence(props, sequenceProps);
|
|
1149
|
+
if (subSequence) generateSubSequence(props, sequenceProps);
|
|
1189
1150
|
}
|
|
1190
1151
|
return sequenceProps;
|
|
1191
1152
|
};
|
|
@@ -1235,13 +1196,11 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
1235
1196
|
unit = UNIT2.default,
|
|
1236
1197
|
useVariable
|
|
1237
1198
|
} = sequenceProps;
|
|
1238
|
-
if (isString(value) && value.slice(0, 2) === "--")
|
|
1239
|
-
return `var(${value})`;
|
|
1199
|
+
if (isString(value) && value.slice(0, 2) === "--") return `var(${value})`;
|
|
1240
1200
|
const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
1241
1201
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
1242
1202
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
1243
|
-
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)
|
|
1244
|
-
return value;
|
|
1203
|
+
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) return value;
|
|
1245
1204
|
const letterVal = value.toUpperCase();
|
|
1246
1205
|
const isNegative = letterVal.slice(0, 1) === "-" ? "-" : "";
|
|
1247
1206
|
let absValue = isNegative ? letterVal.slice(1) : letterVal;
|
|
@@ -1265,8 +1224,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
1265
1224
|
return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
|
|
1266
1225
|
}
|
|
1267
1226
|
if (!sequence[absValue] && absValue.length === 2) {
|
|
1268
|
-
if (CONFIG2.verbose)
|
|
1269
|
-
console.warn(absValue, "- value is not found because `subSequence` is set to false");
|
|
1227
|
+
if (CONFIG2.verbose) console.warn(absValue, "- value is not found because `subSequence` is set to false");
|
|
1270
1228
|
absValue = absValue.slice(0, 1);
|
|
1271
1229
|
}
|
|
1272
1230
|
if (useVariable || CONFIG2.useVariable) {
|
|
@@ -1274,8 +1232,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
1274
1232
|
return isNegative ? `calc(${varValue2} * -1)` : varValue2;
|
|
1275
1233
|
}
|
|
1276
1234
|
const sequenceItem = sequence ? sequence[absValue] : null;
|
|
1277
|
-
if (!sequenceItem)
|
|
1278
|
-
return console.warn("can't find", sequence, absValue);
|
|
1235
|
+
if (!sequenceItem) return console.warn("can't find", sequence, absValue);
|
|
1279
1236
|
if (unit === "ms" || unit === "s") {
|
|
1280
1237
|
return isNegative + sequenceItem.val + unit;
|
|
1281
1238
|
}
|
|
@@ -1284,12 +1241,10 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
1284
1241
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
1285
1242
|
if (typeof value !== "string") {
|
|
1286
1243
|
const CONFIG2 = getActiveConfig();
|
|
1287
|
-
if (CONFIG2.verbose)
|
|
1288
|
-
console.warn(propertyName, value, "is not a string");
|
|
1244
|
+
if (CONFIG2.verbose) console.warn(propertyName, value, "is not a string");
|
|
1289
1245
|
return { [propertyName]: value };
|
|
1290
1246
|
}
|
|
1291
|
-
if (value === "-" || value === "")
|
|
1292
|
-
return {};
|
|
1247
|
+
if (value === "-" || value === "") return {};
|
|
1293
1248
|
return { [propertyName]: getSequenceValue(value, sequenceProps) };
|
|
1294
1249
|
};
|
|
1295
1250
|
var findHeadingLetter = (h1Matches, index) => numToLetterMap[h1Matches - index];
|
|
@@ -1357,23 +1312,19 @@ var applyMediaSequenceVars = (FACTORY2, media, options = {}) => {
|
|
|
1357
1312
|
const { mediaRegenerate } = FACTORY2;
|
|
1358
1313
|
const { sequence, scales } = FACTORY2[media];
|
|
1359
1314
|
const query = MEDIA2[mediaName];
|
|
1360
|
-
if (!query && CONFIG2.verbose)
|
|
1361
|
-
console.warn("Can't find media query ", query);
|
|
1315
|
+
if (!query && CONFIG2.verbose) console.warn("Can't find media query ", query);
|
|
1362
1316
|
if (!mediaRegenerate) {
|
|
1363
1317
|
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
1364
|
-
if (!underMediaQuery)
|
|
1365
|
-
underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
1318
|
+
if (!underMediaQuery) underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
1366
1319
|
applySequenceGlobalVars(underMediaQuery, FACTORY2[media], options);
|
|
1367
1320
|
return;
|
|
1368
1321
|
}
|
|
1369
1322
|
for (const key in sequence) {
|
|
1370
1323
|
const item = sequence[key];
|
|
1371
1324
|
const value = (isScalingUnit(unit) ? scales[key] : sequence[key].val) + unit;
|
|
1372
|
-
if (!query && CONFIG2.verbose)
|
|
1373
|
-
console.warn("Can't find query ", query);
|
|
1325
|
+
if (!query && CONFIG2.verbose) console.warn("Can't find query ", query);
|
|
1374
1326
|
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
1375
|
-
if (!underMediaQuery)
|
|
1376
|
-
underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
1327
|
+
if (!underMediaQuery) underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
1377
1328
|
underMediaQuery[item.variable] = `var(${item.variable + "_" + mediaName})`;
|
|
1378
1329
|
CSS_VARS2[item.variable + "_" + mediaName] = value;
|
|
1379
1330
|
}
|
|
@@ -1386,10 +1337,8 @@ var generateSprite = (icons) => {
|
|
|
1386
1337
|
const CONFIG2 = getActiveConfig();
|
|
1387
1338
|
let sprite = "";
|
|
1388
1339
|
for (const key in icons) {
|
|
1389
|
-
if (CONFIG2.__svg_cache[key])
|
|
1390
|
-
|
|
1391
|
-
else
|
|
1392
|
-
CONFIG2.__svg_cache[key] = true;
|
|
1340
|
+
if (CONFIG2.__svg_cache[key]) continue;
|
|
1341
|
+
else CONFIG2.__svg_cache[key] = true;
|
|
1393
1342
|
sprite += icons[key];
|
|
1394
1343
|
}
|
|
1395
1344
|
return sprite;
|
|
@@ -1397,8 +1346,7 @@ var generateSprite = (icons) => {
|
|
|
1397
1346
|
var parseRootAttributes = (htmlString) => {
|
|
1398
1347
|
const val = htmlString.default || htmlString;
|
|
1399
1348
|
if (!isString(val)) {
|
|
1400
|
-
if (isDev)
|
|
1401
|
-
console.warn("parseRootAttributes:", val, "is not a string");
|
|
1349
|
+
if (isDev) console.warn("parseRootAttributes:", val, "is not a string");
|
|
1402
1350
|
return;
|
|
1403
1351
|
}
|
|
1404
1352
|
const match = val.match(/<svg\s+(.*?)>/);
|
|
@@ -1480,27 +1428,21 @@ __export(system_exports, {
|
|
|
1480
1428
|
var getColor = (value, key, config) => {
|
|
1481
1429
|
const CONFIG2 = config || getActiveConfig();
|
|
1482
1430
|
if (!isString(value)) {
|
|
1483
|
-
if (CONFIG2.verbose)
|
|
1484
|
-
console.warn(value, "- type for color is not valid");
|
|
1431
|
+
if (CONFIG2.verbose) console.warn(value, "- type for color is not valid");
|
|
1485
1432
|
return;
|
|
1486
1433
|
}
|
|
1487
|
-
if (value.slice(0, 2) === "--")
|
|
1488
|
-
|
|
1489
|
-
if (key && value[key])
|
|
1490
|
-
value = value[key];
|
|
1434
|
+
if (value.slice(0, 2) === "--") return `var(${value})`;
|
|
1435
|
+
if (key && value[key]) value = value[key];
|
|
1491
1436
|
const [name, alpha, tone] = isArray(value) ? value : value.split(" ");
|
|
1492
1437
|
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
|
|
1493
1438
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
1494
1439
|
if (!val) {
|
|
1495
|
-
if (CONFIG2.verbose)
|
|
1496
|
-
console.warn("Can't find color ", name);
|
|
1440
|
+
if (CONFIG2.verbose) console.warn("Can't find color ", name);
|
|
1497
1441
|
return value;
|
|
1498
1442
|
}
|
|
1499
1443
|
if (key) {
|
|
1500
|
-
if (val[key])
|
|
1501
|
-
|
|
1502
|
-
else if (CONFIG2.verbose)
|
|
1503
|
-
console.warn(value, " - does not have ", key);
|
|
1444
|
+
if (val[key]) val = val[key];
|
|
1445
|
+
else if (CONFIG2.verbose) console.warn(value, " - does not have ", key);
|
|
1504
1446
|
}
|
|
1505
1447
|
let rgb = val.rgb;
|
|
1506
1448
|
if (!rgb) {
|
|
@@ -1510,32 +1452,25 @@ var getColor = (value, key, config) => {
|
|
|
1510
1452
|
rgb = getRgbTone(rgb, tone);
|
|
1511
1453
|
val[tone] = { rgb, var: `${val.var}-${tone}` };
|
|
1512
1454
|
}
|
|
1513
|
-
if (val[tone])
|
|
1514
|
-
|
|
1515
|
-
if (alpha)
|
|
1516
|
-
return `rgba(${rgb}, ${alpha})`;
|
|
1455
|
+
if (val[tone]) rgb = val[tone].rgb;
|
|
1456
|
+
if (alpha) return `rgba(${rgb}, ${alpha})`;
|
|
1517
1457
|
return CONFIG2.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
1518
1458
|
};
|
|
1519
1459
|
var getMediaColor = (value, globalTheme, config) => {
|
|
1520
1460
|
const CONFIG2 = config || getActiveConfig();
|
|
1521
|
-
if (!globalTheme)
|
|
1522
|
-
globalTheme = CONFIG2.globalTheme;
|
|
1461
|
+
if (!globalTheme) globalTheme = CONFIG2.globalTheme;
|
|
1523
1462
|
if (!isString(value)) {
|
|
1524
|
-
if (CONFIG2.verbose)
|
|
1525
|
-
console.warn(value, "- type for color is not valid");
|
|
1463
|
+
if (CONFIG2.verbose) console.warn(value, "- type for color is not valid");
|
|
1526
1464
|
return;
|
|
1527
1465
|
}
|
|
1528
|
-
if (value.slice(0, 2) === "--")
|
|
1529
|
-
return `var(${value})`;
|
|
1466
|
+
if (value.slice(0, 2) === "--") return `var(${value})`;
|
|
1530
1467
|
const [name] = isArray(value) ? value : value.split(" ");
|
|
1531
1468
|
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
|
|
1532
1469
|
const val = COLOR2[name] || GRADIENT2[name];
|
|
1533
1470
|
const isObj = isObject(val);
|
|
1534
|
-
if (isObj && val.value)
|
|
1535
|
-
return getColor(value, `@${globalTheme}`, config);
|
|
1471
|
+
if (isObj && val.value) return getColor(value, `@${globalTheme}`, config);
|
|
1536
1472
|
else if (isObj) {
|
|
1537
|
-
if (globalTheme)
|
|
1538
|
-
return getColor(value, `@${globalTheme}`, config);
|
|
1473
|
+
if (globalTheme) return getColor(value, `@${globalTheme}`, config);
|
|
1539
1474
|
else {
|
|
1540
1475
|
const obj = {};
|
|
1541
1476
|
for (const mediaName in val) {
|
|
@@ -1546,8 +1481,7 @@ var getMediaColor = (value, globalTheme, config) => {
|
|
|
1546
1481
|
return obj;
|
|
1547
1482
|
}
|
|
1548
1483
|
} else {
|
|
1549
|
-
if (CONFIG2.verbose)
|
|
1550
|
-
console.warn("Can't find color", value);
|
|
1484
|
+
if (CONFIG2.verbose) console.warn("Can't find color", value);
|
|
1551
1485
|
return value;
|
|
1552
1486
|
}
|
|
1553
1487
|
};
|
|
@@ -1556,8 +1490,7 @@ var setColor = (val, key, suffix) => {
|
|
|
1556
1490
|
if (isString(val) && val.slice(0, 2) === "--") {
|
|
1557
1491
|
val = getColor(val.slice(2));
|
|
1558
1492
|
if (!(val.includes("rgb") || val.includes("var") || val.includes("#"))) {
|
|
1559
|
-
if (CONFIG2.verbose)
|
|
1560
|
-
console.warn(val, "- referred but does not exist");
|
|
1493
|
+
if (CONFIG2.verbose) console.warn(val, "- referred but does not exist");
|
|
1561
1494
|
val = val.split(" ")[0];
|
|
1562
1495
|
}
|
|
1563
1496
|
}
|
|
@@ -1596,8 +1529,7 @@ var setColor = (val, key, suffix) => {
|
|
|
1596
1529
|
};
|
|
1597
1530
|
var setGradient = (val, key, suffix) => {
|
|
1598
1531
|
const CONFIG2 = getActiveConfig();
|
|
1599
|
-
if (isString(val) && val.slice(0, 2) === "--")
|
|
1600
|
-
val = getColor(val.slice(2));
|
|
1532
|
+
if (isString(val) && val.slice(0, 2) === "--") val = getColor(val.slice(2));
|
|
1601
1533
|
if (isArray(val)) {
|
|
1602
1534
|
return {
|
|
1603
1535
|
"@light": setGradient(val[0], key, "light"),
|
|
@@ -1606,8 +1538,7 @@ var setGradient = (val, key, suffix) => {
|
|
|
1606
1538
|
}
|
|
1607
1539
|
if (isObject(val)) {
|
|
1608
1540
|
const obj = {};
|
|
1609
|
-
for (const variant in val)
|
|
1610
|
-
obj[variant] = setGradient(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
|
|
1541
|
+
for (const variant in val) obj[variant] = setGradient(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
|
|
1611
1542
|
return obj;
|
|
1612
1543
|
}
|
|
1613
1544
|
const CSSVar = `--gradient-${key}` + (suffix ? `-${suffix}` : "");
|
|
@@ -1633,22 +1564,19 @@ var setThemeValue = (theme) => {
|
|
|
1633
1564
|
return value;
|
|
1634
1565
|
};
|
|
1635
1566
|
var getThemeValue = (theme) => {
|
|
1636
|
-
if (theme.value)
|
|
1637
|
-
return theme.value;
|
|
1567
|
+
if (theme.value) return theme.value;
|
|
1638
1568
|
theme.value = setThemeValue(theme);
|
|
1639
1569
|
return theme.value;
|
|
1640
1570
|
};
|
|
1641
1571
|
var getTheme = (value, modifier) => {
|
|
1642
1572
|
const CONFIG2 = getActiveConfig();
|
|
1643
|
-
if (CONFIG2.useVariable)
|
|
1644
|
-
return getMediaTheme(value, modifier);
|
|
1573
|
+
if (CONFIG2.useVariable) return getMediaTheme(value, modifier);
|
|
1645
1574
|
const { THEME: THEME2 } = CONFIG2;
|
|
1646
1575
|
if (isString(value)) {
|
|
1647
1576
|
const [theme, subtheme] = value.split(" ");
|
|
1648
1577
|
const isOurTheme = THEME2[theme];
|
|
1649
1578
|
if (isOurTheme) {
|
|
1650
|
-
if (!subtheme && !modifier)
|
|
1651
|
-
return getThemeValue(isOurTheme);
|
|
1579
|
+
if (!subtheme && !modifier) return getThemeValue(isOurTheme);
|
|
1652
1580
|
value = [theme, subtheme || modifier];
|
|
1653
1581
|
}
|
|
1654
1582
|
}
|
|
@@ -1656,14 +1584,10 @@ var getTheme = (value, modifier) => {
|
|
|
1656
1584
|
const themeName = value[0];
|
|
1657
1585
|
const subThemeName = value[1];
|
|
1658
1586
|
const { helpers, media, state } = THEME2[themeName];
|
|
1659
|
-
if (media && media[subThemeName])
|
|
1660
|
-
|
|
1661
|
-
if (
|
|
1662
|
-
|
|
1663
|
-
if (state && state[subThemeName])
|
|
1664
|
-
return getThemeValue(state[subThemeName]);
|
|
1665
|
-
} else if (isObject(value))
|
|
1666
|
-
return setThemeValue(value);
|
|
1587
|
+
if (media && media[subThemeName]) return getThemeValue(media[subThemeName]);
|
|
1588
|
+
if (helpers && helpers[subThemeName]) return getThemeValue(helpers[subThemeName]);
|
|
1589
|
+
if (state && state[subThemeName]) return getThemeValue(state[subThemeName]);
|
|
1590
|
+
} else if (isObject(value)) return setThemeValue(value);
|
|
1667
1591
|
};
|
|
1668
1592
|
var setInverseTheme = (theme, variant, value) => {
|
|
1669
1593
|
if (isObject(variant)) {
|
|
@@ -1681,13 +1605,11 @@ var setInverseTheme = (theme, variant, value) => {
|
|
|
1681
1605
|
var setPseudo = (theme, key, variant, themeValue) => {
|
|
1682
1606
|
const result = getTheme(variant);
|
|
1683
1607
|
themeValue[`&:${key}`] = result;
|
|
1684
|
-
if (isObject(variant) && !variant.value)
|
|
1685
|
-
variant.value = result;
|
|
1608
|
+
if (isObject(variant) && !variant.value) variant.value = result;
|
|
1686
1609
|
};
|
|
1687
1610
|
var setSelectors = (theme, value) => {
|
|
1688
1611
|
const { state } = theme;
|
|
1689
|
-
if (!state)
|
|
1690
|
-
return;
|
|
1612
|
+
if (!state) return;
|
|
1691
1613
|
const keys = Object.keys(state);
|
|
1692
1614
|
keys.map((key) => {
|
|
1693
1615
|
const variant = state[key];
|
|
@@ -1699,20 +1621,16 @@ var setSelectors = (theme, value) => {
|
|
|
1699
1621
|
var setPrefersScheme = (theme, key, variant, themeValue) => {
|
|
1700
1622
|
const result = getTheme(variant);
|
|
1701
1623
|
themeValue[`@media (prefers-color-scheme: ${key})`] = result;
|
|
1702
|
-
if (isObject(variant) && !variant.value)
|
|
1703
|
-
variant.value = result;
|
|
1624
|
+
if (isObject(variant) && !variant.value) variant.value = result;
|
|
1704
1625
|
};
|
|
1705
1626
|
var setMedia = (theme, value) => {
|
|
1706
1627
|
const { media } = theme;
|
|
1707
|
-
if (!media)
|
|
1708
|
-
return;
|
|
1628
|
+
if (!media) return;
|
|
1709
1629
|
const keys = Object.keys(media);
|
|
1710
1630
|
keys.map((key) => {
|
|
1711
1631
|
const variant = media[key];
|
|
1712
|
-
if (key === "dark" || key === "light")
|
|
1713
|
-
|
|
1714
|
-
if (key === "inverse")
|
|
1715
|
-
setInverseTheme(theme, variant, value);
|
|
1632
|
+
if (key === "dark" || key === "light") setPrefersScheme(theme, key, variant, value);
|
|
1633
|
+
if (key === "inverse") setInverseTheme(theme, variant, value);
|
|
1716
1634
|
return theme;
|
|
1717
1635
|
});
|
|
1718
1636
|
return theme;
|
|
@@ -1720,23 +1638,19 @@ var setMedia = (theme, value) => {
|
|
|
1720
1638
|
var setHelpers = (theme, value) => {
|
|
1721
1639
|
const CONFIG2 = getActiveConfig();
|
|
1722
1640
|
const { helpers } = theme;
|
|
1723
|
-
if (!helpers)
|
|
1724
|
-
return;
|
|
1641
|
+
if (!helpers) return;
|
|
1725
1642
|
const keys = Object.keys(helpers);
|
|
1726
1643
|
keys.map((key) => {
|
|
1727
1644
|
const helper = helpers[key];
|
|
1728
|
-
if (isString(helper))
|
|
1729
|
-
|
|
1730
|
-
else
|
|
1731
|
-
getThemeValue(helpers[key]);
|
|
1645
|
+
if (isString(helper)) helpers[key] = CONFIG2.THEME[helper];
|
|
1646
|
+
else getThemeValue(helpers[key]);
|
|
1732
1647
|
return theme;
|
|
1733
1648
|
});
|
|
1734
1649
|
return theme;
|
|
1735
1650
|
};
|
|
1736
1651
|
var setTheme = (val, key) => {
|
|
1737
1652
|
const CONFIG2 = getActiveConfig();
|
|
1738
|
-
if (CONFIG2.useVariable)
|
|
1739
|
-
return setMediaTheme(val, key);
|
|
1653
|
+
if (CONFIG2.useVariable) return setMediaTheme(val, key);
|
|
1740
1654
|
const { state, media, helpers } = val;
|
|
1741
1655
|
const value = setThemeValue(val, key);
|
|
1742
1656
|
const CSSvar = `--theme-${key}`;
|
|
@@ -1798,24 +1712,19 @@ var recursiveTheme = (val) => {
|
|
|
1798
1712
|
} else if (symb === ":") {
|
|
1799
1713
|
obj[`&${param}`] = recursiveTheme(val[param]);
|
|
1800
1714
|
}
|
|
1801
|
-
} else
|
|
1802
|
-
obj[param] = val[param];
|
|
1715
|
+
} else obj[param] = val[param];
|
|
1803
1716
|
}
|
|
1804
1717
|
return obj;
|
|
1805
1718
|
};
|
|
1806
1719
|
var findModifierFromArray = (val, modifierArray) => {
|
|
1807
1720
|
const currentMod = modifierArray.shift();
|
|
1808
|
-
if (val[currentMod])
|
|
1809
|
-
return findModifierFromArray(val[currentMod], modifierArray);
|
|
1721
|
+
if (val[currentMod]) return findModifierFromArray(val[currentMod], modifierArray);
|
|
1810
1722
|
return val;
|
|
1811
1723
|
};
|
|
1812
1724
|
var findModifier = (val, modifier) => {
|
|
1813
|
-
if (isArray(modifier))
|
|
1814
|
-
|
|
1815
|
-
else
|
|
1816
|
-
return val[modifier];
|
|
1817
|
-
else
|
|
1818
|
-
return val;
|
|
1725
|
+
if (isArray(modifier)) return findModifierFromArray(val, modifier);
|
|
1726
|
+
else if (isString(modifier) && val[modifier]) return val[modifier];
|
|
1727
|
+
else return val;
|
|
1819
1728
|
};
|
|
1820
1729
|
var getMediaTheme = (value, modifier) => {
|
|
1821
1730
|
const activeConfig = getActiveConfig();
|
|
@@ -1841,8 +1750,7 @@ var getMediaTheme = (value, modifier) => {
|
|
|
1841
1750
|
var import_utils11 = __toESM(require_cjs(), 1);
|
|
1842
1751
|
var setFont = (val, key) => {
|
|
1843
1752
|
const CSSvar = `--font-${key}`;
|
|
1844
|
-
if (!val || isArray(val) && !val[0])
|
|
1845
|
-
return;
|
|
1753
|
+
if (!val || isArray(val) && !val[0]) return;
|
|
1846
1754
|
const fontFace = val[0] ? getFontFaceEach(key, val) : setCustomFontMedia(key, val.url);
|
|
1847
1755
|
return { var: CSSvar, value: val, fontFace };
|
|
1848
1756
|
};
|
|
@@ -1855,10 +1763,8 @@ var setFontFamily = (val, key) => {
|
|
|
1855
1763
|
const CONFIG2 = getActiveConfig();
|
|
1856
1764
|
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } = CONFIG2;
|
|
1857
1765
|
let { value, type } = val;
|
|
1858
|
-
if (val.isDefault)
|
|
1859
|
-
|
|
1860
|
-
if (isObject(value))
|
|
1861
|
-
value = (0, import_utils11.arrayzeValue)(value);
|
|
1766
|
+
if (val.isDefault) FONT_FAMILY2.default = key;
|
|
1767
|
+
if (isObject(value)) value = (0, import_utils11.arrayzeValue)(value);
|
|
1862
1768
|
const CSSvar = `--font-family-${key}`;
|
|
1863
1769
|
const str = `${value.join(", ")}, ${FONT_FAMILY_TYPES2[type]}`;
|
|
1864
1770
|
return { var: CSSvar, value: str, arr: value, type };
|
|
@@ -1871,19 +1777,10 @@ var runThroughMedia = (FACTORY2) => {
|
|
|
1871
1777
|
for (const prop in FACTORY2) {
|
|
1872
1778
|
const isPropMedia = prop.slice(0, 1) === "@";
|
|
1873
1779
|
const mediaValue = FACTORY2[prop];
|
|
1874
|
-
if (!isPropMedia)
|
|
1875
|
-
continue;
|
|
1780
|
+
if (!isPropMedia) continue;
|
|
1876
1781
|
const { mediaRegenerate } = FACTORY2;
|
|
1877
1782
|
const mediaName = prop.slice(1);
|
|
1878
|
-
const {
|
|
1879
|
-
type,
|
|
1880
|
-
base,
|
|
1881
|
-
ratio,
|
|
1882
|
-
range,
|
|
1883
|
-
subSequence,
|
|
1884
|
-
h1Matches,
|
|
1885
|
-
unit
|
|
1886
|
-
} = FACTORY2;
|
|
1783
|
+
const { type, base, ratio, range, subSequence, h1Matches, unit } = FACTORY2;
|
|
1887
1784
|
merge(mediaValue, {
|
|
1888
1785
|
type,
|
|
1889
1786
|
base,
|
|
@@ -1913,7 +1810,7 @@ var runThroughMedia = (FACTORY2) => {
|
|
|
1913
1810
|
}
|
|
1914
1811
|
};
|
|
1915
1812
|
var applyHeadings = (props) => {
|
|
1916
|
-
var _a;
|
|
1813
|
+
var _a, _b;
|
|
1917
1814
|
const CONFIG2 = getActiveConfig();
|
|
1918
1815
|
if (props.h1Matches) {
|
|
1919
1816
|
const unit = props.unit;
|
|
@@ -1922,10 +1819,8 @@ var applyHeadings = (props) => {
|
|
|
1922
1819
|
for (const k in HEADINGS) {
|
|
1923
1820
|
const headerName = `h${parseInt(k) + 1}`;
|
|
1924
1821
|
const headerStyle = templates[headerName];
|
|
1925
|
-
if (!HEADINGS[k])
|
|
1926
|
-
continue;
|
|
1927
1822
|
templates[headerName] = {
|
|
1928
|
-
fontSize: CONFIG2.useVariable ? `var(${(_a = HEADINGS[k]) == null ? void 0 : _a.variable})` : `${HEADINGS[k].scaling}${unit}`,
|
|
1823
|
+
fontSize: CONFIG2.useVariable ? `var(${(_a = HEADINGS[k]) == null ? void 0 : _a.variable})` : `${(_b = HEADINGS[k]) == null ? void 0 : _b.scaling}${unit}`,
|
|
1929
1824
|
margin: headerStyle ? headerStyle.margin : 0,
|
|
1930
1825
|
lineHeight: headerStyle ? headerStyle.lineHeight : props.lineHeight,
|
|
1931
1826
|
letterSpacing: headerStyle ? headerStyle.letterSpacing : props.letterSpacing,
|
|
@@ -1945,11 +1840,7 @@ var applyTypographySequence = () => {
|
|
|
1945
1840
|
var getFontSizeByKey = (value) => {
|
|
1946
1841
|
const CONFIG2 = getActiveConfig();
|
|
1947
1842
|
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG2;
|
|
1948
|
-
return getSequenceValuePropertyPair(
|
|
1949
|
-
value,
|
|
1950
|
-
"fontSize",
|
|
1951
|
-
TYPOGRAPHY2
|
|
1952
|
-
);
|
|
1843
|
+
return getSequenceValuePropertyPair(value, "fontSize", TYPOGRAPHY2);
|
|
1953
1844
|
};
|
|
1954
1845
|
|
|
1955
1846
|
// src/system/spacing.js
|
|
@@ -1958,8 +1849,7 @@ var runThroughMedia2 = (FACTORY2) => {
|
|
|
1958
1849
|
for (const prop in FACTORY2) {
|
|
1959
1850
|
const mediaProps = FACTORY2[prop];
|
|
1960
1851
|
const isMediaName = prop.slice(0, 1) === "@";
|
|
1961
|
-
if (!isMediaName)
|
|
1962
|
-
continue;
|
|
1852
|
+
if (!isMediaName) continue;
|
|
1963
1853
|
const {
|
|
1964
1854
|
type,
|
|
1965
1855
|
base,
|
|
@@ -1996,8 +1886,7 @@ var applySpacingSequence = () => {
|
|
|
1996
1886
|
var getSequence = (sequenceProps) => {
|
|
1997
1887
|
const CONFIG2 = getActiveConfig();
|
|
1998
1888
|
const { SPACING: SPACING2 } = CONFIG2;
|
|
1999
|
-
if (!sequenceProps)
|
|
2000
|
-
return SPACING2;
|
|
1889
|
+
if (!sequenceProps) return SPACING2;
|
|
2001
1890
|
const hasGenerated = Object.keys(sequenceProps.sequence).length > 0;
|
|
2002
1891
|
return hasGenerated ? sequenceProps : generateSequence(sequenceProps);
|
|
2003
1892
|
};
|
|
@@ -2007,8 +1896,7 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
|
|
|
2007
1896
|
return { [propertyName]: value };
|
|
2008
1897
|
}
|
|
2009
1898
|
const stack = (0, import_utils15.arrayzeValue)(value);
|
|
2010
|
-
if (!isArray(stack))
|
|
2011
|
-
return;
|
|
1899
|
+
if (!isArray(stack)) return;
|
|
2012
1900
|
if (stack.length > 1) {
|
|
2013
1901
|
let suffix = "";
|
|
2014
1902
|
if (propertyName === "borderWidth") {
|
|
@@ -2087,15 +1975,11 @@ var setShadow = (value, key, suffix, prefers) => {
|
|
|
2087
1975
|
if (isString(value) && value.includes(",")) {
|
|
2088
1976
|
value = value.split(",").map((v) => {
|
|
2089
1977
|
v = v.trim();
|
|
2090
|
-
if (v.startsWith("--"))
|
|
2091
|
-
|
|
2092
|
-
if (
|
|
2093
|
-
return getColor(v);
|
|
2094
|
-
if (v.includes("px") || v.slice(-2) === "em")
|
|
2095
|
-
return v;
|
|
1978
|
+
if (v.startsWith("--")) return `var(${v})`;
|
|
1979
|
+
if (getColor(v).length > 2) return getColor(v);
|
|
1980
|
+
if (v.includes("px") || v.slice(-2) === "em") return v;
|
|
2096
1981
|
const arr = v.split(" ");
|
|
2097
|
-
if (!arr.length)
|
|
2098
|
-
return v;
|
|
1982
|
+
if (!arr.length) return v;
|
|
2099
1983
|
return arr.map((v2) => getSpacingByKey(v2, "shadow").shadow).join(" ");
|
|
2100
1984
|
}).join(" ");
|
|
2101
1985
|
}
|
|
@@ -2110,32 +1994,25 @@ var setShadow = (value, key, suffix, prefers) => {
|
|
|
2110
1994
|
};
|
|
2111
1995
|
var getShadow = (value, globalTheme) => {
|
|
2112
1996
|
const CONFIG2 = getActiveConfig();
|
|
2113
|
-
if (!globalTheme)
|
|
2114
|
-
globalTheme = CONFIG2.globalTheme;
|
|
1997
|
+
if (!globalTheme) globalTheme = CONFIG2.globalTheme;
|
|
2115
1998
|
if (!isString(value)) {
|
|
2116
|
-
if (CONFIG2.verbose)
|
|
2117
|
-
console.warn(value, "- type for color is not valid");
|
|
1999
|
+
if (CONFIG2.verbose) console.warn(value, "- type for color is not valid");
|
|
2118
2000
|
return;
|
|
2119
2001
|
}
|
|
2120
|
-
if (value.slice(0, 2) === "--")
|
|
2121
|
-
return `var(${value})`;
|
|
2002
|
+
if (value.slice(0, 2) === "--") return `var(${value})`;
|
|
2122
2003
|
const [name] = isArray(value) ? value : value.split(" ");
|
|
2123
2004
|
const { SHADOW: SHADOW2 } = CONFIG2;
|
|
2124
2005
|
const val = SHADOW2[name];
|
|
2125
2006
|
const isObj = isObject(val);
|
|
2126
2007
|
if (!val) {
|
|
2127
|
-
if (CONFIG2.verbose)
|
|
2128
|
-
console.warn("Can't find color ", name);
|
|
2008
|
+
if (CONFIG2.verbose) console.warn("Can't find color ", name);
|
|
2129
2009
|
return value;
|
|
2130
2010
|
}
|
|
2131
2011
|
if (globalTheme) {
|
|
2132
|
-
if (val[globalTheme])
|
|
2133
|
-
|
|
2134
|
-
else if (CONFIG2.verbose)
|
|
2135
|
-
console.warn(value, " - does not have ", globalTheme);
|
|
2012
|
+
if (val[globalTheme]) return val[globalTheme].value;
|
|
2013
|
+
else if (CONFIG2.verbose) console.warn(value, " - does not have ", globalTheme);
|
|
2136
2014
|
}
|
|
2137
|
-
if (isObj && val.value)
|
|
2138
|
-
return val.value;
|
|
2015
|
+
if (isObj && val.value) return val.value;
|
|
2139
2016
|
if (isObj) {
|
|
2140
2017
|
const obj = {};
|
|
2141
2018
|
for (const mediaName in val) {
|
|
@@ -2145,8 +2022,7 @@ var getShadow = (value, globalTheme) => {
|
|
|
2145
2022
|
}
|
|
2146
2023
|
return obj;
|
|
2147
2024
|
}
|
|
2148
|
-
if (CONFIG2.verbose)
|
|
2149
|
-
console.warn("Can't find color", value);
|
|
2025
|
+
if (CONFIG2.verbose) console.warn("Can't find color", value);
|
|
2150
2026
|
return value;
|
|
2151
2027
|
};
|
|
2152
2028
|
|
|
@@ -2192,8 +2068,7 @@ var DEF_OPTIONS = {
|
|
|
2192
2068
|
var setSVG = (val, key) => {
|
|
2193
2069
|
const CONFIG2 = getActiveConfig();
|
|
2194
2070
|
if (!val) {
|
|
2195
|
-
if (CONFIG2.verbose)
|
|
2196
|
-
console.warn("setSVG: val is not defined", key);
|
|
2071
|
+
if (CONFIG2.verbose) console.warn("setSVG: val is not defined", key);
|
|
2197
2072
|
return;
|
|
2198
2073
|
}
|
|
2199
2074
|
if (CONFIG2.useSvgSprite) {
|
|
@@ -2204,8 +2079,7 @@ var setSVG = (val, key) => {
|
|
|
2204
2079
|
var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
2205
2080
|
const CONFIG2 = getActiveConfig();
|
|
2206
2081
|
const lib = Object.keys(LIBRARY).length ? {} : CONFIG2.SVG;
|
|
2207
|
-
for (const key in LIBRARY)
|
|
2208
|
-
lib[key] = CONFIG2.SVG[key];
|
|
2082
|
+
for (const key in LIBRARY) lib[key] = CONFIG2.SVG[key];
|
|
2209
2083
|
appendSVG(lib, options);
|
|
2210
2084
|
};
|
|
2211
2085
|
var setSvgIcon = (val, key) => {
|
|
@@ -2219,13 +2093,11 @@ var setSvgIcon = (val, key) => {
|
|
|
2219
2093
|
var appendSvgIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
2220
2094
|
const CONFIG2 = getActiveConfig();
|
|
2221
2095
|
const lib = Object.keys(LIBRARY).length ? {} : CONFIG2.ICONS;
|
|
2222
|
-
for (const key in LIBRARY)
|
|
2223
|
-
lib[key] = CONFIG2.ICONS[key];
|
|
2096
|
+
for (const key in LIBRARY) lib[key] = CONFIG2.ICONS[key];
|
|
2224
2097
|
appendSVG(lib, options);
|
|
2225
2098
|
};
|
|
2226
2099
|
var createSVGSpriteElement = (options = { isRoot: true }) => {
|
|
2227
|
-
if (!document2 || !document2.createElementNS)
|
|
2228
|
-
return;
|
|
2100
|
+
if (!document2 || !document2.createElementNS) return;
|
|
2229
2101
|
const svgElem = document2.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2230
2102
|
if (options.isRoot) {
|
|
2231
2103
|
svgElem.setAttribute("aria-hidden", "true");
|
|
@@ -2281,8 +2153,7 @@ var applyReset = (reset = {}) => {
|
|
|
2281
2153
|
}
|
|
2282
2154
|
const { body, ...templates } = TYPOGRAPHY2.templates;
|
|
2283
2155
|
const globalTheme = CONFIG2.useDocumentTheme ? getMediaTheme("document", `@${CONFIG2.globalTheme}`) : {};
|
|
2284
|
-
if (RESET2.html)
|
|
2285
|
-
overwriteDeep(RESET2.html, globalTheme);
|
|
2156
|
+
if (RESET2.html) overwriteDeep(RESET2.html, globalTheme);
|
|
2286
2157
|
return deepMerge(merge(RESET2, reset), {
|
|
2287
2158
|
html: {
|
|
2288
2159
|
position: "absolute",
|
|
@@ -2339,25 +2210,18 @@ var transformBorder = (border) => {
|
|
|
2339
2210
|
const arr = border.split(", ");
|
|
2340
2211
|
return arr.map((v) => {
|
|
2341
2212
|
v = v.trim();
|
|
2342
|
-
if (v.slice(0, 2) === "--")
|
|
2343
|
-
|
|
2344
|
-
else if (
|
|
2345
|
-
|
|
2346
|
-
else if (v.slice(-2) === "px" || v.slice(-2) === "em")
|
|
2347
|
-
return v;
|
|
2348
|
-
else if (getColor(v).length > 2)
|
|
2349
|
-
return getColor(v);
|
|
2213
|
+
if (v.slice(0, 2) === "--") return `var(${v})`;
|
|
2214
|
+
else if (isBorderStyle(v)) return v || "solid";
|
|
2215
|
+
else if (v.slice(-2) === "px" || v.slice(-2) === "em") return v;
|
|
2216
|
+
else if (getColor(v).length > 2) return getColor(v);
|
|
2350
2217
|
return getSpacingByKey(v, "border").border;
|
|
2351
2218
|
}).join(" ");
|
|
2352
2219
|
};
|
|
2353
2220
|
var transformTextStroke = (stroke) => {
|
|
2354
2221
|
return stroke.split(", ").map((v) => {
|
|
2355
|
-
if (v.slice(0, 2) === "--")
|
|
2356
|
-
|
|
2357
|
-
if (v
|
|
2358
|
-
return v;
|
|
2359
|
-
else if (getColor(v))
|
|
2360
|
-
return getColor(v);
|
|
2222
|
+
if (v.slice(0, 2) === "--") return `var(${v})`;
|
|
2223
|
+
if (v.includes("px")) return v;
|
|
2224
|
+
else if (getColor(v)) return getColor(v);
|
|
2361
2225
|
return v;
|
|
2362
2226
|
}).join(" ");
|
|
2363
2227
|
};
|
|
@@ -2365,64 +2229,52 @@ var transformShadow = (sh, globalTheme) => getShadow(sh, globalTheme);
|
|
|
2365
2229
|
var transformBoxShadow = (shadows, globalTheme) => shadows.split("|").map((shadow) => {
|
|
2366
2230
|
return shadow.split(",").map((v) => {
|
|
2367
2231
|
v = v.trim();
|
|
2368
|
-
if (v.slice(0, 2) === "--")
|
|
2369
|
-
return `var(${v})`;
|
|
2232
|
+
if (v.slice(0, 2) === "--") return `var(${v})`;
|
|
2370
2233
|
if (getColor(v).length > 2) {
|
|
2371
2234
|
const color = getMediaColor(v, globalTheme);
|
|
2372
|
-
if (isObject(color))
|
|
2373
|
-
return Object.values(color).filter((v2) => v2.includes(": " + globalTheme))[0];
|
|
2235
|
+
if (isObject(color)) return Object.values(color).filter((v2) => v2.includes(": " + globalTheme))[0];
|
|
2374
2236
|
return color;
|
|
2375
2237
|
}
|
|
2376
|
-
if (v.includes("px") || v.slice(-2) === "em")
|
|
2377
|
-
return v;
|
|
2238
|
+
if (v.includes("px") || v.slice(-2) === "em") return v;
|
|
2378
2239
|
const arr = v.split(" ");
|
|
2379
|
-
if (!arr.length)
|
|
2380
|
-
return v;
|
|
2240
|
+
if (!arr.length) return v;
|
|
2381
2241
|
return arr.map((v2) => getSpacingByKey(v2, "shadow").shadow).join(" ");
|
|
2382
2242
|
}).join(" ");
|
|
2383
2243
|
}).join(",");
|
|
2384
2244
|
var transformBackgroundImage = (backgroundImage, globalTheme) => {
|
|
2385
2245
|
const CONFIG2 = getActiveConfig();
|
|
2386
2246
|
return backgroundImage.split(", ").map((v) => {
|
|
2387
|
-
if (v.slice(0, 2) === "--")
|
|
2388
|
-
|
|
2389
|
-
if (v.includes("url") || v.includes("gradient"))
|
|
2390
|
-
return v;
|
|
2247
|
+
if (v.slice(0, 2) === "--") return `var(${v})`;
|
|
2248
|
+
if (v.includes("url") || v.includes("gradient")) return v;
|
|
2391
2249
|
else if (CONFIG2.GRADIENT[backgroundImage]) {
|
|
2392
2250
|
return {
|
|
2393
2251
|
backgroundImage: getMediaColor(backgroundImage, globalTheme || CONFIG2.globalTheme)
|
|
2394
2252
|
};
|
|
2395
|
-
} else if (v.includes("/") || v.startsWith("http") || v.includes("."))
|
|
2396
|
-
return `url(${v})`;
|
|
2253
|
+
} else if (v.includes("/") || v.startsWith("http") || v.includes(".")) return `url(${v})`;
|
|
2397
2254
|
return v;
|
|
2398
2255
|
}).join(" ");
|
|
2399
2256
|
};
|
|
2400
2257
|
var transfromGap = (gap) => isString(gap) && gap.split(" ").map((v) => getSpacingByKey(v, "gap").gap).join(" ");
|
|
2401
2258
|
var transformTransition = (transition) => {
|
|
2402
2259
|
const arr = transition.split(" ");
|
|
2403
|
-
if (!arr.length)
|
|
2404
|
-
return transition;
|
|
2260
|
+
if (!arr.length) return transition;
|
|
2405
2261
|
return arr.map((v) => {
|
|
2406
|
-
if (v.slice(0, 2) === "--")
|
|
2407
|
-
return `var(${v})`;
|
|
2262
|
+
if (v.slice(0, 2) === "--") return `var(${v})`;
|
|
2408
2263
|
if (v.length < 3 || v.includes("ms")) {
|
|
2409
2264
|
const mapWithSequence = getTimingByKey(v);
|
|
2410
2265
|
return mapWithSequence.timing || v;
|
|
2411
2266
|
}
|
|
2412
|
-
if (getTimingFunction(v))
|
|
2413
|
-
return getTimingFunction(v);
|
|
2267
|
+
if (getTimingFunction(v)) return getTimingFunction(v);
|
|
2414
2268
|
return v;
|
|
2415
2269
|
}).join(" ");
|
|
2416
2270
|
};
|
|
2417
2271
|
var transformDuration = (duration, props, propertyName) => {
|
|
2418
|
-
if (!isString(duration))
|
|
2419
|
-
return;
|
|
2272
|
+
if (!isString(duration)) return;
|
|
2420
2273
|
return duration.split(",").map((v) => getTimingByKey(v).timing || v).join(",");
|
|
2421
2274
|
};
|
|
2422
2275
|
var splitTransition = (transition) => {
|
|
2423
2276
|
const arr = transition.split(",");
|
|
2424
|
-
if (!arr.length)
|
|
2425
|
-
return;
|
|
2277
|
+
if (!arr.length) return;
|
|
2426
2278
|
return arr.map(transformTransition).join(",");
|
|
2427
2279
|
};
|
|
2428
2280
|
var checkIfBoxSize = (propertyName) => {
|
|
@@ -2431,16 +2283,14 @@ var checkIfBoxSize = (propertyName) => {
|
|
|
2431
2283
|
};
|
|
2432
2284
|
var transformSize = (propertyName, val, props = {}, opts = {}) => {
|
|
2433
2285
|
let value = val || props[propertyName];
|
|
2434
|
-
if (isUndefined(value) && isNull(value))
|
|
2435
|
-
return;
|
|
2286
|
+
if (isUndefined(value) && isNull(value)) return;
|
|
2436
2287
|
const shouldScaleBoxSize = props.scaleBoxSize;
|
|
2437
2288
|
const isBoxSize = checkIfBoxSize(propertyName);
|
|
2438
2289
|
if (!shouldScaleBoxSize && isBoxSize && isString(value)) {
|
|
2439
2290
|
value = value.split(" ").map((v) => {
|
|
2440
2291
|
const isSingleLetter = v.length < 3 && /[A-Z]/.test(v);
|
|
2441
2292
|
const hasUnits = ["%", "vw", "vh", "ch"].some((unit) => value.includes(unit));
|
|
2442
|
-
if (isSingleLetter && !hasUnits)
|
|
2443
|
-
return v + "_default";
|
|
2293
|
+
if (isSingleLetter && !hasUnits) return v + "_default";
|
|
2444
2294
|
return v;
|
|
2445
2295
|
}).join(" ");
|
|
2446
2296
|
}
|
|
@@ -2458,8 +2308,7 @@ var transformSizeRatio = (propertyName, props) => {
|
|
|
2458
2308
|
|
|
2459
2309
|
// src/set.js
|
|
2460
2310
|
var setCases = (val, key) => {
|
|
2461
|
-
if (isFunction(val))
|
|
2462
|
-
return val();
|
|
2311
|
+
if (isFunction(val)) return val();
|
|
2463
2312
|
return val;
|
|
2464
2313
|
};
|
|
2465
2314
|
var setSameValue = (val, key) => val;
|
|
@@ -2495,12 +2344,10 @@ var setValue = (FACTORY_NAME, value, key) => {
|
|
|
2495
2344
|
FACTORY2[key] = result;
|
|
2496
2345
|
return FACTORY2;
|
|
2497
2346
|
} catch (error) {
|
|
2498
|
-
if (CONFIG2.verbose)
|
|
2499
|
-
console.warn("Error setting", factoryName, "value", value, key, error);
|
|
2347
|
+
if (CONFIG2.verbose) console.warn("Error setting", factoryName, "value", value, key, error);
|
|
2500
2348
|
}
|
|
2501
2349
|
}
|
|
2502
|
-
if (CONFIG2.verbose)
|
|
2503
|
-
console.warn("Can not find", factoryName, "method in scratch");
|
|
2350
|
+
if (CONFIG2.verbose) console.warn("Can not find", factoryName, "method in scratch");
|
|
2504
2351
|
};
|
|
2505
2352
|
var setEach = (factoryName, props) => {
|
|
2506
2353
|
const CONFIG2 = getActiveConfig();
|
|
@@ -2510,8 +2357,7 @@ var setEach = (factoryName, props) => {
|
|
|
2510
2357
|
try {
|
|
2511
2358
|
return setValue(FACTORY_NAME, props[key], key);
|
|
2512
2359
|
} catch (error) {
|
|
2513
|
-
if (CONFIG2.verbose)
|
|
2514
|
-
console.warn("Error setting", FACTORY_NAME, "value", props[key], key, error);
|
|
2360
|
+
if (CONFIG2.verbose) console.warn("Error setting", FACTORY_NAME, "value", props[key], key, error);
|
|
2515
2361
|
}
|
|
2516
2362
|
});
|
|
2517
2363
|
return CONFIG2[FACTORY_NAME];
|
|
@@ -2536,54 +2382,39 @@ var set = (recivedConfig, options = SET_OPTIONS) => {
|
|
|
2536
2382
|
if (options.newConfig) {
|
|
2537
2383
|
CONFIG2 = setActiveConfig(options.newConfig);
|
|
2538
2384
|
}
|
|
2539
|
-
if (verbose !== void 0)
|
|
2540
|
-
|
|
2541
|
-
if (
|
|
2542
|
-
|
|
2543
|
-
if (
|
|
2544
|
-
|
|
2545
|
-
if (
|
|
2546
|
-
|
|
2547
|
-
if (
|
|
2548
|
-
|
|
2549
|
-
if (
|
|
2550
|
-
|
|
2551
|
-
if (useDocumentTheme !== void 0)
|
|
2552
|
-
CONFIG2.useDocumentTheme = useDocumentTheme;
|
|
2553
|
-
if (globalTheme !== void 0)
|
|
2554
|
-
CONFIG2.globalTheme = globalTheme;
|
|
2555
|
-
if (useDefaultConfig !== void 0)
|
|
2556
|
-
CONFIG2.useDefaultConfig = useDefaultConfig;
|
|
2557
|
-
if (SEMANTIC_ICONS2 !== void 0)
|
|
2558
|
-
CONFIG2.SEMANTIC_ICONS = SEMANTIC_ICONS2;
|
|
2559
|
-
if (CONFIG2.verbose)
|
|
2560
|
-
console.log(CONFIG2);
|
|
2561
|
-
if (!CONFIG2.__svg_cache)
|
|
2562
|
-
CONFIG2.__svg_cache = {};
|
|
2385
|
+
if (verbose !== void 0) CONFIG2.verbose = verbose;
|
|
2386
|
+
if (useVariable !== void 0) CONFIG2.useVariable = useVariable;
|
|
2387
|
+
if (useReset !== void 0) CONFIG2.useReset = useReset;
|
|
2388
|
+
if (useFontImport !== void 0) CONFIG2.useFontImport = useFontImport;
|
|
2389
|
+
if (useSvgSprite !== void 0) CONFIG2.useSvgSprite = useSvgSprite;
|
|
2390
|
+
if (useIconSprite !== void 0) CONFIG2.useIconSprite = useIconSprite;
|
|
2391
|
+
if (useDocumentTheme !== void 0) CONFIG2.useDocumentTheme = useDocumentTheme;
|
|
2392
|
+
if (globalTheme !== void 0) CONFIG2.globalTheme = globalTheme;
|
|
2393
|
+
if (useDefaultConfig !== void 0) CONFIG2.useDefaultConfig = useDefaultConfig;
|
|
2394
|
+
if (SEMANTIC_ICONS2 !== void 0) CONFIG2.SEMANTIC_ICONS = SEMANTIC_ICONS2;
|
|
2395
|
+
if (CONFIG2.verbose) console.log(CONFIG2);
|
|
2396
|
+
if (!CONFIG2.__svg_cache) CONFIG2.__svg_cache = {};
|
|
2563
2397
|
const keys = Object.keys(config);
|
|
2564
2398
|
keys.map((key) => setEach(key, config[key]));
|
|
2565
2399
|
if (config.TYPOGRAPHY) {
|
|
2566
2400
|
try {
|
|
2567
2401
|
applyTypographySequence();
|
|
2568
2402
|
} catch (e) {
|
|
2569
|
-
if (CONFIG2.verbose)
|
|
2570
|
-
console.warn("Error applying typography sequence", e);
|
|
2403
|
+
if (CONFIG2.verbose) console.warn("Error applying typography sequence", e);
|
|
2571
2404
|
}
|
|
2572
2405
|
}
|
|
2573
2406
|
if (config.SPACING) {
|
|
2574
2407
|
try {
|
|
2575
2408
|
applySpacingSequence();
|
|
2576
2409
|
} catch (e) {
|
|
2577
|
-
if (CONFIG2.verbose)
|
|
2578
|
-
console.warn("Error applying typography sequence", e);
|
|
2410
|
+
if (CONFIG2.verbose) console.warn("Error applying typography sequence", e);
|
|
2579
2411
|
}
|
|
2580
2412
|
}
|
|
2581
2413
|
if (config.TIMING) {
|
|
2582
2414
|
try {
|
|
2583
2415
|
applyTimingSequence();
|
|
2584
2416
|
} catch (e) {
|
|
2585
|
-
if (CONFIG2.verbose)
|
|
2586
|
-
console.warn("Error applying typography sequence", e);
|
|
2417
|
+
if (CONFIG2.verbose) console.warn("Error applying typography sequence", e);
|
|
2587
2418
|
}
|
|
2588
2419
|
}
|
|
2589
2420
|
applyDocument();
|