@vue/compat 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-compat.d.ts +2 -2
- package/dist/vue.cjs.js +42 -42
- package/dist/vue.cjs.prod.js +39 -31
- package/dist/vue.esm-browser.js +41 -39
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +42 -40
- package/dist/vue.global.js +41 -39
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +41 -39
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +42 -40
- package/dist/vue.runtime.global.js +41 -39
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +2 -2
|
@@ -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
|
**/
|
|
@@ -1312,9 +1312,6 @@ function targetTypeMap(rawType) {
|
|
|
1312
1312
|
default: return 0;
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
|
-
function getTargetType(value) {
|
|
1316
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1317
|
-
}
|
|
1318
1315
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1319
1316
|
function reactive(target) {
|
|
1320
1317
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1427,10 +1424,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
|
|
|
1427
1424
|
return target;
|
|
1428
1425
|
}
|
|
1429
1426
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1430
|
-
|
|
1431
|
-
if (targetType === 0) return target;
|
|
1427
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1432
1428
|
const existingProxy = proxyMap.get(target);
|
|
1433
1429
|
if (existingProxy) return existingProxy;
|
|
1430
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1431
|
+
if (targetType === 0) return target;
|
|
1434
1432
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1435
1433
|
proxyMap.set(target, proxy);
|
|
1436
1434
|
return proxy;
|
|
@@ -3600,17 +3598,16 @@ const TeleportImpl = {
|
|
|
3600
3598
|
},
|
|
3601
3599
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3602
3600
|
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3603
|
-
|
|
3601
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3604
3602
|
const pendingMount = pendingMounts.get(vnode);
|
|
3605
3603
|
if (pendingMount) {
|
|
3606
3604
|
pendingMount.flags |= 4;
|
|
3607
3605
|
pendingMounts.delete(vnode);
|
|
3608
|
-
shouldRemove = false;
|
|
3609
3606
|
}
|
|
3610
3607
|
if (targetStart) hostRemove(targetStart);
|
|
3611
3608
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3612
3609
|
doRemove && hostRemove(anchor);
|
|
3613
|
-
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3610
|
+
if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3614
3611
|
const child = children[i];
|
|
3615
3612
|
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3616
3613
|
}
|
|
@@ -4263,15 +4260,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4263
4260
|
}
|
|
4264
4261
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
4265
4262
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4266
|
-
|
|
4263
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
4264
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4265
|
+
logMismatchError();
|
|
4266
|
+
}
|
|
4267
4267
|
while (next) {
|
|
4268
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
4269
|
-
if (!hasWarned) {
|
|
4270
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4271
|
-
hasWarned = true;
|
|
4272
|
-
}
|
|
4273
|
-
logMismatchError();
|
|
4274
|
-
}
|
|
4275
4268
|
const cur = next;
|
|
4276
4269
|
next = next.nextSibling;
|
|
4277
4270
|
remove(cur);
|
|
@@ -4310,7 +4303,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4310
4303
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
4311
4304
|
const children = parentVNode.children;
|
|
4312
4305
|
const l = children.length;
|
|
4313
|
-
let
|
|
4306
|
+
let hasCheckedMismatch = false;
|
|
4314
4307
|
for (let i = 0; i < l; i++) {
|
|
4315
4308
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
4316
4309
|
const isText = vnode.type === Text;
|
|
@@ -4324,12 +4317,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4324
4317
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4325
4318
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
4326
4319
|
else {
|
|
4327
|
-
if (!
|
|
4328
|
-
|
|
4320
|
+
if (!hasCheckedMismatch) {
|
|
4321
|
+
hasCheckedMismatch = true;
|
|
4322
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4329
4323
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
4330
|
-
|
|
4324
|
+
logMismatchError();
|
|
4331
4325
|
}
|
|
4332
|
-
logMismatchError();
|
|
4333
4326
|
}
|
|
4334
4327
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4335
4328
|
}
|
|
@@ -6263,7 +6256,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6263
6256
|
if (options.el) return vm.$mount(options.el);
|
|
6264
6257
|
else return vm;
|
|
6265
6258
|
}
|
|
6266
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6259
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.13`;
|
|
6267
6260
|
Vue.config = singletonApp.config;
|
|
6268
6261
|
Vue.use = (plugin, ...options) => {
|
|
6269
6262
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8199,8 +8192,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8199
8192
|
else hostInsert(el, container, anchor);
|
|
8200
8193
|
};
|
|
8201
8194
|
const performLeave = () => {
|
|
8195
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8202
8196
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
8203
|
-
|
|
8197
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
8198
|
+
else leave(el, () => {
|
|
8204
8199
|
remove();
|
|
8205
8200
|
afterLeave && afterLeave();
|
|
8206
8201
|
});
|
|
@@ -8423,6 +8418,10 @@ function invalidateMount(hooks) {
|
|
|
8423
8418
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
8424
8419
|
}
|
|
8425
8420
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
8421
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
8422
|
+
insert();
|
|
8423
|
+
return;
|
|
8424
|
+
}
|
|
8426
8425
|
if (force || needTransition(parentSuspense, transition)) {
|
|
8427
8426
|
transition.beforeEnter(el);
|
|
8428
8427
|
insert();
|
|
@@ -9717,7 +9716,7 @@ function isMemoSame(cached, memo) {
|
|
|
9717
9716
|
}
|
|
9718
9717
|
//#endregion
|
|
9719
9718
|
//#region packages/runtime-core/src/index.ts
|
|
9720
|
-
const version = "3.6.0-beta.
|
|
9719
|
+
const version = "3.6.0-beta.13";
|
|
9721
9720
|
const warn = warn$1;
|
|
9722
9721
|
/**
|
|
9723
9722
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10375,7 +10374,21 @@ function createInvoker(initialValue, instance) {
|
|
|
10375
10374
|
const invoker = (e) => {
|
|
10376
10375
|
if (!e._vts) e._vts = Date.now();
|
|
10377
10376
|
else if (e._vts <= invoker.attached) return;
|
|
10378
|
-
|
|
10377
|
+
const value = invoker.value;
|
|
10378
|
+
if (isArray(value)) {
|
|
10379
|
+
const originalStop = e.stopImmediatePropagation;
|
|
10380
|
+
e.stopImmediatePropagation = () => {
|
|
10381
|
+
originalStop.call(e);
|
|
10382
|
+
e._stopped = true;
|
|
10383
|
+
};
|
|
10384
|
+
const handlers = value.slice();
|
|
10385
|
+
const args = [e];
|
|
10386
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
10387
|
+
if (e._stopped) break;
|
|
10388
|
+
const handler = handlers[i];
|
|
10389
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
10390
|
+
}
|
|
10391
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
10379
10392
|
};
|
|
10380
10393
|
invoker.value = initialValue;
|
|
10381
10394
|
invoker.attached = getNow();
|
|
@@ -10386,16 +10399,6 @@ function sanitizeEventValue(value, propName) {
|
|
|
10386
10399
|
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}.`);
|
|
10387
10400
|
return NOOP;
|
|
10388
10401
|
}
|
|
10389
|
-
function patchStopImmediatePropagation(e, value) {
|
|
10390
|
-
if (isArray(value)) {
|
|
10391
|
-
const originalStop = e.stopImmediatePropagation;
|
|
10392
|
-
e.stopImmediatePropagation = () => {
|
|
10393
|
-
originalStop.call(e);
|
|
10394
|
-
e._stopped = true;
|
|
10395
|
-
};
|
|
10396
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
10397
|
-
} else return value;
|
|
10398
|
-
}
|
|
10399
10402
|
//#endregion
|
|
10400
10403
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
10401
10404
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -14433,10 +14436,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
14433
14436
|
const isTemplate = isTemplateNode(node);
|
|
14434
14437
|
const memo = findDir(node, "memo");
|
|
14435
14438
|
const keyProp = findProp(node, `key`, false, true);
|
|
14436
|
-
|
|
14439
|
+
keyProp && keyProp.type;
|
|
14437
14440
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
14438
|
-
|
|
14439
|
-
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
14441
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
14440
14442
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
14441
14443
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
14442
14444
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|