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.
package/dist/vue.cjs.js CHANGED
@@ -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
  **/
@@ -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
  **/
@@ -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
  **/
@@ -1042,7 +1042,7 @@ const arrayInstrumentations = {
1042
1042
  },
1043
1043
  concat(...args) {
1044
1044
  return reactiveReadArray(this).concat(
1045
- ...args.map((x) => reactiveReadArray(x))
1045
+ ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
1046
1046
  );
1047
1047
  },
1048
1048
  entries() {
@@ -3368,7 +3368,9 @@ const BaseTransitionImpl = {
3368
3368
  // #11061, ensure enterHooks is fresh after clone
3369
3369
  (hooks) => enterHooks = hooks
3370
3370
  );
3371
- setTransitionHooks(innerChild, enterHooks);
3371
+ if (innerChild.type !== Comment) {
3372
+ setTransitionHooks(innerChild, enterHooks);
3373
+ }
3372
3374
  const oldChild = instance.subTree;
3373
3375
  const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3374
3376
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
@@ -3691,10 +3693,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3691
3693
  const oldRef = oldRawRef && oldRawRef.r;
3692
3694
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3693
3695
  const setupState = owner.setupState;
3696
+ const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
3694
3697
  if (oldRef != null && oldRef !== ref) {
3695
3698
  if (isString(oldRef)) {
3696
3699
  refs[oldRef] = null;
3697
- if (hasOwn(setupState, oldRef)) {
3700
+ if (canSetSetupRef(oldRef)) {
3698
3701
  setupState[oldRef] = null;
3699
3702
  }
3700
3703
  } else if (isRef(oldRef)) {
@@ -3709,14 +3712,14 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3709
3712
  if (_isString || _isRef) {
3710
3713
  const doSet = () => {
3711
3714
  if (rawRef.f) {
3712
- const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
3715
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
3713
3716
  if (isUnmount) {
3714
3717
  isArray(existing) && remove(existing, refValue);
3715
3718
  } else {
3716
3719
  if (!isArray(existing)) {
3717
3720
  if (_isString) {
3718
3721
  refs[ref] = [refValue];
3719
- if (hasOwn(setupState, ref)) {
3722
+ if (canSetSetupRef(ref)) {
3720
3723
  setupState[ref] = refs[ref];
3721
3724
  }
3722
3725
  } else {
@@ -3729,7 +3732,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3729
3732
  }
3730
3733
  } else if (_isString) {
3731
3734
  refs[ref] = value;
3732
- if (hasOwn(setupState, ref)) {
3735
+ if (canSetSetupRef(ref)) {
3733
3736
  setupState[ref] = value;
3734
3737
  }
3735
3738
  } else if (_isRef) {
@@ -10427,7 +10430,7 @@ function isMemoSame(cached, memo) {
10427
10430
  return true;
10428
10431
  }
10429
10432
 
10430
- const version = "3.5.0";
10433
+ const version = "3.5.1";
10431
10434
  const warn = warn$1 ;
10432
10435
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10433
10436
  const devtools = devtools$1 ;
@@ -10531,8 +10534,6 @@ const nodeOps = {
10531
10534
  const TRANSITION$1 = "transition";
10532
10535
  const ANIMATION = "animation";
10533
10536
  const vtcKey = Symbol("_vtc");
10534
- const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
10535
- Transition.displayName = "Transition";
10536
10537
  const DOMTransitionPropsValidators = {
10537
10538
  name: String,
10538
10539
  type: String,
@@ -10551,11 +10552,19 @@ const DOMTransitionPropsValidators = {
10551
10552
  leaveActiveClass: String,
10552
10553
  leaveToClass: String
10553
10554
  };
10554
- const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
10555
+ const TransitionPropsValidators = /* @__PURE__ */ extend(
10555
10556
  {},
10556
10557
  BaseTransitionPropsValidators,
10557
10558
  DOMTransitionPropsValidators
10558
10559
  );
10560
+ const decorate$1 = (t) => {
10561
+ t.displayName = "Transition";
10562
+ t.props = TransitionPropsValidators;
10563
+ return t;
10564
+ };
10565
+ const Transition = /* @__PURE__ */ decorate$1(
10566
+ (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
10567
+ );
10559
10568
  const callHook = (hook, args = []) => {
10560
10569
  if (isArray(hook)) {
10561
10570
  hook.forEach((h2) => h2(...args));
@@ -11691,7 +11700,11 @@ const positionMap = /* @__PURE__ */ new WeakMap();
11691
11700
  const newPositionMap = /* @__PURE__ */ new WeakMap();
11692
11701
  const moveCbKey = Symbol("_moveCb");
11693
11702
  const enterCbKey = Symbol("_enterCb");
11694
- const TransitionGroupImpl = {
11703
+ const decorate = (t) => {
11704
+ delete t.props.mode;
11705
+ return t;
11706
+ };
11707
+ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11695
11708
  name: "TransitionGroup",
11696
11709
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
11697
11710
  tag: String,
@@ -11777,9 +11790,7 @@ const TransitionGroupImpl = {
11777
11790
  return createVNode(tag, null, children);
11778
11791
  };
11779
11792
  }
11780
- };
11781
- const removeMode = (props) => delete props.mode;
11782
- /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
11793
+ });
11783
11794
  const TransitionGroup = TransitionGroupImpl;
11784
11795
  function callPendingCbs(c) {
11785
11796
  const el = c.el;
@@ -15083,7 +15094,7 @@ function createStructuralDirectiveTransform(name, fn) {
15083
15094
  };
15084
15095
  }
15085
15096
 
15086
- const PURE_ANNOTATION = `/*#__PURE__*/`;
15097
+ const PURE_ANNOTATION = `/*@__PURE__*/`;
15087
15098
  const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
15088
15099
  function createCodegenContext(ast, {
15089
15100
  mode = "function",