@cabloy/vue-runtime-core 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
- * @cabloy/vue-runtime-core v3.4.21
2
+ * @cabloy/vue-runtime-core v3.4.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -207,11 +207,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
207
207
  }
208
208
  return res;
209
209
  }
210
- const values = [];
211
- for (let i = 0; i < fn.length; i++) {
212
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
210
+ if (shared.isArray(fn)) {
211
+ const values = [];
212
+ for (let i = 0; i < fn.length; i++) {
213
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
214
+ }
215
+ return values;
216
+ } else {
217
+ warn$1(
218
+ `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
219
+ );
213
220
  }
214
- return values;
215
221
  }
216
222
  function handleError(err, instance, type, throwInDev = true) {
217
223
  const contextVNode = instance ? instance.vnode : null;
@@ -2396,11 +2402,19 @@ function emptyPlaceholder(vnode) {
2396
2402
  }
2397
2403
  }
2398
2404
  function getKeepAliveChild(vnode) {
2399
- return isKeepAlive(vnode) ? (
2400
- // #7121 ensure get the child component subtree in case
2401
- // it's been replaced during HMR
2402
- vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
2403
- ) : vnode;
2405
+ if (!isKeepAlive(vnode)) {
2406
+ return vnode;
2407
+ }
2408
+ if (vnode.component) {
2409
+ return vnode.component.subTree;
2410
+ }
2411
+ const { shapeFlag, children } = vnode;
2412
+ if (shapeFlag & 16) {
2413
+ return children[0];
2414
+ }
2415
+ if (shapeFlag & 32 && shared.isFunction(children.default)) {
2416
+ return children.default();
2417
+ }
2404
2418
  }
2405
2419
  function setTransitionHooks(vnode, hooks) {
2406
2420
  if (vnode.shapeFlag & 6 && vnode.component) {
@@ -2722,7 +2736,7 @@ const KeepAliveImpl = {
2722
2736
  return () => {
2723
2737
  pendingCacheKey = null;
2724
2738
  if (!slots.default) {
2725
- return null;
2739
+ return current = null;
2726
2740
  }
2727
2741
  const children = slots.default();
2728
2742
  const rawVNode = children[0];
@@ -3035,6 +3049,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
3035
3049
  const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
3036
3050
  const PublicInstanceProxyHandlers = {
3037
3051
  get({ _: instance }, key) {
3052
+ if (key === "__v_skip") {
3053
+ return true;
3054
+ }
3038
3055
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
3039
3056
  if (key === "__isVue") {
3040
3057
  return true;
@@ -3077,7 +3094,7 @@ const PublicInstanceProxyHandlers = {
3077
3094
  let cssModule, globalProperties;
3078
3095
  if (publicGetter) {
3079
3096
  if (key === "$attrs") {
3080
- reactivity.track(instance, "get", key);
3097
+ reactivity.track(instance.attrs, "get", "");
3081
3098
  markAttrsAccessed();
3082
3099
  } else if (key === "$slots") {
3083
3100
  reactivity.track(instance, "get", key);
@@ -4002,10 +4019,13 @@ function hasInjectionContext() {
4002
4019
  return !!(currentInstance || currentRenderingInstance || currentApp);
4003
4020
  }
4004
4021
 
4022
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
4023
+ const createInternalObject = () => Object.create(internalObjectProto);
4024
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
4025
+
4005
4026
  function initProps(instance, rawProps, isStateful, isSSR = false) {
4006
4027
  const props = {};
4007
- const attrs = {};
4008
- shared.def(attrs, InternalObjectKey, 1);
4028
+ const attrs = createInternalObject();
4009
4029
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4010
4030
  setFullProps(instance, rawProps, props, attrs);
4011
4031
  for (const key in instance.propsOptions[0]) {
@@ -4120,7 +4140,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4120
4140
  }
4121
4141
  }
4122
4142
  if (hasAttrsChanged) {
4123
- reactivity.trigger(instance, "set", "$attrs");
4143
+ reactivity.trigger(instance.attrs, "set", "");
4124
4144
  }
4125
4145
  {
4126
4146
  validateProps(rawProps || {}, props, instance);
@@ -4452,23 +4472,18 @@ const normalizeVNodeSlots = (instance, children) => {
4452
4472
  instance.slots.default = () => normalized;
4453
4473
  };
4454
4474
  const initSlots = (instance, children) => {
4475
+ const slots = instance.slots = createInternalObject();
4455
4476
  if (instance.vnode.shapeFlag & 32) {
4456
4477
  const type = children._;
4457
4478
  if (type) {
4458
- instance.slots = reactivity.toRaw(children);
4459
- shared.def(children, "_", type);
4479
+ shared.extend(slots, children);
4480
+ shared.def(slots, "_", type);
4460
4481
  } else {
4461
- normalizeObjectSlots(
4462
- children,
4463
- instance.slots = {});
4464
- }
4465
- } else {
4466
- instance.slots = {};
4467
- if (children) {
4468
- normalizeVNodeSlots(instance, children);
4482
+ normalizeObjectSlots(children, slots);
4469
4483
  }
4484
+ } else if (children) {
4485
+ normalizeVNodeSlots(instance, children);
4470
4486
  }
4471
- shared.def(instance.slots, InternalObjectKey, 1);
4472
4487
  };
4473
4488
  const updateSlots = (instance, children, optimized) => {
4474
4489
  const { vnode, slots } = instance;
@@ -4640,6 +4655,7 @@ function createHydrationFunctions(rendererInternals) {
4640
4655
  }
4641
4656
  };
4642
4657
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4658
+ optimized = optimized || !!vnode.dynamicChildren;
4643
4659
  const isFragmentStart = isComment(node) && node.data === "[";
4644
4660
  const onMismatch = () => handleMismatch(
4645
4661
  node,
@@ -7074,7 +7090,6 @@ const createVNodeWithArgsTransform = (...args) => {
7074
7090
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
7075
7091
  );
7076
7092
  };
7077
- const InternalObjectKey = `__vInternal`;
7078
7093
  const normalizeKey = ({ key }) => key != null ? key : null;
7079
7094
  const normalizeRef = ({
7080
7095
  ref,
@@ -7207,7 +7222,7 @@ Component that was made reactive: `,
7207
7222
  function guardReactiveProps(props) {
7208
7223
  if (!props)
7209
7224
  return null;
7210
- return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props;
7225
+ return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
7211
7226
  }
7212
7227
  function cloneVNode(vnode, extraProps, mergeRef = false) {
7213
7228
  const { props, ref, patchFlag, children } = vnode;
@@ -7312,7 +7327,7 @@ function normalizeChildren(vnode, children) {
7312
7327
  } else {
7313
7328
  type = 32;
7314
7329
  const slotFlag = children._;
7315
- if (!slotFlag && !(InternalObjectKey in children)) {
7330
+ if (!slotFlag && !isInternalObject(children)) {
7316
7331
  children._ctx = currentRenderingInstance;
7317
7332
  } else if (slotFlag === 3 && currentRenderingInstance) {
7318
7333
  if (currentRenderingInstance.slots._ === 1) {
@@ -7548,7 +7563,7 @@ function setupStatefulComponent(instance, isSSR) {
7548
7563
  }
7549
7564
  }
7550
7565
  instance.accessCache = /* @__PURE__ */ Object.create(null);
7551
- instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
7566
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
7552
7567
  {
7553
7568
  exposePropsOnRenderContext(instance);
7554
7569
  }
@@ -7682,26 +7697,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7682
7697
  }
7683
7698
  }
7684
7699
  }
7685
- function getAttrsProxy(instance) {
7686
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
7687
- instance.attrs,
7688
- {
7689
- get(target, key) {
7690
- markAttrsAccessed();
7691
- reactivity.track(instance, "get", "$attrs");
7692
- return target[key];
7693
- },
7694
- set() {
7695
- warn$1(`setupContext.attrs is readonly.`);
7696
- return false;
7697
- },
7698
- deleteProperty() {
7699
- warn$1(`setupContext.attrs is readonly.`);
7700
- return false;
7701
- }
7702
- }
7703
- ));
7704
- }
7700
+ const attrsProxyHandlers = {
7701
+ get(target, key) {
7702
+ markAttrsAccessed();
7703
+ reactivity.track(target, "get", "");
7704
+ return target[key];
7705
+ },
7706
+ set() {
7707
+ warn$1(`setupContext.attrs is readonly.`);
7708
+ return false;
7709
+ },
7710
+ deleteProperty() {
7711
+ warn$1(`setupContext.attrs is readonly.`);
7712
+ return false;
7713
+ }
7714
+ } ;
7705
7715
  function getSlotsProxy(instance) {
7706
7716
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
7707
7717
  get(target, key) {
@@ -7735,9 +7745,10 @@ function createSetupContext(instance) {
7735
7745
  instance.exposed = exposed || {};
7736
7746
  };
7737
7747
  {
7748
+ let attrsProxy;
7738
7749
  return Object.freeze({
7739
7750
  get attrs() {
7740
- return getAttrsProxy(instance);
7751
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
7741
7752
  },
7742
7753
  get slots() {
7743
7754
  return getSlotsProxy(instance);
@@ -8082,7 +8093,7 @@ function isMemoSame(cached, memo) {
8082
8093
  return true;
8083
8094
  }
8084
8095
 
8085
- const version = "3.4.21";
8096
+ const version = "3.4.23";
8086
8097
  const warn = warn$1 ;
8087
8098
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8088
8099
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @cabloy/vue-runtime-core v3.4.21
2
+ * @cabloy/vue-runtime-core v3.4.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -94,11 +94,13 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
94
94
  }
95
95
  return res;
96
96
  }
97
- const values = [];
98
- for (let i = 0; i < fn.length; i++) {
99
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
97
+ if (shared.isArray(fn)) {
98
+ const values = [];
99
+ for (let i = 0; i < fn.length; i++) {
100
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
101
+ }
102
+ return values;
100
103
  }
101
- return values;
102
104
  }
103
105
  function handleError(err, instance, type, throwInDev = true) {
104
106
  const contextVNode = instance ? instance.vnode : null;
@@ -1790,11 +1792,16 @@ function emptyPlaceholder(vnode) {
1790
1792
  }
1791
1793
  }
1792
1794
  function getKeepAliveChild(vnode) {
1793
- return isKeepAlive(vnode) ? (
1794
- // #7121 ensure get the child component subtree in case
1795
- // it's been replaced during HMR
1796
- vnode.children ? vnode.children[0] : void 0
1797
- ) : vnode;
1795
+ if (!isKeepAlive(vnode)) {
1796
+ return vnode;
1797
+ }
1798
+ const { shapeFlag, children } = vnode;
1799
+ if (shapeFlag & 16) {
1800
+ return children[0];
1801
+ }
1802
+ if (shapeFlag & 32 && shared.isFunction(children.default)) {
1803
+ return children.default();
1804
+ }
1798
1805
  }
1799
1806
  function setTransitionHooks(vnode, hooks) {
1800
1807
  if (vnode.shapeFlag & 6 && vnode.component) {
@@ -2099,7 +2106,7 @@ const KeepAliveImpl = {
2099
2106
  return () => {
2100
2107
  pendingCacheKey = null;
2101
2108
  if (!slots.default) {
2102
- return null;
2109
+ return current = null;
2103
2110
  }
2104
2111
  const children = slots.default();
2105
2112
  const rawVNode = children[0];
@@ -2390,6 +2397,9 @@ const publicPropertiesMap = (
2390
2397
  const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
2391
2398
  const PublicInstanceProxyHandlers = {
2392
2399
  get({ _: instance }, key) {
2400
+ if (key === "__v_skip") {
2401
+ return true;
2402
+ }
2393
2403
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
2394
2404
  let normalizedProps;
2395
2405
  if (key[0] !== "$") {
@@ -2429,7 +2439,7 @@ const PublicInstanceProxyHandlers = {
2429
2439
  let cssModule, globalProperties;
2430
2440
  if (publicGetter) {
2431
2441
  if (key === "$attrs") {
2432
- reactivity.track(instance, "get", key);
2442
+ reactivity.track(instance.attrs, "get", "");
2433
2443
  }
2434
2444
  return publicGetter(instance);
2435
2445
  } else if (
@@ -3070,10 +3080,13 @@ function hasInjectionContext() {
3070
3080
  return !!(currentInstance || currentRenderingInstance || currentApp);
3071
3081
  }
3072
3082
 
3083
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
3084
+ const createInternalObject = () => Object.create(internalObjectProto);
3085
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
3086
+
3073
3087
  function initProps(instance, rawProps, isStateful, isSSR = false) {
3074
3088
  const props = {};
3075
- const attrs = {};
3076
- shared.def(attrs, InternalObjectKey, 1);
3089
+ const attrs = createInternalObject();
3077
3090
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
3078
3091
  setFullProps(instance, rawProps, props, attrs);
3079
3092
  for (const key in instance.propsOptions[0]) {
@@ -3178,7 +3191,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3178
3191
  }
3179
3192
  }
3180
3193
  if (hasAttrsChanged) {
3181
- reactivity.trigger(instance, "set", "$attrs");
3194
+ reactivity.trigger(instance.attrs, "set", "");
3182
3195
  }
3183
3196
  }
3184
3197
  function setFullProps(instance, rawProps, props, attrs) {
@@ -3382,23 +3395,18 @@ const normalizeVNodeSlots = (instance, children) => {
3382
3395
  instance.slots.default = () => normalized;
3383
3396
  };
3384
3397
  const initSlots = (instance, children) => {
3398
+ const slots = instance.slots = createInternalObject();
3385
3399
  if (instance.vnode.shapeFlag & 32) {
3386
3400
  const type = children._;
3387
3401
  if (type) {
3388
- instance.slots = reactivity.toRaw(children);
3389
- shared.def(children, "_", type);
3402
+ shared.extend(slots, children);
3403
+ shared.def(slots, "_", type);
3390
3404
  } else {
3391
- normalizeObjectSlots(
3392
- children,
3393
- instance.slots = {});
3394
- }
3395
- } else {
3396
- instance.slots = {};
3397
- if (children) {
3398
- normalizeVNodeSlots(instance, children);
3405
+ normalizeObjectSlots(children, slots);
3399
3406
  }
3407
+ } else if (children) {
3408
+ normalizeVNodeSlots(instance, children);
3400
3409
  }
3401
- shared.def(instance.slots, InternalObjectKey, 1);
3402
3410
  };
3403
3411
  const updateSlots = (instance, children, optimized) => {
3404
3412
  const { vnode, slots } = instance;
@@ -3554,6 +3562,7 @@ function createHydrationFunctions(rendererInternals) {
3554
3562
  }
3555
3563
  };
3556
3564
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
3565
+ optimized = optimized || !!vnode.dynamicChildren;
3557
3566
  const isFragmentStart = isComment(node) && node.data === "[";
3558
3567
  const onMismatch = () => handleMismatch(
3559
3568
  node,
@@ -5611,7 +5620,6 @@ function isSameVNodeType(n1, n2) {
5611
5620
  }
5612
5621
  function transformVNodeArgs(transformer) {
5613
5622
  }
5614
- const InternalObjectKey = `__vInternal`;
5615
5623
  const normalizeKey = ({ key }) => key != null ? key : null;
5616
5624
  const normalizeRef = ({
5617
5625
  ref,
@@ -5729,7 +5737,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
5729
5737
  function guardReactiveProps(props) {
5730
5738
  if (!props)
5731
5739
  return null;
5732
- return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props;
5740
+ return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
5733
5741
  }
5734
5742
  function cloneVNode(vnode, extraProps, mergeRef = false) {
5735
5743
  const { props, ref, patchFlag, children } = vnode;
@@ -5827,7 +5835,7 @@ function normalizeChildren(vnode, children) {
5827
5835
  } else {
5828
5836
  type = 32;
5829
5837
  const slotFlag = children._;
5830
- if (!slotFlag && !(InternalObjectKey in children)) {
5838
+ if (!slotFlag && !isInternalObject(children)) {
5831
5839
  children._ctx = currentRenderingInstance;
5832
5840
  } else if (slotFlag === 3 && currentRenderingInstance) {
5833
5841
  if (currentRenderingInstance.slots._ === 1) {
@@ -6032,7 +6040,7 @@ function setupComponent(instance, isSSR = false) {
6032
6040
  function setupStatefulComponent(instance, isSSR) {
6033
6041
  const Component = instance.type;
6034
6042
  instance.accessCache = /* @__PURE__ */ Object.create(null);
6035
- instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
6043
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
6036
6044
  const { setup } = Component;
6037
6045
  if (setup) {
6038
6046
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
@@ -6127,26 +6135,19 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
6127
6135
  }
6128
6136
  }
6129
6137
  }
6130
- function getAttrsProxy(instance) {
6131
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
6132
- instance.attrs,
6133
- {
6134
- get(target, key) {
6135
- reactivity.track(instance, "get", "$attrs");
6136
- return target[key];
6137
- }
6138
- }
6139
- ));
6140
- }
6138
+ const attrsProxyHandlers = {
6139
+ get(target, key) {
6140
+ reactivity.track(target, "get", "");
6141
+ return target[key];
6142
+ }
6143
+ };
6141
6144
  function createSetupContext(instance) {
6142
6145
  const expose = (exposed) => {
6143
6146
  instance.exposed = exposed || {};
6144
6147
  };
6145
6148
  {
6146
6149
  return {
6147
- get attrs() {
6148
- return getAttrsProxy(instance);
6149
- },
6150
+ attrs: new Proxy(instance.attrs, attrsProxyHandlers),
6150
6151
  slots: instance.slots,
6151
6152
  emit: instance.emit,
6152
6153
  expose
@@ -6278,7 +6279,7 @@ function isMemoSame(cached, memo) {
6278
6279
  return true;
6279
6280
  }
6280
6281
 
6281
- const version = "3.4.21";
6282
+ const version = "3.4.23";
6282
6283
  const warn$1 = shared.NOOP;
6283
6284
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6284
6285
  const devtools = void 0;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @cabloy/vue-runtime-core v3.4.21
2
+ * @cabloy/vue-runtime-core v3.4.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
6
  import { pauseTracking, resetTracking, isRef, toRaw, isShallow, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';
7
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
8
- import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';
8
+ import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, isReservedProp, EMPTY_ARR, toRawType, makeMap, def, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
10
10
 
11
11
  const stack = [];
@@ -207,11 +207,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
207
207
  }
208
208
  return res;
209
209
  }
210
- const values = [];
211
- for (let i = 0; i < fn.length; i++) {
212
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
210
+ if (isArray(fn)) {
211
+ const values = [];
212
+ for (let i = 0; i < fn.length; i++) {
213
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
214
+ }
215
+ return values;
216
+ } else if (!!(process.env.NODE_ENV !== "production")) {
217
+ warn$1(
218
+ `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
219
+ );
213
220
  }
214
- return values;
215
221
  }
216
222
  function handleError(err, instance, type, throwInDev = true) {
217
223
  const contextVNode = instance ? instance.vnode : null;
@@ -2400,11 +2406,19 @@ function emptyPlaceholder(vnode) {
2400
2406
  }
2401
2407
  }
2402
2408
  function getKeepAliveChild(vnode) {
2403
- return isKeepAlive(vnode) ? (
2404
- // #7121 ensure get the child component subtree in case
2405
- // it's been replaced during HMR
2406
- !!(process.env.NODE_ENV !== "production") && vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
2407
- ) : vnode;
2409
+ if (!isKeepAlive(vnode)) {
2410
+ return vnode;
2411
+ }
2412
+ if (!!(process.env.NODE_ENV !== "production") && vnode.component) {
2413
+ return vnode.component.subTree;
2414
+ }
2415
+ const { shapeFlag, children } = vnode;
2416
+ if (shapeFlag & 16) {
2417
+ return children[0];
2418
+ }
2419
+ if (shapeFlag & 32 && isFunction(children.default)) {
2420
+ return children.default();
2421
+ }
2408
2422
  }
2409
2423
  function setTransitionHooks(vnode, hooks) {
2410
2424
  if (vnode.shapeFlag & 6 && vnode.component) {
@@ -2726,7 +2740,7 @@ const KeepAliveImpl = {
2726
2740
  return () => {
2727
2741
  pendingCacheKey = null;
2728
2742
  if (!slots.default) {
2729
- return null;
2743
+ return current = null;
2730
2744
  }
2731
2745
  const children = slots.default();
2732
2746
  const rawVNode = children[0];
@@ -3039,6 +3053,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
3039
3053
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
3040
3054
  const PublicInstanceProxyHandlers = {
3041
3055
  get({ _: instance }, key) {
3056
+ if (key === "__v_skip") {
3057
+ return true;
3058
+ }
3042
3059
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
3043
3060
  if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
3044
3061
  return true;
@@ -3081,7 +3098,7 @@ const PublicInstanceProxyHandlers = {
3081
3098
  let cssModule, globalProperties;
3082
3099
  if (publicGetter) {
3083
3100
  if (key === "$attrs") {
3084
- track(instance, "get", key);
3101
+ track(instance.attrs, "get", "");
3085
3102
  !!(process.env.NODE_ENV !== "production") && markAttrsAccessed();
3086
3103
  } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") {
3087
3104
  track(instance, "get", key);
@@ -4010,10 +4027,13 @@ function hasInjectionContext() {
4010
4027
  return !!(currentInstance || currentRenderingInstance || currentApp);
4011
4028
  }
4012
4029
 
4030
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
4031
+ const createInternalObject = () => Object.create(internalObjectProto);
4032
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
4033
+
4013
4034
  function initProps(instance, rawProps, isStateful, isSSR = false) {
4014
4035
  const props = {};
4015
- const attrs = {};
4016
- def(attrs, InternalObjectKey, 1);
4036
+ const attrs = createInternalObject();
4017
4037
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4018
4038
  setFullProps(instance, rawProps, props, attrs);
4019
4039
  for (const key in instance.propsOptions[0]) {
@@ -4128,7 +4148,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4128
4148
  }
4129
4149
  }
4130
4150
  if (hasAttrsChanged) {
4131
- trigger(instance, "set", "$attrs");
4151
+ trigger(instance.attrs, "set", "");
4132
4152
  }
4133
4153
  if (!!(process.env.NODE_ENV !== "production")) {
4134
4154
  validateProps(rawProps || {}, props, instance);
@@ -4460,23 +4480,18 @@ const normalizeVNodeSlots = (instance, children) => {
4460
4480
  instance.slots.default = () => normalized;
4461
4481
  };
4462
4482
  const initSlots = (instance, children) => {
4483
+ const slots = instance.slots = createInternalObject();
4463
4484
  if (instance.vnode.shapeFlag & 32) {
4464
4485
  const type = children._;
4465
4486
  if (type) {
4466
- instance.slots = toRaw(children);
4467
- def(children, "_", type);
4487
+ extend(slots, children);
4488
+ def(slots, "_", type);
4468
4489
  } else {
4469
- normalizeObjectSlots(
4470
- children,
4471
- instance.slots = {});
4472
- }
4473
- } else {
4474
- instance.slots = {};
4475
- if (children) {
4476
- normalizeVNodeSlots(instance, children);
4490
+ normalizeObjectSlots(children, slots);
4477
4491
  }
4492
+ } else if (children) {
4493
+ normalizeVNodeSlots(instance, children);
4478
4494
  }
4479
- def(instance.slots, InternalObjectKey, 1);
4480
4495
  };
4481
4496
  const updateSlots = (instance, children, optimized) => {
4482
4497
  const { vnode, slots } = instance;
@@ -4648,6 +4663,7 @@ function createHydrationFunctions(rendererInternals) {
4648
4663
  }
4649
4664
  };
4650
4665
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4666
+ optimized = optimized || !!vnode.dynamicChildren;
4651
4667
  const isFragmentStart = isComment(node) && node.data === "[";
4652
4668
  const onMismatch = () => handleMismatch(
4653
4669
  node,
@@ -4893,9 +4909,9 @@ Server rendered element contains more child nodes than client vdom.`
4893
4909
  }
4894
4910
  }
4895
4911
  if (props) {
4896
- if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
4912
+ if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
4897
4913
  for (const key in props) {
4898
- if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
4914
+ if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
4899
4915
  hasMismatch = true;
4900
4916
  }
4901
4917
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
@@ -7130,7 +7146,6 @@ const createVNodeWithArgsTransform = (...args) => {
7130
7146
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
7131
7147
  );
7132
7148
  };
7133
- const InternalObjectKey = `__vInternal`;
7134
7149
  const normalizeKey = ({ key }) => key != null ? key : null;
7135
7150
  const normalizeRef = ({
7136
7151
  ref,
@@ -7263,7 +7278,7 @@ Component that was made reactive: `,
7263
7278
  function guardReactiveProps(props) {
7264
7279
  if (!props)
7265
7280
  return null;
7266
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
7281
+ return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
7267
7282
  }
7268
7283
  function cloneVNode(vnode, extraProps, mergeRef = false) {
7269
7284
  const { props, ref, patchFlag, children } = vnode;
@@ -7368,7 +7383,7 @@ function normalizeChildren(vnode, children) {
7368
7383
  } else {
7369
7384
  type = 32;
7370
7385
  const slotFlag = children._;
7371
- if (!slotFlag && !(InternalObjectKey in children)) {
7386
+ if (!slotFlag && !isInternalObject(children)) {
7372
7387
  children._ctx = currentRenderingInstance;
7373
7388
  } else if (slotFlag === 3 && currentRenderingInstance) {
7374
7389
  if (currentRenderingInstance.slots._ === 1) {
@@ -7606,7 +7621,7 @@ function setupStatefulComponent(instance, isSSR) {
7606
7621
  }
7607
7622
  }
7608
7623
  instance.accessCache = /* @__PURE__ */ Object.create(null);
7609
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
7624
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
7610
7625
  if (!!(process.env.NODE_ENV !== "production")) {
7611
7626
  exposePropsOnRenderContext(instance);
7612
7627
  }
@@ -7740,31 +7755,26 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7740
7755
  }
7741
7756
  }
7742
7757
  }
7743
- function getAttrsProxy(instance) {
7744
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
7745
- instance.attrs,
7746
- !!(process.env.NODE_ENV !== "production") ? {
7747
- get(target, key) {
7748
- markAttrsAccessed();
7749
- track(instance, "get", "$attrs");
7750
- return target[key];
7751
- },
7752
- set() {
7753
- warn$1(`setupContext.attrs is readonly.`);
7754
- return false;
7755
- },
7756
- deleteProperty() {
7757
- warn$1(`setupContext.attrs is readonly.`);
7758
- return false;
7759
- }
7760
- } : {
7761
- get(target, key) {
7762
- track(instance, "get", "$attrs");
7763
- return target[key];
7764
- }
7765
- }
7766
- ));
7767
- }
7758
+ const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
7759
+ get(target, key) {
7760
+ markAttrsAccessed();
7761
+ track(target, "get", "");
7762
+ return target[key];
7763
+ },
7764
+ set() {
7765
+ warn$1(`setupContext.attrs is readonly.`);
7766
+ return false;
7767
+ },
7768
+ deleteProperty() {
7769
+ warn$1(`setupContext.attrs is readonly.`);
7770
+ return false;
7771
+ }
7772
+ } : {
7773
+ get(target, key) {
7774
+ track(target, "get", "");
7775
+ return target[key];
7776
+ }
7777
+ };
7768
7778
  function getSlotsProxy(instance) {
7769
7779
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
7770
7780
  get(target, key) {
@@ -7798,9 +7808,10 @@ function createSetupContext(instance) {
7798
7808
  instance.exposed = exposed || {};
7799
7809
  };
7800
7810
  if (!!(process.env.NODE_ENV !== "production")) {
7811
+ let attrsProxy;
7801
7812
  return Object.freeze({
7802
7813
  get attrs() {
7803
- return getAttrsProxy(instance);
7814
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
7804
7815
  },
7805
7816
  get slots() {
7806
7817
  return getSlotsProxy(instance);
@@ -7812,9 +7823,7 @@ function createSetupContext(instance) {
7812
7823
  });
7813
7824
  } else {
7814
7825
  return {
7815
- get attrs() {
7816
- return getAttrsProxy(instance);
7817
- },
7826
+ attrs: new Proxy(instance.attrs, attrsProxyHandlers),
7818
7827
  slots: instance.slots,
7819
7828
  emit: instance.emit,
7820
7829
  expose
@@ -8154,7 +8163,7 @@ function isMemoSame(cached, memo) {
8154
8163
  return true;
8155
8164
  }
8156
8165
 
8157
- const version = "3.4.21";
8166
+ const version = "3.4.23";
8158
8167
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8159
8168
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8160
8169
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabloy/vue-runtime-core",
3
- "version": "3.4.23",
3
+ "version": "3.4.25",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.4.21",
50
- "@vue/reactivity": "3.4.21"
49
+ "@vue/shared": "3.4.23",
50
+ "@vue/reactivity": "3.4.23"
51
51
  }
52
52
  }