@vue/compat 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/compat v3.5.0
2
+ * @vue/compat 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() {
@@ -3829,7 +3829,9 @@ const BaseTransitionImpl = {
3829
3829
  // #11061, ensure enterHooks is fresh after clone
3830
3830
  (hooks) => enterHooks = hooks
3831
3831
  );
3832
- setTransitionHooks(innerChild, enterHooks);
3832
+ if (innerChild.type !== Comment) {
3833
+ setTransitionHooks(innerChild, enterHooks);
3834
+ }
3833
3835
  const oldChild = instance.subTree;
3834
3836
  const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3835
3837
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
@@ -4155,10 +4157,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4155
4157
  const oldRef = oldRawRef && oldRawRef.r;
4156
4158
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
4157
4159
  const setupState = owner.setupState;
4160
+ const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
4158
4161
  if (oldRef != null && oldRef !== ref) {
4159
4162
  if (isString(oldRef)) {
4160
4163
  refs[oldRef] = null;
4161
- if (hasOwn(setupState, oldRef)) {
4164
+ if (canSetSetupRef(oldRef)) {
4162
4165
  setupState[oldRef] = null;
4163
4166
  }
4164
4167
  } else if (isRef(oldRef)) {
@@ -4173,14 +4176,14 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4173
4176
  if (_isString || _isRef) {
4174
4177
  const doSet = () => {
4175
4178
  if (rawRef.f) {
4176
- const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
4179
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
4177
4180
  if (isUnmount) {
4178
4181
  isArray(existing) && remove(existing, refValue);
4179
4182
  } else {
4180
4183
  if (!isArray(existing)) {
4181
4184
  if (_isString) {
4182
4185
  refs[ref] = [refValue];
4183
- if (hasOwn(setupState, ref)) {
4186
+ if (canSetSetupRef(ref)) {
4184
4187
  setupState[ref] = refs[ref];
4185
4188
  }
4186
4189
  } else {
@@ -4193,7 +4196,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4193
4196
  }
4194
4197
  } else if (_isString) {
4195
4198
  refs[ref] = value;
4196
- if (hasOwn(setupState, ref)) {
4199
+ if (canSetSetupRef(ref)) {
4197
4200
  setupState[ref] = value;
4198
4201
  }
4199
4202
  } else if (_isRef) {
@@ -5270,10 +5273,11 @@ const KeepAliveImpl = {
5270
5273
  };
5271
5274
  }
5272
5275
  };
5273
- {
5274
- KeepAliveImpl.__isBuildIn = true;
5275
- }
5276
- const KeepAlive = KeepAliveImpl;
5276
+ const decorate$2 = (t) => {
5277
+ t.__isBuiltIn = true;
5278
+ return t;
5279
+ };
5280
+ const KeepAlive = /* @__PURE__ */ decorate$2(KeepAliveImpl) ;
5277
5281
  function matches(pattern, name) {
5278
5282
  if (isArray(pattern)) {
5279
5283
  return pattern.some((p) => matches(p, name));
@@ -6985,7 +6989,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6985
6989
  return vm;
6986
6990
  }
6987
6991
  }
6988
- Vue.version = `2.6.14-compat:${"3.5.0"}`;
6992
+ Vue.version = `2.6.14-compat:${"3.5.1"}`;
6989
6993
  Vue.config = singletonApp.config;
6990
6994
  Vue.use = (plugin, ...options) => {
6991
6995
  if (plugin && isFunction(plugin.install)) {
@@ -12121,7 +12125,7 @@ function isMemoSame(cached, memo) {
12121
12125
  return true;
12122
12126
  }
12123
12127
 
12124
- const version = "3.5.0";
12128
+ const version = "3.5.1";
12125
12129
  const warn = warn$1 ;
12126
12130
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12127
12131
  const devtools = devtools$1 ;
@@ -12232,11 +12236,6 @@ const nodeOps = {
12232
12236
  const TRANSITION = "transition";
12233
12237
  const ANIMATION = "animation";
12234
12238
  const vtcKey = Symbol("_vtc");
12235
- const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
12236
- Transition.displayName = "Transition";
12237
- {
12238
- Transition.__isBuiltIn = true;
12239
- }
12240
12239
  const DOMTransitionPropsValidators = {
12241
12240
  name: String,
12242
12241
  type: String,
@@ -12255,11 +12254,22 @@ const DOMTransitionPropsValidators = {
12255
12254
  leaveActiveClass: String,
12256
12255
  leaveToClass: String
12257
12256
  };
12258
- const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
12257
+ const TransitionPropsValidators = /* @__PURE__ */ extend(
12259
12258
  {},
12260
12259
  BaseTransitionPropsValidators,
12261
12260
  DOMTransitionPropsValidators
12262
12261
  );
12262
+ const decorate$1 = (t) => {
12263
+ t.displayName = "Transition";
12264
+ t.props = TransitionPropsValidators;
12265
+ {
12266
+ t.__isBuiltIn = true;
12267
+ }
12268
+ return t;
12269
+ };
12270
+ const Transition = /* @__PURE__ */ decorate$1(
12271
+ (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
12272
+ );
12263
12273
  const callHook = (hook, args = []) => {
12264
12274
  if (isArray(hook)) {
12265
12275
  hook.forEach((h2) => h2(...args));
@@ -13473,7 +13483,14 @@ const positionMap = /* @__PURE__ */ new WeakMap();
13473
13483
  const newPositionMap = /* @__PURE__ */ new WeakMap();
13474
13484
  const moveCbKey = Symbol("_moveCb");
13475
13485
  const enterCbKey = Symbol("_enterCb");
13476
- const TransitionGroupImpl = {
13486
+ const decorate = (t) => {
13487
+ delete t.props.mode;
13488
+ {
13489
+ t.__isBuiltIn = true;
13490
+ }
13491
+ return t;
13492
+ };
13493
+ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13477
13494
  name: "TransitionGroup",
13478
13495
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
13479
13496
  tag: String,
@@ -13565,12 +13582,7 @@ const TransitionGroupImpl = {
13565
13582
  return createVNode(tag, null, children);
13566
13583
  };
13567
13584
  }
13568
- };
13569
- {
13570
- TransitionGroupImpl.__isBuiltIn = true;
13571
- }
13572
- const removeMode = (props) => delete props.mode;
13573
- /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
13585
+ });
13574
13586
  const TransitionGroup = TransitionGroupImpl;
13575
13587
  function callPendingCbs(c) {
13576
13588
  const el = c.el;