@cabloy/vue-runtime-core 3.4.26 → 3.4.28

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.23
2
+ * @cabloy/vue-runtime-core v3.4.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -852,21 +852,21 @@ function renderComponentRoot(instance) {
852
852
  vnode,
853
853
  proxy,
854
854
  withProxy,
855
- props,
856
855
  propsOptions: [propsOptions],
857
856
  slots,
858
857
  attrs,
859
858
  emit,
860
859
  render,
861
860
  renderCache,
861
+ props,
862
862
  data,
863
863
  setupState,
864
864
  ctx,
865
865
  inheritAttrs
866
866
  } = instance;
867
+ const prev = setCurrentRenderingInstance(instance);
867
868
  let result;
868
869
  let fallthroughAttrs;
869
- const prev = setCurrentRenderingInstance(instance);
870
870
  {
871
871
  accessedAttrs = false;
872
872
  }
@@ -888,7 +888,7 @@ function renderComponentRoot(instance) {
888
888
  thisProxy,
889
889
  proxyToUse,
890
890
  renderCache,
891
- props,
891
+ true ? reactivity.shallowReadonly(props) : props,
892
892
  setupState,
893
893
  data,
894
894
  ctx
@@ -902,19 +902,18 @@ function renderComponentRoot(instance) {
902
902
  }
903
903
  result = normalizeVNode(
904
904
  render2.length > 1 ? render2(
905
- props,
905
+ true ? reactivity.shallowReadonly(props) : props,
906
906
  true ? {
907
907
  get attrs() {
908
908
  markAttrsAccessed();
909
- return attrs;
909
+ return reactivity.shallowReadonly(attrs);
910
910
  },
911
911
  slots,
912
912
  emit
913
913
  } : { attrs, slots, emit }
914
914
  ) : render2(
915
- props,
915
+ true ? reactivity.shallowReadonly(props) : props,
916
916
  null
917
- /* we know it doesn't need it */
918
917
  )
919
918
  );
920
919
  fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
@@ -940,7 +939,7 @@ function renderComponentRoot(instance) {
940
939
  propsOptions
941
940
  );
942
941
  }
943
- root = cloneVNode(root, fallthroughAttrs);
942
+ root = cloneVNode(root, fallthroughAttrs, false, true);
944
943
  } else if (!accessedAttrs && root.type !== Comment) {
945
944
  const allAttrs = Object.keys(attrs);
946
945
  const eventAttrs = [];
@@ -974,7 +973,7 @@ function renderComponentRoot(instance) {
974
973
  `Runtime directive used on component with non-element root node. The directives will not function as intended.`
975
974
  );
976
975
  }
977
- root = cloneVNode(root);
976
+ root = cloneVNode(root, null, false, true);
978
977
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
979
978
  }
980
979
  if (vnode.transition) {
@@ -1465,7 +1464,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1465
1464
  let parentSuspenseId;
1466
1465
  const isSuspensible = isVNodeSuspensible(vnode);
1467
1466
  if (isSuspensible) {
1468
- if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
1467
+ if (parentSuspense && parentSuspense.pendingBranch) {
1469
1468
  parentSuspenseId = parentSuspense.pendingId;
1470
1469
  parentSuspense.deps++;
1471
1470
  }
@@ -1777,8 +1776,8 @@ function setActiveBranch(suspense, branch) {
1777
1776
  }
1778
1777
  }
1779
1778
  function isVNodeSuspensible(vnode) {
1780
- var _a;
1781
- return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1779
+ const suspensible = vnode.props && vnode.props.suspensible;
1780
+ return suspensible != null && suspensible !== false;
1782
1781
  }
1783
1782
 
1784
1783
  const ssrContextKey = Symbol.for("v-scx");
@@ -2032,34 +2031,29 @@ function createPathGetter(ctx, path) {
2032
2031
  return cur;
2033
2032
  };
2034
2033
  }
2035
- function traverse(value, depth, currentDepth = 0, seen) {
2036
- if (!shared.isObject(value) || value["__v_skip"]) {
2034
+ function traverse(value, depth = Infinity, seen) {
2035
+ if (depth <= 0 || !shared.isObject(value) || value["__v_skip"]) {
2037
2036
  return value;
2038
2037
  }
2039
- if (depth && depth > 0) {
2040
- if (currentDepth >= depth) {
2041
- return value;
2042
- }
2043
- currentDepth++;
2044
- }
2045
2038
  seen = seen || /* @__PURE__ */ new Set();
2046
2039
  if (seen.has(value)) {
2047
2040
  return value;
2048
2041
  }
2049
2042
  seen.add(value);
2043
+ depth--;
2050
2044
  if (reactivity.isRef(value)) {
2051
- traverse(value.value, depth, currentDepth, seen);
2045
+ traverse(value.value, depth, seen);
2052
2046
  } else if (shared.isArray(value)) {
2053
2047
  for (let i = 0; i < value.length; i++) {
2054
- traverse(value[i], depth, currentDepth, seen);
2048
+ traverse(value[i], depth, seen);
2055
2049
  }
2056
2050
  } else if (shared.isSet(value) || shared.isMap(value)) {
2057
2051
  value.forEach((v) => {
2058
- traverse(v, depth, currentDepth, seen);
2052
+ traverse(v, depth, seen);
2059
2053
  });
2060
2054
  } else if (shared.isPlainObject(value)) {
2061
2055
  for (const key in value) {
2062
- traverse(value[key], depth, currentDepth, seen);
2056
+ traverse(value[key], depth, seen);
2063
2057
  }
2064
2058
  }
2065
2059
  return value;
@@ -2217,7 +2211,7 @@ const BaseTransitionImpl = {
2217
2211
  instance
2218
2212
  );
2219
2213
  setTransitionHooks(oldInnerChild, leavingHooks);
2220
- if (mode === "out-in") {
2214
+ if (mode === "out-in" && innerChild.type !== Comment) {
2221
2215
  state.isLeaving = true;
2222
2216
  leavingHooks.afterLeave = () => {
2223
2217
  state.isLeaving = false;
@@ -2409,11 +2403,13 @@ function getKeepAliveChild(vnode) {
2409
2403
  return vnode.component.subTree;
2410
2404
  }
2411
2405
  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();
2406
+ if (children) {
2407
+ if (shapeFlag & 16) {
2408
+ return children[0];
2409
+ }
2410
+ if (shapeFlag & 32 && shared.isFunction(children.default)) {
2411
+ return children.default();
2412
+ }
2417
2413
  }
2418
2414
  }
2419
2415
  function setTransitionHooks(vnode, hooks) {
@@ -2736,7 +2732,7 @@ const KeepAliveImpl = {
2736
2732
  return () => {
2737
2733
  pendingCacheKey = null;
2738
2734
  if (!slots.default) {
2739
- return current = null;
2735
+ return null;
2740
2736
  }
2741
2737
  const children = slots.default();
2742
2738
  const rawVNode = children[0];
@@ -4019,7 +4015,7 @@ function hasInjectionContext() {
4019
4015
  return !!(currentInstance || currentRenderingInstance || currentApp);
4020
4016
  }
4021
4017
 
4022
- const internalObjectProto = /* @__PURE__ */ Object.create(null);
4018
+ const internalObjectProto = {};
4023
4019
  const createInternalObject = () => Object.create(internalObjectProto);
4024
4020
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
4025
4021
 
@@ -4477,7 +4473,7 @@ const initSlots = (instance, children) => {
4477
4473
  const type = children._;
4478
4474
  if (type) {
4479
4475
  shared.extend(slots, children);
4480
- shared.def(slots, "_", type);
4476
+ shared.def(slots, "_", type, true);
4481
4477
  } else {
4482
4478
  normalizeObjectSlots(children, slots);
4483
4479
  }
@@ -7224,8 +7220,8 @@ function guardReactiveProps(props) {
7224
7220
  return null;
7225
7221
  return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
7226
7222
  }
7227
- function cloneVNode(vnode, extraProps, mergeRef = false) {
7228
- const { props, ref, patchFlag, children } = vnode;
7223
+ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
7224
+ const { props, ref, patchFlag, children, transition } = vnode;
7229
7225
  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
7230
7226
  const cloned = {
7231
7227
  __v_isVNode: true,
@@ -7255,7 +7251,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
7255
7251
  dynamicChildren: vnode.dynamicChildren,
7256
7252
  appContext: vnode.appContext,
7257
7253
  dirs: vnode.dirs,
7258
- transition: vnode.transition,
7254
+ transition,
7259
7255
  // These should technically only be non-null on mounted VNodes. However,
7260
7256
  // they *should* be copied for kept-alive vnodes. So we just always copy
7261
7257
  // them since them being non-null during a mount doesn't affect the logic as
@@ -7269,6 +7265,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
7269
7265
  ctx: vnode.ctx,
7270
7266
  ce: vnode.ce
7271
7267
  };
7268
+ if (transition && cloneTransition) {
7269
+ cloned.transition = transition.clone(cloned);
7270
+ }
7272
7271
  return cloned;
7273
7272
  }
7274
7273
  function deepCloneVNode(vnode) {
@@ -8093,7 +8092,7 @@ function isMemoSame(cached, memo) {
8093
8092
  return true;
8094
8093
  }
8095
8094
 
8096
- const version = "3.4.23";
8095
+ const version = "3.4.26";
8097
8096
  const warn = warn$1 ;
8098
8097
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8099
8098
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @cabloy/vue-runtime-core v3.4.23
2
+ * @cabloy/vue-runtime-core v3.4.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -421,21 +421,21 @@ function renderComponentRoot(instance) {
421
421
  vnode,
422
422
  proxy,
423
423
  withProxy,
424
- props,
425
424
  propsOptions: [propsOptions],
426
425
  slots,
427
426
  attrs,
428
427
  emit,
429
428
  render,
430
429
  renderCache,
430
+ props,
431
431
  data,
432
432
  setupState,
433
433
  ctx,
434
434
  inheritAttrs
435
435
  } = instance;
436
+ const prev = setCurrentRenderingInstance(instance);
436
437
  let result;
437
438
  let fallthroughAttrs;
438
- const prev = setCurrentRenderingInstance(instance);
439
439
  try {
440
440
  if (vnode.shapeFlag & 4) {
441
441
  const proxyToUse = withProxy || proxy;
@@ -454,7 +454,7 @@ function renderComponentRoot(instance) {
454
454
  thisProxy,
455
455
  proxyToUse,
456
456
  renderCache,
457
- props,
457
+ false ? shallowReadonly(props) : props,
458
458
  setupState,
459
459
  data,
460
460
  ctx
@@ -466,19 +466,18 @@ function renderComponentRoot(instance) {
466
466
  if (false) ;
467
467
  result = normalizeVNode(
468
468
  render2.length > 1 ? render2(
469
- props,
469
+ false ? shallowReadonly(props) : props,
470
470
  false ? {
471
471
  get attrs() {
472
472
  markAttrsAccessed();
473
- return attrs;
473
+ return shallowReadonly(attrs);
474
474
  },
475
475
  slots,
476
476
  emit
477
477
  } : { attrs, slots, emit }
478
478
  ) : render2(
479
- props,
479
+ false ? shallowReadonly(props) : props,
480
480
  null
481
- /* we know it doesn't need it */
482
481
  )
483
482
  );
484
483
  fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
@@ -500,12 +499,12 @@ function renderComponentRoot(instance) {
500
499
  propsOptions
501
500
  );
502
501
  }
503
- root = cloneVNode(root, fallthroughAttrs);
502
+ root = cloneVNode(root, fallthroughAttrs, false, true);
504
503
  }
505
504
  }
506
505
  }
507
506
  if (vnode.dirs) {
508
- root = cloneVNode(root);
507
+ root = cloneVNode(root, null, false, true);
509
508
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
510
509
  }
511
510
  if (vnode.transition) {
@@ -941,7 +940,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
941
940
  let parentSuspenseId;
942
941
  const isSuspensible = isVNodeSuspensible(vnode);
943
942
  if (isSuspensible) {
944
- if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
943
+ if (parentSuspense && parentSuspense.pendingBranch) {
945
944
  parentSuspenseId = parentSuspense.pendingId;
946
945
  parentSuspense.deps++;
947
946
  }
@@ -1229,8 +1228,8 @@ function setActiveBranch(suspense, branch) {
1229
1228
  }
1230
1229
  }
1231
1230
  function isVNodeSuspensible(vnode) {
1232
- var _a;
1233
- return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1231
+ const suspensible = vnode.props && vnode.props.suspensible;
1232
+ return suspensible != null && suspensible !== false;
1234
1233
  }
1235
1234
 
1236
1235
  const ssrContextKey = Symbol.for("v-scx");
@@ -1438,34 +1437,29 @@ function createPathGetter(ctx, path) {
1438
1437
  return cur;
1439
1438
  };
1440
1439
  }
1441
- function traverse(value, depth, currentDepth = 0, seen) {
1442
- if (!shared.isObject(value) || value["__v_skip"]) {
1440
+ function traverse(value, depth = Infinity, seen) {
1441
+ if (depth <= 0 || !shared.isObject(value) || value["__v_skip"]) {
1443
1442
  return value;
1444
1443
  }
1445
- if (depth && depth > 0) {
1446
- if (currentDepth >= depth) {
1447
- return value;
1448
- }
1449
- currentDepth++;
1450
- }
1451
1444
  seen = seen || /* @__PURE__ */ new Set();
1452
1445
  if (seen.has(value)) {
1453
1446
  return value;
1454
1447
  }
1455
1448
  seen.add(value);
1449
+ depth--;
1456
1450
  if (reactivity.isRef(value)) {
1457
- traverse(value.value, depth, currentDepth, seen);
1451
+ traverse(value.value, depth, seen);
1458
1452
  } else if (shared.isArray(value)) {
1459
1453
  for (let i = 0; i < value.length; i++) {
1460
- traverse(value[i], depth, currentDepth, seen);
1454
+ traverse(value[i], depth, seen);
1461
1455
  }
1462
1456
  } else if (shared.isSet(value) || shared.isMap(value)) {
1463
1457
  value.forEach((v) => {
1464
- traverse(v, depth, currentDepth, seen);
1458
+ traverse(v, depth, seen);
1465
1459
  });
1466
1460
  } else if (shared.isPlainObject(value)) {
1467
1461
  for (const key in value) {
1468
- traverse(value[key], depth, currentDepth, seen);
1462
+ traverse(value[key], depth, seen);
1469
1463
  }
1470
1464
  }
1471
1465
  return value;
@@ -1607,7 +1601,7 @@ const BaseTransitionImpl = {
1607
1601
  instance
1608
1602
  );
1609
1603
  setTransitionHooks(oldInnerChild, leavingHooks);
1610
- if (mode === "out-in") {
1604
+ if (mode === "out-in" && innerChild.type !== Comment) {
1611
1605
  state.isLeaving = true;
1612
1606
  leavingHooks.afterLeave = () => {
1613
1607
  state.isLeaving = false;
@@ -1796,11 +1790,13 @@ function getKeepAliveChild(vnode) {
1796
1790
  return vnode;
1797
1791
  }
1798
1792
  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();
1793
+ if (children) {
1794
+ if (shapeFlag & 16) {
1795
+ return children[0];
1796
+ }
1797
+ if (shapeFlag & 32 && shared.isFunction(children.default)) {
1798
+ return children.default();
1799
+ }
1804
1800
  }
1805
1801
  }
1806
1802
  function setTransitionHooks(vnode, hooks) {
@@ -2106,7 +2102,7 @@ const KeepAliveImpl = {
2106
2102
  return () => {
2107
2103
  pendingCacheKey = null;
2108
2104
  if (!slots.default) {
2109
- return current = null;
2105
+ return null;
2110
2106
  }
2111
2107
  const children = slots.default();
2112
2108
  const rawVNode = children[0];
@@ -3080,7 +3076,7 @@ function hasInjectionContext() {
3080
3076
  return !!(currentInstance || currentRenderingInstance || currentApp);
3081
3077
  }
3082
3078
 
3083
- const internalObjectProto = /* @__PURE__ */ Object.create(null);
3079
+ const internalObjectProto = {};
3084
3080
  const createInternalObject = () => Object.create(internalObjectProto);
3085
3081
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
3086
3082
 
@@ -3400,7 +3396,7 @@ const initSlots = (instance, children) => {
3400
3396
  const type = children._;
3401
3397
  if (type) {
3402
3398
  shared.extend(slots, children);
3403
- shared.def(slots, "_", type);
3399
+ shared.def(slots, "_", type, true);
3404
3400
  } else {
3405
3401
  normalizeObjectSlots(children, slots);
3406
3402
  }
@@ -5739,8 +5735,8 @@ function guardReactiveProps(props) {
5739
5735
  return null;
5740
5736
  return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
5741
5737
  }
5742
- function cloneVNode(vnode, extraProps, mergeRef = false) {
5743
- const { props, ref, patchFlag, children } = vnode;
5738
+ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
5739
+ const { props, ref, patchFlag, children, transition } = vnode;
5744
5740
  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
5745
5741
  const cloned = {
5746
5742
  __v_isVNode: true,
@@ -5770,7 +5766,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
5770
5766
  dynamicChildren: vnode.dynamicChildren,
5771
5767
  appContext: vnode.appContext,
5772
5768
  dirs: vnode.dirs,
5773
- transition: vnode.transition,
5769
+ transition,
5774
5770
  // These should technically only be non-null on mounted VNodes. However,
5775
5771
  // they *should* be copied for kept-alive vnodes. So we just always copy
5776
5772
  // them since them being non-null during a mount doesn't affect the logic as
@@ -5784,6 +5780,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
5784
5780
  ctx: vnode.ctx,
5785
5781
  ce: vnode.ce
5786
5782
  };
5783
+ if (transition && cloneTransition) {
5784
+ cloned.transition = transition.clone(cloned);
5785
+ }
5787
5786
  return cloned;
5788
5787
  }
5789
5788
  function createTextVNode(text = " ", flag = 0) {
@@ -6279,7 +6278,7 @@ function isMemoSame(cached, memo) {
6279
6278
  return true;
6280
6279
  }
6281
6280
 
6282
- const version = "3.4.23";
6281
+ const version = "3.4.26";
6283
6282
  const warn$1 = shared.NOOP;
6284
6283
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6285
6284
  const devtools = void 0;
@@ -1000,7 +1000,7 @@ export declare function createBaseVNode(type: VNodeTypes | ClassComponent | type
1000
1000
  export declare const createVNode: typeof _createVNode;
1001
1001
  declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode;
1002
1002
  export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;
1003
- export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean): VNode<T, U>;
1003
+ export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean, cloneTransition?: boolean): VNode<T, U>;
1004
1004
  /**
1005
1005
  * @private
1006
1006
  */
@@ -1604,7 +1604,8 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
1604
1604
  version: string;
1605
1605
  config: AppConfig & LegacyConfig;
1606
1606
  nextTick: typeof nextTick;
1607
- use(plugin: Plugin, ...options: any[]): CompatVue;
1607
+ use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): CompatVue;
1608
+ use<Options>(plugin: Plugin<Options>, options: Options): CompatVue;
1608
1609
  mixin(mixin: ComponentOptions): CompatVue;
1609
1610
  component(name: string): Component | undefined;
1610
1611
  component(name: string, component: Component): CompatVue;
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @cabloy/vue-runtime-core v3.4.23
2
+ * @cabloy/vue-runtime-core v3.4.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
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';
6
+ import { pauseTracking, resetTracking, isRef, toRaw, shallowReadonly, isShallow, isReactive, ReactiveEffect, getCurrentScope, ref, 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
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';
@@ -854,21 +854,21 @@ function renderComponentRoot(instance) {
854
854
  vnode,
855
855
  proxy,
856
856
  withProxy,
857
- props,
858
857
  propsOptions: [propsOptions],
859
858
  slots,
860
859
  attrs,
861
860
  emit,
862
861
  render,
863
862
  renderCache,
863
+ props,
864
864
  data,
865
865
  setupState,
866
866
  ctx,
867
867
  inheritAttrs
868
868
  } = instance;
869
+ const prev = setCurrentRenderingInstance(instance);
869
870
  let result;
870
871
  let fallthroughAttrs;
871
- const prev = setCurrentRenderingInstance(instance);
872
872
  if (!!(process.env.NODE_ENV !== "production")) {
873
873
  accessedAttrs = false;
874
874
  }
@@ -890,7 +890,7 @@ function renderComponentRoot(instance) {
890
890
  thisProxy,
891
891
  proxyToUse,
892
892
  renderCache,
893
- props,
893
+ !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
894
894
  setupState,
895
895
  data,
896
896
  ctx
@@ -904,19 +904,18 @@ function renderComponentRoot(instance) {
904
904
  }
905
905
  result = normalizeVNode(
906
906
  render2.length > 1 ? render2(
907
- props,
907
+ !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
908
908
  !!(process.env.NODE_ENV !== "production") ? {
909
909
  get attrs() {
910
910
  markAttrsAccessed();
911
- return attrs;
911
+ return shallowReadonly(attrs);
912
912
  },
913
913
  slots,
914
914
  emit
915
915
  } : { attrs, slots, emit }
916
916
  ) : render2(
917
- props,
917
+ !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
918
918
  null
919
- /* we know it doesn't need it */
920
919
  )
921
920
  );
922
921
  fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
@@ -942,7 +941,7 @@ function renderComponentRoot(instance) {
942
941
  propsOptions
943
942
  );
944
943
  }
945
- root = cloneVNode(root, fallthroughAttrs);
944
+ root = cloneVNode(root, fallthroughAttrs, false, true);
946
945
  } else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
947
946
  const allAttrs = Object.keys(attrs);
948
947
  const eventAttrs = [];
@@ -976,7 +975,7 @@ function renderComponentRoot(instance) {
976
975
  `Runtime directive used on component with non-element root node. The directives will not function as intended.`
977
976
  );
978
977
  }
979
- root = cloneVNode(root);
978
+ root = cloneVNode(root, null, false, true);
980
979
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
981
980
  }
982
981
  if (vnode.transition) {
@@ -1467,7 +1466,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1467
1466
  let parentSuspenseId;
1468
1467
  const isSuspensible = isVNodeSuspensible(vnode);
1469
1468
  if (isSuspensible) {
1470
- if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
1469
+ if (parentSuspense && parentSuspense.pendingBranch) {
1471
1470
  parentSuspenseId = parentSuspense.pendingId;
1472
1471
  parentSuspense.deps++;
1473
1472
  }
@@ -1779,8 +1778,8 @@ function setActiveBranch(suspense, branch) {
1779
1778
  }
1780
1779
  }
1781
1780
  function isVNodeSuspensible(vnode) {
1782
- var _a;
1783
- return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1781
+ const suspensible = vnode.props && vnode.props.suspensible;
1782
+ return suspensible != null && suspensible !== false;
1784
1783
  }
1785
1784
 
1786
1785
  const ssrContextKey = Symbol.for("v-scx");
@@ -2034,34 +2033,29 @@ function createPathGetter(ctx, path) {
2034
2033
  return cur;
2035
2034
  };
2036
2035
  }
2037
- function traverse(value, depth, currentDepth = 0, seen) {
2038
- if (!isObject(value) || value["__v_skip"]) {
2036
+ function traverse(value, depth = Infinity, seen) {
2037
+ if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2039
2038
  return value;
2040
2039
  }
2041
- if (depth && depth > 0) {
2042
- if (currentDepth >= depth) {
2043
- return value;
2044
- }
2045
- currentDepth++;
2046
- }
2047
2040
  seen = seen || /* @__PURE__ */ new Set();
2048
2041
  if (seen.has(value)) {
2049
2042
  return value;
2050
2043
  }
2051
2044
  seen.add(value);
2045
+ depth--;
2052
2046
  if (isRef(value)) {
2053
- traverse(value.value, depth, currentDepth, seen);
2047
+ traverse(value.value, depth, seen);
2054
2048
  } else if (isArray(value)) {
2055
2049
  for (let i = 0; i < value.length; i++) {
2056
- traverse(value[i], depth, currentDepth, seen);
2050
+ traverse(value[i], depth, seen);
2057
2051
  }
2058
2052
  } else if (isSet(value) || isMap(value)) {
2059
2053
  value.forEach((v) => {
2060
- traverse(v, depth, currentDepth, seen);
2054
+ traverse(v, depth, seen);
2061
2055
  });
2062
2056
  } else if (isPlainObject(value)) {
2063
2057
  for (const key in value) {
2064
- traverse(value[key], depth, currentDepth, seen);
2058
+ traverse(value[key], depth, seen);
2065
2059
  }
2066
2060
  }
2067
2061
  return value;
@@ -2221,7 +2215,7 @@ const BaseTransitionImpl = {
2221
2215
  instance
2222
2216
  );
2223
2217
  setTransitionHooks(oldInnerChild, leavingHooks);
2224
- if (mode === "out-in") {
2218
+ if (mode === "out-in" && innerChild.type !== Comment) {
2225
2219
  state.isLeaving = true;
2226
2220
  leavingHooks.afterLeave = () => {
2227
2221
  state.isLeaving = false;
@@ -2413,11 +2407,13 @@ function getKeepAliveChild(vnode) {
2413
2407
  return vnode.component.subTree;
2414
2408
  }
2415
2409
  const { shapeFlag, children } = vnode;
2416
- if (shapeFlag & 16) {
2417
- return children[0];
2418
- }
2419
- if (shapeFlag & 32 && isFunction(children.default)) {
2420
- return children.default();
2410
+ if (children) {
2411
+ if (shapeFlag & 16) {
2412
+ return children[0];
2413
+ }
2414
+ if (shapeFlag & 32 && isFunction(children.default)) {
2415
+ return children.default();
2416
+ }
2421
2417
  }
2422
2418
  }
2423
2419
  function setTransitionHooks(vnode, hooks) {
@@ -2740,7 +2736,7 @@ const KeepAliveImpl = {
2740
2736
  return () => {
2741
2737
  pendingCacheKey = null;
2742
2738
  if (!slots.default) {
2743
- return current = null;
2739
+ return null;
2744
2740
  }
2745
2741
  const children = slots.default();
2746
2742
  const rawVNode = children[0];
@@ -4027,7 +4023,7 @@ function hasInjectionContext() {
4027
4023
  return !!(currentInstance || currentRenderingInstance || currentApp);
4028
4024
  }
4029
4025
 
4030
- const internalObjectProto = /* @__PURE__ */ Object.create(null);
4026
+ const internalObjectProto = {};
4031
4027
  const createInternalObject = () => Object.create(internalObjectProto);
4032
4028
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
4033
4029
 
@@ -4485,7 +4481,7 @@ const initSlots = (instance, children) => {
4485
4481
  const type = children._;
4486
4482
  if (type) {
4487
4483
  extend(slots, children);
4488
- def(slots, "_", type);
4484
+ def(slots, "_", type, true);
4489
4485
  } else {
4490
4486
  normalizeObjectSlots(children, slots);
4491
4487
  }
@@ -7280,8 +7276,8 @@ function guardReactiveProps(props) {
7280
7276
  return null;
7281
7277
  return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
7282
7278
  }
7283
- function cloneVNode(vnode, extraProps, mergeRef = false) {
7284
- const { props, ref, patchFlag, children } = vnode;
7279
+ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
7280
+ const { props, ref, patchFlag, children, transition } = vnode;
7285
7281
  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
7286
7282
  const cloned = {
7287
7283
  __v_isVNode: true,
@@ -7311,7 +7307,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
7311
7307
  dynamicChildren: vnode.dynamicChildren,
7312
7308
  appContext: vnode.appContext,
7313
7309
  dirs: vnode.dirs,
7314
- transition: vnode.transition,
7310
+ transition,
7315
7311
  // These should technically only be non-null on mounted VNodes. However,
7316
7312
  // they *should* be copied for kept-alive vnodes. So we just always copy
7317
7313
  // them since them being non-null during a mount doesn't affect the logic as
@@ -7325,6 +7321,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
7325
7321
  ctx: vnode.ctx,
7326
7322
  ce: vnode.ce
7327
7323
  };
7324
+ if (transition && cloneTransition) {
7325
+ cloned.transition = transition.clone(cloned);
7326
+ }
7328
7327
  return cloned;
7329
7328
  }
7330
7329
  function deepCloneVNode(vnode) {
@@ -8163,7 +8162,7 @@ function isMemoSame(cached, memo) {
8163
8162
  return true;
8164
8163
  }
8165
8164
 
8166
- const version = "3.4.23";
8165
+ const version = "3.4.26";
8167
8166
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8168
8167
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8169
8168
  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.26",
3
+ "version": "3.4.28",
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.23",
50
- "@vue/reactivity": "3.4.23"
49
+ "@vue/shared": "3.4.26",
50
+ "@vue/reactivity": "3.4.26"
51
51
  }
52
52
  }