@vue/runtime-core 3.6.0-rc.1 → 3.6.0-rc.11
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 +686 -462
- package/dist/runtime-core.cjs.prod.js +540 -383
- package/dist/runtime-core.d.ts +608 -608
- package/dist/runtime-core.esm-bundler.js +701 -464
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-core v3.6.0-rc.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -253,7 +253,9 @@ const SchedulerJobFlags = {
|
|
|
253
253
|
"ALLOW_RECURSE": 2,
|
|
254
254
|
"2": "ALLOW_RECURSE",
|
|
255
255
|
"DISPOSED": 4,
|
|
256
|
-
"4": "DISPOSED"
|
|
256
|
+
"4": "DISPOSED",
|
|
257
|
+
"REQUEUE_ON_SUSPENSE_DISCARD": 8,
|
|
258
|
+
"8": "REQUEUE_ON_SUSPENSE_DISCARD"
|
|
257
259
|
};
|
|
258
260
|
const jobs = [];
|
|
259
261
|
let postJobs = [];
|
|
@@ -262,7 +264,7 @@ let currentFlushPromise = null;
|
|
|
262
264
|
let jobsLength = 0;
|
|
263
265
|
let flushIndex = 0;
|
|
264
266
|
let postFlushIndex = 0;
|
|
265
|
-
const resolvedPromise =
|
|
267
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
266
268
|
const RECURSION_LIMIT = 100;
|
|
267
269
|
function nextTick(fn) {
|
|
268
270
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -301,6 +303,7 @@ const doFlushJobs = () => {
|
|
|
301
303
|
flushJobs();
|
|
302
304
|
} catch (e) {
|
|
303
305
|
currentFlushPromise = null;
|
|
306
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
304
307
|
throw e;
|
|
305
308
|
}
|
|
306
309
|
};
|
|
@@ -308,9 +311,10 @@ function queueFlush() {
|
|
|
308
311
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
309
312
|
}
|
|
310
313
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
311
|
-
if (!isArray(jobs))
|
|
312
|
-
|
|
313
|
-
|
|
314
|
+
if (!isArray(jobs)) {
|
|
315
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
316
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
317
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
314
318
|
queueFlush();
|
|
315
319
|
}
|
|
316
320
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -324,32 +328,39 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
324
328
|
i--;
|
|
325
329
|
jobsLength--;
|
|
326
330
|
if (cb.flags & 2) cb.flags &= -2;
|
|
327
|
-
|
|
328
|
-
|
|
331
|
+
try {
|
|
332
|
+
cb();
|
|
333
|
+
} finally {
|
|
334
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
335
|
+
}
|
|
329
336
|
}
|
|
330
337
|
}
|
|
331
338
|
function flushPostFlushCbs(seen) {
|
|
332
339
|
if (postJobs.length) {
|
|
333
340
|
if (activePostJobs) {
|
|
334
|
-
activePostJobs.push(
|
|
341
|
+
for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
|
|
335
342
|
postJobs.length = 0;
|
|
336
343
|
return;
|
|
337
344
|
}
|
|
338
345
|
activePostJobs = postJobs;
|
|
339
346
|
postJobs = [];
|
|
340
347
|
if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
cb
|
|
347
|
-
|
|
348
|
-
|
|
348
|
+
try {
|
|
349
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
350
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
351
|
+
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
|
|
352
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
353
|
+
if (!(cb.flags & 4)) try {
|
|
354
|
+
cb();
|
|
355
|
+
} finally {
|
|
356
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
357
|
+
}
|
|
349
358
|
}
|
|
359
|
+
} finally {
|
|
360
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
361
|
+
activePostJobs = null;
|
|
362
|
+
postFlushIndex = 0;
|
|
350
363
|
}
|
|
351
|
-
activePostJobs = null;
|
|
352
|
-
postFlushIndex = 0;
|
|
353
364
|
}
|
|
354
365
|
}
|
|
355
366
|
let isFlushing = false;
|
|
@@ -359,9 +370,12 @@ let isFlushing = false;
|
|
|
359
370
|
function flushOnAppMount(instance) {
|
|
360
371
|
if (!isFlushing) {
|
|
361
372
|
isFlushing = true;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
373
|
+
try {
|
|
374
|
+
flushPreFlushCbs(instance);
|
|
375
|
+
flushPostFlushCbs();
|
|
376
|
+
} finally {
|
|
377
|
+
isFlushing = false;
|
|
378
|
+
}
|
|
365
379
|
}
|
|
366
380
|
}
|
|
367
381
|
function flushJobs(seen) {
|
|
@@ -391,8 +405,8 @@ function flushJobs(seen) {
|
|
|
391
405
|
jobsLength = 0;
|
|
392
406
|
jobs.length = 0;
|
|
393
407
|
flushPostFlushCbs(seen);
|
|
394
|
-
currentFlushPromise = null;
|
|
395
408
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
409
|
+
else currentFlushPromise = null;
|
|
396
410
|
}
|
|
397
411
|
}
|
|
398
412
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -423,6 +437,19 @@ if (!!(process.env.NODE_ENV !== "production")) getGlobalThis().__VUE_HMR_RUNTIME
|
|
|
423
437
|
rerender: tryWrap(rerender),
|
|
424
438
|
reload: tryWrap(reload)
|
|
425
439
|
};
|
|
440
|
+
function runWithHmrUpdating(fn) {
|
|
441
|
+
isHmrUpdating = true;
|
|
442
|
+
let done = false;
|
|
443
|
+
try {
|
|
444
|
+
fn();
|
|
445
|
+
done = true;
|
|
446
|
+
} finally {
|
|
447
|
+
if (done) nextTick(() => {
|
|
448
|
+
isHmrUpdating = false;
|
|
449
|
+
});
|
|
450
|
+
else isHmrUpdating = false;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
426
453
|
const map = /* @__PURE__ */ new Map();
|
|
427
454
|
function registerHMR(instance) {
|
|
428
455
|
const id = instance.type.__hmrId;
|
|
@@ -464,18 +491,16 @@ function rerender(id, newRender) {
|
|
|
464
491
|
instance.render = newRender;
|
|
465
492
|
normalizeClassComponent(instance.type).render = newRender;
|
|
466
493
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
494
|
+
runWithHmrUpdating(() => {
|
|
495
|
+
if (instance.vapor) {
|
|
496
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
497
|
+
} else {
|
|
498
|
+
const i = instance;
|
|
499
|
+
if (!(i.effect.flags & 1024)) {
|
|
500
|
+
i.renderCache = [];
|
|
501
|
+
i.effect.run();
|
|
502
|
+
}
|
|
475
503
|
}
|
|
476
|
-
}
|
|
477
|
-
nextTick(() => {
|
|
478
|
-
isHmrUpdating = false;
|
|
479
504
|
});
|
|
480
505
|
});
|
|
481
506
|
}
|
|
@@ -490,17 +515,19 @@ function reload(id, newComp) {
|
|
|
490
515
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
491
516
|
const dirtyInstances = new Set(instances);
|
|
492
517
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
if (
|
|
497
|
-
rerenderedParents.
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
518
|
+
runWithHmrUpdating(() => {
|
|
519
|
+
for (const instance of instances) {
|
|
520
|
+
const parent = instance.parent;
|
|
521
|
+
if (parent) {
|
|
522
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
523
|
+
rerenderedParents.add(parent);
|
|
524
|
+
parent.hmrRerender();
|
|
525
|
+
}
|
|
526
|
+
} else instance.hmrReload(newComp);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
502
529
|
} else {
|
|
503
|
-
const
|
|
530
|
+
const parents = /* @__PURE__ */ new Set();
|
|
504
531
|
const dirtyInstanceSet = new Set(instances);
|
|
505
532
|
for (const instance of instances) {
|
|
506
533
|
const oldComp = normalizeClassComponent(instance.type);
|
|
@@ -519,33 +546,23 @@ function reload(id, newComp) {
|
|
|
519
546
|
instance.ceReload(newComp.styles);
|
|
520
547
|
dirtyInstances.delete(instance);
|
|
521
548
|
} else if (instance.parent) {
|
|
522
|
-
|
|
523
|
-
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
524
|
-
let updates = parentUpdates.get(parent);
|
|
525
|
-
if (!updates) parentUpdates.set(parent, updates = []);
|
|
526
|
-
updates.push([instance, dirtyInstances]);
|
|
527
|
-
}
|
|
549
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
|
|
528
550
|
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
529
551
|
else if (typeof window !== "undefined") window.location.reload();
|
|
530
552
|
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
531
553
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
532
554
|
}
|
|
533
|
-
|
|
555
|
+
parents.forEach((parent) => {
|
|
534
556
|
queueJob(() => {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
557
|
+
runWithHmrUpdating(() => {
|
|
558
|
+
if (parent.vapor) parent.hmrRerender();
|
|
559
|
+
else {
|
|
560
|
+
const i = parent;
|
|
561
|
+
if (!(i.effect.flags & 1024)) {
|
|
562
|
+
i.renderCache = [];
|
|
563
|
+
i.effect.run();
|
|
564
|
+
}
|
|
542
565
|
}
|
|
543
|
-
}
|
|
544
|
-
nextTick(() => {
|
|
545
|
-
isHmrUpdating = false;
|
|
546
|
-
});
|
|
547
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
548
|
-
dirtyInstances.delete(instance);
|
|
549
566
|
});
|
|
550
567
|
});
|
|
551
568
|
});
|
|
@@ -615,20 +632,20 @@ function devtoolsInitApp(app, version) {
|
|
|
615
632
|
function devtoolsUnmountApp(app) {
|
|
616
633
|
emit$1("app:unmount", app);
|
|
617
634
|
}
|
|
618
|
-
const devtoolsComponentAdded =
|
|
619
|
-
const devtoolsComponentUpdated =
|
|
620
|
-
const _devtoolsComponentRemoved =
|
|
635
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
636
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
637
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
621
638
|
const devtoolsComponentRemoved = (component) => {
|
|
622
639
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
623
640
|
};
|
|
624
|
-
|
|
641
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
625
642
|
function createDevtoolsComponentHook(hook) {
|
|
626
643
|
return (component) => {
|
|
627
644
|
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
628
645
|
};
|
|
629
646
|
}
|
|
630
|
-
const devtoolsPerfStart =
|
|
631
|
-
const devtoolsPerfEnd =
|
|
647
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
648
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
632
649
|
function createDevtoolsPerformanceHook(hook) {
|
|
633
650
|
return (component, type, time) => {
|
|
634
651
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -891,7 +908,7 @@ function instanceWatch(source, value, options) {
|
|
|
891
908
|
}
|
|
892
909
|
const prev = setCurrentInstance(this);
|
|
893
910
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
894
|
-
|
|
911
|
+
restoreCurrentInstance(prev);
|
|
895
912
|
return res;
|
|
896
913
|
}
|
|
897
914
|
function createPathGetter(ctx, path) {
|
|
@@ -913,15 +930,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
|
|
|
913
930
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
914
931
|
const resolveTarget = (props, select) => {
|
|
915
932
|
const targetSelector = props && props.to;
|
|
916
|
-
if (isString(targetSelector))
|
|
917
|
-
|
|
918
|
-
|
|
933
|
+
if (isString(targetSelector)) {
|
|
934
|
+
if (!select) {
|
|
935
|
+
process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
936
|
+
return null;
|
|
937
|
+
} else {
|
|
938
|
+
const target = select(targetSelector);
|
|
939
|
+
if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
940
|
+
return target;
|
|
941
|
+
}
|
|
919
942
|
} else {
|
|
920
|
-
const target = select(targetSelector);
|
|
921
|
-
if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
922
|
-
return target;
|
|
923
|
-
}
|
|
924
|
-
else {
|
|
925
943
|
if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
926
944
|
return targetSelector;
|
|
927
945
|
}
|
|
@@ -959,7 +977,8 @@ const TeleportImpl = {
|
|
|
959
977
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
960
978
|
pendingMounts.delete(vnode);
|
|
961
979
|
if (isTeleportDisabled(vnode.props)) {
|
|
962
|
-
|
|
980
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
981
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
963
982
|
updateCssVars(vnode, true);
|
|
964
983
|
}
|
|
965
984
|
mountToTarget(vnode);
|
|
@@ -1068,15 +1087,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
1068
1087
|
const disabled = isTeleportDisabled(vnode.props);
|
|
1069
1088
|
if (target) {
|
|
1070
1089
|
const targetNode = target._lpa || target.firstChild;
|
|
1071
|
-
if (vnode.shapeFlag & 16)
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1090
|
+
if (vnode.shapeFlag & 16) {
|
|
1091
|
+
if (disabled) {
|
|
1092
|
+
hydrateDisabledTeleport(node, vnode);
|
|
1093
|
+
hydrateAnchor(target, targetNode);
|
|
1094
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
1095
|
+
} else {
|
|
1096
|
+
vnode.anchor = nextSibling(node);
|
|
1097
|
+
hydrateAnchor(target, targetNode);
|
|
1098
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
1099
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1100
|
+
}
|
|
1080
1101
|
}
|
|
1081
1102
|
updateCssVars(vnode, disabled);
|
|
1082
1103
|
} else if (disabled) {
|
|
@@ -1154,59 +1175,27 @@ const BaseTransitionPropsValidators = {
|
|
|
1154
1175
|
onAfterAppear: TransitionHookValidator,
|
|
1155
1176
|
onAppearCancelled: TransitionHookValidator
|
|
1156
1177
|
};
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1178
|
+
function isEmptyTransitionChild(vnode, instance) {
|
|
1179
|
+
if (vnode.type === Comment) return true;
|
|
1180
|
+
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
1181
|
+
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
1182
|
+
}
|
|
1161
1183
|
const BaseTransitionImpl = {
|
|
1162
1184
|
name: `BaseTransition`,
|
|
1163
1185
|
props: BaseTransitionPropsValidators,
|
|
1164
1186
|
setup(props, { slots }) {
|
|
1165
1187
|
const instance = getCurrentInstance();
|
|
1166
1188
|
const state = useTransitionState();
|
|
1189
|
+
let resumeAfterLeave;
|
|
1167
1190
|
return () => {
|
|
1168
|
-
const
|
|
1169
|
-
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
1191
|
+
const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
|
|
1170
1192
|
if (!child) return;
|
|
1171
1193
|
const rawProps = toRaw$1(props);
|
|
1172
1194
|
const { mode } = rawProps;
|
|
1173
1195
|
checkTransitionMode(mode);
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
|
|
1178
|
-
if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
|
|
1179
|
-
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
1180
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
1181
|
-
let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
|
|
1182
|
-
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
1183
|
-
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
1184
|
-
state.isLeaving = true;
|
|
1185
|
-
leavingHooks.afterLeave = () => {
|
|
1186
|
-
state.isLeaving = false;
|
|
1187
|
-
if (!(instance.job.flags & 4)) instance.update();
|
|
1188
|
-
delete leavingHooks.afterLeave;
|
|
1189
|
-
oldInnerChild = void 0;
|
|
1190
|
-
};
|
|
1191
|
-
return emptyPlaceholder(child);
|
|
1192
|
-
} else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
1193
|
-
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
|
|
1194
|
-
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
1195
|
-
el[leaveCbKey] = () => {
|
|
1196
|
-
earlyRemove();
|
|
1197
|
-
el[leaveCbKey] = void 0;
|
|
1198
|
-
delete enterHooks.delayedLeave;
|
|
1199
|
-
oldInnerChild = void 0;
|
|
1200
|
-
};
|
|
1201
|
-
enterHooks.delayedLeave = () => {
|
|
1202
|
-
delayedLeave();
|
|
1203
|
-
delete enterHooks.delayedLeave;
|
|
1204
|
-
oldInnerChild = void 0;
|
|
1205
|
-
};
|
|
1206
|
-
};
|
|
1207
|
-
else oldInnerChild = void 0;
|
|
1208
|
-
} else if (oldInnerChild) oldInnerChild = void 0;
|
|
1209
|
-
return child;
|
|
1196
|
+
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
1197
|
+
if (!(instance.job.flags & 4)) instance.update();
|
|
1198
|
+
}) : NOOP);
|
|
1210
1199
|
};
|
|
1211
1200
|
}
|
|
1212
1201
|
};
|
|
@@ -1239,7 +1228,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
1239
1228
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
1240
1229
|
const key = String(vnode.key);
|
|
1241
1230
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
1242
|
-
|
|
1231
|
+
const hooks = baseResolveTransitionHooks({
|
|
1243
1232
|
isLeaving: () => leavingVNodesCache[key] === vnode,
|
|
1244
1233
|
setLeavingNodeCache: () => {
|
|
1245
1234
|
leavingVNodesCache[key] = vnode;
|
|
@@ -1257,6 +1246,13 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1257
1246
|
return hooks;
|
|
1258
1247
|
}
|
|
1259
1248
|
}, props, state, instance);
|
|
1249
|
+
if (vnode.type === VaporSlot) extend(hooks, {
|
|
1250
|
+
__vapor: true,
|
|
1251
|
+
props,
|
|
1252
|
+
state,
|
|
1253
|
+
instance
|
|
1254
|
+
});
|
|
1255
|
+
return hooks;
|
|
1260
1256
|
}
|
|
1261
1257
|
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
1262
1258
|
const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
|
|
@@ -1276,8 +1272,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
1276
1272
|
persisted,
|
|
1277
1273
|
beforeEnter(el) {
|
|
1278
1274
|
let hook = onBeforeEnter;
|
|
1279
|
-
if (!state.isMounted)
|
|
1280
|
-
|
|
1275
|
+
if (!state.isMounted) {
|
|
1276
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
1277
|
+
else return;
|
|
1278
|
+
}
|
|
1281
1279
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
1282
1280
|
earlyRemove();
|
|
1283
1281
|
callHook(hook, [el]);
|
|
@@ -1287,11 +1285,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
1287
1285
|
let hook = onEnter;
|
|
1288
1286
|
let afterHook = onAfterEnter;
|
|
1289
1287
|
let cancelHook = onEnterCancelled;
|
|
1290
|
-
if (!state.isMounted)
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1288
|
+
if (!state.isMounted) {
|
|
1289
|
+
if (appear) {
|
|
1290
|
+
hook = onAppear || onEnter;
|
|
1291
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
1292
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
1293
|
+
} else return;
|
|
1294
|
+
}
|
|
1295
1295
|
let called = false;
|
|
1296
1296
|
el[enterCbKey] = (cancelled) => {
|
|
1297
1297
|
if (called) return;
|
|
@@ -1325,7 +1325,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
1325
1325
|
else done();
|
|
1326
1326
|
},
|
|
1327
1327
|
clone(node) {
|
|
1328
|
-
return cloneHooks(node);
|
|
1328
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
1329
1329
|
}
|
|
1330
1330
|
};
|
|
1331
1331
|
return hooks;
|
|
@@ -1349,16 +1349,102 @@ function getInnerChild$1(vnode) {
|
|
|
1349
1349
|
if (shapeFlag & 32 && isFunction(children.default)) return children.default();
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
+
function resolveTransitionChild(children, renderEmpty = false) {
|
|
1353
|
+
const branches = children && getTransitionRawChildren(children, true);
|
|
1354
|
+
return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* @internal
|
|
1358
|
+
*/
|
|
1359
|
+
function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
|
|
1360
|
+
if (state.isLeaving) return emptyPlaceholder(next);
|
|
1361
|
+
const nextInner = getInnerChild$1(next);
|
|
1362
|
+
if (!nextInner) return emptyPlaceholder(next);
|
|
1363
|
+
let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
|
|
1364
|
+
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
1365
|
+
enterHooks = hooks;
|
|
1366
|
+
});
|
|
1367
|
+
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
1368
|
+
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
1369
|
+
const mode = props.mode;
|
|
1370
|
+
const previousInner = previous && getInnerChild$1(previous);
|
|
1371
|
+
if (previous && previousInner && !isSameVNodeType(previousInner, nextInner) && !isEmptyTransitionChild(previousInner, instance)) {
|
|
1372
|
+
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
1373
|
+
if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
|
|
1374
|
+
}
|
|
1375
|
+
return next;
|
|
1376
|
+
}
|
|
1377
|
+
function forwardDelayedLeave(hooks, source) {
|
|
1378
|
+
const delayedLeave = source && source.delayedLeave;
|
|
1379
|
+
if (!delayedLeave) return;
|
|
1380
|
+
hooks.delayedLeave = () => {
|
|
1381
|
+
if (source.delayedLeave === delayedLeave) delayedLeave();
|
|
1382
|
+
delete hooks.delayedLeave;
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
/**
|
|
1386
|
+
* Prepares an outgoing VNode when the incoming branch belongs to another
|
|
1387
|
+
* renderer. Returns true when out-in must defer the incoming branch.
|
|
1388
|
+
*
|
|
1389
|
+
* @internal
|
|
1390
|
+
*/
|
|
1391
|
+
function prepareTransitionLeave(previous, enterHooks, props, state, instance, resumeAfterLeave) {
|
|
1392
|
+
const previousInner = getInnerChild$1(previous);
|
|
1393
|
+
if (!previousInner || isEmptyTransitionChild(previousInner, instance)) return false;
|
|
1394
|
+
return applyTransitionModeSwitch(previousInner, prepareLeavingTransitionHooks(previousInner, props, state, instance), enterHooks ? () => enterHooks : void 0, props, state, resumeAfterLeave);
|
|
1395
|
+
}
|
|
1396
|
+
function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
|
|
1397
|
+
return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
|
|
1398
|
+
}
|
|
1399
|
+
function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
|
|
1400
|
+
if (props.mode === "out-in") {
|
|
1401
|
+
state.isLeaving = true;
|
|
1402
|
+
leavingHooks.afterLeave = () => {
|
|
1403
|
+
state.isLeaving = false;
|
|
1404
|
+
resumeAfterLeave();
|
|
1405
|
+
delete leavingHooks.afterLeave;
|
|
1406
|
+
};
|
|
1407
|
+
return true;
|
|
1408
|
+
} else if (props.mode === "in-out" && getEnterHooks) {
|
|
1409
|
+
let delayedLeavingVNode = leavingVNode;
|
|
1410
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
1411
|
+
const enterHooks = getEnterHooks();
|
|
1412
|
+
if (!enterHooks) {
|
|
1413
|
+
delayedLeave();
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
const vnode = delayedLeavingVNode;
|
|
1417
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
1418
|
+
leavingVNodesCache[String(vnode.key)] = vnode;
|
|
1419
|
+
el[leaveCbKey] = () => {
|
|
1420
|
+
earlyRemove();
|
|
1421
|
+
el[leaveCbKey] = void 0;
|
|
1422
|
+
delete enterHooks.delayedLeave;
|
|
1423
|
+
delayedLeavingVNode = void 0;
|
|
1424
|
+
};
|
|
1425
|
+
enterHooks.delayedLeave = () => {
|
|
1426
|
+
delayedLeave();
|
|
1427
|
+
delete enterHooks.delayedLeave;
|
|
1428
|
+
delayedLeavingVNode = void 0;
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
return false;
|
|
1433
|
+
}
|
|
1352
1434
|
function setTransitionHooks(vnode, hooks) {
|
|
1353
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
1354
|
-
else {
|
|
1435
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
1355
1436
|
vnode.transition = hooks;
|
|
1356
|
-
setTransitionHooks(vnode.component
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1437
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
1438
|
+
else {
|
|
1439
|
+
const subTree = vnode.component.subTree;
|
|
1440
|
+
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
1441
|
+
}
|
|
1442
|
+
} else if (vnode.shapeFlag & 128) {
|
|
1443
|
+
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
1444
|
+
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1445
|
+
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
1361
1446
|
} else vnode.transition = hooks;
|
|
1447
|
+
return hooks;
|
|
1362
1448
|
}
|
|
1363
1449
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
1364
1450
|
let ret = [];
|
|
@@ -1382,9 +1468,9 @@ function checkTransitionMode(mode) {
|
|
|
1382
1468
|
}
|
|
1383
1469
|
//#endregion
|
|
1384
1470
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
1385
|
-
|
|
1471
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1386
1472
|
function defineComponent(options, extraOptions) {
|
|
1387
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
1473
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
1388
1474
|
}
|
|
1389
1475
|
//#endregion
|
|
1390
1476
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -1481,15 +1567,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1481
1567
|
if (rawRef.f) {
|
|
1482
1568
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
1483
1569
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
1484
|
-
else if (!isArray(existing))
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1570
|
+
else if (!isArray(existing)) {
|
|
1571
|
+
if (_isString) {
|
|
1572
|
+
refs[ref] = [refValue];
|
|
1573
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
1574
|
+
} else {
|
|
1575
|
+
const newVal = [refValue];
|
|
1576
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
1577
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
1578
|
+
}
|
|
1579
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
1493
1580
|
} else if (_isString) {
|
|
1494
1581
|
refs[ref] = value;
|
|
1495
1582
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -1550,7 +1637,18 @@ const logMismatchError = () => {
|
|
|
1550
1637
|
hasLoggedMismatchError = true;
|
|
1551
1638
|
};
|
|
1552
1639
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
1553
|
-
const isMathMLContainer = (container) =>
|
|
1640
|
+
const isMathMLContainer = (container) => {
|
|
1641
|
+
if (!container.namespaceURI.includes("MathML")) return false;
|
|
1642
|
+
if (container.tagName !== "annotation-xml") return true;
|
|
1643
|
+
const encoding = container.getAttribute("encoding");
|
|
1644
|
+
return !encoding || !encoding.includes("html");
|
|
1645
|
+
};
|
|
1646
|
+
/**
|
|
1647
|
+
* Resolve the element namespace a container's children should be created in.
|
|
1648
|
+
* The live DOM is the source of truth, so this also covers containers that are
|
|
1649
|
+
* only known at runtime (interop boundaries, teleport targets).
|
|
1650
|
+
* @internal
|
|
1651
|
+
*/
|
|
1554
1652
|
const getContainerType = (container) => {
|
|
1555
1653
|
if (container.nodeType !== 1) return void 0;
|
|
1556
1654
|
if (isSVGContainer(container)) return "svg";
|
|
@@ -1576,7 +1674,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1576
1674
|
};
|
|
1577
1675
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
1578
1676
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
1579
|
-
const isFragmentStart = isComment(node) && node.data === "[";
|
|
1677
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
1580
1678
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
1581
1679
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
1582
1680
|
let domType = node.nodeType;
|
|
@@ -1592,11 +1690,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1592
1690
|
let nextNode = null;
|
|
1593
1691
|
switch (type) {
|
|
1594
1692
|
case Text:
|
|
1595
|
-
if (domType !== 3)
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1693
|
+
if (domType !== 3) {
|
|
1694
|
+
if (vnode.children === "") {
|
|
1695
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
1696
|
+
nextNode = node;
|
|
1697
|
+
} else nextNode = onMismatch();
|
|
1698
|
+
} else {
|
|
1600
1699
|
if (node.data !== vnode.children) {
|
|
1601
1700
|
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
1602
1701
|
logMismatchError();
|
|
@@ -1633,45 +1732,35 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1633
1732
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1634
1733
|
break;
|
|
1635
1734
|
case VaporSlot:
|
|
1636
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
1735
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
1637
1736
|
break;
|
|
1638
|
-
default: if (shapeFlag & 1)
|
|
1639
|
-
|
|
1640
|
-
|
|
1737
|
+
default: if (shapeFlag & 1) {
|
|
1738
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
1739
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1740
|
+
} else if (shapeFlag & 6) {
|
|
1641
1741
|
vnode.slotScopeIds = slotScopeIds;
|
|
1642
1742
|
const container = parentNode(node);
|
|
1643
1743
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
1644
1744
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
1645
1745
|
else nextNode = nextSibling(node);
|
|
1646
|
-
if (vnode.type.__vapor)
|
|
1647
|
-
|
|
1648
|
-
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
1649
|
-
if (vnode.dirs) {
|
|
1650
|
-
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
1651
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
1652
|
-
}
|
|
1653
|
-
}, () => {
|
|
1654
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
1655
|
-
});
|
|
1656
|
-
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
1657
|
-
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
1658
|
-
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
1659
|
-
} else {
|
|
1746
|
+
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
1747
|
+
else {
|
|
1660
1748
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
1661
1749
|
const component = vnode.component;
|
|
1662
|
-
if (isAsyncWrapper(vnode)
|
|
1750
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
|
|
1663
1751
|
let subTree;
|
|
1664
1752
|
if (isFragmentStart) {
|
|
1665
|
-
subTree = createVNode(
|
|
1753
|
+
subTree = createVNode(Static);
|
|
1666
1754
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
1667
|
-
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
1755
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
|
|
1668
1756
|
subTree.el = node;
|
|
1669
1757
|
component.subTree = subTree;
|
|
1670
1758
|
}
|
|
1671
1759
|
}
|
|
1672
|
-
} else if (shapeFlag & 64)
|
|
1673
|
-
|
|
1674
|
-
|
|
1760
|
+
} else if (shapeFlag & 64) {
|
|
1761
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
1762
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
1763
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
1675
1764
|
else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
1676
1765
|
}
|
|
1677
1766
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -1725,7 +1814,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1725
1814
|
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
1726
1815
|
for (const key in props) {
|
|
1727
1816
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
1728
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key))
|
|
1817
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
1818
|
+
if (isUnchangedResourceProp(el, key, props[key])) continue;
|
|
1819
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
1820
|
+
}
|
|
1729
1821
|
}
|
|
1730
1822
|
} else if (props.onClick) patchProp(el, "onClick", null, props.onClick, void 0, parentComponent);
|
|
1731
1823
|
else if (patchFlag & 4 && isReactive$1(props.style)) for (const key in props.style) props.style[key];
|
|
@@ -1775,8 +1867,9 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1775
1867
|
const { slotScopeIds: fragmentSlotScopeIds } = vnode;
|
|
1776
1868
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
1777
1869
|
const container = parentNode(node);
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1870
|
+
const first = nextSibling(node);
|
|
1871
|
+
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1872
|
+
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
1780
1873
|
else {
|
|
1781
1874
|
logMismatchError();
|
|
1782
1875
|
insert(vnode.anchor = createComment(`]`), container, next);
|
|
@@ -1785,7 +1878,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1785
1878
|
};
|
|
1786
1879
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
1787
1880
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
1788
|
-
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
1881
|
+
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
1789
1882
|
logMismatchError();
|
|
1790
1883
|
}
|
|
1791
1884
|
vnode.el = null;
|
|
@@ -1801,20 +1894,22 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1801
1894
|
const container = parentNode(node);
|
|
1802
1895
|
remove(node);
|
|
1803
1896
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
1804
|
-
if (parentComponent) {
|
|
1897
|
+
if (parentComponent && parentComponent.vnode) {
|
|
1805
1898
|
parentComponent.vnode.el = vnode.el;
|
|
1806
1899
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
1807
1900
|
}
|
|
1808
1901
|
return next;
|
|
1809
1902
|
};
|
|
1810
|
-
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
1903
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
|
|
1811
1904
|
let match = 0;
|
|
1812
1905
|
while (node) {
|
|
1813
1906
|
node = nextSibling(node);
|
|
1814
1907
|
if (node && isComment(node)) {
|
|
1815
1908
|
if (node.data === open) match++;
|
|
1816
|
-
if (node.data === close)
|
|
1817
|
-
|
|
1909
|
+
if (node.data === close) {
|
|
1910
|
+
if (match === 0) return nextSibling(node);
|
|
1911
|
+
else match--;
|
|
1912
|
+
}
|
|
1818
1913
|
}
|
|
1819
1914
|
}
|
|
1820
1915
|
return node;
|
|
@@ -1824,7 +1919,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1824
1919
|
if (parentNode) parentNode.replaceChild(newNode, oldNode);
|
|
1825
1920
|
let parent = parentComponent;
|
|
1826
1921
|
while (parent) {
|
|
1827
|
-
if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
1922
|
+
if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
1828
1923
|
parent = parent.parent;
|
|
1829
1924
|
}
|
|
1830
1925
|
};
|
|
@@ -1833,6 +1928,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1833
1928
|
const isTemplateNode = (node) => {
|
|
1834
1929
|
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
1835
1930
|
};
|
|
1931
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
1932
|
+
"src",
|
|
1933
|
+
"srcset",
|
|
1934
|
+
"href",
|
|
1935
|
+
"poster"
|
|
1936
|
+
]);
|
|
1937
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
1938
|
+
if (!resourceProps.has(key)) return false;
|
|
1939
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
1940
|
+
}
|
|
1836
1941
|
/**
|
|
1837
1942
|
* Dev only
|
|
1838
1943
|
*/
|
|
@@ -1876,7 +1981,10 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
1876
1981
|
function getAttributeMismatch(el, key, clientValue) {
|
|
1877
1982
|
let actual;
|
|
1878
1983
|
let expected;
|
|
1879
|
-
if (
|
|
1984
|
+
if (key === "hidden") {
|
|
1985
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
1986
|
+
expected = normalizeHiddenValue(clientValue);
|
|
1987
|
+
} else if (isBooleanAttr(key)) {
|
|
1880
1988
|
actual = el.hasAttribute(key);
|
|
1881
1989
|
expected = includeBooleanAttr(clientValue);
|
|
1882
1990
|
} else if (clientValue == null) {
|
|
@@ -1904,6 +2012,11 @@ function warnPropMismatch(el, mismatchKey, mismatchType, actual, expected) {
|
|
|
1904
2012
|
}
|
|
1905
2013
|
return false;
|
|
1906
2014
|
}
|
|
2015
|
+
function normalizeHiddenValue(value) {
|
|
2016
|
+
if (!isRenderableAttrValue(value)) return false;
|
|
2017
|
+
if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
2018
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
2019
|
+
}
|
|
1907
2020
|
function toClassSet(str) {
|
|
1908
2021
|
return new Set(str.trim().split(/\s+/));
|
|
1909
2022
|
}
|
|
@@ -2054,16 +2167,18 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
2054
2167
|
return teardown;
|
|
2055
2168
|
};
|
|
2056
2169
|
function forEachElement(node, cb) {
|
|
2057
|
-
if (isComment(node) && node.data === "[") {
|
|
2170
|
+
if (isComment(node) && (node.data === "[" || node.data === "(")) {
|
|
2171
|
+
const open = node.data;
|
|
2172
|
+
const close = open === "[" ? "]" : ")";
|
|
2058
2173
|
let depth = 1;
|
|
2059
2174
|
let next = node.nextSibling;
|
|
2060
2175
|
while (next) {
|
|
2061
2176
|
if (next.nodeType === 1) {
|
|
2062
2177
|
if (cb(next) === false) break;
|
|
2063
2178
|
} else if (isComment(next)) {
|
|
2064
|
-
if (next.data ===
|
|
2179
|
+
if (next.data === close) {
|
|
2065
2180
|
if (--depth === 0) break;
|
|
2066
|
-
} else if (next.data ===
|
|
2181
|
+
} else if (next.data === open) depth++;
|
|
2067
2182
|
}
|
|
2068
2183
|
next = next.nextSibling;
|
|
2069
2184
|
}
|
|
@@ -2072,14 +2187,14 @@ function forEachElement(node, cb) {
|
|
|
2072
2187
|
//#endregion
|
|
2073
2188
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
2074
2189
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2075
|
-
|
|
2190
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2076
2191
|
function defineAsyncComponent(source) {
|
|
2077
2192
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
2078
2193
|
return /* @__PURE__ */ defineComponent({
|
|
2079
2194
|
name: "AsyncComponentWrapper",
|
|
2080
2195
|
__asyncLoader: load,
|
|
2081
2196
|
__asyncHydrate(el, instance, hydrate) {
|
|
2082
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
2197
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
2083
2198
|
},
|
|
2084
2199
|
get __asyncResolved() {
|
|
2085
2200
|
return getResolvedComp();
|
|
@@ -2198,10 +2313,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
2198
2313
|
* shared between core and vapor
|
|
2199
2314
|
* @internal
|
|
2200
2315
|
*/
|
|
2201
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
2316
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
2202
2317
|
const wasConnected = el.isConnected;
|
|
2203
2318
|
let patched = false;
|
|
2204
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
2319
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
2205
2320
|
const performHydrate = () => {
|
|
2206
2321
|
if (patched) {
|
|
2207
2322
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -2291,10 +2406,13 @@ const KeepAlive = {
|
|
|
2291
2406
|
});
|
|
2292
2407
|
let pendingCacheKey = null;
|
|
2293
2408
|
const cacheSubtree = () => {
|
|
2294
|
-
if (pendingCacheKey != null)
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2409
|
+
if (pendingCacheKey != null) {
|
|
2410
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
2411
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
2412
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
2413
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
2414
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
2415
|
+
}
|
|
2298
2416
|
};
|
|
2299
2417
|
onMounted(cacheSubtree);
|
|
2300
2418
|
onUpdated(cacheSubtree);
|
|
@@ -2451,7 +2569,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2451
2569
|
try {
|
|
2452
2570
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
2453
2571
|
} finally {
|
|
2454
|
-
|
|
2572
|
+
restoreCurrentInstance(prev);
|
|
2455
2573
|
setActiveSub(prevSub);
|
|
2456
2574
|
}
|
|
2457
2575
|
});
|
|
@@ -2536,23 +2654,25 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2536
2654
|
}
|
|
2537
2655
|
ret = new Array(source.length);
|
|
2538
2656
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
2539
|
-
} else if (typeof source === "number")
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2547
|
-
else {
|
|
2548
|
-
const keys = Object.keys(source);
|
|
2549
|
-
ret = new Array(keys.length);
|
|
2550
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2551
|
-
const key = keys[i];
|
|
2552
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
2657
|
+
} else if (typeof source === "number") {
|
|
2658
|
+
if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
|
|
2659
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
2660
|
+
ret = [];
|
|
2661
|
+
} else {
|
|
2662
|
+
ret = new Array(source);
|
|
2663
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2553
2664
|
}
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2665
|
+
} else if (isObject(source)) {
|
|
2666
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2667
|
+
else {
|
|
2668
|
+
const keys = Object.keys(source);
|
|
2669
|
+
ret = new Array(keys.length);
|
|
2670
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2671
|
+
const key = keys[i];
|
|
2672
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
} else ret = [];
|
|
2556
2676
|
if (cache) cache[index] = ret;
|
|
2557
2677
|
return ret;
|
|
2558
2678
|
}
|
|
@@ -2577,18 +2697,45 @@ function createSlots(slots, dynamicSlots) {
|
|
|
2577
2697
|
//#endregion
|
|
2578
2698
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
2579
2699
|
/**
|
|
2700
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
2701
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
2702
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
2703
|
+
* "which one". Internal to vapor interop.
|
|
2704
|
+
*/
|
|
2705
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
2706
|
+
/**
|
|
2707
|
+
* Invokes a VDOM slot fallback under the outlet owner that produced it, the
|
|
2708
|
+
* way `renderSlot` would have rendered it inline. Vapor interop invokes
|
|
2709
|
+
* fallbacks late, outside any render, so it passes the owner recorded on the
|
|
2710
|
+
* vapor slot vnode. Internal to vapor interop.
|
|
2711
|
+
*/
|
|
2712
|
+
function invokeSlotFallback(fallback, owner) {
|
|
2713
|
+
if (!owner) return fallback();
|
|
2714
|
+
const prev = setCurrentRenderingInstance(owner);
|
|
2715
|
+
const prevStackSize = blockStack.length;
|
|
2716
|
+
try {
|
|
2717
|
+
return fallback();
|
|
2718
|
+
} finally {
|
|
2719
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
2720
|
+
setCurrentRenderingInstance(prev);
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
/**
|
|
2580
2724
|
* Compiler runtime helper for rendering `<slot/>`
|
|
2581
2725
|
* @private
|
|
2582
2726
|
*/
|
|
2583
|
-
function renderSlot(slots, name, props
|
|
2727
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
2728
|
+
if (props == null) props = {};
|
|
2584
2729
|
let slot = slots[name];
|
|
2585
|
-
|
|
2586
|
-
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
2730
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
2587
2731
|
if (vaporSlot) {
|
|
2588
2732
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
2589
2733
|
ret.vs = {
|
|
2590
2734
|
slot: vaporSlot,
|
|
2591
|
-
fallback
|
|
2735
|
+
outlets: fallback ? [{
|
|
2736
|
+
fallback,
|
|
2737
|
+
owner: currentRenderingInstance
|
|
2738
|
+
}] : void 0
|
|
2592
2739
|
};
|
|
2593
2740
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
2594
2741
|
return ret;
|
|
@@ -2609,9 +2756,15 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
|
|
|
2609
2756
|
let rendered;
|
|
2610
2757
|
try {
|
|
2611
2758
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
2612
|
-
|
|
2759
|
+
let attached = false;
|
|
2760
|
+
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
2761
|
+
const interop = currentRenderingInstance.appContext.vapor;
|
|
2762
|
+
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
2763
|
+
}
|
|
2613
2764
|
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
2614
2765
|
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
2766
|
+
if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
|
|
2767
|
+
if (attached) rendered.vo = true;
|
|
2615
2768
|
} catch (err) {
|
|
2616
2769
|
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
2617
2770
|
throw err;
|
|
@@ -2629,10 +2782,6 @@ function ensureValidVNode(vnodes) {
|
|
|
2629
2782
|
return true;
|
|
2630
2783
|
}) ? vnodes : null;
|
|
2631
2784
|
}
|
|
2632
|
-
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
2633
|
-
let vaporSlot;
|
|
2634
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
2635
|
-
}
|
|
2636
2785
|
//#endregion
|
|
2637
2786
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
2638
2787
|
/**
|
|
@@ -2660,11 +2809,38 @@ const getPublicInstance = (i) => {
|
|
|
2660
2809
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
2661
2810
|
return getPublicInstance(i.parent);
|
|
2662
2811
|
};
|
|
2812
|
+
const resolveDevRootEl = (vnode) => {
|
|
2813
|
+
let found = false;
|
|
2814
|
+
while (true) {
|
|
2815
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
2816
|
+
const root = filterSingleRoot(vnode.children);
|
|
2817
|
+
if (!root) return;
|
|
2818
|
+
vnode = root;
|
|
2819
|
+
found = true;
|
|
2820
|
+
continue;
|
|
2821
|
+
}
|
|
2822
|
+
const component = vnode.component;
|
|
2823
|
+
if (component && component.subTree) {
|
|
2824
|
+
vnode = component.subTree;
|
|
2825
|
+
continue;
|
|
2826
|
+
}
|
|
2827
|
+
const suspense = vnode.suspense;
|
|
2828
|
+
if (suspense && suspense.activeBranch) {
|
|
2829
|
+
vnode = suspense.activeBranch;
|
|
2830
|
+
continue;
|
|
2831
|
+
}
|
|
2832
|
+
return found ? vnode.el : void 0;
|
|
2833
|
+
}
|
|
2834
|
+
};
|
|
2835
|
+
const getDevRootFragmentEl = (i) => {
|
|
2836
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
2837
|
+
return el === void 0 ? i.vnode.el : el;
|
|
2838
|
+
};
|
|
2663
2839
|
let publicPropertiesMap;
|
|
2664
2840
|
const getPublicPropertiesMap = () => {
|
|
2665
2841
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
2666
2842
|
$: (i) => i,
|
|
2667
|
-
$el: (i) => i.vnode.el,
|
|
2843
|
+
$el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
|
|
2668
2844
|
$data: (i) => i.data,
|
|
2669
2845
|
$props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.props) : i.props,
|
|
2670
2846
|
$attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.attrs) : i.attrs,
|
|
@@ -2770,7 +2946,7 @@ if (!!(process.env.NODE_ENV !== "production") && true) PublicInstanceProxyHandle
|
|
|
2770
2946
|
warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
|
|
2771
2947
|
return Reflect.ownKeys(target);
|
|
2772
2948
|
};
|
|
2773
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
2949
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
2774
2950
|
get(target, key) {
|
|
2775
2951
|
if (key === Symbol.unscopables) return;
|
|
2776
2952
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -2942,12 +3118,13 @@ function mergeDefaults(raw, defaults) {
|
|
|
2942
3118
|
for (const key in defaults) {
|
|
2943
3119
|
if (key.startsWith("__skip")) continue;
|
|
2944
3120
|
let opt = props[key];
|
|
2945
|
-
if (opt)
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
3121
|
+
if (opt) {
|
|
3122
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
3123
|
+
type: opt,
|
|
3124
|
+
default: defaults[key]
|
|
3125
|
+
};
|
|
3126
|
+
else opt.default = defaults[key];
|
|
3127
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
2951
3128
|
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
2952
3129
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
2953
3130
|
}
|
|
@@ -2997,37 +3174,32 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
2997
3174
|
function withAsyncContext(getAwaitable) {
|
|
2998
3175
|
const ctx = getCurrentGenericInstance();
|
|
2999
3176
|
const inSSRSetup = isInSSRComponentSetup;
|
|
3000
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
3001
3177
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
3002
3178
|
let awaitable = getAwaitable();
|
|
3003
3179
|
setCurrentInstance(null, void 0);
|
|
3004
3180
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
3005
3181
|
const restore = () => {
|
|
3006
|
-
const
|
|
3182
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
3007
3183
|
setCurrentInstance(ctx);
|
|
3008
3184
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
3009
|
-
|
|
3010
|
-
return () => {
|
|
3011
|
-
if (reset) reset();
|
|
3012
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
3013
|
-
};
|
|
3185
|
+
return stoppedScope;
|
|
3014
3186
|
};
|
|
3015
3187
|
const cleanup = () => {
|
|
3016
3188
|
setCurrentInstance(null, void 0);
|
|
3017
3189
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
3018
3190
|
};
|
|
3019
3191
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
3020
|
-
const
|
|
3192
|
+
const stoppedScope = restore();
|
|
3021
3193
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
3022
|
-
if (
|
|
3194
|
+
if (stoppedScope) stoppedScope.reset();
|
|
3023
3195
|
cleanup();
|
|
3024
3196
|
}));
|
|
3025
3197
|
throw e;
|
|
3026
3198
|
});
|
|
3027
3199
|
return [awaitable, () => {
|
|
3028
|
-
const
|
|
3200
|
+
const stoppedScope = restore();
|
|
3029
3201
|
Promise.resolve().then(() => {
|
|
3030
|
-
if (
|
|
3202
|
+
if (stoppedScope) stoppedScope.reset();
|
|
3031
3203
|
cleanup();
|
|
3032
3204
|
});
|
|
3033
3205
|
}];
|
|
@@ -3091,11 +3263,12 @@ function applyOptions(instance) {
|
|
|
3091
3263
|
const opt = computedOptions[key];
|
|
3092
3264
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
3093
3265
|
if (!!(process.env.NODE_ENV !== "production") && get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
3266
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
|
|
3267
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
3268
|
+
} : NOOP;
|
|
3094
3269
|
const c = computed({
|
|
3095
3270
|
get,
|
|
3096
|
-
set
|
|
3097
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
3098
|
-
} : NOOP
|
|
3271
|
+
set
|
|
3099
3272
|
});
|
|
3100
3273
|
Object.defineProperty(ctx, key, {
|
|
3101
3274
|
enumerable: true,
|
|
@@ -3152,9 +3325,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
3152
3325
|
for (const key in injectOptions) {
|
|
3153
3326
|
const opt = injectOptions[key];
|
|
3154
3327
|
let injected;
|
|
3155
|
-
if (isObject(opt))
|
|
3156
|
-
|
|
3157
|
-
|
|
3328
|
+
if (isObject(opt)) {
|
|
3329
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
3330
|
+
else injected = inject(opt.from || key);
|
|
3331
|
+
} else injected = inject(opt);
|
|
3158
3332
|
if (isRef$1(injected)) Object.defineProperty(ctx, key, {
|
|
3159
3333
|
enumerable: true,
|
|
3160
3334
|
configurable: true,
|
|
@@ -3175,13 +3349,14 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3175
3349
|
if (isFunction(handler)) watch(getter, handler);
|
|
3176
3350
|
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3177
3351
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
3178
|
-
else if (isObject(raw))
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3352
|
+
else if (isObject(raw)) {
|
|
3353
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
3354
|
+
else {
|
|
3355
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
3356
|
+
if (isFunction(handler)) watch(getter, handler, raw);
|
|
3357
|
+
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3358
|
+
}
|
|
3359
|
+
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
|
|
3185
3360
|
}
|
|
3186
3361
|
/**
|
|
3187
3362
|
* Resolve merged options and cache it on the component.
|
|
@@ -3267,7 +3442,7 @@ function mergeObjectOptions(to, from) {
|
|
|
3267
3442
|
}
|
|
3268
3443
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
3269
3444
|
if (to) {
|
|
3270
|
-
if (isArray(to) && isArray(from)) return [
|
|
3445
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
3271
3446
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
3272
3447
|
} else return from;
|
|
3273
3448
|
}
|
|
@@ -3392,8 +3567,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
3392
3567
|
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Cannot unmount an app that is not mounted.`);
|
|
3393
3568
|
},
|
|
3394
3569
|
provide(key, value) {
|
|
3395
|
-
if (!!(process.env.NODE_ENV !== "production") && key in context.provides)
|
|
3396
|
-
|
|
3570
|
+
if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
|
|
3571
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
3572
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
3573
|
+
}
|
|
3397
3574
|
context.provides[key] = value;
|
|
3398
3575
|
return app;
|
|
3399
3576
|
},
|
|
@@ -3432,13 +3609,17 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3432
3609
|
const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
|
|
3433
3610
|
const res = customRef$1((track, trigger) => {
|
|
3434
3611
|
let localValue;
|
|
3612
|
+
let prevPropValue = EMPTY_OBJ;
|
|
3435
3613
|
let prevSetValue = EMPTY_OBJ;
|
|
3436
3614
|
let prevEmittedValue;
|
|
3437
3615
|
watchSyncEffect(() => {
|
|
3438
3616
|
const propValue = props[camelizedName];
|
|
3439
|
-
if (hasChanged(
|
|
3440
|
-
|
|
3441
|
-
|
|
3617
|
+
if (hasChanged(prevPropValue, propValue)) {
|
|
3618
|
+
prevPropValue = propValue;
|
|
3619
|
+
if (hasChanged(localValue, propValue)) {
|
|
3620
|
+
localValue = propValue;
|
|
3621
|
+
trigger();
|
|
3622
|
+
}
|
|
3442
3623
|
}
|
|
3443
3624
|
});
|
|
3444
3625
|
return {
|
|
@@ -3500,12 +3681,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
3500
3681
|
if (instance.isUnmounted) return;
|
|
3501
3682
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3502
3683
|
const { emitsOptions, propsOptions } = instance;
|
|
3503
|
-
if (emitsOptions)
|
|
3504
|
-
if (!
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
if (
|
|
3684
|
+
if (emitsOptions) {
|
|
3685
|
+
if (!(event in emitsOptions) && true) {
|
|
3686
|
+
if (!propsOptions || !propsOptions[0] || !(toHandlerKey$1(camelize$1(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey$1(camelize$1(event))}" prop.`);
|
|
3687
|
+
} else {
|
|
3688
|
+
const validator = emitsOptions[event];
|
|
3689
|
+
if (isFunction(validator)) {
|
|
3690
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
3691
|
+
}
|
|
3509
3692
|
}
|
|
3510
3693
|
}
|
|
3511
3694
|
}
|
|
@@ -3514,7 +3697,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
3514
3697
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
3515
3698
|
if (modifiers) {
|
|
3516
3699
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
3517
|
-
if (modifiers.number) args =
|
|
3700
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
3518
3701
|
}
|
|
3519
3702
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
|
|
3520
3703
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -3645,8 +3828,9 @@ function renderComponentRoot(instance) {
|
|
|
3645
3828
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3646
3829
|
}
|
|
3647
3830
|
if (vnode.transition) {
|
|
3648
|
-
|
|
3649
|
-
|
|
3831
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
3832
|
+
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
|
|
3833
|
+
setTransitionHooks(child, vnode.transition);
|
|
3650
3834
|
}
|
|
3651
3835
|
if (!!(process.env.NODE_ENV !== "production") && setRoot) setRoot(root);
|
|
3652
3836
|
else result = root;
|
|
@@ -3697,18 +3881,21 @@ function filterSingleRoot(children, recurse = true) {
|
|
|
3697
3881
|
for (let i = 0; i < children.length; i++) {
|
|
3698
3882
|
const child = children[i];
|
|
3699
3883
|
if (isVNode(child)) {
|
|
3700
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3884
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
3885
|
+
if (singleRoot) return;
|
|
3886
|
+
else {
|
|
3887
|
+
singleRoot = child;
|
|
3888
|
+
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
3889
|
+
}
|
|
3704
3890
|
}
|
|
3705
3891
|
} else return;
|
|
3706
3892
|
}
|
|
3707
3893
|
return singleRoot;
|
|
3708
3894
|
}
|
|
3895
|
+
const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
|
|
3709
3896
|
const getFunctionalFallthrough = (attrs) => {
|
|
3710
3897
|
let res;
|
|
3711
|
-
for (const key in attrs) if (
|
|
3898
|
+
for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
|
|
3712
3899
|
return res;
|
|
3713
3900
|
};
|
|
3714
3901
|
const filterModelListeners = (attrs, props) => {
|
|
@@ -3820,16 +4007,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3820
4007
|
let key = propsToUpdate[i];
|
|
3821
4008
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
3822
4009
|
const value = rawProps[key];
|
|
3823
|
-
if (options)
|
|
3824
|
-
if (
|
|
3825
|
-
attrs[key]
|
|
3826
|
-
|
|
4010
|
+
if (options) {
|
|
4011
|
+
if (hasOwn(attrs, key)) {
|
|
4012
|
+
if (value !== attrs[key]) {
|
|
4013
|
+
attrs[key] = value;
|
|
4014
|
+
hasAttrsChanged = true;
|
|
4015
|
+
}
|
|
4016
|
+
} else {
|
|
4017
|
+
const camelizedKey = camelize$1(key);
|
|
4018
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
3827
4019
|
}
|
|
3828
|
-
} else {
|
|
3829
|
-
const camelizedKey = camelize$1(key);
|
|
3830
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
3831
|
-
}
|
|
3832
|
-
else if (value !== attrs[key]) {
|
|
4020
|
+
} else if (value !== attrs[key]) {
|
|
3833
4021
|
attrs[key] = value;
|
|
3834
4022
|
hasAttrsChanged = true;
|
|
3835
4023
|
}
|
|
@@ -3838,9 +4026,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3838
4026
|
} else {
|
|
3839
4027
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
3840
4028
|
let kebabKey;
|
|
3841
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
3842
|
-
if (
|
|
3843
|
-
|
|
4029
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
4030
|
+
if (options) {
|
|
4031
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
4032
|
+
} else delete props[key];
|
|
4033
|
+
}
|
|
3844
4034
|
if (attrs !== rawCurrentProps) {
|
|
3845
4035
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
3846
4036
|
delete attrs[key];
|
|
@@ -3859,9 +4049,10 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
3859
4049
|
if (isReservedProp(key)) continue;
|
|
3860
4050
|
const value = rawProps[key];
|
|
3861
4051
|
let camelKey;
|
|
3862
|
-
if (options && hasOwn(options, camelKey = camelize$1(key)))
|
|
3863
|
-
|
|
3864
|
-
|
|
4052
|
+
if (options && hasOwn(options, camelKey = camelize$1(key))) {
|
|
4053
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
4054
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
4055
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
3865
4056
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
3866
4057
|
attrs[key] = value;
|
|
3867
4058
|
hasAttrsChanged = true;
|
|
@@ -3908,7 +4099,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
3908
4099
|
const prev = setCurrentInstance(instance);
|
|
3909
4100
|
const props = toRaw$1(instance.props);
|
|
3910
4101
|
value = factory.call(null, props);
|
|
3911
|
-
|
|
4102
|
+
restoreCurrentInstance(prev);
|
|
3912
4103
|
return value;
|
|
3913
4104
|
}
|
|
3914
4105
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -4024,7 +4215,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
|
|
|
4024
4215
|
}
|
|
4025
4216
|
if (validator && !validator(value, !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(resolvedProps) : resolvedProps)) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
4026
4217
|
}
|
|
4027
|
-
const isSimpleType =
|
|
4218
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
4028
4219
|
/**
|
|
4029
4220
|
* dev only
|
|
4030
4221
|
*/
|
|
@@ -4137,12 +4328,13 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
4137
4328
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
4138
4329
|
if (vnode.shapeFlag & 32) {
|
|
4139
4330
|
const type = children._;
|
|
4140
|
-
if (type)
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4331
|
+
if (type) {
|
|
4332
|
+
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
4333
|
+
assignSlots(slots, children, optimized);
|
|
4334
|
+
trigger(instance, "set", "$slots");
|
|
4335
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
4336
|
+
else assignSlots(slots, children, optimized);
|
|
4337
|
+
} else {
|
|
4146
4338
|
needDeletionCheck = !children.$stable;
|
|
4147
4339
|
normalizeObjectSlots(children, slots, instance);
|
|
4148
4340
|
}
|
|
@@ -4160,7 +4352,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
4160
4352
|
let supported;
|
|
4161
4353
|
let perf;
|
|
4162
4354
|
let cachedNow = 0;
|
|
4163
|
-
const p =
|
|
4355
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
4164
4356
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = isSupported() ? perf.now() : Date.now());
|
|
4165
4357
|
/**
|
|
4166
4358
|
* @internal
|
|
@@ -4271,6 +4463,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4271
4463
|
optimized = false;
|
|
4272
4464
|
n2.dynamicChildren = null;
|
|
4273
4465
|
}
|
|
4466
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
4467
|
+
if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
|
|
4468
|
+
n2.dynamicChildren.hasOnce = true;
|
|
4469
|
+
}
|
|
4274
4470
|
const { type, ref, shapeFlag } = n2;
|
|
4275
4471
|
switch (type) {
|
|
4276
4472
|
case Text:
|
|
@@ -4287,7 +4483,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4287
4483
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4288
4484
|
break;
|
|
4289
4485
|
case VaporSlot:
|
|
4290
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
|
|
4486
|
+
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
4291
4487
|
break;
|
|
4292
4488
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4293
4489
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -4408,7 +4604,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4408
4604
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
4409
4605
|
};
|
|
4410
4606
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
4411
|
-
for (let i = start; i < children.length; i++)
|
|
4607
|
+
for (let i = start; i < children.length; i++) {
|
|
4608
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
4609
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4610
|
+
}
|
|
4412
4611
|
};
|
|
4413
4612
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4414
4613
|
const el = n2.el = n1.el;
|
|
@@ -4420,6 +4619,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4420
4619
|
let vnodeHook;
|
|
4421
4620
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
4422
4621
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4622
|
+
if (n2.ibu) n2.ibu();
|
|
4423
4623
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4424
4624
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
4425
4625
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -4453,8 +4653,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4453
4653
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
4454
4654
|
}
|
|
4455
4655
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
4456
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
4656
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
4457
4657
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4658
|
+
n2.iu && n2.iu();
|
|
4458
4659
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
4459
4660
|
}, void 0, parentSuspense);
|
|
4460
4661
|
};
|
|
@@ -4462,7 +4663,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4462
4663
|
for (let i = 0; i < newChildren.length; i++) {
|
|
4463
4664
|
const oldVNode = oldChildren[i];
|
|
4464
4665
|
const newVNode = newChildren[i];
|
|
4465
|
-
|
|
4666
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
4667
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
4466
4668
|
}
|
|
4467
4669
|
};
|
|
4468
4670
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -4501,41 +4703,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4501
4703
|
};
|
|
4502
4704
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4503
4705
|
n2.slotScopeIds = slotScopeIds;
|
|
4504
|
-
if (n2.type.__vapor)
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
4514
|
-
});
|
|
4515
|
-
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4516
|
-
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
4517
|
-
if (vnodeMountedHook) {
|
|
4518
|
-
const scopedVNode = n2;
|
|
4519
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
4520
|
-
}
|
|
4521
|
-
}
|
|
4522
|
-
else {
|
|
4523
|
-
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
4524
|
-
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
4525
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4526
|
-
}, () => {
|
|
4527
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
4528
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
4529
|
-
});
|
|
4530
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
4531
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
4532
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
4533
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
4534
|
-
}, void 0, parentSuspense);
|
|
4535
|
-
}
|
|
4536
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
4537
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
4538
|
-
else updateComponent(n1, n2, optimized);
|
|
4706
|
+
if (n2.type.__vapor) {
|
|
4707
|
+
if (n1 == null) {
|
|
4708
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
4709
|
+
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
4710
|
+
} else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
|
|
4711
|
+
} else if (n1 == null) {
|
|
4712
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
4713
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
4714
|
+
} else updateComponent(n1, n2, optimized);
|
|
4539
4715
|
};
|
|
4540
4716
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
4541
4717
|
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
@@ -4580,16 +4756,18 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4580
4756
|
};
|
|
4581
4757
|
const updateComponent = (n1, n2, optimized) => {
|
|
4582
4758
|
const instance = n2.component = n1.component;
|
|
4583
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
4584
|
-
if (
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4759
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
4760
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
4761
|
+
if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
|
|
4762
|
+
n2.el = n1.el;
|
|
4763
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
4764
|
+
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
4765
|
+
return;
|
|
4766
|
+
} else {
|
|
4767
|
+
instance.next = n2;
|
|
4768
|
+
instance.effect.run();
|
|
4769
|
+
}
|
|
4588
4770
|
} else {
|
|
4589
|
-
instance.next = n2;
|
|
4590
|
-
instance.effect.run();
|
|
4591
|
-
}
|
|
4592
|
-
else {
|
|
4593
4771
|
n2.el = n1.el;
|
|
4594
4772
|
instance.vnode = n2;
|
|
4595
4773
|
}
|
|
@@ -4689,6 +4867,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4689
4867
|
} else next = vnode;
|
|
4690
4868
|
if (bu) invokeArrayFns(bu);
|
|
4691
4869
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
4870
|
+
if (next.ibu) next.ibu();
|
|
4692
4871
|
toggleRecurse(instance, true);
|
|
4693
4872
|
if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
|
|
4694
4873
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -4701,7 +4880,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4701
4880
|
next.el = nextTree.el;
|
|
4702
4881
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
4703
4882
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
4704
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
4883
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
4884
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
4885
|
+
next.iu && next.iu();
|
|
4886
|
+
}, void 0, parentSuspense);
|
|
4705
4887
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(instance);
|
|
4706
4888
|
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
4707
4889
|
}
|
|
@@ -4741,9 +4923,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4741
4923
|
if (shapeFlag & 8) {
|
|
4742
4924
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
4743
4925
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
4744
|
-
} else if (prevShapeFlag & 16)
|
|
4745
|
-
|
|
4746
|
-
|
|
4926
|
+
} else if (prevShapeFlag & 16) {
|
|
4927
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4928
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
4929
|
+
} else {
|
|
4747
4930
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
4748
4931
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4749
4932
|
}
|
|
@@ -4842,15 +5025,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4842
5025
|
const anchorVNode = c2[nextIndex + 1];
|
|
4843
5026
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
4844
5027
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4845
|
-
else if (moved)
|
|
4846
|
-
|
|
5028
|
+
else if (moved) {
|
|
5029
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
5030
|
+
else j--;
|
|
5031
|
+
}
|
|
4847
5032
|
}
|
|
4848
5033
|
}
|
|
4849
5034
|
};
|
|
4850
5035
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
4851
5036
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
4852
5037
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
4853
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
5038
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
4854
5039
|
return;
|
|
4855
5040
|
}
|
|
4856
5041
|
if (shapeFlag & 6) {
|
|
@@ -4875,54 +5060,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4875
5060
|
moveStaticNode(vnode, container, anchor);
|
|
4876
5061
|
return;
|
|
4877
5062
|
}
|
|
4878
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
const remove = () => {
|
|
5063
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
5064
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
5065
|
+
else performTransitionLeave(el, transition, () => {
|
|
4882
5066
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
4883
5067
|
else hostInsert(el, container, anchor);
|
|
4884
|
-
};
|
|
4885
|
-
|
|
4886
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
4887
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
4888
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
4889
|
-
else leave(el, () => {
|
|
4890
|
-
remove();
|
|
4891
|
-
afterLeave && afterLeave();
|
|
4892
|
-
});
|
|
4893
|
-
};
|
|
4894
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
4895
|
-
else performLeave();
|
|
4896
|
-
}
|
|
4897
|
-
else hostInsert(el, container, anchor);
|
|
5068
|
+
}, true, true);
|
|
5069
|
+
} else hostInsert(el, container, anchor);
|
|
4898
5070
|
};
|
|
4899
5071
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
4900
5072
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
4901
|
-
if (patchFlag === -2) optimized = false;
|
|
5073
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
|
|
4902
5074
|
if (ref != null) {
|
|
4903
5075
|
const prevSub = setActiveSub();
|
|
4904
5076
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
4905
5077
|
setActiveSub(prevSub);
|
|
4906
5078
|
}
|
|
4907
|
-
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
5079
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
4908
5080
|
if (shapeFlag & 256) {
|
|
4909
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
5081
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
4910
5082
|
else parentComponent.ctx.deactivate(vnode);
|
|
4911
5083
|
return;
|
|
4912
5084
|
}
|
|
5085
|
+
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
5086
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
5087
|
+
return;
|
|
5088
|
+
}
|
|
4913
5089
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
4914
5090
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4915
5091
|
let vnodeHook;
|
|
4916
5092
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4917
|
-
if (shapeFlag & 6)
|
|
4918
|
-
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4919
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
4920
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
4921
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4922
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4923
|
-
}, void 0, parentSuspense);
|
|
4924
|
-
return;
|
|
4925
|
-
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
5093
|
+
if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
4926
5094
|
else {
|
|
4927
5095
|
if (shapeFlag & 128) {
|
|
4928
5096
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
@@ -4933,7 +5101,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4933
5101
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
4934
5102
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
4935
5103
|
if (type === VaporSlot) {
|
|
4936
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
5104
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
4937
5105
|
return;
|
|
4938
5106
|
}
|
|
4939
5107
|
if (doRemove) remove(vnode);
|
|
@@ -4957,6 +5125,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4957
5125
|
}
|
|
4958
5126
|
if (type === Static) {
|
|
4959
5127
|
removeStaticNode(vnode);
|
|
5128
|
+
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
4960
5129
|
return;
|
|
4961
5130
|
}
|
|
4962
5131
|
if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
|
|
@@ -4981,7 +5150,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4981
5150
|
if (effect) {
|
|
4982
5151
|
effect.stop();
|
|
4983
5152
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
4984
|
-
} else if (
|
|
5153
|
+
} else if (instance.vnode.el && subTree) {
|
|
5154
|
+
subTree.transition = instance.vnode.transition;
|
|
5155
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
5156
|
+
}
|
|
4985
5157
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
4986
5158
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
4987
5159
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentRemoved(instance);
|
|
@@ -5055,12 +5227,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
5055
5227
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
5056
5228
|
}
|
|
5057
5229
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
5058
|
-
if (!vapor)
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5230
|
+
if (!vapor) {
|
|
5231
|
+
if (allowed) {
|
|
5232
|
+
effect.flags |= 128;
|
|
5233
|
+
job.flags |= 2;
|
|
5234
|
+
} else {
|
|
5235
|
+
effect.flags &= -129;
|
|
5236
|
+
job.flags &= -3;
|
|
5237
|
+
}
|
|
5064
5238
|
}
|
|
5065
5239
|
}
|
|
5066
5240
|
function needTransition(parentSuspense, transition) {
|
|
@@ -5100,8 +5274,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
5100
5274
|
}
|
|
5101
5275
|
function locateNonHydratedAsyncRoot(instance) {
|
|
5102
5276
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
5103
|
-
if (subComponent)
|
|
5104
|
-
|
|
5277
|
+
if (subComponent) {
|
|
5278
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
5279
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
5280
|
+
}
|
|
5105
5281
|
}
|
|
5106
5282
|
function invalidateMount(hooks) {
|
|
5107
5283
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -5120,13 +5296,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
5120
5296
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
5121
5297
|
const performRemove = () => {
|
|
5122
5298
|
remove();
|
|
5123
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
5299
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
5124
5300
|
};
|
|
5125
5301
|
if (force || isElement && transition && !transition.persisted) {
|
|
5126
5302
|
const { leave, delayLeave } = transition;
|
|
5127
5303
|
const performLeave = () => {
|
|
5304
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
5128
5305
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
5129
|
-
|
|
5306
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
5307
|
+
else leave(el, performRemove);
|
|
5130
5308
|
};
|
|
5131
5309
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
5132
5310
|
else performLeave();
|
|
@@ -5145,7 +5323,7 @@ function isVaporComponent(type) {
|
|
|
5145
5323
|
/**
|
|
5146
5324
|
* shared between vdom and vapor
|
|
5147
5325
|
*/
|
|
5148
|
-
function getInheritedScopeIds(vnode, parentComponent) {
|
|
5326
|
+
function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
|
|
5149
5327
|
const inheritedScopeIds = [];
|
|
5150
5328
|
let currentParent = parentComponent;
|
|
5151
5329
|
let currentVNode = vnode;
|
|
@@ -5161,6 +5339,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
|
|
|
5161
5339
|
currentParent = currentParent.parent;
|
|
5162
5340
|
} else break;
|
|
5163
5341
|
}
|
|
5342
|
+
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
5343
|
+
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
5164
5344
|
return inheritedScopeIds;
|
|
5165
5345
|
}
|
|
5166
5346
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
@@ -5179,7 +5359,7 @@ const Suspense = {
|
|
|
5179
5359
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
5180
5360
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
5181
5361
|
else {
|
|
5182
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
5362
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
5183
5363
|
n2.suspense = n1.suspense;
|
|
5184
5364
|
n2.suspense.vnode = n2;
|
|
5185
5365
|
n2.el = n1.el;
|
|
@@ -5217,10 +5397,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
5217
5397
|
if (pendingBranch) {
|
|
5218
5398
|
suspense.pendingBranch = newBranch;
|
|
5219
5399
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
5220
|
-
|
|
5400
|
+
suspense.deps++;
|
|
5401
|
+
patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
5402
|
+
suspense.deps--;
|
|
5221
5403
|
if (suspense.deps <= 0) suspense.resolve();
|
|
5222
5404
|
else if (isInFallback) {
|
|
5223
|
-
if (!isHydrating) {
|
|
5405
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
5224
5406
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
5225
5407
|
setActiveBranch(suspense, newFallback);
|
|
5226
5408
|
}
|
|
@@ -5232,12 +5414,16 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
5232
5414
|
suspense.activeBranch = pendingBranch;
|
|
5233
5415
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
5234
5416
|
suspense.deps = 0;
|
|
5417
|
+
for (let i = 0; i < suspense.effects.length; i++) {
|
|
5418
|
+
const effect = suspense.effects[i];
|
|
5419
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
5420
|
+
}
|
|
5235
5421
|
suspense.effects.length = 0;
|
|
5236
5422
|
suspense.hiddenContainer = createElement("div");
|
|
5237
5423
|
if (isInFallback) {
|
|
5238
5424
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
5239
5425
|
if (suspense.deps <= 0) suspense.resolve();
|
|
5240
|
-
else {
|
|
5426
|
+
else if (!suspense.isFallbackMountPending) {
|
|
5241
5427
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
5242
5428
|
setActiveBranch(suspense, newFallback);
|
|
5243
5429
|
}
|
|
@@ -5341,7 +5527,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5341
5527
|
let hasUnresolvedAncestor = false;
|
|
5342
5528
|
while (parent) {
|
|
5343
5529
|
if (parent.pendingBranch) {
|
|
5344
|
-
parent.effects.push(
|
|
5530
|
+
for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
|
|
5345
5531
|
hasUnresolvedAncestor = true;
|
|
5346
5532
|
break;
|
|
5347
5533
|
}
|
|
@@ -5351,6 +5537,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5351
5537
|
suspense.effects = [];
|
|
5352
5538
|
if (isSuspensible) {
|
|
5353
5539
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
5540
|
+
parentSuspenseId = void 0;
|
|
5354
5541
|
parentSuspense.deps--;
|
|
5355
5542
|
if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
|
|
5356
5543
|
}
|
|
@@ -5365,8 +5552,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5365
5552
|
const mountFallback = () => {
|
|
5366
5553
|
suspense.isFallbackMountPending = false;
|
|
5367
5554
|
if (!suspense.isInFallback) return;
|
|
5368
|
-
|
|
5369
|
-
|
|
5555
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
5556
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
5557
|
+
setActiveBranch(suspense, latestFallback);
|
|
5370
5558
|
};
|
|
5371
5559
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
5372
5560
|
if (delayEnter) {
|
|
@@ -5387,11 +5575,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5387
5575
|
registerDep(instance, onResolve) {
|
|
5388
5576
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
5389
5577
|
if (isInPendingSuspense) suspense.deps++;
|
|
5578
|
+
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
5390
5579
|
instance.asyncDep.catch((err) => {
|
|
5391
5580
|
handleError(err, instance, 0);
|
|
5392
5581
|
}).then((asyncSetupResult) => {
|
|
5393
5582
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
5394
5583
|
setCurrentInstance(null, void 0);
|
|
5584
|
+
if (hydratedEl && !instance.scope.active) {
|
|
5585
|
+
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
5586
|
+
return;
|
|
5587
|
+
}
|
|
5395
5588
|
instance.asyncResolved = true;
|
|
5396
5589
|
onResolve(asyncSetupResult);
|
|
5397
5590
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -5442,9 +5635,10 @@ function normalizeSuspenseSlot(s) {
|
|
|
5442
5635
|
return s;
|
|
5443
5636
|
}
|
|
5444
5637
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
5445
|
-
if (suspense && suspense.pendingBranch)
|
|
5446
|
-
|
|
5447
|
-
|
|
5638
|
+
if (suspense && suspense.pendingBranch) {
|
|
5639
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
5640
|
+
else suspense.effects.push(fn);
|
|
5641
|
+
} else queuePostFlushCb(fn, id);
|
|
5448
5642
|
}
|
|
5449
5643
|
function setActiveBranch(suspense, branch) {
|
|
5450
5644
|
suspense.activeBranch = branch;
|
|
@@ -5611,9 +5805,24 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
5611
5805
|
if (shapeFlag & 128) type.normalize(vnode);
|
|
5612
5806
|
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
5613
5807
|
if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
5808
|
+
if (!!(process.env.NODE_ENV !== "production") && props && vnode.shapeFlag & 1) {
|
|
5809
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
5810
|
+
if (overwritingProp && hasContentChildren(vnode.children)) warn$1(`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`);
|
|
5811
|
+
}
|
|
5614
5812
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
5615
5813
|
return vnode;
|
|
5616
5814
|
}
|
|
5815
|
+
/**
|
|
5816
|
+
* dev only
|
|
5817
|
+
* Whether children would actually render something. Empty text and empty
|
|
5818
|
+
* arrays are ignored, mirroring the compiler's `node.children.length` check
|
|
5819
|
+
* for `v-html` / `v-text`.
|
|
5820
|
+
*/
|
|
5821
|
+
function hasContentChildren(children) {
|
|
5822
|
+
if (isString(children)) return children !== "";
|
|
5823
|
+
if (isArray(children)) return children.length > 0;
|
|
5824
|
+
return false;
|
|
5825
|
+
}
|
|
5617
5826
|
const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
|
|
5618
5827
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
5619
5828
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -5623,8 +5832,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
5623
5832
|
if (isVNode(type)) {
|
|
5624
5833
|
const cloned = cloneVNode(type, props, true);
|
|
5625
5834
|
if (children) normalizeChildren(cloned, children);
|
|
5626
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
5627
|
-
|
|
5835
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
5836
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
5837
|
+
else currentBlock.push(cloned);
|
|
5838
|
+
}
|
|
5628
5839
|
cloned.patchFlag = -2;
|
|
5629
5840
|
return cloned;
|
|
5630
5841
|
}
|
|
@@ -5684,7 +5895,10 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
5684
5895
|
ce: vnode.ce,
|
|
5685
5896
|
vi: vnode.vi,
|
|
5686
5897
|
vs: cloneVaporSlotMeta(vnode),
|
|
5687
|
-
vb: vnode.vb
|
|
5898
|
+
vb: vnode.vb,
|
|
5899
|
+
ibu: vnode.ibu,
|
|
5900
|
+
iu: vnode.iu,
|
|
5901
|
+
cacheIndex: vnode.cacheIndex
|
|
5688
5902
|
};
|
|
5689
5903
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
5690
5904
|
return cloned;
|
|
@@ -5694,8 +5908,7 @@ function cloneVaporSlotMeta(vnode) {
|
|
|
5694
5908
|
if (!vaporSlot) return vaporSlot;
|
|
5695
5909
|
const cloned = {
|
|
5696
5910
|
slot: vaporSlot.slot,
|
|
5697
|
-
|
|
5698
|
-
outletFallback: vaporSlot.outletFallback
|
|
5911
|
+
outlets: vaporSlot.outlets
|
|
5699
5912
|
};
|
|
5700
5913
|
if (vnode.el) {
|
|
5701
5914
|
cloned.state = vaporSlot.state;
|
|
@@ -5747,25 +5960,28 @@ function normalizeChildren(vnode, children) {
|
|
|
5747
5960
|
const { shapeFlag } = vnode;
|
|
5748
5961
|
if (children == null) children = null;
|
|
5749
5962
|
else if (isArray(children)) type = 16;
|
|
5750
|
-
else if (typeof children === "object")
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5963
|
+
else if (typeof children === "object") {
|
|
5964
|
+
if (shapeFlag & 65) {
|
|
5965
|
+
const slot = children.default;
|
|
5966
|
+
if (slot) {
|
|
5967
|
+
slot._c && (slot._d = false);
|
|
5968
|
+
normalizeChildren(vnode, slot());
|
|
5969
|
+
slot._c && (slot._d = true);
|
|
5970
|
+
}
|
|
5971
|
+
return;
|
|
5972
|
+
} else {
|
|
5973
|
+
type = 32;
|
|
5974
|
+
const slotFlag = children._;
|
|
5975
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
5976
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
5977
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
5978
|
+
else {
|
|
5979
|
+
children._ = 2;
|
|
5980
|
+
vnode.patchFlag |= 1024;
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5766
5983
|
}
|
|
5767
|
-
}
|
|
5768
|
-
else if (isFunction(children)) {
|
|
5984
|
+
} else if (isFunction(children)) {
|
|
5769
5985
|
if (shapeFlag & 65) {
|
|
5770
5986
|
normalizeChildren(vnode, { default: children });
|
|
5771
5987
|
return;
|
|
@@ -5842,6 +6058,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
5842
6058
|
simpleSetCurrentInstance(instance);
|
|
5843
6059
|
}
|
|
5844
6060
|
};
|
|
6061
|
+
/**
|
|
6062
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
6063
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
6064
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
6065
|
+
* @internal
|
|
6066
|
+
*/
|
|
6067
|
+
const restoreCurrentInstance = (prev) => {
|
|
6068
|
+
setCurrentScope(prev[1]);
|
|
6069
|
+
simpleSetCurrentInstance(prev[0]);
|
|
6070
|
+
};
|
|
5845
6071
|
const internalOptions = [
|
|
5846
6072
|
"ce",
|
|
5847
6073
|
"type",
|
|
@@ -5873,7 +6099,7 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
5873
6099
|
};
|
|
5874
6100
|
//#endregion
|
|
5875
6101
|
//#region packages/runtime-core/src/component.ts
|
|
5876
|
-
const emptyAppContext =
|
|
6102
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
5877
6103
|
let uid = 0;
|
|
5878
6104
|
/**
|
|
5879
6105
|
* @internal for vapor
|
|
@@ -6002,7 +6228,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6002
6228
|
const setupResult = callWithErrorHandling(setup, instance, 0, [!!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(instance.props) : instance.props, setupContext]);
|
|
6003
6229
|
const isAsyncSetup = isPromise(setupResult);
|
|
6004
6230
|
setActiveSub(prevSub);
|
|
6005
|
-
|
|
6231
|
+
restoreCurrentInstance(prev);
|
|
6006
6232
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
6007
6233
|
if (isAsyncSetup) {
|
|
6008
6234
|
const unsetCurrentInstance = () => {
|
|
@@ -6010,7 +6236,12 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6010
6236
|
};
|
|
6011
6237
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
6012
6238
|
if (isSSR) return setupResult.then((resolvedResult) => {
|
|
6013
|
-
|
|
6239
|
+
setInSSRSetupState(true);
|
|
6240
|
+
try {
|
|
6241
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
6242
|
+
} finally {
|
|
6243
|
+
setInSSRSetupState(false);
|
|
6244
|
+
}
|
|
6014
6245
|
}).catch((e) => {
|
|
6015
6246
|
handleError(e, instance, 0);
|
|
6016
6247
|
});
|
|
@@ -6022,9 +6253,10 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6022
6253
|
} else finishComponentSetup(instance, isSSR);
|
|
6023
6254
|
}
|
|
6024
6255
|
function handleSetupResult(instance, setupResult, isSSR) {
|
|
6025
|
-
if (isFunction(setupResult))
|
|
6026
|
-
|
|
6027
|
-
|
|
6256
|
+
if (isFunction(setupResult)) {
|
|
6257
|
+
if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
|
|
6258
|
+
else instance.render = setupResult;
|
|
6259
|
+
} else if (isObject(setupResult)) {
|
|
6028
6260
|
if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) warn$1("setup() should not return VNodes directly - return a render function instead.");
|
|
6029
6261
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) instance.devtoolsRawSetupState = setupResult;
|
|
6030
6262
|
instance.setupState = proxyRefs$1(setupResult);
|
|
@@ -6072,13 +6304,15 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
6072
6304
|
applyOptions(instance);
|
|
6073
6305
|
} finally {
|
|
6074
6306
|
setActiveSub(prevSub);
|
|
6075
|
-
|
|
6307
|
+
restoreCurrentInstance(prevInstance);
|
|
6076
6308
|
}
|
|
6077
6309
|
}
|
|
6078
|
-
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR)
|
|
6310
|
+
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
6311
|
+
if (!compile && Component.template)
|
|
6079
6312
|
/* v8 ignore start */
|
|
6080
|
-
|
|
6081
|
-
|
|
6313
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
|
|
6314
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
6315
|
+
}
|
|
6082
6316
|
}
|
|
6083
6317
|
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
6084
6318
|
get(target, key) {
|
|
@@ -6151,14 +6385,13 @@ function getComponentPublicInstance(instance) {
|
|
|
6151
6385
|
if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs$1(markRaw$1(instance.exposed)), {
|
|
6152
6386
|
get(target, key) {
|
|
6153
6387
|
if (key in target) return target[key];
|
|
6154
|
-
else {
|
|
6388
|
+
else if (!instance.vapor) {
|
|
6155
6389
|
const publicPropertiesMap = getPublicPropertiesMap();
|
|
6156
6390
|
if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
|
|
6157
6391
|
}
|
|
6158
6392
|
},
|
|
6159
6393
|
has(target, key) {
|
|
6160
|
-
|
|
6161
|
-
return key in target || key in publicPropertiesMap;
|
|
6394
|
+
return key in target || !instance.vapor && key in getPublicPropertiesMap();
|
|
6162
6395
|
}
|
|
6163
6396
|
}));
|
|
6164
6397
|
else return instance.proxy;
|
|
@@ -6196,11 +6429,12 @@ function h(type, propsOrChildren, children) {
|
|
|
6196
6429
|
try {
|
|
6197
6430
|
setBlockTracking(-1);
|
|
6198
6431
|
const l = arguments.length;
|
|
6199
|
-
if (l === 2)
|
|
6200
|
-
if (
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6432
|
+
if (l === 2) {
|
|
6433
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
6434
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
6435
|
+
return createVNode(type, propsOrChildren);
|
|
6436
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
6437
|
+
} else {
|
|
6204
6438
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
6205
6439
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
6206
6440
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -6392,7 +6626,7 @@ function isMemoSame(cached, memo) {
|
|
|
6392
6626
|
}
|
|
6393
6627
|
//#endregion
|
|
6394
6628
|
//#region packages/runtime-core/src/index.ts
|
|
6395
|
-
const version = "3.6.0-rc.
|
|
6629
|
+
const version = "3.6.0-rc.11";
|
|
6396
6630
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
6397
6631
|
/**
|
|
6398
6632
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -6415,7 +6649,10 @@ const ssrUtils = {
|
|
|
6415
6649
|
getComponentPublicInstance,
|
|
6416
6650
|
ensureValidVNode,
|
|
6417
6651
|
pushWarningContext,
|
|
6418
|
-
popWarningContext
|
|
6652
|
+
popWarningContext,
|
|
6653
|
+
VaporSlot,
|
|
6654
|
+
rawVaporSlotKey,
|
|
6655
|
+
invokeSlotFallback
|
|
6419
6656
|
};
|
|
6420
6657
|
/**
|
|
6421
6658
|
* @internal only exposed in compat builds
|
|
@@ -6427,4 +6664,4 @@ const resolveFilter = null;
|
|
|
6427
6664
|
const compatUtils = null;
|
|
6428
6665
|
const DeprecationTypes = null;
|
|
6429
6666
|
//#endregion
|
|
6430
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode,
|
|
6667
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defaultPropGetter, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, expose, filterModelListeners, filterSingleRoot, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|