@symbo.ls/scratch 2.10.253 → 2.10.258

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.
@@ -523,12 +523,22 @@ var require_object = __commonJS({
523
523
  continue;
524
524
  else if ((0, import_types.isObject)(objProp)) {
525
525
  detached[prop] = {};
526
- deepStringify(objProp[prop], detached[prop]);
526
+ deepStringify(objProp, detached[prop]);
527
527
  } else if ((0, import_types.isArray)(objProp)) {
528
528
  detached[prop] = [];
529
- objProp.map((v, i) => deepStringify(v, detached[prop][i]));
530
- } else
529
+ objProp.forEach((v, i) => {
530
+ if ((0, import_types.isFunction)(v))
531
+ return;
532
+ if ((0, import_types.isObject)(v)) {
533
+ detached[prop][i] = {};
534
+ detachFunctionsFromObject(v, detached[prop][i]);
535
+ } else {
536
+ detached[prop][i] = v;
537
+ }
538
+ });
539
+ } else {
531
540
  detached[prop] = objProp;
541
+ }
532
542
  }
533
543
  return detached;
534
544
  };
@@ -1164,8 +1174,11 @@ var getColor = (value, key) => {
1164
1174
  if (tone) {
1165
1175
  if (!val[tone]) {
1166
1176
  const toHex = rgbArrayToHex(rgb.split(", ").map((v) => parseFloat(v)));
1167
- if (tone.slice(0, 1) === "-" || tone.slice(0, 1) === "+") {
1168
- rgb = hexToRgbArray(getColorShade(toHex, parseFloat(tone))).join(", ");
1177
+ const abs = tone.slice(0, 1);
1178
+ if (abs === "-" || abs === "+") {
1179
+ rgb = hexToRgbArray(
1180
+ getColorShade(toHex, parseFloat(tone))
1181
+ ).join(", ");
1169
1182
  } else {
1170
1183
  const [r, g, b] = [...rgb.split(", ").map((v) => parseInt(v))];
1171
1184
  const hsl = rgbToHSL(r, g, b);
@@ -523,12 +523,22 @@ var require_object = __commonJS({
523
523
  continue;
524
524
  else if ((0, import_types.isObject)(objProp)) {
525
525
  detached[prop] = {};
526
- deepStringify(objProp[prop], detached[prop]);
526
+ deepStringify(objProp, detached[prop]);
527
527
  } else if ((0, import_types.isArray)(objProp)) {
528
528
  detached[prop] = [];
529
- objProp.map((v, i) => deepStringify(v, detached[prop][i]));
530
- } else
529
+ objProp.forEach((v, i) => {
530
+ if ((0, import_types.isFunction)(v))
531
+ return;
532
+ if ((0, import_types.isObject)(v)) {
533
+ detached[prop][i] = {};
534
+ detachFunctionsFromObject(v, detached[prop][i]);
535
+ } else {
536
+ detached[prop][i] = v;
537
+ }
538
+ });
539
+ } else {
531
540
  detached[prop] = objProp;
541
+ }
532
542
  }
533
543
  return detached;
534
544
  };
@@ -523,12 +523,22 @@ var require_object = __commonJS({
523
523
  continue;
524
524
  else if ((0, import_types.isObject)(objProp)) {
525
525
  detached[prop] = {};
526
- deepStringify(objProp[prop], detached[prop]);
526
+ deepStringify(objProp, detached[prop]);
527
527
  } else if ((0, import_types.isArray)(objProp)) {
528
528
  detached[prop] = [];
529
- objProp.map((v, i) => deepStringify(v, detached[prop][i]));
530
- } else
529
+ objProp.forEach((v, i) => {
530
+ if ((0, import_types.isFunction)(v))
531
+ return;
532
+ if ((0, import_types.isObject)(v)) {
533
+ detached[prop][i] = {};
534
+ detachFunctionsFromObject(v, detached[prop][i]);
535
+ } else {
536
+ detached[prop][i] = v;
537
+ }
538
+ });
539
+ } else {
531
540
  detached[prop] = objProp;
541
+ }
532
542
  }
533
543
  return detached;
534
544
  };