@vue/compat 3.5.20 → 3.5.22

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,9 +1,8 @@
1
1
  /**
2
- * @vue/compat v3.5.20
2
+ * @vue/compat v3.5.22
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- /*! #__NO_SIDE_EFFECTS__ */
7
6
  // @__NO_SIDE_EFFECTS__
8
7
  function makeMap(str) {
9
8
  const map = /* @__PURE__ */ Object.create(null);
@@ -61,10 +60,10 @@ const cacheStringFunction = (fn) => {
61
60
  return hit || (cache[str] = fn(str));
62
61
  });
63
62
  };
64
- const camelizeRE = /-(\w)/g;
63
+ const camelizeRE = /-\w/g;
65
64
  const camelize = cacheStringFunction(
66
65
  (str) => {
67
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
66
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
68
67
  }
69
68
  );
70
69
  const hyphenateRE = /\B([A-Z])/g;
@@ -1220,7 +1219,7 @@ function iterator(self, method, wrapValue) {
1220
1219
  iter._next = iter.next;
1221
1220
  iter.next = () => {
1222
1221
  const result = iter._next();
1223
- if (result.value) {
1222
+ if (!result.done) {
1224
1223
  result.value = wrapValue(result.value);
1225
1224
  }
1226
1225
  return result;
@@ -1347,7 +1346,8 @@ class BaseReactiveHandler {
1347
1346
  return res;
1348
1347
  }
1349
1348
  if (isRef(res)) {
1350
- return targetIsArray && isIntegerKey(key) ? res : res.value;
1349
+ const value = targetIsArray && isIntegerKey(key) ? res : res.value;
1350
+ return isReadonly2 && isObject(value) ? readonly(value) : value;
1351
1351
  }
1352
1352
  if (isObject(res)) {
1353
1353
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -2237,11 +2237,11 @@ function traverse(value, depth = Infinity, seen) {
2237
2237
  if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2238
2238
  return value;
2239
2239
  }
2240
- seen = seen || /* @__PURE__ */ new Set();
2241
- if (seen.has(value)) {
2240
+ seen = seen || /* @__PURE__ */ new Map();
2241
+ if ((seen.get(value) || 0) >= depth) {
2242
2242
  return value;
2243
2243
  }
2244
- seen.add(value);
2244
+ seen.set(value, depth);
2245
2245
  depth--;
2246
2246
  if (isRef(value)) {
2247
2247
  traverse(value.value, depth, seen);
@@ -2785,10 +2785,12 @@ function reload(id, newComp) {
2785
2785
  dirtyInstances.delete(instance);
2786
2786
  } else if (instance.parent) {
2787
2787
  queueJob(() => {
2788
- isHmrUpdating = true;
2789
- instance.parent.update();
2790
- isHmrUpdating = false;
2791
- dirtyInstances.delete(instance);
2788
+ if (!(instance.job.flags & 8)) {
2789
+ isHmrUpdating = true;
2790
+ instance.parent.update();
2791
+ isHmrUpdating = false;
2792
+ dirtyInstances.delete(instance);
2793
+ }
2792
2794
  });
2793
2795
  } else if (instance.appContext.reload) {
2794
2796
  instance.appContext.reload();
@@ -2892,7 +2894,6 @@ const devtoolsComponentRemoved = (component) => {
2892
2894
  _devtoolsComponentRemoved(component);
2893
2895
  }
2894
2896
  };
2895
- /*! #__NO_SIDE_EFFECTS__ */
2896
2897
  // @__NO_SIDE_EFFECTS__
2897
2898
  function createDevtoolsComponentHook(hook) {
2898
2899
  return (component) => {
@@ -3609,9 +3610,6 @@ const TeleportImpl = {
3609
3610
  insert(mainAnchor, container, anchor);
3610
3611
  const mount = (container2, anchor2) => {
3611
3612
  if (shapeFlag & 16) {
3612
- if (parentComponent && parentComponent.isCE) {
3613
- parentComponent.ce._teleportTarget = container2;
3614
- }
3615
3613
  mountChildren(
3616
3614
  children,
3617
3615
  container2,
@@ -3633,6 +3631,9 @@ const TeleportImpl = {
3633
3631
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
3634
3632
  namespace = "mathml";
3635
3633
  }
3634
+ if (parentComponent && parentComponent.isCE) {
3635
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3636
+ }
3636
3637
  if (!disabled) {
3637
3638
  mount(target, targetAnchor);
3638
3639
  updateCssVars(n2, false);
@@ -3821,26 +3822,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3821
3822
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3822
3823
  o: { nextSibling, parentNode, querySelector, insert, createText }
3823
3824
  }, hydrateChildren) {
3825
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
3826
+ vnode2.anchor = hydrateChildren(
3827
+ nextSibling(node2),
3828
+ vnode2,
3829
+ parentNode(node2),
3830
+ parentComponent,
3831
+ parentSuspense,
3832
+ slotScopeIds,
3833
+ optimized
3834
+ );
3835
+ vnode2.targetStart = targetStart;
3836
+ vnode2.targetAnchor = targetAnchor;
3837
+ }
3824
3838
  const target = vnode.target = resolveTarget(
3825
3839
  vnode.props,
3826
3840
  querySelector
3827
3841
  );
3842
+ const disabled = isTeleportDisabled(vnode.props);
3828
3843
  if (target) {
3829
- const disabled = isTeleportDisabled(vnode.props);
3830
3844
  const targetNode = target._lpa || target.firstChild;
3831
3845
  if (vnode.shapeFlag & 16) {
3832
3846
  if (disabled) {
3833
- vnode.anchor = hydrateChildren(
3834
- nextSibling(node),
3847
+ hydrateDisabledTeleport(
3848
+ node,
3835
3849
  vnode,
3836
- parentNode(node),
3837
- parentComponent,
3838
- parentSuspense,
3839
- slotScopeIds,
3840
- optimized
3850
+ targetNode,
3851
+ targetNode && nextSibling(targetNode)
3841
3852
  );
3842
- vnode.targetStart = targetNode;
3843
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
3844
3853
  } else {
3845
3854
  vnode.anchor = nextSibling(node);
3846
3855
  let targetAnchor = targetNode;
@@ -3871,6 +3880,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3871
3880
  }
3872
3881
  }
3873
3882
  updateCssVars(vnode, disabled);
3883
+ } else if (disabled) {
3884
+ if (vnode.shapeFlag & 16) {
3885
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
3886
+ }
3874
3887
  }
3875
3888
  return vnode.anchor && nextSibling(vnode.anchor);
3876
3889
  }
@@ -3982,7 +3995,7 @@ const BaseTransitionImpl = {
3982
3995
  setTransitionHooks(innerChild, enterHooks);
3983
3996
  }
3984
3997
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3985
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3998
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3986
3999
  let leavingHooks = resolveTransitionHooks(
3987
4000
  oldInnerChild,
3988
4001
  rawProps,
@@ -4266,7 +4279,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4266
4279
  return ret;
4267
4280
  }
4268
4281
 
4269
- /*! #__NO_SIDE_EFFECTS__ */
4270
4282
  // @__NO_SIDE_EFFECTS__
4271
4283
  function defineComponent(options, extraOptions) {
4272
4284
  return isFunction(options) ? (
@@ -4319,6 +4331,7 @@ function useTemplateRef(key) {
4319
4331
  return ret;
4320
4332
  }
4321
4333
 
4334
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
4322
4335
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4323
4336
  if (isArray(rawRef)) {
4324
4337
  rawRef.forEach(
@@ -4368,6 +4381,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4368
4381
  return !!!(process.env.NODE_ENV !== "production") || !knownTemplateRefs.has(ref2);
4369
4382
  };
4370
4383
  if (oldRef != null && oldRef !== ref) {
4384
+ invalidatePendingSetRef(oldRawRef);
4371
4385
  if (isString(oldRef)) {
4372
4386
  refs[oldRef] = null;
4373
4387
  if (canSetSetupRef(oldRef)) {
@@ -4425,9 +4439,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4425
4439
  }
4426
4440
  };
4427
4441
  if (value) {
4428
- doSet.id = -1;
4429
- queuePostRenderEffect(doSet, parentSuspense);
4442
+ const job = () => {
4443
+ doSet();
4444
+ pendingSetRefMap.delete(rawRef);
4445
+ };
4446
+ job.id = -1;
4447
+ pendingSetRefMap.set(rawRef, job);
4448
+ queuePostRenderEffect(job, parentSuspense);
4430
4449
  } else {
4450
+ invalidatePendingSetRef(rawRef);
4431
4451
  doSet();
4432
4452
  }
4433
4453
  } else if (!!(process.env.NODE_ENV !== "production")) {
@@ -4435,6 +4455,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4435
4455
  }
4436
4456
  }
4437
4457
  }
4458
+ function invalidatePendingSetRef(rawRef) {
4459
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
4460
+ if (pendingSetRef) {
4461
+ pendingSetRef.flags |= 8;
4462
+ pendingSetRefMap.delete(rawRef);
4463
+ }
4464
+ }
4438
4465
 
4439
4466
  let hasLoggedMismatchError = false;
4440
4467
  const logMismatchError = () => {
@@ -5178,7 +5205,6 @@ function forEachElement(node, cb) {
5178
5205
  }
5179
5206
 
5180
5207
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
5181
- /*! #__NO_SIDE_EFFECTS__ */
5182
5208
  // @__NO_SIDE_EFFECTS__
5183
5209
  function defineAsyncComponent(source) {
5184
5210
  if (isFunction(source)) {
@@ -6079,12 +6105,13 @@ function createSlots(slots, dynamicSlots) {
6079
6105
 
6080
6106
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
6081
6107
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
6108
+ const hasProps = Object.keys(props).length > 0;
6082
6109
  if (name !== "default") props.name = name;
6083
6110
  return openBlock(), createBlock(
6084
6111
  Fragment,
6085
6112
  null,
6086
6113
  [createVNode("slot", props, fallback && fallback())],
6087
- 64
6114
+ hasProps ? -2 : 64
6088
6115
  );
6089
6116
  }
6090
6117
  let slot = slots[name];
@@ -7277,7 +7304,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7277
7304
  return vm;
7278
7305
  }
7279
7306
  }
7280
- Vue.version = `2.6.14-compat:${"3.5.20"}`;
7307
+ Vue.version = `2.6.14-compat:${"3.5.22"}`;
7281
7308
  Vue.config = singletonApp.config;
7282
7309
  Vue.use = (plugin, ...options) => {
7283
7310
  if (plugin && isFunction(plugin.install)) {
@@ -7535,7 +7562,7 @@ function installCompatMount(app, context, render) {
7535
7562
  if (!!(process.env.NODE_ENV !== "production")) {
7536
7563
  for (let i = 0; i < container.attributes.length; i++) {
7537
7564
  const attr = container.attributes[i];
7538
- if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
7565
+ if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
7539
7566
  warnDeprecation$1("GLOBAL_MOUNT_CONTAINER", null);
7540
7567
  break;
7541
7568
  }
@@ -10387,8 +10414,9 @@ function emit(instance, event, ...rawArgs) {
10387
10414
  return emit$1(instance, event, args);
10388
10415
  }
10389
10416
  }
10417
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
10390
10418
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
10391
- const cache = appContext.emitsCache;
10419
+ const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
10392
10420
  const cached = cache.get(comp);
10393
10421
  if (cached !== void 0) {
10394
10422
  return cached;
@@ -10860,7 +10888,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
10860
10888
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
10861
10889
  if (pendingBranch) {
10862
10890
  suspense.pendingBranch = newBranch;
10863
- if (isSameVNodeType(newBranch, pendingBranch)) {
10891
+ if (isSameVNodeType(pendingBranch, newBranch)) {
10864
10892
  patch(
10865
10893
  pendingBranch,
10866
10894
  newBranch,
@@ -10931,7 +10959,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
10931
10959
  );
10932
10960
  setActiveBranch(suspense, newFallback);
10933
10961
  }
10934
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
10962
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
10935
10963
  patch(
10936
10964
  activeBranch,
10937
10965
  newBranch,
@@ -10962,7 +10990,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
10962
10990
  }
10963
10991
  }
10964
10992
  } else {
10965
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
10993
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
10966
10994
  patch(
10967
10995
  activeBranch,
10968
10996
  newBranch,
@@ -12212,7 +12240,7 @@ function getComponentPublicInstance(instance) {
12212
12240
  return instance.proxy;
12213
12241
  }
12214
12242
  }
12215
- const classifyRE = /(?:^|[-_])(\w)/g;
12243
+ const classifyRE = /(?:^|[-_])\w/g;
12216
12244
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
12217
12245
  function getComponentName(Component, includeInferred = true) {
12218
12246
  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -12255,23 +12283,28 @@ const computed = (getterOrOptions, debugOptions) => {
12255
12283
  };
12256
12284
 
12257
12285
  function h(type, propsOrChildren, children) {
12258
- const l = arguments.length;
12259
- if (l === 2) {
12260
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
12261
- if (isVNode(propsOrChildren)) {
12262
- return createVNode(type, null, [propsOrChildren]);
12286
+ try {
12287
+ setBlockTracking(-1);
12288
+ const l = arguments.length;
12289
+ if (l === 2) {
12290
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
12291
+ if (isVNode(propsOrChildren)) {
12292
+ return createVNode(type, null, [propsOrChildren]);
12293
+ }
12294
+ return createVNode(type, propsOrChildren);
12295
+ } else {
12296
+ return createVNode(type, null, propsOrChildren);
12263
12297
  }
12264
- return createVNode(type, propsOrChildren);
12265
12298
  } else {
12266
- return createVNode(type, null, propsOrChildren);
12267
- }
12268
- } else {
12269
- if (l > 3) {
12270
- children = Array.prototype.slice.call(arguments, 2);
12271
- } else if (l === 3 && isVNode(children)) {
12272
- children = [children];
12299
+ if (l > 3) {
12300
+ children = Array.prototype.slice.call(arguments, 2);
12301
+ } else if (l === 3 && isVNode(children)) {
12302
+ children = [children];
12303
+ }
12304
+ return createVNode(type, propsOrChildren, children);
12273
12305
  }
12274
- return createVNode(type, propsOrChildren, children);
12306
+ } finally {
12307
+ setBlockTracking(1);
12275
12308
  }
12276
12309
  }
12277
12310
 
@@ -12481,7 +12514,7 @@ function isMemoSame(cached, memo) {
12481
12514
  return true;
12482
12515
  }
12483
12516
 
12484
- const version = "3.5.20";
12517
+ const version = "3.5.22";
12485
12518
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12486
12519
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12487
12520
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -12751,11 +12784,11 @@ function resolveTransitionProps(rawProps) {
12751
12784
  addTransitionClass(el, legacyLeaveFromClass);
12752
12785
  }
12753
12786
  if (!el._enterCancelled) {
12754
- forceReflow();
12787
+ forceReflow(el);
12755
12788
  addTransitionClass(el, leaveActiveClass);
12756
12789
  } else {
12757
12790
  addTransitionClass(el, leaveActiveClass);
12758
- forceReflow();
12791
+ forceReflow(el);
12759
12792
  }
12760
12793
  nextFrame(() => {
12761
12794
  if (!el._isLeaving) {
@@ -12884,7 +12917,7 @@ function getTransitionInfo(el, expectedType) {
12884
12917
  type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
12885
12918
  propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
12886
12919
  }
12887
- const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
12920
+ const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
12888
12921
  getStyleProperties(`${TRANSITION$1}Property`).toString()
12889
12922
  );
12890
12923
  return {
@@ -12904,8 +12937,9 @@ function toMs(s) {
12904
12937
  if (s === "auto") return 0;
12905
12938
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
12906
12939
  }
12907
- function forceReflow() {
12908
- return document.body.offsetHeight;
12940
+ function forceReflow(el) {
12941
+ const targetDocument = el ? el.ownerDocument : document;
12942
+ return targetDocument.body.offsetHeight;
12909
12943
  }
12910
12944
 
12911
12945
  function patchClass(el, value, isSVG) {
@@ -13045,7 +13079,7 @@ function setVarsOnNode(el, vars) {
13045
13079
  }
13046
13080
  }
13047
13081
 
13048
- const displayRE = /(^|;)\s*display\s*:/;
13082
+ const displayRE = /(?:^|;)\s*display\s*:/;
13049
13083
  function patchStyle(el, prev, next) {
13050
13084
  const style = el.style;
13051
13085
  const isCssString = isString(next);
@@ -13412,11 +13446,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
13412
13446
  }
13413
13447
 
13414
13448
  const REMOVAL = {};
13415
- /*! #__NO_SIDE_EFFECTS__ */
13416
13449
  // @__NO_SIDE_EFFECTS__
13417
13450
  function defineCustomElement(options, extraOptions, _createApp) {
13418
- const Comp = defineComponent(options, extraOptions);
13419
- if (isPlainObject(Comp)) extend(Comp, extraOptions);
13451
+ let Comp = defineComponent(options, extraOptions);
13452
+ if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
13420
13453
  class VueCustomElement extends VueElement {
13421
13454
  constructor(initialProps) {
13422
13455
  super(Comp, initialProps, _createApp);
@@ -13425,7 +13458,6 @@ function defineCustomElement(options, extraOptions, _createApp) {
13425
13458
  VueCustomElement.def = Comp;
13426
13459
  return VueCustomElement;
13427
13460
  }
13428
-
13429
13461
  const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
13430
13462
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
13431
13463
  });
@@ -13464,7 +13496,11 @@ class VueElement extends BaseClass {
13464
13496
  );
13465
13497
  }
13466
13498
  if (_def.shadowRoot !== false) {
13467
- this.attachShadow({ mode: "open" });
13499
+ this.attachShadow(
13500
+ extend({}, _def.shadowRootOptions, {
13501
+ mode: "open"
13502
+ })
13503
+ );
13468
13504
  this._root = this.shadowRoot;
13469
13505
  } else {
13470
13506
  this._root = this;
@@ -13524,9 +13560,18 @@ class VueElement extends BaseClass {
13524
13560
  this._app && this._app.unmount();
13525
13561
  if (this._instance) this._instance.ce = void 0;
13526
13562
  this._app = this._instance = null;
13563
+ if (this._teleportTargets) {
13564
+ this._teleportTargets.clear();
13565
+ this._teleportTargets = void 0;
13566
+ }
13527
13567
  }
13528
13568
  });
13529
13569
  }
13570
+ _processMutations(mutations) {
13571
+ for (const m of mutations) {
13572
+ this._setAttr(m.attributeName);
13573
+ }
13574
+ }
13530
13575
  /**
13531
13576
  * resolve inner component definition (handle possible async component)
13532
13577
  */
@@ -13537,11 +13582,7 @@ class VueElement extends BaseClass {
13537
13582
  for (let i = 0; i < this.attributes.length; i++) {
13538
13583
  this._setAttr(this.attributes[i].name);
13539
13584
  }
13540
- this._ob = new MutationObserver((mutations) => {
13541
- for (const m of mutations) {
13542
- this._setAttr(m.attributeName);
13543
- }
13544
- });
13585
+ this._ob = new MutationObserver(this._processMutations.bind(this));
13545
13586
  this._ob.observe(this, { attributes: true });
13546
13587
  const resolve = (def, isAsync = false) => {
13547
13588
  this._resolved = true;
@@ -13657,7 +13698,10 @@ class VueElement extends BaseClass {
13657
13698
  }
13658
13699
  if (shouldReflect) {
13659
13700
  const ob = this._ob;
13660
- ob && ob.disconnect();
13701
+ if (ob) {
13702
+ this._processMutations(ob.takeRecords());
13703
+ ob.disconnect();
13704
+ }
13661
13705
  if (val === true) {
13662
13706
  this.setAttribute(hyphenate(key), "");
13663
13707
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13761,7 +13805,7 @@ class VueElement extends BaseClass {
13761
13805
  * Only called when shadowRoot is false
13762
13806
  */
13763
13807
  _renderSlots() {
13764
- const outlets = (this._teleportTarget || this).querySelectorAll("slot");
13808
+ const outlets = this._getSlots();
13765
13809
  const scopeId = this._instance.type.__scopeId;
13766
13810
  for (let i = 0; i < outlets.length; i++) {
13767
13811
  const o = outlets[i];
@@ -13787,6 +13831,19 @@ class VueElement extends BaseClass {
13787
13831
  parent.removeChild(o);
13788
13832
  }
13789
13833
  }
13834
+ /**
13835
+ * @internal
13836
+ */
13837
+ _getSlots() {
13838
+ const roots = [this];
13839
+ if (this._teleportTargets) {
13840
+ roots.push(...this._teleportTargets);
13841
+ }
13842
+ return roots.reduce((res, i) => {
13843
+ res.push(...Array.from(i.querySelectorAll("slot")));
13844
+ return res;
13845
+ }, []);
13846
+ }
13790
13847
  /**
13791
13848
  * @internal
13792
13849
  */
@@ -13891,7 +13948,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13891
13948
  prevChildren.forEach(callPendingCbs);
13892
13949
  prevChildren.forEach(recordPosition);
13893
13950
  const movedChildren = prevChildren.filter(applyTranslation);
13894
- forceReflow();
13951
+ forceReflow(instance.vnode.el);
13895
13952
  movedChildren.forEach((c) => {
13896
13953
  const el = c.el;
13897
13954
  const style = el.style;
@@ -13901,7 +13958,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13901
13958
  if (e && e.target !== el) {
13902
13959
  return;
13903
13960
  }
13904
- if (!e || /transform$/.test(e.propertyName)) {
13961
+ if (!e || e.propertyName.endsWith("transform")) {
13905
13962
  el.removeEventListener("transitionend", cb);
13906
13963
  el[moveCbKey] = null;
13907
13964
  removeTransitionClass(el, moveClass);
@@ -14400,7 +14457,7 @@ const createApp = ((...args) => {
14400
14457
  if (!!(process.env.NODE_ENV !== "production") && container.nodeType === 1) {
14401
14458
  for (let i = 0; i < container.attributes.length; i++) {
14402
14459
  const attr = container.attributes[i];
14403
- if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
14460
+ if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
14404
14461
  compatUtils.warnDeprecation(
14405
14462
  "GLOBAL_MOUNT_CONTAINER",
14406
14463
  null
@@ -16005,7 +16062,7 @@ const isMemberExpressionBrowser = (exp) => {
16005
16062
  return !currentOpenBracketCount && !currentOpenParensCount;
16006
16063
  };
16007
16064
  const isMemberExpression = isMemberExpressionBrowser ;
16008
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
16065
+ const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
16009
16066
  const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
16010
16067
  const isFnExpression = isFnExpressionBrowser ;
16011
16068
  function assert(condition, msg) {
@@ -18147,7 +18204,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
18147
18204
  }
18148
18205
 
18149
18206
  const transformIf = createStructuralDirectiveTransform(
18150
- /^(if|else|else-if)$/,
18207
+ /^(?:if|else|else-if)$/,
18151
18208
  (node, dir, context) => {
18152
18209
  return processIf(node, dir, context, (ifNode, branch, isRoot) => {
18153
18210
  const siblings = context.parent.children;
@@ -18365,80 +18422,6 @@ function getParentCondition(node) {
18365
18422
  }
18366
18423
  }
18367
18424
 
18368
- const transformBind = (dir, _node, context) => {
18369
- const { modifiers, loc } = dir;
18370
- const arg = dir.arg;
18371
- let { exp } = dir;
18372
- if (exp && exp.type === 4 && !exp.content.trim()) {
18373
- {
18374
- exp = void 0;
18375
- }
18376
- }
18377
- if (!exp) {
18378
- if (arg.type !== 4 || !arg.isStatic) {
18379
- context.onError(
18380
- createCompilerError(
18381
- 52,
18382
- arg.loc
18383
- )
18384
- );
18385
- return {
18386
- props: [
18387
- createObjectProperty(arg, createSimpleExpression("", true, loc))
18388
- ]
18389
- };
18390
- }
18391
- transformBindShorthand(dir);
18392
- exp = dir.exp;
18393
- }
18394
- if (arg.type !== 4) {
18395
- arg.children.unshift(`(`);
18396
- arg.children.push(`) || ""`);
18397
- } else if (!arg.isStatic) {
18398
- arg.content = arg.content ? `${arg.content} || ""` : `""`;
18399
- }
18400
- if (modifiers.some((mod) => mod.content === "camel")) {
18401
- if (arg.type === 4) {
18402
- if (arg.isStatic) {
18403
- arg.content = camelize(arg.content);
18404
- } else {
18405
- arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
18406
- }
18407
- } else {
18408
- arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
18409
- arg.children.push(`)`);
18410
- }
18411
- }
18412
- if (!context.inSSR) {
18413
- if (modifiers.some((mod) => mod.content === "prop")) {
18414
- injectPrefix(arg, ".");
18415
- }
18416
- if (modifiers.some((mod) => mod.content === "attr")) {
18417
- injectPrefix(arg, "^");
18418
- }
18419
- }
18420
- return {
18421
- props: [createObjectProperty(arg, exp)]
18422
- };
18423
- };
18424
- const transformBindShorthand = (dir, context) => {
18425
- const arg = dir.arg;
18426
- const propName = camelize(arg.content);
18427
- dir.exp = createSimpleExpression(propName, false, arg.loc);
18428
- };
18429
- const injectPrefix = (arg, prefix) => {
18430
- if (arg.type === 4) {
18431
- if (arg.isStatic) {
18432
- arg.content = prefix + arg.content;
18433
- } else {
18434
- arg.content = `\`${prefix}\${${arg.content}}\``;
18435
- }
18436
- } else {
18437
- arg.children.unshift(`'${prefix}' + (`);
18438
- arg.children.push(`)`);
18439
- }
18440
- };
18441
-
18442
18425
  const transformFor = createStructuralDirectiveTransform(
18443
18426
  "for",
18444
18427
  (node, dir, context) => {
@@ -18450,10 +18433,7 @@ const transformFor = createStructuralDirectiveTransform(
18450
18433
  const isTemplate = isTemplateNode(node);
18451
18434
  const memo = findDir(node, "memo");
18452
18435
  const keyProp = findProp(node, `key`, false, true);
18453
- const isDirKey = keyProp && keyProp.type === 7;
18454
- if (isDirKey && !keyProp.exp) {
18455
- transformBindShorthand(keyProp);
18456
- }
18436
+ keyProp && keyProp.type === 7;
18457
18437
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18458
18438
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
18459
18439
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
@@ -18734,7 +18714,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
18734
18714
  );
18735
18715
  } else if (vElse = findDir(
18736
18716
  slotElement,
18737
- /^else(-if)?$/,
18717
+ /^else(?:-if)?$/,
18738
18718
  true
18739
18719
  /* allowEmpty */
18740
18720
  )) {
@@ -18746,7 +18726,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
18746
18726
  break;
18747
18727
  }
18748
18728
  }
18749
- if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
18729
+ if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
18750
18730
  let conditional = dynamicSlots[dynamicSlots.length - 1];
18751
18731
  while (conditional.alternate.type === 19) {
18752
18732
  conditional = conditional.alternate;
@@ -19606,6 +19586,58 @@ const transformOn$1 = (dir, node, context, augmentor) => {
19606
19586
  return ret;
19607
19587
  };
19608
19588
 
19589
+ const transformBind = (dir, _node, context) => {
19590
+ const { modifiers, loc } = dir;
19591
+ const arg = dir.arg;
19592
+ let { exp } = dir;
19593
+ if (exp && exp.type === 4 && !exp.content.trim()) {
19594
+ {
19595
+ exp = void 0;
19596
+ }
19597
+ }
19598
+ if (arg.type !== 4) {
19599
+ arg.children.unshift(`(`);
19600
+ arg.children.push(`) || ""`);
19601
+ } else if (!arg.isStatic) {
19602
+ arg.content = arg.content ? `${arg.content} || ""` : `""`;
19603
+ }
19604
+ if (modifiers.some((mod) => mod.content === "camel")) {
19605
+ if (arg.type === 4) {
19606
+ if (arg.isStatic) {
19607
+ arg.content = camelize(arg.content);
19608
+ } else {
19609
+ arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
19610
+ }
19611
+ } else {
19612
+ arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
19613
+ arg.children.push(`)`);
19614
+ }
19615
+ }
19616
+ if (!context.inSSR) {
19617
+ if (modifiers.some((mod) => mod.content === "prop")) {
19618
+ injectPrefix(arg, ".");
19619
+ }
19620
+ if (modifiers.some((mod) => mod.content === "attr")) {
19621
+ injectPrefix(arg, "^");
19622
+ }
19623
+ }
19624
+ return {
19625
+ props: [createObjectProperty(arg, exp)]
19626
+ };
19627
+ };
19628
+ const injectPrefix = (arg, prefix) => {
19629
+ if (arg.type === 4) {
19630
+ if (arg.isStatic) {
19631
+ arg.content = prefix + arg.content;
19632
+ } else {
19633
+ arg.content = `\`${prefix}\${${arg.content}}\``;
19634
+ }
19635
+ } else {
19636
+ arg.children.unshift(`'${prefix}' + (`);
19637
+ arg.children.push(`)`);
19638
+ }
19639
+ };
19640
+
19609
19641
  const transformText = (node, context) => {
19610
19642
  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
19611
19643
  return () => {
@@ -19936,9 +19968,35 @@ const transformMemo = (node, context) => {
19936
19968
  }
19937
19969
  };
19938
19970
 
19971
+ const transformVBindShorthand = (node, context) => {
19972
+ if (node.type === 1) {
19973
+ for (const prop of node.props) {
19974
+ if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
19975
+ const arg = prop.arg;
19976
+ if (arg.type !== 4 || !arg.isStatic) {
19977
+ context.onError(
19978
+ createCompilerError(
19979
+ 52,
19980
+ arg.loc
19981
+ )
19982
+ );
19983
+ prop.exp = createSimpleExpression("", true, arg.loc);
19984
+ } else {
19985
+ const propName = camelize(arg.content);
19986
+ if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
19987
+ propName[0] === "-") {
19988
+ prop.exp = createSimpleExpression(propName, false, arg.loc);
19989
+ }
19990
+ }
19991
+ }
19992
+ }
19993
+ }
19994
+ };
19995
+
19939
19996
  function getBaseTransformPreset(prefixIdentifiers) {
19940
19997
  return [
19941
19998
  [
19999
+ transformVBindShorthand,
19942
20000
  transformOnce,
19943
20001
  transformIf,
19944
20002
  transformMemo,