@vue/compat 3.6.0-rc.1 → 3.6.0-rc.2
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 +4 -4
- package/dist/vue.cjs.js +36 -20
- package/dist/vue.cjs.prod.js +36 -20
- package/dist/vue.esm-browser.js +36 -20
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +40 -21
- package/dist/vue.global.js +36 -20
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +36 -20
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +40 -21
- package/dist/vue.runtime.global.js +36 -20
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +2 -2
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3550,7 +3550,7 @@ function instanceWatch(source, value, options) {
|
|
|
3550
3550
|
}
|
|
3551
3551
|
const prev = setCurrentInstance(this);
|
|
3552
3552
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3553
|
-
|
|
3553
|
+
restoreCurrentInstance(prev);
|
|
3554
3554
|
return res;
|
|
3555
3555
|
}
|
|
3556
3556
|
function createPathGetter(ctx, path) {
|
|
@@ -4010,12 +4010,11 @@ function getInnerChild$1(vnode) {
|
|
|
4010
4010
|
}
|
|
4011
4011
|
}
|
|
4012
4012
|
function setTransitionHooks(vnode, hooks) {
|
|
4013
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
4014
|
-
else {
|
|
4013
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4015
4014
|
vnode.transition = hooks;
|
|
4016
|
-
setTransitionHooks(vnode.component
|
|
4017
|
-
|
|
4018
|
-
else if (vnode.shapeFlag & 128) {
|
|
4015
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4016
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
4017
|
+
} else if (vnode.shapeFlag & 128) {
|
|
4019
4018
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4020
4019
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4021
4020
|
} else vnode.transition = hooks;
|
|
@@ -5116,7 +5115,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
5116
5115
|
try {
|
|
5117
5116
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
5118
5117
|
} finally {
|
|
5119
|
-
|
|
5118
|
+
restoreCurrentInstance(prev);
|
|
5120
5119
|
setActiveSub(prevSub);
|
|
5121
5120
|
}
|
|
5122
5121
|
});
|
|
@@ -6413,7 +6412,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6413
6412
|
if (options.el) return vm.$mount(options.el);
|
|
6414
6413
|
else return vm;
|
|
6415
6414
|
}
|
|
6416
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6415
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.2`;
|
|
6417
6416
|
Vue.config = singletonApp.config;
|
|
6418
6417
|
Vue.use = (plugin, ...options) => {
|
|
6419
6418
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7416,7 +7415,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
7416
7415
|
const prev = setCurrentInstance(instance);
|
|
7417
7416
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7418
7417
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7419
|
-
|
|
7418
|
+
restoreCurrentInstance(prev);
|
|
7420
7419
|
return value;
|
|
7421
7420
|
}
|
|
7422
7421
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -8010,7 +8009,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8010
8009
|
};
|
|
8011
8010
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8012
8011
|
n2.slotScopeIds = slotScopeIds;
|
|
8013
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
8012
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
8014
8013
|
else {
|
|
8015
8014
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
8016
8015
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -8369,7 +8368,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8369
8368
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8370
8369
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8371
8370
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8372
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8371
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8373
8372
|
return;
|
|
8374
8373
|
}
|
|
8375
8374
|
if (shapeFlag & 6) {
|
|
@@ -8425,7 +8424,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8425
8424
|
}
|
|
8426
8425
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8427
8426
|
if (shapeFlag & 256) {
|
|
8428
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8427
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8429
8428
|
else parentComponent.ctx.deactivate(vnode);
|
|
8430
8429
|
return;
|
|
8431
8430
|
}
|
|
@@ -8435,7 +8434,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8435
8434
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8436
8435
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8437
8436
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8438
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8437
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8439
8438
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8440
8439
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8441
8440
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -8452,7 +8451,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8452
8451
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8453
8452
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8454
8453
|
if (type === VaporSlot) {
|
|
8455
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8454
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8456
8455
|
return;
|
|
8457
8456
|
}
|
|
8458
8457
|
if (doRemove) remove(vnode);
|
|
@@ -9407,6 +9406,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
9407
9406
|
simpleSetCurrentInstance(instance);
|
|
9408
9407
|
}
|
|
9409
9408
|
};
|
|
9409
|
+
/**
|
|
9410
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9411
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9412
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9413
|
+
* @internal
|
|
9414
|
+
*/
|
|
9415
|
+
const restoreCurrentInstance = (prev) => {
|
|
9416
|
+
setCurrentScope(prev[1]);
|
|
9417
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9418
|
+
};
|
|
9410
9419
|
const internalOptions = [
|
|
9411
9420
|
"ce",
|
|
9412
9421
|
"type",
|
|
@@ -9567,7 +9576,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9567
9576
|
const setupResult = callWithErrorHandling(setup, instance, 0, [!!(process.env.NODE_ENV !== "production") ? /* @__PURE__ */ shallowReadonly(instance.props) : instance.props, setupContext]);
|
|
9568
9577
|
const isAsyncSetup = isPromise(setupResult);
|
|
9569
9578
|
setActiveSub(prevSub);
|
|
9570
|
-
|
|
9579
|
+
restoreCurrentInstance(prev);
|
|
9571
9580
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9572
9581
|
if (isAsyncSetup) {
|
|
9573
9582
|
const unsetCurrentInstance = () => {
|
|
@@ -9641,7 +9650,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9641
9650
|
applyOptions(instance);
|
|
9642
9651
|
} finally {
|
|
9643
9652
|
setActiveSub(prevSub);
|
|
9644
|
-
|
|
9653
|
+
restoreCurrentInstance(prevInstance);
|
|
9645
9654
|
}
|
|
9646
9655
|
}
|
|
9647
9656
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template)
|
|
@@ -9961,7 +9970,7 @@ function isMemoSame(cached, memo) {
|
|
|
9961
9970
|
}
|
|
9962
9971
|
//#endregion
|
|
9963
9972
|
//#region packages/runtime-core/src/index.ts
|
|
9964
|
-
const version = "3.6.0-rc.
|
|
9973
|
+
const version = "3.6.0-rc.2";
|
|
9965
9974
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
9966
9975
|
/**
|
|
9967
9976
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -11706,6 +11715,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11706
11715
|
isAsyncWrapper: () => isAsyncWrapper,
|
|
11707
11716
|
isEmitListener: () => isEmitListener,
|
|
11708
11717
|
isHydrating: () => isHydrating,
|
|
11718
|
+
isHydratingEnabled: () => isHydratingEnabled,
|
|
11709
11719
|
isKeepAlive: () => isKeepAlive,
|
|
11710
11720
|
isMapEqual: () => isMapEqual,
|
|
11711
11721
|
isMemoSame: () => isMemoSame,
|
|
@@ -11770,6 +11780,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11770
11780
|
pushWarningContext: () => pushWarningContext,
|
|
11771
11781
|
queueJob: () => queueJob,
|
|
11772
11782
|
queuePostFlushCb: () => queuePostFlushCb,
|
|
11783
|
+
queuePostRenderEffect: () => queuePostRenderEffect,
|
|
11773
11784
|
reactive: () => reactive,
|
|
11774
11785
|
readonly: () => readonly,
|
|
11775
11786
|
ref: () => ref,
|
|
@@ -11787,6 +11798,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11787
11798
|
resolveTeleportTarget: () => resolveTarget,
|
|
11788
11799
|
resolveTransitionHooks: () => resolveTransitionHooks,
|
|
11789
11800
|
resolveTransitionProps: () => resolveTransitionProps,
|
|
11801
|
+
restoreCurrentInstance: () => restoreCurrentInstance,
|
|
11790
11802
|
setBlockTracking: () => setBlockTracking,
|
|
11791
11803
|
setCurrentInstance: () => setCurrentInstance,
|
|
11792
11804
|
setCurrentRenderingInstance: () => setCurrentRenderingInstance,
|
|
@@ -14045,7 +14057,7 @@ function getSelfName(filename) {
|
|
|
14045
14057
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
14046
14058
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
14047
14059
|
}
|
|
14048
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false,
|
|
14060
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
14049
14061
|
const context = {
|
|
14050
14062
|
filename,
|
|
14051
14063
|
selfName: getSelfName(filename),
|
|
@@ -14067,7 +14079,6 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14067
14079
|
bindingMetadata,
|
|
14068
14080
|
inline,
|
|
14069
14081
|
isTS,
|
|
14070
|
-
eventDelegation,
|
|
14071
14082
|
onError,
|
|
14072
14083
|
onWarn,
|
|
14073
14084
|
compatConfig,
|
|
@@ -15998,6 +16009,14 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
15998
16009
|
const eventOptionModifiers = [];
|
|
15999
16010
|
for (let i = 0; i < modifiers.length; i++) {
|
|
16000
16011
|
const modifier = modifiers[i].content;
|
|
16012
|
+
if (modifier === "delegate") {
|
|
16013
|
+
if (context) {
|
|
16014
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
16015
|
+
error.loc = modifiers[i].loc;
|
|
16016
|
+
context.onWarn(error);
|
|
16017
|
+
}
|
|
16018
|
+
continue;
|
|
16019
|
+
}
|
|
16001
16020
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
16002
16021
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
16003
16022
|
else {
|
|
@@ -16360,4 +16379,4 @@ Vue.compile = compileToFunction;
|
|
|
16360
16379
|
var esm_index_default = Vue;
|
|
16361
16380
|
const configureCompat = Vue.configureCompat;
|
|
16362
16381
|
//#endregion
|
|
16363
|
-
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, logMismatchError, 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, parseEventName, 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 };
|
|
16382
|
+
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, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, 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, parseEventName, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, 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-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3509,7 +3509,7 @@ var Vue = (function() {
|
|
|
3509
3509
|
}
|
|
3510
3510
|
const prev = setCurrentInstance(this);
|
|
3511
3511
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3512
|
-
|
|
3512
|
+
restoreCurrentInstance(prev);
|
|
3513
3513
|
return res;
|
|
3514
3514
|
}
|
|
3515
3515
|
function createPathGetter(ctx, path) {
|
|
@@ -3968,12 +3968,11 @@ var Vue = (function() {
|
|
|
3968
3968
|
}
|
|
3969
3969
|
}
|
|
3970
3970
|
function setTransitionHooks(vnode, hooks) {
|
|
3971
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3972
|
-
else {
|
|
3971
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3973
3972
|
vnode.transition = hooks;
|
|
3974
|
-
setTransitionHooks(vnode.component
|
|
3975
|
-
|
|
3976
|
-
else if (vnode.shapeFlag & 128) {
|
|
3973
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3974
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
3975
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3977
3976
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3978
3977
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3979
3978
|
} else vnode.transition = hooks;
|
|
@@ -5041,7 +5040,7 @@ var Vue = (function() {
|
|
|
5041
5040
|
try {
|
|
5042
5041
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
5043
5042
|
} finally {
|
|
5044
|
-
|
|
5043
|
+
restoreCurrentInstance(prev);
|
|
5045
5044
|
setActiveSub(prevSub);
|
|
5046
5045
|
}
|
|
5047
5046
|
});
|
|
@@ -6336,7 +6335,7 @@ var Vue = (function() {
|
|
|
6336
6335
|
if (options.el) return vm.$mount(options.el);
|
|
6337
6336
|
else return vm;
|
|
6338
6337
|
}
|
|
6339
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6338
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.2`;
|
|
6340
6339
|
Vue.config = singletonApp.config;
|
|
6341
6340
|
Vue.use = (plugin, ...options) => {
|
|
6342
6341
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7329,7 +7328,7 @@ var Vue = (function() {
|
|
|
7329
7328
|
const prev = setCurrentInstance(instance);
|
|
7330
7329
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7331
7330
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7332
|
-
|
|
7331
|
+
restoreCurrentInstance(prev);
|
|
7333
7332
|
return value;
|
|
7334
7333
|
}
|
|
7335
7334
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -7890,7 +7889,7 @@ var Vue = (function() {
|
|
|
7890
7889
|
};
|
|
7891
7890
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7892
7891
|
n2.slotScopeIds = slotScopeIds;
|
|
7893
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
7892
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
7894
7893
|
else {
|
|
7895
7894
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
7896
7895
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -8243,7 +8242,7 @@ var Vue = (function() {
|
|
|
8243
8242
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8244
8243
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8245
8244
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8246
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8245
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8247
8246
|
return;
|
|
8248
8247
|
}
|
|
8249
8248
|
if (shapeFlag & 6) {
|
|
@@ -8299,7 +8298,7 @@ var Vue = (function() {
|
|
|
8299
8298
|
}
|
|
8300
8299
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8301
8300
|
if (shapeFlag & 256) {
|
|
8302
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8301
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8303
8302
|
else parentComponent.ctx.deactivate(vnode);
|
|
8304
8303
|
return;
|
|
8305
8304
|
}
|
|
@@ -8309,7 +8308,7 @@ var Vue = (function() {
|
|
|
8309
8308
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8310
8309
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8311
8310
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8312
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8311
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8313
8312
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8314
8313
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8315
8314
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -8326,7 +8325,7 @@ var Vue = (function() {
|
|
|
8326
8325
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8327
8326
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8328
8327
|
if (type === VaporSlot) {
|
|
8329
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8328
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8330
8329
|
return;
|
|
8331
8330
|
}
|
|
8332
8331
|
if (doRemove) remove(vnode);
|
|
@@ -9270,6 +9269,16 @@ var Vue = (function() {
|
|
|
9270
9269
|
simpleSetCurrentInstance(instance);
|
|
9271
9270
|
}
|
|
9272
9271
|
};
|
|
9272
|
+
/**
|
|
9273
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9274
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9275
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9276
|
+
* @internal
|
|
9277
|
+
*/
|
|
9278
|
+
const restoreCurrentInstance = (prev) => {
|
|
9279
|
+
setCurrentScope(prev[1]);
|
|
9280
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9281
|
+
};
|
|
9273
9282
|
const internalOptions = [
|
|
9274
9283
|
"ce",
|
|
9275
9284
|
"type",
|
|
@@ -9421,7 +9430,7 @@ var Vue = (function() {
|
|
|
9421
9430
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
9422
9431
|
const isAsyncSetup = isPromise(setupResult);
|
|
9423
9432
|
setActiveSub(prevSub);
|
|
9424
|
-
|
|
9433
|
+
restoreCurrentInstance(prev);
|
|
9425
9434
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9426
9435
|
if (isAsyncSetup) {
|
|
9427
9436
|
const unsetCurrentInstance = () => {
|
|
@@ -9494,7 +9503,7 @@ var Vue = (function() {
|
|
|
9494
9503
|
applyOptions(instance);
|
|
9495
9504
|
} finally {
|
|
9496
9505
|
setActiveSub(prevSub);
|
|
9497
|
-
|
|
9506
|
+
restoreCurrentInstance(prevInstance);
|
|
9498
9507
|
}
|
|
9499
9508
|
}
|
|
9500
9509
|
if (!Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template)
|
|
@@ -9804,7 +9813,7 @@ var Vue = (function() {
|
|
|
9804
9813
|
}
|
|
9805
9814
|
//#endregion
|
|
9806
9815
|
//#region packages/runtime-core/src/index.ts
|
|
9807
|
-
const version = "3.6.0-rc.
|
|
9816
|
+
const version = "3.6.0-rc.2";
|
|
9808
9817
|
const warn = warn$1;
|
|
9809
9818
|
/**
|
|
9810
9819
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -13715,7 +13724,7 @@ var Vue = (function() {
|
|
|
13715
13724
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13716
13725
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13717
13726
|
}
|
|
13718
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false,
|
|
13727
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13719
13728
|
const context = {
|
|
13720
13729
|
filename,
|
|
13721
13730
|
selfName: getSelfName(filename),
|
|
@@ -13737,7 +13746,6 @@ var Vue = (function() {
|
|
|
13737
13746
|
bindingMetadata,
|
|
13738
13747
|
inline,
|
|
13739
13748
|
isTS,
|
|
13740
|
-
eventDelegation,
|
|
13741
13749
|
onError,
|
|
13742
13750
|
onWarn,
|
|
13743
13751
|
compatConfig,
|
|
@@ -15659,6 +15667,14 @@ var Vue = (function() {
|
|
|
15659
15667
|
const eventOptionModifiers = [];
|
|
15660
15668
|
for (let i = 0; i < modifiers.length; i++) {
|
|
15661
15669
|
const modifier = modifiers[i].content;
|
|
15670
|
+
if (modifier === "delegate") {
|
|
15671
|
+
if (context) {
|
|
15672
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
15673
|
+
error.loc = modifiers[i].loc;
|
|
15674
|
+
context.onWarn(error);
|
|
15675
|
+
}
|
|
15676
|
+
continue;
|
|
15677
|
+
}
|
|
15662
15678
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
15663
15679
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
15664
15680
|
else {
|