@vue/compat 3.5.26 → 3.5.28

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.26
2
+ * @vue/compat v3.5.28
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -410,6 +410,7 @@ var Vue = (function () {
410
410
 
411
411
  let activeEffectScope;
412
412
  class EffectScope {
413
+ // TODO isolatedDeclarations "__v_skip"
413
414
  constructor(detached = false) {
414
415
  this.detached = detached;
415
416
  /**
@@ -429,6 +430,7 @@ var Vue = (function () {
429
430
  */
430
431
  this.cleanups = [];
431
432
  this._isPaused = false;
433
+ this.__v_skip = true;
432
434
  this.parent = activeEffectScope;
433
435
  if (!detached && activeEffectScope) {
434
436
  this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
@@ -1494,20 +1496,20 @@ var Vue = (function () {
1494
1496
  "iterate",
1495
1497
  isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
1496
1498
  );
1497
- return {
1498
- // iterator protocol
1499
- next() {
1500
- const { value, done } = innerIterator.next();
1501
- return done ? { value, done } : {
1502
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1503
- done
1504
- };
1505
- },
1506
- // iterable protocol
1507
- [Symbol.iterator]() {
1508
- return this;
1499
+ return extend(
1500
+ // inheriting all iterator properties
1501
+ Object.create(innerIterator),
1502
+ {
1503
+ // iterator protocol
1504
+ next() {
1505
+ const { value, done } = innerIterator.next();
1506
+ return done ? { value, done } : {
1507
+ value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1508
+ done
1509
+ };
1510
+ }
1509
1511
  }
1510
- };
1512
+ );
1511
1513
  };
1512
1514
  }
1513
1515
  function createReadonlyMethod(type) {
@@ -1721,8 +1723,9 @@ var Vue = (function () {
1721
1723
  function getTargetType(value) {
1722
1724
  return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
1723
1725
  }
1726
+ // @__NO_SIDE_EFFECTS__
1724
1727
  function reactive(target) {
1725
- if (isReadonly(target)) {
1728
+ if (/* @__PURE__ */ isReadonly(target)) {
1726
1729
  return target;
1727
1730
  }
1728
1731
  return createReactiveObject(
@@ -1733,6 +1736,7 @@ var Vue = (function () {
1733
1736
  reactiveMap
1734
1737
  );
1735
1738
  }
1739
+ // @__NO_SIDE_EFFECTS__
1736
1740
  function shallowReactive(target) {
1737
1741
  return createReactiveObject(
1738
1742
  target,
@@ -1742,6 +1746,7 @@ var Vue = (function () {
1742
1746
  shallowReactiveMap
1743
1747
  );
1744
1748
  }
1749
+ // @__NO_SIDE_EFFECTS__
1745
1750
  function readonly(target) {
1746
1751
  return createReactiveObject(
1747
1752
  target,
@@ -1751,6 +1756,7 @@ var Vue = (function () {
1751
1756
  readonlyMap
1752
1757
  );
1753
1758
  }
1759
+ // @__NO_SIDE_EFFECTS__
1754
1760
  function shallowReadonly(target) {
1755
1761
  return createReactiveObject(
1756
1762
  target,
@@ -1789,24 +1795,29 @@ var Vue = (function () {
1789
1795
  proxyMap.set(target, proxy);
1790
1796
  return proxy;
1791
1797
  }
1798
+ // @__NO_SIDE_EFFECTS__
1792
1799
  function isReactive(value) {
1793
- if (isReadonly(value)) {
1794
- return isReactive(value["__v_raw"]);
1800
+ if (/* @__PURE__ */ isReadonly(value)) {
1801
+ return /* @__PURE__ */ isReactive(value["__v_raw"]);
1795
1802
  }
1796
1803
  return !!(value && value["__v_isReactive"]);
1797
1804
  }
1805
+ // @__NO_SIDE_EFFECTS__
1798
1806
  function isReadonly(value) {
1799
1807
  return !!(value && value["__v_isReadonly"]);
1800
1808
  }
1809
+ // @__NO_SIDE_EFFECTS__
1801
1810
  function isShallow(value) {
1802
1811
  return !!(value && value["__v_isShallow"]);
1803
1812
  }
1813
+ // @__NO_SIDE_EFFECTS__
1804
1814
  function isProxy(value) {
1805
1815
  return value ? !!value["__v_raw"] : false;
1806
1816
  }
1817
+ // @__NO_SIDE_EFFECTS__
1807
1818
  function toRaw(observed) {
1808
1819
  const raw = observed && observed["__v_raw"];
1809
- return raw ? toRaw(raw) : observed;
1820
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
1810
1821
  }
1811
1822
  function markRaw(value) {
1812
1823
  if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
@@ -1814,20 +1825,23 @@ var Vue = (function () {
1814
1825
  }
1815
1826
  return value;
1816
1827
  }
1817
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
1818
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1828
+ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
1829
+ const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1819
1830
 
1831
+ // @__NO_SIDE_EFFECTS__
1820
1832
  function isRef(r) {
1821
1833
  return r ? r["__v_isRef"] === true : false;
1822
1834
  }
1835
+ // @__NO_SIDE_EFFECTS__
1823
1836
  function ref(value) {
1824
1837
  return createRef(value, false);
1825
1838
  }
1839
+ // @__NO_SIDE_EFFECTS__
1826
1840
  function shallowRef(value) {
1827
1841
  return createRef(value, true);
1828
1842
  }
1829
1843
  function createRef(rawValue, shallow) {
1830
- if (isRef(rawValue)) {
1844
+ if (/* @__PURE__ */ isRef(rawValue)) {
1831
1845
  return rawValue;
1832
1846
  }
1833
1847
  return new RefImpl(rawValue, shallow);
@@ -1883,7 +1897,7 @@ var Vue = (function () {
1883
1897
  }
1884
1898
  }
1885
1899
  function unref(ref2) {
1886
- return isRef(ref2) ? ref2.value : ref2;
1900
+ return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
1887
1901
  }
1888
1902
  function toValue(source) {
1889
1903
  return isFunction(source) ? source() : unref(source);
@@ -1892,7 +1906,7 @@ var Vue = (function () {
1892
1906
  get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
1893
1907
  set: (target, key, value, receiver) => {
1894
1908
  const oldValue = target[key];
1895
- if (isRef(oldValue) && !isRef(value)) {
1909
+ if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1896
1910
  oldValue.value = value;
1897
1911
  return true;
1898
1912
  } else {
@@ -1922,6 +1936,7 @@ var Vue = (function () {
1922
1936
  function customRef(factory) {
1923
1937
  return new CustomRefImpl(factory);
1924
1938
  }
1939
+ // @__NO_SIDE_EFFECTS__
1925
1940
  function toRefs(object) {
1926
1941
  if (!isProxy(object)) {
1927
1942
  warn$2(`toRefs() expects a reactive object but received a plain one.`);
@@ -1957,9 +1972,9 @@ var Vue = (function () {
1957
1972
  return this._value = val === void 0 ? this._defaultValue : val;
1958
1973
  }
1959
1974
  set value(newVal) {
1960
- if (this._shallow && isRef(this._raw[this._key])) {
1975
+ if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
1961
1976
  const nestedRef = this._object[this._key];
1962
- if (isRef(nestedRef)) {
1977
+ if (/* @__PURE__ */ isRef(nestedRef)) {
1963
1978
  nestedRef.value = newVal;
1964
1979
  return;
1965
1980
  }
@@ -1981,15 +1996,16 @@ var Vue = (function () {
1981
1996
  return this._value = this._getter();
1982
1997
  }
1983
1998
  }
1999
+ // @__NO_SIDE_EFFECTS__
1984
2000
  function toRef(source, key, defaultValue) {
1985
- if (isRef(source)) {
2001
+ if (/* @__PURE__ */ isRef(source)) {
1986
2002
  return source;
1987
2003
  } else if (isFunction(source)) {
1988
2004
  return new GetterRefImpl(source);
1989
2005
  } else if (isObject(source) && arguments.length > 1) {
1990
2006
  return propertyToRef(source, key, defaultValue);
1991
2007
  } else {
1992
- return ref(source);
2008
+ return /* @__PURE__ */ ref(source);
1993
2009
  }
1994
2010
  }
1995
2011
  function propertyToRef(source, key, defaultValue) {
@@ -2070,6 +2086,7 @@ var Vue = (function () {
2070
2086
  }
2071
2087
  }
2072
2088
  }
2089
+ // @__NO_SIDE_EFFECTS__
2073
2090
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
2074
2091
  let getter;
2075
2092
  let setter;
@@ -3939,7 +3956,22 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3939
3956
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3940
3957
  o: { nextSibling, parentNode, querySelector, insert, createText }
3941
3958
  }, hydrateChildren) {
3942
- function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
3959
+ function hydrateAnchor(target2, targetNode) {
3960
+ let targetAnchor = targetNode;
3961
+ while (targetAnchor) {
3962
+ if (targetAnchor && targetAnchor.nodeType === 8) {
3963
+ if (targetAnchor.data === "teleport start anchor") {
3964
+ vnode.targetStart = targetAnchor;
3965
+ } else if (targetAnchor.data === "teleport anchor") {
3966
+ vnode.targetAnchor = targetAnchor;
3967
+ target2._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
3968
+ break;
3969
+ }
3970
+ }
3971
+ targetAnchor = nextSibling(targetAnchor);
3972
+ }
3973
+ }
3974
+ function hydrateDisabledTeleport(node2, vnode2) {
3943
3975
  vnode2.anchor = hydrateChildren(
3944
3976
  nextSibling(node2),
3945
3977
  vnode2,
@@ -3949,8 +3981,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3949
3981
  slotScopeIds,
3950
3982
  optimized
3951
3983
  );
3952
- vnode2.targetStart = targetStart;
3953
- vnode2.targetAnchor = targetAnchor;
3954
3984
  }
3955
3985
  const target = vnode.target = resolveTarget(
3956
3986
  vnode.props,
@@ -3961,27 +3991,22 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3961
3991
  const targetNode = target._lpa || target.firstChild;
3962
3992
  if (vnode.shapeFlag & 16) {
3963
3993
  if (disabled) {
3964
- hydrateDisabledTeleport(
3965
- node,
3966
- vnode,
3967
- targetNode,
3968
- targetNode && nextSibling(targetNode)
3969
- );
3994
+ hydrateDisabledTeleport(node, vnode);
3995
+ hydrateAnchor(target, targetNode);
3996
+ if (!vnode.targetAnchor) {
3997
+ prepareAnchor(
3998
+ target,
3999
+ vnode,
4000
+ createText,
4001
+ insert,
4002
+ // if target is the same as the main view, insert anchors before current node
4003
+ // to avoid hydrating mismatch
4004
+ parentNode(node) === target ? node : null
4005
+ );
4006
+ }
3970
4007
  } else {
3971
4008
  vnode.anchor = nextSibling(node);
3972
- let targetAnchor = targetNode;
3973
- while (targetAnchor) {
3974
- if (targetAnchor && targetAnchor.nodeType === 8) {
3975
- if (targetAnchor.data === "teleport start anchor") {
3976
- vnode.targetStart = targetAnchor;
3977
- } else if (targetAnchor.data === "teleport anchor") {
3978
- vnode.targetAnchor = targetAnchor;
3979
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
3980
- break;
3981
- }
3982
- }
3983
- targetAnchor = nextSibling(targetAnchor);
3984
- }
4009
+ hydrateAnchor(target, targetNode);
3985
4010
  if (!vnode.targetAnchor) {
3986
4011
  prepareAnchor(target, vnode, createText, insert);
3987
4012
  }
@@ -3999,7 +4024,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3999
4024
  updateCssVars(vnode, disabled);
4000
4025
  } else if (disabled) {
4001
4026
  if (vnode.shapeFlag & 16) {
4002
- hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
4027
+ hydrateDisabledTeleport(node, vnode);
4028
+ vnode.targetStart = node;
4029
+ vnode.targetAnchor = nextSibling(node);
4003
4030
  }
4004
4031
  }
4005
4032
  return vnode.anchor && nextSibling(vnode.anchor);
@@ -4023,13 +4050,13 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4023
4050
  ctx.ut();
4024
4051
  }
4025
4052
  }
4026
- function prepareAnchor(target, vnode, createText, insert) {
4053
+ function prepareAnchor(target, vnode, createText, insert, anchor = null) {
4027
4054
  const targetStart = vnode.targetStart = createText("");
4028
4055
  const targetAnchor = vnode.targetAnchor = createText("");
4029
4056
  targetStart[TeleportEndKey] = targetAnchor;
4030
4057
  if (target) {
4031
- insert(targetStart, target);
4032
- insert(targetAnchor, target);
4058
+ insert(targetStart, target, anchor);
4059
+ insert(targetAnchor, target, anchor);
4033
4060
  }
4034
4061
  return targetAnchor;
4035
4062
  }
@@ -4267,7 +4294,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4267
4294
  }
4268
4295
  }
4269
4296
  let called = false;
4270
- const done = el[enterCbKey$1] = (cancelled) => {
4297
+ el[enterCbKey$1] = (cancelled) => {
4271
4298
  if (called) return;
4272
4299
  called = true;
4273
4300
  if (cancelled) {
@@ -4280,6 +4307,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4280
4307
  }
4281
4308
  el[enterCbKey$1] = void 0;
4282
4309
  };
4310
+ const done = el[enterCbKey$1].bind(null, false);
4283
4311
  if (hook) {
4284
4312
  callAsyncHook(hook, [el, done]);
4285
4313
  } else {
@@ -4299,7 +4327,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4299
4327
  }
4300
4328
  callHook(onBeforeLeave, [el]);
4301
4329
  let called = false;
4302
- const done = el[leaveCbKey] = (cancelled) => {
4330
+ el[leaveCbKey] = (cancelled) => {
4303
4331
  if (called) return;
4304
4332
  called = true;
4305
4333
  remove();
@@ -4313,6 +4341,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4313
4341
  delete leavingVNodesCache[key2];
4314
4342
  }
4315
4343
  };
4344
+ const done = el[leaveCbKey].bind(null, false);
4316
4345
  leavingVNodesCache[key2] = vnode;
4317
4346
  if (onLeave) {
4318
4347
  callAsyncHook(onLeave, [el, done]);
@@ -4425,8 +4454,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4425
4454
  const r = shallowRef(null);
4426
4455
  if (i) {
4427
4456
  const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
4428
- let desc;
4429
- if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
4457
+ if (isTemplateRefKey(refs, key)) {
4430
4458
  warn$1(`useTemplateRef('${key}') already exists.`);
4431
4459
  } else {
4432
4460
  Object.defineProperty(refs, key, {
@@ -4446,6 +4474,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4446
4474
  }
4447
4475
  return ret;
4448
4476
  }
4477
+ function isTemplateRefKey(refs, key) {
4478
+ let desc;
4479
+ return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
4480
+ }
4449
4481
 
4450
4482
  const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
4451
4483
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
@@ -4491,10 +4523,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4491
4523
  return false;
4492
4524
  }
4493
4525
  }
4526
+ if (isTemplateRefKey(refs, key)) {
4527
+ return false;
4528
+ }
4494
4529
  return hasOwn(rawSetupState, key);
4495
4530
  };
4496
- const canSetRef = (ref2) => {
4497
- return !knownTemplateRefs.has(ref2);
4531
+ const canSetRef = (ref2, key) => {
4532
+ if (knownTemplateRefs.has(ref2)) {
4533
+ return false;
4534
+ }
4535
+ if (key && isTemplateRefKey(refs, key)) {
4536
+ return false;
4537
+ }
4538
+ return true;
4498
4539
  };
4499
4540
  if (oldRef != null && oldRef !== ref) {
4500
4541
  invalidatePendingSetRef(oldRawRef);
@@ -4504,10 +4545,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4504
4545
  setupState[oldRef] = null;
4505
4546
  }
4506
4547
  } else if (isRef(oldRef)) {
4507
- if (canSetRef(oldRef)) {
4548
+ const oldRawRefAtom = oldRawRef;
4549
+ if (canSetRef(oldRef, oldRawRefAtom.k)) {
4508
4550
  oldRef.value = null;
4509
4551
  }
4510
- const oldRawRefAtom = oldRawRef;
4511
4552
  if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
4512
4553
  }
4513
4554
  }
@@ -4531,7 +4572,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4531
4572
  }
4532
4573
  } else {
4533
4574
  const newVal = [refValue];
4534
- if (canSetRef(ref)) {
4575
+ if (canSetRef(ref, rawRef.k)) {
4535
4576
  ref.value = newVal;
4536
4577
  }
4537
4578
  if (rawRef.k) refs[rawRef.k] = newVal;
@@ -4546,7 +4587,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4546
4587
  setupState[ref] = value;
4547
4588
  }
4548
4589
  } else if (_isRef) {
4549
- if (canSetRef(ref)) {
4590
+ if (canSetRef(ref, rawRef.k)) {
4550
4591
  ref.value = value;
4551
4592
  }
4552
4593
  if (rawRef.k) refs[rawRef.k] = value;
@@ -4886,7 +4927,7 @@ Server rendered element contains more child nodes than client vdom.`
4886
4927
  logMismatchError();
4887
4928
  }
4888
4929
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
4889
- key[0] === "." || isCustomElement) {
4930
+ key[0] === "." || isCustomElement && !isReservedProp(key)) {
4890
4931
  patchProp(el, key, null, props[key], void 0, parentComponent);
4891
4932
  }
4892
4933
  }
@@ -7400,7 +7441,7 @@ If this is a native custom element, make sure to exclude it from component resol
7400
7441
  return vm;
7401
7442
  }
7402
7443
  }
7403
- Vue.version = `2.6.14-compat:${"3.5.26"}`;
7444
+ Vue.version = `2.6.14-compat:${"3.5.28"}`;
7404
7445
  Vue.config = singletonApp.config;
7405
7446
  Vue.use = (plugin, ...options) => {
7406
7447
  if (plugin && isFunction(plugin.install)) {
@@ -8514,7 +8555,7 @@ If you want to remount the same app, move your app creation logic into a factory
8514
8555
  const dynamicProps = nextVNode.dynamicProps;
8515
8556
  for (let i = 0; i < dynamicProps.length; i++) {
8516
8557
  const key = dynamicProps[i];
8517
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
8558
+ if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) {
8518
8559
  return true;
8519
8560
  }
8520
8561
  }
@@ -8545,12 +8586,20 @@ If you want to remount the same app, move your app creation logic into a factory
8545
8586
  }
8546
8587
  for (let i = 0; i < nextKeys.length; i++) {
8547
8588
  const key = nextKeys[i];
8548
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
8589
+ if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8549
8590
  return true;
8550
8591
  }
8551
8592
  }
8552
8593
  return false;
8553
8594
  }
8595
+ function hasPropValueChanged(nextProps, prevProps, key) {
8596
+ const nextProp = nextProps[key];
8597
+ const prevProp = prevProps[key];
8598
+ if (key === "style" && isObject(nextProp) && isObject(prevProp)) {
8599
+ return !looseEqual(nextProp, prevProp);
8600
+ }
8601
+ return nextProp !== prevProp;
8602
+ }
8554
8603
  function updateHOCHostEl({ vnode, parent }, el) {
8555
8604
  while (parent) {
8556
8605
  const root = parent.subTree;
@@ -9326,15 +9375,7 @@ If you want to remount the same app, move your app creation logic into a factory
9326
9375
  } else {
9327
9376
  const el = n2.el = n1.el;
9328
9377
  if (n2.children !== n1.children) {
9329
- if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9330
- const childNodes = container.childNodes;
9331
- const newChild = hostCreateText(n2.children);
9332
- const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9333
- hostInsert(newChild, container, oldChild);
9334
- hostRemove(oldChild);
9335
- } else {
9336
- hostSetText(el, n2.children);
9337
- }
9378
+ hostSetText(el, n2.children);
9338
9379
  }
9339
9380
  }
9340
9381
  };
@@ -9410,7 +9451,7 @@ If you want to remount the same app, move your app creation logic into a factory
9410
9451
  optimized
9411
9452
  );
9412
9453
  } else {
9413
- const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
9454
+ const customElement = n1.el && n1.el._isVueCE ? n1.el : null;
9414
9455
  try {
9415
9456
  if (customElement) {
9416
9457
  customElement._beginPatch();
@@ -9896,8 +9937,7 @@ If you want to remount the same app, move your app creation logic into a factory
9896
9937
  hydrateSubTree();
9897
9938
  }
9898
9939
  } else {
9899
- if (root.ce && // @ts-expect-error _def is private
9900
- root.ce._def.shadowRoot !== false) {
9940
+ if (root.ce && root.ce._hasShadowRoot()) {
9901
9941
  root.ce._injectChildStyle(type);
9902
9942
  }
9903
9943
  {
@@ -9964,9 +10004,9 @@ If you want to remount the same app, move your app creation logic into a factory
9964
10004
  updateComponentPreRender(instance, next, optimized);
9965
10005
  }
9966
10006
  nonHydratedAsyncRoot.asyncDep.then(() => {
9967
- if (!instance.isUnmounted) {
9968
- componentUpdateFn();
9969
- }
10007
+ queuePostRenderEffect(() => {
10008
+ if (!instance.isUnmounted) update();
10009
+ }, parentSuspense);
9970
10010
  });
9971
10011
  return;
9972
10012
  }
@@ -10681,12 +10721,10 @@ If you want to remount the same app, move your app creation logic into a factory
10681
10721
  traverseStaticChildren(c1, c2);
10682
10722
  }
10683
10723
  if (c2.type === Text) {
10684
- if (c2.patchFlag !== -1) {
10685
- c2.el = c1.el;
10686
- } else {
10687
- c2.__elIndex = i + // take fragment start anchor into account
10688
- (n1.type === Fragment ? 1 : 0);
10724
+ if (c2.patchFlag === -1) {
10725
+ c2 = ch2[i] = cloneIfMounted(c2);
10689
10726
  }
10727
+ c2.el = c1.el;
10690
10728
  }
10691
10729
  if (c2.type === Comment && !c2.el) {
10692
10730
  c2.el = c1.el;
@@ -12477,7 +12515,7 @@ Component that was made reactive: `,
12477
12515
  return true;
12478
12516
  }
12479
12517
 
12480
- const version = "3.5.26";
12518
+ const version = "3.5.28";
12481
12519
  const warn = warn$1 ;
12482
12520
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12483
12521
  const devtools = devtools$1 ;
@@ -13820,6 +13858,12 @@ Expected function or array of functions, received type ${typeof value}.`
13820
13858
  this._update();
13821
13859
  }
13822
13860
  }
13861
+ /**
13862
+ * @internal
13863
+ */
13864
+ _hasShadowRoot() {
13865
+ return this._def.shadowRoot !== false;
13866
+ }
13823
13867
  /**
13824
13868
  * @internal
13825
13869
  */
@@ -13951,10 +13995,7 @@ Expected function or array of functions, received type ${typeof value}.`
13951
13995
  instance
13952
13996
  )
13953
13997
  );
13954
- positionMap.set(child, {
13955
- left: child.el.offsetLeft,
13956
- top: child.el.offsetTop
13957
- });
13998
+ positionMap.set(child, getPosition(child.el));
13958
13999
  }
13959
14000
  }
13960
14001
  }
@@ -13985,10 +14026,7 @@ Expected function or array of functions, received type ${typeof value}.`
13985
14026
  }
13986
14027
  }
13987
14028
  function recordPosition(c) {
13988
- newPositionMap.set(c, {
13989
- left: c.el.offsetLeft,
13990
- top: c.el.offsetTop
13991
- });
14029
+ newPositionMap.set(c, getPosition(c.el));
13992
14030
  }
13993
14031
  function applyTranslation(c) {
13994
14032
  const oldPos = positionMap.get(c);
@@ -13996,12 +14034,29 @@ Expected function or array of functions, received type ${typeof value}.`
13996
14034
  const dx = oldPos.left - newPos.left;
13997
14035
  const dy = oldPos.top - newPos.top;
13998
14036
  if (dx || dy) {
13999
- const s = c.el.style;
14000
- s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
14037
+ const el = c.el;
14038
+ const s = el.style;
14039
+ const rect = el.getBoundingClientRect();
14040
+ let scaleX = 1;
14041
+ let scaleY = 1;
14042
+ if (el.offsetWidth) scaleX = rect.width / el.offsetWidth;
14043
+ if (el.offsetHeight) scaleY = rect.height / el.offsetHeight;
14044
+ if (!Number.isFinite(scaleX) || scaleX === 0) scaleX = 1;
14045
+ if (!Number.isFinite(scaleY) || scaleY === 0) scaleY = 1;
14046
+ if (Math.abs(scaleX - 1) < 0.01) scaleX = 1;
14047
+ if (Math.abs(scaleY - 1) < 0.01) scaleY = 1;
14048
+ s.transform = s.webkitTransform = `translate(${dx / scaleX}px,${dy / scaleY}px)`;
14001
14049
  s.transitionDuration = "0s";
14002
14050
  return c;
14003
14051
  }
14004
14052
  }
14053
+ function getPosition(el) {
14054
+ const rect = el.getBoundingClientRect();
14055
+ return {
14056
+ left: rect.left,
14057
+ top: rect.top
14058
+ };
14059
+ }
14005
14060
  function hasCSSTransform(el, root, moveClass) {
14006
14061
  const clone = el.cloneNode();
14007
14062
  const _vtc = el[vtcKey];
@@ -14278,6 +14333,7 @@ Expected function or array of functions, received type ${typeof value}.`
14278
14333
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
14279
14334
  };
14280
14335
  const withModifiers = (fn, modifiers) => {
14336
+ if (!fn) return fn;
14281
14337
  const cache = fn._withMods || (fn._withMods = {});
14282
14338
  const cacheKey = modifiers.join(".");
14283
14339
  return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {