@cabloy/vue-runtime-core 3.5.10 → 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.
- package/dist/runtime-core.cjs.js +148 -54
- package/dist/runtime-core.cjs.prod.js +134 -48
- package/dist/runtime-core.d.ts +26 -25
- package/dist/runtime-core.esm-bundler.js +150 -56
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.5.
|
|
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 =
|
|
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 =
|
|
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 (!
|
|
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 =
|
|
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
|
|
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
|
|
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 =
|
|
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(
|
|
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 (
|
|
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
|
|
1073
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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")
|
|
1524
|
-
|
|
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(
|
|
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) =>
|
|
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;
|
|
@@ -2311,6 +2384,12 @@ function forEachElement(node, cb) {
|
|
|
2311
2384
|
}
|
|
2312
2385
|
|
|
2313
2386
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2387
|
+
function _getValidZova(instance) {
|
|
2388
|
+
while (instance) {
|
|
2389
|
+
if (instance.zova) return instance.zova;
|
|
2390
|
+
instance = instance.parent;
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2314
2393
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
2315
2394
|
// @__NO_SIDE_EFFECTS__
|
|
2316
2395
|
function defineAsyncComponent(source) {
|
|
@@ -2384,7 +2463,12 @@ function defineAsyncComponent(source) {
|
|
|
2384
2463
|
if (resolvedComp) {
|
|
2385
2464
|
doHydrate();
|
|
2386
2465
|
} else {
|
|
2387
|
-
|
|
2466
|
+
const zova = _getValidZova(instance);
|
|
2467
|
+
zova.meta.ssr._hydratingInc();
|
|
2468
|
+
load().then(() => {
|
|
2469
|
+
!instance.isUnmounted && doHydrate();
|
|
2470
|
+
zova.meta.ssr._hydratingDec();
|
|
2471
|
+
});
|
|
2388
2472
|
}
|
|
2389
2473
|
},
|
|
2390
2474
|
get __asyncResolved() {
|
|
@@ -2926,12 +3010,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
2926
3010
|
}
|
|
2927
3011
|
openBlock();
|
|
2928
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;
|
|
2929
3016
|
const rendered = createBlock(
|
|
2930
3017
|
Fragment,
|
|
2931
3018
|
{
|
|
2932
|
-
key: (
|
|
2933
|
-
// key attached in the `createSlots` helper, respect that
|
|
2934
|
-
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
|
|
2935
3020
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
2936
3021
|
},
|
|
2937
3022
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -4293,6 +4378,7 @@ function getType(ctor) {
|
|
|
4293
4378
|
function validateProps(rawProps, props, instance) {
|
|
4294
4379
|
const resolvedValues = toRaw(props);
|
|
4295
4380
|
const options = instance.propsOptions[0];
|
|
4381
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
4296
4382
|
for (const key in options) {
|
|
4297
4383
|
let opt = options[key];
|
|
4298
4384
|
if (opt == null) continue;
|
|
@@ -4301,7 +4387,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
4301
4387
|
resolvedValues[key],
|
|
4302
4388
|
opt,
|
|
4303
4389
|
!!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues,
|
|
4304
|
-
!
|
|
4390
|
+
!camelizePropsKey.includes(key)
|
|
4305
4391
|
);
|
|
4306
4392
|
}
|
|
4307
4393
|
}
|
|
@@ -6154,14 +6240,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
6154
6240
|
}
|
|
6155
6241
|
const baseWatchOptions = extend({}, options);
|
|
6156
6242
|
if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
6243
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
6157
6244
|
let ssrCleanup;
|
|
6158
6245
|
if (isInSSRComponentSetup) {
|
|
6159
6246
|
if (flush === "sync") {
|
|
6160
6247
|
const ctx = useSSRContext();
|
|
6161
6248
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
6162
|
-
} else if (!
|
|
6163
|
-
baseWatchOptions.once = true;
|
|
6164
|
-
} else {
|
|
6249
|
+
} else if (!runsImmediately) {
|
|
6165
6250
|
const watchStopHandle = () => {
|
|
6166
6251
|
};
|
|
6167
6252
|
watchStopHandle.stop = NOOP;
|
|
@@ -6200,7 +6285,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
6200
6285
|
}
|
|
6201
6286
|
};
|
|
6202
6287
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
6203
|
-
if (
|
|
6288
|
+
if (isInSSRComponentSetup) {
|
|
6289
|
+
if (ssrCleanup) {
|
|
6290
|
+
ssrCleanup.push(watchHandle);
|
|
6291
|
+
} else if (runsImmediately) {
|
|
6292
|
+
watchHandle();
|
|
6293
|
+
}
|
|
6294
|
+
}
|
|
6204
6295
|
return watchHandle;
|
|
6205
6296
|
}
|
|
6206
6297
|
function instanceWatch(source, value, options) {
|
|
@@ -6235,19 +6326,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6235
6326
|
warn$1(`useModel() called without active instance.`);
|
|
6236
6327
|
return ref();
|
|
6237
6328
|
}
|
|
6238
|
-
|
|
6329
|
+
const camelizedName = camelize(name);
|
|
6330
|
+
if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][camelizedName]) {
|
|
6239
6331
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
6240
6332
|
return ref();
|
|
6241
6333
|
}
|
|
6242
|
-
const camelizedName = camelize(name);
|
|
6243
6334
|
const hyphenatedName = hyphenate(name);
|
|
6244
|
-
const modifiers = getModelModifiers(props,
|
|
6335
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
6245
6336
|
const res = customRef((track, trigger) => {
|
|
6246
6337
|
let localValue;
|
|
6247
6338
|
let prevSetValue = EMPTY_OBJ;
|
|
6248
6339
|
let prevEmittedValue;
|
|
6249
6340
|
watchSyncEffect(() => {
|
|
6250
|
-
const propValue = props[
|
|
6341
|
+
const propValue = props[camelizedName];
|
|
6251
6342
|
if (hasChanged(localValue, propValue)) {
|
|
6252
6343
|
localValue = propValue;
|
|
6253
6344
|
trigger();
|
|
@@ -6546,7 +6637,7 @@ function renderComponentRoot(instance) {
|
|
|
6546
6637
|
}
|
|
6547
6638
|
if (extraAttrs.length) {
|
|
6548
6639
|
warn$1(
|
|
6549
|
-
`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.`
|
|
6550
6641
|
);
|
|
6551
6642
|
}
|
|
6552
6643
|
if (eventAttrs.length) {
|
|
@@ -7329,9 +7420,9 @@ function closeBlock() {
|
|
|
7329
7420
|
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
7330
7421
|
}
|
|
7331
7422
|
let isBlockTreeEnabled = 1;
|
|
7332
|
-
function setBlockTracking(value) {
|
|
7423
|
+
function setBlockTracking(value, inVOnce = false) {
|
|
7333
7424
|
isBlockTreeEnabled += value;
|
|
7334
|
-
if (value < 0 && currentBlock) {
|
|
7425
|
+
if (value < 0 && currentBlock && inVOnce) {
|
|
7335
7426
|
currentBlock.hasOnce = true;
|
|
7336
7427
|
}
|
|
7337
7428
|
}
|
|
@@ -7607,7 +7698,7 @@ function normalizeVNode(child) {
|
|
|
7607
7698
|
// #3666, avoid reference pollution when reusing vnode
|
|
7608
7699
|
child.slice()
|
|
7609
7700
|
);
|
|
7610
|
-
} else if (
|
|
7701
|
+
} else if (isVNode(child)) {
|
|
7611
7702
|
return cloneIfMounted(child);
|
|
7612
7703
|
} else {
|
|
7613
7704
|
return createVNode(Text, null, String(child));
|
|
@@ -7876,9 +7967,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7876
7967
|
}
|
|
7877
7968
|
const { setup } = Component;
|
|
7878
7969
|
if (setup) {
|
|
7970
|
+
pauseTracking();
|
|
7879
7971
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
7880
7972
|
const reset = setCurrentInstance(instance);
|
|
7881
|
-
pauseTracking();
|
|
7882
7973
|
const setupResult = callWithErrorHandling(
|
|
7883
7974
|
setup,
|
|
7884
7975
|
instance,
|
|
@@ -7888,10 +7979,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7888
7979
|
setupContext
|
|
7889
7980
|
]
|
|
7890
7981
|
);
|
|
7982
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
7891
7983
|
resetTracking();
|
|
7892
7984
|
reset();
|
|
7893
|
-
if (
|
|
7894
|
-
|
|
7985
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
7986
|
+
markAsyncBoundary(instance);
|
|
7987
|
+
}
|
|
7988
|
+
if (isAsyncSetup) {
|
|
7895
7989
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
7896
7990
|
if (isSSR) {
|
|
7897
7991
|
return setupResult.then((resolvedResult) => {
|
|
@@ -7957,7 +8051,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7957
8051
|
const Component = instance.type;
|
|
7958
8052
|
if (!instance.render) {
|
|
7959
8053
|
if (!isSSR && compile && !Component.render) {
|
|
7960
|
-
const template = Component.template || resolveMergedOptions(instance).template;
|
|
8054
|
+
const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;
|
|
7961
8055
|
if (template) {
|
|
7962
8056
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7963
8057
|
startMeasure(instance, `compile`);
|
|
@@ -8366,7 +8460,7 @@ function isMemoSame(cached, memo) {
|
|
|
8366
8460
|
return true;
|
|
8367
8461
|
}
|
|
8368
8462
|
|
|
8369
|
-
const version = "3.5.
|
|
8463
|
+
const version = "3.5.13";
|
|
8370
8464
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8371
8465
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8372
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.
|
|
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.
|
|
50
|
-
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.5.
|
|
49
|
+
"@vue/shared": "3.5.13",
|
|
50
|
+
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.5.13"
|
|
51
51
|
}
|
|
52
52
|
}
|