@symbo.ls/scratch 2.11.453 → 2.11.464

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.
@@ -768,10 +768,10 @@ var require_object = __commonJS({
768
768
  return o;
769
769
  };
770
770
  var deepStringify = (obj, stringified = {}) => {
771
- var _a;
771
+ var _a, _b;
772
772
  if (obj.node || obj.__ref || obj.parent || obj.__element || obj.parse) {
773
- console.warn("Trying to clone element or state at", obj);
774
- obj = (_a = obj.parse) == null ? void 0 : _a.call(obj);
773
+ (obj.__element || ((_a = obj.parent) == null ? void 0 : _a.__element)).warn("Trying to clone element or state at", obj);
774
+ obj = (_b = obj.parse) == null ? void 0 : _b.call(obj);
775
775
  }
776
776
  for (const prop in obj) {
777
777
  const objProp = obj[prop];
@@ -841,7 +841,7 @@ var require_object = __commonJS({
841
841
  if ((0, import_types.isArray)(value)) {
842
842
  str += "[\n";
843
843
  for (const element of value) {
844
- if ((0, import_types.isObject)(element) && element !== null) {
844
+ if ((0, import_types.isObjectLike)(element) && element !== null) {
845
845
  str += `${spaces} ${objectToString(element, indent + 2)},
846
846
  `;
847
847
  } else if ((0, import_types.isString)(element)) {
@@ -1411,9 +1411,11 @@ var require_cookie = __commonJS({
1411
1411
  var cookie_exports = {};
1412
1412
  __export2(cookie_exports, {
1413
1413
  getCookie: () => getCookie,
1414
+ getLocalStorage: () => getLocalStorage,
1414
1415
  isMobile: () => isMobile,
1415
1416
  removeCookie: () => removeCookie,
1416
- setCookie: () => setCookie
1417
+ setCookie: () => setCookie,
1418
+ setLocalStorage: () => setLocalStorage
1417
1419
  });
1418
1420
  module2.exports = __toCommonJS2(cookie_exports);
1419
1421
  var import_types = require_types();
@@ -1447,6 +1449,27 @@ var require_cookie = __commonJS({
1447
1449
  return;
1448
1450
  import_utils3.document.cookie = cname + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
1449
1451
  };
1452
+ function getLocalStorage(key) {
1453
+ let savedJSON;
1454
+ if (window.localStorage) {
1455
+ try {
1456
+ savedJSON = JSON.parse(window.localStorage.getItem(key));
1457
+ } catch (e) {
1458
+ }
1459
+ }
1460
+ if (typeof savedJSON !== "undefined") {
1461
+ return savedJSON;
1462
+ }
1463
+ }
1464
+ function setLocalStorage(key, data) {
1465
+ if (data && window.localStorage) {
1466
+ if (typeof data === "object") {
1467
+ window.localStorage.setItem(key, JSON.stringify(data));
1468
+ } else {
1469
+ window.localStorage.setItem(key, data);
1470
+ }
1471
+ }
1472
+ }
1450
1473
  }
1451
1474
  });
1452
1475
 
@@ -1650,7 +1673,9 @@ var require_component = __commonJS({
1650
1673
  applyKeyComponentAsExtend: () => applyKeyComponentAsExtend,
1651
1674
  checkIfKeyIsComponent: () => checkIfKeyIsComponent,
1652
1675
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
1676
+ checkIfSugar: () => checkIfSugar,
1653
1677
  extendizeByKey: () => extendizeByKey,
1678
+ getCapitalCaseKeys: () => getCapitalCaseKeys,
1654
1679
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
1655
1680
  getExtendsInElement: () => getExtendsInElement,
1656
1681
  hasVariantProp: () => hasVariantProp,
@@ -1684,12 +1709,13 @@ var require_component = __commonJS({
1684
1709
  return { ...element, extend };
1685
1710
  };
1686
1711
  var checkIfSugar = (element, parent, key) => {
1712
+ var _a;
1687
1713
  const {
1688
1714
  extend,
1689
1715
  props,
1690
1716
  childExtend,
1691
1717
  extends: extendProps,
1692
- childrenExtends,
1718
+ childExtends,
1693
1719
  childProps,
1694
1720
  children,
1695
1721
  on,
@@ -1698,15 +1724,17 @@ var require_component = __commonJS({
1698
1724
  $propsCollection
1699
1725
  } = element;
1700
1726
  const hasComponentAttrs = extend || childExtend || props || on || $collection || $stateCollection || $propsCollection;
1701
- if (hasComponentAttrs && (childProps || extendProps || children || childrenExtends)) {
1702
- element.error("Sugar component includes params for builtin components");
1727
+ if (hasComponentAttrs && (childProps || extendProps || children || childExtends)) {
1728
+ const logErr = (_a = parent || element) == null ? void 0 : _a.error;
1729
+ if (logErr)
1730
+ logErr.call(element, "Sugar component includes params for builtin components", { verbose: true });
1703
1731
  }
1704
- return !hasComponentAttrs || childProps || extendProps || children || childrenExtends;
1732
+ return !hasComponentAttrs || childProps || extendProps || children || childExtends;
1705
1733
  };
1706
1734
  var extendizeByKey = (element, parent, key) => {
1707
1735
  const { context } = parent;
1708
- const { tag, extend, childrenExtends } = element;
1709
- const isSugar = checkIfSugar(element);
1736
+ const { tag, extend, childExtends } = element;
1737
+ const isSugar = checkIfSugar(element, parent, key);
1710
1738
  const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
1711
1739
  const isExtendKeyComponent = context && context.components[extendFromKey];
1712
1740
  if (element === isExtendKeyComponent)
@@ -1717,8 +1745,8 @@ var require_component = __commonJS({
1717
1745
  tag,
1718
1746
  props: { ...element }
1719
1747
  });
1720
- if (childrenExtends)
1721
- newElem.childExtend = childrenExtends;
1748
+ if (childExtends)
1749
+ newElem.childExtend = childExtends;
1722
1750
  return newElem;
1723
1751
  } else if (!extend || extend === true) {
1724
1752
  return {
@@ -1747,23 +1775,24 @@ var require_component = __commonJS({
1747
1775
  const childKey = childElems[i];
1748
1776
  const childElem = element[childKey];
1749
1777
  const newChild = element.props[childKey];
1778
+ const assignChild = (val) => {
1779
+ element[childKey] = val;
1780
+ delete element.props[childKey];
1781
+ };
1750
1782
  if (newChild == null ? void 0 : newChild.ignoreExtend)
1751
1783
  continue;
1752
- if (!childElem)
1753
- element[childKey] = (0, import__.deepCloneWithExtend)(newChild);
1784
+ if (newChild === null)
1785
+ assignChild(null);
1786
+ else if (!childElem)
1787
+ assignChild((0, import__.deepCloneWithExtend)(newChild));
1754
1788
  else {
1755
- const isSugar = checkIfSugar(childElem);
1756
- if (!isSugar)
1789
+ const isSugarChildElem = checkIfSugar(childElem, parent, key);
1790
+ if (isSugarChildElem)
1757
1791
  continue;
1758
- const inheritedChildElem = element[childKey].props;
1759
- if ((0, import__.isObjectLike)(newChild)) {
1760
- (0, import__.overwriteDeep)(inheritedChildElem, newChild);
1761
- } else if ((0, import__.isFunction)(newChild)) {
1762
- element[childKey] = {
1763
- extend: element[childKey],
1764
- props: newChild
1765
- };
1766
- }
1792
+ assignChild({
1793
+ extend: element[childKey],
1794
+ props: newChild
1795
+ });
1767
1796
  }
1768
1797
  }
1769
1798
  };
@@ -2109,7 +2138,7 @@ var CONFIG = {
2109
2138
  useVariable: true,
2110
2139
  useReset: true,
2111
2140
  CSS_VARS,
2112
- ...defaultConfig_exports
2141
+ ...void 0 || defaultConfig_exports
2113
2142
  };
2114
2143
  var cachedConfig = (0, import_utils.deepClone)(CONFIG);
2115
2144
  var FACTORY = {
@@ -2134,10 +2163,11 @@ var generateSprite = (icons) => {
2134
2163
  return sprite;
2135
2164
  };
2136
2165
  var parseRootAttributes = (htmlString) => {
2137
- if (!(0, import_utils2.isString)(htmlString)) {
2138
- return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
2166
+ const val = htmlString.default || htmlString;
2167
+ if (!(0, import_utils2.isString)(val)) {
2168
+ return console.warn(`parseRootAttributes: ${val} is not a string`);
2139
2169
  }
2140
- const match = htmlString.match(/<svg\s+(.*?)>/);
2170
+ const match = val.match(/<svg\s+(.*?)>/);
2141
2171
  if (!match || !match[1]) {
2142
2172
  return {};
2143
2173
  }
@@ -768,10 +768,10 @@ var require_object = __commonJS({
768
768
  return o;
769
769
  };
770
770
  var deepStringify = (obj, stringified = {}) => {
771
- var _a;
771
+ var _a, _b;
772
772
  if (obj.node || obj.__ref || obj.parent || obj.__element || obj.parse) {
773
- console.warn("Trying to clone element or state at", obj);
774
- obj = (_a = obj.parse) == null ? void 0 : _a.call(obj);
773
+ (obj.__element || ((_a = obj.parent) == null ? void 0 : _a.__element)).warn("Trying to clone element or state at", obj);
774
+ obj = (_b = obj.parse) == null ? void 0 : _b.call(obj);
775
775
  }
776
776
  for (const prop in obj) {
777
777
  const objProp = obj[prop];
@@ -841,7 +841,7 @@ var require_object = __commonJS({
841
841
  if ((0, import_types.isArray)(value)) {
842
842
  str += "[\n";
843
843
  for (const element of value) {
844
- if ((0, import_types.isObject)(element) && element !== null) {
844
+ if ((0, import_types.isObjectLike)(element) && element !== null) {
845
845
  str += `${spaces} ${objectToString(element, indent + 2)},
846
846
  `;
847
847
  } else if ((0, import_types.isString)(element)) {
@@ -1411,9 +1411,11 @@ var require_cookie = __commonJS({
1411
1411
  var cookie_exports = {};
1412
1412
  __export2(cookie_exports, {
1413
1413
  getCookie: () => getCookie,
1414
+ getLocalStorage: () => getLocalStorage,
1414
1415
  isMobile: () => isMobile,
1415
1416
  removeCookie: () => removeCookie,
1416
- setCookie: () => setCookie
1417
+ setCookie: () => setCookie,
1418
+ setLocalStorage: () => setLocalStorage
1417
1419
  });
1418
1420
  module2.exports = __toCommonJS2(cookie_exports);
1419
1421
  var import_types = require_types();
@@ -1447,6 +1449,27 @@ var require_cookie = __commonJS({
1447
1449
  return;
1448
1450
  import_utils5.document.cookie = cname + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
1449
1451
  };
1452
+ function getLocalStorage(key) {
1453
+ let savedJSON;
1454
+ if (window.localStorage) {
1455
+ try {
1456
+ savedJSON = JSON.parse(window.localStorage.getItem(key));
1457
+ } catch (e) {
1458
+ }
1459
+ }
1460
+ if (typeof savedJSON !== "undefined") {
1461
+ return savedJSON;
1462
+ }
1463
+ }
1464
+ function setLocalStorage(key, data) {
1465
+ if (data && window.localStorage) {
1466
+ if (typeof data === "object") {
1467
+ window.localStorage.setItem(key, JSON.stringify(data));
1468
+ } else {
1469
+ window.localStorage.setItem(key, data);
1470
+ }
1471
+ }
1472
+ }
1450
1473
  }
1451
1474
  });
1452
1475
 
@@ -1650,7 +1673,9 @@ var require_component = __commonJS({
1650
1673
  applyKeyComponentAsExtend: () => applyKeyComponentAsExtend,
1651
1674
  checkIfKeyIsComponent: () => checkIfKeyIsComponent,
1652
1675
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
1676
+ checkIfSugar: () => checkIfSugar,
1653
1677
  extendizeByKey: () => extendizeByKey,
1678
+ getCapitalCaseKeys: () => getCapitalCaseKeys,
1654
1679
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
1655
1680
  getExtendsInElement: () => getExtendsInElement,
1656
1681
  hasVariantProp: () => hasVariantProp,
@@ -1684,12 +1709,13 @@ var require_component = __commonJS({
1684
1709
  return { ...element, extend };
1685
1710
  };
1686
1711
  var checkIfSugar = (element, parent, key) => {
1712
+ var _a;
1687
1713
  const {
1688
1714
  extend,
1689
1715
  props,
1690
1716
  childExtend,
1691
1717
  extends: extendProps,
1692
- childrenExtends,
1718
+ childExtends,
1693
1719
  childProps,
1694
1720
  children,
1695
1721
  on,
@@ -1698,15 +1724,17 @@ var require_component = __commonJS({
1698
1724
  $propsCollection
1699
1725
  } = element;
1700
1726
  const hasComponentAttrs = extend || childExtend || props || on || $collection || $stateCollection || $propsCollection;
1701
- if (hasComponentAttrs && (childProps || extendProps || children || childrenExtends)) {
1702
- element.error("Sugar component includes params for builtin components");
1727
+ if (hasComponentAttrs && (childProps || extendProps || children || childExtends)) {
1728
+ const logErr = (_a = parent || element) == null ? void 0 : _a.error;
1729
+ if (logErr)
1730
+ logErr.call(element, "Sugar component includes params for builtin components", { verbose: true });
1703
1731
  }
1704
- return !hasComponentAttrs || childProps || extendProps || children || childrenExtends;
1732
+ return !hasComponentAttrs || childProps || extendProps || children || childExtends;
1705
1733
  };
1706
1734
  var extendizeByKey = (element, parent, key) => {
1707
1735
  const { context } = parent;
1708
- const { tag, extend, childrenExtends } = element;
1709
- const isSugar = checkIfSugar(element);
1736
+ const { tag, extend, childExtends } = element;
1737
+ const isSugar = checkIfSugar(element, parent, key);
1710
1738
  const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
1711
1739
  const isExtendKeyComponent = context && context.components[extendFromKey];
1712
1740
  if (element === isExtendKeyComponent)
@@ -1717,8 +1745,8 @@ var require_component = __commonJS({
1717
1745
  tag,
1718
1746
  props: { ...element }
1719
1747
  });
1720
- if (childrenExtends)
1721
- newElem.childExtend = childrenExtends;
1748
+ if (childExtends)
1749
+ newElem.childExtend = childExtends;
1722
1750
  return newElem;
1723
1751
  } else if (!extend || extend === true) {
1724
1752
  return {
@@ -1747,23 +1775,24 @@ var require_component = __commonJS({
1747
1775
  const childKey = childElems[i];
1748
1776
  const childElem = element[childKey];
1749
1777
  const newChild = element.props[childKey];
1778
+ const assignChild = (val) => {
1779
+ element[childKey] = val;
1780
+ delete element.props[childKey];
1781
+ };
1750
1782
  if (newChild == null ? void 0 : newChild.ignoreExtend)
1751
1783
  continue;
1752
- if (!childElem)
1753
- element[childKey] = (0, import__.deepCloneWithExtend)(newChild);
1784
+ if (newChild === null)
1785
+ assignChild(null);
1786
+ else if (!childElem)
1787
+ assignChild((0, import__.deepCloneWithExtend)(newChild));
1754
1788
  else {
1755
- const isSugar = checkIfSugar(childElem);
1756
- if (!isSugar)
1789
+ const isSugarChildElem = checkIfSugar(childElem, parent, key);
1790
+ if (isSugarChildElem)
1757
1791
  continue;
1758
- const inheritedChildElem = element[childKey].props;
1759
- if ((0, import__.isObjectLike)(newChild)) {
1760
- (0, import__.overwriteDeep)(inheritedChildElem, newChild);
1761
- } else if ((0, import__.isFunction)(newChild)) {
1762
- element[childKey] = {
1763
- extend: element[childKey],
1764
- props: newChild
1765
- };
1766
- }
1792
+ assignChild({
1793
+ extend: element[childKey],
1794
+ props: newChild
1795
+ });
1767
1796
  }
1768
1797
  }
1769
1798
  };
@@ -2649,10 +2678,10 @@ var require_cjs2 = __commonJS({
2649
2678
  return o;
2650
2679
  };
2651
2680
  var deepStringify = (obj, stringified = {}) => {
2652
- var _a;
2681
+ var _a, _b;
2653
2682
  if (obj.node || obj.__ref || obj.parent || obj.__element || obj.parse) {
2654
- console.warn("Trying to clone element or state at", obj);
2655
- obj = (_a = obj.parse) == null ? void 0 : _a.call(obj);
2683
+ (obj.__element || ((_a = obj.parent) == null ? void 0 : _a.__element)).warn("Trying to clone element or state at", obj);
2684
+ obj = (_b = obj.parse) == null ? void 0 : _b.call(obj);
2656
2685
  }
2657
2686
  for (const prop in obj) {
2658
2687
  const objProp = obj[prop];
@@ -2722,7 +2751,7 @@ var require_cjs2 = __commonJS({
2722
2751
  if ((0, import_types.isArray)(value)) {
2723
2752
  str += "[\n";
2724
2753
  for (const element of value) {
2725
- if ((0, import_types.isObject)(element) && element !== null) {
2754
+ if ((0, import_types.isObjectLike)(element) && element !== null) {
2726
2755
  str += `${spaces} ${objectToString(element, indent + 2)},
2727
2756
  `;
2728
2757
  } else if ((0, import_types.isString)(element)) {
@@ -3286,9 +3315,11 @@ var require_cjs2 = __commonJS({
3286
3315
  var cookie_exports = {};
3287
3316
  __export22(cookie_exports, {
3288
3317
  getCookie: () => getCookie,
3318
+ getLocalStorage: () => getLocalStorage,
3289
3319
  isMobile: () => isMobile,
3290
3320
  removeCookie: () => removeCookie,
3291
- setCookie: () => setCookie
3321
+ setCookie: () => setCookie,
3322
+ setLocalStorage: () => setLocalStorage
3292
3323
  });
3293
3324
  module22.exports = __toCommonJS22(cookie_exports);
3294
3325
  var import_types = require_types2();
@@ -3322,6 +3353,27 @@ var require_cjs2 = __commonJS({
3322
3353
  return;
3323
3354
  import_utils32.document.cookie = cname + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
3324
3355
  };
3356
+ function getLocalStorage(key) {
3357
+ let savedJSON;
3358
+ if (window.localStorage) {
3359
+ try {
3360
+ savedJSON = JSON.parse(window.localStorage.getItem(key));
3361
+ } catch (e) {
3362
+ }
3363
+ }
3364
+ if (typeof savedJSON !== "undefined") {
3365
+ return savedJSON;
3366
+ }
3367
+ }
3368
+ function setLocalStorage(key, data) {
3369
+ if (data && window.localStorage) {
3370
+ if (typeof data === "object") {
3371
+ window.localStorage.setItem(key, JSON.stringify(data));
3372
+ } else {
3373
+ window.localStorage.setItem(key, data);
3374
+ }
3375
+ }
3376
+ }
3325
3377
  }
3326
3378
  });
3327
3379
  var require_tags2 = __commonJS2({
@@ -3521,7 +3573,9 @@ var require_cjs2 = __commonJS({
3521
3573
  applyKeyComponentAsExtend: () => applyKeyComponentAsExtend,
3522
3574
  checkIfKeyIsComponent: () => checkIfKeyIsComponent,
3523
3575
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
3576
+ checkIfSugar: () => checkIfSugar,
3524
3577
  extendizeByKey: () => extendizeByKey,
3578
+ getCapitalCaseKeys: () => getCapitalCaseKeys,
3525
3579
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
3526
3580
  getExtendsInElement: () => getExtendsInElement,
3527
3581
  hasVariantProp: () => hasVariantProp,
@@ -3555,12 +3609,13 @@ var require_cjs2 = __commonJS({
3555
3609
  return { ...element, extend };
3556
3610
  };
3557
3611
  var checkIfSugar = (element, parent, key) => {
3612
+ var _a;
3558
3613
  const {
3559
3614
  extend,
3560
3615
  props,
3561
3616
  childExtend,
3562
3617
  extends: extendProps,
3563
- childrenExtends,
3618
+ childExtends,
3564
3619
  childProps,
3565
3620
  children,
3566
3621
  on,
@@ -3569,15 +3624,17 @@ var require_cjs2 = __commonJS({
3569
3624
  $propsCollection
3570
3625
  } = element;
3571
3626
  const hasComponentAttrs = extend || childExtend || props || on || $collection || $stateCollection || $propsCollection;
3572
- if (hasComponentAttrs && (childProps || extendProps || children || childrenExtends)) {
3573
- element.error("Sugar component includes params for builtin components");
3627
+ if (hasComponentAttrs && (childProps || extendProps || children || childExtends)) {
3628
+ const logErr = (_a = parent || element) == null ? void 0 : _a.error;
3629
+ if (logErr)
3630
+ logErr.call(element, "Sugar component includes params for builtin components", { verbose: true });
3574
3631
  }
3575
- return !hasComponentAttrs || childProps || extendProps || children || childrenExtends;
3632
+ return !hasComponentAttrs || childProps || extendProps || children || childExtends;
3576
3633
  };
3577
3634
  var extendizeByKey = (element, parent, key) => {
3578
3635
  const { context } = parent;
3579
- const { tag, extend, childrenExtends } = element;
3580
- const isSugar = checkIfSugar(element);
3636
+ const { tag, extend, childExtends } = element;
3637
+ const isSugar = checkIfSugar(element, parent, key);
3581
3638
  const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
3582
3639
  const isExtendKeyComponent = context && context.components[extendFromKey];
3583
3640
  if (element === isExtendKeyComponent)
@@ -3588,8 +3645,8 @@ var require_cjs2 = __commonJS({
3588
3645
  tag,
3589
3646
  props: { ...element }
3590
3647
  });
3591
- if (childrenExtends)
3592
- newElem.childExtend = childrenExtends;
3648
+ if (childExtends)
3649
+ newElem.childExtend = childExtends;
3593
3650
  return newElem;
3594
3651
  } else if (!extend || extend === true) {
3595
3652
  return {
@@ -3618,23 +3675,24 @@ var require_cjs2 = __commonJS({
3618
3675
  const childKey = childElems[i];
3619
3676
  const childElem = element[childKey];
3620
3677
  const newChild = element.props[childKey];
3678
+ const assignChild = (val) => {
3679
+ element[childKey] = val;
3680
+ delete element.props[childKey];
3681
+ };
3621
3682
  if (newChild == null ? void 0 : newChild.ignoreExtend)
3622
3683
  continue;
3623
- if (!childElem)
3624
- element[childKey] = (0, import__.deepCloneWithExtend)(newChild);
3684
+ if (newChild === null)
3685
+ assignChild(null);
3686
+ else if (!childElem)
3687
+ assignChild((0, import__.deepCloneWithExtend)(newChild));
3625
3688
  else {
3626
- const isSugar = checkIfSugar(childElem);
3627
- if (!isSugar)
3689
+ const isSugarChildElem = checkIfSugar(childElem, parent, key);
3690
+ if (isSugarChildElem)
3628
3691
  continue;
3629
- const inheritedChildElem = element[childKey].props;
3630
- if ((0, import__.isObjectLike)(newChild)) {
3631
- (0, import__.overwriteDeep)(inheritedChildElem, newChild);
3632
- } else if ((0, import__.isFunction)(newChild)) {
3633
- element[childKey] = {
3634
- extend: element[childKey],
3635
- props: newChild
3636
- };
3637
- }
3692
+ assignChild({
3693
+ extend: element[childKey],
3694
+ props: newChild
3695
+ });
3638
3696
  }
3639
3697
  }
3640
3698
  };
@@ -4190,7 +4248,7 @@ var CONFIG = {
4190
4248
  useVariable: true,
4191
4249
  useReset: true,
4192
4250
  CSS_VARS,
4193
- ...defaultConfig_exports
4251
+ ...void 0 || defaultConfig_exports
4194
4252
  };
4195
4253
  var cachedConfig = (0, import_utils.deepClone)(CONFIG);
4196
4254
  var FACTORY = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/scratch",
3
3
  "description": "Φ / CSS framework and methodology.",
4
4
  "author": "symbo.ls",
5
- "version": "2.11.453",
5
+ "version": "2.11.464",
6
6
  "files": [
7
7
  "src",
8
8
  "dist"
@@ -30,5 +30,5 @@
30
30
  "@symbo.ls/utils": "^2.11.453",
31
31
  "color-contrast-checker": "^1.5.0"
32
32
  },
33
- "gitHead": "8e5458a957b9d2c75944023e2c31bab157034314"
33
+ "gitHead": "7a24490e102fa450e508f8527923647816e26ab9"
34
34
  }
package/src/factory.js CHANGED
@@ -14,7 +14,7 @@ export const CONFIG = {
14
14
  useVariable: true,
15
15
  useReset: true,
16
16
  CSS_VARS,
17
- ...CONF
17
+ ...(CONF.default || CONF)
18
18
  }
19
19
 
20
20
  const cachedConfig = deepClone(CONFIG)
@@ -18,11 +18,12 @@ export const generateSprite = (icons) => {
18
18
  }
19
19
 
20
20
  const parseRootAttributes = (htmlString) => {
21
- if (!isString(htmlString)) {
22
- return console.warn(`parseRootAttributes: ${htmlString} is not a string`)
21
+ const val = htmlString.default || htmlString
22
+ if (!isString(val)) {
23
+ return console.warn(`parseRootAttributes: ${val} is not a string`)
23
24
  }
24
25
 
25
- const match = htmlString.match(/<svg\s+(.*?)>/)
26
+ const match = val.match(/<svg\s+(.*?)>/)
26
27
  if (!match || !match[1]) {
27
28
  return {}
28
29
  }