@vue/compat 3.3.10 → 3.3.11

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.
@@ -235,20 +235,29 @@ const replacer = (_key, val) => {
235
235
  return replacer(_key, val.value);
236
236
  } else if (isMap(val)) {
237
237
  return {
238
- [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
239
- entries[`${key} =>`] = val2;
240
- return entries;
241
- }, {})
238
+ [`Map(${val.size})`]: [...val.entries()].reduce(
239
+ (entries, [key, val2], i) => {
240
+ entries[stringifySymbol(key, i) + " =>"] = val2;
241
+ return entries;
242
+ },
243
+ {}
244
+ )
242
245
  };
243
246
  } else if (isSet(val)) {
244
247
  return {
245
- [`Set(${val.size})`]: [...val.values()]
248
+ [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
246
249
  };
250
+ } else if (isSymbol(val)) {
251
+ return stringifySymbol(val);
247
252
  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
248
253
  return String(val);
249
254
  }
250
255
  return val;
251
256
  };
257
+ const stringifySymbol = (v, i = "") => {
258
+ var _a;
259
+ return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
260
+ };
252
261
 
253
262
  function warn$1(msg, ...args) {
254
263
  console.warn(`[Vue warn] ${msg}`, ...args);
@@ -676,8 +685,13 @@ class BaseReactiveHandler {
676
685
  return isReadonly2;
677
686
  } else if (key === "__v_isShallow") {
678
687
  return shallow;
679
- } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
680
- return target;
688
+ } else if (key === "__v_raw") {
689
+ if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
690
+ // this means the reciever is a user proxy of the reactive proxy
691
+ Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
692
+ return target;
693
+ }
694
+ return;
681
695
  }
682
696
  const targetIsArray = isArray(target);
683
697
  if (!isReadonly2) {
@@ -1698,13 +1712,16 @@ function queuePostFlushCb(cb) {
1698
1712
  }
1699
1713
  queueFlush();
1700
1714
  }
1701
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
1715
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
1702
1716
  if (!!(process.env.NODE_ENV !== "production")) {
1703
1717
  seen = seen || /* @__PURE__ */ new Map();
1704
1718
  }
1705
1719
  for (; i < queue.length; i++) {
1706
1720
  const cb = queue[i];
1707
1721
  if (cb && cb.pre) {
1722
+ if (instance && cb.id !== instance.uid) {
1723
+ continue;
1724
+ }
1708
1725
  if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
1709
1726
  continue;
1710
1727
  }
@@ -3376,6 +3393,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3376
3393
  }
3377
3394
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3378
3395
  triggerEvent(vnode2, "onFallback");
3396
+ const anchor2 = next(activeBranch);
3379
3397
  const mountFallback = () => {
3380
3398
  if (!suspense.isInFallback) {
3381
3399
  return;
@@ -3384,7 +3402,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3384
3402
  null,
3385
3403
  fallbackVNode,
3386
3404
  container2,
3387
- next(activeBranch),
3405
+ anchor2,
3388
3406
  parentComponent2,
3389
3407
  null,
3390
3408
  // fallback tree will not have suspense context
@@ -6256,7 +6274,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6256
6274
  return vm;
6257
6275
  }
6258
6276
  }
6259
- Vue.version = `2.6.14-compat:${"3.3.10"}`;
6277
+ Vue.version = `2.6.14-compat:${"3.3.11"}`;
6260
6278
  Vue.config = singletonApp.config;
6261
6279
  Vue.use = (p, ...options) => {
6262
6280
  if (p && isFunction(p.install)) {
@@ -8931,7 +8949,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8931
8949
  updateProps(instance, nextVNode.props, prevProps, optimized);
8932
8950
  updateSlots(instance, nextVNode.children, optimized);
8933
8951
  pauseTracking();
8934
- flushPreFlushCbs();
8952
+ flushPreFlushCbs(instance);
8935
8953
  resetTracking();
8936
8954
  };
8937
8955
  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
@@ -10914,7 +10932,7 @@ function isMemoSame(cached, memo) {
10914
10932
  return true;
10915
10933
  }
10916
10934
 
10917
- const version = "3.3.10";
10935
+ const version = "3.3.11";
10918
10936
  const _ssrUtils = {
10919
10937
  createComponentInstance,
10920
10938
  setupComponent,
@@ -11682,7 +11700,9 @@ function shouldSetAsProp(el, key, value, isSVG) {
11682
11700
  }
11683
11701
  if (key === "width" || key === "height") {
11684
11702
  const tag = el.tagName;
11685
- return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
11703
+ if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
11704
+ return false;
11705
+ }
11686
11706
  }
11687
11707
  if (isNativeOn(key) && isString(value)) {
11688
11708
  return false;
@@ -238,20 +238,29 @@ var Vue = (function () {
238
238
  return replacer(_key, val.value);
239
239
  } else if (isMap(val)) {
240
240
  return {
241
- [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
242
- entries[`${key} =>`] = val2;
243
- return entries;
244
- }, {})
241
+ [`Map(${val.size})`]: [...val.entries()].reduce(
242
+ (entries, [key, val2], i) => {
243
+ entries[stringifySymbol(key, i) + " =>"] = val2;
244
+ return entries;
245
+ },
246
+ {}
247
+ )
245
248
  };
246
249
  } else if (isSet(val)) {
247
250
  return {
248
- [`Set(${val.size})`]: [...val.values()]
251
+ [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
249
252
  };
253
+ } else if (isSymbol(val)) {
254
+ return stringifySymbol(val);
250
255
  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
251
256
  return String(val);
252
257
  }
253
258
  return val;
254
259
  };
260
+ const stringifySymbol = (v, i = "") => {
261
+ var _a;
262
+ return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
263
+ };
255
264
 
256
265
  function warn$1(msg, ...args) {
257
266
  console.warn(`[Vue warn] ${msg}`, ...args);
@@ -675,8 +684,13 @@ var Vue = (function () {
675
684
  return isReadonly2;
676
685
  } else if (key === "__v_isShallow") {
677
686
  return shallow;
678
- } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
679
- return target;
687
+ } else if (key === "__v_raw") {
688
+ if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
689
+ // this means the reciever is a user proxy of the reactive proxy
690
+ Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
691
+ return target;
692
+ }
693
+ return;
680
694
  }
681
695
  const targetIsArray = isArray(target);
682
696
  if (!isReadonly2) {
@@ -1687,13 +1701,16 @@ var Vue = (function () {
1687
1701
  }
1688
1702
  queueFlush();
1689
1703
  }
1690
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
1704
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
1691
1705
  {
1692
1706
  seen = seen || /* @__PURE__ */ new Map();
1693
1707
  }
1694
1708
  for (; i < queue.length; i++) {
1695
1709
  const cb = queue[i];
1696
1710
  if (cb && cb.pre) {
1711
+ if (instance && cb.id !== instance.uid) {
1712
+ continue;
1713
+ }
1697
1714
  if (checkRecursiveUpdates(seen, cb)) {
1698
1715
  continue;
1699
1716
  }
@@ -3362,6 +3379,7 @@ If this is a native custom element, make sure to exclude it from component resol
3362
3379
  }
3363
3380
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3364
3381
  triggerEvent(vnode2, "onFallback");
3382
+ const anchor2 = next(activeBranch);
3365
3383
  const mountFallback = () => {
3366
3384
  if (!suspense.isInFallback) {
3367
3385
  return;
@@ -3370,7 +3388,7 @@ If this is a native custom element, make sure to exclude it from component resol
3370
3388
  null,
3371
3389
  fallbackVNode,
3372
3390
  container2,
3373
- next(activeBranch),
3391
+ anchor2,
3374
3392
  parentComponent2,
3375
3393
  null,
3376
3394
  // fallback tree will not have suspense context
@@ -6211,7 +6229,7 @@ If this is a native custom element, make sure to exclude it from component resol
6211
6229
  return vm;
6212
6230
  }
6213
6231
  }
6214
- Vue.version = `2.6.14-compat:${"3.3.10"}`;
6232
+ Vue.version = `2.6.14-compat:${"3.3.11"}`;
6215
6233
  Vue.config = singletonApp.config;
6216
6234
  Vue.use = (p, ...options) => {
6217
6235
  if (p && isFunction(p.install)) {
@@ -8849,7 +8867,7 @@ If you want to remount the same app, move your app creation logic into a factory
8849
8867
  updateProps(instance, nextVNode.props, prevProps, optimized);
8850
8868
  updateSlots(instance, nextVNode.children, optimized);
8851
8869
  pauseTracking();
8852
- flushPreFlushCbs();
8870
+ flushPreFlushCbs(instance);
8853
8871
  resetTracking();
8854
8872
  };
8855
8873
  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
@@ -10798,7 +10816,7 @@ Component that was made reactive: `,
10798
10816
  return true;
10799
10817
  }
10800
10818
 
10801
- const version = "3.3.10";
10819
+ const version = "3.3.11";
10802
10820
  const ssrUtils = null;
10803
10821
  const resolveFilter = resolveFilter$1 ;
10804
10822
  const _compatUtils = {
@@ -11551,7 +11569,9 @@ Component that was made reactive: `,
11551
11569
  }
11552
11570
  if (key === "width" || key === "height") {
11553
11571
  const tag = el.tagName;
11554
- return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
11572
+ if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
11573
+ return false;
11574
+ }
11555
11575
  }
11556
11576
  if (isNativeOn(key) && isString(value)) {
11557
11577
  return false;