@vue/runtime-core 3.2.23 → 3.2.27
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 +6469 -6435
- package/dist/runtime-core.cjs.prod.js +5305 -5274
- package/dist/runtime-core.d.ts +49 -28
- package/dist/runtime-core.esm-bundler.js +6598 -6564
- package/package.json +3 -3
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { camelize } from '@vue/shared';
|
|
2
2
|
import { capitalize } from '@vue/shared';
|
|
3
3
|
import { ComponentPropsOptions as ComponentPropsOptions_2 } from '@vue/runtime-core';
|
|
4
|
-
import { computed } from '@vue/reactivity';
|
|
4
|
+
import { computed as computed_2 } from '@vue/reactivity';
|
|
5
5
|
import { ComputedGetter } from '@vue/reactivity';
|
|
6
6
|
import { ComputedRef } from '@vue/reactivity';
|
|
7
|
+
import { ComputedSetter } from '@vue/reactivity';
|
|
7
8
|
import { customRef } from '@vue/reactivity';
|
|
9
|
+
import { CustomRefFactory } from '@vue/reactivity';
|
|
8
10
|
import { DebuggerEvent } from '@vue/reactivity';
|
|
11
|
+
import { DebuggerEventExtraInfo } from '@vue/reactivity';
|
|
9
12
|
import { DebuggerOptions } from '@vue/reactivity';
|
|
10
13
|
import { DeepReadonly } from '@vue/reactivity';
|
|
11
14
|
import { effect } from '@vue/reactivity';
|
|
15
|
+
import { EffectScheduler } from '@vue/reactivity';
|
|
12
16
|
import { EffectScope } from '@vue/reactivity';
|
|
13
17
|
import { effectScope } from '@vue/reactivity';
|
|
14
18
|
import { getCurrentScope } from '@vue/reactivity';
|
|
19
|
+
import { IfAny } from '@vue/shared';
|
|
15
20
|
import { isProxy } from '@vue/reactivity';
|
|
16
21
|
import { isReactive } from '@vue/reactivity';
|
|
17
22
|
import { isReadonly } from '@vue/reactivity';
|
|
18
23
|
import { isRef } from '@vue/reactivity';
|
|
24
|
+
import { LooseRequired } from '@vue/shared';
|
|
19
25
|
import { markRaw } from '@vue/reactivity';
|
|
20
26
|
import { normalizeClass } from '@vue/shared';
|
|
21
27
|
import { normalizeProps } from '@vue/shared';
|
|
@@ -25,6 +31,7 @@ import { proxyRefs } from '@vue/reactivity';
|
|
|
25
31
|
import { reactive } from '@vue/reactivity';
|
|
26
32
|
import { ReactiveEffect } from '@vue/reactivity';
|
|
27
33
|
import { ReactiveEffectOptions } from '@vue/reactivity';
|
|
34
|
+
import { ReactiveEffectRunner } from '@vue/reactivity';
|
|
28
35
|
import { ReactiveFlags } from '@vue/reactivity';
|
|
29
36
|
import { readonly } from '@vue/reactivity';
|
|
30
37
|
import { Ref } from '@vue/reactivity';
|
|
@@ -32,6 +39,7 @@ import { ref } from '@vue/reactivity';
|
|
|
32
39
|
import { ShallowReactive } from '@vue/reactivity';
|
|
33
40
|
import { shallowReactive } from '@vue/reactivity';
|
|
34
41
|
import { shallowReadonly } from '@vue/reactivity';
|
|
42
|
+
import { ShallowRef } from '@vue/reactivity';
|
|
35
43
|
import { shallowRef } from '@vue/reactivity';
|
|
36
44
|
import { ShallowUnwrapRef } from '@vue/reactivity';
|
|
37
45
|
import { ShapeFlags } from '@vue/shared';
|
|
@@ -47,6 +55,7 @@ import { toRefs } from '@vue/reactivity';
|
|
|
47
55
|
import { TrackOpTypes } from '@vue/reactivity';
|
|
48
56
|
import { TriggerOpTypes } from '@vue/reactivity';
|
|
49
57
|
import { triggerRef } from '@vue/reactivity';
|
|
58
|
+
import { UnionToIntersection } from '@vue/shared';
|
|
50
59
|
import { unref } from '@vue/reactivity';
|
|
51
60
|
import { UnwrapNestedRefs } from '@vue/reactivity';
|
|
52
61
|
import { UnwrapRef } from '@vue/reactivity';
|
|
@@ -95,7 +104,7 @@ export declare interface AppConfig {
|
|
|
95
104
|
errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;
|
|
96
105
|
warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;
|
|
97
106
|
/**
|
|
98
|
-
* Options to pass to
|
|
107
|
+
* Options to pass to `@vue/compiler-dom`.
|
|
99
108
|
* Only supported in runtime compiler build.
|
|
100
109
|
*/
|
|
101
110
|
compilerOptions: RuntimeCompilerOptions;
|
|
@@ -224,7 +233,7 @@ export declare type CompatVue = Pick<App, 'version' | 'component' | 'directive'>
|
|
|
224
233
|
directive(name: string, directive: Directive): CompatVue;
|
|
225
234
|
compile(template: string): RenderFunction;
|
|
226
235
|
/**
|
|
227
|
-
* @deprecated
|
|
236
|
+
* @deprecated Vue 3 no longer supports extending constructors.
|
|
228
237
|
*/
|
|
229
238
|
extend: (options?: ComponentOptions) => CompatVue;
|
|
230
239
|
/**
|
|
@@ -334,6 +343,10 @@ export declare interface ComponentInternalInstance {
|
|
|
334
343
|
* Root vnode of this component's own vdom tree
|
|
335
344
|
*/
|
|
336
345
|
subTree: VNode;
|
|
346
|
+
/**
|
|
347
|
+
* Render effect instance
|
|
348
|
+
*/
|
|
349
|
+
effect: ReactiveEffect;
|
|
337
350
|
/**
|
|
338
351
|
* Bound effect runner to be passed to schedulers
|
|
339
352
|
*/
|
|
@@ -489,12 +502,16 @@ declare type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[];
|
|
|
489
502
|
|
|
490
503
|
declare type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>;
|
|
491
504
|
|
|
492
|
-
export
|
|
505
|
+
export declare const computed: typeof computed_2;
|
|
506
|
+
|
|
507
|
+
export { ComputedGetter }
|
|
493
508
|
|
|
494
509
|
export declare type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
|
|
495
510
|
|
|
496
511
|
export { ComputedRef }
|
|
497
512
|
|
|
513
|
+
export { ComputedSetter }
|
|
514
|
+
|
|
498
515
|
/**
|
|
499
516
|
* Concrete component type matches its actual value: it's either an options
|
|
500
517
|
* object, or a function. Use this where the code expects to work with actual
|
|
@@ -594,10 +611,14 @@ declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DY
|
|
|
594
611
|
|
|
595
612
|
export { customRef }
|
|
596
613
|
|
|
614
|
+
export { CustomRefFactory }
|
|
615
|
+
|
|
597
616
|
declare type Data = Record<string, unknown>;
|
|
598
617
|
|
|
599
618
|
export { DebuggerEvent }
|
|
600
619
|
|
|
620
|
+
export { DebuggerEventExtraInfo }
|
|
621
|
+
|
|
601
622
|
declare type DebuggerHook = (e: DebuggerEvent) => void;
|
|
602
623
|
|
|
603
624
|
export { DebuggerOptions }
|
|
@@ -674,7 +695,7 @@ export declare function defineEmits<TypeEmit>(): TypeEmit;
|
|
|
674
695
|
* This is only usable inside `<script setup>`, is compiled away in the
|
|
675
696
|
* output and should **not** be actually called at runtime.
|
|
676
697
|
*/
|
|
677
|
-
export declare function defineExpose
|
|
698
|
+
export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;
|
|
678
699
|
|
|
679
700
|
/**
|
|
680
701
|
* Vue `<script setup>` compiler macro for declaring component props. The
|
|
@@ -745,7 +766,6 @@ export declare const enum DeprecationTypes {
|
|
|
745
766
|
OPTIONS_DESTROYED = "OPTIONS_DESTROYED",
|
|
746
767
|
WATCH_ARRAY = "WATCH_ARRAY",
|
|
747
768
|
PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS",
|
|
748
|
-
V_FOR_REF = "V_FOR_REF",
|
|
749
769
|
V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER",
|
|
750
770
|
CUSTOM_DIR = "CUSTOM_DIR",
|
|
751
771
|
ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE",
|
|
@@ -790,6 +810,8 @@ declare type DirectiveModifiers = Record<string, boolean>;
|
|
|
790
810
|
|
|
791
811
|
export { effect }
|
|
792
812
|
|
|
813
|
+
export { EffectScheduler }
|
|
814
|
+
|
|
793
815
|
export { EffectScope }
|
|
794
816
|
|
|
795
817
|
export { effectScope }
|
|
@@ -853,15 +875,10 @@ any, // Mixin
|
|
|
853
875
|
any, // Extends
|
|
854
876
|
any> ? unknown extends P ? {} : P : {};
|
|
855
877
|
|
|
856
|
-
export declare type ExtractPropTypes<O> =
|
|
857
|
-
[K in keyof O]
|
|
858
|
-
} & // This is needed to keep the relation between the option prop and the props, allowing to use ctrl+click to navigate to the prop options. see: #3656
|
|
859
|
-
{
|
|
860
|
-
[K in RequiredKeys<O>]: InferPropType<O[K]>;
|
|
878
|
+
export declare type ExtractPropTypes<O> = {
|
|
879
|
+
[K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>;
|
|
861
880
|
} & {
|
|
862
|
-
[K in OptionalKeys<O
|
|
863
|
-
} : {
|
|
864
|
-
[K in string]: any;
|
|
881
|
+
[K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>;
|
|
865
882
|
};
|
|
866
883
|
|
|
867
884
|
export declare const Fragment: {
|
|
@@ -877,6 +894,7 @@ export declare interface FunctionalComponent<P = {}, E extends EmitsOptions = {}
|
|
|
877
894
|
emits?: E | (keyof E)[];
|
|
878
895
|
inheritAttrs?: boolean;
|
|
879
896
|
displayName?: string;
|
|
897
|
+
compatConfig?: CompatConfig;
|
|
880
898
|
}
|
|
881
899
|
|
|
882
900
|
export declare type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
|
|
@@ -945,8 +963,6 @@ export declare interface HydrationRenderer extends Renderer<Element | ShadowRoot
|
|
|
945
963
|
hydrate: RootHydrateFunction;
|
|
946
964
|
}
|
|
947
965
|
|
|
948
|
-
declare type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
|
|
949
|
-
|
|
950
966
|
declare type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T : (props: P) => T;
|
|
951
967
|
|
|
952
968
|
declare type InferDefaults<T> = {
|
|
@@ -984,8 +1000,6 @@ declare type InternalSlots = {
|
|
|
984
1000
|
|
|
985
1001
|
declare type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType<{}, {}, {}, {}, {}> : UnionToIntersection<ExtractMixin<T>>;
|
|
986
1002
|
|
|
987
|
-
declare type InvalidateCbRegistrator = (cb: () => void) => void;
|
|
988
|
-
|
|
989
1003
|
declare function isCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, enableForBuiltIn?: boolean): boolean;
|
|
990
1004
|
|
|
991
1005
|
declare type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;
|
|
@@ -1123,17 +1137,13 @@ declare const enum LifecycleHooks {
|
|
|
1123
1137
|
SERVER_PREFETCH = "sp"
|
|
1124
1138
|
}
|
|
1125
1139
|
|
|
1126
|
-
declare type LooseRequired<T> = {
|
|
1127
|
-
[P in string & keyof T]: T[P];
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
1140
|
declare type MapSources<T, Immediate> = {
|
|
1131
1141
|
[K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : T[K] extends object ? Immediate extends true ? T[K] | undefined : T[K] : never;
|
|
1132
1142
|
};
|
|
1133
1143
|
|
|
1134
1144
|
export { markRaw }
|
|
1135
1145
|
|
|
1136
|
-
declare type MatchPattern = string | RegExp | string
|
|
1146
|
+
declare type MatchPattern = string | RegExp | (string | RegExp)[];
|
|
1137
1147
|
|
|
1138
1148
|
declare type MergedComponentOptions = ComponentOptions & MergedComponentOptionsOverride;
|
|
1139
1149
|
|
|
@@ -1243,6 +1253,8 @@ export declare const onBeforeUnmount: (hook: () => any, target?: ComponentIntern
|
|
|
1243
1253
|
|
|
1244
1254
|
export declare const onBeforeUpdate: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined;
|
|
1245
1255
|
|
|
1256
|
+
declare type OnCleanup = (cleanupFn: () => void) => void;
|
|
1257
|
+
|
|
1246
1258
|
export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void;
|
|
1247
1259
|
|
|
1248
1260
|
export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void;
|
|
@@ -1380,6 +1392,10 @@ export { ReactiveEffect }
|
|
|
1380
1392
|
|
|
1381
1393
|
export { ReactiveEffectOptions }
|
|
1382
1394
|
|
|
1395
|
+
export { ReactiveEffectRunner }
|
|
1396
|
+
|
|
1397
|
+
export { ReactiveFlags }
|
|
1398
|
+
|
|
1383
1399
|
export { readonly }
|
|
1384
1400
|
|
|
1385
1401
|
export { Ref }
|
|
@@ -1439,7 +1455,7 @@ export declare interface RendererOptions<HostNode = RendererNode, HostElement =
|
|
|
1439
1455
|
querySelector?(selector: string): HostElement | null;
|
|
1440
1456
|
setScopeId?(el: HostElement, id: string): void;
|
|
1441
1457
|
cloneNode?(node: HostNode): HostNode;
|
|
1442
|
-
insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, isSVG: boolean): [HostNode, HostNode];
|
|
1458
|
+
insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, isSVG: boolean, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode];
|
|
1443
1459
|
}
|
|
1444
1460
|
|
|
1445
1461
|
export declare type RenderFunction = () => VNodeChild;
|
|
@@ -1606,6 +1622,8 @@ export { shallowReactive }
|
|
|
1606
1622
|
|
|
1607
1623
|
export { shallowReadonly }
|
|
1608
1624
|
|
|
1625
|
+
export { ShallowRef }
|
|
1626
|
+
|
|
1609
1627
|
export { shallowRef }
|
|
1610
1628
|
|
|
1611
1629
|
export { ShallowUnwrapRef }
|
|
@@ -1762,8 +1780,6 @@ export { TriggerOpTypes }
|
|
|
1762
1780
|
|
|
1763
1781
|
export { triggerRef }
|
|
1764
1782
|
|
|
1765
|
-
declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
1766
|
-
|
|
1767
1783
|
declare type UnmountChildrenFn = (children: VNode[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean, start?: number) => void;
|
|
1768
1784
|
|
|
1769
1785
|
declare type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void;
|
|
@@ -1772,6 +1788,8 @@ export { unref }
|
|
|
1772
1788
|
|
|
1773
1789
|
declare type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never;
|
|
1774
1790
|
|
|
1791
|
+
export { UnwrapNestedRefs }
|
|
1792
|
+
|
|
1775
1793
|
export { UnwrapRef }
|
|
1776
1794
|
|
|
1777
1795
|
export declare function useAttrs(): SetupContext['attrs'];
|
|
@@ -1838,12 +1856,15 @@ declare type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAto
|
|
|
1838
1856
|
declare type VNodeNormalizedRefAtom = {
|
|
1839
1857
|
i: ComponentInternalInstance;
|
|
1840
1858
|
r: VNodeRef;
|
|
1859
|
+
k?: string;
|
|
1841
1860
|
f?: boolean;
|
|
1842
1861
|
};
|
|
1843
1862
|
|
|
1844
1863
|
export declare type VNodeProps = {
|
|
1845
1864
|
key?: string | number | symbol;
|
|
1846
1865
|
ref?: VNodeRef;
|
|
1866
|
+
ref_for?: boolean;
|
|
1867
|
+
ref_key?: string;
|
|
1847
1868
|
onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[];
|
|
1848
1869
|
onVnodeMounted?: VNodeMountHook | VNodeMountHook[];
|
|
1849
1870
|
onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[];
|
|
@@ -1870,9 +1891,9 @@ export declare function watch<T, Immediate extends Readonly<boolean> = false>(so
|
|
|
1870
1891
|
|
|
1871
1892
|
export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
1872
1893
|
|
|
1873
|
-
export declare type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV,
|
|
1894
|
+
export declare type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
|
|
1874
1895
|
|
|
1875
|
-
export declare type WatchEffect = (
|
|
1896
|
+
export declare type WatchEffect = (onCleanup: OnCleanup) => void;
|
|
1876
1897
|
|
|
1877
1898
|
export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle;
|
|
1878
1899
|
|