vue 3.4.23 → 3.4.25

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.23
2
+ * vue v3.4.25
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.23
2
+ * vue v3.4.25
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.23
2
+ * vue v3.4.25
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2421,21 +2421,21 @@ function renderComponentRoot(instance) {
2421
2421
  vnode,
2422
2422
  proxy,
2423
2423
  withProxy,
2424
- props,
2425
2424
  propsOptions: [propsOptions],
2426
2425
  slots,
2427
2426
  attrs,
2428
2427
  emit,
2429
2428
  render,
2430
2429
  renderCache,
2430
+ props,
2431
2431
  data,
2432
2432
  setupState,
2433
2433
  ctx,
2434
2434
  inheritAttrs
2435
2435
  } = instance;
2436
+ const prev = setCurrentRenderingInstance(instance);
2436
2437
  let result;
2437
2438
  let fallthroughAttrs;
2438
- const prev = setCurrentRenderingInstance(instance);
2439
2439
  {
2440
2440
  accessedAttrs = false;
2441
2441
  }
@@ -2457,7 +2457,7 @@ function renderComponentRoot(instance) {
2457
2457
  thisProxy,
2458
2458
  proxyToUse,
2459
2459
  renderCache,
2460
- props,
2460
+ true ? shallowReadonly(props) : props,
2461
2461
  setupState,
2462
2462
  data,
2463
2463
  ctx
@@ -2471,7 +2471,7 @@ function renderComponentRoot(instance) {
2471
2471
  }
2472
2472
  result = normalizeVNode(
2473
2473
  render2.length > 1 ? render2(
2474
- props,
2474
+ true ? shallowReadonly(props) : props,
2475
2475
  true ? {
2476
2476
  get attrs() {
2477
2477
  markAttrsAccessed();
@@ -2481,9 +2481,8 @@ function renderComponentRoot(instance) {
2481
2481
  emit
2482
2482
  } : { attrs, slots, emit }
2483
2483
  ) : render2(
2484
- props,
2484
+ true ? shallowReadonly(props) : props,
2485
2485
  null
2486
- /* we know it doesn't need it */
2487
2486
  )
2488
2487
  );
2489
2488
  fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
@@ -3950,11 +3949,21 @@ function emptyPlaceholder(vnode) {
3950
3949
  }
3951
3950
  }
3952
3951
  function getKeepAliveChild(vnode) {
3953
- return isKeepAlive(vnode) ? (
3954
- // #7121 ensure get the child component subtree in case
3955
- // it's been replaced during HMR
3956
- vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
3957
- ) : vnode;
3952
+ if (!isKeepAlive(vnode)) {
3953
+ return vnode;
3954
+ }
3955
+ if (vnode.component) {
3956
+ return vnode.component.subTree;
3957
+ }
3958
+ const { shapeFlag, children } = vnode;
3959
+ if (children) {
3960
+ if (shapeFlag & 16) {
3961
+ return children[0];
3962
+ }
3963
+ if (shapeFlag & 32 && isFunction(children.default)) {
3964
+ return children.default();
3965
+ }
3966
+ }
3958
3967
  }
3959
3968
  function setTransitionHooks(vnode, hooks) {
3960
3969
  if (vnode.shapeFlag & 6 && vnode.component) {
@@ -5553,7 +5562,7 @@ function hasInjectionContext() {
5553
5562
  return !!(currentInstance || currentRenderingInstance || currentApp);
5554
5563
  }
5555
5564
 
5556
- const internalObjectProto = /* @__PURE__ */ Object.create(null);
5565
+ const internalObjectProto = {};
5557
5566
  const createInternalObject = () => Object.create(internalObjectProto);
5558
5567
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
5559
5568
 
@@ -6006,21 +6015,17 @@ const normalizeVNodeSlots = (instance, children) => {
6006
6015
  instance.slots.default = () => normalized;
6007
6016
  };
6008
6017
  const initSlots = (instance, children) => {
6018
+ const slots = instance.slots = createInternalObject();
6009
6019
  if (instance.vnode.shapeFlag & 32) {
6010
6020
  const type = children._;
6011
6021
  if (type) {
6012
- instance.slots = toRaw(children);
6013
- def(instance.slots, "_", type);
6022
+ extend(slots, children);
6023
+ def(slots, "_", type);
6014
6024
  } else {
6015
- normalizeObjectSlots(
6016
- children,
6017
- instance.slots = createInternalObject());
6018
- }
6019
- } else {
6020
- instance.slots = createInternalObject();
6021
- if (children) {
6022
- normalizeVNodeSlots(instance, children);
6025
+ normalizeObjectSlots(children, slots);
6023
6026
  }
6027
+ } else if (children) {
6028
+ normalizeVNodeSlots(instance, children);
6024
6029
  }
6025
6030
  };
6026
6031
  const updateSlots = (instance, children, optimized) => {
@@ -9614,7 +9619,7 @@ function isMemoSame(cached, memo) {
9614
9619
  return true;
9615
9620
  }
9616
9621
 
9617
- const version = "3.4.23";
9622
+ const version = "3.4.25";
9618
9623
  const warn = warn$1 ;
9619
9624
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9620
9625
  const devtools = devtools$1 ;
@@ -9810,8 +9815,8 @@ function resolveTransitionProps(rawProps) {
9810
9815
  el._isLeaving = true;
9811
9816
  const resolve = () => finishLeave(el, done);
9812
9817
  addTransitionClass(el, leaveFromClass);
9813
- forceReflow();
9814
9818
  addTransitionClass(el, leaveActiveClass);
9819
+ forceReflow();
9815
9820
  nextFrame(() => {
9816
9821
  if (!el._isLeaving) {
9817
9822
  return;
@@ -13694,6 +13699,7 @@ function createTransformContext(root, {
13694
13699
  vOnce: 0
13695
13700
  },
13696
13701
  parent: null,
13702
+ grandParent: null,
13697
13703
  currentNode: root,
13698
13704
  childIndex: 0,
13699
13705
  inVOnce: false,
@@ -13834,6 +13840,7 @@ function traverseChildren(parent, context) {
13834
13840
  const child = parent.children[i];
13835
13841
  if (isString(child))
13836
13842
  continue;
13843
+ context.grandParent = context.parent;
13837
13844
  context.parent = parent;
13838
13845
  context.childIndex = i;
13839
13846
  context.onNodeRemoved = nodeRemoved;
@@ -15393,6 +15400,16 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15393
15400
  if (arg)
15394
15401
  mergeArgs.push(arg);
15395
15402
  };
15403
+ const pushRefVForMarker = () => {
15404
+ if (context.scopes.vFor > 0) {
15405
+ properties.push(
15406
+ createObjectProperty(
15407
+ createSimpleExpression("ref_for", true),
15408
+ createSimpleExpression("true")
15409
+ )
15410
+ );
15411
+ }
15412
+ };
15396
15413
  const analyzePatchFlag = ({ key, value }) => {
15397
15414
  if (isStaticExp(key)) {
15398
15415
  const name = key.content;
@@ -15436,14 +15453,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15436
15453
  let isStatic = true;
15437
15454
  if (name === "ref") {
15438
15455
  hasRef = true;
15439
- if (context.scopes.vFor > 0) {
15440
- properties.push(
15441
- createObjectProperty(
15442
- createSimpleExpression("ref_for", true),
15443
- createSimpleExpression("true")
15444
- )
15445
- );
15446
- }
15456
+ pushRefVForMarker();
15447
15457
  }
15448
15458
  if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) {
15449
15459
  continue;
@@ -15487,18 +15497,14 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15487
15497
  ) {
15488
15498
  shouldUseBlock = true;
15489
15499
  }
15490
- if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) {
15491
- properties.push(
15492
- createObjectProperty(
15493
- createSimpleExpression("ref_for", true),
15494
- createSimpleExpression("true")
15495
- )
15496
- );
15500
+ if (isVBind && isStaticArgOf(arg, "ref")) {
15501
+ pushRefVForMarker();
15497
15502
  }
15498
15503
  if (!arg && (isVBind || isVOn)) {
15499
15504
  hasDynamicKeys = true;
15500
15505
  if (exp) {
15501
15506
  if (isVBind) {
15507
+ pushRefVForMarker();
15502
15508
  pushMergeArg();
15503
15509
  mergeArgs.push(exp);
15504
15510
  } else {