@fluxstack/live-client 0.6.1 → 0.7.0

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.
@@ -451,19 +451,27 @@ var FluxstackLive = (() => {
451
451
  return v !== null && typeof v === "object" && !Array.isArray(v) && Object.getPrototypeOf(v) === Object.prototype;
452
452
  }
453
453
  function deepMerge(target, source, seen) {
454
+ return deepMergeImpl(target, source, 0, seen);
455
+ }
456
+ function deepMergeImpl(target, source, depth, seen) {
454
457
  if (!seen) seen = /* @__PURE__ */ new Set();
455
458
  if (seen.has(source)) return target;
456
459
  seen.add(source);
457
460
  const result = { ...target };
458
461
  for (const key of Object.keys(source)) {
459
462
  const newVal = source[key];
463
+ if (newVal === void 0) continue;
460
464
  if (newVal === null) {
461
- delete result[key];
465
+ if (depth === 0) {
466
+ result[key] = null;
467
+ } else {
468
+ delete result[key];
469
+ }
462
470
  continue;
463
471
  }
464
472
  const oldVal = result[key];
465
473
  if (isPlainObject(oldVal) && isPlainObject(newVal)) {
466
- result[key] = deepMerge(oldVal, newVal, seen);
474
+ result[key] = deepMergeImpl(oldVal, newVal, depth + 1, seen);
467
475
  } else {
468
476
  result[key] = newVal;
469
477
  }
@@ -735,19 +743,27 @@ var FluxstackLive = (() => {
735
743
  return v !== null && typeof v === "object" && !Array.isArray(v) && Object.getPrototypeOf(v) === Object.prototype;
736
744
  }
737
745
  function deepMerge2(target, source, seen) {
746
+ return deepMergeImpl2(target, source, 0, seen);
747
+ }
748
+ function deepMergeImpl2(target, source, depth, seen) {
738
749
  if (!seen) seen = /* @__PURE__ */ new Set();
739
750
  if (seen.has(source)) return target;
740
751
  seen.add(source);
741
752
  const result = { ...target };
742
753
  for (const key of Object.keys(source)) {
743
754
  const newVal = source[key];
755
+ if (newVal === void 0) continue;
744
756
  if (newVal === null) {
745
- delete result[key];
757
+ if (depth === 0) {
758
+ result[key] = null;
759
+ } else {
760
+ delete result[key];
761
+ }
746
762
  continue;
747
763
  }
748
764
  const oldVal = result[key];
749
765
  if (isPlainObject2(oldVal) && isPlainObject2(newVal)) {
750
- result[key] = deepMerge2(oldVal, newVal, seen);
766
+ result[key] = deepMergeImpl2(oldVal, newVal, depth + 1, seen);
751
767
  } else {
752
768
  result[key] = newVal;
753
769
  }
@@ -1279,7 +1295,7 @@ var FluxstackLive = (() => {
1279
1295
  }
1280
1296
  var ChunkedUploader = class {
1281
1297
  constructor(componentId, options) {
1282
- this.componentId = componentId;
1298
+ __publicField(this, "componentId", componentId);
1283
1299
  __publicField(this, "options");
1284
1300
  __publicField(this, "abortController", null);
1285
1301
  __publicField(this, "adaptiveSizer", null);