@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
  **/
@@ -979,7 +979,7 @@ const arrayInstrumentations = {
979
979
  },
980
980
  concat(...args) {
981
981
  return reactiveReadArray(this).concat(
982
- ...args.map((x) => reactiveReadArray(x))
982
+ ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
983
983
  );
984
984
  },
985
985
  entries() {
@@ -3847,7 +3847,9 @@ const BaseTransitionImpl = {
3847
3847
  // #11061, ensure enterHooks is fresh after clone
3848
3848
  (hooks) => enterHooks = hooks
3849
3849
  );
3850
- setTransitionHooks(innerChild, enterHooks);
3850
+ if (innerChild.type !== Comment) {
3851
+ setTransitionHooks(innerChild, enterHooks);
3852
+ }
3851
3853
  const oldChild = instance.subTree;
3852
3854
  const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3853
3855
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
@@ -4174,10 +4176,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4174
4176
  const oldRef = oldRawRef && oldRawRef.r;
4175
4177
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
4176
4178
  const setupState = owner.setupState;
4179
+ const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
4177
4180
  if (oldRef != null && oldRef !== ref) {
4178
4181
  if (isString(oldRef)) {
4179
4182
  refs[oldRef] = null;
4180
- if (hasOwn(setupState, oldRef)) {
4183
+ if (canSetSetupRef(oldRef)) {
4181
4184
  setupState[oldRef] = null;
4182
4185
  }
4183
4186
  } else if (isRef(oldRef)) {
@@ -4192,14 +4195,14 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4192
4195
  if (_isString || _isRef) {
4193
4196
  const doSet = () => {
4194
4197
  if (rawRef.f) {
4195
- const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
4198
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
4196
4199
  if (isUnmount) {
4197
4200
  isArray(existing) && remove(existing, refValue);
4198
4201
  } else {
4199
4202
  if (!isArray(existing)) {
4200
4203
  if (_isString) {
4201
4204
  refs[ref] = [refValue];
4202
- if (hasOwn(setupState, ref)) {
4205
+ if (canSetSetupRef(ref)) {
4203
4206
  setupState[ref] = refs[ref];
4204
4207
  }
4205
4208
  } else {
@@ -4212,7 +4215,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4212
4215
  }
4213
4216
  } else if (_isString) {
4214
4217
  refs[ref] = value;
4215
- if (hasOwn(setupState, ref)) {
4218
+ if (canSetSetupRef(ref)) {
4216
4219
  setupState[ref] = value;
4217
4220
  }
4218
4221
  } else if (_isRef) {
@@ -5300,10 +5303,11 @@ const KeepAliveImpl = {
5300
5303
  };
5301
5304
  }
5302
5305
  };
5303
- {
5304
- KeepAliveImpl.__isBuildIn = true;
5305
- }
5306
- const KeepAlive = KeepAliveImpl;
5306
+ const decorate$2 = (t) => {
5307
+ t.__isBuiltIn = true;
5308
+ return t;
5309
+ };
5310
+ const KeepAlive = /* @__PURE__ */ decorate$2(KeepAliveImpl) ;
5307
5311
  function matches(pattern, name) {
5308
5312
  if (isArray(pattern)) {
5309
5313
  return pattern.some((p) => matches(p, name));
@@ -7017,7 +7021,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7017
7021
  return vm;
7018
7022
  }
7019
7023
  }
7020
- Vue.version = `2.6.14-compat:${"3.5.0"}`;
7024
+ Vue.version = `2.6.14-compat:${"3.5.1"}`;
7021
7025
  Vue.config = singletonApp.config;
7022
7026
  Vue.use = (plugin, ...options) => {
7023
7027
  if (plugin && isFunction(plugin.install)) {
@@ -12207,7 +12211,7 @@ function isMemoSame(cached, memo) {
12207
12211
  return true;
12208
12212
  }
12209
12213
 
12210
- const version = "3.5.0";
12214
+ const version = "3.5.1";
12211
12215
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12212
12216
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12213
12217
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -12318,11 +12322,6 @@ const nodeOps = {
12318
12322
  const TRANSITION = "transition";
12319
12323
  const ANIMATION = "animation";
12320
12324
  const vtcKey = Symbol("_vtc");
12321
- const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
12322
- Transition.displayName = "Transition";
12323
- {
12324
- Transition.__isBuiltIn = true;
12325
- }
12326
12325
  const DOMTransitionPropsValidators = {
12327
12326
  name: String,
12328
12327
  type: String,
@@ -12341,11 +12340,22 @@ const DOMTransitionPropsValidators = {
12341
12340
  leaveActiveClass: String,
12342
12341
  leaveToClass: String
12343
12342
  };
12344
- const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
12343
+ const TransitionPropsValidators = /* @__PURE__ */ extend(
12345
12344
  {},
12346
12345
  BaseTransitionPropsValidators,
12347
12346
  DOMTransitionPropsValidators
12348
12347
  );
12348
+ const decorate$1 = (t) => {
12349
+ t.displayName = "Transition";
12350
+ t.props = TransitionPropsValidators;
12351
+ {
12352
+ t.__isBuiltIn = true;
12353
+ }
12354
+ return t;
12355
+ };
12356
+ const Transition = /* @__PURE__ */ decorate$1(
12357
+ (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
12358
+ );
12349
12359
  const callHook = (hook, args = []) => {
12350
12360
  if (isArray(hook)) {
12351
12361
  hook.forEach((h2) => h2(...args));
@@ -13559,7 +13569,14 @@ const positionMap = /* @__PURE__ */ new WeakMap();
13559
13569
  const newPositionMap = /* @__PURE__ */ new WeakMap();
13560
13570
  const moveCbKey = Symbol("_moveCb");
13561
13571
  const enterCbKey = Symbol("_enterCb");
13562
- const TransitionGroupImpl = {
13572
+ const decorate = (t) => {
13573
+ delete t.props.mode;
13574
+ {
13575
+ t.__isBuiltIn = true;
13576
+ }
13577
+ return t;
13578
+ };
13579
+ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13563
13580
  name: "TransitionGroup",
13564
13581
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
13565
13582
  tag: String,
@@ -13651,12 +13668,7 @@ const TransitionGroupImpl = {
13651
13668
  return createVNode(tag, null, children);
13652
13669
  };
13653
13670
  }
13654
- };
13655
- {
13656
- TransitionGroupImpl.__isBuiltIn = true;
13657
- }
13658
- const removeMode = (props) => delete props.mode;
13659
- /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
13671
+ });
13660
13672
  const TransitionGroup = TransitionGroupImpl;
13661
13673
  function callPendingCbs(c) {
13662
13674
  const el = c.el;
@@ -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
  **/
@@ -978,7 +978,7 @@ var Vue = (function () {
978
978
  },
979
979
  concat(...args) {
980
980
  return reactiveReadArray(this).concat(
981
- ...args.map((x) => reactiveReadArray(x))
981
+ ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
982
982
  );
983
983
  },
984
984
  entries() {
@@ -3832,7 +3832,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3832
3832
  // #11061, ensure enterHooks is fresh after clone
3833
3833
  (hooks) => enterHooks = hooks
3834
3834
  );
3835
- setTransitionHooks(innerChild, enterHooks);
3835
+ if (innerChild.type !== Comment) {
3836
+ setTransitionHooks(innerChild, enterHooks);
3837
+ }
3836
3838
  const oldChild = instance.subTree;
3837
3839
  const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3838
3840
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
@@ -4158,10 +4160,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4158
4160
  const oldRef = oldRawRef && oldRawRef.r;
4159
4161
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
4160
4162
  const setupState = owner.setupState;
4163
+ const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
4161
4164
  if (oldRef != null && oldRef !== ref) {
4162
4165
  if (isString(oldRef)) {
4163
4166
  refs[oldRef] = null;
4164
- if (hasOwn(setupState, oldRef)) {
4167
+ if (canSetSetupRef(oldRef)) {
4165
4168
  setupState[oldRef] = null;
4166
4169
  }
4167
4170
  } else if (isRef(oldRef)) {
@@ -4176,14 +4179,14 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4176
4179
  if (_isString || _isRef) {
4177
4180
  const doSet = () => {
4178
4181
  if (rawRef.f) {
4179
- const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
4182
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
4180
4183
  if (isUnmount) {
4181
4184
  isArray(existing) && remove(existing, refValue);
4182
4185
  } else {
4183
4186
  if (!isArray(existing)) {
4184
4187
  if (_isString) {
4185
4188
  refs[ref] = [refValue];
4186
- if (hasOwn(setupState, ref)) {
4189
+ if (canSetSetupRef(ref)) {
4187
4190
  setupState[ref] = refs[ref];
4188
4191
  }
4189
4192
  } else {
@@ -4196,7 +4199,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4196
4199
  }
4197
4200
  } else if (_isString) {
4198
4201
  refs[ref] = value;
4199
- if (hasOwn(setupState, ref)) {
4202
+ if (canSetSetupRef(ref)) {
4200
4203
  setupState[ref] = value;
4201
4204
  }
4202
4205
  } else if (_isRef) {
@@ -5267,10 +5270,11 @@ Server rendered element contains fewer child nodes than client vdom.`
5267
5270
  };
5268
5271
  }
5269
5272
  };
5270
- {
5271
- KeepAliveImpl.__isBuildIn = true;
5272
- }
5273
- const KeepAlive = KeepAliveImpl;
5273
+ const decorate$2 = (t) => {
5274
+ t.__isBuiltIn = true;
5275
+ return t;
5276
+ };
5277
+ const KeepAlive = /* @__PURE__ */ decorate$2(KeepAliveImpl) ;
5274
5278
  function matches(pattern, name) {
5275
5279
  if (isArray(pattern)) {
5276
5280
  return pattern.some((p) => matches(p, name));
@@ -6979,7 +6983,7 @@ If this is a native custom element, make sure to exclude it from component resol
6979
6983
  return vm;
6980
6984
  }
6981
6985
  }
6982
- Vue.version = `2.6.14-compat:${"3.5.0"}`;
6986
+ Vue.version = `2.6.14-compat:${"3.5.1"}`;
6983
6987
  Vue.config = singletonApp.config;
6984
6988
  Vue.use = (plugin, ...options) => {
6985
6989
  if (plugin && isFunction(plugin.install)) {
@@ -12079,7 +12083,7 @@ Component that was made reactive: `,
12079
12083
  return true;
12080
12084
  }
12081
12085
 
12082
- const version = "3.5.0";
12086
+ const version = "3.5.1";
12083
12087
  const warn = warn$1 ;
12084
12088
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12085
12089
  const devtools = devtools$1 ;
@@ -12180,11 +12184,6 @@ Component that was made reactive: `,
12180
12184
  const TRANSITION = "transition";
12181
12185
  const ANIMATION = "animation";
12182
12186
  const vtcKey = Symbol("_vtc");
12183
- const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
12184
- Transition.displayName = "Transition";
12185
- {
12186
- Transition.__isBuiltIn = true;
12187
- }
12188
12187
  const DOMTransitionPropsValidators = {
12189
12188
  name: String,
12190
12189
  type: String,
@@ -12203,11 +12202,22 @@ Component that was made reactive: `,
12203
12202
  leaveActiveClass: String,
12204
12203
  leaveToClass: String
12205
12204
  };
12206
- const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
12205
+ const TransitionPropsValidators = /* @__PURE__ */ extend(
12207
12206
  {},
12208
12207
  BaseTransitionPropsValidators,
12209
12208
  DOMTransitionPropsValidators
12210
12209
  );
12210
+ const decorate$1 = (t) => {
12211
+ t.displayName = "Transition";
12212
+ t.props = TransitionPropsValidators;
12213
+ {
12214
+ t.__isBuiltIn = true;
12215
+ }
12216
+ return t;
12217
+ };
12218
+ const Transition = /* @__PURE__ */ decorate$1(
12219
+ (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
12220
+ );
12211
12221
  const callHook = (hook, args = []) => {
12212
12222
  if (isArray(hook)) {
12213
12223
  hook.forEach((h2) => h2(...args));
@@ -13402,7 +13412,14 @@ Expected function or array of functions, received type ${typeof value}.`
13402
13412
  const newPositionMap = /* @__PURE__ */ new WeakMap();
13403
13413
  const moveCbKey = Symbol("_moveCb");
13404
13414
  const enterCbKey = Symbol("_enterCb");
13405
- const TransitionGroupImpl = {
13415
+ const decorate = (t) => {
13416
+ delete t.props.mode;
13417
+ {
13418
+ t.__isBuiltIn = true;
13419
+ }
13420
+ return t;
13421
+ };
13422
+ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13406
13423
  name: "TransitionGroup",
13407
13424
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
13408
13425
  tag: String,
@@ -13494,12 +13511,7 @@ Expected function or array of functions, received type ${typeof value}.`
13494
13511
  return createVNode(tag, null, children);
13495
13512
  };
13496
13513
  }
13497
- };
13498
- {
13499
- TransitionGroupImpl.__isBuiltIn = true;
13500
- }
13501
- const removeMode = (props) => delete props.mode;
13502
- /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
13514
+ });
13503
13515
  const TransitionGroup = TransitionGroupImpl;
13504
13516
  function callPendingCbs(c) {
13505
13517
  const el = c.el;