@vue/runtime-core 3.4.19 → 3.4.21
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.4.
|
|
2
|
+
* @vue/runtime-core v3.4.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -28,7 +28,10 @@ function warn$1(msg, ...args) {
|
|
|
28
28
|
instance,
|
|
29
29
|
11,
|
|
30
30
|
[
|
|
31
|
-
msg + args.
|
|
31
|
+
msg + args.map((a) => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
34
|
+
}).join(""),
|
|
32
35
|
instance && instance.proxy,
|
|
33
36
|
trace.map(
|
|
34
37
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -1195,8 +1198,10 @@ const SuspenseImpl = {
|
|
|
1195
1198
|
rendererInternals
|
|
1196
1199
|
);
|
|
1197
1200
|
} else {
|
|
1198
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
1201
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
1199
1202
|
n2.suspense = n1.suspense;
|
|
1203
|
+
n2.suspense.vnode = n2;
|
|
1204
|
+
n2.el = n1.el;
|
|
1200
1205
|
return;
|
|
1201
1206
|
}
|
|
1202
1207
|
patchSuspense(
|
|
@@ -2150,7 +2155,6 @@ const BaseTransitionImpl = {
|
|
|
2150
2155
|
setup(props, { slots }) {
|
|
2151
2156
|
const instance = getCurrentInstance();
|
|
2152
2157
|
const state = useTransitionState();
|
|
2153
|
-
let prevTransitionKey;
|
|
2154
2158
|
return () => {
|
|
2155
2159
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
2156
2160
|
if (!children || !children.length) {
|
|
@@ -2193,18 +2197,7 @@ const BaseTransitionImpl = {
|
|
|
2193
2197
|
setTransitionHooks(innerChild, enterHooks);
|
|
2194
2198
|
const oldChild = instance.subTree;
|
|
2195
2199
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
2196
|
-
|
|
2197
|
-
const { getTransitionKey } = innerChild.type;
|
|
2198
|
-
if (getTransitionKey) {
|
|
2199
|
-
const key = getTransitionKey();
|
|
2200
|
-
if (prevTransitionKey === void 0) {
|
|
2201
|
-
prevTransitionKey = key;
|
|
2202
|
-
} else if (key !== prevTransitionKey) {
|
|
2203
|
-
prevTransitionKey = key;
|
|
2204
|
-
transitionKeyChanged = true;
|
|
2205
|
-
}
|
|
2206
|
-
}
|
|
2207
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
2200
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
2208
2201
|
const leavingHooks = resolveTransitionHooks(
|
|
2209
2202
|
oldInnerChild,
|
|
2210
2203
|
rawProps,
|
|
@@ -7502,9 +7495,8 @@ const unsetCurrentInstance = () => {
|
|
|
7502
7495
|
internalSetCurrentInstance(null);
|
|
7503
7496
|
};
|
|
7504
7497
|
const isBuiltInTag = /* @__PURE__ */ shared.makeMap("slot,component");
|
|
7505
|
-
function validateComponentName(name,
|
|
7506
|
-
|
|
7507
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
7498
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
7499
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
7508
7500
|
warn$1(
|
|
7509
7501
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
7510
7502
|
);
|
|
@@ -7799,7 +7791,14 @@ function isClassComponent(value) {
|
|
|
7799
7791
|
}
|
|
7800
7792
|
|
|
7801
7793
|
const computed = (getterOrOptions, debugOptions) => {
|
|
7802
|
-
|
|
7794
|
+
const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
7795
|
+
{
|
|
7796
|
+
const i = getCurrentInstance();
|
|
7797
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
7798
|
+
c._warnRecursive = true;
|
|
7799
|
+
}
|
|
7800
|
+
}
|
|
7801
|
+
return c;
|
|
7803
7802
|
};
|
|
7804
7803
|
|
|
7805
7804
|
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
@@ -8077,7 +8076,7 @@ function isMemoSame(cached, memo) {
|
|
|
8077
8076
|
return true;
|
|
8078
8077
|
}
|
|
8079
8078
|
|
|
8080
|
-
const version = "3.4.
|
|
8079
|
+
const version = "3.4.21";
|
|
8081
8080
|
const warn = warn$1 ;
|
|
8082
8081
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8083
8082
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -689,8 +689,10 @@ const SuspenseImpl = {
|
|
|
689
689
|
rendererInternals
|
|
690
690
|
);
|
|
691
691
|
} else {
|
|
692
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
692
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
693
693
|
n2.suspense = n1.suspense;
|
|
694
|
+
n2.suspense.vnode = n2;
|
|
695
|
+
n2.el = n1.el;
|
|
694
696
|
return;
|
|
695
697
|
}
|
|
696
698
|
patchSuspense(
|
|
@@ -1561,7 +1563,6 @@ const BaseTransitionImpl = {
|
|
|
1561
1563
|
setup(props, { slots }) {
|
|
1562
1564
|
const instance = getCurrentInstance();
|
|
1563
1565
|
const state = useTransitionState();
|
|
1564
|
-
let prevTransitionKey;
|
|
1565
1566
|
return () => {
|
|
1566
1567
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
1567
1568
|
if (!children || !children.length) {
|
|
@@ -1594,18 +1595,7 @@ const BaseTransitionImpl = {
|
|
|
1594
1595
|
setTransitionHooks(innerChild, enterHooks);
|
|
1595
1596
|
const oldChild = instance.subTree;
|
|
1596
1597
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
1597
|
-
|
|
1598
|
-
const { getTransitionKey } = innerChild.type;
|
|
1599
|
-
if (getTransitionKey) {
|
|
1600
|
-
const key = getTransitionKey();
|
|
1601
|
-
if (prevTransitionKey === void 0) {
|
|
1602
|
-
prevTransitionKey = key;
|
|
1603
|
-
} else if (key !== prevTransitionKey) {
|
|
1604
|
-
prevTransitionKey = key;
|
|
1605
|
-
transitionKeyChanged = true;
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
1598
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
1609
1599
|
const leavingHooks = resolveTransitionHooks(
|
|
1610
1600
|
oldInnerChild,
|
|
1611
1601
|
rawProps,
|
|
@@ -6185,7 +6175,8 @@ function isClassComponent(value) {
|
|
|
6185
6175
|
}
|
|
6186
6176
|
|
|
6187
6177
|
const computed = (getterOrOptions, debugOptions) => {
|
|
6188
|
-
|
|
6178
|
+
const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
6179
|
+
return c;
|
|
6189
6180
|
};
|
|
6190
6181
|
|
|
6191
6182
|
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
@@ -6285,7 +6276,7 @@ function isMemoSame(cached, memo) {
|
|
|
6285
6276
|
return true;
|
|
6286
6277
|
}
|
|
6287
6278
|
|
|
6288
|
-
const version = "3.4.
|
|
6279
|
+
const version = "3.4.21";
|
|
6289
6280
|
const warn$1 = shared.NOOP;
|
|
6290
6281
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6291
6282
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -743,16 +743,17 @@ export declare function hasInjectionContext(): boolean;
|
|
|
743
743
|
export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
744
744
|
type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>);
|
|
745
745
|
export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}> = ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, true, {}, S>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S> & PP;
|
|
746
|
+
export type DefineSetupFnComponent<P extends Record<string, any>, E extends EmitsOptions = {}, S extends SlotsType = SlotsType, Props = P & EmitsToProps<E>, PP = PublicProps> = new (props: Props & PP) => CreateComponentPublicInstance<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, E, PP, {}, false, {}, S>;
|
|
746
747
|
export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & {
|
|
747
748
|
props?: (keyof Props)[];
|
|
748
749
|
emits?: E | EE[];
|
|
749
750
|
slots?: S;
|
|
750
|
-
}):
|
|
751
|
+
}): DefineSetupFnComponent<Props, E, S>;
|
|
751
752
|
export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & {
|
|
752
753
|
props?: ComponentObjectPropsOptions<Props>;
|
|
753
754
|
emits?: E | EE[];
|
|
754
755
|
slots?: S;
|
|
755
|
-
}):
|
|
756
|
+
}): DefineSetupFnComponent<Props, E, S>;
|
|
756
757
|
export declare function defineComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}, I extends ComponentInjectOptions = {}, II extends string = string>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, PublicProps, ResolveProps<Props, E>, ExtractDefaultPropTypes<Props>, S>;
|
|
757
758
|
export declare function defineComponent<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}, I extends ComponentInjectOptions = {}, II extends string = string, Props = Readonly<{
|
|
758
759
|
[key in PropNames]?: any;
|
|
@@ -793,7 +794,7 @@ export interface App<HostElement = any> {
|
|
|
793
794
|
}
|
|
794
795
|
export type OptionMergeFunction = (to: unknown, from: unknown) => any;
|
|
795
796
|
export interface AppConfig {
|
|
796
|
-
readonly isNativeTag
|
|
797
|
+
readonly isNativeTag: (tag: string) => boolean;
|
|
797
798
|
performance: boolean;
|
|
798
799
|
optionMergeStrategies: Record<string, OptionMergeFunction>;
|
|
799
800
|
globalProperties: ComponentCustomProperties & Record<string, any>;
|
|
@@ -808,6 +809,11 @@ export interface AppConfig {
|
|
|
808
809
|
* @deprecated use config.compilerOptions.isCustomElement
|
|
809
810
|
*/
|
|
810
811
|
isCustomElement?: (tag: string) => boolean;
|
|
812
|
+
/**
|
|
813
|
+
* TODO document for 3.5
|
|
814
|
+
* Enable warnings for computed getters that recursively trigger itself.
|
|
815
|
+
*/
|
|
816
|
+
warnRecursiveComputed?: boolean;
|
|
811
817
|
}
|
|
812
818
|
export interface AppContext {
|
|
813
819
|
app: App;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -26,7 +26,10 @@ function warn$1(msg, ...args) {
|
|
|
26
26
|
instance,
|
|
27
27
|
11,
|
|
28
28
|
[
|
|
29
|
-
msg + args.
|
|
29
|
+
msg + args.map((a) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
32
|
+
}).join(""),
|
|
30
33
|
instance && instance.proxy,
|
|
31
34
|
trace.map(
|
|
32
35
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -1197,8 +1200,10 @@ const SuspenseImpl = {
|
|
|
1197
1200
|
rendererInternals
|
|
1198
1201
|
);
|
|
1199
1202
|
} else {
|
|
1200
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
1203
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
1201
1204
|
n2.suspense = n1.suspense;
|
|
1205
|
+
n2.suspense.vnode = n2;
|
|
1206
|
+
n2.el = n1.el;
|
|
1202
1207
|
return;
|
|
1203
1208
|
}
|
|
1204
1209
|
patchSuspense(
|
|
@@ -2152,7 +2157,6 @@ const BaseTransitionImpl = {
|
|
|
2152
2157
|
setup(props, { slots }) {
|
|
2153
2158
|
const instance = getCurrentInstance();
|
|
2154
2159
|
const state = useTransitionState();
|
|
2155
|
-
let prevTransitionKey;
|
|
2156
2160
|
return () => {
|
|
2157
2161
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
2158
2162
|
if (!children || !children.length) {
|
|
@@ -2197,18 +2201,7 @@ const BaseTransitionImpl = {
|
|
|
2197
2201
|
setTransitionHooks(innerChild, enterHooks);
|
|
2198
2202
|
const oldChild = instance.subTree;
|
|
2199
2203
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
2200
|
-
|
|
2201
|
-
const { getTransitionKey } = innerChild.type;
|
|
2202
|
-
if (getTransitionKey) {
|
|
2203
|
-
const key = getTransitionKey();
|
|
2204
|
-
if (prevTransitionKey === void 0) {
|
|
2205
|
-
prevTransitionKey = key;
|
|
2206
|
-
} else if (key !== prevTransitionKey) {
|
|
2207
|
-
prevTransitionKey = key;
|
|
2208
|
-
transitionKeyChanged = true;
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
2204
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
2212
2205
|
const leavingHooks = resolveTransitionHooks(
|
|
2213
2206
|
oldInnerChild,
|
|
2214
2207
|
rawProps,
|
|
@@ -7560,9 +7553,8 @@ const unsetCurrentInstance = () => {
|
|
|
7560
7553
|
internalSetCurrentInstance(null);
|
|
7561
7554
|
};
|
|
7562
7555
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
7563
|
-
function validateComponentName(name,
|
|
7564
|
-
|
|
7565
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
7556
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
7557
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
7566
7558
|
warn$1(
|
|
7567
7559
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
7568
7560
|
);
|
|
@@ -7871,7 +7863,14 @@ function isClassComponent(value) {
|
|
|
7871
7863
|
}
|
|
7872
7864
|
|
|
7873
7865
|
const computed = (getterOrOptions, debugOptions) => {
|
|
7874
|
-
|
|
7866
|
+
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
7867
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7868
|
+
const i = getCurrentInstance();
|
|
7869
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
7870
|
+
c._warnRecursive = true;
|
|
7871
|
+
}
|
|
7872
|
+
}
|
|
7873
|
+
return c;
|
|
7875
7874
|
};
|
|
7876
7875
|
|
|
7877
7876
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -8149,7 +8148,7 @@ function isMemoSame(cached, memo) {
|
|
|
8149
8148
|
return true;
|
|
8150
8149
|
}
|
|
8151
8150
|
|
|
8152
|
-
const version = "3.4.
|
|
8151
|
+
const version = "3.4.21";
|
|
8153
8152
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8154
8153
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8155
8154
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.21",
|
|
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.4.
|
|
50
|
-
"@vue/reactivity": "3.4.
|
|
49
|
+
"@vue/shared": "3.4.21",
|
|
50
|
+
"@vue/reactivity": "3.4.21"
|
|
51
51
|
}
|
|
52
52
|
}
|