vue 3.6.0-beta.12 → 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 +40 -38
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +40 -38
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime-with-vapor.esm-browser.js +756 -418
- package/dist/vue.runtime-with-vapor.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +38 -35
- 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 +38 -35
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +7 -7
|
@@ -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
|
**/
|
|
@@ -1222,9 +1222,6 @@ function targetTypeMap(rawType) {
|
|
|
1222
1222
|
default: return 0;
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
|
-
function getTargetType(value) {
|
|
1226
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1227
|
-
}
|
|
1228
1225
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1229
1226
|
function reactive(target) {
|
|
1230
1227
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1337,10 +1334,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
|
|
|
1337
1334
|
return target;
|
|
1338
1335
|
}
|
|
1339
1336
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1340
|
-
|
|
1341
|
-
if (targetType === 0) return target;
|
|
1337
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1342
1338
|
const existingProxy = proxyMap.get(target);
|
|
1343
1339
|
if (existingProxy) return existingProxy;
|
|
1340
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1341
|
+
if (targetType === 0) return target;
|
|
1344
1342
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1345
1343
|
proxyMap.set(target, proxy);
|
|
1346
1344
|
return proxy;
|
|
@@ -3159,17 +3157,16 @@ const TeleportImpl = {
|
|
|
3159
3157
|
},
|
|
3160
3158
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3161
3159
|
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3162
|
-
|
|
3160
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3163
3161
|
const pendingMount = pendingMounts.get(vnode);
|
|
3164
3162
|
if (pendingMount) {
|
|
3165
3163
|
pendingMount.flags |= 4;
|
|
3166
3164
|
pendingMounts.delete(vnode);
|
|
3167
|
-
shouldRemove = false;
|
|
3168
3165
|
}
|
|
3169
3166
|
if (targetStart) hostRemove(targetStart);
|
|
3170
3167
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3171
3168
|
doRemove && hostRemove(anchor);
|
|
3172
|
-
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3169
|
+
if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3173
3170
|
const child = children[i];
|
|
3174
3171
|
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3175
3172
|
}
|
|
@@ -3821,15 +3818,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3821
3818
|
}
|
|
3822
3819
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
3823
3820
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3824
|
-
|
|
3821
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
3822
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
3823
|
+
logMismatchError();
|
|
3824
|
+
}
|
|
3825
3825
|
while (next) {
|
|
3826
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
3827
|
-
if (!hasWarned) {
|
|
3828
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
3829
|
-
hasWarned = true;
|
|
3830
|
-
}
|
|
3831
|
-
logMismatchError();
|
|
3832
|
-
}
|
|
3833
3826
|
const cur = next;
|
|
3834
3827
|
next = next.nextSibling;
|
|
3835
3828
|
remove(cur);
|
|
@@ -3868,7 +3861,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3868
3861
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
3869
3862
|
const children = parentVNode.children;
|
|
3870
3863
|
const l = children.length;
|
|
3871
|
-
let
|
|
3864
|
+
let hasCheckedMismatch = false;
|
|
3872
3865
|
for (let i = 0; i < l; i++) {
|
|
3873
3866
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
3874
3867
|
const isText = vnode.type === Text;
|
|
@@ -3882,12 +3875,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3882
3875
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3883
3876
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
3884
3877
|
else {
|
|
3885
|
-
if (!
|
|
3886
|
-
|
|
3878
|
+
if (!hasCheckedMismatch) {
|
|
3879
|
+
hasCheckedMismatch = true;
|
|
3880
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
3887
3881
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
3888
|
-
|
|
3882
|
+
logMismatchError();
|
|
3889
3883
|
}
|
|
3890
|
-
logMismatchError();
|
|
3891
3884
|
}
|
|
3892
3885
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
3893
3886
|
}
|
|
@@ -6900,8 +6893,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6900
6893
|
else hostInsert(el, container, anchor);
|
|
6901
6894
|
};
|
|
6902
6895
|
const performLeave = () => {
|
|
6896
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
6903
6897
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
6904
|
-
|
|
6898
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
6899
|
+
else leave(el, () => {
|
|
6905
6900
|
remove();
|
|
6906
6901
|
afterLeave && afterLeave();
|
|
6907
6902
|
});
|
|
@@ -7122,6 +7117,10 @@ function invalidateMount(hooks) {
|
|
|
7122
7117
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
7123
7118
|
}
|
|
7124
7119
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
7120
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
7121
|
+
insert();
|
|
7122
|
+
return;
|
|
7123
|
+
}
|
|
7125
7124
|
if (force || needTransition(parentSuspense, transition)) {
|
|
7126
7125
|
transition.beforeEnter(el);
|
|
7127
7126
|
insert();
|
|
@@ -8368,7 +8367,7 @@ function isMemoSame(cached, memo) {
|
|
|
8368
8367
|
}
|
|
8369
8368
|
//#endregion
|
|
8370
8369
|
//#region packages/runtime-core/src/index.ts
|
|
8371
|
-
const version = "3.6.0-beta.
|
|
8370
|
+
const version = "3.6.0-beta.13";
|
|
8372
8371
|
const warn = warn$1;
|
|
8373
8372
|
/**
|
|
8374
8373
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8976,7 +8975,21 @@ function createInvoker(initialValue, instance) {
|
|
|
8976
8975
|
const invoker = (e) => {
|
|
8977
8976
|
if (!e._vts) e._vts = Date.now();
|
|
8978
8977
|
else if (e._vts <= invoker.attached) return;
|
|
8979
|
-
|
|
8978
|
+
const value = invoker.value;
|
|
8979
|
+
if (isArray(value)) {
|
|
8980
|
+
const originalStop = e.stopImmediatePropagation;
|
|
8981
|
+
e.stopImmediatePropagation = () => {
|
|
8982
|
+
originalStop.call(e);
|
|
8983
|
+
e._stopped = true;
|
|
8984
|
+
};
|
|
8985
|
+
const handlers = value.slice();
|
|
8986
|
+
const args = [e];
|
|
8987
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
8988
|
+
if (e._stopped) break;
|
|
8989
|
+
const handler = handlers[i];
|
|
8990
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
8991
|
+
}
|
|
8992
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
8980
8993
|
};
|
|
8981
8994
|
invoker.value = initialValue;
|
|
8982
8995
|
invoker.attached = getNow();
|
|
@@ -8987,16 +9000,6 @@ function sanitizeEventValue(value, propName) {
|
|
|
8987
9000
|
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}.`);
|
|
8988
9001
|
return NOOP;
|
|
8989
9002
|
}
|
|
8990
|
-
function patchStopImmediatePropagation(e, value) {
|
|
8991
|
-
if (isArray(value)) {
|
|
8992
|
-
const originalStop = e.stopImmediatePropagation;
|
|
8993
|
-
e.stopImmediatePropagation = () => {
|
|
8994
|
-
originalStop.call(e);
|
|
8995
|
-
e._stopped = true;
|
|
8996
|
-
};
|
|
8997
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
8998
|
-
} else return value;
|
|
8999
|
-
}
|
|
9000
9003
|
//#endregion
|
|
9001
9004
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
9002
9005
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|