@vue/runtime-core 3.6.0-alpha.3 → 3.6.0-alpha.4
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-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-alpha.
|
|
2
|
+
* @vue/runtime-core v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -547,7 +547,12 @@ function reload(id, newComp) {
|
|
|
547
547
|
newComp = normalizeClassComponent(newComp);
|
|
548
548
|
updateComponentDef(record.initialDef, newComp);
|
|
549
549
|
const instances = [...record.instances];
|
|
550
|
-
if (newComp.__vapor) {
|
|
550
|
+
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
551
|
+
for (const instance of instances) {
|
|
552
|
+
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
553
|
+
instance.root.ce._removeChildStyle(instance.type);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
551
556
|
for (const instance of instances) {
|
|
552
557
|
instance.hmrReload(newComp);
|
|
553
558
|
}
|
|
@@ -6809,7 +6814,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
6809
6814
|
return res;
|
|
6810
6815
|
}
|
|
6811
6816
|
const getModelModifiers = (props, modelName, getter) => {
|
|
6812
|
-
return
|
|
6817
|
+
return getter(props, shared.getModifierPropName(modelName)) || getter(props, `${shared.camelize(modelName)}Modifiers`) || getter(props, `${shared.hyphenate(modelName)}Modifiers`);
|
|
6813
6818
|
};
|
|
6814
6819
|
|
|
6815
6820
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -8263,6 +8268,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
8263
8268
|
simpleSetCurrentInstance(instance);
|
|
8264
8269
|
}
|
|
8265
8270
|
};
|
|
8271
|
+
const internalOptions = ["ce", "type"];
|
|
8272
|
+
const useInstanceOption = (key, silent = false) => {
|
|
8273
|
+
const instance = getCurrentGenericInstance();
|
|
8274
|
+
if (!instance) {
|
|
8275
|
+
if (!silent) {
|
|
8276
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
8277
|
+
}
|
|
8278
|
+
return { hasInstance: false, value: void 0 };
|
|
8279
|
+
}
|
|
8280
|
+
if (!internalOptions.includes(key)) {
|
|
8281
|
+
{
|
|
8282
|
+
warn$1(
|
|
8283
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
8284
|
+
);
|
|
8285
|
+
}
|
|
8286
|
+
return { hasInstance: true, value: void 0 };
|
|
8287
|
+
}
|
|
8288
|
+
return { hasInstance: true, value: instance[key] };
|
|
8289
|
+
};
|
|
8266
8290
|
|
|
8267
8291
|
const emptyAppContext = createAppContext();
|
|
8268
8292
|
let uid = 0;
|
|
@@ -8897,7 +8921,7 @@ function isMemoSame(cached, memo) {
|
|
|
8897
8921
|
return true;
|
|
8898
8922
|
}
|
|
8899
8923
|
|
|
8900
|
-
const version = "3.6.0-alpha.
|
|
8924
|
+
const version = "3.6.0-alpha.4";
|
|
8901
8925
|
const warn = warn$1 ;
|
|
8902
8926
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8903
8927
|
const devtools = devtools$1 ;
|
|
@@ -9048,6 +9072,7 @@ exports.toHandlers = toHandlers;
|
|
|
9048
9072
|
exports.transformVNodeArgs = transformVNodeArgs;
|
|
9049
9073
|
exports.useAttrs = useAttrs;
|
|
9050
9074
|
exports.useId = useId;
|
|
9075
|
+
exports.useInstanceOption = useInstanceOption;
|
|
9051
9076
|
exports.useModel = useModel;
|
|
9052
9077
|
exports.useSSRContext = useSSRContext;
|
|
9053
9078
|
exports.useSlots = useSlots;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-alpha.
|
|
2
|
+
* @vue/runtime-core v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -5409,7 +5409,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
5409
5409
|
return res;
|
|
5410
5410
|
}
|
|
5411
5411
|
const getModelModifiers = (props, modelName, getter) => {
|
|
5412
|
-
return
|
|
5412
|
+
return getter(props, shared.getModifierPropName(modelName)) || getter(props, `${shared.camelize(modelName)}Modifiers`) || getter(props, `${shared.hyphenate(modelName)}Modifiers`);
|
|
5413
5413
|
};
|
|
5414
5414
|
|
|
5415
5415
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -6678,6 +6678,17 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
6678
6678
|
simpleSetCurrentInstance(instance);
|
|
6679
6679
|
}
|
|
6680
6680
|
};
|
|
6681
|
+
const internalOptions = ["ce", "type"];
|
|
6682
|
+
const useInstanceOption = (key, silent = false) => {
|
|
6683
|
+
const instance = getCurrentGenericInstance();
|
|
6684
|
+
if (!instance) {
|
|
6685
|
+
return { hasInstance: false, value: void 0 };
|
|
6686
|
+
}
|
|
6687
|
+
if (!internalOptions.includes(key)) {
|
|
6688
|
+
return { hasInstance: true, value: void 0 };
|
|
6689
|
+
}
|
|
6690
|
+
return { hasInstance: true, value: instance[key] };
|
|
6691
|
+
};
|
|
6681
6692
|
|
|
6682
6693
|
const emptyAppContext = createAppContext();
|
|
6683
6694
|
let uid = 0;
|
|
@@ -7000,7 +7011,7 @@ function isMemoSame(cached, memo) {
|
|
|
7000
7011
|
return true;
|
|
7001
7012
|
}
|
|
7002
7013
|
|
|
7003
|
-
const version = "3.6.0-alpha.
|
|
7014
|
+
const version = "3.6.0-alpha.4";
|
|
7004
7015
|
const warn$1 = shared.NOOP;
|
|
7005
7016
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
7006
7017
|
const devtools = void 0;
|
|
@@ -7151,6 +7162,7 @@ exports.toHandlers = toHandlers;
|
|
|
7151
7162
|
exports.transformVNodeArgs = transformVNodeArgs;
|
|
7152
7163
|
exports.useAttrs = useAttrs;
|
|
7153
7164
|
exports.useId = useId;
|
|
7165
|
+
exports.useInstanceOption = useInstanceOption;
|
|
7154
7166
|
exports.useModel = useModel;
|
|
7155
7167
|
exports.useSSRContext = useSSRContext;
|
|
7156
7168
|
exports.useSlots = useSlots;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-alpha.
|
|
2
|
+
* @vue/runtime-core v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
import { setActiveSub, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, setCurrentScope, WatcherEffect, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';
|
|
7
7
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
8
|
-
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, getGlobalThis, extend, isBuiltInDirective, NO, hasOwn, remove, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, normalizeCssVarValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, NOOP, isGloballyAllowed, hyphenate, EMPTY_ARR, makeMap, toRawType, getSequence, hasChanged, looseToNumber, isModelListener, toNumber, isBuiltInTag } from '@vue/shared';
|
|
8
|
+
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, getGlobalThis, extend, isBuiltInDirective, NO, hasOwn, remove, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, normalizeCssVarValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, NOOP, isGloballyAllowed, hyphenate, EMPTY_ARR, makeMap, toRawType, getSequence, hasChanged, getModifierPropName, looseToNumber, isModelListener, toNumber, isBuiltInTag } from '@vue/shared';
|
|
9
9
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
10
10
|
|
|
11
11
|
const stack = [];
|
|
@@ -550,7 +550,12 @@ function reload(id, newComp) {
|
|
|
550
550
|
newComp = normalizeClassComponent(newComp);
|
|
551
551
|
updateComponentDef(record.initialDef, newComp);
|
|
552
552
|
const instances = [...record.instances];
|
|
553
|
-
if (newComp.__vapor) {
|
|
553
|
+
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
554
|
+
for (const instance of instances) {
|
|
555
|
+
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
556
|
+
instance.root.ce._removeChildStyle(instance.type);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
554
559
|
for (const instance of instances) {
|
|
555
560
|
instance.hmrReload(newComp);
|
|
556
561
|
}
|
|
@@ -6892,7 +6897,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6892
6897
|
return res;
|
|
6893
6898
|
}
|
|
6894
6899
|
const getModelModifiers = (props, modelName, getter) => {
|
|
6895
|
-
return
|
|
6900
|
+
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
6896
6901
|
};
|
|
6897
6902
|
|
|
6898
6903
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -8346,6 +8351,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
8346
8351
|
simpleSetCurrentInstance(instance);
|
|
8347
8352
|
}
|
|
8348
8353
|
};
|
|
8354
|
+
const internalOptions = ["ce", "type"];
|
|
8355
|
+
const useInstanceOption = (key, silent = false) => {
|
|
8356
|
+
const instance = getCurrentGenericInstance();
|
|
8357
|
+
if (!instance) {
|
|
8358
|
+
if (!!(process.env.NODE_ENV !== "production") && !silent) {
|
|
8359
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
8360
|
+
}
|
|
8361
|
+
return { hasInstance: false, value: void 0 };
|
|
8362
|
+
}
|
|
8363
|
+
if (!internalOptions.includes(key)) {
|
|
8364
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
8365
|
+
warn$1(
|
|
8366
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
8367
|
+
);
|
|
8368
|
+
}
|
|
8369
|
+
return { hasInstance: true, value: void 0 };
|
|
8370
|
+
}
|
|
8371
|
+
return { hasInstance: true, value: instance[key] };
|
|
8372
|
+
};
|
|
8349
8373
|
|
|
8350
8374
|
const emptyAppContext = createAppContext();
|
|
8351
8375
|
let uid = 0;
|
|
@@ -8997,7 +9021,7 @@ function isMemoSame(cached, memo) {
|
|
|
8997
9021
|
return true;
|
|
8998
9022
|
}
|
|
8999
9023
|
|
|
9000
|
-
const version = "3.6.0-alpha.
|
|
9024
|
+
const version = "3.6.0-alpha.4";
|
|
9001
9025
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
9002
9026
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9003
9027
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -9019,4 +9043,4 @@ const resolveFilter = null;
|
|
|
9019
9043
|
const compatUtils = null;
|
|
9020
9044
|
const DeprecationTypes = null;
|
|
9021
9045
|
|
|
9022
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, Static, Suspense, Teleport, Text, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, endMeasure, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isRuntimeOnly, isSetEqual, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, leaveCbKey, markAsyncBoundary, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeRef, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, setBlockTracking, setCurrentInstance, setDevtoolsHook, setRef, setTransitionHooks, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, toClassSet, toHandlers, toStyleMap, transformVNodeArgs, unregisterHMR, useAsyncComponentState, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|
|
9046
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, Static, Suspense, Teleport, Text, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, endMeasure, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isRuntimeOnly, isSetEqual, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, leaveCbKey, markAsyncBoundary, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeRef, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, setBlockTracking, setCurrentInstance, setDevtoolsHook, setRef, setTransitionHooks, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, toClassSet, toHandlers, toStyleMap, transformVNodeArgs, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.6.0-alpha.
|
|
3
|
+
"version": "3.6.0-alpha.4",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.6.0-alpha.
|
|
50
|
-
"@vue/reactivity": "3.6.0-alpha.
|
|
49
|
+
"@vue/shared": "3.6.0-alpha.4",
|
|
50
|
+
"@vue/reactivity": "3.6.0-alpha.4"
|
|
51
51
|
}
|
|
52
52
|
}
|