@vue/compat 3.6.0-beta.11 → 3.6.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-compat.d.ts +2 -2
- package/dist/vue.cjs.js +62 -54
- package/dist/vue.cjs.prod.js +59 -43
- package/dist/vue.esm-browser.js +61 -51
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +62 -52
- package/dist/vue.global.js +61 -51
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +61 -51
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +62 -52
- package/dist/vue.runtime.global.js +61 -51
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +2 -2
package/dist/vue-compat.d.ts
CHANGED
|
@@ -1025,9 +1025,9 @@ interface VaporInteropInterface {
|
|
|
1025
1025
|
activate(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance): void;
|
|
1026
1026
|
deactivate(vnode: VNode, container: any): void;
|
|
1027
1027
|
setTransitionHooks(component: ComponentInternalInstance, transition: TransitionHooks): void;
|
|
1028
|
-
vdomMount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any) => any;
|
|
1028
|
+
vdomMount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any, once?: boolean) => any;
|
|
1029
1029
|
vdomUnmount: UnmountComponentFn;
|
|
1030
|
-
vdomSlot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, fallback?: any) => any;
|
|
1030
|
+
vdomSlot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, fallback?: any, once?: boolean) => any;
|
|
1031
1031
|
vdomMountVNode: (vnode: VNode, parentComponent: any) => any;
|
|
1032
1032
|
}
|
|
1033
1033
|
/**
|
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -566,6 +566,13 @@ function warn$2(msg, ...args) {
|
|
|
566
566
|
const notifyBuffer = [];
|
|
567
567
|
let batchDepth = 0;
|
|
568
568
|
let activeSub = void 0;
|
|
569
|
+
let runDepth = 0;
|
|
570
|
+
function incRunDepth() {
|
|
571
|
+
++runDepth;
|
|
572
|
+
}
|
|
573
|
+
function decRunDepth() {
|
|
574
|
+
--runDepth;
|
|
575
|
+
}
|
|
569
576
|
let globalVersion = 0;
|
|
570
577
|
let notifyIndex = 0;
|
|
571
578
|
let notifyBufferLength = 0;
|
|
@@ -639,8 +646,10 @@ function propagate(link) {
|
|
|
639
646
|
const sub = link.sub;
|
|
640
647
|
let flags = sub.flags;
|
|
641
648
|
if (flags & 3) {
|
|
642
|
-
if (!(flags & 60))
|
|
643
|
-
|
|
649
|
+
if (!(flags & 60)) {
|
|
650
|
+
sub.flags = flags | 32;
|
|
651
|
+
if (runDepth) sub.flags |= 8;
|
|
652
|
+
} else if (!(flags & 12)) flags = 0;
|
|
644
653
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
645
654
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
646
655
|
sub.flags = flags | 40;
|
|
@@ -709,13 +718,13 @@ function checkDirty(link, sub) {
|
|
|
709
718
|
let dirty = false;
|
|
710
719
|
if (sub.flags & 16) dirty = true;
|
|
711
720
|
else if ((depFlags & 17) === 17) {
|
|
721
|
+
const subs = dep.subs;
|
|
712
722
|
if (dep.update()) {
|
|
713
|
-
const subs = dep.subs;
|
|
714
723
|
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
715
724
|
dirty = true;
|
|
716
725
|
}
|
|
717
726
|
} else if ((depFlags & 33) === 33) {
|
|
718
|
-
|
|
727
|
+
stack = {
|
|
719
728
|
value: link,
|
|
720
729
|
prev: stack
|
|
721
730
|
};
|
|
@@ -730,15 +739,12 @@ function checkDirty(link, sub) {
|
|
|
730
739
|
}
|
|
731
740
|
while (checkDepth) {
|
|
732
741
|
--checkDepth;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
if (hasMultipleSubs) {
|
|
736
|
-
link = stack.value;
|
|
737
|
-
stack = stack.prev;
|
|
738
|
-
} else link = firstSub;
|
|
742
|
+
link = stack.value;
|
|
743
|
+
stack = stack.prev;
|
|
739
744
|
if (dirty) {
|
|
745
|
+
const subs = sub.subs;
|
|
740
746
|
if (sub.update()) {
|
|
741
|
-
if (
|
|
747
|
+
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
742
748
|
sub = link.sub;
|
|
743
749
|
continue;
|
|
744
750
|
}
|
|
@@ -750,7 +756,7 @@ function checkDirty(link, sub) {
|
|
|
750
756
|
}
|
|
751
757
|
dirty = false;
|
|
752
758
|
}
|
|
753
|
-
return dirty;
|
|
759
|
+
return dirty && !!sub.flags;
|
|
754
760
|
} while (true);
|
|
755
761
|
}
|
|
756
762
|
function shallowPropagate(link) {
|
|
@@ -1351,9 +1357,6 @@ function targetTypeMap(rawType) {
|
|
|
1351
1357
|
default: return 0;
|
|
1352
1358
|
}
|
|
1353
1359
|
}
|
|
1354
|
-
function getTargetType(value) {
|
|
1355
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1356
|
-
}
|
|
1357
1360
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1358
1361
|
function reactive(target) {
|
|
1359
1362
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1466,10 +1469,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
|
|
|
1466
1469
|
return target;
|
|
1467
1470
|
}
|
|
1468
1471
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1469
|
-
|
|
1470
|
-
if (targetType === 0) return target;
|
|
1472
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1471
1473
|
const existingProxy = proxyMap.get(target);
|
|
1472
1474
|
if (existingProxy) return existingProxy;
|
|
1475
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1476
|
+
if (targetType === 0) return target;
|
|
1473
1477
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1474
1478
|
proxyMap.set(target, proxy);
|
|
1475
1479
|
return proxy;
|
|
@@ -1902,9 +1906,11 @@ var ReactiveEffect = class {
|
|
|
1902
1906
|
if (!this.active) return this.fn();
|
|
1903
1907
|
cleanup(this);
|
|
1904
1908
|
const prevSub = startTracking(this);
|
|
1909
|
+
incRunDepth();
|
|
1905
1910
|
try {
|
|
1906
1911
|
return this.fn();
|
|
1907
1912
|
} finally {
|
|
1913
|
+
decRunDepth();
|
|
1908
1914
|
endTracking(this, prevSub);
|
|
1909
1915
|
const flags = this.flags;
|
|
1910
1916
|
if ((flags & 136) === 136) {
|
|
@@ -3655,17 +3661,16 @@ const TeleportImpl = {
|
|
|
3655
3661
|
},
|
|
3656
3662
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3657
3663
|
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3658
|
-
|
|
3664
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3659
3665
|
const pendingMount = pendingMounts.get(vnode);
|
|
3660
3666
|
if (pendingMount) {
|
|
3661
3667
|
pendingMount.flags |= 4;
|
|
3662
3668
|
pendingMounts.delete(vnode);
|
|
3663
|
-
shouldRemove = false;
|
|
3664
3669
|
}
|
|
3665
3670
|
if (targetStart) hostRemove(targetStart);
|
|
3666
3671
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3667
3672
|
doRemove && hostRemove(anchor);
|
|
3668
|
-
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3673
|
+
if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3669
3674
|
const child = children[i];
|
|
3670
3675
|
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3671
3676
|
}
|
|
@@ -4318,15 +4323,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4318
4323
|
}
|
|
4319
4324
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
4320
4325
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4321
|
-
|
|
4326
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
4327
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4328
|
+
logMismatchError();
|
|
4329
|
+
}
|
|
4322
4330
|
while (next) {
|
|
4323
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
4324
|
-
if (!hasWarned) {
|
|
4325
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4326
|
-
hasWarned = true;
|
|
4327
|
-
}
|
|
4328
|
-
logMismatchError();
|
|
4329
|
-
}
|
|
4330
4331
|
const cur = next;
|
|
4331
4332
|
next = next.nextSibling;
|
|
4332
4333
|
remove(cur);
|
|
@@ -4365,7 +4366,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4365
4366
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
4366
4367
|
const children = parentVNode.children;
|
|
4367
4368
|
const l = children.length;
|
|
4368
|
-
let
|
|
4369
|
+
let hasCheckedMismatch = false;
|
|
4369
4370
|
for (let i = 0; i < l; i++) {
|
|
4370
4371
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
4371
4372
|
const isText = vnode.type === Text;
|
|
@@ -4379,12 +4380,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4379
4380
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4380
4381
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
4381
4382
|
else {
|
|
4382
|
-
if (!
|
|
4383
|
-
|
|
4383
|
+
if (!hasCheckedMismatch) {
|
|
4384
|
+
hasCheckedMismatch = true;
|
|
4385
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4384
4386
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
4385
|
-
|
|
4387
|
+
logMismatchError();
|
|
4386
4388
|
}
|
|
4387
|
-
logMismatchError();
|
|
4388
4389
|
}
|
|
4389
4390
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4390
4391
|
}
|
|
@@ -6323,7 +6324,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6323
6324
|
if (options.el) return vm.$mount(options.el);
|
|
6324
6325
|
else return vm;
|
|
6325
6326
|
}
|
|
6326
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6327
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.13`;
|
|
6327
6328
|
Vue.config = singletonApp.config;
|
|
6328
6329
|
Vue.use = (plugin, ...options) => {
|
|
6329
6330
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8259,8 +8260,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8259
8260
|
else hostInsert(el, container, anchor);
|
|
8260
8261
|
};
|
|
8261
8262
|
const performLeave = () => {
|
|
8263
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8262
8264
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
8263
|
-
|
|
8265
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
8266
|
+
else leave(el, () => {
|
|
8264
8267
|
remove();
|
|
8265
8268
|
afterLeave && afterLeave();
|
|
8266
8269
|
});
|
|
@@ -8483,6 +8486,10 @@ function invalidateMount(hooks) {
|
|
|
8483
8486
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
8484
8487
|
}
|
|
8485
8488
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
8489
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
8490
|
+
insert();
|
|
8491
|
+
return;
|
|
8492
|
+
}
|
|
8486
8493
|
if (force || needTransition(parentSuspense, transition)) {
|
|
8487
8494
|
transition.beforeEnter(el);
|
|
8488
8495
|
insert();
|
|
@@ -9787,7 +9794,7 @@ function isMemoSame(cached, memo) {
|
|
|
9787
9794
|
}
|
|
9788
9795
|
//#endregion
|
|
9789
9796
|
//#region packages/runtime-core/src/index.ts
|
|
9790
|
-
const version = "3.6.0-beta.
|
|
9797
|
+
const version = "3.6.0-beta.13";
|
|
9791
9798
|
const warn = warn$1;
|
|
9792
9799
|
/**
|
|
9793
9800
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10385,7 +10392,21 @@ function createInvoker(initialValue, instance) {
|
|
|
10385
10392
|
const invoker = (e) => {
|
|
10386
10393
|
if (!e._vts) e._vts = Date.now();
|
|
10387
10394
|
else if (e._vts <= invoker.attached) return;
|
|
10388
|
-
|
|
10395
|
+
const value = invoker.value;
|
|
10396
|
+
if (isArray(value)) {
|
|
10397
|
+
const originalStop = e.stopImmediatePropagation;
|
|
10398
|
+
e.stopImmediatePropagation = () => {
|
|
10399
|
+
originalStop.call(e);
|
|
10400
|
+
e._stopped = true;
|
|
10401
|
+
};
|
|
10402
|
+
const handlers = value.slice();
|
|
10403
|
+
const args = [e];
|
|
10404
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
10405
|
+
if (e._stopped) break;
|
|
10406
|
+
const handler = handlers[i];
|
|
10407
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
10408
|
+
}
|
|
10409
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
10389
10410
|
};
|
|
10390
10411
|
invoker.value = initialValue;
|
|
10391
10412
|
invoker.attached = getNow();
|
|
@@ -10396,16 +10417,6 @@ function sanitizeEventValue(value, propName) {
|
|
|
10396
10417
|
warn(`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`);
|
|
10397
10418
|
return NOOP;
|
|
10398
10419
|
}
|
|
10399
|
-
function patchStopImmediatePropagation(e, value) {
|
|
10400
|
-
if (isArray(value)) {
|
|
10401
|
-
const originalStop = e.stopImmediatePropagation;
|
|
10402
|
-
e.stopImmediatePropagation = () => {
|
|
10403
|
-
originalStop.call(e);
|
|
10404
|
-
e._stopped = true;
|
|
10405
|
-
};
|
|
10406
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
10407
|
-
} else return value;
|
|
10408
|
-
}
|
|
10409
10420
|
//#endregion
|
|
10410
10421
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
10411
10422
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -15464,12 +15475,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15464
15475
|
const keyProp = findProp(node, `key`, false, true);
|
|
15465
15476
|
const isDirKey = keyProp && keyProp.type === 7;
|
|
15466
15477
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
if (isTemplate)
|
|
15470
|
-
if (memo) memo.exp = processExpression(memo.exp, context);
|
|
15471
|
-
if (keyProperty && keyProp.type !== 6) keyProperty.value = processExpression(keyProperty.value, context);
|
|
15472
|
-
}
|
|
15478
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
15479
|
+
if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
|
|
15480
|
+
if ((isTemplate || memo) && keyProperty && isDirKey) keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
|
|
15473
15481
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
15474
15482
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
15475
15483
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -432,6 +432,13 @@ function getSequence(arr) {
|
|
|
432
432
|
const notifyBuffer = [];
|
|
433
433
|
let batchDepth = 0;
|
|
434
434
|
let activeSub = void 0;
|
|
435
|
+
let runDepth = 0;
|
|
436
|
+
function incRunDepth() {
|
|
437
|
+
++runDepth;
|
|
438
|
+
}
|
|
439
|
+
function decRunDepth() {
|
|
440
|
+
--runDepth;
|
|
441
|
+
}
|
|
435
442
|
let globalVersion = 0;
|
|
436
443
|
let notifyIndex = 0;
|
|
437
444
|
let notifyBufferLength = 0;
|
|
@@ -505,8 +512,10 @@ function propagate(link) {
|
|
|
505
512
|
const sub = link.sub;
|
|
506
513
|
let flags = sub.flags;
|
|
507
514
|
if (flags & 3) {
|
|
508
|
-
if (!(flags & 60))
|
|
509
|
-
|
|
515
|
+
if (!(flags & 60)) {
|
|
516
|
+
sub.flags = flags | 32;
|
|
517
|
+
if (runDepth) sub.flags |= 8;
|
|
518
|
+
} else if (!(flags & 12)) flags = 0;
|
|
510
519
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
511
520
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
512
521
|
sub.flags = flags | 40;
|
|
@@ -574,13 +583,13 @@ function checkDirty(link, sub) {
|
|
|
574
583
|
let dirty = false;
|
|
575
584
|
if (sub.flags & 16) dirty = true;
|
|
576
585
|
else if ((depFlags & 17) === 17) {
|
|
586
|
+
const subs = dep.subs;
|
|
577
587
|
if (dep.update()) {
|
|
578
|
-
const subs = dep.subs;
|
|
579
588
|
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
580
589
|
dirty = true;
|
|
581
590
|
}
|
|
582
591
|
} else if ((depFlags & 33) === 33) {
|
|
583
|
-
|
|
592
|
+
stack = {
|
|
584
593
|
value: link,
|
|
585
594
|
prev: stack
|
|
586
595
|
};
|
|
@@ -595,15 +604,12 @@ function checkDirty(link, sub) {
|
|
|
595
604
|
}
|
|
596
605
|
while (checkDepth) {
|
|
597
606
|
--checkDepth;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
if (hasMultipleSubs) {
|
|
601
|
-
link = stack.value;
|
|
602
|
-
stack = stack.prev;
|
|
603
|
-
} else link = firstSub;
|
|
607
|
+
link = stack.value;
|
|
608
|
+
stack = stack.prev;
|
|
604
609
|
if (dirty) {
|
|
610
|
+
const subs = sub.subs;
|
|
605
611
|
if (sub.update()) {
|
|
606
|
-
if (
|
|
612
|
+
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
607
613
|
sub = link.sub;
|
|
608
614
|
continue;
|
|
609
615
|
}
|
|
@@ -615,7 +621,7 @@ function checkDirty(link, sub) {
|
|
|
615
621
|
}
|
|
616
622
|
dirty = false;
|
|
617
623
|
}
|
|
618
|
-
return dirty;
|
|
624
|
+
return dirty && !!sub.flags;
|
|
619
625
|
} while (true);
|
|
620
626
|
}
|
|
621
627
|
function shallowPropagate(link) {
|
|
@@ -1187,9 +1193,6 @@ function targetTypeMap(rawType) {
|
|
|
1187
1193
|
default: return 0;
|
|
1188
1194
|
}
|
|
1189
1195
|
}
|
|
1190
|
-
function getTargetType(value) {
|
|
1191
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1192
|
-
}
|
|
1193
1196
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1194
1197
|
function reactive(target) {
|
|
1195
1198
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1299,10 +1302,11 @@ function shallowReadonly(target) {
|
|
|
1299
1302
|
function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {
|
|
1300
1303
|
if (!isObject(target)) return target;
|
|
1301
1304
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1302
|
-
|
|
1303
|
-
if (targetType === 0) return target;
|
|
1305
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1304
1306
|
const existingProxy = proxyMap.get(target);
|
|
1305
1307
|
if (existingProxy) return existingProxy;
|
|
1308
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1309
|
+
if (targetType === 0) return target;
|
|
1306
1310
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1307
1311
|
proxyMap.set(target, proxy);
|
|
1308
1312
|
return proxy;
|
|
@@ -1720,9 +1724,11 @@ var ReactiveEffect = class {
|
|
|
1720
1724
|
if (!this.active) return this.fn();
|
|
1721
1725
|
cleanup(this);
|
|
1722
1726
|
const prevSub = startTracking(this);
|
|
1727
|
+
incRunDepth();
|
|
1723
1728
|
try {
|
|
1724
1729
|
return this.fn();
|
|
1725
1730
|
} finally {
|
|
1731
|
+
decRunDepth();
|
|
1726
1732
|
endTracking(this, prevSub);
|
|
1727
1733
|
const flags = this.flags;
|
|
1728
1734
|
if ((flags & 136) === 136) {
|
|
@@ -2916,17 +2922,16 @@ const TeleportImpl = {
|
|
|
2916
2922
|
},
|
|
2917
2923
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
2918
2924
|
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
2919
|
-
|
|
2925
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
2920
2926
|
const pendingMount = pendingMounts.get(vnode);
|
|
2921
2927
|
if (pendingMount) {
|
|
2922
2928
|
pendingMount.flags |= 4;
|
|
2923
2929
|
pendingMounts.delete(vnode);
|
|
2924
|
-
shouldRemove = false;
|
|
2925
2930
|
}
|
|
2926
2931
|
if (targetStart) hostRemove(targetStart);
|
|
2927
2932
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
2928
2933
|
doRemove && hostRemove(anchor);
|
|
2929
|
-
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
2934
|
+
if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
2930
2935
|
const child = children[i];
|
|
2931
2936
|
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
2932
2937
|
}
|
|
@@ -3550,8 +3555,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3550
3555
|
}
|
|
3551
3556
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
3552
3557
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3558
|
+
if (next && !isMismatchAllowed(el, 1)) logMismatchError();
|
|
3553
3559
|
while (next) {
|
|
3554
|
-
if (!isMismatchAllowed(el, 1)) logMismatchError();
|
|
3555
3560
|
const cur = next;
|
|
3556
3561
|
next = next.nextSibling;
|
|
3557
3562
|
remove(cur);
|
|
@@ -3587,6 +3592,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3587
3592
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
3588
3593
|
const children = parentVNode.children;
|
|
3589
3594
|
const l = children.length;
|
|
3595
|
+
let hasCheckedMismatch = false;
|
|
3590
3596
|
for (let i = 0; i < l; i++) {
|
|
3591
3597
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
3592
3598
|
const isText = vnode.type === Text;
|
|
@@ -3600,7 +3606,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3600
3606
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3601
3607
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
3602
3608
|
else {
|
|
3603
|
-
if (!
|
|
3609
|
+
if (!hasCheckedMismatch) {
|
|
3610
|
+
hasCheckedMismatch = true;
|
|
3611
|
+
if (!isMismatchAllowed(container, 1)) logMismatchError();
|
|
3612
|
+
}
|
|
3604
3613
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
3605
3614
|
}
|
|
3606
3615
|
}
|
|
@@ -5244,7 +5253,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5244
5253
|
if (options.el) return vm.$mount(options.el);
|
|
5245
5254
|
else return vm;
|
|
5246
5255
|
}
|
|
5247
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
5256
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.13`;
|
|
5248
5257
|
Vue.config = singletonApp.config;
|
|
5249
5258
|
Vue.use = (plugin, ...options) => {
|
|
5250
5259
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6788,8 +6797,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6788
6797
|
else hostInsert(el, container, anchor);
|
|
6789
6798
|
};
|
|
6790
6799
|
const performLeave = () => {
|
|
6800
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
6791
6801
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
6792
|
-
|
|
6802
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
6803
|
+
else leave(el, () => {
|
|
6793
6804
|
remove();
|
|
6794
6805
|
afterLeave && afterLeave();
|
|
6795
6806
|
});
|
|
@@ -7000,6 +7011,10 @@ function invalidateMount(hooks) {
|
|
|
7000
7011
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
7001
7012
|
}
|
|
7002
7013
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
7014
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
7015
|
+
insert();
|
|
7016
|
+
return;
|
|
7017
|
+
}
|
|
7003
7018
|
if (force || needTransition(parentSuspense, transition)) {
|
|
7004
7019
|
transition.beforeEnter(el);
|
|
7005
7020
|
insert();
|
|
@@ -8010,7 +8025,7 @@ function isMemoSame(cached, memo) {
|
|
|
8010
8025
|
}
|
|
8011
8026
|
//#endregion
|
|
8012
8027
|
//#region packages/runtime-core/src/index.ts
|
|
8013
|
-
const version = "3.6.0-beta.
|
|
8028
|
+
const version = "3.6.0-beta.13";
|
|
8014
8029
|
const warn = NOOP;
|
|
8015
8030
|
/**
|
|
8016
8031
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8598,22 +8613,26 @@ function createInvoker(initialValue, instance) {
|
|
|
8598
8613
|
const invoker = (e) => {
|
|
8599
8614
|
if (!e._vts) e._vts = Date.now();
|
|
8600
8615
|
else if (e._vts <= invoker.attached) return;
|
|
8601
|
-
|
|
8616
|
+
const value = invoker.value;
|
|
8617
|
+
if (isArray(value)) {
|
|
8618
|
+
const originalStop = e.stopImmediatePropagation;
|
|
8619
|
+
e.stopImmediatePropagation = () => {
|
|
8620
|
+
originalStop.call(e);
|
|
8621
|
+
e._stopped = true;
|
|
8622
|
+
};
|
|
8623
|
+
const handlers = value.slice();
|
|
8624
|
+
const args = [e];
|
|
8625
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
8626
|
+
if (e._stopped) break;
|
|
8627
|
+
const handler = handlers[i];
|
|
8628
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
8629
|
+
}
|
|
8630
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
8602
8631
|
};
|
|
8603
8632
|
invoker.value = initialValue;
|
|
8604
8633
|
invoker.attached = getNow();
|
|
8605
8634
|
return invoker;
|
|
8606
8635
|
}
|
|
8607
|
-
function patchStopImmediatePropagation(e, value) {
|
|
8608
|
-
if (isArray(value)) {
|
|
8609
|
-
const originalStop = e.stopImmediatePropagation;
|
|
8610
|
-
e.stopImmediatePropagation = () => {
|
|
8611
|
-
originalStop.call(e);
|
|
8612
|
-
e._stopped = true;
|
|
8613
|
-
};
|
|
8614
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
8615
|
-
} else return value;
|
|
8616
|
-
}
|
|
8617
8636
|
//#endregion
|
|
8618
8637
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
8619
8638
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -13490,12 +13509,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
13490
13509
|
const keyProp = findProp(node, `key`, false, true);
|
|
13491
13510
|
const isDirKey = keyProp && keyProp.type === 7;
|
|
13492
13511
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
if (isTemplate)
|
|
13496
|
-
if (memo) memo.exp = processExpression(memo.exp, context);
|
|
13497
|
-
if (keyProperty && keyProp.type !== 6) keyProperty.value = processExpression(keyProperty.value, context);
|
|
13498
|
-
}
|
|
13512
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
13513
|
+
if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
|
|
13514
|
+
if ((isTemplate || memo) && keyProperty && isDirKey) keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
|
|
13499
13515
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
13500
13516
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
13501
13517
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|