@vue/runtime-core 3.2.24 → 3.2.28

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.
@@ -1,21 +1,28 @@
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 { isShallow } from '@vue/reactivity';
25
+ import { LooseRequired } from '@vue/shared';
19
26
  import { markRaw } from '@vue/reactivity';
20
27
  import { normalizeClass } from '@vue/shared';
21
28
  import { normalizeProps } from '@vue/shared';
@@ -25,6 +32,7 @@ import { proxyRefs } from '@vue/reactivity';
25
32
  import { reactive } from '@vue/reactivity';
26
33
  import { ReactiveEffect } from '@vue/reactivity';
27
34
  import { ReactiveEffectOptions } from '@vue/reactivity';
35
+ import { ReactiveEffectRunner } from '@vue/reactivity';
28
36
  import { ReactiveFlags } from '@vue/reactivity';
29
37
  import { readonly } from '@vue/reactivity';
30
38
  import { Ref } from '@vue/reactivity';
@@ -32,6 +40,7 @@ import { ref } from '@vue/reactivity';
32
40
  import { ShallowReactive } from '@vue/reactivity';
33
41
  import { shallowReactive } from '@vue/reactivity';
34
42
  import { shallowReadonly } from '@vue/reactivity';
43
+ import { ShallowRef } from '@vue/reactivity';
35
44
  import { shallowRef } from '@vue/reactivity';
36
45
  import { ShallowUnwrapRef } from '@vue/reactivity';
37
46
  import { ShapeFlags } from '@vue/shared';
@@ -47,6 +56,7 @@ import { toRefs } from '@vue/reactivity';
47
56
  import { TrackOpTypes } from '@vue/reactivity';
48
57
  import { TriggerOpTypes } from '@vue/reactivity';
49
58
  import { triggerRef } from '@vue/reactivity';
59
+ import { UnionToIntersection } from '@vue/shared';
50
60
  import { unref } from '@vue/reactivity';
51
61
  import { UnwrapNestedRefs } from '@vue/reactivity';
52
62
  import { UnwrapRef } from '@vue/reactivity';
@@ -95,7 +105,7 @@ export declare interface AppConfig {
95
105
  errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;
96
106
  warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;
97
107
  /**
98
- * Options to pass to @vue/compiler-dom.
108
+ * Options to pass to `@vue/compiler-dom`.
99
109
  * Only supported in runtime compiler build.
100
110
  */
101
111
  compilerOptions: RuntimeCompilerOptions;
@@ -224,7 +234,7 @@ export declare type CompatVue = Pick<App, 'version' | 'component' | 'directive'>
224
234
  directive(name: string, directive: Directive): CompatVue;
225
235
  compile(template: string): RenderFunction;
226
236
  /**
227
- * @deprecated
237
+ * @deprecated Vue 3 no longer supports extending constructors.
228
238
  */
229
239
  extend: (options?: ComponentOptions) => CompatVue;
230
240
  /**
@@ -334,6 +344,10 @@ export declare interface ComponentInternalInstance {
334
344
  * Root vnode of this component's own vdom tree
335
345
  */
336
346
  subTree: VNode;
347
+ /**
348
+ * Render effect instance
349
+ */
350
+ effect: ReactiveEffect;
337
351
  /**
338
352
  * Bound effect runner to be passed to schedulers
339
353
  */
@@ -489,12 +503,16 @@ declare type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[];
489
503
 
490
504
  declare type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>;
491
505
 
492
- export { computed }
506
+ export declare const computed: typeof computed_2;
507
+
508
+ export { ComputedGetter }
493
509
 
494
510
  export declare type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
495
511
 
496
512
  export { ComputedRef }
497
513
 
514
+ export { ComputedSetter }
515
+
498
516
  /**
499
517
  * Concrete component type matches its actual value: it's either an options
500
518
  * object, or a function. Use this where the code expects to work with actual
@@ -594,10 +612,14 @@ declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DY
594
612
 
595
613
  export { customRef }
596
614
 
615
+ export { CustomRefFactory }
616
+
597
617
  declare type Data = Record<string, unknown>;
598
618
 
599
619
  export { DebuggerEvent }
600
620
 
621
+ export { DebuggerEventExtraInfo }
622
+
601
623
  declare type DebuggerHook = (e: DebuggerEvent) => void;
602
624
 
603
625
  export { DebuggerOptions }
@@ -667,7 +689,7 @@ export declare function defineEmits<TypeEmit>(): TypeEmit;
667
689
  * instance properties when it is accessed by a parent component via template
668
690
  * refs.
669
691
  *
670
- * `<script setup>` components are closed by default - i.e. varaibles inside
692
+ * `<script setup>` components are closed by default - i.e. variables inside
671
693
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
672
694
  * via `defineExpose`.
673
695
  *
@@ -745,7 +767,6 @@ export declare const enum DeprecationTypes {
745
767
  OPTIONS_DESTROYED = "OPTIONS_DESTROYED",
746
768
  WATCH_ARRAY = "WATCH_ARRAY",
747
769
  PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS",
748
- V_FOR_REF = "V_FOR_REF",
749
770
  V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER",
750
771
  CUSTOM_DIR = "CUSTOM_DIR",
751
772
  ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE",
@@ -790,6 +811,8 @@ declare type DirectiveModifiers = Record<string, boolean>;
790
811
 
791
812
  export { effect }
792
813
 
814
+ export { EffectScheduler }
815
+
793
816
  export { EffectScope }
794
817
 
795
818
  export { effectScope }
@@ -853,15 +876,10 @@ any, // Mixin
853
876
  any, // Extends
854
877
  any> ? unknown extends P ? {} : P : {};
855
878
 
856
- export declare type ExtractPropTypes<O> = O extends object ? {
857
- [K in keyof O]?: unknown;
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]>;
879
+ export declare type ExtractPropTypes<O> = {
880
+ [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>;
861
881
  } & {
862
- [K in OptionalKeys<O>]?: InferPropType<O[K]>;
863
- } : {
864
- [K in string]: any;
882
+ [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>;
865
883
  };
866
884
 
867
885
  export declare const Fragment: {
@@ -946,8 +964,6 @@ export declare interface HydrationRenderer extends Renderer<Element | ShadowRoot
946
964
  hydrate: RootHydrateFunction;
947
965
  }
948
966
 
949
- declare type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
950
-
951
967
  declare type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T : (props: P) => T;
952
968
 
953
969
  declare type InferDefaults<T> = {
@@ -985,8 +1001,6 @@ declare type InternalSlots = {
985
1001
 
986
1002
  declare type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType<{}, {}, {}, {}, {}> : UnionToIntersection<ExtractMixin<T>>;
987
1003
 
988
- declare type InvalidateCbRegistrator = (cb: () => void) => void;
989
-
990
1004
  declare function isCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, enableForBuiltIn?: boolean): boolean;
991
1005
 
992
1006
  declare type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;
@@ -1003,6 +1017,8 @@ export { isRef }
1003
1017
 
1004
1018
  export declare const isRuntimeOnly: () => boolean;
1005
1019
 
1020
+ export { isShallow }
1021
+
1006
1022
  export declare function isVNode(value: any): value is VNode;
1007
1023
 
1008
1024
  export declare const KeepAlive: {
@@ -1025,7 +1041,7 @@ export declare type LegacyConfig = {
1025
1041
  silent?: boolean;
1026
1042
  /**
1027
1043
  * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
1028
- * https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags
1044
+ * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
1029
1045
  */
1030
1046
  devtools?: boolean;
1031
1047
  /**
@@ -1124,17 +1140,13 @@ declare const enum LifecycleHooks {
1124
1140
  SERVER_PREFETCH = "sp"
1125
1141
  }
1126
1142
 
1127
- declare type LooseRequired<T> = {
1128
- [P in string & keyof T]: T[P];
1129
- };
1130
-
1131
1143
  declare type MapSources<T, Immediate> = {
1132
1144
  [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;
1133
1145
  };
1134
1146
 
1135
1147
  export { markRaw }
1136
1148
 
1137
- declare type MatchPattern = string | RegExp | string[] | RegExp[];
1149
+ declare type MatchPattern = string | RegExp | (string | RegExp)[];
1138
1150
 
1139
1151
  declare type MergedComponentOptions = ComponentOptions & MergedComponentOptionsOverride;
1140
1152
 
@@ -1244,6 +1256,8 @@ export declare const onBeforeUnmount: (hook: () => any, target?: ComponentIntern
1244
1256
 
1245
1257
  export declare const onBeforeUpdate: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined;
1246
1258
 
1259
+ declare type OnCleanup = (cleanupFn: () => void) => void;
1260
+
1247
1261
  export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void;
1248
1262
 
1249
1263
  export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void;
@@ -1381,6 +1395,10 @@ export { ReactiveEffect }
1381
1395
 
1382
1396
  export { ReactiveEffectOptions }
1383
1397
 
1398
+ export { ReactiveEffectRunner }
1399
+
1400
+ export { ReactiveFlags }
1401
+
1384
1402
  export { readonly }
1385
1403
 
1386
1404
  export { Ref }
@@ -1440,7 +1458,7 @@ export declare interface RendererOptions<HostNode = RendererNode, HostElement =
1440
1458
  querySelector?(selector: string): HostElement | null;
1441
1459
  setScopeId?(el: HostElement, id: string): void;
1442
1460
  cloneNode?(node: HostNode): HostNode;
1443
- insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, isSVG: boolean): [HostNode, HostNode];
1461
+ insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, isSVG: boolean, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode];
1444
1462
  }
1445
1463
 
1446
1464
  export declare type RenderFunction = () => VNodeChild;
@@ -1607,6 +1625,8 @@ export { shallowReactive }
1607
1625
 
1608
1626
  export { shallowReadonly }
1609
1627
 
1628
+ export { ShallowRef }
1629
+
1610
1630
  export { shallowRef }
1611
1631
 
1612
1632
  export { ShallowUnwrapRef }
@@ -1763,8 +1783,6 @@ export { TriggerOpTypes }
1763
1783
 
1764
1784
  export { triggerRef }
1765
1785
 
1766
- declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
1767
-
1768
1786
  declare type UnmountChildrenFn = (children: VNode[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean, start?: number) => void;
1769
1787
 
1770
1788
  declare type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void;
@@ -1773,6 +1791,8 @@ export { unref }
1773
1791
 
1774
1792
  declare type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never;
1775
1793
 
1794
+ export { UnwrapNestedRefs }
1795
+
1776
1796
  export { UnwrapRef }
1777
1797
 
1778
1798
  export declare function useAttrs(): SetupContext['attrs'];
@@ -1839,12 +1859,15 @@ declare type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAto
1839
1859
  declare type VNodeNormalizedRefAtom = {
1840
1860
  i: ComponentInternalInstance;
1841
1861
  r: VNodeRef;
1862
+ k?: string;
1842
1863
  f?: boolean;
1843
1864
  };
1844
1865
 
1845
1866
  export declare type VNodeProps = {
1846
1867
  key?: string | number | symbol;
1847
1868
  ref?: VNodeRef;
1869
+ ref_for?: boolean;
1870
+ ref_key?: string;
1848
1871
  onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[];
1849
1872
  onVnodeMounted?: VNodeMountHook | VNodeMountHook[];
1850
1873
  onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[];
@@ -1871,9 +1894,9 @@ export declare function watch<T, Immediate extends Readonly<boolean> = false>(so
1871
1894
 
1872
1895
  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;
1873
1896
 
1874
- export declare type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onInvalidate: InvalidateCbRegistrator) => any;
1897
+ export declare type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
1875
1898
 
1876
- export declare type WatchEffect = (onInvalidate: InvalidateCbRegistrator) => void;
1899
+ export declare type WatchEffect = (onCleanup: OnCleanup) => void;
1877
1900
 
1878
1901
  export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle;
1879
1902