@vue/runtime-dom 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/runtime-dom.cjs.js +16 -12
- package/dist/runtime-dom.cjs.prod.js +16 -12
- package/dist/runtime-dom.esm-browser.js +38 -35
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +16 -12
- package/dist/runtime-dom.global.js +38 -35
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-beta.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -598,7 +598,21 @@ function createInvoker(initialValue, instance) {
|
|
|
598
598
|
const invoker = (e) => {
|
|
599
599
|
if (!e._vts) e._vts = Date.now();
|
|
600
600
|
else if (e._vts <= invoker.attached) return;
|
|
601
|
-
|
|
601
|
+
const value = invoker.value;
|
|
602
|
+
if (isArray(value)) {
|
|
603
|
+
const originalStop = e.stopImmediatePropagation;
|
|
604
|
+
e.stopImmediatePropagation = () => {
|
|
605
|
+
originalStop.call(e);
|
|
606
|
+
e._stopped = true;
|
|
607
|
+
};
|
|
608
|
+
const handlers = value.slice();
|
|
609
|
+
const args = [e];
|
|
610
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
611
|
+
if (e._stopped) break;
|
|
612
|
+
const handler = handlers[i];
|
|
613
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
614
|
+
}
|
|
615
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
602
616
|
};
|
|
603
617
|
invoker.value = initialValue;
|
|
604
618
|
invoker.attached = getNow();
|
|
@@ -609,16 +623,6 @@ function sanitizeEventValue(value, propName) {
|
|
|
609
623
|
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}.`);
|
|
610
624
|
return NOOP;
|
|
611
625
|
}
|
|
612
|
-
function patchStopImmediatePropagation(e, value) {
|
|
613
|
-
if (isArray(value)) {
|
|
614
|
-
const originalStop = e.stopImmediatePropagation;
|
|
615
|
-
e.stopImmediatePropagation = () => {
|
|
616
|
-
originalStop.call(e);
|
|
617
|
-
e._stopped = true;
|
|
618
|
-
};
|
|
619
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
620
|
-
} else return value;
|
|
621
|
-
}
|
|
622
626
|
//#endregion
|
|
623
627
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
624
628
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-beta.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1224,9 +1224,6 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1224
1224
|
default: return 0;
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
|
-
function getTargetType(value) {
|
|
1228
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1229
|
-
}
|
|
1230
1227
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1231
1228
|
function reactive(target) {
|
|
1232
1229
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1339,10 +1336,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1339
1336
|
return target;
|
|
1340
1337
|
}
|
|
1341
1338
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1342
|
-
|
|
1343
|
-
if (targetType === 0) return target;
|
|
1339
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1344
1340
|
const existingProxy = proxyMap.get(target);
|
|
1345
1341
|
if (existingProxy) return existingProxy;
|
|
1342
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1343
|
+
if (targetType === 0) return target;
|
|
1346
1344
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1347
1345
|
proxyMap.set(target, proxy);
|
|
1348
1346
|
return proxy;
|
|
@@ -3157,17 +3155,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3157
3155
|
},
|
|
3158
3156
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3159
3157
|
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3160
|
-
|
|
3158
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3161
3159
|
const pendingMount = pendingMounts.get(vnode);
|
|
3162
3160
|
if (pendingMount) {
|
|
3163
3161
|
pendingMount.flags |= 4;
|
|
3164
3162
|
pendingMounts.delete(vnode);
|
|
3165
|
-
shouldRemove = false;
|
|
3166
3163
|
}
|
|
3167
3164
|
if (targetStart) hostRemove(targetStart);
|
|
3168
3165
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3169
3166
|
doRemove && hostRemove(anchor);
|
|
3170
|
-
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3167
|
+
if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3171
3168
|
const child = children[i];
|
|
3172
3169
|
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3173
3170
|
}
|
|
@@ -3819,15 +3816,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3819
3816
|
}
|
|
3820
3817
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
3821
3818
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3822
|
-
|
|
3819
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
3820
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
3821
|
+
logMismatchError();
|
|
3822
|
+
}
|
|
3823
3823
|
while (next) {
|
|
3824
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
3825
|
-
if (!hasWarned) {
|
|
3826
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
3827
|
-
hasWarned = true;
|
|
3828
|
-
}
|
|
3829
|
-
logMismatchError();
|
|
3830
|
-
}
|
|
3831
3824
|
const cur = next;
|
|
3832
3825
|
next = next.nextSibling;
|
|
3833
3826
|
remove(cur);
|
|
@@ -3866,7 +3859,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3866
3859
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
3867
3860
|
const children = parentVNode.children;
|
|
3868
3861
|
const l = children.length;
|
|
3869
|
-
let
|
|
3862
|
+
let hasCheckedMismatch = false;
|
|
3870
3863
|
for (let i = 0; i < l; i++) {
|
|
3871
3864
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
3872
3865
|
const isText = vnode.type === Text;
|
|
@@ -3880,12 +3873,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3880
3873
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3881
3874
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
3882
3875
|
else {
|
|
3883
|
-
if (!
|
|
3884
|
-
|
|
3876
|
+
if (!hasCheckedMismatch) {
|
|
3877
|
+
hasCheckedMismatch = true;
|
|
3878
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
3885
3879
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
3886
|
-
|
|
3880
|
+
logMismatchError();
|
|
3887
3881
|
}
|
|
3888
|
-
logMismatchError();
|
|
3889
3882
|
}
|
|
3890
3883
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
3891
3884
|
}
|
|
@@ -6898,8 +6891,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6898
6891
|
else hostInsert(el, container, anchor);
|
|
6899
6892
|
};
|
|
6900
6893
|
const performLeave = () => {
|
|
6894
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
6901
6895
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
6902
|
-
|
|
6896
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
6897
|
+
else leave(el, () => {
|
|
6903
6898
|
remove();
|
|
6904
6899
|
afterLeave && afterLeave();
|
|
6905
6900
|
});
|
|
@@ -7120,6 +7115,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7120
7115
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
7121
7116
|
}
|
|
7122
7117
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
7118
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
7119
|
+
insert();
|
|
7120
|
+
return;
|
|
7121
|
+
}
|
|
7123
7122
|
if (force || needTransition(parentSuspense, transition)) {
|
|
7124
7123
|
transition.beforeEnter(el);
|
|
7125
7124
|
insert();
|
|
@@ -8366,7 +8365,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8366
8365
|
}
|
|
8367
8366
|
//#endregion
|
|
8368
8367
|
//#region packages/runtime-core/src/index.ts
|
|
8369
|
-
const version = "3.6.0-beta.
|
|
8368
|
+
const version = "3.6.0-beta.13";
|
|
8370
8369
|
const warn = warn$1;
|
|
8371
8370
|
/**
|
|
8372
8371
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8974,7 +8973,21 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8974
8973
|
const invoker = (e) => {
|
|
8975
8974
|
if (!e._vts) e._vts = Date.now();
|
|
8976
8975
|
else if (e._vts <= invoker.attached) return;
|
|
8977
|
-
|
|
8976
|
+
const value = invoker.value;
|
|
8977
|
+
if (isArray(value)) {
|
|
8978
|
+
const originalStop = e.stopImmediatePropagation;
|
|
8979
|
+
e.stopImmediatePropagation = () => {
|
|
8980
|
+
originalStop.call(e);
|
|
8981
|
+
e._stopped = true;
|
|
8982
|
+
};
|
|
8983
|
+
const handlers = value.slice();
|
|
8984
|
+
const args = [e];
|
|
8985
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
8986
|
+
if (e._stopped) break;
|
|
8987
|
+
const handler = handlers[i];
|
|
8988
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
8989
|
+
}
|
|
8990
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
8978
8991
|
};
|
|
8979
8992
|
invoker.value = initialValue;
|
|
8980
8993
|
invoker.attached = getNow();
|
|
@@ -8985,16 +8998,6 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8985
8998
|
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}.`);
|
|
8986
8999
|
return NOOP;
|
|
8987
9000
|
}
|
|
8988
|
-
function patchStopImmediatePropagation(e, value) {
|
|
8989
|
-
if (isArray(value)) {
|
|
8990
|
-
const originalStop = e.stopImmediatePropagation;
|
|
8991
|
-
e.stopImmediatePropagation = () => {
|
|
8992
|
-
originalStop.call(e);
|
|
8993
|
-
e._stopped = true;
|
|
8994
|
-
};
|
|
8995
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
8996
|
-
} else return value;
|
|
8997
|
-
}
|
|
8998
9001
|
//#endregion
|
|
8999
9002
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
9000
9003
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|