@cabloy/vue-runtime-core 3.5.11 → 3.5.13

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,11 +1,11 @@
1
1
  /**
2
- * @cabloy/vue-runtime-core v3.5.6
2
+ * @cabloy/vue-runtime-core v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
6
  import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
7
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
8
- import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
8
+ import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
10
10
 
11
11
  const stack = [];
@@ -276,10 +276,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
276
276
  }
277
277
  }
278
278
 
279
- let isFlushing = false;
280
- let isFlushPending = false;
281
279
  const queue = [];
282
- let flushIndex = 0;
280
+ let flushIndex = -1;
283
281
  const pendingPostFlushCbs = [];
284
282
  let activePostFlushCbs = null;
285
283
  let postFlushIndex = 0;
@@ -291,7 +289,7 @@ function nextTick(fn) {
291
289
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
292
290
  }
293
291
  function findInsertionIndex(id) {
294
- let start = isFlushing ? flushIndex + 1 : 0;
292
+ let start = flushIndex + 1;
295
293
  let end = queue.length;
296
294
  while (start < end) {
297
295
  const middle = start + end >>> 1;
@@ -320,8 +318,7 @@ function queueJob(job) {
320
318
  }
321
319
  }
322
320
  function queueFlush() {
323
- if (!isFlushing && !isFlushPending) {
324
- isFlushPending = true;
321
+ if (!currentFlushPromise) {
325
322
  currentFlushPromise = resolvedPromise.then(flushJobs);
326
323
  }
327
324
  }
@@ -338,7 +335,7 @@ function queuePostFlushCb(cb) {
338
335
  }
339
336
  queueFlush();
340
337
  }
341
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
338
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
342
339
  if (!!(process.env.NODE_ENV !== "production")) {
343
340
  seen = seen || /* @__PURE__ */ new Map();
344
341
  }
@@ -357,7 +354,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
357
354
  cb.flags &= ~1;
358
355
  }
359
356
  cb();
360
- cb.flags &= ~1;
357
+ if (!(cb.flags & 4)) {
358
+ cb.flags &= ~1;
359
+ }
361
360
  }
362
361
  }
363
362
  }
@@ -392,8 +391,6 @@ function flushPostFlushCbs(seen) {
392
391
  }
393
392
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
394
393
  function flushJobs(seen) {
395
- isFlushPending = false;
396
- isFlushing = true;
397
394
  if (!!(process.env.NODE_ENV !== "production")) {
398
395
  seen = seen || /* @__PURE__ */ new Map();
399
396
  }
@@ -413,7 +410,9 @@ function flushJobs(seen) {
413
410
  job.i,
414
411
  job.i ? 15 : 14
415
412
  );
416
- job.flags &= ~1;
413
+ if (!(job.flags & 4)) {
414
+ job.flags &= ~1;
415
+ }
417
416
  }
418
417
  }
419
418
  } finally {
@@ -423,10 +422,9 @@ function flushJobs(seen) {
423
422
  job.flags &= ~1;
424
423
  }
425
424
  }
426
- flushIndex = 0;
425
+ flushIndex = -1;
427
426
  queue.length = 0;
428
427
  flushPostFlushCbs(seen);
429
- isFlushing = false;
430
428
  currentFlushPromise = null;
431
429
  if (queue.length || pendingPostFlushCbs.length) {
432
430
  flushJobs(seen);
@@ -848,7 +846,7 @@ const TeleportImpl = {
848
846
  }
849
847
  if (!disabled) {
850
848
  mount(target, targetAnchor);
851
- updateCssVars(n2);
849
+ updateCssVars(n2, false);
852
850
  }
853
851
  } else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
854
852
  warn$1(
@@ -860,14 +858,35 @@ const TeleportImpl = {
860
858
  };
861
859
  if (disabled) {
862
860
  mount(container, mainAnchor);
863
- updateCssVars(n2);
861
+ updateCssVars(n2, true);
864
862
  }
865
863
  if (isTeleportDeferred(n2.props)) {
866
- queuePostRenderEffect(mountToTarget, parentSuspense);
864
+ queuePostRenderEffect(() => {
865
+ mountToTarget();
866
+ n2.el.__isMounted = true;
867
+ }, parentSuspense);
867
868
  } else {
868
869
  mountToTarget();
869
870
  }
870
871
  } else {
872
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
873
+ queuePostRenderEffect(() => {
874
+ TeleportImpl.process(
875
+ n1,
876
+ n2,
877
+ container,
878
+ anchor,
879
+ parentComponent,
880
+ parentSuspense,
881
+ namespace,
882
+ slotScopeIds,
883
+ optimized,
884
+ internals
885
+ );
886
+ delete n1.el.__isMounted;
887
+ }, parentSuspense);
888
+ return;
889
+ }
871
890
  n2.el = n1.el;
872
891
  n2.targetStart = n1.targetStart;
873
892
  const mainAnchor = n2.anchor = n1.anchor;
@@ -950,7 +969,7 @@ const TeleportImpl = {
950
969
  );
951
970
  }
952
971
  }
953
- updateCssVars(n2);
972
+ updateCssVars(n2, disabled);
954
973
  }
955
974
  },
956
975
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
@@ -1018,9 +1037,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
1018
1037
  querySelector
1019
1038
  );
1020
1039
  if (target) {
1040
+ const disabled = isTeleportDisabled(vnode.props);
1021
1041
  const targetNode = target._lpa || target.firstChild;
1022
1042
  if (vnode.shapeFlag & 16) {
1023
- if (isTeleportDisabled(vnode.props)) {
1043
+ if (disabled) {
1024
1044
  vnode.anchor = hydrateChildren(
1025
1045
  nextSibling(node),
1026
1046
  vnode,
@@ -1061,16 +1081,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
1061
1081
  );
1062
1082
  }
1063
1083
  }
1064
- updateCssVars(vnode);
1084
+ updateCssVars(vnode, disabled);
1065
1085
  }
1066
1086
  return vnode.anchor && nextSibling(vnode.anchor);
1067
1087
  }
1068
1088
  const Teleport = TeleportImpl;
1069
- function updateCssVars(vnode) {
1089
+ function updateCssVars(vnode, isDisabled) {
1070
1090
  const ctx = vnode.ctx;
1071
1091
  if (ctx && ctx.ut) {
1072
- let node = vnode.targetStart;
1073
- while (node && node !== vnode.targetAnchor) {
1092
+ let node, anchor;
1093
+ if (isDisabled) {
1094
+ node = vnode.el;
1095
+ anchor = vnode.anchor;
1096
+ } else {
1097
+ node = vnode.targetStart;
1098
+ anchor = vnode.targetAnchor;
1099
+ }
1100
+ while (node && node !== anchor) {
1074
1101
  if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
1075
1102
  node = node.nextSibling;
1076
1103
  }
@@ -1165,10 +1192,9 @@ const BaseTransitionImpl = {
1165
1192
  if (innerChild.type !== Comment) {
1166
1193
  setTransitionHooks(innerChild, enterHooks);
1167
1194
  }
1168
- const oldChild = instance.subTree;
1169
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
1195
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
1170
1196
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
1171
- const leavingHooks = resolveTransitionHooks(
1197
+ let leavingHooks = resolveTransitionHooks(
1172
1198
  oldInnerChild,
1173
1199
  rawProps,
1174
1200
  state,
@@ -1183,6 +1209,7 @@ const BaseTransitionImpl = {
1183
1209
  instance.update();
1184
1210
  }
1185
1211
  delete leavingHooks.afterLeave;
1212
+ oldInnerChild = void 0;
1186
1213
  };
1187
1214
  return emptyPlaceholder(child);
1188
1215
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -1196,10 +1223,19 @@ const BaseTransitionImpl = {
1196
1223
  earlyRemove();
1197
1224
  el[leaveCbKey] = void 0;
1198
1225
  delete enterHooks.delayedLeave;
1226
+ oldInnerChild = void 0;
1227
+ };
1228
+ enterHooks.delayedLeave = () => {
1229
+ delayedLeave();
1230
+ delete enterHooks.delayedLeave;
1231
+ oldInnerChild = void 0;
1199
1232
  };
1200
- enterHooks.delayedLeave = delayedLeave;
1201
1233
  };
1234
+ } else {
1235
+ oldInnerChild = void 0;
1202
1236
  }
1237
+ } else if (oldInnerChild) {
1238
+ oldInnerChild = void 0;
1203
1239
  }
1204
1240
  return child;
1205
1241
  };
@@ -1457,6 +1493,7 @@ function useId() {
1457
1493
  `useId() is called when there is no active component instance to be associated with.`
1458
1494
  );
1459
1495
  }
1496
+ return "";
1460
1497
  }
1461
1498
  function markAsyncBoundary(instance) {
1462
1499
  instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
@@ -1504,6 +1541,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1504
1541
  return;
1505
1542
  }
1506
1543
  if (isAsyncWrapper(vnode) && !isUnmount) {
1544
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
1545
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
1546
+ }
1507
1547
  return;
1508
1548
  }
1509
1549
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -1520,8 +1560,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1520
1560
  const setupState = owner.setupState;
1521
1561
  const rawSetupState = toRaw(setupState);
1522
1562
  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
1523
- if (!!(process.env.NODE_ENV !== "production") && knownTemplateRefs.has(rawSetupState[key])) {
1524
- return false;
1563
+ if (!!(process.env.NODE_ENV !== "production")) {
1564
+ if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
1565
+ warn$1(
1566
+ `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
1567
+ );
1568
+ }
1569
+ if (knownTemplateRefs.has(rawSetupState[key])) {
1570
+ return false;
1571
+ }
1525
1572
  }
1526
1573
  return hasOwn(rawSetupState, key);
1527
1574
  };
@@ -1751,7 +1798,7 @@ function createHydrationFunctions(rendererInternals) {
1751
1798
  getContainerType(container),
1752
1799
  optimized
1753
1800
  );
1754
- if (isAsyncWrapper(vnode)) {
1801
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
1755
1802
  let subTree;
1756
1803
  if (isFragmentStart) {
1757
1804
  subTree = createVNode(Fragment);
@@ -1814,7 +1861,11 @@ function createHydrationFunctions(rendererInternals) {
1814
1861
  }
1815
1862
  let needCallTransitionHooks = false;
1816
1863
  if (isTemplateNode(el)) {
1817
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
1864
+ needCallTransitionHooks = needTransition(
1865
+ null,
1866
+ // no need check parentSuspense in hydration
1867
+ transition
1868
+ ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
1818
1869
  const content = el.content.firstChild;
1819
1870
  if (needCallTransitionHooks) {
1820
1871
  transition.beforeEnter(content);
@@ -2052,6 +2103,10 @@ Server rendered element contains fewer child nodes than client vdom.`
2052
2103
  getContainerType(container),
2053
2104
  slotScopeIds
2054
2105
  );
2106
+ if (parentComponent) {
2107
+ parentComponent.vnode.el = vnode.el;
2108
+ updateHOCHostEl(parentComponent, vnode.el);
2109
+ }
2055
2110
  return next;
2056
2111
  };
2057
2112
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -2237,10 +2292,17 @@ function isMismatchAllowed(el, allowedType) {
2237
2292
  }
2238
2293
  }
2239
2294
 
2295
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
2296
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
2240
2297
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
2241
2298
  const id = requestIdleCallback(hydrate, { timeout });
2242
2299
  return () => cancelIdleCallback(id);
2243
2300
  };
2301
+ function elementIsVisibleInViewport(el) {
2302
+ const { top, left, bottom, right } = el.getBoundingClientRect();
2303
+ const { innerHeight, innerWidth } = window;
2304
+ return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
2305
+ }
2244
2306
  const hydrateOnVisible = (opts) => (hydrate, forEach) => {
2245
2307
  const ob = new IntersectionObserver((entries) => {
2246
2308
  for (const e of entries) {
@@ -2250,7 +2312,15 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
2250
2312
  break;
2251
2313
  }
2252
2314
  }, opts);
2253
- forEach((el) => ob.observe(el));
2315
+ forEach((el) => {
2316
+ if (!(el instanceof Element)) return;
2317
+ if (elementIsVisibleInViewport(el)) {
2318
+ hydrate();
2319
+ ob.disconnect();
2320
+ return false;
2321
+ }
2322
+ ob.observe(el);
2323
+ });
2254
2324
  return () => ob.disconnect();
2255
2325
  };
2256
2326
  const hydrateOnMediaQuery = (query) => (hydrate) => {
@@ -2295,7 +2365,10 @@ function forEachElement(node, cb) {
2295
2365
  let next = node.nextSibling;
2296
2366
  while (next) {
2297
2367
  if (next.nodeType === 1) {
2298
- cb(next);
2368
+ const result = cb(next);
2369
+ if (result === false) {
2370
+ break;
2371
+ }
2299
2372
  } else if (isComment(next)) {
2300
2373
  if (next.data === "]") {
2301
2374
  if (--depth === 0) break;
@@ -2937,12 +3010,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
2937
3010
  }
2938
3011
  openBlock();
2939
3012
  const validSlotContent = slot && ensureValidVNode(slot(props));
3013
+ const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
3014
+ // key attached in the `createSlots` helper, respect that
3015
+ validSlotContent && validSlotContent.key;
2940
3016
  const rendered = createBlock(
2941
3017
  Fragment,
2942
3018
  {
2943
- key: (props.key || // slot content array of a dynamic conditional slot may have a branch
2944
- // key attached in the `createSlots` helper, respect that
2945
- validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
3019
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
2946
3020
  (!validSlotContent && fallback ? "_fb" : "")
2947
3021
  },
2948
3022
  validSlotContent || (fallback ? fallback() : []),
@@ -4304,6 +4378,7 @@ function getType(ctor) {
4304
4378
  function validateProps(rawProps, props, instance) {
4305
4379
  const resolvedValues = toRaw(props);
4306
4380
  const options = instance.propsOptions[0];
4381
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
4307
4382
  for (const key in options) {
4308
4383
  let opt = options[key];
4309
4384
  if (opt == null) continue;
@@ -4312,7 +4387,7 @@ function validateProps(rawProps, props, instance) {
4312
4387
  resolvedValues[key],
4313
4388
  opt,
4314
4389
  !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues,
4315
- !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
4390
+ !camelizePropsKey.includes(key)
4316
4391
  );
4317
4392
  }
4318
4393
  }
@@ -6165,14 +6240,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
6165
6240
  }
6166
6241
  const baseWatchOptions = extend({}, options);
6167
6242
  if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
6243
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
6168
6244
  let ssrCleanup;
6169
6245
  if (isInSSRComponentSetup) {
6170
6246
  if (flush === "sync") {
6171
6247
  const ctx = useSSRContext();
6172
6248
  ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
6173
- } else if (!cb || immediate) {
6174
- baseWatchOptions.once = true;
6175
- } else {
6249
+ } else if (!runsImmediately) {
6176
6250
  const watchStopHandle = () => {
6177
6251
  };
6178
6252
  watchStopHandle.stop = NOOP;
@@ -6211,7 +6285,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
6211
6285
  }
6212
6286
  };
6213
6287
  const watchHandle = watch$1(source, cb, baseWatchOptions);
6214
- if (ssrCleanup) ssrCleanup.push(watchHandle);
6288
+ if (isInSSRComponentSetup) {
6289
+ if (ssrCleanup) {
6290
+ ssrCleanup.push(watchHandle);
6291
+ } else if (runsImmediately) {
6292
+ watchHandle();
6293
+ }
6294
+ }
6215
6295
  return watchHandle;
6216
6296
  }
6217
6297
  function instanceWatch(source, value, options) {
@@ -6246,19 +6326,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
6246
6326
  warn$1(`useModel() called without active instance.`);
6247
6327
  return ref();
6248
6328
  }
6249
- if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][name]) {
6329
+ const camelizedName = camelize(name);
6330
+ if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][camelizedName]) {
6250
6331
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
6251
6332
  return ref();
6252
6333
  }
6253
- const camelizedName = camelize(name);
6254
6334
  const hyphenatedName = hyphenate(name);
6255
- const modifiers = getModelModifiers(props, name);
6335
+ const modifiers = getModelModifiers(props, camelizedName);
6256
6336
  const res = customRef((track, trigger) => {
6257
6337
  let localValue;
6258
6338
  let prevSetValue = EMPTY_OBJ;
6259
6339
  let prevEmittedValue;
6260
6340
  watchSyncEffect(() => {
6261
- const propValue = props[name];
6341
+ const propValue = props[camelizedName];
6262
6342
  if (hasChanged(localValue, propValue)) {
6263
6343
  localValue = propValue;
6264
6344
  trigger();
@@ -6557,7 +6637,7 @@ function renderComponentRoot(instance) {
6557
6637
  }
6558
6638
  if (extraAttrs.length) {
6559
6639
  warn$1(
6560
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
6640
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
6561
6641
  );
6562
6642
  }
6563
6643
  if (eventAttrs.length) {
@@ -7340,9 +7420,9 @@ function closeBlock() {
7340
7420
  currentBlock = blockStack[blockStack.length - 1] || null;
7341
7421
  }
7342
7422
  let isBlockTreeEnabled = 1;
7343
- function setBlockTracking(value) {
7423
+ function setBlockTracking(value, inVOnce = false) {
7344
7424
  isBlockTreeEnabled += value;
7345
- if (value < 0 && currentBlock) {
7425
+ if (value < 0 && currentBlock && inVOnce) {
7346
7426
  currentBlock.hasOnce = true;
7347
7427
  }
7348
7428
  }
@@ -7618,7 +7698,7 @@ function normalizeVNode(child) {
7618
7698
  // #3666, avoid reference pollution when reusing vnode
7619
7699
  child.slice()
7620
7700
  );
7621
- } else if (typeof child === "object") {
7701
+ } else if (isVNode(child)) {
7622
7702
  return cloneIfMounted(child);
7623
7703
  } else {
7624
7704
  return createVNode(Text, null, String(child));
@@ -7887,9 +7967,9 @@ function setupStatefulComponent(instance, isSSR) {
7887
7967
  }
7888
7968
  const { setup } = Component;
7889
7969
  if (setup) {
7970
+ pauseTracking();
7890
7971
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
7891
7972
  const reset = setCurrentInstance(instance);
7892
- pauseTracking();
7893
7973
  const setupResult = callWithErrorHandling(
7894
7974
  setup,
7895
7975
  instance,
@@ -7899,10 +7979,13 @@ function setupStatefulComponent(instance, isSSR) {
7899
7979
  setupContext
7900
7980
  ]
7901
7981
  );
7982
+ const isAsyncSetup = isPromise(setupResult);
7902
7983
  resetTracking();
7903
7984
  reset();
7904
- if (isPromise(setupResult)) {
7905
- if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
7985
+ if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
7986
+ markAsyncBoundary(instance);
7987
+ }
7988
+ if (isAsyncSetup) {
7906
7989
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
7907
7990
  if (isSSR) {
7908
7991
  return setupResult.then((resolvedResult) => {
@@ -7968,7 +8051,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7968
8051
  const Component = instance.type;
7969
8052
  if (!instance.render) {
7970
8053
  if (!isSSR && compile && !Component.render) {
7971
- const template = Component.template || resolveMergedOptions(instance).template;
8054
+ const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;
7972
8055
  if (template) {
7973
8056
  if (!!(process.env.NODE_ENV !== "production")) {
7974
8057
  startMeasure(instance, `compile`);
@@ -8377,7 +8460,7 @@ function isMemoSame(cached, memo) {
8377
8460
  return true;
8378
8461
  }
8379
8462
 
8380
- const version = "3.5.6";
8463
+ const version = "3.5.13";
8381
8464
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8382
8465
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8383
8466
  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.5.11",
3
+ "version": "3.5.13",
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.5.6",
50
- "@vue/reactivity": "npm:@cabloy/vue-reactivity@3.5.11"
49
+ "@vue/shared": "3.5.13",
50
+ "@vue/reactivity": "npm:@cabloy/vue-reactivity@3.5.13"
51
51
  }
52
52
  }