@vue/runtime-dom 3.4.25 → 3.4.26

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/runtime-dom v3.4.25
2
+ * @vue/runtime-dom v3.4.26
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/runtime-dom v3.4.25
2
+ * @vue/runtime-dom v3.4.26
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/runtime-dom v3.4.25
2
+ * @vue/runtime-dom v3.4.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -81,10 +81,11 @@ const invokeArrayFns = (fns, arg) => {
81
81
  fns[i](arg);
82
82
  }
83
83
  };
84
- const def = (obj, key, value) => {
84
+ const def = (obj, key, value, writable = false) => {
85
85
  Object.defineProperty(obj, key, {
86
86
  configurable: true,
87
87
  enumerable: false,
88
+ writable,
88
89
  value
89
90
  });
90
91
  };
@@ -476,11 +477,10 @@ class ReactiveEffect {
476
477
  }
477
478
  }
478
479
  stop() {
479
- var _a;
480
480
  if (this.active) {
481
481
  preCleanupEffect(this);
482
482
  postCleanupEffect(this);
483
- (_a = this.onStop) == null ? void 0 : _a.call(this);
483
+ this.onStop && this.onStop();
484
484
  this.active = false;
485
485
  }
486
486
  }
@@ -693,8 +693,8 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
693
693
  resetScheduling();
694
694
  }
695
695
  function getDepFromReactive(object, key) {
696
- var _a;
697
- return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
696
+ const depsMap = targetMap.get(object);
697
+ return depsMap && depsMap.get(key);
698
698
  }
699
699
 
700
700
  const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
@@ -2410,7 +2410,7 @@ function renderComponentRoot(instance) {
2410
2410
  true ? {
2411
2411
  get attrs() {
2412
2412
  markAttrsAccessed();
2413
- return attrs;
2413
+ return shallowReadonly(attrs);
2414
2414
  },
2415
2415
  slots,
2416
2416
  emit
@@ -2443,7 +2443,7 @@ function renderComponentRoot(instance) {
2443
2443
  propsOptions
2444
2444
  );
2445
2445
  }
2446
- root = cloneVNode(root, fallthroughAttrs);
2446
+ root = cloneVNode(root, fallthroughAttrs, false, true);
2447
2447
  } else if (!accessedAttrs && root.type !== Comment) {
2448
2448
  const allAttrs = Object.keys(attrs);
2449
2449
  const eventAttrs = [];
@@ -2477,7 +2477,7 @@ function renderComponentRoot(instance) {
2477
2477
  `Runtime directive used on component with non-element root node. The directives will not function as intended.`
2478
2478
  );
2479
2479
  }
2480
- root = cloneVNode(root);
2480
+ root = cloneVNode(root, null, false, true);
2481
2481
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
2482
2482
  }
2483
2483
  if (vnode.transition) {
@@ -2968,7 +2968,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
2968
2968
  let parentSuspenseId;
2969
2969
  const isSuspensible = isVNodeSuspensible(vnode);
2970
2970
  if (isSuspensible) {
2971
- if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
2971
+ if (parentSuspense && parentSuspense.pendingBranch) {
2972
2972
  parentSuspenseId = parentSuspense.pendingId;
2973
2973
  parentSuspense.deps++;
2974
2974
  }
@@ -3280,8 +3280,8 @@ function setActiveBranch(suspense, branch) {
3280
3280
  }
3281
3281
  }
3282
3282
  function isVNodeSuspensible(vnode) {
3283
- var _a;
3284
- return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3283
+ const suspensible = vnode.props && vnode.props.suspensible;
3284
+ return suspensible != null && suspensible !== false;
3285
3285
  }
3286
3286
 
3287
3287
  const ssrContextKey = Symbol.for("v-scx");
@@ -3514,34 +3514,29 @@ function createPathGetter(ctx, path) {
3514
3514
  return cur;
3515
3515
  };
3516
3516
  }
3517
- function traverse(value, depth, currentDepth = 0, seen) {
3518
- if (!isObject(value) || value["__v_skip"]) {
3517
+ function traverse(value, depth = Infinity, seen) {
3518
+ if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
3519
3519
  return value;
3520
3520
  }
3521
- if (depth && depth > 0) {
3522
- if (currentDepth >= depth) {
3523
- return value;
3524
- }
3525
- currentDepth++;
3526
- }
3527
3521
  seen = seen || /* @__PURE__ */ new Set();
3528
3522
  if (seen.has(value)) {
3529
3523
  return value;
3530
3524
  }
3531
3525
  seen.add(value);
3526
+ depth--;
3532
3527
  if (isRef(value)) {
3533
- traverse(value.value, depth, currentDepth, seen);
3528
+ traverse(value.value, depth, seen);
3534
3529
  } else if (isArray(value)) {
3535
3530
  for (let i = 0; i < value.length; i++) {
3536
- traverse(value[i], depth, currentDepth, seen);
3531
+ traverse(value[i], depth, seen);
3537
3532
  }
3538
3533
  } else if (isSet(value) || isMap(value)) {
3539
3534
  value.forEach((v) => {
3540
- traverse(v, depth, currentDepth, seen);
3535
+ traverse(v, depth, seen);
3541
3536
  });
3542
3537
  } else if (isPlainObject(value)) {
3543
3538
  for (const key in value) {
3544
- traverse(value[key], depth, currentDepth, seen);
3539
+ traverse(value[key], depth, seen);
3545
3540
  }
3546
3541
  }
3547
3542
  return value;
@@ -3699,7 +3694,7 @@ const BaseTransitionImpl = {
3699
3694
  instance
3700
3695
  );
3701
3696
  setTransitionHooks(oldInnerChild, leavingHooks);
3702
- if (mode === "out-in") {
3697
+ if (mode === "out-in" && innerChild.type !== Comment) {
3703
3698
  state.isLeaving = true;
3704
3699
  leavingHooks.afterLeave = () => {
3705
3700
  state.isLeaving = false;
@@ -4214,7 +4209,7 @@ const KeepAliveImpl = {
4214
4209
  return () => {
4215
4210
  pendingCacheKey = null;
4216
4211
  if (!slots.default) {
4217
- return current = null;
4212
+ return null;
4218
4213
  }
4219
4214
  const children = slots.default();
4220
4215
  const rawVNode = children[0];
@@ -5955,7 +5950,7 @@ const initSlots = (instance, children) => {
5955
5950
  const type = children._;
5956
5951
  if (type) {
5957
5952
  extend(slots, children);
5958
- def(slots, "_", type);
5953
+ def(slots, "_", type, true);
5959
5954
  } else {
5960
5955
  normalizeObjectSlots(children, slots);
5961
5956
  }
@@ -8702,8 +8697,8 @@ function guardReactiveProps(props) {
8702
8697
  return null;
8703
8698
  return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
8704
8699
  }
8705
- function cloneVNode(vnode, extraProps, mergeRef = false) {
8706
- const { props, ref, patchFlag, children } = vnode;
8700
+ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
8701
+ const { props, ref, patchFlag, children, transition } = vnode;
8707
8702
  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
8708
8703
  const cloned = {
8709
8704
  __v_isVNode: true,
@@ -8733,7 +8728,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
8733
8728
  dynamicChildren: vnode.dynamicChildren,
8734
8729
  appContext: vnode.appContext,
8735
8730
  dirs: vnode.dirs,
8736
- transition: vnode.transition,
8731
+ transition,
8737
8732
  // These should technically only be non-null on mounted VNodes. However,
8738
8733
  // they *should* be copied for kept-alive vnodes. So we just always copy
8739
8734
  // them since them being non-null during a mount doesn't affect the logic as
@@ -8747,6 +8742,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
8747
8742
  ctx: vnode.ctx,
8748
8743
  ce: vnode.ce
8749
8744
  };
8745
+ if (transition && cloneTransition) {
8746
+ cloned.transition = transition.clone(cloned);
8747
+ }
8750
8748
  return cloned;
8751
8749
  }
8752
8750
  function deepCloneVNode(vnode) {
@@ -9554,7 +9552,7 @@ function isMemoSame(cached, memo) {
9554
9552
  return true;
9555
9553
  }
9556
9554
 
9557
- const version = "3.4.25";
9555
+ const version = "3.4.26";
9558
9556
  const warn = warn$1 ;
9559
9557
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9560
9558
  const devtools = devtools$1 ;