@symbo.ls/scratch 2.11.470 → 2.11.497

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/set.js CHANGED
@@ -300,6 +300,7 @@ var require_array = __commonJS({
300
300
  addItemAfterEveryElement: () => addItemAfterEveryElement,
301
301
  arrayContainsOtherArray: () => arrayContainsOtherArray,
302
302
  arraysEqual: () => arraysEqual,
303
+ checkIfStringIsInArray: () => checkIfStringIsInArray,
303
304
  cutArrayAfterValue: () => cutArrayAfterValue,
304
305
  cutArrayBeforeValue: () => cutArrayBeforeValue,
305
306
  filterArrays: () => filterArrays,
@@ -346,11 +347,11 @@ var require_array = __commonJS({
346
347
  var joinArrays = (...arrays) => {
347
348
  return [].concat(...arrays);
348
349
  };
349
- var mergeArray = (arr, excludeFrom = []) => {
350
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
350
+ var mergeArray = (arr, exclude = []) => {
351
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, { exclude }), exclude), {});
351
352
  };
352
353
  var mergeAndCloneIfArray = (obj) => {
353
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
354
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
354
355
  };
355
356
  var cutArrayBeforeValue = (arr, value) => {
356
357
  const index = arr.indexOf(value);
@@ -419,6 +420,11 @@ var require_array = __commonJS({
419
420
  const excludeSet = new Set(excludeArr);
420
421
  return sourceArr.filter((item) => !excludeSet.has(item));
421
422
  };
423
+ var checkIfStringIsInArray = (string, arr) => {
424
+ if (!string)
425
+ return;
426
+ return arr.filter((v) => string.includes(v)).length;
427
+ };
422
428
  }
423
429
  });
424
430
 
@@ -473,14 +479,15 @@ var require_string = __commonJS({
473
479
  2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
474
480
  3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
475
481
  };
476
- var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
482
+ function replaceLiteralsWithObjectFields(str, options = {}, forcedState) {
477
483
  if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
478
484
  return str;
479
485
  const reg = brackRegex[options.bracketsLength || 2];
486
+ const obj = forcedState || this.state || {};
480
487
  return str.replace(reg, (_, parentPath, variable) => {
481
488
  if (parentPath) {
482
489
  const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
483
- let parentState = state;
490
+ let parentState = obj;
484
491
  for (let i = 0; i < parentLevels; i++) {
485
492
  parentState = parentState.parent;
486
493
  if (!parentState) {
@@ -490,11 +497,11 @@ var require_string = __commonJS({
490
497
  const value = parentState[variable.trim()];
491
498
  return value !== void 0 ? `${value}` : "";
492
499
  } else {
493
- const value = state[variable.trim()];
500
+ const value = obj[variable.trim()];
494
501
  return value !== void 0 ? `${value}` : "";
495
502
  }
496
503
  });
497
- };
504
+ }
498
505
  var lowercaseFirstLetter = (inputString) => {
499
506
  return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
500
507
  };
@@ -599,8 +606,6 @@ var require_object = __commonJS({
599
606
  createNestedObject: () => createNestedObject,
600
607
  createObjectWithoutPrototype: () => createObjectWithoutPrototype,
601
608
  deepClone: () => deepClone2,
602
- deepCloneExclude: () => deepCloneExclude,
603
- deepCloneWithExtend: () => deepCloneWithExtend,
604
609
  deepContains: () => deepContains,
605
610
  deepDestringify: () => deepDestringify,
606
611
  deepDiff: () => deepDiff,
@@ -694,78 +699,56 @@ var require_object = __commonJS({
694
699
  }
695
700
  return o;
696
701
  };
697
- var deepCloneExclude = (obj, excludeFrom = []) => {
698
- if ((0, import_types.isArray)(obj)) {
699
- return obj.map((x) => deepCloneExclude(x, excludeFrom));
700
- }
701
- const o = {};
702
- for (const k in obj) {
703
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
704
- if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
705
- continue;
706
- let v = obj[k];
707
- if (k === "extend" && (0, import_types.isArray)(v)) {
708
- v = mergeArrayExclude(v, excludeFrom);
709
- }
710
- if ((0, import_types.isArray)(v)) {
711
- o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
712
- } else if ((0, import_types.isObject)(v)) {
713
- o[k] = deepCloneExclude(v, excludeFrom);
714
- } else
715
- o[k] = v;
716
- }
717
- return o;
718
- };
719
- var mergeArrayExclude = (arr, excl = []) => {
720
- return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
702
+ var mergeArrayExclude = (arr, exclude = []) => {
703
+ return arr.reduce((acc, curr) => deepMerge3(acc, deepClone2(curr, { exclude })), {});
721
704
  };
722
- var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
723
- if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
705
+ var deepClone2 = (obj, options = {}) => {
706
+ const {
707
+ exclude = [],
708
+ cleanUndefined = false,
709
+ cleanNull = false,
710
+ window: targetWindow,
711
+ visited = /* @__PURE__ */ new WeakMap(),
712
+ handleExtend = false
713
+ } = options;
714
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj)) {
724
715
  return obj;
725
- if (visited.has(obj))
716
+ }
717
+ if (visited.has(obj)) {
726
718
  return visited.get(obj);
727
- const clone2 = (0, import_types.isArray)(obj) ? [] : {};
719
+ }
720
+ const clone2 = targetWindow ? (0, import_types.isArray)(obj) ? new targetWindow.Array() : new targetWindow.Object() : (0, import_types.isArray)(obj) ? [] : {};
728
721
  visited.set(obj, clone2);
729
722
  for (const key in obj) {
730
- if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
731
- const value = obj[key];
732
- if ((0, import_node.isDOMNode)(value)) {
733
- clone2[key] = value;
734
- } else if (key === "extend" && (0, import_types.isArray)(value)) {
735
- clone2[key] = (0, import_array.mergeArray)(value, exclude);
736
- } else if ((0, import_types.isObjectLike)(value)) {
737
- clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
738
- } else {
739
- clone2[key] = value;
740
- }
741
- }
742
- }
743
- return clone2;
744
- };
745
- var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
746
- if ((0, import_types.isObjectLike)(obj)) {
747
- if (visited.has(obj)) {
748
- return obj;
723
+ if (!Object.prototype.hasOwnProperty.call(obj, key))
724
+ continue;
725
+ if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
726
+ continue;
727
+ const value = obj[key];
728
+ if (cleanUndefined && (0, import_types.isUndefined)(value) || cleanNull && (0, import_types.isNull)(value))
729
+ continue;
730
+ if ((0, import_node.isDOMNode)(value)) {
731
+ clone2[key] = value;
732
+ continue;
749
733
  }
750
- visited.add(obj);
751
- }
752
- const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
753
- for (const prop in obj) {
754
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
734
+ if (handleExtend && key === "extend" && (0, import_types.isArray)(value)) {
735
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
755
736
  continue;
756
- const objProp = obj[prop];
757
- if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
737
+ }
738
+ if ((0, import_types.isFunction)(value) && targetWindow) {
739
+ clone2[key] = targetWindow.eval("(" + value.toString() + ")");
758
740
  continue;
759
741
  }
760
- if ((0, import_types.isObjectLike)(objProp)) {
761
- o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
762
- } else if ((0, import_types.isFunction)(objProp) && options.window) {
763
- o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
742
+ if ((0, import_types.isObjectLike)(value)) {
743
+ clone2[key] = deepClone2(value, {
744
+ ...options,
745
+ visited
746
+ });
764
747
  } else {
765
- o[prop] = objProp;
748
+ clone2[key] = value;
766
749
  }
767
750
  }
768
- return o;
751
+ return clone2;
769
752
  };
770
753
  var deepStringify = (obj, stringified = {}) => {
771
754
  var _a, _b;
@@ -1675,6 +1658,7 @@ var require_component = __commonJS({
1675
1658
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
1676
1659
  checkIfSugar: () => checkIfSugar,
1677
1660
  extendizeByKey: () => extendizeByKey,
1661
+ extractComponentKeyFromKey: () => extractComponentKeyFromKey,
1678
1662
  getCapitalCaseKeys: () => getCapitalCaseKeys,
1679
1663
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
1680
1664
  getExtendsInElement: () => getExtendsInElement,
@@ -1731,11 +1715,14 @@ var require_component = __commonJS({
1731
1715
  }
1732
1716
  return !hasComponentAttrs || childProps || extendProps || children || childExtends;
1733
1717
  };
1718
+ var extractComponentKeyFromKey = (key) => {
1719
+ return key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
1720
+ };
1734
1721
  var extendizeByKey = (element, parent, key) => {
1735
1722
  const { context } = parent;
1736
1723
  const { tag, extend, childExtends } = element;
1737
1724
  const isSugar = checkIfSugar(element, parent, key);
1738
- const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
1725
+ const extendFromKey = extractComponentKeyFromKey(key);
1739
1726
  const isExtendKeyComponent = context && context.components[extendFromKey];
1740
1727
  if (element === isExtendKeyComponent)
1741
1728
  return element;
@@ -1784,7 +1771,7 @@ var require_component = __commonJS({
1784
1771
  if (newChild === null)
1785
1772
  assignChild(null);
1786
1773
  else if (!childElem)
1787
- assignChild((0, import__.deepCloneWithExtend)(newChild));
1774
+ assignChild((0, import__.deepClone)(newChild));
1788
1775
  else {
1789
1776
  const isSugarChildElem = checkIfSugar(childElem, parent, key);
1790
1777
  if (isSugarChildElem)
@@ -1855,7 +1842,7 @@ var require_component = __commonJS({
1855
1842
  if (checkIfKeyIsComponent(key)) {
1856
1843
  result.push(key);
1857
1844
  }
1858
- if (key === "extend") {
1845
+ if (key === "extend" || key === "extends") {
1859
1846
  if (typeof o[key] === "string") {
1860
1847
  result.push(o[key]);
1861
1848
  } else if (Array.isArray(o[key])) {
@@ -2250,6 +2237,7 @@ var require_cjs3 = __commonJS({
2250
2237
  addItemAfterEveryElement: () => addItemAfterEveryElement,
2251
2238
  arrayContainsOtherArray: () => arrayContainsOtherArray,
2252
2239
  arraysEqual: () => arraysEqual,
2240
+ checkIfStringIsInArray: () => checkIfStringIsInArray,
2253
2241
  cutArrayAfterValue: () => cutArrayAfterValue,
2254
2242
  cutArrayBeforeValue: () => cutArrayBeforeValue,
2255
2243
  filterArrays: () => filterArrays,
@@ -2296,11 +2284,11 @@ var require_cjs3 = __commonJS({
2296
2284
  var joinArrays = (...arrays) => {
2297
2285
  return [].concat(...arrays);
2298
2286
  };
2299
- var mergeArray = (arr, excludeFrom = []) => {
2300
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
2287
+ var mergeArray = (arr, exclude = []) => {
2288
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, { exclude }), exclude), {});
2301
2289
  };
2302
2290
  var mergeAndCloneIfArray = (obj) => {
2303
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
2291
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
2304
2292
  };
2305
2293
  var cutArrayBeforeValue = (arr, value) => {
2306
2294
  const index = arr.indexOf(value);
@@ -2369,6 +2357,11 @@ var require_cjs3 = __commonJS({
2369
2357
  const excludeSet = new Set(excludeArr);
2370
2358
  return sourceArr.filter((item) => !excludeSet.has(item));
2371
2359
  };
2360
+ var checkIfStringIsInArray = (string, arr) => {
2361
+ if (!string)
2362
+ return;
2363
+ return arr.filter((v) => string.includes(v)).length;
2364
+ };
2372
2365
  }
2373
2366
  });
2374
2367
  var require_string2 = __commonJS2({
@@ -2421,14 +2414,15 @@ var require_cjs3 = __commonJS({
2421
2414
  2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
2422
2415
  3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
2423
2416
  };
2424
- var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
2417
+ function replaceLiteralsWithObjectFields(str, options = {}, forcedState) {
2425
2418
  if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
2426
2419
  return str;
2427
2420
  const reg = brackRegex[options.bracketsLength || 2];
2421
+ const obj = forcedState || this.state || {};
2428
2422
  return str.replace(reg, (_, parentPath, variable) => {
2429
2423
  if (parentPath) {
2430
2424
  const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
2431
- let parentState = state;
2425
+ let parentState = obj;
2432
2426
  for (let i = 0; i < parentLevels; i++) {
2433
2427
  parentState = parentState.parent;
2434
2428
  if (!parentState) {
@@ -2438,11 +2432,11 @@ var require_cjs3 = __commonJS({
2438
2432
  const value = parentState[variable.trim()];
2439
2433
  return value !== void 0 ? `${value}` : "";
2440
2434
  } else {
2441
- const value = state[variable.trim()];
2435
+ const value = obj[variable.trim()];
2442
2436
  return value !== void 0 ? `${value}` : "";
2443
2437
  }
2444
2438
  });
2445
- };
2439
+ }
2446
2440
  var lowercaseFirstLetter = (inputString) => {
2447
2441
  return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
2448
2442
  };
@@ -2545,8 +2539,6 @@ var require_cjs3 = __commonJS({
2545
2539
  createNestedObject: () => createNestedObject,
2546
2540
  createObjectWithoutPrototype: () => createObjectWithoutPrototype,
2547
2541
  deepClone: () => deepClone2,
2548
- deepCloneExclude: () => deepCloneExclude,
2549
- deepCloneWithExtend: () => deepCloneWithExtend,
2550
2542
  deepContains: () => deepContains,
2551
2543
  deepDestringify: () => deepDestringify,
2552
2544
  deepDiff: () => deepDiff,
@@ -2640,78 +2632,56 @@ var require_cjs3 = __commonJS({
2640
2632
  }
2641
2633
  return o;
2642
2634
  };
2643
- var deepCloneExclude = (obj, excludeFrom = []) => {
2644
- if ((0, import_types.isArray)(obj)) {
2645
- return obj.map((x) => deepCloneExclude(x, excludeFrom));
2646
- }
2647
- const o = {};
2648
- for (const k in obj) {
2649
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
2650
- if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
2651
- continue;
2652
- let v = obj[k];
2653
- if (k === "extend" && (0, import_types.isArray)(v)) {
2654
- v = mergeArrayExclude(v, excludeFrom);
2655
- }
2656
- if ((0, import_types.isArray)(v)) {
2657
- o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
2658
- } else if ((0, import_types.isObject)(v)) {
2659
- o[k] = deepCloneExclude(v, excludeFrom);
2660
- } else
2661
- o[k] = v;
2662
- }
2663
- return o;
2664
- };
2665
- var mergeArrayExclude = (arr, excl = []) => {
2666
- return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
2635
+ var mergeArrayExclude = (arr, exclude = []) => {
2636
+ return arr.reduce((acc, curr) => deepMerge3(acc, deepClone2(curr, { exclude })), {});
2667
2637
  };
2668
- var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
2669
- if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
2638
+ var deepClone2 = (obj, options = {}) => {
2639
+ const {
2640
+ exclude = [],
2641
+ cleanUndefined = false,
2642
+ cleanNull = false,
2643
+ window: targetWindow,
2644
+ visited = /* @__PURE__ */ new WeakMap(),
2645
+ handleExtend = false
2646
+ } = options;
2647
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj)) {
2670
2648
  return obj;
2671
- if (visited.has(obj))
2649
+ }
2650
+ if (visited.has(obj)) {
2672
2651
  return visited.get(obj);
2673
- const clone2 = (0, import_types.isArray)(obj) ? [] : {};
2652
+ }
2653
+ const clone2 = targetWindow ? (0, import_types.isArray)(obj) ? new targetWindow.Array() : new targetWindow.Object() : (0, import_types.isArray)(obj) ? [] : {};
2674
2654
  visited.set(obj, clone2);
2675
2655
  for (const key in obj) {
2676
- if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
2677
- const value = obj[key];
2678
- if ((0, import_node.isDOMNode)(value)) {
2679
- clone2[key] = value;
2680
- } else if (key === "extend" && (0, import_types.isArray)(value)) {
2681
- clone2[key] = (0, import_array.mergeArray)(value, exclude);
2682
- } else if ((0, import_types.isObjectLike)(value)) {
2683
- clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
2684
- } else {
2685
- clone2[key] = value;
2686
- }
2687
- }
2688
- }
2689
- return clone2;
2690
- };
2691
- var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
2692
- if ((0, import_types.isObjectLike)(obj)) {
2693
- if (visited.has(obj)) {
2694
- return obj;
2656
+ if (!Object.prototype.hasOwnProperty.call(obj, key))
2657
+ continue;
2658
+ if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
2659
+ continue;
2660
+ const value = obj[key];
2661
+ if (cleanUndefined && (0, import_types.isUndefined)(value) || cleanNull && (0, import_types.isNull)(value))
2662
+ continue;
2663
+ if ((0, import_node.isDOMNode)(value)) {
2664
+ clone2[key] = value;
2665
+ continue;
2695
2666
  }
2696
- visited.add(obj);
2697
- }
2698
- const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
2699
- for (const prop in obj) {
2700
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
2667
+ if (handleExtend && key === "extend" && (0, import_types.isArray)(value)) {
2668
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
2701
2669
  continue;
2702
- const objProp = obj[prop];
2703
- if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
2670
+ }
2671
+ if ((0, import_types.isFunction)(value) && targetWindow) {
2672
+ clone2[key] = targetWindow.eval("(" + value.toString() + ")");
2704
2673
  continue;
2705
2674
  }
2706
- if ((0, import_types.isObjectLike)(objProp)) {
2707
- o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
2708
- } else if ((0, import_types.isFunction)(objProp) && options.window) {
2709
- o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
2675
+ if ((0, import_types.isObjectLike)(value)) {
2676
+ clone2[key] = deepClone2(value, {
2677
+ ...options,
2678
+ visited
2679
+ });
2710
2680
  } else {
2711
- o[prop] = objProp;
2681
+ clone2[key] = value;
2712
2682
  }
2713
2683
  }
2714
- return o;
2684
+ return clone2;
2715
2685
  };
2716
2686
  var deepStringify = (obj, stringified = {}) => {
2717
2687
  var _a, _b;
@@ -3611,6 +3581,7 @@ var require_cjs3 = __commonJS({
3611
3581
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
3612
3582
  checkIfSugar: () => checkIfSugar,
3613
3583
  extendizeByKey: () => extendizeByKey,
3584
+ extractComponentKeyFromKey: () => extractComponentKeyFromKey,
3614
3585
  getCapitalCaseKeys: () => getCapitalCaseKeys,
3615
3586
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
3616
3587
  getExtendsInElement: () => getExtendsInElement,
@@ -3667,11 +3638,14 @@ var require_cjs3 = __commonJS({
3667
3638
  }
3668
3639
  return !hasComponentAttrs || childProps || extendProps || children || childExtends;
3669
3640
  };
3641
+ var extractComponentKeyFromKey = (key) => {
3642
+ return key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
3643
+ };
3670
3644
  var extendizeByKey = (element, parent, key) => {
3671
3645
  const { context } = parent;
3672
3646
  const { tag, extend, childExtends } = element;
3673
3647
  const isSugar = checkIfSugar(element, parent, key);
3674
- const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
3648
+ const extendFromKey = extractComponentKeyFromKey(key);
3675
3649
  const isExtendKeyComponent = context && context.components[extendFromKey];
3676
3650
  if (element === isExtendKeyComponent)
3677
3651
  return element;
@@ -3720,7 +3694,7 @@ var require_cjs3 = __commonJS({
3720
3694
  if (newChild === null)
3721
3695
  assignChild(null);
3722
3696
  else if (!childElem)
3723
- assignChild((0, import__.deepCloneWithExtend)(newChild));
3697
+ assignChild((0, import__.deepClone)(newChild));
3724
3698
  else {
3725
3699
  const isSugarChildElem = checkIfSugar(childElem, parent, key);
3726
3700
  if (isSugarChildElem)
@@ -3791,7 +3765,7 @@ var require_cjs3 = __commonJS({
3791
3765
  if (checkIfKeyIsComponent(key)) {
3792
3766
  result.push(key);
3793
3767
  }
3794
- if (key === "extend") {
3768
+ if (key === "extend" || key === "extends") {
3795
3769
  if (typeof o[key] === "string") {
3796
3770
  result.push(o[key]);
3797
3771
  } else if (Array.isArray(o[key])) {