vue 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.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +60 -50
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +60 -50
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime-with-vapor.esm-browser.js +4588 -3916
- package/dist/vue.runtime-with-vapor.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +58 -47
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +58 -47
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +7 -7
package/dist/vue.esm-bundler.js
CHANGED
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.6.0-beta.
|
|
2
|
+
* vue v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -511,6 +511,13 @@ var Vue = (function(exports) {
|
|
|
511
511
|
const notifyBuffer = [];
|
|
512
512
|
let batchDepth = 0;
|
|
513
513
|
let activeSub = void 0;
|
|
514
|
+
let runDepth = 0;
|
|
515
|
+
function incRunDepth() {
|
|
516
|
+
++runDepth;
|
|
517
|
+
}
|
|
518
|
+
function decRunDepth() {
|
|
519
|
+
--runDepth;
|
|
520
|
+
}
|
|
514
521
|
let globalVersion = 0;
|
|
515
522
|
let notifyIndex = 0;
|
|
516
523
|
let notifyBufferLength = 0;
|
|
@@ -584,8 +591,10 @@ var Vue = (function(exports) {
|
|
|
584
591
|
const sub = link.sub;
|
|
585
592
|
let flags = sub.flags;
|
|
586
593
|
if (flags & 3) {
|
|
587
|
-
if (!(flags & 60))
|
|
588
|
-
|
|
594
|
+
if (!(flags & 60)) {
|
|
595
|
+
sub.flags = flags | 32;
|
|
596
|
+
if (runDepth) sub.flags |= 8;
|
|
597
|
+
} else if (!(flags & 12)) flags = 0;
|
|
589
598
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
590
599
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
591
600
|
sub.flags = flags | 40;
|
|
@@ -654,13 +663,13 @@ var Vue = (function(exports) {
|
|
|
654
663
|
let dirty = false;
|
|
655
664
|
if (sub.flags & 16) dirty = true;
|
|
656
665
|
else if ((depFlags & 17) === 17) {
|
|
666
|
+
const subs = dep.subs;
|
|
657
667
|
if (dep.update()) {
|
|
658
|
-
const subs = dep.subs;
|
|
659
668
|
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
660
669
|
dirty = true;
|
|
661
670
|
}
|
|
662
671
|
} else if ((depFlags & 33) === 33) {
|
|
663
|
-
|
|
672
|
+
stack = {
|
|
664
673
|
value: link,
|
|
665
674
|
prev: stack
|
|
666
675
|
};
|
|
@@ -675,15 +684,12 @@ var Vue = (function(exports) {
|
|
|
675
684
|
}
|
|
676
685
|
while (checkDepth) {
|
|
677
686
|
--checkDepth;
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
if (hasMultipleSubs) {
|
|
681
|
-
link = stack.value;
|
|
682
|
-
stack = stack.prev;
|
|
683
|
-
} else link = firstSub;
|
|
687
|
+
link = stack.value;
|
|
688
|
+
stack = stack.prev;
|
|
684
689
|
if (dirty) {
|
|
690
|
+
const subs = sub.subs;
|
|
685
691
|
if (sub.update()) {
|
|
686
|
-
if (
|
|
692
|
+
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
687
693
|
sub = link.sub;
|
|
688
694
|
continue;
|
|
689
695
|
}
|
|
@@ -695,7 +701,7 @@ var Vue = (function(exports) {
|
|
|
695
701
|
}
|
|
696
702
|
dirty = false;
|
|
697
703
|
}
|
|
698
|
-
return dirty;
|
|
704
|
+
return dirty && !!sub.flags;
|
|
699
705
|
} while (true);
|
|
700
706
|
}
|
|
701
707
|
function shallowPropagate(link) {
|
|
@@ -1296,9 +1302,6 @@ var Vue = (function(exports) {
|
|
|
1296
1302
|
default: return 0;
|
|
1297
1303
|
}
|
|
1298
1304
|
}
|
|
1299
|
-
function getTargetType(value) {
|
|
1300
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1301
|
-
}
|
|
1302
1305
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1303
1306
|
function reactive(target) {
|
|
1304
1307
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1411,10 +1414,11 @@ var Vue = (function(exports) {
|
|
|
1411
1414
|
return target;
|
|
1412
1415
|
}
|
|
1413
1416
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1414
|
-
|
|
1415
|
-
if (targetType === 0) return target;
|
|
1417
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1416
1418
|
const existingProxy = proxyMap.get(target);
|
|
1417
1419
|
if (existingProxy) return existingProxy;
|
|
1420
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1421
|
+
if (targetType === 0) return target;
|
|
1418
1422
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1419
1423
|
proxyMap.set(target, proxy);
|
|
1420
1424
|
return proxy;
|
|
@@ -1847,9 +1851,11 @@ var Vue = (function(exports) {
|
|
|
1847
1851
|
if (!this.active) return this.fn();
|
|
1848
1852
|
cleanup(this);
|
|
1849
1853
|
const prevSub = startTracking(this);
|
|
1854
|
+
incRunDepth();
|
|
1850
1855
|
try {
|
|
1851
1856
|
return this.fn();
|
|
1852
1857
|
} finally {
|
|
1858
|
+
decRunDepth();
|
|
1853
1859
|
endTracking(this, prevSub);
|
|
1854
1860
|
const flags = this.flags;
|
|
1855
1861
|
if ((flags & 136) === 136) {
|
|
@@ -3227,17 +3233,16 @@ var Vue = (function(exports) {
|
|
|
3227
3233
|
},
|
|
3228
3234
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3229
3235
|
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3230
|
-
|
|
3236
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3231
3237
|
const pendingMount = pendingMounts.get(vnode);
|
|
3232
3238
|
if (pendingMount) {
|
|
3233
3239
|
pendingMount.flags |= 4;
|
|
3234
3240
|
pendingMounts.delete(vnode);
|
|
3235
|
-
shouldRemove = false;
|
|
3236
3241
|
}
|
|
3237
3242
|
if (targetStart) hostRemove(targetStart);
|
|
3238
3243
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3239
3244
|
doRemove && hostRemove(anchor);
|
|
3240
|
-
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3245
|
+
if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3241
3246
|
const child = children[i];
|
|
3242
3247
|
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3243
3248
|
}
|
|
@@ -3889,15 +3894,11 @@ var Vue = (function(exports) {
|
|
|
3889
3894
|
}
|
|
3890
3895
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
3891
3896
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3892
|
-
|
|
3897
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
3898
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
3899
|
+
logMismatchError();
|
|
3900
|
+
}
|
|
3893
3901
|
while (next) {
|
|
3894
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
3895
|
-
if (!hasWarned) {
|
|
3896
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
3897
|
-
hasWarned = true;
|
|
3898
|
-
}
|
|
3899
|
-
logMismatchError();
|
|
3900
|
-
}
|
|
3901
3902
|
const cur = next;
|
|
3902
3903
|
next = next.nextSibling;
|
|
3903
3904
|
remove(cur);
|
|
@@ -3936,7 +3937,7 @@ var Vue = (function(exports) {
|
|
|
3936
3937
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
3937
3938
|
const children = parentVNode.children;
|
|
3938
3939
|
const l = children.length;
|
|
3939
|
-
let
|
|
3940
|
+
let hasCheckedMismatch = false;
|
|
3940
3941
|
for (let i = 0; i < l; i++) {
|
|
3941
3942
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
3942
3943
|
const isText = vnode.type === Text;
|
|
@@ -3950,12 +3951,12 @@ var Vue = (function(exports) {
|
|
|
3950
3951
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3951
3952
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
3952
3953
|
else {
|
|
3953
|
-
if (!
|
|
3954
|
-
|
|
3954
|
+
if (!hasCheckedMismatch) {
|
|
3955
|
+
hasCheckedMismatch = true;
|
|
3956
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
3955
3957
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
3956
|
-
|
|
3958
|
+
logMismatchError();
|
|
3957
3959
|
}
|
|
3958
|
-
logMismatchError();
|
|
3959
3960
|
}
|
|
3960
3961
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
3961
3962
|
}
|
|
@@ -6968,8 +6969,10 @@ var Vue = (function(exports) {
|
|
|
6968
6969
|
else hostInsert(el, container, anchor);
|
|
6969
6970
|
};
|
|
6970
6971
|
const performLeave = () => {
|
|
6972
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
6971
6973
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
6972
|
-
|
|
6974
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
6975
|
+
else leave(el, () => {
|
|
6973
6976
|
remove();
|
|
6974
6977
|
afterLeave && afterLeave();
|
|
6975
6978
|
});
|
|
@@ -7190,6 +7193,10 @@ var Vue = (function(exports) {
|
|
|
7190
7193
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
7191
7194
|
}
|
|
7192
7195
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
7196
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
7197
|
+
insert();
|
|
7198
|
+
return;
|
|
7199
|
+
}
|
|
7193
7200
|
if (force || needTransition(parentSuspense, transition)) {
|
|
7194
7201
|
transition.beforeEnter(el);
|
|
7195
7202
|
insert();
|
|
@@ -8436,7 +8443,7 @@ var Vue = (function(exports) {
|
|
|
8436
8443
|
}
|
|
8437
8444
|
//#endregion
|
|
8438
8445
|
//#region packages/runtime-core/src/index.ts
|
|
8439
|
-
const version = "3.6.0-beta.
|
|
8446
|
+
const version = "3.6.0-beta.13";
|
|
8440
8447
|
const warn = warn$1;
|
|
8441
8448
|
/**
|
|
8442
8449
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9044,7 +9051,21 @@ var Vue = (function(exports) {
|
|
|
9044
9051
|
const invoker = (e) => {
|
|
9045
9052
|
if (!e._vts) e._vts = Date.now();
|
|
9046
9053
|
else if (e._vts <= invoker.attached) return;
|
|
9047
|
-
|
|
9054
|
+
const value = invoker.value;
|
|
9055
|
+
if (isArray(value)) {
|
|
9056
|
+
const originalStop = e.stopImmediatePropagation;
|
|
9057
|
+
e.stopImmediatePropagation = () => {
|
|
9058
|
+
originalStop.call(e);
|
|
9059
|
+
e._stopped = true;
|
|
9060
|
+
};
|
|
9061
|
+
const handlers = value.slice();
|
|
9062
|
+
const args = [e];
|
|
9063
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
9064
|
+
if (e._stopped) break;
|
|
9065
|
+
const handler = handlers[i];
|
|
9066
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
9067
|
+
}
|
|
9068
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
9048
9069
|
};
|
|
9049
9070
|
invoker.value = initialValue;
|
|
9050
9071
|
invoker.attached = getNow();
|
|
@@ -9055,16 +9076,6 @@ var Vue = (function(exports) {
|
|
|
9055
9076
|
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}.`);
|
|
9056
9077
|
return NOOP;
|
|
9057
9078
|
}
|
|
9058
|
-
function patchStopImmediatePropagation(e, value) {
|
|
9059
|
-
if (isArray(value)) {
|
|
9060
|
-
const originalStop = e.stopImmediatePropagation;
|
|
9061
|
-
e.stopImmediatePropagation = () => {
|
|
9062
|
-
originalStop.call(e);
|
|
9063
|
-
e._stopped = true;
|
|
9064
|
-
};
|
|
9065
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
9066
|
-
} else return value;
|
|
9067
|
-
}
|
|
9068
9079
|
//#endregion
|
|
9069
9080
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
9070
9081
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -12759,10 +12770,9 @@ var Vue = (function(exports) {
|
|
|
12759
12770
|
const isTemplate = isTemplateNode(node);
|
|
12760
12771
|
const memo = findDir(node, "memo");
|
|
12761
12772
|
const keyProp = findProp(node, `key`, false, true);
|
|
12762
|
-
|
|
12773
|
+
keyProp && keyProp.type;
|
|
12763
12774
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
12764
|
-
|
|
12765
|
-
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
12775
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
12766
12776
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
12767
12777
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
12768
12778
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|