vue 3.5.0 → 3.5.1

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 v3.5.0
2
+ * vue v3.5.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -975,7 +975,7 @@ const arrayInstrumentations = {
975
975
  },
976
976
  concat(...args) {
977
977
  return reactiveReadArray(this).concat(
978
- ...args.map((x) => reactiveReadArray(x))
978
+ ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
979
979
  );
980
980
  },
981
981
  entries() {
@@ -3301,7 +3301,9 @@ const BaseTransitionImpl = {
3301
3301
  // #11061, ensure enterHooks is fresh after clone
3302
3302
  (hooks) => enterHooks = hooks
3303
3303
  );
3304
- setTransitionHooks(innerChild, enterHooks);
3304
+ if (innerChild.type !== Comment) {
3305
+ setTransitionHooks(innerChild, enterHooks);
3306
+ }
3305
3307
  const oldChild = instance.subTree;
3306
3308
  const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3307
3309
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
@@ -3624,10 +3626,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3624
3626
  const oldRef = oldRawRef && oldRawRef.r;
3625
3627
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3626
3628
  const setupState = owner.setupState;
3629
+ const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
3627
3630
  if (oldRef != null && oldRef !== ref) {
3628
3631
  if (isString(oldRef)) {
3629
3632
  refs[oldRef] = null;
3630
- if (hasOwn(setupState, oldRef)) {
3633
+ if (canSetSetupRef(oldRef)) {
3631
3634
  setupState[oldRef] = null;
3632
3635
  }
3633
3636
  } else if (isRef(oldRef)) {
@@ -3642,14 +3645,14 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3642
3645
  if (_isString || _isRef) {
3643
3646
  const doSet = () => {
3644
3647
  if (rawRef.f) {
3645
- const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
3648
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
3646
3649
  if (isUnmount) {
3647
3650
  isArray(existing) && remove(existing, refValue);
3648
3651
  } else {
3649
3652
  if (!isArray(existing)) {
3650
3653
  if (_isString) {
3651
3654
  refs[ref] = [refValue];
3652
- if (hasOwn(setupState, ref)) {
3655
+ if (canSetSetupRef(ref)) {
3653
3656
  setupState[ref] = refs[ref];
3654
3657
  }
3655
3658
  } else {
@@ -3662,7 +3665,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3662
3665
  }
3663
3666
  } else if (_isString) {
3664
3667
  refs[ref] = value;
3665
- if (hasOwn(setupState, ref)) {
3668
+ if (canSetSetupRef(ref)) {
3666
3669
  setupState[ref] = value;
3667
3670
  }
3668
3671
  } else if (_isRef) {
@@ -10360,7 +10363,7 @@ function isMemoSame(cached, memo) {
10360
10363
  return true;
10361
10364
  }
10362
10365
 
10363
- const version = "3.5.0";
10366
+ const version = "3.5.1";
10364
10367
  const warn = warn$1 ;
10365
10368
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10366
10369
  const devtools = devtools$1 ;
@@ -10464,8 +10467,6 @@ const nodeOps = {
10464
10467
  const TRANSITION = "transition";
10465
10468
  const ANIMATION = "animation";
10466
10469
  const vtcKey = Symbol("_vtc");
10467
- const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
10468
- Transition.displayName = "Transition";
10469
10470
  const DOMTransitionPropsValidators = {
10470
10471
  name: String,
10471
10472
  type: String,
@@ -10484,11 +10485,19 @@ const DOMTransitionPropsValidators = {
10484
10485
  leaveActiveClass: String,
10485
10486
  leaveToClass: String
10486
10487
  };
10487
- const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
10488
+ const TransitionPropsValidators = /* @__PURE__ */ extend(
10488
10489
  {},
10489
10490
  BaseTransitionPropsValidators,
10490
10491
  DOMTransitionPropsValidators
10491
10492
  );
10493
+ const decorate$1 = (t) => {
10494
+ t.displayName = "Transition";
10495
+ t.props = TransitionPropsValidators;
10496
+ return t;
10497
+ };
10498
+ const Transition = /* @__PURE__ */ decorate$1(
10499
+ (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
10500
+ );
10492
10501
  const callHook = (hook, args = []) => {
10493
10502
  if (isArray(hook)) {
10494
10503
  hook.forEach((h2) => h2(...args));
@@ -11624,7 +11633,11 @@ const positionMap = /* @__PURE__ */ new WeakMap();
11624
11633
  const newPositionMap = /* @__PURE__ */ new WeakMap();
11625
11634
  const moveCbKey = Symbol("_moveCb");
11626
11635
  const enterCbKey = Symbol("_enterCb");
11627
- const TransitionGroupImpl = {
11636
+ const decorate = (t) => {
11637
+ delete t.props.mode;
11638
+ return t;
11639
+ };
11640
+ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11628
11641
  name: "TransitionGroup",
11629
11642
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
11630
11643
  tag: String,
@@ -11710,9 +11723,7 @@ const TransitionGroupImpl = {
11710
11723
  return createVNode(tag, null, children);
11711
11724
  };
11712
11725
  }
11713
- };
11714
- const removeMode = (props) => delete props.mode;
11715
- /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
11726
+ });
11716
11727
  const TransitionGroup = TransitionGroupImpl;
11717
11728
  function callPendingCbs(c) {
11718
11729
  const el = c.el;