@vue/compat 3.6.0-beta.10 → 3.6.0-beta.11
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 -0
- package/dist/vue.cjs.js +97 -28
- package/dist/vue.cjs.prod.js +89 -24
- package/dist/vue.esm-browser.js +71 -22
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +75 -23
- package/dist/vue.global.js +71 -22
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +71 -22
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +75 -23
- package/dist/vue.runtime.global.js +71 -22
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +3 -3
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3544,7 +3544,7 @@ const TeleportImpl = {
|
|
|
3544
3544
|
name: "Teleport",
|
|
3545
3545
|
__isTeleport: true,
|
|
3546
3546
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
|
3547
|
-
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
|
|
3547
|
+
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment, parentNode } } = internals;
|
|
3548
3548
|
const disabled = isTeleportDisabled(n2.props);
|
|
3549
3549
|
let { dynamicChildren } = n2;
|
|
3550
3550
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
@@ -3573,7 +3573,7 @@ const TeleportImpl = {
|
|
|
3573
3573
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3574
3574
|
pendingMounts.delete(vnode);
|
|
3575
3575
|
if (isTeleportDisabled(vnode.props)) {
|
|
3576
|
-
mount(vnode, container, vnode.anchor);
|
|
3576
|
+
mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
|
|
3577
3577
|
updateCssVars(vnode, true);
|
|
3578
3578
|
}
|
|
3579
3579
|
mountToTarget(vnode);
|
|
@@ -3653,7 +3653,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3653
3653
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3654
3654
|
const isReorder = moveType === 2;
|
|
3655
3655
|
if (isReorder) insert(el, container, parentAnchor);
|
|
3656
|
-
if (!isReorder || isTeleportDisabled(props)) {
|
|
3656
|
+
if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
|
|
3657
3657
|
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2, parentComponent);
|
|
3658
3658
|
}
|
|
3659
3659
|
if (isReorder) insert(anchor, container, parentAnchor);
|
|
@@ -3778,8 +3778,8 @@ const BaseTransitionImpl = {
|
|
|
3778
3778
|
const state = useTransitionState();
|
|
3779
3779
|
return () => {
|
|
3780
3780
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3781
|
-
|
|
3782
|
-
|
|
3781
|
+
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3782
|
+
if (!child) return;
|
|
3783
3783
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3784
3784
|
const { mode } = rawProps;
|
|
3785
3785
|
checkTransitionMode(mode);
|
|
@@ -5382,6 +5382,7 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5382
5382
|
*/
|
|
5383
5383
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5384
5384
|
let slot = slots[name];
|
|
5385
|
+
if (fallback) fallback.__vdom = true;
|
|
5385
5386
|
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5386
5387
|
if (vaporSlot) {
|
|
5387
5388
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
@@ -5420,9 +5421,7 @@ function ensureValidVNode(vnodes) {
|
|
|
5420
5421
|
}
|
|
5421
5422
|
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5422
5423
|
let vaporSlot;
|
|
5423
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs))
|
|
5424
|
-
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
5425
|
-
}
|
|
5424
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5426
5425
|
}
|
|
5427
5426
|
//#endregion
|
|
5428
5427
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
@@ -5983,9 +5982,14 @@ function withAsyncContext(getAwaitable) {
|
|
|
5983
5982
|
setCurrentInstance(null, void 0);
|
|
5984
5983
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5985
5984
|
const restore = () => {
|
|
5985
|
+
const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5986
5986
|
setCurrentInstance(ctx);
|
|
5987
5987
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5988
|
-
|
|
5988
|
+
const reset = restoreAsyncContext && restoreAsyncContext();
|
|
5989
|
+
return () => {
|
|
5990
|
+
if (reset) reset();
|
|
5991
|
+
if (resetStoppedScope) resetStoppedScope.reset();
|
|
5992
|
+
};
|
|
5989
5993
|
};
|
|
5990
5994
|
const cleanup = () => {
|
|
5991
5995
|
setCurrentInstance(null, void 0);
|
|
@@ -6324,7 +6328,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6324
6328
|
if (options.el) return vm.$mount(options.el);
|
|
6325
6329
|
else return vm;
|
|
6326
6330
|
}
|
|
6327
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6331
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.11`;
|
|
6328
6332
|
Vue.config = singletonApp.config;
|
|
6329
6333
|
Vue.use = (plugin, ...options) => {
|
|
6330
6334
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7470,7 +7474,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
|
7470
7474
|
const receivedType = toRawType(value);
|
|
7471
7475
|
const expectedValue = styleValue(value, expectedType);
|
|
7472
7476
|
const receivedValue = styleValue(value, receivedType);
|
|
7473
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) &&
|
|
7477
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) message += ` with value ${expectedValue}`;
|
|
7474
7478
|
message += `, got ${receivedType} `;
|
|
7475
7479
|
if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
|
|
7476
7480
|
return message;
|
|
@@ -7479,7 +7483,8 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
|
7479
7483
|
* dev only
|
|
7480
7484
|
*/
|
|
7481
7485
|
function styleValue(value, type) {
|
|
7482
|
-
if (
|
|
7486
|
+
if (isSymbol(value)) return value.toString();
|
|
7487
|
+
else if (type === "String") return `"${value}"`;
|
|
7483
7488
|
else if (type === "Number") return `${Number(value)}`;
|
|
7484
7489
|
else return `${value}`;
|
|
7485
7490
|
}
|
|
@@ -7496,8 +7501,11 @@ function isExplicable(type) {
|
|
|
7496
7501
|
/**
|
|
7497
7502
|
* dev only
|
|
7498
7503
|
*/
|
|
7499
|
-
function
|
|
7500
|
-
return args.
|
|
7504
|
+
function isCoercible(...args) {
|
|
7505
|
+
return args.every((elem) => {
|
|
7506
|
+
const value = elem.toLowerCase();
|
|
7507
|
+
return value !== "boolean" && value !== "symbol";
|
|
7508
|
+
});
|
|
7501
7509
|
}
|
|
7502
7510
|
//#endregion
|
|
7503
7511
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
@@ -8733,15 +8741,19 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8733
8741
|
if (suspense.isHydrating) suspense.isHydrating = false;
|
|
8734
8742
|
else if (!resume) {
|
|
8735
8743
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
8744
|
+
let hasUpdatedAnchor = false;
|
|
8736
8745
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
8737
8746
|
if (pendingId === suspense.pendingId) {
|
|
8738
|
-
move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8747
|
+
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8739
8748
|
queuePostFlushCb(effects);
|
|
8740
8749
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
8741
8750
|
}
|
|
8742
8751
|
};
|
|
8743
8752
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
8744
|
-
if (parentNode(activeBranch.el) === container)
|
|
8753
|
+
if (parentNode(activeBranch.el) === container) {
|
|
8754
|
+
anchor = next(activeBranch);
|
|
8755
|
+
hasUpdatedAnchor = true;
|
|
8756
|
+
}
|
|
8745
8757
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
8746
8758
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
8747
8759
|
}
|
|
@@ -9138,12 +9150,30 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9138
9150
|
el: vnode.el,
|
|
9139
9151
|
anchor: vnode.anchor,
|
|
9140
9152
|
ctx: vnode.ctx,
|
|
9141
|
-
ce: vnode.ce
|
|
9153
|
+
ce: vnode.ce,
|
|
9154
|
+
vi: vnode.vi,
|
|
9155
|
+
vs: cloneVaporSlotMeta(vnode),
|
|
9156
|
+
vb: vnode.vb
|
|
9142
9157
|
};
|
|
9143
9158
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9144
9159
|
defineLegacyVNodeProperties(cloned);
|
|
9145
9160
|
return cloned;
|
|
9146
9161
|
}
|
|
9162
|
+
function cloneVaporSlotMeta(vnode) {
|
|
9163
|
+
const vaporSlot = vnode.vs;
|
|
9164
|
+
if (!vaporSlot) return vaporSlot;
|
|
9165
|
+
const cloned = {
|
|
9166
|
+
slot: vaporSlot.slot,
|
|
9167
|
+
fallback: vaporSlot.fallback,
|
|
9168
|
+
outletFallback: vaporSlot.outletFallback
|
|
9169
|
+
};
|
|
9170
|
+
if (vnode.el) {
|
|
9171
|
+
cloned.state = vaporSlot.state;
|
|
9172
|
+
cloned.ref = vaporSlot.ref;
|
|
9173
|
+
cloned.scope = vaporSlot.scope;
|
|
9174
|
+
}
|
|
9175
|
+
return cloned;
|
|
9176
|
+
}
|
|
9147
9177
|
/**
|
|
9148
9178
|
* Dev only, for HMR of hoisted vnodes reused in v-for
|
|
9149
9179
|
* https://github.com/vitejs/vite/issues/2022
|
|
@@ -9832,7 +9862,7 @@ function isMemoSame(cached, memo) {
|
|
|
9832
9862
|
}
|
|
9833
9863
|
//#endregion
|
|
9834
9864
|
//#region packages/runtime-core/src/index.ts
|
|
9835
|
-
const version = "3.6.0-beta.
|
|
9865
|
+
const version = "3.6.0-beta.11";
|
|
9836
9866
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
9837
9867
|
/**
|
|
9838
9868
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10337,7 +10367,10 @@ function patchStyle(el, prev, next) {
|
|
|
10337
10367
|
}
|
|
10338
10368
|
for (const key in next) {
|
|
10339
10369
|
if (key === "display") hasControlledDisplay = true;
|
|
10340
|
-
|
|
10370
|
+
const value = next[key];
|
|
10371
|
+
if (value != null) {
|
|
10372
|
+
if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
|
|
10373
|
+
} else setStyle(style, key, "");
|
|
10341
10374
|
}
|
|
10342
10375
|
} else if (isCssString) {
|
|
10343
10376
|
if (prev !== next) {
|
|
@@ -10387,6 +10420,14 @@ function autoPrefix(style, rawName) {
|
|
|
10387
10420
|
}
|
|
10388
10421
|
return rawName;
|
|
10389
10422
|
}
|
|
10423
|
+
/**
|
|
10424
|
+
* Browsers update textarea width/height directly during native resize.
|
|
10425
|
+
* Only special-case this common textarea path for now; other resize scenarios
|
|
10426
|
+
* still follow normal vnode style patching.
|
|
10427
|
+
*/
|
|
10428
|
+
function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
10429
|
+
return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
|
|
10430
|
+
}
|
|
10390
10431
|
//#endregion
|
|
10391
10432
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10392
10433
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
@@ -10846,7 +10887,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
10846
10887
|
replacementNodes.push(child);
|
|
10847
10888
|
}
|
|
10848
10889
|
parent.removeChild(o);
|
|
10849
|
-
slotReplacements.set(o,
|
|
10890
|
+
slotReplacements.set(o, {
|
|
10891
|
+
nodes: replacementNodes,
|
|
10892
|
+
usedFallback: !content
|
|
10893
|
+
});
|
|
10850
10894
|
}
|
|
10851
10895
|
this._updateSlotNodes(slotReplacements);
|
|
10852
10896
|
}
|
|
@@ -11469,6 +11513,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11469
11513
|
TransitionGroup: () => TransitionGroup,
|
|
11470
11514
|
TransitionPropsValidators: () => TransitionPropsValidators,
|
|
11471
11515
|
TriggerOpTypes: () => TriggerOpTypes,
|
|
11516
|
+
VaporSlot: () => VaporSlot,
|
|
11472
11517
|
VueElement: () => VueElement,
|
|
11473
11518
|
VueElementBase: () => VueElementBase,
|
|
11474
11519
|
activate: () => activate,
|
|
@@ -11524,6 +11569,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11524
11569
|
endMeasure: () => endMeasure,
|
|
11525
11570
|
ensureHydrationRenderer: () => ensureHydrationRenderer,
|
|
11526
11571
|
ensureRenderer: () => ensureRenderer,
|
|
11572
|
+
ensureValidVNode: () => ensureValidVNode,
|
|
11527
11573
|
ensureVaporSlotFallback: () => ensureVaporSlotFallback,
|
|
11528
11574
|
expose: () => expose,
|
|
11529
11575
|
flushOnAppMount: () => flushOnAppMount,
|
|
@@ -11589,6 +11635,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11589
11635
|
normalizeProps: () => normalizeProps,
|
|
11590
11636
|
normalizeRef: () => normalizeRef,
|
|
11591
11637
|
normalizeStyle: () => normalizeStyle,
|
|
11638
|
+
normalizeVNode: () => normalizeVNode,
|
|
11592
11639
|
onActivated: () => onActivated,
|
|
11593
11640
|
onBeforeMount: () => onBeforeMount,
|
|
11594
11641
|
onBeforeUnmount: () => onBeforeUnmount,
|
|
@@ -13912,6 +13959,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
13912
13959
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
13913
13960
|
temps: 0,
|
|
13914
13961
|
identifiers: Object.create(null),
|
|
13962
|
+
identifierScopes: Object.create(null),
|
|
13915
13963
|
scopes: {
|
|
13916
13964
|
vFor: 0,
|
|
13917
13965
|
vSlot: 0,
|
|
@@ -13965,8 +14013,12 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
13965
14013
|
context.parent.children.splice(removalIndex, 1);
|
|
13966
14014
|
},
|
|
13967
14015
|
onNodeRemoved: NOOP,
|
|
13968
|
-
addIdentifiers(exp) {},
|
|
14016
|
+
addIdentifiers(exp, type = "local") {},
|
|
13969
14017
|
removeIdentifiers(exp) {},
|
|
14018
|
+
isSlotScopeIdentifier(name) {
|
|
14019
|
+
const scopes = context.identifierScopes[name];
|
|
14020
|
+
return scopes ? scopes[scopes.length - 1] === "slot" : false;
|
|
14021
|
+
},
|
|
13970
14022
|
hoist(exp) {
|
|
13971
14023
|
if (isString(exp)) exp = createSimpleExpression(exp);
|
|
13972
14024
|
context.hoists.push(exp);
|
|
@@ -16186,4 +16238,4 @@ Vue.compile = compileToFunction;
|
|
|
16186
16238
|
var esm_index_default = Vue;
|
|
16187
16239
|
const configureCompat = Vue.configureCompat;
|
|
16188
16240
|
//#endregion
|
|
16189
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
|
16241
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3503,7 +3503,7 @@ var Vue = (function() {
|
|
|
3503
3503
|
name: "Teleport",
|
|
3504
3504
|
__isTeleport: true,
|
|
3505
3505
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
|
3506
|
-
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
|
|
3506
|
+
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment, parentNode } } = internals;
|
|
3507
3507
|
const disabled = isTeleportDisabled(n2.props);
|
|
3508
3508
|
let { dynamicChildren } = n2;
|
|
3509
3509
|
if (isHmrUpdating) {
|
|
@@ -3532,7 +3532,7 @@ var Vue = (function() {
|
|
|
3532
3532
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3533
3533
|
pendingMounts.delete(vnode);
|
|
3534
3534
|
if (isTeleportDisabled(vnode.props)) {
|
|
3535
|
-
mount(vnode, container, vnode.anchor);
|
|
3535
|
+
mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
|
|
3536
3536
|
updateCssVars(vnode, true);
|
|
3537
3537
|
}
|
|
3538
3538
|
mountToTarget(vnode);
|
|
@@ -3612,7 +3612,7 @@ var Vue = (function() {
|
|
|
3612
3612
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3613
3613
|
const isReorder = moveType === 2;
|
|
3614
3614
|
if (isReorder) insert(el, container, parentAnchor);
|
|
3615
|
-
if (!isReorder || isTeleportDisabled(props)) {
|
|
3615
|
+
if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
|
|
3616
3616
|
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2, parentComponent);
|
|
3617
3617
|
}
|
|
3618
3618
|
if (isReorder) insert(anchor, container, parentAnchor);
|
|
@@ -3737,8 +3737,8 @@ var Vue = (function() {
|
|
|
3737
3737
|
const state = useTransitionState();
|
|
3738
3738
|
return () => {
|
|
3739
3739
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3740
|
-
|
|
3741
|
-
|
|
3740
|
+
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3741
|
+
if (!child) return;
|
|
3742
3742
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3743
3743
|
const { mode } = rawProps;
|
|
3744
3744
|
checkTransitionMode(mode);
|
|
@@ -5308,6 +5308,7 @@ var Vue = (function() {
|
|
|
5308
5308
|
*/
|
|
5309
5309
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5310
5310
|
let slot = slots[name];
|
|
5311
|
+
if (fallback) fallback.__vdom = true;
|
|
5311
5312
|
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5312
5313
|
if (vaporSlot) {
|
|
5313
5314
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
@@ -5346,9 +5347,7 @@ var Vue = (function() {
|
|
|
5346
5347
|
}
|
|
5347
5348
|
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5348
5349
|
let vaporSlot;
|
|
5349
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs))
|
|
5350
|
-
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
5351
|
-
}
|
|
5350
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5352
5351
|
}
|
|
5353
5352
|
//#endregion
|
|
5354
5353
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
@@ -5909,9 +5908,14 @@ var Vue = (function() {
|
|
|
5909
5908
|
setCurrentInstance(null, void 0);
|
|
5910
5909
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5911
5910
|
const restore = () => {
|
|
5911
|
+
const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5912
5912
|
setCurrentInstance(ctx);
|
|
5913
5913
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5914
|
-
|
|
5914
|
+
const reset = restoreAsyncContext && restoreAsyncContext();
|
|
5915
|
+
return () => {
|
|
5916
|
+
if (reset) reset();
|
|
5917
|
+
if (resetStoppedScope) resetStoppedScope.reset();
|
|
5918
|
+
};
|
|
5915
5919
|
};
|
|
5916
5920
|
const cleanup = () => {
|
|
5917
5921
|
setCurrentInstance(null, void 0);
|
|
@@ -6248,7 +6252,7 @@ var Vue = (function() {
|
|
|
6248
6252
|
if (options.el) return vm.$mount(options.el);
|
|
6249
6253
|
else return vm;
|
|
6250
6254
|
}
|
|
6251
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6255
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.11`;
|
|
6252
6256
|
Vue.config = singletonApp.config;
|
|
6253
6257
|
Vue.use = (plugin, ...options) => {
|
|
6254
6258
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7384,7 +7388,7 @@ var Vue = (function() {
|
|
|
7384
7388
|
const receivedType = toRawType(value);
|
|
7385
7389
|
const expectedValue = styleValue(value, expectedType);
|
|
7386
7390
|
const receivedValue = styleValue(value, receivedType);
|
|
7387
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) &&
|
|
7391
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) message += ` with value ${expectedValue}`;
|
|
7388
7392
|
message += `, got ${receivedType} `;
|
|
7389
7393
|
if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
|
|
7390
7394
|
return message;
|
|
@@ -7393,7 +7397,8 @@ var Vue = (function() {
|
|
|
7393
7397
|
* dev only
|
|
7394
7398
|
*/
|
|
7395
7399
|
function styleValue(value, type) {
|
|
7396
|
-
if (
|
|
7400
|
+
if (isSymbol(value)) return value.toString();
|
|
7401
|
+
else if (type === "String") return `"${value}"`;
|
|
7397
7402
|
else if (type === "Number") return `${Number(value)}`;
|
|
7398
7403
|
else return `${value}`;
|
|
7399
7404
|
}
|
|
@@ -7410,8 +7415,11 @@ var Vue = (function() {
|
|
|
7410
7415
|
/**
|
|
7411
7416
|
* dev only
|
|
7412
7417
|
*/
|
|
7413
|
-
function
|
|
7414
|
-
return args.
|
|
7418
|
+
function isCoercible(...args) {
|
|
7419
|
+
return args.every((elem) => {
|
|
7420
|
+
const value = elem.toLowerCase();
|
|
7421
|
+
return value !== "boolean" && value !== "symbol";
|
|
7422
|
+
});
|
|
7415
7423
|
}
|
|
7416
7424
|
//#endregion
|
|
7417
7425
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
@@ -8606,15 +8614,19 @@ var Vue = (function() {
|
|
|
8606
8614
|
if (suspense.isHydrating) suspense.isHydrating = false;
|
|
8607
8615
|
else if (!resume) {
|
|
8608
8616
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
8617
|
+
let hasUpdatedAnchor = false;
|
|
8609
8618
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
8610
8619
|
if (pendingId === suspense.pendingId) {
|
|
8611
|
-
move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8620
|
+
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8612
8621
|
queuePostFlushCb(effects);
|
|
8613
8622
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
8614
8623
|
}
|
|
8615
8624
|
};
|
|
8616
8625
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
8617
|
-
if (parentNode(activeBranch.el) === container)
|
|
8626
|
+
if (parentNode(activeBranch.el) === container) {
|
|
8627
|
+
anchor = next(activeBranch);
|
|
8628
|
+
hasUpdatedAnchor = true;
|
|
8629
|
+
}
|
|
8618
8630
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
8619
8631
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
8620
8632
|
}
|
|
@@ -9011,12 +9023,30 @@ var Vue = (function() {
|
|
|
9011
9023
|
el: vnode.el,
|
|
9012
9024
|
anchor: vnode.anchor,
|
|
9013
9025
|
ctx: vnode.ctx,
|
|
9014
|
-
ce: vnode.ce
|
|
9026
|
+
ce: vnode.ce,
|
|
9027
|
+
vi: vnode.vi,
|
|
9028
|
+
vs: cloneVaporSlotMeta(vnode),
|
|
9029
|
+
vb: vnode.vb
|
|
9015
9030
|
};
|
|
9016
9031
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9017
9032
|
defineLegacyVNodeProperties(cloned);
|
|
9018
9033
|
return cloned;
|
|
9019
9034
|
}
|
|
9035
|
+
function cloneVaporSlotMeta(vnode) {
|
|
9036
|
+
const vaporSlot = vnode.vs;
|
|
9037
|
+
if (!vaporSlot) return vaporSlot;
|
|
9038
|
+
const cloned = {
|
|
9039
|
+
slot: vaporSlot.slot,
|
|
9040
|
+
fallback: vaporSlot.fallback,
|
|
9041
|
+
outletFallback: vaporSlot.outletFallback
|
|
9042
|
+
};
|
|
9043
|
+
if (vnode.el) {
|
|
9044
|
+
cloned.state = vaporSlot.state;
|
|
9045
|
+
cloned.ref = vaporSlot.ref;
|
|
9046
|
+
cloned.scope = vaporSlot.scope;
|
|
9047
|
+
}
|
|
9048
|
+
return cloned;
|
|
9049
|
+
}
|
|
9020
9050
|
/**
|
|
9021
9051
|
* Dev only, for HMR of hoisted vnodes reused in v-for
|
|
9022
9052
|
* https://github.com/vitejs/vite/issues/2022
|
|
@@ -9676,7 +9706,7 @@ var Vue = (function() {
|
|
|
9676
9706
|
}
|
|
9677
9707
|
//#endregion
|
|
9678
9708
|
//#region packages/runtime-core/src/index.ts
|
|
9679
|
-
const version = "3.6.0-beta.
|
|
9709
|
+
const version = "3.6.0-beta.11";
|
|
9680
9710
|
const warn = warn$1;
|
|
9681
9711
|
/**
|
|
9682
9712
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10159,7 +10189,10 @@ var Vue = (function() {
|
|
|
10159
10189
|
}
|
|
10160
10190
|
for (const key in next) {
|
|
10161
10191
|
if (key === "display") hasControlledDisplay = true;
|
|
10162
|
-
|
|
10192
|
+
const value = next[key];
|
|
10193
|
+
if (value != null) {
|
|
10194
|
+
if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
|
|
10195
|
+
} else setStyle(style, key, "");
|
|
10163
10196
|
}
|
|
10164
10197
|
} else if (isCssString) {
|
|
10165
10198
|
if (prev !== next) {
|
|
@@ -10207,6 +10240,14 @@ var Vue = (function() {
|
|
|
10207
10240
|
}
|
|
10208
10241
|
return rawName;
|
|
10209
10242
|
}
|
|
10243
|
+
/**
|
|
10244
|
+
* Browsers update textarea width/height directly during native resize.
|
|
10245
|
+
* Only special-case this common textarea path for now; other resize scenarios
|
|
10246
|
+
* still follow normal vnode style patching.
|
|
10247
|
+
*/
|
|
10248
|
+
function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
10249
|
+
return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
|
|
10250
|
+
}
|
|
10210
10251
|
//#endregion
|
|
10211
10252
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10212
10253
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
@@ -10666,7 +10707,10 @@ var Vue = (function() {
|
|
|
10666
10707
|
replacementNodes.push(child);
|
|
10667
10708
|
}
|
|
10668
10709
|
parent.removeChild(o);
|
|
10669
|
-
slotReplacements.set(o,
|
|
10710
|
+
slotReplacements.set(o, {
|
|
10711
|
+
nodes: replacementNodes,
|
|
10712
|
+
usedFallback: !content
|
|
10713
|
+
});
|
|
10670
10714
|
}
|
|
10671
10715
|
this._updateSlotNodes(slotReplacements);
|
|
10672
10716
|
}
|
|
@@ -13588,6 +13632,7 @@ var Vue = (function() {
|
|
|
13588
13632
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
13589
13633
|
temps: 0,
|
|
13590
13634
|
identifiers: Object.create(null),
|
|
13635
|
+
identifierScopes: Object.create(null),
|
|
13591
13636
|
scopes: {
|
|
13592
13637
|
vFor: 0,
|
|
13593
13638
|
vSlot: 0,
|
|
@@ -13638,8 +13683,12 @@ var Vue = (function() {
|
|
|
13638
13683
|
context.parent.children.splice(removalIndex, 1);
|
|
13639
13684
|
},
|
|
13640
13685
|
onNodeRemoved: NOOP,
|
|
13641
|
-
addIdentifiers(exp) {},
|
|
13686
|
+
addIdentifiers(exp, type = "local") {},
|
|
13642
13687
|
removeIdentifiers(exp) {},
|
|
13688
|
+
isSlotScopeIdentifier(name) {
|
|
13689
|
+
const scopes = context.identifierScopes[name];
|
|
13690
|
+
return scopes ? scopes[scopes.length - 1] === "slot" : false;
|
|
13691
|
+
},
|
|
13643
13692
|
hoist(exp) {
|
|
13644
13693
|
if (isString(exp)) exp = createSimpleExpression(exp);
|
|
13645
13694
|
context.hoists.push(exp);
|