@symbo.ls/uikit 2.10.285 → 2.10.290
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/index.cjs.js +400 -380
- package/dist/index.cjs.js.map +4 -4
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -873,7 +873,7 @@ var require_cjs = __commonJS({
|
|
|
873
873
|
BREAKPOINTS: () => BREAKPOINTS,
|
|
874
874
|
CASES: () => CASES,
|
|
875
875
|
COLOR: () => COLOR,
|
|
876
|
-
CONFIG: () =>
|
|
876
|
+
CONFIG: () => CONFIG2,
|
|
877
877
|
CSS_VARS: () => CSS_VARS,
|
|
878
878
|
DEVICES: () => DEVICES,
|
|
879
879
|
DOCUMENT: () => DOCUMENT,
|
|
@@ -893,7 +893,7 @@ var require_cjs = __commonJS({
|
|
|
893
893
|
THEME: () => THEME,
|
|
894
894
|
TIMING: () => TIMING,
|
|
895
895
|
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
896
|
-
UNIT: () =>
|
|
896
|
+
UNIT: () => UNIT4,
|
|
897
897
|
VALUE_TRANSFORMERS: () => VALUE_TRANSFORMERS,
|
|
898
898
|
activateConfig: () => activateConfig,
|
|
899
899
|
appendIconsSprite: () => appendIconsSprite,
|
|
@@ -913,7 +913,7 @@ var require_cjs = __commonJS({
|
|
|
913
913
|
generateSequence: () => generateSequence,
|
|
914
914
|
generateSprite: () => generateSprite,
|
|
915
915
|
generateSubSequence: () => generateSubSequence,
|
|
916
|
-
getActiveConfig: () =>
|
|
916
|
+
getActiveConfig: () => getActiveConfig2,
|
|
917
917
|
getColor: () => getColor5,
|
|
918
918
|
getColorShade: () => getColorShade,
|
|
919
919
|
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
@@ -1229,7 +1229,7 @@ var require_cjs = __commonJS({
|
|
|
1229
1229
|
THEME: () => THEME,
|
|
1230
1230
|
TIMING: () => TIMING,
|
|
1231
1231
|
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
1232
|
-
UNIT: () =>
|
|
1232
|
+
UNIT: () => UNIT4
|
|
1233
1233
|
});
|
|
1234
1234
|
var SEQUENCE = {
|
|
1235
1235
|
"minor-second": 1.067,
|
|
@@ -1257,7 +1257,7 @@ var require_cjs = __commonJS({
|
|
|
1257
1257
|
// archimedes
|
|
1258
1258
|
"double-octave": 4
|
|
1259
1259
|
};
|
|
1260
|
-
var
|
|
1260
|
+
var UNIT4 = {
|
|
1261
1261
|
default: "em"
|
|
1262
1262
|
};
|
|
1263
1263
|
var defaultProps = {
|
|
@@ -1368,17 +1368,17 @@ var require_cjs = __commonJS({
|
|
|
1368
1368
|
var SVG_DATA = {};
|
|
1369
1369
|
var RESET = {};
|
|
1370
1370
|
var CSS_VARS = {};
|
|
1371
|
-
var
|
|
1371
|
+
var CONFIG2 = {
|
|
1372
1372
|
verbose: false,
|
|
1373
1373
|
useVariable: true,
|
|
1374
1374
|
useReset: true,
|
|
1375
1375
|
CSS_VARS,
|
|
1376
1376
|
...defaultConfig_exports
|
|
1377
1377
|
};
|
|
1378
|
-
var cachedConfig = (0, import_utils32.deepClone)(
|
|
1378
|
+
var cachedConfig = (0, import_utils32.deepClone)(CONFIG2);
|
|
1379
1379
|
var FACTORY = {
|
|
1380
1380
|
active: "0",
|
|
1381
|
-
0:
|
|
1381
|
+
0: CONFIG2
|
|
1382
1382
|
};
|
|
1383
1383
|
var activateConfig = (def) => {
|
|
1384
1384
|
if ((0, import_utils32.isDefined)(def)) {
|
|
@@ -1386,7 +1386,7 @@ var require_cjs = __commonJS({
|
|
|
1386
1386
|
}
|
|
1387
1387
|
return FACTORY[def || FACTORY.active];
|
|
1388
1388
|
};
|
|
1389
|
-
var
|
|
1389
|
+
var getActiveConfig2 = (def) => {
|
|
1390
1390
|
return FACTORY[def || FACTORY.active];
|
|
1391
1391
|
};
|
|
1392
1392
|
var setActiveConfig = (newConfig) => {
|
|
@@ -1495,8 +1495,8 @@ var require_cjs = __commonJS({
|
|
|
1495
1495
|
return sequenceProps;
|
|
1496
1496
|
};
|
|
1497
1497
|
var getSequenceValue = (value = "A", sequenceProps) => {
|
|
1498
|
-
const
|
|
1499
|
-
const { UNIT: UNIT22 } =
|
|
1498
|
+
const CONFIG22 = getActiveConfig2();
|
|
1499
|
+
const { UNIT: UNIT22 } = CONFIG22;
|
|
1500
1500
|
const {
|
|
1501
1501
|
sequence,
|
|
1502
1502
|
unit = UNIT22.default,
|
|
@@ -1530,11 +1530,11 @@ var require_cjs = __commonJS({
|
|
|
1530
1530
|
return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
|
|
1531
1531
|
}
|
|
1532
1532
|
if (!sequence[absValue] && absValue.length === 2) {
|
|
1533
|
-
if (
|
|
1533
|
+
if (CONFIG22.verbose)
|
|
1534
1534
|
console.warn(absValue, "- value is not found because `subSequence` is set to false");
|
|
1535
1535
|
absValue = absValue.slice(0, 1);
|
|
1536
1536
|
}
|
|
1537
|
-
if (useVariable ||
|
|
1537
|
+
if (useVariable || CONFIG22.useVariable) {
|
|
1538
1538
|
const varValue2 = `var(${prefix2}${absValue}${mediaName})`;
|
|
1539
1539
|
return isNegative ? `calc(${varValue2} * -1)` : varValue2;
|
|
1540
1540
|
}
|
|
@@ -1565,16 +1565,16 @@ var require_cjs = __commonJS({
|
|
|
1565
1565
|
};
|
|
1566
1566
|
var import_utils62 = __toESM2(require_cjs32(), 1);
|
|
1567
1567
|
var setVariables = (result, key) => {
|
|
1568
|
-
const
|
|
1569
|
-
const { CSS_VARS: CSS_VARS2 } =
|
|
1568
|
+
const CONFIG22 = getActiveConfig2();
|
|
1569
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
1570
1570
|
if ((0, import_utils62.isObjectLike)(result.value)) {
|
|
1571
1571
|
} else {
|
|
1572
1572
|
CSS_VARS2[result.var] = result.value;
|
|
1573
1573
|
}
|
|
1574
1574
|
};
|
|
1575
1575
|
var applySequenceVars = (props3, mediaName, options = {}) => {
|
|
1576
|
-
const
|
|
1577
|
-
const { UNIT: UNIT22, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } =
|
|
1576
|
+
const CONFIG22 = getActiveConfig2();
|
|
1577
|
+
const { UNIT: UNIT22, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
1578
1578
|
const unit = props3.unit || UNIT22.default;
|
|
1579
1579
|
const { sequence, scales } = props3;
|
|
1580
1580
|
for (const key in sequence) {
|
|
@@ -1583,7 +1583,7 @@ var require_cjs = __commonJS({
|
|
|
1583
1583
|
if (mediaName) {
|
|
1584
1584
|
const query = MEDIA2[mediaName];
|
|
1585
1585
|
if (!query) {
|
|
1586
|
-
if (
|
|
1586
|
+
if (CONFIG22.verbose)
|
|
1587
1587
|
console.warn("Can't find query ", query);
|
|
1588
1588
|
}
|
|
1589
1589
|
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
@@ -1603,13 +1603,13 @@ var require_cjs = __commonJS({
|
|
|
1603
1603
|
};
|
|
1604
1604
|
var import_utils72 = __toESM2(require_cjs32(), 1);
|
|
1605
1605
|
var generateSprite = (icons) => {
|
|
1606
|
-
const
|
|
1606
|
+
const CONFIG22 = getActiveConfig2();
|
|
1607
1607
|
let sprite = "";
|
|
1608
1608
|
for (const key in icons) {
|
|
1609
|
-
if (
|
|
1609
|
+
if (CONFIG22.__svg_cache[key])
|
|
1610
1610
|
continue;
|
|
1611
1611
|
else
|
|
1612
|
-
|
|
1612
|
+
CONFIG22.__svg_cache[key] = true;
|
|
1613
1613
|
sprite += icons[key];
|
|
1614
1614
|
}
|
|
1615
1615
|
return sprite;
|
|
@@ -1676,9 +1676,9 @@ var require_cjs = __commonJS({
|
|
|
1676
1676
|
});
|
|
1677
1677
|
var import_utils82 = __toESM2(require_cjs32(), 1);
|
|
1678
1678
|
var getColor5 = (value, key) => {
|
|
1679
|
-
const
|
|
1679
|
+
const CONFIG22 = getActiveConfig2();
|
|
1680
1680
|
if (!(0, import_utils82.isString)(value)) {
|
|
1681
|
-
if (
|
|
1681
|
+
if (CONFIG22.verbose)
|
|
1682
1682
|
console.warn(value, "- type for color is not valid");
|
|
1683
1683
|
return;
|
|
1684
1684
|
}
|
|
@@ -1687,17 +1687,17 @@ var require_cjs = __commonJS({
|
|
|
1687
1687
|
if (key && value[key])
|
|
1688
1688
|
value = value[key];
|
|
1689
1689
|
const [name, alpha, tone] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
1690
|
-
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } =
|
|
1690
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
1691
1691
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
1692
1692
|
if (!val) {
|
|
1693
|
-
if (
|
|
1693
|
+
if (CONFIG22.verbose)
|
|
1694
1694
|
console.warn("Can't find color ", name);
|
|
1695
1695
|
return value;
|
|
1696
1696
|
}
|
|
1697
1697
|
if (key) {
|
|
1698
1698
|
if (val[key])
|
|
1699
1699
|
val = val[key];
|
|
1700
|
-
else if (
|
|
1700
|
+
else if (CONFIG22.verbose)
|
|
1701
1701
|
console.warn(value, " - does not have ", key);
|
|
1702
1702
|
}
|
|
1703
1703
|
let rgb = val.rgb;
|
|
@@ -1723,23 +1723,23 @@ var require_cjs = __commonJS({
|
|
|
1723
1723
|
}
|
|
1724
1724
|
if (alpha)
|
|
1725
1725
|
return `rgba(${rgb}, ${alpha})`;
|
|
1726
|
-
return
|
|
1726
|
+
return CONFIG22.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
1727
1727
|
} else
|
|
1728
|
-
return
|
|
1728
|
+
return CONFIG22.useVariable ? `var(${val.var})` : val.value;
|
|
1729
1729
|
};
|
|
1730
1730
|
var getMediaColor9 = (value, globalTheme) => {
|
|
1731
|
-
const
|
|
1731
|
+
const CONFIG22 = getActiveConfig2();
|
|
1732
1732
|
if (!globalTheme)
|
|
1733
|
-
globalTheme =
|
|
1733
|
+
globalTheme = CONFIG22.globalTheme;
|
|
1734
1734
|
if (!(0, import_utils82.isString)(value)) {
|
|
1735
|
-
if (
|
|
1735
|
+
if (CONFIG22.verbose)
|
|
1736
1736
|
console.warn(value, "- type for color is not valid");
|
|
1737
1737
|
return;
|
|
1738
1738
|
}
|
|
1739
1739
|
if (value.slice(0, 2) === "--")
|
|
1740
1740
|
return `var(${value})`;
|
|
1741
1741
|
const [name] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
1742
|
-
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } =
|
|
1742
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
1743
1743
|
const val = COLOR2[name] || GRADIENT2[name];
|
|
1744
1744
|
const isObj = (0, import_utils82.isObject)(val);
|
|
1745
1745
|
if (isObj && val.value)
|
|
@@ -1750,20 +1750,20 @@ var require_cjs = __commonJS({
|
|
|
1750
1750
|
else {
|
|
1751
1751
|
const obj = {};
|
|
1752
1752
|
for (const mediaName in val) {
|
|
1753
|
-
const query =
|
|
1753
|
+
const query = CONFIG22.MEDIA[mediaName.slice(1)];
|
|
1754
1754
|
const media = `@media screen and ${query}`;
|
|
1755
1755
|
obj[media] = getColor5(value, mediaName);
|
|
1756
1756
|
}
|
|
1757
1757
|
return obj;
|
|
1758
1758
|
}
|
|
1759
1759
|
} else {
|
|
1760
|
-
if (
|
|
1760
|
+
if (CONFIG22.verbose)
|
|
1761
1761
|
console.warn("Can't find color", value);
|
|
1762
1762
|
return value;
|
|
1763
1763
|
}
|
|
1764
1764
|
};
|
|
1765
1765
|
var setColor = (val, key, suffix) => {
|
|
1766
|
-
const
|
|
1766
|
+
const CONFIG22 = getActiveConfig2();
|
|
1767
1767
|
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
1768
1768
|
val = getColor5(val.slice(2));
|
|
1769
1769
|
if ((0, import_utils82.isArray)(val)) {
|
|
@@ -1783,8 +1783,8 @@ var require_cjs = __commonJS({
|
|
|
1783
1783
|
const alpha = parseFloat(a.toFixed(2));
|
|
1784
1784
|
const rgb = `${r}, ${g}, ${b}`;
|
|
1785
1785
|
const value = `rgba(${rgb}, ${alpha})`;
|
|
1786
|
-
if (
|
|
1787
|
-
|
|
1786
|
+
if (CONFIG22.useVariable) {
|
|
1787
|
+
CONFIG22.CSS_VARS[CSSVar] = value;
|
|
1788
1788
|
}
|
|
1789
1789
|
return {
|
|
1790
1790
|
var: CSSVar,
|
|
@@ -1794,7 +1794,7 @@ var require_cjs = __commonJS({
|
|
|
1794
1794
|
};
|
|
1795
1795
|
};
|
|
1796
1796
|
var setGradient = (val, key, suffix) => {
|
|
1797
|
-
const
|
|
1797
|
+
const CONFIG22 = getActiveConfig2();
|
|
1798
1798
|
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
1799
1799
|
val = getColor5(val.slice(2));
|
|
1800
1800
|
if ((0, import_utils82.isArray)(val)) {
|
|
@@ -1810,8 +1810,8 @@ var require_cjs = __commonJS({
|
|
|
1810
1810
|
return obj;
|
|
1811
1811
|
}
|
|
1812
1812
|
const CSSVar = `--gradient-${key}` + (suffix ? `-${suffix}` : "");
|
|
1813
|
-
if (
|
|
1814
|
-
|
|
1813
|
+
if (CONFIG22.useVariable) {
|
|
1814
|
+
CONFIG22.CSS_VARS[CSSVar] = val.value || val;
|
|
1815
1815
|
}
|
|
1816
1816
|
return {
|
|
1817
1817
|
var: CSSVar,
|
|
@@ -1837,10 +1837,10 @@ var require_cjs = __commonJS({
|
|
|
1837
1837
|
return theme.value;
|
|
1838
1838
|
};
|
|
1839
1839
|
var getTheme5 = (value, modifier) => {
|
|
1840
|
-
const
|
|
1841
|
-
if (
|
|
1840
|
+
const CONFIG22 = getActiveConfig2();
|
|
1841
|
+
if (CONFIG22.useVariable)
|
|
1842
1842
|
return getMediaTheme5(value, modifier);
|
|
1843
|
-
const { THEME: THEME2 } =
|
|
1843
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
1844
1844
|
if ((0, import_utils102.isString)(value)) {
|
|
1845
1845
|
const [theme, subtheme] = value.split(" ");
|
|
1846
1846
|
const isOurTheme = THEME2[theme];
|
|
@@ -1916,7 +1916,7 @@ var require_cjs = __commonJS({
|
|
|
1916
1916
|
return theme;
|
|
1917
1917
|
};
|
|
1918
1918
|
var setHelpers = (theme, value) => {
|
|
1919
|
-
const
|
|
1919
|
+
const CONFIG22 = getActiveConfig2();
|
|
1920
1920
|
const { helpers } = theme;
|
|
1921
1921
|
if (!helpers)
|
|
1922
1922
|
return;
|
|
@@ -1924,7 +1924,7 @@ var require_cjs = __commonJS({
|
|
|
1924
1924
|
keys.map((key) => {
|
|
1925
1925
|
const helper = helpers[key];
|
|
1926
1926
|
if ((0, import_utils102.isString)(helper))
|
|
1927
|
-
helpers[key] =
|
|
1927
|
+
helpers[key] = CONFIG22.THEME[helper];
|
|
1928
1928
|
else
|
|
1929
1929
|
getThemeValue(helpers[key]);
|
|
1930
1930
|
return theme;
|
|
@@ -1932,8 +1932,8 @@ var require_cjs = __commonJS({
|
|
|
1932
1932
|
return theme;
|
|
1933
1933
|
};
|
|
1934
1934
|
var setTheme = (val, key) => {
|
|
1935
|
-
const
|
|
1936
|
-
if (
|
|
1935
|
+
const CONFIG22 = getActiveConfig2();
|
|
1936
|
+
if (CONFIG22.useVariable)
|
|
1937
1937
|
return setMediaTheme(val, key);
|
|
1938
1938
|
const { state, media, helpers } = val;
|
|
1939
1939
|
const value = setThemeValue(val, key);
|
|
@@ -1944,8 +1944,8 @@ var require_cjs = __commonJS({
|
|
|
1944
1944
|
return { var: CSSvar, value, state, media, helpers };
|
|
1945
1945
|
};
|
|
1946
1946
|
var setMediaTheme = (val, key, suffix, prefers) => {
|
|
1947
|
-
const
|
|
1948
|
-
const { CSS_VARS: CSS_VARS2 } =
|
|
1947
|
+
const CONFIG22 = getActiveConfig2();
|
|
1948
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
1949
1949
|
const theme = { value: val };
|
|
1950
1950
|
if ((0, import_utils102.isObjectLike)(val)) {
|
|
1951
1951
|
for (const param in val) {
|
|
@@ -1959,7 +1959,7 @@ var require_cjs = __commonJS({
|
|
|
1959
1959
|
const metaSuffixes = [...new Set([prefers, suffix].filter((v) => v).map((v) => v.slice(1)))];
|
|
1960
1960
|
const varmetaSuffixName = metaSuffixes.length ? "-" + metaSuffixes.join("-") : "";
|
|
1961
1961
|
const CSSVar = `--theme-${key}${varmetaSuffixName}-${param}`;
|
|
1962
|
-
if (
|
|
1962
|
+
if (CONFIG22.useVariable) {
|
|
1963
1963
|
CSS_VARS2[CSSVar] = color;
|
|
1964
1964
|
theme[param] = `var(${CSSVar})`;
|
|
1965
1965
|
} else {
|
|
@@ -1976,7 +1976,7 @@ var require_cjs = __commonJS({
|
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
1978
|
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--") {
|
|
1979
|
-
const { THEME: THEME2 } =
|
|
1979
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
1980
1980
|
const value = THEME2[val.slice(2)];
|
|
1981
1981
|
const getReferenced = getMediaTheme5(value, prefers);
|
|
1982
1982
|
return getReferenced;
|
|
@@ -1984,13 +1984,13 @@ var require_cjs = __commonJS({
|
|
|
1984
1984
|
return theme;
|
|
1985
1985
|
};
|
|
1986
1986
|
var recursiveTheme = (val) => {
|
|
1987
|
-
const
|
|
1987
|
+
const CONFIG22 = getActiveConfig2();
|
|
1988
1988
|
const obj = {};
|
|
1989
1989
|
for (const param in val) {
|
|
1990
1990
|
const symb = param.slice(0, 1);
|
|
1991
1991
|
if ((0, import_utils102.isObjectLike)(val[param])) {
|
|
1992
1992
|
if (symb === "@") {
|
|
1993
|
-
const query =
|
|
1993
|
+
const query = CONFIG22.MEDIA[param.slice(1)];
|
|
1994
1994
|
const media = `@media screen and ${query}`;
|
|
1995
1995
|
obj[media] = recursiveTheme(val[param]);
|
|
1996
1996
|
} else if (symb === ":") {
|
|
@@ -2016,16 +2016,16 @@ var require_cjs = __commonJS({
|
|
|
2016
2016
|
return val;
|
|
2017
2017
|
};
|
|
2018
2018
|
var getMediaTheme5 = (val, mod) => {
|
|
2019
|
-
const
|
|
2019
|
+
const CONFIG22 = getActiveConfig2();
|
|
2020
2020
|
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--")
|
|
2021
2021
|
val = getMediaTheme5(val.slice(2));
|
|
2022
2022
|
if (!val || !(0, import_utils102.isString)(val)) {
|
|
2023
|
-
if (
|
|
2023
|
+
if (CONFIG22.verbose)
|
|
2024
2024
|
console.warn(val, "- theme is not string");
|
|
2025
2025
|
return;
|
|
2026
2026
|
}
|
|
2027
2027
|
const [name, ...modifier] = (0, import_utils102.isArray)(val) ? val : val.split(" ");
|
|
2028
|
-
let value =
|
|
2028
|
+
let value = CONFIG22.THEME[name];
|
|
2029
2029
|
if (value && (modifier || mod)) {
|
|
2030
2030
|
value = findModifier(value, modifier.length ? modifier : mod);
|
|
2031
2031
|
}
|
|
@@ -2039,13 +2039,13 @@ var require_cjs = __commonJS({
|
|
|
2039
2039
|
return { var: CSSvar, value: val, fontFace };
|
|
2040
2040
|
};
|
|
2041
2041
|
var getFontFamily5 = (key, factory) => {
|
|
2042
|
-
const
|
|
2043
|
-
const { FONT_FAMILY: FONT_FAMILY2 } =
|
|
2042
|
+
const CONFIG22 = getActiveConfig2();
|
|
2043
|
+
const { FONT_FAMILY: FONT_FAMILY2 } = CONFIG22;
|
|
2044
2044
|
return getDefaultOrFirstKey(factory || FONT_FAMILY2, key);
|
|
2045
2045
|
};
|
|
2046
2046
|
var setFontFamily = (val, key) => {
|
|
2047
|
-
const
|
|
2048
|
-
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } =
|
|
2047
|
+
const CONFIG22 = getActiveConfig2();
|
|
2048
|
+
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } = CONFIG22;
|
|
2049
2049
|
let { value, type } = val;
|
|
2050
2050
|
if (val.isDefault)
|
|
2051
2051
|
FONT_FAMILY2.default = key;
|
|
@@ -2057,8 +2057,8 @@ var require_cjs = __commonJS({
|
|
|
2057
2057
|
};
|
|
2058
2058
|
var import_utils142 = __toESM2(require_cjs32(), 1);
|
|
2059
2059
|
var runThroughMedia = (props3) => {
|
|
2060
|
-
const
|
|
2061
|
-
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } =
|
|
2060
|
+
const CONFIG22 = getActiveConfig2();
|
|
2061
|
+
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG22;
|
|
2062
2062
|
for (const prop in props3) {
|
|
2063
2063
|
const mediaProps = props3[prop];
|
|
2064
2064
|
if (prop.slice(0, 1) === "@") {
|
|
@@ -2087,7 +2087,7 @@ var require_cjs = __commonJS({
|
|
|
2087
2087
|
}
|
|
2088
2088
|
};
|
|
2089
2089
|
var applyHeadings = (props3) => {
|
|
2090
|
-
const
|
|
2090
|
+
const CONFIG22 = getActiveConfig2();
|
|
2091
2091
|
if (props3.h1Matches) {
|
|
2092
2092
|
const unit = props3.unit;
|
|
2093
2093
|
const HEADINGS = findHeadings(props3);
|
|
@@ -2096,7 +2096,7 @@ var require_cjs = __commonJS({
|
|
|
2096
2096
|
const headerName = `h${parseInt(k) + 1}`;
|
|
2097
2097
|
const headerStyle = templates[headerName];
|
|
2098
2098
|
templates[headerName] = {
|
|
2099
|
-
fontSize:
|
|
2099
|
+
fontSize: CONFIG22.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
|
|
2100
2100
|
margin: headerStyle ? headerStyle.margin : 0,
|
|
2101
2101
|
lineHeight: headerStyle ? headerStyle.lineHeight : props3.lineHeight,
|
|
2102
2102
|
letterSpacing: headerStyle ? headerStyle.letterSpacing : props3.letterSpacing,
|
|
@@ -2106,16 +2106,16 @@ var require_cjs = __commonJS({
|
|
|
2106
2106
|
}
|
|
2107
2107
|
};
|
|
2108
2108
|
var applyTypographySequence = () => {
|
|
2109
|
-
const
|
|
2110
|
-
const { TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
2109
|
+
const CONFIG22 = getActiveConfig2();
|
|
2110
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
2111
2111
|
generateSequence(TYPOGRAPHY2);
|
|
2112
2112
|
applyHeadings(TYPOGRAPHY2);
|
|
2113
2113
|
applySequenceVars(TYPOGRAPHY2);
|
|
2114
2114
|
runThroughMedia(TYPOGRAPHY2);
|
|
2115
2115
|
};
|
|
2116
2116
|
var getFontSizeByKey5 = (value) => {
|
|
2117
|
-
const
|
|
2118
|
-
const { TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
2117
|
+
const CONFIG22 = getActiveConfig2();
|
|
2118
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
2119
2119
|
return getSequenceValuePropertyPair(
|
|
2120
2120
|
value,
|
|
2121
2121
|
"fontSize",
|
|
@@ -2148,15 +2148,15 @@ var require_cjs = __commonJS({
|
|
|
2148
2148
|
}
|
|
2149
2149
|
};
|
|
2150
2150
|
var applySpacingSequence = () => {
|
|
2151
|
-
const
|
|
2152
|
-
const { SPACING: SPACING2 } =
|
|
2151
|
+
const CONFIG22 = getActiveConfig2();
|
|
2152
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
2153
2153
|
generateSequence(SPACING2);
|
|
2154
2154
|
applySequenceVars(SPACING2);
|
|
2155
2155
|
runThroughMedia2(SPACING2);
|
|
2156
2156
|
};
|
|
2157
2157
|
var getSequence = (sequenceProps) => {
|
|
2158
|
-
const
|
|
2159
|
-
const { SPACING: SPACING2 } =
|
|
2158
|
+
const CONFIG22 = getActiveConfig2();
|
|
2159
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
2160
2160
|
if (!sequenceProps)
|
|
2161
2161
|
return SPACING2;
|
|
2162
2162
|
const hasGenerated = Object.keys(sequenceProps.sequence).length > 0;
|
|
@@ -2195,8 +2195,8 @@ var require_cjs = __commonJS({
|
|
|
2195
2195
|
);
|
|
2196
2196
|
};
|
|
2197
2197
|
var getSpacingBasedOnRatio13 = (props3, propertyName, val) => {
|
|
2198
|
-
const
|
|
2199
|
-
const { SPACING: SPACING2 } =
|
|
2198
|
+
const CONFIG22 = getActiveConfig2();
|
|
2199
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
2200
2200
|
const { spacingRatio, unit } = props3;
|
|
2201
2201
|
const value = val || props3[propertyName];
|
|
2202
2202
|
if (spacingRatio) {
|
|
@@ -2225,19 +2225,19 @@ var require_cjs = __commonJS({
|
|
|
2225
2225
|
return getSpacingByKey9(value, propertyName);
|
|
2226
2226
|
};
|
|
2227
2227
|
var applyTimingSequence = () => {
|
|
2228
|
-
const
|
|
2229
|
-
const { TIMING: TIMING2 } =
|
|
2228
|
+
const CONFIG22 = getActiveConfig2();
|
|
2229
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
2230
2230
|
generateSequence(TIMING2);
|
|
2231
2231
|
applySequenceVars(TIMING2);
|
|
2232
2232
|
};
|
|
2233
2233
|
var getTimingFunction9 = (value) => {
|
|
2234
|
-
const
|
|
2235
|
-
const { TIMING: TIMING2 } =
|
|
2234
|
+
const CONFIG22 = getActiveConfig2();
|
|
2235
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
2236
2236
|
return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
|
|
2237
2237
|
};
|
|
2238
2238
|
var getTimingByKey5 = (value, property = "timing") => {
|
|
2239
|
-
const
|
|
2240
|
-
const { TIMING: TIMING2 } =
|
|
2239
|
+
const CONFIG22 = getActiveConfig2();
|
|
2240
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
2241
2241
|
return getSequenceValuePropertyPair(
|
|
2242
2242
|
value,
|
|
2243
2243
|
property,
|
|
@@ -2246,8 +2246,8 @@ var require_cjs = __commonJS({
|
|
|
2246
2246
|
};
|
|
2247
2247
|
var import_utils21 = __toESM2(require_cjs32(), 1);
|
|
2248
2248
|
var applyDocument = () => {
|
|
2249
|
-
const
|
|
2250
|
-
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
2249
|
+
const CONFIG22 = getActiveConfig2();
|
|
2250
|
+
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
2251
2251
|
return (0, import_utils21.merge)(DOCUMENT2, {
|
|
2252
2252
|
theme: THEME2.document,
|
|
2253
2253
|
fontFamily: getDefaultOrFirstKey(FONT_FAMILY2),
|
|
@@ -2260,36 +2260,36 @@ var require_cjs = __commonJS({
|
|
|
2260
2260
|
document: import_globals2.document
|
|
2261
2261
|
};
|
|
2262
2262
|
var setSVG = (val, key) => {
|
|
2263
|
-
const
|
|
2263
|
+
const CONFIG22 = getActiveConfig2();
|
|
2264
2264
|
if (!val) {
|
|
2265
|
-
if (
|
|
2265
|
+
if (CONFIG22.verbose)
|
|
2266
2266
|
console.warn("setSVG: val is not defined", key);
|
|
2267
2267
|
return;
|
|
2268
2268
|
}
|
|
2269
|
-
if (
|
|
2269
|
+
if (CONFIG22.useSvgSprite) {
|
|
2270
2270
|
return convertSvgToSymbol(key, val);
|
|
2271
2271
|
}
|
|
2272
2272
|
return val;
|
|
2273
2273
|
};
|
|
2274
2274
|
var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
2275
|
-
const
|
|
2276
|
-
const lib = Object.keys(LIBRARY).length ? {} :
|
|
2275
|
+
const CONFIG22 = getActiveConfig2();
|
|
2276
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.SVG;
|
|
2277
2277
|
for (const key in LIBRARY)
|
|
2278
|
-
lib[key] =
|
|
2278
|
+
lib[key] = CONFIG22.SVG[key];
|
|
2279
2279
|
appendSVG(lib, options);
|
|
2280
2280
|
};
|
|
2281
2281
|
var setIcon = (val, key) => {
|
|
2282
|
-
const
|
|
2283
|
-
if (
|
|
2282
|
+
const CONFIG22 = getActiveConfig2();
|
|
2283
|
+
if (CONFIG22.useIconSprite) {
|
|
2284
2284
|
return setSVG(val, key);
|
|
2285
2285
|
}
|
|
2286
2286
|
return val;
|
|
2287
2287
|
};
|
|
2288
2288
|
var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
2289
|
-
const
|
|
2290
|
-
const lib = Object.keys(LIBRARY).length ? {} :
|
|
2289
|
+
const CONFIG22 = getActiveConfig2();
|
|
2290
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.ICONS;
|
|
2291
2291
|
for (const key in LIBRARY)
|
|
2292
|
-
lib[key] =
|
|
2292
|
+
lib[key] = CONFIG22.ICONS[key];
|
|
2293
2293
|
appendSVG(lib, options);
|
|
2294
2294
|
};
|
|
2295
2295
|
var createSVGSpriteElement = (options = { isRoot: true }) => {
|
|
@@ -2304,10 +2304,10 @@ var require_cjs = __commonJS({
|
|
|
2304
2304
|
return svgElem;
|
|
2305
2305
|
};
|
|
2306
2306
|
var appendSVG = (lib, options = DEF_OPTIONS) => {
|
|
2307
|
-
const
|
|
2307
|
+
const CONFIG22 = getActiveConfig2();
|
|
2308
2308
|
const doc = options.document || import_globals2.document;
|
|
2309
2309
|
if (!doc) {
|
|
2310
|
-
if (
|
|
2310
|
+
if (CONFIG22.verbose) {
|
|
2311
2311
|
console.warn("To append SVG sprites it should be run in browser environment");
|
|
2312
2312
|
}
|
|
2313
2313
|
return generateSprite(lib);
|
|
@@ -2326,14 +2326,14 @@ var require_cjs = __commonJS({
|
|
|
2326
2326
|
};
|
|
2327
2327
|
var import_utils24 = __toESM2(require_cjs32(), 1);
|
|
2328
2328
|
var applyReset = (reset = {}) => {
|
|
2329
|
-
const
|
|
2330
|
-
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } =
|
|
2329
|
+
const CONFIG22 = getActiveConfig2();
|
|
2330
|
+
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG22;
|
|
2331
2331
|
if (RESET2) {
|
|
2332
2332
|
if (RESET2[":root"]) {
|
|
2333
2333
|
const configReset = RESET2;
|
|
2334
2334
|
const configTemplates = TYPOGRAPHY2.templates;
|
|
2335
2335
|
configReset.body = {
|
|
2336
|
-
...
|
|
2336
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
2337
2337
|
...configTemplates.body
|
|
2338
2338
|
};
|
|
2339
2339
|
configReset.h1 = configTemplates.h1;
|
|
@@ -2356,7 +2356,7 @@ var require_cjs = __commonJS({
|
|
|
2356
2356
|
WebkitFontSmoothing: "antialiased",
|
|
2357
2357
|
scrollBehavior: "smooth",
|
|
2358
2358
|
fontSize: TYPOGRAPHY2.browserDefault + "px",
|
|
2359
|
-
...
|
|
2359
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
2360
2360
|
fontFamily: DOCUMENT2.fontFamily,
|
|
2361
2361
|
lineHeight: DOCUMENT2.lineHeight
|
|
2362
2362
|
},
|
|
@@ -2365,7 +2365,7 @@ var require_cjs = __commonJS({
|
|
|
2365
2365
|
height: "100%",
|
|
2366
2366
|
margin: 0,
|
|
2367
2367
|
fontFamily: DOCUMENT2.fontFamily,
|
|
2368
|
-
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault +
|
|
2368
|
+
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault + CONFIG22.UNIT.default,
|
|
2369
2369
|
...templates,
|
|
2370
2370
|
...body
|
|
2371
2371
|
},
|
|
@@ -2437,15 +2437,15 @@ var require_cjs = __commonJS({
|
|
|
2437
2437
|
}).join(" ");
|
|
2438
2438
|
}).join(",");
|
|
2439
2439
|
var transformBackgroundImage5 = (backgroundImage, globalTheme) => {
|
|
2440
|
-
const
|
|
2440
|
+
const CONFIG22 = getActiveConfig2();
|
|
2441
2441
|
return backgroundImage.split(", ").map((v) => {
|
|
2442
2442
|
if (v.slice(0, 2) === "--")
|
|
2443
2443
|
return `var(${v})`;
|
|
2444
2444
|
if (v.includes("url") || v.includes("gradient"))
|
|
2445
2445
|
return v;
|
|
2446
|
-
else if (
|
|
2446
|
+
else if (CONFIG22.GRADIENT[backgroundImage]) {
|
|
2447
2447
|
return {
|
|
2448
|
-
backgroundImage: getMediaColor9(backgroundImage, globalTheme ||
|
|
2448
|
+
backgroundImage: getMediaColor9(backgroundImage, globalTheme || CONFIG22.globalTheme)
|
|
2449
2449
|
};
|
|
2450
2450
|
} else if (v.includes("/") || v.includes("http"))
|
|
2451
2451
|
return `url(${v})`;
|
|
@@ -2506,27 +2506,27 @@ var require_cjs = __commonJS({
|
|
|
2506
2506
|
animation: setSameValue
|
|
2507
2507
|
};
|
|
2508
2508
|
var setValue = (FACTORY_NAME, value, key) => {
|
|
2509
|
-
const
|
|
2509
|
+
const CONFIG22 = getActiveConfig2();
|
|
2510
2510
|
const factoryName = FACTORY_NAME.toLowerCase();
|
|
2511
|
-
const FACTORY2 =
|
|
2511
|
+
const FACTORY2 = CONFIG22[FACTORY_NAME];
|
|
2512
2512
|
if (VALUE_TRANSFORMERS[factoryName]) {
|
|
2513
2513
|
const result = VALUE_TRANSFORMERS[factoryName](value, key);
|
|
2514
2514
|
FACTORY2[key] = result;
|
|
2515
2515
|
return FACTORY2;
|
|
2516
2516
|
}
|
|
2517
|
-
if (
|
|
2517
|
+
if (CONFIG22.verbose)
|
|
2518
2518
|
console.warn("Can not find", factoryName, "method in scratch");
|
|
2519
2519
|
};
|
|
2520
2520
|
var setEach = (factoryName, props3) => {
|
|
2521
|
-
const
|
|
2521
|
+
const CONFIG22 = getActiveConfig2();
|
|
2522
2522
|
const FACTORY_NAME = factoryName.toUpperCase();
|
|
2523
2523
|
const keys = Object.keys(props3);
|
|
2524
2524
|
keys.map((key) => setValue(FACTORY_NAME, props3[key], key));
|
|
2525
|
-
return
|
|
2525
|
+
return CONFIG22[FACTORY_NAME];
|
|
2526
2526
|
};
|
|
2527
2527
|
var SET_OPTIONS = {};
|
|
2528
2528
|
var set2 = (recivedConfig, options = SET_OPTIONS) => {
|
|
2529
|
-
let
|
|
2529
|
+
let CONFIG22 = getActiveConfig2();
|
|
2530
2530
|
const {
|
|
2531
2531
|
version,
|
|
2532
2532
|
verbose,
|
|
@@ -2540,28 +2540,28 @@ var require_cjs = __commonJS({
|
|
|
2540
2540
|
...config
|
|
2541
2541
|
} = recivedConfig;
|
|
2542
2542
|
if (options.newConfig) {
|
|
2543
|
-
|
|
2543
|
+
CONFIG22 = setActiveConfig(options.newConfig);
|
|
2544
2544
|
}
|
|
2545
2545
|
if (verbose !== void 0)
|
|
2546
|
-
|
|
2546
|
+
CONFIG22.verbose = verbose;
|
|
2547
2547
|
if (useVariable !== void 0)
|
|
2548
|
-
|
|
2548
|
+
CONFIG22.useVariable = useVariable;
|
|
2549
2549
|
if (useReset !== void 0)
|
|
2550
|
-
|
|
2550
|
+
CONFIG22.useReset = useReset;
|
|
2551
2551
|
if (useFontImport !== void 0)
|
|
2552
|
-
|
|
2552
|
+
CONFIG22.useFontImport = useFontImport;
|
|
2553
2553
|
if (useSvgSprite !== void 0)
|
|
2554
|
-
|
|
2554
|
+
CONFIG22.useSvgSprite = useSvgSprite;
|
|
2555
2555
|
if (useIconSprite !== void 0)
|
|
2556
|
-
|
|
2556
|
+
CONFIG22.useIconSprite = useIconSprite;
|
|
2557
2557
|
if (useDocumentTheme !== void 0)
|
|
2558
|
-
|
|
2558
|
+
CONFIG22.useDocumentTheme = useDocumentTheme;
|
|
2559
2559
|
if (globalTheme !== void 0)
|
|
2560
|
-
|
|
2561
|
-
if (
|
|
2562
|
-
console.log(
|
|
2563
|
-
if (!
|
|
2564
|
-
|
|
2560
|
+
CONFIG22.globalTheme = globalTheme;
|
|
2561
|
+
if (CONFIG22.verbose)
|
|
2562
|
+
console.log(CONFIG22);
|
|
2563
|
+
if (!CONFIG22.__svg_cache)
|
|
2564
|
+
CONFIG22.__svg_cache = {};
|
|
2565
2565
|
const keys = Object.keys(config);
|
|
2566
2566
|
keys.map((key) => setEach(key, config[key]));
|
|
2567
2567
|
applyTypographySequence();
|
|
@@ -2569,7 +2569,7 @@ var require_cjs = __commonJS({
|
|
|
2569
2569
|
applyTimingSequence();
|
|
2570
2570
|
applyDocument();
|
|
2571
2571
|
applyReset();
|
|
2572
|
-
return
|
|
2572
|
+
return CONFIG22;
|
|
2573
2573
|
};
|
|
2574
2574
|
}
|
|
2575
2575
|
});
|
|
@@ -4240,7 +4240,7 @@ var require_cjs5 = __commonJS({
|
|
|
4240
4240
|
BREAKPOINTS: () => BREAKPOINTS,
|
|
4241
4241
|
CASES: () => CASES,
|
|
4242
4242
|
COLOR: () => COLOR,
|
|
4243
|
-
CONFIG: () =>
|
|
4243
|
+
CONFIG: () => CONFIG2,
|
|
4244
4244
|
CSS_VARS: () => CSS_VARS,
|
|
4245
4245
|
DEVICES: () => DEVICES,
|
|
4246
4246
|
DOCUMENT: () => DOCUMENT,
|
|
@@ -4260,7 +4260,7 @@ var require_cjs5 = __commonJS({
|
|
|
4260
4260
|
THEME: () => THEME,
|
|
4261
4261
|
TIMING: () => TIMING,
|
|
4262
4262
|
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
4263
|
-
UNIT: () =>
|
|
4263
|
+
UNIT: () => UNIT4,
|
|
4264
4264
|
VALUE_TRANSFORMERS: () => VALUE_TRANSFORMERS,
|
|
4265
4265
|
activateConfig: () => activateConfig,
|
|
4266
4266
|
appendIconsSprite: () => appendIconsSprite,
|
|
@@ -4280,7 +4280,7 @@ var require_cjs5 = __commonJS({
|
|
|
4280
4280
|
generateSequence: () => generateSequence,
|
|
4281
4281
|
generateSprite: () => generateSprite,
|
|
4282
4282
|
generateSubSequence: () => generateSubSequence,
|
|
4283
|
-
getActiveConfig: () =>
|
|
4283
|
+
getActiveConfig: () => getActiveConfig2,
|
|
4284
4284
|
getColor: () => getColor5,
|
|
4285
4285
|
getColorShade: () => getColorShade,
|
|
4286
4286
|
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
@@ -4596,7 +4596,7 @@ var require_cjs5 = __commonJS({
|
|
|
4596
4596
|
THEME: () => THEME,
|
|
4597
4597
|
TIMING: () => TIMING,
|
|
4598
4598
|
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
4599
|
-
UNIT: () =>
|
|
4599
|
+
UNIT: () => UNIT4
|
|
4600
4600
|
});
|
|
4601
4601
|
var SEQUENCE = {
|
|
4602
4602
|
"minor-second": 1.067,
|
|
@@ -4624,7 +4624,7 @@ var require_cjs5 = __commonJS({
|
|
|
4624
4624
|
// archimedes
|
|
4625
4625
|
"double-octave": 4
|
|
4626
4626
|
};
|
|
4627
|
-
var
|
|
4627
|
+
var UNIT4 = {
|
|
4628
4628
|
default: "em"
|
|
4629
4629
|
};
|
|
4630
4630
|
var defaultProps = {
|
|
@@ -4735,17 +4735,17 @@ var require_cjs5 = __commonJS({
|
|
|
4735
4735
|
var SVG_DATA = {};
|
|
4736
4736
|
var RESET = {};
|
|
4737
4737
|
var CSS_VARS = {};
|
|
4738
|
-
var
|
|
4738
|
+
var CONFIG2 = {
|
|
4739
4739
|
verbose: false,
|
|
4740
4740
|
useVariable: true,
|
|
4741
4741
|
useReset: true,
|
|
4742
4742
|
CSS_VARS,
|
|
4743
4743
|
...defaultConfig_exports
|
|
4744
4744
|
};
|
|
4745
|
-
var cachedConfig = (0, import_utils32.deepClone)(
|
|
4745
|
+
var cachedConfig = (0, import_utils32.deepClone)(CONFIG2);
|
|
4746
4746
|
var FACTORY = {
|
|
4747
4747
|
active: "0",
|
|
4748
|
-
0:
|
|
4748
|
+
0: CONFIG2
|
|
4749
4749
|
};
|
|
4750
4750
|
var activateConfig = (def) => {
|
|
4751
4751
|
if ((0, import_utils32.isDefined)(def)) {
|
|
@@ -4753,7 +4753,7 @@ var require_cjs5 = __commonJS({
|
|
|
4753
4753
|
}
|
|
4754
4754
|
return FACTORY[def || FACTORY.active];
|
|
4755
4755
|
};
|
|
4756
|
-
var
|
|
4756
|
+
var getActiveConfig2 = (def) => {
|
|
4757
4757
|
return FACTORY[def || FACTORY.active];
|
|
4758
4758
|
};
|
|
4759
4759
|
var setActiveConfig = (newConfig) => {
|
|
@@ -4862,8 +4862,8 @@ var require_cjs5 = __commonJS({
|
|
|
4862
4862
|
return sequenceProps;
|
|
4863
4863
|
};
|
|
4864
4864
|
var getSequenceValue = (value = "A", sequenceProps) => {
|
|
4865
|
-
const
|
|
4866
|
-
const { UNIT: UNIT22 } =
|
|
4865
|
+
const CONFIG22 = getActiveConfig2();
|
|
4866
|
+
const { UNIT: UNIT22 } = CONFIG22;
|
|
4867
4867
|
const {
|
|
4868
4868
|
sequence,
|
|
4869
4869
|
unit = UNIT22.default,
|
|
@@ -4897,11 +4897,11 @@ var require_cjs5 = __commonJS({
|
|
|
4897
4897
|
return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
|
|
4898
4898
|
}
|
|
4899
4899
|
if (!sequence[absValue] && absValue.length === 2) {
|
|
4900
|
-
if (
|
|
4900
|
+
if (CONFIG22.verbose)
|
|
4901
4901
|
console.warn(absValue, "- value is not found because `subSequence` is set to false");
|
|
4902
4902
|
absValue = absValue.slice(0, 1);
|
|
4903
4903
|
}
|
|
4904
|
-
if (useVariable ||
|
|
4904
|
+
if (useVariable || CONFIG22.useVariable) {
|
|
4905
4905
|
const varValue2 = `var(${prefix2}${absValue}${mediaName})`;
|
|
4906
4906
|
return isNegative ? `calc(${varValue2} * -1)` : varValue2;
|
|
4907
4907
|
}
|
|
@@ -4932,16 +4932,16 @@ var require_cjs5 = __commonJS({
|
|
|
4932
4932
|
};
|
|
4933
4933
|
var import_utils62 = __toESM2(require_cjs32(), 1);
|
|
4934
4934
|
var setVariables = (result, key) => {
|
|
4935
|
-
const
|
|
4936
|
-
const { CSS_VARS: CSS_VARS2 } =
|
|
4935
|
+
const CONFIG22 = getActiveConfig2();
|
|
4936
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
4937
4937
|
if ((0, import_utils62.isObjectLike)(result.value)) {
|
|
4938
4938
|
} else {
|
|
4939
4939
|
CSS_VARS2[result.var] = result.value;
|
|
4940
4940
|
}
|
|
4941
4941
|
};
|
|
4942
4942
|
var applySequenceVars = (props3, mediaName, options = {}) => {
|
|
4943
|
-
const
|
|
4944
|
-
const { UNIT: UNIT22, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } =
|
|
4943
|
+
const CONFIG22 = getActiveConfig2();
|
|
4944
|
+
const { UNIT: UNIT22, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
4945
4945
|
const unit = props3.unit || UNIT22.default;
|
|
4946
4946
|
const { sequence, scales } = props3;
|
|
4947
4947
|
for (const key in sequence) {
|
|
@@ -4950,7 +4950,7 @@ var require_cjs5 = __commonJS({
|
|
|
4950
4950
|
if (mediaName) {
|
|
4951
4951
|
const query = MEDIA2[mediaName];
|
|
4952
4952
|
if (!query) {
|
|
4953
|
-
if (
|
|
4953
|
+
if (CONFIG22.verbose)
|
|
4954
4954
|
console.warn("Can't find query ", query);
|
|
4955
4955
|
}
|
|
4956
4956
|
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
@@ -4970,13 +4970,13 @@ var require_cjs5 = __commonJS({
|
|
|
4970
4970
|
};
|
|
4971
4971
|
var import_utils72 = __toESM2(require_cjs32(), 1);
|
|
4972
4972
|
var generateSprite = (icons) => {
|
|
4973
|
-
const
|
|
4973
|
+
const CONFIG22 = getActiveConfig2();
|
|
4974
4974
|
let sprite = "";
|
|
4975
4975
|
for (const key in icons) {
|
|
4976
|
-
if (
|
|
4976
|
+
if (CONFIG22.__svg_cache[key])
|
|
4977
4977
|
continue;
|
|
4978
4978
|
else
|
|
4979
|
-
|
|
4979
|
+
CONFIG22.__svg_cache[key] = true;
|
|
4980
4980
|
sprite += icons[key];
|
|
4981
4981
|
}
|
|
4982
4982
|
return sprite;
|
|
@@ -5043,9 +5043,9 @@ var require_cjs5 = __commonJS({
|
|
|
5043
5043
|
});
|
|
5044
5044
|
var import_utils82 = __toESM2(require_cjs32(), 1);
|
|
5045
5045
|
var getColor5 = (value, key) => {
|
|
5046
|
-
const
|
|
5046
|
+
const CONFIG22 = getActiveConfig2();
|
|
5047
5047
|
if (!(0, import_utils82.isString)(value)) {
|
|
5048
|
-
if (
|
|
5048
|
+
if (CONFIG22.verbose)
|
|
5049
5049
|
console.warn(value, "- type for color is not valid");
|
|
5050
5050
|
return;
|
|
5051
5051
|
}
|
|
@@ -5054,17 +5054,17 @@ var require_cjs5 = __commonJS({
|
|
|
5054
5054
|
if (key && value[key])
|
|
5055
5055
|
value = value[key];
|
|
5056
5056
|
const [name, alpha, tone] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
5057
|
-
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } =
|
|
5057
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
5058
5058
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
5059
5059
|
if (!val) {
|
|
5060
|
-
if (
|
|
5060
|
+
if (CONFIG22.verbose)
|
|
5061
5061
|
console.warn("Can't find color ", name);
|
|
5062
5062
|
return value;
|
|
5063
5063
|
}
|
|
5064
5064
|
if (key) {
|
|
5065
5065
|
if (val[key])
|
|
5066
5066
|
val = val[key];
|
|
5067
|
-
else if (
|
|
5067
|
+
else if (CONFIG22.verbose)
|
|
5068
5068
|
console.warn(value, " - does not have ", key);
|
|
5069
5069
|
}
|
|
5070
5070
|
let rgb = val.rgb;
|
|
@@ -5090,23 +5090,23 @@ var require_cjs5 = __commonJS({
|
|
|
5090
5090
|
}
|
|
5091
5091
|
if (alpha)
|
|
5092
5092
|
return `rgba(${rgb}, ${alpha})`;
|
|
5093
|
-
return
|
|
5093
|
+
return CONFIG22.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
5094
5094
|
} else
|
|
5095
|
-
return
|
|
5095
|
+
return CONFIG22.useVariable ? `var(${val.var})` : val.value;
|
|
5096
5096
|
};
|
|
5097
5097
|
var getMediaColor9 = (value, globalTheme) => {
|
|
5098
|
-
const
|
|
5098
|
+
const CONFIG22 = getActiveConfig2();
|
|
5099
5099
|
if (!globalTheme)
|
|
5100
|
-
globalTheme =
|
|
5100
|
+
globalTheme = CONFIG22.globalTheme;
|
|
5101
5101
|
if (!(0, import_utils82.isString)(value)) {
|
|
5102
|
-
if (
|
|
5102
|
+
if (CONFIG22.verbose)
|
|
5103
5103
|
console.warn(value, "- type for color is not valid");
|
|
5104
5104
|
return;
|
|
5105
5105
|
}
|
|
5106
5106
|
if (value.slice(0, 2) === "--")
|
|
5107
5107
|
return `var(${value})`;
|
|
5108
5108
|
const [name] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
5109
|
-
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } =
|
|
5109
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
5110
5110
|
const val = COLOR2[name] || GRADIENT2[name];
|
|
5111
5111
|
const isObj = (0, import_utils82.isObject)(val);
|
|
5112
5112
|
if (isObj && val.value)
|
|
@@ -5117,20 +5117,20 @@ var require_cjs5 = __commonJS({
|
|
|
5117
5117
|
else {
|
|
5118
5118
|
const obj = {};
|
|
5119
5119
|
for (const mediaName in val) {
|
|
5120
|
-
const query =
|
|
5120
|
+
const query = CONFIG22.MEDIA[mediaName.slice(1)];
|
|
5121
5121
|
const media = `@media screen and ${query}`;
|
|
5122
5122
|
obj[media] = getColor5(value, mediaName);
|
|
5123
5123
|
}
|
|
5124
5124
|
return obj;
|
|
5125
5125
|
}
|
|
5126
5126
|
} else {
|
|
5127
|
-
if (
|
|
5127
|
+
if (CONFIG22.verbose)
|
|
5128
5128
|
console.warn("Can't find color", value);
|
|
5129
5129
|
return value;
|
|
5130
5130
|
}
|
|
5131
5131
|
};
|
|
5132
5132
|
var setColor = (val, key, suffix) => {
|
|
5133
|
-
const
|
|
5133
|
+
const CONFIG22 = getActiveConfig2();
|
|
5134
5134
|
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
5135
5135
|
val = getColor5(val.slice(2));
|
|
5136
5136
|
if ((0, import_utils82.isArray)(val)) {
|
|
@@ -5150,8 +5150,8 @@ var require_cjs5 = __commonJS({
|
|
|
5150
5150
|
const alpha = parseFloat(a.toFixed(2));
|
|
5151
5151
|
const rgb = `${r}, ${g}, ${b}`;
|
|
5152
5152
|
const value = `rgba(${rgb}, ${alpha})`;
|
|
5153
|
-
if (
|
|
5154
|
-
|
|
5153
|
+
if (CONFIG22.useVariable) {
|
|
5154
|
+
CONFIG22.CSS_VARS[CSSVar] = value;
|
|
5155
5155
|
}
|
|
5156
5156
|
return {
|
|
5157
5157
|
var: CSSVar,
|
|
@@ -5161,7 +5161,7 @@ var require_cjs5 = __commonJS({
|
|
|
5161
5161
|
};
|
|
5162
5162
|
};
|
|
5163
5163
|
var setGradient = (val, key, suffix) => {
|
|
5164
|
-
const
|
|
5164
|
+
const CONFIG22 = getActiveConfig2();
|
|
5165
5165
|
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
5166
5166
|
val = getColor5(val.slice(2));
|
|
5167
5167
|
if ((0, import_utils82.isArray)(val)) {
|
|
@@ -5177,8 +5177,8 @@ var require_cjs5 = __commonJS({
|
|
|
5177
5177
|
return obj;
|
|
5178
5178
|
}
|
|
5179
5179
|
const CSSVar = `--gradient-${key}` + (suffix ? `-${suffix}` : "");
|
|
5180
|
-
if (
|
|
5181
|
-
|
|
5180
|
+
if (CONFIG22.useVariable) {
|
|
5181
|
+
CONFIG22.CSS_VARS[CSSVar] = val.value || val;
|
|
5182
5182
|
}
|
|
5183
5183
|
return {
|
|
5184
5184
|
var: CSSVar,
|
|
@@ -5204,10 +5204,10 @@ var require_cjs5 = __commonJS({
|
|
|
5204
5204
|
return theme.value;
|
|
5205
5205
|
};
|
|
5206
5206
|
var getTheme5 = (value, modifier) => {
|
|
5207
|
-
const
|
|
5208
|
-
if (
|
|
5207
|
+
const CONFIG22 = getActiveConfig2();
|
|
5208
|
+
if (CONFIG22.useVariable)
|
|
5209
5209
|
return getMediaTheme5(value, modifier);
|
|
5210
|
-
const { THEME: THEME2 } =
|
|
5210
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
5211
5211
|
if ((0, import_utils102.isString)(value)) {
|
|
5212
5212
|
const [theme, subtheme] = value.split(" ");
|
|
5213
5213
|
const isOurTheme = THEME2[theme];
|
|
@@ -5283,7 +5283,7 @@ var require_cjs5 = __commonJS({
|
|
|
5283
5283
|
return theme;
|
|
5284
5284
|
};
|
|
5285
5285
|
var setHelpers = (theme, value) => {
|
|
5286
|
-
const
|
|
5286
|
+
const CONFIG22 = getActiveConfig2();
|
|
5287
5287
|
const { helpers } = theme;
|
|
5288
5288
|
if (!helpers)
|
|
5289
5289
|
return;
|
|
@@ -5291,7 +5291,7 @@ var require_cjs5 = __commonJS({
|
|
|
5291
5291
|
keys.map((key) => {
|
|
5292
5292
|
const helper = helpers[key];
|
|
5293
5293
|
if ((0, import_utils102.isString)(helper))
|
|
5294
|
-
helpers[key] =
|
|
5294
|
+
helpers[key] = CONFIG22.THEME[helper];
|
|
5295
5295
|
else
|
|
5296
5296
|
getThemeValue(helpers[key]);
|
|
5297
5297
|
return theme;
|
|
@@ -5299,8 +5299,8 @@ var require_cjs5 = __commonJS({
|
|
|
5299
5299
|
return theme;
|
|
5300
5300
|
};
|
|
5301
5301
|
var setTheme = (val, key) => {
|
|
5302
|
-
const
|
|
5303
|
-
if (
|
|
5302
|
+
const CONFIG22 = getActiveConfig2();
|
|
5303
|
+
if (CONFIG22.useVariable)
|
|
5304
5304
|
return setMediaTheme(val, key);
|
|
5305
5305
|
const { state, media, helpers } = val;
|
|
5306
5306
|
const value = setThemeValue(val, key);
|
|
@@ -5311,8 +5311,8 @@ var require_cjs5 = __commonJS({
|
|
|
5311
5311
|
return { var: CSSvar, value, state, media, helpers };
|
|
5312
5312
|
};
|
|
5313
5313
|
var setMediaTheme = (val, key, suffix, prefers) => {
|
|
5314
|
-
const
|
|
5315
|
-
const { CSS_VARS: CSS_VARS2 } =
|
|
5314
|
+
const CONFIG22 = getActiveConfig2();
|
|
5315
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
5316
5316
|
const theme = { value: val };
|
|
5317
5317
|
if ((0, import_utils102.isObjectLike)(val)) {
|
|
5318
5318
|
for (const param in val) {
|
|
@@ -5326,7 +5326,7 @@ var require_cjs5 = __commonJS({
|
|
|
5326
5326
|
const metaSuffixes = [...new Set([prefers, suffix].filter((v) => v).map((v) => v.slice(1)))];
|
|
5327
5327
|
const varmetaSuffixName = metaSuffixes.length ? "-" + metaSuffixes.join("-") : "";
|
|
5328
5328
|
const CSSVar = `--theme-${key}${varmetaSuffixName}-${param}`;
|
|
5329
|
-
if (
|
|
5329
|
+
if (CONFIG22.useVariable) {
|
|
5330
5330
|
CSS_VARS2[CSSVar] = color;
|
|
5331
5331
|
theme[param] = `var(${CSSVar})`;
|
|
5332
5332
|
} else {
|
|
@@ -5343,7 +5343,7 @@ var require_cjs5 = __commonJS({
|
|
|
5343
5343
|
}
|
|
5344
5344
|
}
|
|
5345
5345
|
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--") {
|
|
5346
|
-
const { THEME: THEME2 } =
|
|
5346
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
5347
5347
|
const value = THEME2[val.slice(2)];
|
|
5348
5348
|
const getReferenced = getMediaTheme5(value, prefers);
|
|
5349
5349
|
return getReferenced;
|
|
@@ -5351,13 +5351,13 @@ var require_cjs5 = __commonJS({
|
|
|
5351
5351
|
return theme;
|
|
5352
5352
|
};
|
|
5353
5353
|
var recursiveTheme = (val) => {
|
|
5354
|
-
const
|
|
5354
|
+
const CONFIG22 = getActiveConfig2();
|
|
5355
5355
|
const obj = {};
|
|
5356
5356
|
for (const param in val) {
|
|
5357
5357
|
const symb = param.slice(0, 1);
|
|
5358
5358
|
if ((0, import_utils102.isObjectLike)(val[param])) {
|
|
5359
5359
|
if (symb === "@") {
|
|
5360
|
-
const query =
|
|
5360
|
+
const query = CONFIG22.MEDIA[param.slice(1)];
|
|
5361
5361
|
const media = `@media screen and ${query}`;
|
|
5362
5362
|
obj[media] = recursiveTheme(val[param]);
|
|
5363
5363
|
} else if (symb === ":") {
|
|
@@ -5383,16 +5383,16 @@ var require_cjs5 = __commonJS({
|
|
|
5383
5383
|
return val;
|
|
5384
5384
|
};
|
|
5385
5385
|
var getMediaTheme5 = (val, mod) => {
|
|
5386
|
-
const
|
|
5386
|
+
const CONFIG22 = getActiveConfig2();
|
|
5387
5387
|
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--")
|
|
5388
5388
|
val = getMediaTheme5(val.slice(2));
|
|
5389
5389
|
if (!val || !(0, import_utils102.isString)(val)) {
|
|
5390
|
-
if (
|
|
5390
|
+
if (CONFIG22.verbose)
|
|
5391
5391
|
console.warn(val, "- theme is not string");
|
|
5392
5392
|
return;
|
|
5393
5393
|
}
|
|
5394
5394
|
const [name, ...modifier] = (0, import_utils102.isArray)(val) ? val : val.split(" ");
|
|
5395
|
-
let value =
|
|
5395
|
+
let value = CONFIG22.THEME[name];
|
|
5396
5396
|
if (value && (modifier || mod)) {
|
|
5397
5397
|
value = findModifier(value, modifier.length ? modifier : mod);
|
|
5398
5398
|
}
|
|
@@ -5406,13 +5406,13 @@ var require_cjs5 = __commonJS({
|
|
|
5406
5406
|
return { var: CSSvar, value: val, fontFace };
|
|
5407
5407
|
};
|
|
5408
5408
|
var getFontFamily5 = (key, factory) => {
|
|
5409
|
-
const
|
|
5410
|
-
const { FONT_FAMILY: FONT_FAMILY2 } =
|
|
5409
|
+
const CONFIG22 = getActiveConfig2();
|
|
5410
|
+
const { FONT_FAMILY: FONT_FAMILY2 } = CONFIG22;
|
|
5411
5411
|
return getDefaultOrFirstKey(factory || FONT_FAMILY2, key);
|
|
5412
5412
|
};
|
|
5413
5413
|
var setFontFamily = (val, key) => {
|
|
5414
|
-
const
|
|
5415
|
-
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } =
|
|
5414
|
+
const CONFIG22 = getActiveConfig2();
|
|
5415
|
+
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } = CONFIG22;
|
|
5416
5416
|
let { value, type } = val;
|
|
5417
5417
|
if (val.isDefault)
|
|
5418
5418
|
FONT_FAMILY2.default = key;
|
|
@@ -5424,8 +5424,8 @@ var require_cjs5 = __commonJS({
|
|
|
5424
5424
|
};
|
|
5425
5425
|
var import_utils142 = __toESM2(require_cjs32(), 1);
|
|
5426
5426
|
var runThroughMedia = (props3) => {
|
|
5427
|
-
const
|
|
5428
|
-
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } =
|
|
5427
|
+
const CONFIG22 = getActiveConfig2();
|
|
5428
|
+
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG22;
|
|
5429
5429
|
for (const prop in props3) {
|
|
5430
5430
|
const mediaProps = props3[prop];
|
|
5431
5431
|
if (prop.slice(0, 1) === "@") {
|
|
@@ -5454,7 +5454,7 @@ var require_cjs5 = __commonJS({
|
|
|
5454
5454
|
}
|
|
5455
5455
|
};
|
|
5456
5456
|
var applyHeadings = (props3) => {
|
|
5457
|
-
const
|
|
5457
|
+
const CONFIG22 = getActiveConfig2();
|
|
5458
5458
|
if (props3.h1Matches) {
|
|
5459
5459
|
const unit = props3.unit;
|
|
5460
5460
|
const HEADINGS = findHeadings(props3);
|
|
@@ -5463,7 +5463,7 @@ var require_cjs5 = __commonJS({
|
|
|
5463
5463
|
const headerName = `h${parseInt(k) + 1}`;
|
|
5464
5464
|
const headerStyle = templates[headerName];
|
|
5465
5465
|
templates[headerName] = {
|
|
5466
|
-
fontSize:
|
|
5466
|
+
fontSize: CONFIG22.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
|
|
5467
5467
|
margin: headerStyle ? headerStyle.margin : 0,
|
|
5468
5468
|
lineHeight: headerStyle ? headerStyle.lineHeight : props3.lineHeight,
|
|
5469
5469
|
letterSpacing: headerStyle ? headerStyle.letterSpacing : props3.letterSpacing,
|
|
@@ -5473,16 +5473,16 @@ var require_cjs5 = __commonJS({
|
|
|
5473
5473
|
}
|
|
5474
5474
|
};
|
|
5475
5475
|
var applyTypographySequence = () => {
|
|
5476
|
-
const
|
|
5477
|
-
const { TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
5476
|
+
const CONFIG22 = getActiveConfig2();
|
|
5477
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
5478
5478
|
generateSequence(TYPOGRAPHY2);
|
|
5479
5479
|
applyHeadings(TYPOGRAPHY2);
|
|
5480
5480
|
applySequenceVars(TYPOGRAPHY2);
|
|
5481
5481
|
runThroughMedia(TYPOGRAPHY2);
|
|
5482
5482
|
};
|
|
5483
5483
|
var getFontSizeByKey5 = (value) => {
|
|
5484
|
-
const
|
|
5485
|
-
const { TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
5484
|
+
const CONFIG22 = getActiveConfig2();
|
|
5485
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
5486
5486
|
return getSequenceValuePropertyPair(
|
|
5487
5487
|
value,
|
|
5488
5488
|
"fontSize",
|
|
@@ -5515,15 +5515,15 @@ var require_cjs5 = __commonJS({
|
|
|
5515
5515
|
}
|
|
5516
5516
|
};
|
|
5517
5517
|
var applySpacingSequence = () => {
|
|
5518
|
-
const
|
|
5519
|
-
const { SPACING: SPACING2 } =
|
|
5518
|
+
const CONFIG22 = getActiveConfig2();
|
|
5519
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
5520
5520
|
generateSequence(SPACING2);
|
|
5521
5521
|
applySequenceVars(SPACING2);
|
|
5522
5522
|
runThroughMedia2(SPACING2);
|
|
5523
5523
|
};
|
|
5524
5524
|
var getSequence = (sequenceProps) => {
|
|
5525
|
-
const
|
|
5526
|
-
const { SPACING: SPACING2 } =
|
|
5525
|
+
const CONFIG22 = getActiveConfig2();
|
|
5526
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
5527
5527
|
if (!sequenceProps)
|
|
5528
5528
|
return SPACING2;
|
|
5529
5529
|
const hasGenerated = Object.keys(sequenceProps.sequence).length > 0;
|
|
@@ -5562,8 +5562,8 @@ var require_cjs5 = __commonJS({
|
|
|
5562
5562
|
);
|
|
5563
5563
|
};
|
|
5564
5564
|
var getSpacingBasedOnRatio13 = (props3, propertyName, val) => {
|
|
5565
|
-
const
|
|
5566
|
-
const { SPACING: SPACING2 } =
|
|
5565
|
+
const CONFIG22 = getActiveConfig2();
|
|
5566
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
5567
5567
|
const { spacingRatio, unit } = props3;
|
|
5568
5568
|
const value = val || props3[propertyName];
|
|
5569
5569
|
if (spacingRatio) {
|
|
@@ -5592,19 +5592,19 @@ var require_cjs5 = __commonJS({
|
|
|
5592
5592
|
return getSpacingByKey9(value, propertyName);
|
|
5593
5593
|
};
|
|
5594
5594
|
var applyTimingSequence = () => {
|
|
5595
|
-
const
|
|
5596
|
-
const { TIMING: TIMING2 } =
|
|
5595
|
+
const CONFIG22 = getActiveConfig2();
|
|
5596
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
5597
5597
|
generateSequence(TIMING2);
|
|
5598
5598
|
applySequenceVars(TIMING2);
|
|
5599
5599
|
};
|
|
5600
5600
|
var getTimingFunction9 = (value) => {
|
|
5601
|
-
const
|
|
5602
|
-
const { TIMING: TIMING2 } =
|
|
5601
|
+
const CONFIG22 = getActiveConfig2();
|
|
5602
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
5603
5603
|
return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
|
|
5604
5604
|
};
|
|
5605
5605
|
var getTimingByKey5 = (value, property = "timing") => {
|
|
5606
|
-
const
|
|
5607
|
-
const { TIMING: TIMING2 } =
|
|
5606
|
+
const CONFIG22 = getActiveConfig2();
|
|
5607
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
5608
5608
|
return getSequenceValuePropertyPair(
|
|
5609
5609
|
value,
|
|
5610
5610
|
property,
|
|
@@ -5613,8 +5613,8 @@ var require_cjs5 = __commonJS({
|
|
|
5613
5613
|
};
|
|
5614
5614
|
var import_utils21 = __toESM2(require_cjs32(), 1);
|
|
5615
5615
|
var applyDocument = () => {
|
|
5616
|
-
const
|
|
5617
|
-
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
5616
|
+
const CONFIG22 = getActiveConfig2();
|
|
5617
|
+
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
5618
5618
|
return (0, import_utils21.merge)(DOCUMENT2, {
|
|
5619
5619
|
theme: THEME2.document,
|
|
5620
5620
|
fontFamily: getDefaultOrFirstKey(FONT_FAMILY2),
|
|
@@ -5627,36 +5627,36 @@ var require_cjs5 = __commonJS({
|
|
|
5627
5627
|
document: import_globals2.document
|
|
5628
5628
|
};
|
|
5629
5629
|
var setSVG = (val, key) => {
|
|
5630
|
-
const
|
|
5630
|
+
const CONFIG22 = getActiveConfig2();
|
|
5631
5631
|
if (!val) {
|
|
5632
|
-
if (
|
|
5632
|
+
if (CONFIG22.verbose)
|
|
5633
5633
|
console.warn("setSVG: val is not defined", key);
|
|
5634
5634
|
return;
|
|
5635
5635
|
}
|
|
5636
|
-
if (
|
|
5636
|
+
if (CONFIG22.useSvgSprite) {
|
|
5637
5637
|
return convertSvgToSymbol(key, val);
|
|
5638
5638
|
}
|
|
5639
5639
|
return val;
|
|
5640
5640
|
};
|
|
5641
5641
|
var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
5642
|
-
const
|
|
5643
|
-
const lib = Object.keys(LIBRARY).length ? {} :
|
|
5642
|
+
const CONFIG22 = getActiveConfig2();
|
|
5643
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.SVG;
|
|
5644
5644
|
for (const key in LIBRARY)
|
|
5645
|
-
lib[key] =
|
|
5645
|
+
lib[key] = CONFIG22.SVG[key];
|
|
5646
5646
|
appendSVG(lib, options);
|
|
5647
5647
|
};
|
|
5648
5648
|
var setIcon = (val, key) => {
|
|
5649
|
-
const
|
|
5650
|
-
if (
|
|
5649
|
+
const CONFIG22 = getActiveConfig2();
|
|
5650
|
+
if (CONFIG22.useIconSprite) {
|
|
5651
5651
|
return setSVG(val, key);
|
|
5652
5652
|
}
|
|
5653
5653
|
return val;
|
|
5654
5654
|
};
|
|
5655
5655
|
var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
5656
|
-
const
|
|
5657
|
-
const lib = Object.keys(LIBRARY).length ? {} :
|
|
5656
|
+
const CONFIG22 = getActiveConfig2();
|
|
5657
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.ICONS;
|
|
5658
5658
|
for (const key in LIBRARY)
|
|
5659
|
-
lib[key] =
|
|
5659
|
+
lib[key] = CONFIG22.ICONS[key];
|
|
5660
5660
|
appendSVG(lib, options);
|
|
5661
5661
|
};
|
|
5662
5662
|
var createSVGSpriteElement = (options = { isRoot: true }) => {
|
|
@@ -5671,10 +5671,10 @@ var require_cjs5 = __commonJS({
|
|
|
5671
5671
|
return svgElem;
|
|
5672
5672
|
};
|
|
5673
5673
|
var appendSVG = (lib, options = DEF_OPTIONS) => {
|
|
5674
|
-
const
|
|
5674
|
+
const CONFIG22 = getActiveConfig2();
|
|
5675
5675
|
const doc = options.document || import_globals2.document;
|
|
5676
5676
|
if (!doc) {
|
|
5677
|
-
if (
|
|
5677
|
+
if (CONFIG22.verbose) {
|
|
5678
5678
|
console.warn("To append SVG sprites it should be run in browser environment");
|
|
5679
5679
|
}
|
|
5680
5680
|
return generateSprite(lib);
|
|
@@ -5693,14 +5693,14 @@ var require_cjs5 = __commonJS({
|
|
|
5693
5693
|
};
|
|
5694
5694
|
var import_utils24 = __toESM2(require_cjs32(), 1);
|
|
5695
5695
|
var applyReset = (reset = {}) => {
|
|
5696
|
-
const
|
|
5697
|
-
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } =
|
|
5696
|
+
const CONFIG22 = getActiveConfig2();
|
|
5697
|
+
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG22;
|
|
5698
5698
|
if (RESET2) {
|
|
5699
5699
|
if (RESET2[":root"]) {
|
|
5700
5700
|
const configReset = RESET2;
|
|
5701
5701
|
const configTemplates = TYPOGRAPHY2.templates;
|
|
5702
5702
|
configReset.body = {
|
|
5703
|
-
...
|
|
5703
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
5704
5704
|
...configTemplates.body
|
|
5705
5705
|
};
|
|
5706
5706
|
configReset.h1 = configTemplates.h1;
|
|
@@ -5723,7 +5723,7 @@ var require_cjs5 = __commonJS({
|
|
|
5723
5723
|
WebkitFontSmoothing: "antialiased",
|
|
5724
5724
|
scrollBehavior: "smooth",
|
|
5725
5725
|
fontSize: TYPOGRAPHY2.browserDefault + "px",
|
|
5726
|
-
...
|
|
5726
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
5727
5727
|
fontFamily: DOCUMENT2.fontFamily,
|
|
5728
5728
|
lineHeight: DOCUMENT2.lineHeight
|
|
5729
5729
|
},
|
|
@@ -5732,7 +5732,7 @@ var require_cjs5 = __commonJS({
|
|
|
5732
5732
|
height: "100%",
|
|
5733
5733
|
margin: 0,
|
|
5734
5734
|
fontFamily: DOCUMENT2.fontFamily,
|
|
5735
|
-
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault +
|
|
5735
|
+
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault + CONFIG22.UNIT.default,
|
|
5736
5736
|
...templates,
|
|
5737
5737
|
...body
|
|
5738
5738
|
},
|
|
@@ -5804,15 +5804,15 @@ var require_cjs5 = __commonJS({
|
|
|
5804
5804
|
}).join(" ");
|
|
5805
5805
|
}).join(",");
|
|
5806
5806
|
var transformBackgroundImage5 = (backgroundImage, globalTheme) => {
|
|
5807
|
-
const
|
|
5807
|
+
const CONFIG22 = getActiveConfig2();
|
|
5808
5808
|
return backgroundImage.split(", ").map((v) => {
|
|
5809
5809
|
if (v.slice(0, 2) === "--")
|
|
5810
5810
|
return `var(${v})`;
|
|
5811
5811
|
if (v.includes("url") || v.includes("gradient"))
|
|
5812
5812
|
return v;
|
|
5813
|
-
else if (
|
|
5813
|
+
else if (CONFIG22.GRADIENT[backgroundImage]) {
|
|
5814
5814
|
return {
|
|
5815
|
-
backgroundImage: getMediaColor9(backgroundImage, globalTheme ||
|
|
5815
|
+
backgroundImage: getMediaColor9(backgroundImage, globalTheme || CONFIG22.globalTheme)
|
|
5816
5816
|
};
|
|
5817
5817
|
} else if (v.includes("/") || v.includes("http"))
|
|
5818
5818
|
return `url(${v})`;
|
|
@@ -5873,27 +5873,27 @@ var require_cjs5 = __commonJS({
|
|
|
5873
5873
|
animation: setSameValue
|
|
5874
5874
|
};
|
|
5875
5875
|
var setValue = (FACTORY_NAME, value, key) => {
|
|
5876
|
-
const
|
|
5876
|
+
const CONFIG22 = getActiveConfig2();
|
|
5877
5877
|
const factoryName = FACTORY_NAME.toLowerCase();
|
|
5878
|
-
const FACTORY2 =
|
|
5878
|
+
const FACTORY2 = CONFIG22[FACTORY_NAME];
|
|
5879
5879
|
if (VALUE_TRANSFORMERS[factoryName]) {
|
|
5880
5880
|
const result = VALUE_TRANSFORMERS[factoryName](value, key);
|
|
5881
5881
|
FACTORY2[key] = result;
|
|
5882
5882
|
return FACTORY2;
|
|
5883
5883
|
}
|
|
5884
|
-
if (
|
|
5884
|
+
if (CONFIG22.verbose)
|
|
5885
5885
|
console.warn("Can not find", factoryName, "method in scratch");
|
|
5886
5886
|
};
|
|
5887
5887
|
var setEach = (factoryName, props3) => {
|
|
5888
|
-
const
|
|
5888
|
+
const CONFIG22 = getActiveConfig2();
|
|
5889
5889
|
const FACTORY_NAME = factoryName.toUpperCase();
|
|
5890
5890
|
const keys = Object.keys(props3);
|
|
5891
5891
|
keys.map((key) => setValue(FACTORY_NAME, props3[key], key));
|
|
5892
|
-
return
|
|
5892
|
+
return CONFIG22[FACTORY_NAME];
|
|
5893
5893
|
};
|
|
5894
5894
|
var SET_OPTIONS = {};
|
|
5895
5895
|
var set2 = (recivedConfig, options = SET_OPTIONS) => {
|
|
5896
|
-
let
|
|
5896
|
+
let CONFIG22 = getActiveConfig2();
|
|
5897
5897
|
const {
|
|
5898
5898
|
version,
|
|
5899
5899
|
verbose,
|
|
@@ -5907,28 +5907,28 @@ var require_cjs5 = __commonJS({
|
|
|
5907
5907
|
...config
|
|
5908
5908
|
} = recivedConfig;
|
|
5909
5909
|
if (options.newConfig) {
|
|
5910
|
-
|
|
5910
|
+
CONFIG22 = setActiveConfig(options.newConfig);
|
|
5911
5911
|
}
|
|
5912
5912
|
if (verbose !== void 0)
|
|
5913
|
-
|
|
5913
|
+
CONFIG22.verbose = verbose;
|
|
5914
5914
|
if (useVariable !== void 0)
|
|
5915
|
-
|
|
5915
|
+
CONFIG22.useVariable = useVariable;
|
|
5916
5916
|
if (useReset !== void 0)
|
|
5917
|
-
|
|
5917
|
+
CONFIG22.useReset = useReset;
|
|
5918
5918
|
if (useFontImport !== void 0)
|
|
5919
|
-
|
|
5919
|
+
CONFIG22.useFontImport = useFontImport;
|
|
5920
5920
|
if (useSvgSprite !== void 0)
|
|
5921
|
-
|
|
5921
|
+
CONFIG22.useSvgSprite = useSvgSprite;
|
|
5922
5922
|
if (useIconSprite !== void 0)
|
|
5923
|
-
|
|
5923
|
+
CONFIG22.useIconSprite = useIconSprite;
|
|
5924
5924
|
if (useDocumentTheme !== void 0)
|
|
5925
|
-
|
|
5925
|
+
CONFIG22.useDocumentTheme = useDocumentTheme;
|
|
5926
5926
|
if (globalTheme !== void 0)
|
|
5927
|
-
|
|
5928
|
-
if (
|
|
5929
|
-
console.log(
|
|
5930
|
-
if (!
|
|
5931
|
-
|
|
5927
|
+
CONFIG22.globalTheme = globalTheme;
|
|
5928
|
+
if (CONFIG22.verbose)
|
|
5929
|
+
console.log(CONFIG22);
|
|
5930
|
+
if (!CONFIG22.__svg_cache)
|
|
5931
|
+
CONFIG22.__svg_cache = {};
|
|
5932
5932
|
const keys = Object.keys(config);
|
|
5933
5933
|
keys.map((key) => setEach(key, config[key]));
|
|
5934
5934
|
applyTypographySequence();
|
|
@@ -5936,7 +5936,7 @@ var require_cjs5 = __commonJS({
|
|
|
5936
5936
|
applyTimingSequence();
|
|
5937
5937
|
applyDocument();
|
|
5938
5938
|
applyReset();
|
|
5939
|
-
return
|
|
5939
|
+
return CONFIG22;
|
|
5940
5940
|
};
|
|
5941
5941
|
}
|
|
5942
5942
|
});
|
|
@@ -5985,7 +5985,7 @@ var require_cjs6 = __commonJS({
|
|
|
5985
5985
|
scrollToOffset: 0,
|
|
5986
5986
|
scrollToOptions: { behavior: "smooth" }
|
|
5987
5987
|
};
|
|
5988
|
-
var router = (
|
|
5988
|
+
var router = (path, element, state = {}, options = defaultOptions) => {
|
|
5989
5989
|
(0, import_utils20.merge)(options, defaultOptions);
|
|
5990
5990
|
lastLevel = options.lastLevel;
|
|
5991
5991
|
const [pathname, hash2] = path.split("#");
|
|
@@ -6872,7 +6872,7 @@ var require_cjs7 = __commonJS({
|
|
|
6872
6872
|
BREAKPOINTS: () => BREAKPOINTS,
|
|
6873
6873
|
CASES: () => CASES,
|
|
6874
6874
|
COLOR: () => COLOR,
|
|
6875
|
-
CONFIG: () =>
|
|
6875
|
+
CONFIG: () => CONFIG2,
|
|
6876
6876
|
CSS_VARS: () => CSS_VARS,
|
|
6877
6877
|
DEVICES: () => DEVICES,
|
|
6878
6878
|
DOCUMENT: () => DOCUMENT,
|
|
@@ -6892,7 +6892,7 @@ var require_cjs7 = __commonJS({
|
|
|
6892
6892
|
THEME: () => THEME,
|
|
6893
6893
|
TIMING: () => TIMING,
|
|
6894
6894
|
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
6895
|
-
UNIT: () =>
|
|
6895
|
+
UNIT: () => UNIT4,
|
|
6896
6896
|
VALUE_TRANSFORMERS: () => VALUE_TRANSFORMERS,
|
|
6897
6897
|
activateConfig: () => activateConfig,
|
|
6898
6898
|
appendIconsSprite: () => appendIconsSprite,
|
|
@@ -6912,7 +6912,7 @@ var require_cjs7 = __commonJS({
|
|
|
6912
6912
|
generateSequence: () => generateSequence,
|
|
6913
6913
|
generateSprite: () => generateSprite,
|
|
6914
6914
|
generateSubSequence: () => generateSubSequence,
|
|
6915
|
-
getActiveConfig: () =>
|
|
6915
|
+
getActiveConfig: () => getActiveConfig2,
|
|
6916
6916
|
getColor: () => getColor5,
|
|
6917
6917
|
getColorShade: () => getColorShade,
|
|
6918
6918
|
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
@@ -7228,7 +7228,7 @@ var require_cjs7 = __commonJS({
|
|
|
7228
7228
|
THEME: () => THEME,
|
|
7229
7229
|
TIMING: () => TIMING,
|
|
7230
7230
|
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
7231
|
-
UNIT: () =>
|
|
7231
|
+
UNIT: () => UNIT4
|
|
7232
7232
|
});
|
|
7233
7233
|
var SEQUENCE = {
|
|
7234
7234
|
"minor-second": 1.067,
|
|
@@ -7256,7 +7256,7 @@ var require_cjs7 = __commonJS({
|
|
|
7256
7256
|
// archimedes
|
|
7257
7257
|
"double-octave": 4
|
|
7258
7258
|
};
|
|
7259
|
-
var
|
|
7259
|
+
var UNIT4 = {
|
|
7260
7260
|
default: "em"
|
|
7261
7261
|
};
|
|
7262
7262
|
var defaultProps = {
|
|
@@ -7367,17 +7367,17 @@ var require_cjs7 = __commonJS({
|
|
|
7367
7367
|
var SVG_DATA = {};
|
|
7368
7368
|
var RESET = {};
|
|
7369
7369
|
var CSS_VARS = {};
|
|
7370
|
-
var
|
|
7370
|
+
var CONFIG2 = {
|
|
7371
7371
|
verbose: false,
|
|
7372
7372
|
useVariable: true,
|
|
7373
7373
|
useReset: true,
|
|
7374
7374
|
CSS_VARS,
|
|
7375
7375
|
...defaultConfig_exports
|
|
7376
7376
|
};
|
|
7377
|
-
var cachedConfig = (0, import_utils32.deepClone)(
|
|
7377
|
+
var cachedConfig = (0, import_utils32.deepClone)(CONFIG2);
|
|
7378
7378
|
var FACTORY = {
|
|
7379
7379
|
active: "0",
|
|
7380
|
-
0:
|
|
7380
|
+
0: CONFIG2
|
|
7381
7381
|
};
|
|
7382
7382
|
var activateConfig = (def) => {
|
|
7383
7383
|
if ((0, import_utils32.isDefined)(def)) {
|
|
@@ -7385,7 +7385,7 @@ var require_cjs7 = __commonJS({
|
|
|
7385
7385
|
}
|
|
7386
7386
|
return FACTORY[def || FACTORY.active];
|
|
7387
7387
|
};
|
|
7388
|
-
var
|
|
7388
|
+
var getActiveConfig2 = (def) => {
|
|
7389
7389
|
return FACTORY[def || FACTORY.active];
|
|
7390
7390
|
};
|
|
7391
7391
|
var setActiveConfig = (newConfig) => {
|
|
@@ -7494,8 +7494,8 @@ var require_cjs7 = __commonJS({
|
|
|
7494
7494
|
return sequenceProps;
|
|
7495
7495
|
};
|
|
7496
7496
|
var getSequenceValue = (value = "A", sequenceProps) => {
|
|
7497
|
-
const
|
|
7498
|
-
const { UNIT: UNIT22 } =
|
|
7497
|
+
const CONFIG22 = getActiveConfig2();
|
|
7498
|
+
const { UNIT: UNIT22 } = CONFIG22;
|
|
7499
7499
|
const {
|
|
7500
7500
|
sequence,
|
|
7501
7501
|
unit = UNIT22.default,
|
|
@@ -7529,11 +7529,11 @@ var require_cjs7 = __commonJS({
|
|
|
7529
7529
|
return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
|
|
7530
7530
|
}
|
|
7531
7531
|
if (!sequence[absValue] && absValue.length === 2) {
|
|
7532
|
-
if (
|
|
7532
|
+
if (CONFIG22.verbose)
|
|
7533
7533
|
console.warn(absValue, "- value is not found because `subSequence` is set to false");
|
|
7534
7534
|
absValue = absValue.slice(0, 1);
|
|
7535
7535
|
}
|
|
7536
|
-
if (useVariable ||
|
|
7536
|
+
if (useVariable || CONFIG22.useVariable) {
|
|
7537
7537
|
const varValue2 = `var(${prefix2}${absValue}${mediaName})`;
|
|
7538
7538
|
return isNegative ? `calc(${varValue2} * -1)` : varValue2;
|
|
7539
7539
|
}
|
|
@@ -7564,16 +7564,16 @@ var require_cjs7 = __commonJS({
|
|
|
7564
7564
|
};
|
|
7565
7565
|
var import_utils62 = __toESM2(require_cjs32(), 1);
|
|
7566
7566
|
var setVariables = (result, key) => {
|
|
7567
|
-
const
|
|
7568
|
-
const { CSS_VARS: CSS_VARS2 } =
|
|
7567
|
+
const CONFIG22 = getActiveConfig2();
|
|
7568
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
7569
7569
|
if ((0, import_utils62.isObjectLike)(result.value)) {
|
|
7570
7570
|
} else {
|
|
7571
7571
|
CSS_VARS2[result.var] = result.value;
|
|
7572
7572
|
}
|
|
7573
7573
|
};
|
|
7574
7574
|
var applySequenceVars = (props3, mediaName, options = {}) => {
|
|
7575
|
-
const
|
|
7576
|
-
const { UNIT: UNIT22, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } =
|
|
7575
|
+
const CONFIG22 = getActiveConfig2();
|
|
7576
|
+
const { UNIT: UNIT22, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
7577
7577
|
const unit = props3.unit || UNIT22.default;
|
|
7578
7578
|
const { sequence, scales } = props3;
|
|
7579
7579
|
for (const key in sequence) {
|
|
@@ -7582,7 +7582,7 @@ var require_cjs7 = __commonJS({
|
|
|
7582
7582
|
if (mediaName) {
|
|
7583
7583
|
const query = MEDIA2[mediaName];
|
|
7584
7584
|
if (!query) {
|
|
7585
|
-
if (
|
|
7585
|
+
if (CONFIG22.verbose)
|
|
7586
7586
|
console.warn("Can't find query ", query);
|
|
7587
7587
|
}
|
|
7588
7588
|
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
@@ -7602,13 +7602,13 @@ var require_cjs7 = __commonJS({
|
|
|
7602
7602
|
};
|
|
7603
7603
|
var import_utils72 = __toESM2(require_cjs32(), 1);
|
|
7604
7604
|
var generateSprite = (icons) => {
|
|
7605
|
-
const
|
|
7605
|
+
const CONFIG22 = getActiveConfig2();
|
|
7606
7606
|
let sprite = "";
|
|
7607
7607
|
for (const key in icons) {
|
|
7608
|
-
if (
|
|
7608
|
+
if (CONFIG22.__svg_cache[key])
|
|
7609
7609
|
continue;
|
|
7610
7610
|
else
|
|
7611
|
-
|
|
7611
|
+
CONFIG22.__svg_cache[key] = true;
|
|
7612
7612
|
sprite += icons[key];
|
|
7613
7613
|
}
|
|
7614
7614
|
return sprite;
|
|
@@ -7675,9 +7675,9 @@ var require_cjs7 = __commonJS({
|
|
|
7675
7675
|
});
|
|
7676
7676
|
var import_utils82 = __toESM2(require_cjs32(), 1);
|
|
7677
7677
|
var getColor5 = (value, key) => {
|
|
7678
|
-
const
|
|
7678
|
+
const CONFIG22 = getActiveConfig2();
|
|
7679
7679
|
if (!(0, import_utils82.isString)(value)) {
|
|
7680
|
-
if (
|
|
7680
|
+
if (CONFIG22.verbose)
|
|
7681
7681
|
console.warn(value, "- type for color is not valid");
|
|
7682
7682
|
return;
|
|
7683
7683
|
}
|
|
@@ -7686,17 +7686,17 @@ var require_cjs7 = __commonJS({
|
|
|
7686
7686
|
if (key && value[key])
|
|
7687
7687
|
value = value[key];
|
|
7688
7688
|
const [name, alpha, tone] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
7689
|
-
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } =
|
|
7689
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
7690
7690
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
7691
7691
|
if (!val) {
|
|
7692
|
-
if (
|
|
7692
|
+
if (CONFIG22.verbose)
|
|
7693
7693
|
console.warn("Can't find color ", name);
|
|
7694
7694
|
return value;
|
|
7695
7695
|
}
|
|
7696
7696
|
if (key) {
|
|
7697
7697
|
if (val[key])
|
|
7698
7698
|
val = val[key];
|
|
7699
|
-
else if (
|
|
7699
|
+
else if (CONFIG22.verbose)
|
|
7700
7700
|
console.warn(value, " - does not have ", key);
|
|
7701
7701
|
}
|
|
7702
7702
|
let rgb = val.rgb;
|
|
@@ -7722,23 +7722,23 @@ var require_cjs7 = __commonJS({
|
|
|
7722
7722
|
}
|
|
7723
7723
|
if (alpha)
|
|
7724
7724
|
return `rgba(${rgb}, ${alpha})`;
|
|
7725
|
-
return
|
|
7725
|
+
return CONFIG22.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
7726
7726
|
} else
|
|
7727
|
-
return
|
|
7727
|
+
return CONFIG22.useVariable ? `var(${val.var})` : val.value;
|
|
7728
7728
|
};
|
|
7729
7729
|
var getMediaColor9 = (value, globalTheme) => {
|
|
7730
|
-
const
|
|
7730
|
+
const CONFIG22 = getActiveConfig2();
|
|
7731
7731
|
if (!globalTheme)
|
|
7732
|
-
globalTheme =
|
|
7732
|
+
globalTheme = CONFIG22.globalTheme;
|
|
7733
7733
|
if (!(0, import_utils82.isString)(value)) {
|
|
7734
|
-
if (
|
|
7734
|
+
if (CONFIG22.verbose)
|
|
7735
7735
|
console.warn(value, "- type for color is not valid");
|
|
7736
7736
|
return;
|
|
7737
7737
|
}
|
|
7738
7738
|
if (value.slice(0, 2) === "--")
|
|
7739
7739
|
return `var(${value})`;
|
|
7740
7740
|
const [name] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
7741
|
-
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } =
|
|
7741
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
7742
7742
|
const val = COLOR2[name] || GRADIENT2[name];
|
|
7743
7743
|
const isObj = (0, import_utils82.isObject)(val);
|
|
7744
7744
|
if (isObj && val.value)
|
|
@@ -7749,20 +7749,20 @@ var require_cjs7 = __commonJS({
|
|
|
7749
7749
|
else {
|
|
7750
7750
|
const obj = {};
|
|
7751
7751
|
for (const mediaName in val) {
|
|
7752
|
-
const query =
|
|
7752
|
+
const query = CONFIG22.MEDIA[mediaName.slice(1)];
|
|
7753
7753
|
const media = `@media screen and ${query}`;
|
|
7754
7754
|
obj[media] = getColor5(value, mediaName);
|
|
7755
7755
|
}
|
|
7756
7756
|
return obj;
|
|
7757
7757
|
}
|
|
7758
7758
|
} else {
|
|
7759
|
-
if (
|
|
7759
|
+
if (CONFIG22.verbose)
|
|
7760
7760
|
console.warn("Can't find color", value);
|
|
7761
7761
|
return value;
|
|
7762
7762
|
}
|
|
7763
7763
|
};
|
|
7764
7764
|
var setColor = (val, key, suffix) => {
|
|
7765
|
-
const
|
|
7765
|
+
const CONFIG22 = getActiveConfig2();
|
|
7766
7766
|
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
7767
7767
|
val = getColor5(val.slice(2));
|
|
7768
7768
|
if ((0, import_utils82.isArray)(val)) {
|
|
@@ -7782,8 +7782,8 @@ var require_cjs7 = __commonJS({
|
|
|
7782
7782
|
const alpha = parseFloat(a.toFixed(2));
|
|
7783
7783
|
const rgb = `${r}, ${g}, ${b}`;
|
|
7784
7784
|
const value = `rgba(${rgb}, ${alpha})`;
|
|
7785
|
-
if (
|
|
7786
|
-
|
|
7785
|
+
if (CONFIG22.useVariable) {
|
|
7786
|
+
CONFIG22.CSS_VARS[CSSVar] = value;
|
|
7787
7787
|
}
|
|
7788
7788
|
return {
|
|
7789
7789
|
var: CSSVar,
|
|
@@ -7793,7 +7793,7 @@ var require_cjs7 = __commonJS({
|
|
|
7793
7793
|
};
|
|
7794
7794
|
};
|
|
7795
7795
|
var setGradient = (val, key, suffix) => {
|
|
7796
|
-
const
|
|
7796
|
+
const CONFIG22 = getActiveConfig2();
|
|
7797
7797
|
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
7798
7798
|
val = getColor5(val.slice(2));
|
|
7799
7799
|
if ((0, import_utils82.isArray)(val)) {
|
|
@@ -7809,8 +7809,8 @@ var require_cjs7 = __commonJS({
|
|
|
7809
7809
|
return obj;
|
|
7810
7810
|
}
|
|
7811
7811
|
const CSSVar = `--gradient-${key}` + (suffix ? `-${suffix}` : "");
|
|
7812
|
-
if (
|
|
7813
|
-
|
|
7812
|
+
if (CONFIG22.useVariable) {
|
|
7813
|
+
CONFIG22.CSS_VARS[CSSVar] = val.value || val;
|
|
7814
7814
|
}
|
|
7815
7815
|
return {
|
|
7816
7816
|
var: CSSVar,
|
|
@@ -7836,10 +7836,10 @@ var require_cjs7 = __commonJS({
|
|
|
7836
7836
|
return theme.value;
|
|
7837
7837
|
};
|
|
7838
7838
|
var getTheme5 = (value, modifier) => {
|
|
7839
|
-
const
|
|
7840
|
-
if (
|
|
7839
|
+
const CONFIG22 = getActiveConfig2();
|
|
7840
|
+
if (CONFIG22.useVariable)
|
|
7841
7841
|
return getMediaTheme5(value, modifier);
|
|
7842
|
-
const { THEME: THEME2 } =
|
|
7842
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
7843
7843
|
if ((0, import_utils102.isString)(value)) {
|
|
7844
7844
|
const [theme, subtheme] = value.split(" ");
|
|
7845
7845
|
const isOurTheme = THEME2[theme];
|
|
@@ -7915,7 +7915,7 @@ var require_cjs7 = __commonJS({
|
|
|
7915
7915
|
return theme;
|
|
7916
7916
|
};
|
|
7917
7917
|
var setHelpers = (theme, value) => {
|
|
7918
|
-
const
|
|
7918
|
+
const CONFIG22 = getActiveConfig2();
|
|
7919
7919
|
const { helpers } = theme;
|
|
7920
7920
|
if (!helpers)
|
|
7921
7921
|
return;
|
|
@@ -7923,7 +7923,7 @@ var require_cjs7 = __commonJS({
|
|
|
7923
7923
|
keys.map((key) => {
|
|
7924
7924
|
const helper = helpers[key];
|
|
7925
7925
|
if ((0, import_utils102.isString)(helper))
|
|
7926
|
-
helpers[key] =
|
|
7926
|
+
helpers[key] = CONFIG22.THEME[helper];
|
|
7927
7927
|
else
|
|
7928
7928
|
getThemeValue(helpers[key]);
|
|
7929
7929
|
return theme;
|
|
@@ -7931,8 +7931,8 @@ var require_cjs7 = __commonJS({
|
|
|
7931
7931
|
return theme;
|
|
7932
7932
|
};
|
|
7933
7933
|
var setTheme = (val, key) => {
|
|
7934
|
-
const
|
|
7935
|
-
if (
|
|
7934
|
+
const CONFIG22 = getActiveConfig2();
|
|
7935
|
+
if (CONFIG22.useVariable)
|
|
7936
7936
|
return setMediaTheme(val, key);
|
|
7937
7937
|
const { state, media, helpers } = val;
|
|
7938
7938
|
const value = setThemeValue(val, key);
|
|
@@ -7943,8 +7943,8 @@ var require_cjs7 = __commonJS({
|
|
|
7943
7943
|
return { var: CSSvar, value, state, media, helpers };
|
|
7944
7944
|
};
|
|
7945
7945
|
var setMediaTheme = (val, key, suffix, prefers) => {
|
|
7946
|
-
const
|
|
7947
|
-
const { CSS_VARS: CSS_VARS2 } =
|
|
7946
|
+
const CONFIG22 = getActiveConfig2();
|
|
7947
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
7948
7948
|
const theme = { value: val };
|
|
7949
7949
|
if ((0, import_utils102.isObjectLike)(val)) {
|
|
7950
7950
|
for (const param in val) {
|
|
@@ -7958,7 +7958,7 @@ var require_cjs7 = __commonJS({
|
|
|
7958
7958
|
const metaSuffixes = [...new Set([prefers, suffix].filter((v) => v).map((v) => v.slice(1)))];
|
|
7959
7959
|
const varmetaSuffixName = metaSuffixes.length ? "-" + metaSuffixes.join("-") : "";
|
|
7960
7960
|
const CSSVar = `--theme-${key}${varmetaSuffixName}-${param}`;
|
|
7961
|
-
if (
|
|
7961
|
+
if (CONFIG22.useVariable) {
|
|
7962
7962
|
CSS_VARS2[CSSVar] = color;
|
|
7963
7963
|
theme[param] = `var(${CSSVar})`;
|
|
7964
7964
|
} else {
|
|
@@ -7975,7 +7975,7 @@ var require_cjs7 = __commonJS({
|
|
|
7975
7975
|
}
|
|
7976
7976
|
}
|
|
7977
7977
|
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--") {
|
|
7978
|
-
const { THEME: THEME2 } =
|
|
7978
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
7979
7979
|
const value = THEME2[val.slice(2)];
|
|
7980
7980
|
const getReferenced = getMediaTheme5(value, prefers);
|
|
7981
7981
|
return getReferenced;
|
|
@@ -7983,13 +7983,13 @@ var require_cjs7 = __commonJS({
|
|
|
7983
7983
|
return theme;
|
|
7984
7984
|
};
|
|
7985
7985
|
var recursiveTheme = (val) => {
|
|
7986
|
-
const
|
|
7986
|
+
const CONFIG22 = getActiveConfig2();
|
|
7987
7987
|
const obj = {};
|
|
7988
7988
|
for (const param in val) {
|
|
7989
7989
|
const symb = param.slice(0, 1);
|
|
7990
7990
|
if ((0, import_utils102.isObjectLike)(val[param])) {
|
|
7991
7991
|
if (symb === "@") {
|
|
7992
|
-
const query =
|
|
7992
|
+
const query = CONFIG22.MEDIA[param.slice(1)];
|
|
7993
7993
|
const media = `@media screen and ${query}`;
|
|
7994
7994
|
obj[media] = recursiveTheme(val[param]);
|
|
7995
7995
|
} else if (symb === ":") {
|
|
@@ -8015,16 +8015,16 @@ var require_cjs7 = __commonJS({
|
|
|
8015
8015
|
return val;
|
|
8016
8016
|
};
|
|
8017
8017
|
var getMediaTheme5 = (val, mod) => {
|
|
8018
|
-
const
|
|
8018
|
+
const CONFIG22 = getActiveConfig2();
|
|
8019
8019
|
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--")
|
|
8020
8020
|
val = getMediaTheme5(val.slice(2));
|
|
8021
8021
|
if (!val || !(0, import_utils102.isString)(val)) {
|
|
8022
|
-
if (
|
|
8022
|
+
if (CONFIG22.verbose)
|
|
8023
8023
|
console.warn(val, "- theme is not string");
|
|
8024
8024
|
return;
|
|
8025
8025
|
}
|
|
8026
8026
|
const [name, ...modifier] = (0, import_utils102.isArray)(val) ? val : val.split(" ");
|
|
8027
|
-
let value =
|
|
8027
|
+
let value = CONFIG22.THEME[name];
|
|
8028
8028
|
if (value && (modifier || mod)) {
|
|
8029
8029
|
value = findModifier(value, modifier.length ? modifier : mod);
|
|
8030
8030
|
}
|
|
@@ -8038,13 +8038,13 @@ var require_cjs7 = __commonJS({
|
|
|
8038
8038
|
return { var: CSSvar, value: val, fontFace };
|
|
8039
8039
|
};
|
|
8040
8040
|
var getFontFamily5 = (key, factory) => {
|
|
8041
|
-
const
|
|
8042
|
-
const { FONT_FAMILY: FONT_FAMILY2 } =
|
|
8041
|
+
const CONFIG22 = getActiveConfig2();
|
|
8042
|
+
const { FONT_FAMILY: FONT_FAMILY2 } = CONFIG22;
|
|
8043
8043
|
return getDefaultOrFirstKey(factory || FONT_FAMILY2, key);
|
|
8044
8044
|
};
|
|
8045
8045
|
var setFontFamily = (val, key) => {
|
|
8046
|
-
const
|
|
8047
|
-
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } =
|
|
8046
|
+
const CONFIG22 = getActiveConfig2();
|
|
8047
|
+
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } = CONFIG22;
|
|
8048
8048
|
let { value, type } = val;
|
|
8049
8049
|
if (val.isDefault)
|
|
8050
8050
|
FONT_FAMILY2.default = key;
|
|
@@ -8056,8 +8056,8 @@ var require_cjs7 = __commonJS({
|
|
|
8056
8056
|
};
|
|
8057
8057
|
var import_utils142 = __toESM2(require_cjs32(), 1);
|
|
8058
8058
|
var runThroughMedia = (props3) => {
|
|
8059
|
-
const
|
|
8060
|
-
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } =
|
|
8059
|
+
const CONFIG22 = getActiveConfig2();
|
|
8060
|
+
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG22;
|
|
8061
8061
|
for (const prop in props3) {
|
|
8062
8062
|
const mediaProps = props3[prop];
|
|
8063
8063
|
if (prop.slice(0, 1) === "@") {
|
|
@@ -8086,7 +8086,7 @@ var require_cjs7 = __commonJS({
|
|
|
8086
8086
|
}
|
|
8087
8087
|
};
|
|
8088
8088
|
var applyHeadings = (props3) => {
|
|
8089
|
-
const
|
|
8089
|
+
const CONFIG22 = getActiveConfig2();
|
|
8090
8090
|
if (props3.h1Matches) {
|
|
8091
8091
|
const unit = props3.unit;
|
|
8092
8092
|
const HEADINGS = findHeadings(props3);
|
|
@@ -8095,7 +8095,7 @@ var require_cjs7 = __commonJS({
|
|
|
8095
8095
|
const headerName = `h${parseInt(k) + 1}`;
|
|
8096
8096
|
const headerStyle = templates[headerName];
|
|
8097
8097
|
templates[headerName] = {
|
|
8098
|
-
fontSize:
|
|
8098
|
+
fontSize: CONFIG22.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
|
|
8099
8099
|
margin: headerStyle ? headerStyle.margin : 0,
|
|
8100
8100
|
lineHeight: headerStyle ? headerStyle.lineHeight : props3.lineHeight,
|
|
8101
8101
|
letterSpacing: headerStyle ? headerStyle.letterSpacing : props3.letterSpacing,
|
|
@@ -8105,16 +8105,16 @@ var require_cjs7 = __commonJS({
|
|
|
8105
8105
|
}
|
|
8106
8106
|
};
|
|
8107
8107
|
var applyTypographySequence = () => {
|
|
8108
|
-
const
|
|
8109
|
-
const { TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
8108
|
+
const CONFIG22 = getActiveConfig2();
|
|
8109
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
8110
8110
|
generateSequence(TYPOGRAPHY2);
|
|
8111
8111
|
applyHeadings(TYPOGRAPHY2);
|
|
8112
8112
|
applySequenceVars(TYPOGRAPHY2);
|
|
8113
8113
|
runThroughMedia(TYPOGRAPHY2);
|
|
8114
8114
|
};
|
|
8115
8115
|
var getFontSizeByKey5 = (value) => {
|
|
8116
|
-
const
|
|
8117
|
-
const { TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
8116
|
+
const CONFIG22 = getActiveConfig2();
|
|
8117
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
8118
8118
|
return getSequenceValuePropertyPair(
|
|
8119
8119
|
value,
|
|
8120
8120
|
"fontSize",
|
|
@@ -8147,15 +8147,15 @@ var require_cjs7 = __commonJS({
|
|
|
8147
8147
|
}
|
|
8148
8148
|
};
|
|
8149
8149
|
var applySpacingSequence = () => {
|
|
8150
|
-
const
|
|
8151
|
-
const { SPACING: SPACING2 } =
|
|
8150
|
+
const CONFIG22 = getActiveConfig2();
|
|
8151
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
8152
8152
|
generateSequence(SPACING2);
|
|
8153
8153
|
applySequenceVars(SPACING2);
|
|
8154
8154
|
runThroughMedia2(SPACING2);
|
|
8155
8155
|
};
|
|
8156
8156
|
var getSequence = (sequenceProps) => {
|
|
8157
|
-
const
|
|
8158
|
-
const { SPACING: SPACING2 } =
|
|
8157
|
+
const CONFIG22 = getActiveConfig2();
|
|
8158
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
8159
8159
|
if (!sequenceProps)
|
|
8160
8160
|
return SPACING2;
|
|
8161
8161
|
const hasGenerated = Object.keys(sequenceProps.sequence).length > 0;
|
|
@@ -8194,8 +8194,8 @@ var require_cjs7 = __commonJS({
|
|
|
8194
8194
|
);
|
|
8195
8195
|
};
|
|
8196
8196
|
var getSpacingBasedOnRatio13 = (props3, propertyName, val) => {
|
|
8197
|
-
const
|
|
8198
|
-
const { SPACING: SPACING2 } =
|
|
8197
|
+
const CONFIG22 = getActiveConfig2();
|
|
8198
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
8199
8199
|
const { spacingRatio, unit } = props3;
|
|
8200
8200
|
const value = val || props3[propertyName];
|
|
8201
8201
|
if (spacingRatio) {
|
|
@@ -8224,19 +8224,19 @@ var require_cjs7 = __commonJS({
|
|
|
8224
8224
|
return getSpacingByKey9(value, propertyName);
|
|
8225
8225
|
};
|
|
8226
8226
|
var applyTimingSequence = () => {
|
|
8227
|
-
const
|
|
8228
|
-
const { TIMING: TIMING2 } =
|
|
8227
|
+
const CONFIG22 = getActiveConfig2();
|
|
8228
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
8229
8229
|
generateSequence(TIMING2);
|
|
8230
8230
|
applySequenceVars(TIMING2);
|
|
8231
8231
|
};
|
|
8232
8232
|
var getTimingFunction9 = (value) => {
|
|
8233
|
-
const
|
|
8234
|
-
const { TIMING: TIMING2 } =
|
|
8233
|
+
const CONFIG22 = getActiveConfig2();
|
|
8234
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
8235
8235
|
return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
|
|
8236
8236
|
};
|
|
8237
8237
|
var getTimingByKey5 = (value, property = "timing") => {
|
|
8238
|
-
const
|
|
8239
|
-
const { TIMING: TIMING2 } =
|
|
8238
|
+
const CONFIG22 = getActiveConfig2();
|
|
8239
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
8240
8240
|
return getSequenceValuePropertyPair(
|
|
8241
8241
|
value,
|
|
8242
8242
|
property,
|
|
@@ -8245,8 +8245,8 @@ var require_cjs7 = __commonJS({
|
|
|
8245
8245
|
};
|
|
8246
8246
|
var import_utils21 = __toESM2(require_cjs32(), 1);
|
|
8247
8247
|
var applyDocument = () => {
|
|
8248
|
-
const
|
|
8249
|
-
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } =
|
|
8248
|
+
const CONFIG22 = getActiveConfig2();
|
|
8249
|
+
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
8250
8250
|
return (0, import_utils21.merge)(DOCUMENT2, {
|
|
8251
8251
|
theme: THEME2.document,
|
|
8252
8252
|
fontFamily: getDefaultOrFirstKey(FONT_FAMILY2),
|
|
@@ -8259,36 +8259,36 @@ var require_cjs7 = __commonJS({
|
|
|
8259
8259
|
document: import_globals2.document
|
|
8260
8260
|
};
|
|
8261
8261
|
var setSVG = (val, key) => {
|
|
8262
|
-
const
|
|
8262
|
+
const CONFIG22 = getActiveConfig2();
|
|
8263
8263
|
if (!val) {
|
|
8264
|
-
if (
|
|
8264
|
+
if (CONFIG22.verbose)
|
|
8265
8265
|
console.warn("setSVG: val is not defined", key);
|
|
8266
8266
|
return;
|
|
8267
8267
|
}
|
|
8268
|
-
if (
|
|
8268
|
+
if (CONFIG22.useSvgSprite) {
|
|
8269
8269
|
return convertSvgToSymbol(key, val);
|
|
8270
8270
|
}
|
|
8271
8271
|
return val;
|
|
8272
8272
|
};
|
|
8273
8273
|
var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
8274
|
-
const
|
|
8275
|
-
const lib = Object.keys(LIBRARY).length ? {} :
|
|
8274
|
+
const CONFIG22 = getActiveConfig2();
|
|
8275
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.SVG;
|
|
8276
8276
|
for (const key in LIBRARY)
|
|
8277
|
-
lib[key] =
|
|
8277
|
+
lib[key] = CONFIG22.SVG[key];
|
|
8278
8278
|
appendSVG(lib, options);
|
|
8279
8279
|
};
|
|
8280
8280
|
var setIcon = (val, key) => {
|
|
8281
|
-
const
|
|
8282
|
-
if (
|
|
8281
|
+
const CONFIG22 = getActiveConfig2();
|
|
8282
|
+
if (CONFIG22.useIconSprite) {
|
|
8283
8283
|
return setSVG(val, key);
|
|
8284
8284
|
}
|
|
8285
8285
|
return val;
|
|
8286
8286
|
};
|
|
8287
8287
|
var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
8288
|
-
const
|
|
8289
|
-
const lib = Object.keys(LIBRARY).length ? {} :
|
|
8288
|
+
const CONFIG22 = getActiveConfig2();
|
|
8289
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.ICONS;
|
|
8290
8290
|
for (const key in LIBRARY)
|
|
8291
|
-
lib[key] =
|
|
8291
|
+
lib[key] = CONFIG22.ICONS[key];
|
|
8292
8292
|
appendSVG(lib, options);
|
|
8293
8293
|
};
|
|
8294
8294
|
var createSVGSpriteElement = (options = { isRoot: true }) => {
|
|
@@ -8303,10 +8303,10 @@ var require_cjs7 = __commonJS({
|
|
|
8303
8303
|
return svgElem;
|
|
8304
8304
|
};
|
|
8305
8305
|
var appendSVG = (lib, options = DEF_OPTIONS) => {
|
|
8306
|
-
const
|
|
8306
|
+
const CONFIG22 = getActiveConfig2();
|
|
8307
8307
|
const doc = options.document || import_globals2.document;
|
|
8308
8308
|
if (!doc) {
|
|
8309
|
-
if (
|
|
8309
|
+
if (CONFIG22.verbose) {
|
|
8310
8310
|
console.warn("To append SVG sprites it should be run in browser environment");
|
|
8311
8311
|
}
|
|
8312
8312
|
return generateSprite(lib);
|
|
@@ -8325,14 +8325,14 @@ var require_cjs7 = __commonJS({
|
|
|
8325
8325
|
};
|
|
8326
8326
|
var import_utils24 = __toESM2(require_cjs32(), 1);
|
|
8327
8327
|
var applyReset = (reset = {}) => {
|
|
8328
|
-
const
|
|
8329
|
-
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } =
|
|
8328
|
+
const CONFIG22 = getActiveConfig2();
|
|
8329
|
+
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG22;
|
|
8330
8330
|
if (RESET2) {
|
|
8331
8331
|
if (RESET2[":root"]) {
|
|
8332
8332
|
const configReset = RESET2;
|
|
8333
8333
|
const configTemplates = TYPOGRAPHY2.templates;
|
|
8334
8334
|
configReset.body = {
|
|
8335
|
-
...
|
|
8335
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
8336
8336
|
...configTemplates.body
|
|
8337
8337
|
};
|
|
8338
8338
|
configReset.h1 = configTemplates.h1;
|
|
@@ -8355,7 +8355,7 @@ var require_cjs7 = __commonJS({
|
|
|
8355
8355
|
WebkitFontSmoothing: "antialiased",
|
|
8356
8356
|
scrollBehavior: "smooth",
|
|
8357
8357
|
fontSize: TYPOGRAPHY2.browserDefault + "px",
|
|
8358
|
-
...
|
|
8358
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
8359
8359
|
fontFamily: DOCUMENT2.fontFamily,
|
|
8360
8360
|
lineHeight: DOCUMENT2.lineHeight
|
|
8361
8361
|
},
|
|
@@ -8364,7 +8364,7 @@ var require_cjs7 = __commonJS({
|
|
|
8364
8364
|
height: "100%",
|
|
8365
8365
|
margin: 0,
|
|
8366
8366
|
fontFamily: DOCUMENT2.fontFamily,
|
|
8367
|
-
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault +
|
|
8367
|
+
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault + CONFIG22.UNIT.default,
|
|
8368
8368
|
...templates,
|
|
8369
8369
|
...body
|
|
8370
8370
|
},
|
|
@@ -8436,15 +8436,15 @@ var require_cjs7 = __commonJS({
|
|
|
8436
8436
|
}).join(" ");
|
|
8437
8437
|
}).join(",");
|
|
8438
8438
|
var transformBackgroundImage5 = (backgroundImage, globalTheme) => {
|
|
8439
|
-
const
|
|
8439
|
+
const CONFIG22 = getActiveConfig2();
|
|
8440
8440
|
return backgroundImage.split(", ").map((v) => {
|
|
8441
8441
|
if (v.slice(0, 2) === "--")
|
|
8442
8442
|
return `var(${v})`;
|
|
8443
8443
|
if (v.includes("url") || v.includes("gradient"))
|
|
8444
8444
|
return v;
|
|
8445
|
-
else if (
|
|
8445
|
+
else if (CONFIG22.GRADIENT[backgroundImage]) {
|
|
8446
8446
|
return {
|
|
8447
|
-
backgroundImage: getMediaColor9(backgroundImage, globalTheme ||
|
|
8447
|
+
backgroundImage: getMediaColor9(backgroundImage, globalTheme || CONFIG22.globalTheme)
|
|
8448
8448
|
};
|
|
8449
8449
|
} else if (v.includes("/") || v.includes("http"))
|
|
8450
8450
|
return `url(${v})`;
|
|
@@ -8505,27 +8505,27 @@ var require_cjs7 = __commonJS({
|
|
|
8505
8505
|
animation: setSameValue
|
|
8506
8506
|
};
|
|
8507
8507
|
var setValue = (FACTORY_NAME, value, key) => {
|
|
8508
|
-
const
|
|
8508
|
+
const CONFIG22 = getActiveConfig2();
|
|
8509
8509
|
const factoryName = FACTORY_NAME.toLowerCase();
|
|
8510
|
-
const FACTORY2 =
|
|
8510
|
+
const FACTORY2 = CONFIG22[FACTORY_NAME];
|
|
8511
8511
|
if (VALUE_TRANSFORMERS[factoryName]) {
|
|
8512
8512
|
const result = VALUE_TRANSFORMERS[factoryName](value, key);
|
|
8513
8513
|
FACTORY2[key] = result;
|
|
8514
8514
|
return FACTORY2;
|
|
8515
8515
|
}
|
|
8516
|
-
if (
|
|
8516
|
+
if (CONFIG22.verbose)
|
|
8517
8517
|
console.warn("Can not find", factoryName, "method in scratch");
|
|
8518
8518
|
};
|
|
8519
8519
|
var setEach = (factoryName, props3) => {
|
|
8520
|
-
const
|
|
8520
|
+
const CONFIG22 = getActiveConfig2();
|
|
8521
8521
|
const FACTORY_NAME = factoryName.toUpperCase();
|
|
8522
8522
|
const keys = Object.keys(props3);
|
|
8523
8523
|
keys.map((key) => setValue(FACTORY_NAME, props3[key], key));
|
|
8524
|
-
return
|
|
8524
|
+
return CONFIG22[FACTORY_NAME];
|
|
8525
8525
|
};
|
|
8526
8526
|
var SET_OPTIONS = {};
|
|
8527
8527
|
var set2 = (recivedConfig, options = SET_OPTIONS) => {
|
|
8528
|
-
let
|
|
8528
|
+
let CONFIG22 = getActiveConfig2();
|
|
8529
8529
|
const {
|
|
8530
8530
|
version,
|
|
8531
8531
|
verbose,
|
|
@@ -8539,28 +8539,28 @@ var require_cjs7 = __commonJS({
|
|
|
8539
8539
|
...config
|
|
8540
8540
|
} = recivedConfig;
|
|
8541
8541
|
if (options.newConfig) {
|
|
8542
|
-
|
|
8542
|
+
CONFIG22 = setActiveConfig(options.newConfig);
|
|
8543
8543
|
}
|
|
8544
8544
|
if (verbose !== void 0)
|
|
8545
|
-
|
|
8545
|
+
CONFIG22.verbose = verbose;
|
|
8546
8546
|
if (useVariable !== void 0)
|
|
8547
|
-
|
|
8547
|
+
CONFIG22.useVariable = useVariable;
|
|
8548
8548
|
if (useReset !== void 0)
|
|
8549
|
-
|
|
8549
|
+
CONFIG22.useReset = useReset;
|
|
8550
8550
|
if (useFontImport !== void 0)
|
|
8551
|
-
|
|
8551
|
+
CONFIG22.useFontImport = useFontImport;
|
|
8552
8552
|
if (useSvgSprite !== void 0)
|
|
8553
|
-
|
|
8553
|
+
CONFIG22.useSvgSprite = useSvgSprite;
|
|
8554
8554
|
if (useIconSprite !== void 0)
|
|
8555
|
-
|
|
8555
|
+
CONFIG22.useIconSprite = useIconSprite;
|
|
8556
8556
|
if (useDocumentTheme !== void 0)
|
|
8557
|
-
|
|
8557
|
+
CONFIG22.useDocumentTheme = useDocumentTheme;
|
|
8558
8558
|
if (globalTheme !== void 0)
|
|
8559
|
-
|
|
8560
|
-
if (
|
|
8561
|
-
console.log(
|
|
8562
|
-
if (!
|
|
8563
|
-
|
|
8559
|
+
CONFIG22.globalTheme = globalTheme;
|
|
8560
|
+
if (CONFIG22.verbose)
|
|
8561
|
+
console.log(CONFIG22);
|
|
8562
|
+
if (!CONFIG22.__svg_cache)
|
|
8563
|
+
CONFIG22.__svg_cache = {};
|
|
8564
8564
|
const keys = Object.keys(config);
|
|
8565
8565
|
keys.map((key) => setEach(key, config[key]));
|
|
8566
8566
|
applyTypographySequence();
|
|
@@ -8568,7 +8568,7 @@ var require_cjs7 = __commonJS({
|
|
|
8568
8568
|
applyTimingSequence();
|
|
8569
8569
|
applyDocument();
|
|
8570
8570
|
applyReset();
|
|
8571
|
-
return
|
|
8571
|
+
return CONFIG22;
|
|
8572
8572
|
};
|
|
8573
8573
|
}
|
|
8574
8574
|
});
|
|
@@ -8912,13 +8912,14 @@ var Timing = {
|
|
|
8912
8912
|
};
|
|
8913
8913
|
|
|
8914
8914
|
// Atoms/Shape/style.js
|
|
8915
|
+
var CONFIG = (0, import_scratch4.getActiveConfig)();
|
|
8915
8916
|
var depth = {
|
|
8916
|
-
4: { boxShadow: `rgba(0,0,0,.10) 0 2${
|
|
8917
|
-
6: { boxShadow: `rgba(0,0,0,.10) 0 3${
|
|
8918
|
-
10: { boxShadow: `rgba(0,0,0,.10) 0 4${
|
|
8919
|
-
16: { boxShadow: `rgba(0,0,0,.10) 0 8${
|
|
8920
|
-
26: { boxShadow: `rgba(0,0,0,.10) 0 14${
|
|
8921
|
-
42: { boxShadow: `rgba(0,0,0,.10) 0 20${
|
|
8917
|
+
4: { boxShadow: `rgba(0,0,0,.10) 0 2${CONFIG.UNIT.default} 4${CONFIG.UNIT.default}` },
|
|
8918
|
+
6: { boxShadow: `rgba(0,0,0,.10) 0 3${CONFIG.UNIT.default} 6${CONFIG.UNIT.default}` },
|
|
8919
|
+
10: { boxShadow: `rgba(0,0,0,.10) 0 4${CONFIG.UNIT.default} 10${CONFIG.UNIT.default}` },
|
|
8920
|
+
16: { boxShadow: `rgba(0,0,0,.10) 0 8${CONFIG.UNIT.default} 16${CONFIG.UNIT.default}` },
|
|
8921
|
+
26: { boxShadow: `rgba(0,0,0,.10) 0 14${CONFIG.UNIT.default} 26${CONFIG.UNIT.default}` },
|
|
8922
|
+
42: { boxShadow: `rgba(0,0,0,.10) 0 20${CONFIG.UNIT.default} 42${CONFIG.UNIT.default}` }
|
|
8922
8923
|
};
|
|
8923
8924
|
var getComputedBackgroundColor = ({ props: props3 }) => {
|
|
8924
8925
|
return (0, import_scratch4.getColor)(props3.shapeDirectionColor) || (0, import_scratch4.getColor)(props3.borderColor) || (0, import_scratch4.getColor)(props3.backgroundColor) || (0, import_scratch4.getColor)(props3.background);
|
|
@@ -11358,9 +11359,10 @@ var import_scratch17 = __toESM(require_cjs5());
|
|
|
11358
11359
|
var import_scratch18 = __toESM(require_cjs5());
|
|
11359
11360
|
var import_utils9 = __toESM(require_cjs4());
|
|
11360
11361
|
|
|
11361
|
-
//
|
|
11362
|
+
// Datepicker/node_modules/@symbo.ls/emotion/index.js
|
|
11362
11363
|
var createEmotion4 = (key = "smbls", container) => {
|
|
11363
|
-
|
|
11364
|
+
const cleanKey = key.replaceAll(/\./g, "-");
|
|
11365
|
+
return emotion_css_create_instance_esm_default({ key: cleanKey, container });
|
|
11364
11366
|
};
|
|
11365
11367
|
var emotion2 = createEmotion4();
|
|
11366
11368
|
|
|
@@ -11752,7 +11754,16 @@ var import_scratch26 = __toESM(require_cjs());
|
|
|
11752
11754
|
// Field/node_modules/@symbo.ls/atoms/Animation.js
|
|
11753
11755
|
var import_scratch27 = __toESM(require_cjs());
|
|
11754
11756
|
var import_utils13 = __toESM(require_cjs4());
|
|
11755
|
-
|
|
11757
|
+
|
|
11758
|
+
// Field/node_modules/@symbo.ls/emotion/index.js
|
|
11759
|
+
var createEmotion5 = (key = "smbls", container) => {
|
|
11760
|
+
const cleanKey = key.replaceAll(/\./g, "-");
|
|
11761
|
+
return emotion_css_create_instance_esm_default({ key: cleanKey, container });
|
|
11762
|
+
};
|
|
11763
|
+
var emotion3 = createEmotion5();
|
|
11764
|
+
|
|
11765
|
+
// Field/node_modules/@symbo.ls/atoms/Animation.js
|
|
11766
|
+
var { keyframes: keyframes3 } = emotion3;
|
|
11756
11767
|
|
|
11757
11768
|
// Field/index.js
|
|
11758
11769
|
var Field = {
|
|
@@ -12090,7 +12101,16 @@ var import_scratch37 = __toESM(require_cjs7());
|
|
|
12090
12101
|
// Notification/node_modules/@symbo.ls/atoms/Animation.js
|
|
12091
12102
|
var import_scratch38 = __toESM(require_cjs7());
|
|
12092
12103
|
var import_utils19 = __toESM(require_cjs4());
|
|
12093
|
-
|
|
12104
|
+
|
|
12105
|
+
// Notification/node_modules/@symbo.ls/emotion/index.js
|
|
12106
|
+
var createEmotion6 = (key = "smbls", container) => {
|
|
12107
|
+
const cleanKey = key.replaceAll(/\./g, "-");
|
|
12108
|
+
return emotion_css_create_instance_esm_default({ key: cleanKey, container });
|
|
12109
|
+
};
|
|
12110
|
+
var emotion4 = createEmotion6();
|
|
12111
|
+
|
|
12112
|
+
// Notification/node_modules/@symbo.ls/atoms/Animation.js
|
|
12113
|
+
var { keyframes: keyframes4 } = emotion4;
|
|
12094
12114
|
|
|
12095
12115
|
// Notification/index.js
|
|
12096
12116
|
var Notification = {
|