@vue/compat 3.4.23 → 3.4.25

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.4.23
2
+ * @vue/compat v3.4.25
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
  // @__NO_SIDE_EFFECTS__
8
8
  function makeMap(str, expectsLowerCase) {
9
9
  const set = new Set(str.split(","));
10
- return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
10
+ return (val) => set.has(val);
11
11
  }
12
12
 
13
13
  const EMPTY_OBJ = Object.freeze({}) ;
@@ -2470,11 +2470,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2470
2470
  warnedInvalidKeys[key] = true;
2471
2471
  }
2472
2472
  }
2473
- if (instance && config["OPTIONS_DATA_MERGE"] != null) {
2474
- warn$1(
2475
- `Deprecation config "${"OPTIONS_DATA_MERGE"}" can only be configured globally.`
2476
- );
2477
- }
2478
2473
  }
2479
2474
  function getCompatConfigForKey(key, instance) {
2480
2475
  const instanceConfig = instance && instance.type.compatConfig;
@@ -2857,21 +2852,21 @@ function renderComponentRoot(instance) {
2857
2852
  vnode,
2858
2853
  proxy,
2859
2854
  withProxy,
2860
- props,
2861
2855
  propsOptions: [propsOptions],
2862
2856
  slots,
2863
2857
  attrs,
2864
2858
  emit,
2865
2859
  render,
2866
2860
  renderCache,
2861
+ props,
2867
2862
  data,
2868
2863
  setupState,
2869
2864
  ctx,
2870
2865
  inheritAttrs
2871
2866
  } = instance;
2867
+ const prev = setCurrentRenderingInstance(instance);
2872
2868
  let result;
2873
2869
  let fallthroughAttrs;
2874
- const prev = setCurrentRenderingInstance(instance);
2875
2870
  {
2876
2871
  accessedAttrs = false;
2877
2872
  }
@@ -2893,7 +2888,7 @@ function renderComponentRoot(instance) {
2893
2888
  thisProxy,
2894
2889
  proxyToUse,
2895
2890
  renderCache,
2896
- props,
2891
+ true ? shallowReadonly(props) : props,
2897
2892
  setupState,
2898
2893
  data,
2899
2894
  ctx
@@ -2907,7 +2902,7 @@ function renderComponentRoot(instance) {
2907
2902
  }
2908
2903
  result = normalizeVNode(
2909
2904
  render2.length > 1 ? render2(
2910
- props,
2905
+ true ? shallowReadonly(props) : props,
2911
2906
  true ? {
2912
2907
  get attrs() {
2913
2908
  markAttrsAccessed();
@@ -2917,9 +2912,8 @@ function renderComponentRoot(instance) {
2917
2912
  emit
2918
2913
  } : { attrs, slots, emit }
2919
2914
  ) : render2(
2920
- props,
2915
+ true ? shallowReadonly(props) : props,
2921
2916
  null
2922
- /* we know it doesn't need it */
2923
2917
  )
2924
2918
  );
2925
2919
  fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
@@ -4460,11 +4454,21 @@ function emptyPlaceholder(vnode) {
4460
4454
  }
4461
4455
  }
4462
4456
  function getKeepAliveChild(vnode) {
4463
- return isKeepAlive(vnode) ? (
4464
- // #7121 ensure get the child component subtree in case
4465
- // it's been replaced during HMR
4466
- vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
4467
- ) : vnode;
4457
+ if (!isKeepAlive(vnode)) {
4458
+ return vnode;
4459
+ }
4460
+ if (vnode.component) {
4461
+ return vnode.component.subTree;
4462
+ }
4463
+ const { shapeFlag, children } = vnode;
4464
+ if (children) {
4465
+ if (shapeFlag & 16) {
4466
+ return children[0];
4467
+ }
4468
+ if (shapeFlag & 32 && isFunction(children.default)) {
4469
+ return children.default();
4470
+ }
4471
+ }
4468
4472
  }
4469
4473
  function setTransitionHooks(vnode, hooks) {
4470
4474
  if (vnode.shapeFlag & 6 && vnode.component) {
@@ -6476,7 +6480,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6476
6480
  return vm;
6477
6481
  }
6478
6482
  }
6479
- Vue.version = `2.6.14-compat:${"3.4.23"}`;
6483
+ Vue.version = `2.6.14-compat:${"3.4.25"}`;
6480
6484
  Vue.config = singletonApp.config;
6481
6485
  Vue.use = (p, ...options) => {
6482
6486
  if (p && isFunction(p.install)) {
@@ -7113,7 +7117,7 @@ function shouldSkipAttr(key, instance) {
7113
7117
  return false;
7114
7118
  }
7115
7119
 
7116
- const internalObjectProto = /* @__PURE__ */ Object.create(null);
7120
+ const internalObjectProto = {};
7117
7121
  const createInternalObject = () => Object.create(internalObjectProto);
7118
7122
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
7119
7123
 
@@ -7595,23 +7599,17 @@ const normalizeVNodeSlots = (instance, children) => {
7595
7599
  instance.slots.default = () => normalized;
7596
7600
  };
7597
7601
  const initSlots = (instance, children) => {
7602
+ const slots = instance.slots = createInternalObject();
7598
7603
  if (instance.vnode.shapeFlag & 32) {
7599
7604
  const type = children._;
7600
7605
  if (type) {
7601
- instance.slots = toRaw(children);
7602
- def(instance.slots, "_", type);
7606
+ extend(slots, children);
7607
+ def(slots, "_", type);
7603
7608
  } else {
7604
- normalizeObjectSlots(
7605
- children,
7606
- instance.slots = createInternalObject(),
7607
- instance
7608
- );
7609
- }
7610
- } else {
7611
- instance.slots = createInternalObject();
7612
- if (children) {
7613
- normalizeVNodeSlots(instance, children);
7609
+ normalizeObjectSlots(children, slots, instance);
7614
7610
  }
7611
+ } else if (children) {
7612
+ normalizeVNodeSlots(instance, children);
7615
7613
  }
7616
7614
  };
7617
7615
  const updateSlots = (instance, children, optimized) => {
@@ -11312,7 +11310,7 @@ function isMemoSame(cached, memo) {
11312
11310
  return true;
11313
11311
  }
11314
11312
 
11315
- const version = "3.4.23";
11313
+ const version = "3.4.25";
11316
11314
  const warn = warn$1 ;
11317
11315
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11318
11316
  const devtools = devtools$1 ;
@@ -11549,8 +11547,8 @@ function resolveTransitionProps(rawProps) {
11549
11547
  if (legacyClassEnabled && legacyLeaveFromClass) {
11550
11548
  addTransitionClass(el, legacyLeaveFromClass);
11551
11549
  }
11552
- forceReflow();
11553
11550
  addTransitionClass(el, leaveActiveClass);
11551
+ forceReflow();
11554
11552
  nextFrame(() => {
11555
11553
  if (!el._isLeaving) {
11556
11554
  return;
@@ -13238,8 +13236,7 @@ Vue.compile = () => {
13238
13236
  );
13239
13237
  }
13240
13238
  };
13241
- var Vue$1 = Vue;
13242
13239
 
13243
- const { configureCompat } = Vue$1;
13240
+ const { configureCompat } = Vue;
13244
13241
 
13245
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue$1 as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
13242
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };