@vue/runtime-vapor 3.6.0-beta.4 → 3.6.0-beta.6
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-vapor.d.ts +394 -378
- package/dist/runtime-vapor.esm-bundler.js +3644 -4723
- package/package.json +4 -4
package/dist/runtime-vapor.d.ts
CHANGED
|
@@ -1,428 +1,437 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AllowedComponentProps, AsyncComponentInternalOptions, AsyncComponentLoader, AsyncComponentOptions, ComponentCustomProps, ComponentInternalOptions, ComponentObjectPropsOptions, ComponentPropsOptions, ComponentTypeEmits, CreateAppFunction, CustomElementOptions, DirectiveModifiers, EffectScope, EmitFn, EmitsOptions, EmitsToProps, ExtractDefaultPropTypes, ExtractPropTypes, GenericAppContext, GenericComponentInstance, KeepAliveProps, LifecycleHook, NULL_DYNAMIC_COMPONENT, NormalizedPropsOptions, ObjectEmitsOptions, Plugin, ReservedProps, SchedulerJob, ShallowUnwrapRef, SuspenseBoundary, TeleportProps, TransitionGroupProps, TransitionHooks, TransitionProps, TransitionState, TypeEmitsToOptions, VNode, VueElementBase } from "@vue/runtime-dom";
|
|
2
|
+
import { EffectScope as EffectScope$1, ReactiveEffect, Ref, ShallowRef } from "@vue/reactivity";
|
|
3
|
+
import { IsKeyValues, Namespace, NormalizedStyle, Prettify } from "@vue/shared";
|
|
4
4
|
|
|
5
|
+
//#region temp/packages/runtime-vapor/src/apiTemplateRef.d.ts
|
|
5
6
|
type NodeRef = string | Ref | ((ref: Element | VaporComponentInstance, refs: Record<string, any>) => void);
|
|
6
7
|
type RefEl = Element | VaporComponentInstance;
|
|
7
8
|
type setRefFn = (el: RefEl, ref: NodeRef, refFor?: boolean, refKey?: string) => NodeRef | undefined;
|
|
8
9
|
export declare function createTemplateRefSetter(): setRefFn;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region temp/packages/runtime-vapor/src/componentSlots.d.ts
|
|
12
|
+
type RawSlots = Record<string, VaporSlot> & {
|
|
13
|
+
$?: DynamicSlotSource[];
|
|
14
|
+
};
|
|
15
|
+
type StaticSlots = Record<string, VaporSlot>;
|
|
16
|
+
export type VaporSlot = BlockFn;
|
|
17
|
+
type DynamicSlot = {
|
|
18
|
+
name: string;
|
|
19
|
+
fn: VaporSlot;
|
|
20
|
+
};
|
|
21
|
+
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
22
|
+
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
23
|
+
/**
|
|
24
|
+
* Wrap a slot function to track the slot owner.
|
|
25
|
+
*
|
|
26
|
+
* This ensures:
|
|
27
|
+
* 1. createSlot gets rawSlots from the correct component (slot owner)
|
|
28
|
+
* 2. Elements inherit the slot owner's scopeId
|
|
29
|
+
*/
|
|
30
|
+
export declare function withVaporCtx(fn: Function): BlockFn;
|
|
31
|
+
export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region temp/packages/runtime-vapor/src/apiDefineComponent.d.ts
|
|
34
|
+
export type VaporPublicProps = ReservedProps & AllowedComponentProps & ComponentCustomProps;
|
|
35
|
+
export type VaporRenderResult<T = Block> = VNode | T | VaporRenderResult<T>[];
|
|
36
|
+
type VaporComponentInstanceConstructor<T extends VaporComponentInstance> = {
|
|
37
|
+
__isFragment?: never;
|
|
38
|
+
__isTeleport?: never;
|
|
39
|
+
__isSuspense?: never;
|
|
40
|
+
new (...args: any[]): T;
|
|
41
|
+
};
|
|
42
|
+
export type DefineVaporComponent<RuntimePropsOptions = {}, RuntimePropsKeys extends string = string, InferredProps = (string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block, TypeRefs extends Record<string, unknown> = {}, MakeDefaultsOptional extends boolean = true, PublicProps = VaporPublicProps, ResolvedProps = InferredProps & EmitsToProps<Emits>, Defaults = ExtractDefaultPropTypes<RuntimePropsOptions>> = VaporComponentInstanceConstructor<VaporComponentInstance<MakeDefaultsOptional extends true ? keyof Defaults extends never ? Prettify<ResolvedProps> & PublicProps : Partial<Defaults> & Omit<Prettify<ResolvedProps> & PublicProps, keyof Defaults> : Prettify<ResolvedProps> & PublicProps, Emits, Slots, Exposed, TypeBlock, TypeRefs>> & VaporComponentOptions<RuntimePropsOptions | RuntimePropsKeys[], Emits, RuntimeEmitsKeys, Slots, Exposed>;
|
|
43
|
+
type DefineVaporSetupFnComponent<Props extends Record<string, any> = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block, ResolvedProps extends Record<string, any> = Props & EmitsToProps<Emits> & VaporPublicProps> = new () => VaporComponentInstance<ResolvedProps, Emits, Slots, Exposed, TypeBlock>;
|
|
44
|
+
export declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block>(setup: (props: Props, ctx: {
|
|
45
|
+
emit: EmitFn<Emits>;
|
|
46
|
+
slots: Slots;
|
|
47
|
+
attrs: Record<string, any>;
|
|
48
|
+
expose: (exposed: Exposed) => void;
|
|
49
|
+
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: VaporComponentOptions<(keyof Props)[], Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
50
|
+
export declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block>(setup: (props: Props, ctx: {
|
|
51
|
+
emit: EmitFn<Emits>;
|
|
52
|
+
slots: Slots;
|
|
53
|
+
attrs: Record<string, any>;
|
|
54
|
+
expose: (exposed: Exposed) => void;
|
|
55
|
+
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: VaporComponentOptions<ComponentObjectPropsOptions<Props>, Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
56
|
+
export declare function defineVaporComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, ResolvedEmits extends EmitsOptions = ({} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions), InferredProps = (IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), TypeRefs extends Record<string, unknown> = {}, TypeBlock extends Block = Block>(options: VaporComponentOptions<RuntimePropsOptions | RuntimePropsKeys[], ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed, TypeBlock, InferredProps> & {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
/**
|
|
59
|
+
* @private for language-tools use only
|
|
60
|
+
*/
|
|
61
|
+
__typeProps?: TypeProps;
|
|
62
|
+
/**
|
|
63
|
+
* @private for language-tools use only
|
|
64
|
+
*/
|
|
65
|
+
__typeEmits?: TypeEmits;
|
|
66
|
+
/**
|
|
67
|
+
* @private for language-tools use only
|
|
68
|
+
*/
|
|
69
|
+
__typeRefs?: TypeRefs;
|
|
70
|
+
/**
|
|
71
|
+
* @private for language-tools use only
|
|
72
|
+
*/
|
|
73
|
+
__typeEl?: TypeBlock;
|
|
74
|
+
} & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, InferredProps, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false>;
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region temp/packages/runtime-vapor/src/components/KeepAlive.d.ts
|
|
77
|
+
export interface VaporKeepAliveContext {
|
|
78
|
+
processShapeFlag(block: Block): boolean;
|
|
79
|
+
cacheBlock(): void;
|
|
80
|
+
cacheScope(key: any, scope: EffectScope$1): void;
|
|
81
|
+
getScope(key: any): EffectScope$1 | undefined;
|
|
82
|
+
setCurrentBranchKey(key: any): any;
|
|
15
83
|
}
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
84
|
+
export declare const VaporKeepAlive: DefineVaporComponent<{}, string, KeepAliveProps>;
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region temp/packages/runtime-vapor/src/fragment.d.ts
|
|
18
87
|
export declare class VaporFragment<T extends Block = Block> implements TransitionOptions {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
88
|
+
$key?: any;
|
|
89
|
+
$transition?: VaporTransitionHooks | undefined;
|
|
90
|
+
nodes: T;
|
|
91
|
+
vnode?: VNode | null;
|
|
92
|
+
anchor?: Node;
|
|
93
|
+
parentComponent?: GenericComponentInstance | null;
|
|
94
|
+
fallback?: BlockFn;
|
|
95
|
+
insert?: (parent: ParentNode, anchor: Node | null, transitionHooks?: TransitionHooks) => void;
|
|
96
|
+
remove?: (parent?: ParentNode, transitionHooks?: TransitionHooks) => void;
|
|
97
|
+
hydrate?: (...args: any[]) => void;
|
|
98
|
+
setRef?: (instance: VaporComponentInstance, ref: NodeRef, refFor: boolean, refKey: string | undefined) => void;
|
|
99
|
+
onUpdated?: ((nodes?: Block) => void)[];
|
|
100
|
+
constructor(nodes: T);
|
|
32
101
|
}
|
|
33
102
|
declare class ForFragment extends VaporFragment<Block[]> {
|
|
34
|
-
|
|
103
|
+
constructor(nodes: Block[]);
|
|
35
104
|
}
|
|
36
|
-
declare class DynamicFragment extends VaporFragment {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
hydrate: (isEmpty?: boolean) => void;
|
|
105
|
+
export declare class DynamicFragment extends VaporFragment {
|
|
106
|
+
anchor: Node;
|
|
107
|
+
scope: EffectScope$1 | undefined;
|
|
108
|
+
current?: BlockFn;
|
|
109
|
+
pending?: {
|
|
110
|
+
render?: BlockFn;
|
|
111
|
+
key: any;
|
|
112
|
+
};
|
|
113
|
+
anchorLabel?: string;
|
|
114
|
+
keyed?: boolean;
|
|
115
|
+
attrs?: Record<string, any>;
|
|
116
|
+
setAsyncRef?: (instance: VaporComponentInstance) => void;
|
|
117
|
+
keepAliveCtx: VaporKeepAliveContext | null;
|
|
118
|
+
slotOwner: VaporComponentInstance | null;
|
|
119
|
+
constructor(anchorLabel?: string, keyed?: boolean);
|
|
120
|
+
update(render?: BlockFn, key?: any): void;
|
|
121
|
+
renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, instance: GenericComponentInstance | null): void;
|
|
122
|
+
hydrate: (isEmpty?: boolean) => void;
|
|
55
123
|
}
|
|
56
124
|
export declare function isFragment(val: NonNullable<unknown>): val is VaporFragment;
|
|
57
|
-
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region temp/packages/runtime-vapor/src/block.d.ts
|
|
58
127
|
export interface VaporTransitionHooks extends TransitionHooks {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
128
|
+
state: TransitionState;
|
|
129
|
+
props: TransitionProps;
|
|
130
|
+
instance: VaporComponentInstance;
|
|
131
|
+
disabled?: boolean;
|
|
63
132
|
}
|
|
64
133
|
interface TransitionOptions {
|
|
65
|
-
|
|
66
|
-
|
|
134
|
+
$key?: any;
|
|
135
|
+
$transition?: VaporTransitionHooks;
|
|
67
136
|
}
|
|
68
137
|
export type Block = Node | VaporFragment | DynamicFragment | VaporComponentInstance | Block[];
|
|
69
138
|
type BlockFn = (...args: any[]) => Block;
|
|
70
139
|
export declare function insert(block: Block, parent: ParentNode & {
|
|
71
|
-
|
|
72
|
-
}, anchor?: Node | null | 0,
|
|
73
|
-
parentSuspense?: any): void;
|
|
140
|
+
$fc?: Node | null;
|
|
141
|
+
}, anchor?: Node | null | 0, parentSuspense?: any): void;
|
|
74
142
|
export declare function prepend(parent: ParentNode, ...blocks: Block[]): void;
|
|
75
143
|
export declare function remove(block: Block, parent?: ParentNode): void;
|
|
76
|
-
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region temp/packages/runtime-vapor/src/vdomInterop.d.ts
|
|
77
146
|
declare const interopKey: unique symbol;
|
|
78
147
|
export declare const vaporInteropPlugin: Plugin;
|
|
79
|
-
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region temp/packages/runtime-vapor/src/componentProps.d.ts
|
|
80
150
|
type RawProps = Record<string, () => unknown> & {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
151
|
+
$?: DynamicPropsSource[] & {
|
|
152
|
+
[interopKey]?: boolean;
|
|
153
|
+
};
|
|
84
154
|
};
|
|
85
155
|
type DynamicPropsSource = (() => Record<string, unknown>) | Record<string, () => unknown>;
|
|
86
|
-
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region temp/packages/runtime-vapor/src/renderEffect.d.ts
|
|
87
158
|
declare class RenderEffect extends ReactiveEffect {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
159
|
+
render: () => void;
|
|
160
|
+
i: VaporComponentInstance | null;
|
|
161
|
+
job: SchedulerJob;
|
|
162
|
+
updateJob: SchedulerJob;
|
|
163
|
+
constructor(render: () => void);
|
|
164
|
+
fn(): void;
|
|
165
|
+
notify(): void;
|
|
95
166
|
}
|
|
96
167
|
export declare function renderEffect(fn: () => void, noLifecycle?: boolean): void;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
$?: DynamicSlotSource[];
|
|
100
|
-
};
|
|
101
|
-
type StaticSlots = Record<string, VaporSlot>;
|
|
102
|
-
export type VaporSlot = BlockFn;
|
|
103
|
-
type DynamicSlot = {
|
|
104
|
-
name: string;
|
|
105
|
-
fn: VaporSlot;
|
|
106
|
-
};
|
|
107
|
-
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
108
|
-
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
109
|
-
/**
|
|
110
|
-
* Wrap a slot function to track the slot owner.
|
|
111
|
-
*
|
|
112
|
-
* This ensures:
|
|
113
|
-
* 1. createSlot gets rawSlots from the correct component (slot owner)
|
|
114
|
-
* 2. Elements inherit the slot owner's scopeId
|
|
115
|
-
*/
|
|
116
|
-
export declare function withVaporCtx(fn: Function): BlockFn;
|
|
117
|
-
export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block;
|
|
118
|
-
|
|
119
|
-
export declare const VaporTeleportImpl: {
|
|
120
|
-
name: string;
|
|
121
|
-
__isTeleport: boolean;
|
|
122
|
-
__vapor: boolean;
|
|
123
|
-
process(props: LooseRawProps, slots: LooseRawSlots): TeleportFragment;
|
|
124
|
-
};
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region temp/packages/runtime-vapor/src/components/Teleport.d.ts
|
|
125
170
|
declare class TeleportFragment extends VaporFragment {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
171
|
+
anchor?: Node;
|
|
172
|
+
private rawProps?;
|
|
173
|
+
private resolvedProps?;
|
|
174
|
+
private rawSlots?;
|
|
175
|
+
isDisabled?: boolean;
|
|
176
|
+
private isMounted;
|
|
177
|
+
target?: ParentNode | null;
|
|
178
|
+
targetAnchor?: Node | null;
|
|
179
|
+
targetStart?: Node | null;
|
|
180
|
+
placeholder?: Node;
|
|
181
|
+
mountContainer?: ParentNode | null;
|
|
182
|
+
mountAnchor?: Node | null;
|
|
183
|
+
constructor(props: LooseRawProps, slots: LooseRawSlots);
|
|
184
|
+
get parent(): ParentNode | null;
|
|
185
|
+
private initChildren;
|
|
186
|
+
private registerUpdateCssVars;
|
|
187
|
+
private handleChildrenUpdate;
|
|
188
|
+
private mount;
|
|
189
|
+
private mountToTarget;
|
|
190
|
+
private handlePropsUpdate;
|
|
191
|
+
insert: (container: ParentNode, anchor: Node | null) => void;
|
|
192
|
+
remove: (parent?: ParentNode | undefined) => void;
|
|
193
|
+
private hydrateDisabledTeleport;
|
|
194
|
+
private mountChildren;
|
|
195
|
+
hydrate: () => void;
|
|
150
196
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
type
|
|
155
|
-
__isFragment?: never;
|
|
156
|
-
__isTeleport?: never;
|
|
157
|
-
__isSuspense?: never;
|
|
158
|
-
new (...args: any[]): T;
|
|
159
|
-
};
|
|
160
|
-
export type DefineVaporComponent<RuntimePropsOptions = {}, RuntimePropsKeys extends string = string, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block, TypeRefs extends Record<string, unknown> = {}, MakeDefaultsOptional extends boolean = true, InferredProps = string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
|
|
161
|
-
[key in RuntimePropsKeys]?: any;
|
|
162
|
-
}, PublicProps = VaporPublicProps, ResolvedProps = InferredProps & EmitsToProps<Emits>, Defaults = ExtractDefaultPropTypes<RuntimePropsOptions>> = VaporComponentInstanceConstructor<VaporComponentInstance<MakeDefaultsOptional extends true ? keyof Defaults extends never ? Prettify<ResolvedProps> & PublicProps : Partial<Defaults> & Omit<Prettify<ResolvedProps> & PublicProps, keyof Defaults> : Prettify<ResolvedProps> & PublicProps, Emits, Slots, Exposed, TypeBlock, TypeRefs>> & ObjectVaporComponent<RuntimePropsOptions | RuntimePropsKeys[], Emits, RuntimeEmitsKeys, Slots, Exposed>;
|
|
163
|
-
type DefineVaporSetupFnComponent<Props extends Record<string, any> = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block, ResolvedProps extends Record<string, any> = Props & EmitsToProps<Emits> & VaporPublicProps> = new (props?: ResolvedProps) => VaporComponentInstance<ResolvedProps, Emits, Slots, Exposed, TypeBlock>;
|
|
164
|
-
export declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block>(setup: (props: Props, ctx: {
|
|
165
|
-
emit: EmitFn<Emits>;
|
|
166
|
-
slots: Slots;
|
|
167
|
-
attrs: Record<string, any>;
|
|
168
|
-
expose: (exposed: Exposed) => void;
|
|
169
|
-
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: ObjectVaporComponent<(keyof Props)[], Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
170
|
-
export declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block>(setup: (props: Props, ctx: {
|
|
171
|
-
emit: EmitFn<Emits>;
|
|
172
|
-
slots: Slots;
|
|
173
|
-
attrs: Record<string, any>;
|
|
174
|
-
expose: (exposed: Exposed) => void;
|
|
175
|
-
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: ObjectVaporComponent<ComponentObjectPropsOptions<Props>, Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
176
|
-
export declare function defineVaporComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
|
|
177
|
-
[key in RuntimePropsKeys]?: any;
|
|
178
|
-
}, TypeRefs extends Record<string, unknown> = {}, TypeBlock extends Block = Block>(options: ObjectVaporComponent<RuntimePropsOptions | RuntimePropsKeys[], ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed, TypeBlock, InferredProps> & {
|
|
179
|
-
/**
|
|
180
|
-
* @private for language-tools use only
|
|
181
|
-
*/
|
|
182
|
-
__typeProps?: TypeProps;
|
|
183
|
-
/**
|
|
184
|
-
* @private for language-tools use only
|
|
185
|
-
*/
|
|
186
|
-
__typeEmits?: TypeEmits;
|
|
187
|
-
/**
|
|
188
|
-
* @private for language-tools use only
|
|
189
|
-
*/
|
|
190
|
-
__typeRefs?: TypeRefs;
|
|
191
|
-
/**
|
|
192
|
-
* @private for language-tools use only
|
|
193
|
-
*/
|
|
194
|
-
__typeEl?: TypeBlock;
|
|
195
|
-
} & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false, InferredProps>;
|
|
196
|
-
|
|
197
|
-
export type VaporComponent = FunctionalVaporComponent | ObjectVaporComponent | DefineVaporComponent;
|
|
197
|
+
export declare const VaporTeleport: DefineVaporSetupFnComponent<TeleportProps>;
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region temp/packages/runtime-vapor/src/component.d.ts
|
|
200
|
+
export type VaporComponent = FunctionalVaporComponent | VaporComponentOptions | DefineVaporComponent;
|
|
198
201
|
export type FunctionalVaporComponent<Props = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>> = ((props: Readonly<Props & EmitsToProps<Emits>>, ctx: {
|
|
202
|
+
emit: EmitFn<Emits>;
|
|
203
|
+
slots: Slots;
|
|
204
|
+
attrs: Record<string, any>;
|
|
205
|
+
expose: <T extends Record<string, any> = Exposed>(exposed: T) => void;
|
|
206
|
+
}) => VaporRenderResult) & Omit<VaporComponentOptions<ComponentPropsOptions<Props>, Emits, string, Slots>, "setup"> & {
|
|
207
|
+
displayName?: string;
|
|
208
|
+
} & SharedInternalOptions;
|
|
209
|
+
export interface VaporComponentOptions<Props = {}, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block, InferredProps = (ComponentObjectPropsOptions extends Props ? {} : ExtractPropTypes<Props>)> extends ComponentInternalOptions, AsyncComponentInternalOptions<VaporComponentOptions, VaporComponentInstance>, SharedInternalOptions {
|
|
210
|
+
inheritAttrs?: boolean;
|
|
211
|
+
props?: Props;
|
|
212
|
+
emits?: Emits | RuntimeEmitsKeys[];
|
|
213
|
+
slots?: Slots;
|
|
214
|
+
setup?: (props: Readonly<InferredProps>, ctx: {
|
|
199
215
|
emit: EmitFn<Emits>;
|
|
200
216
|
slots: Slots;
|
|
201
217
|
attrs: Record<string, any>;
|
|
202
218
|
expose: <T extends Record<string, any> = Exposed>(exposed: T) => void;
|
|
203
|
-
}) =>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
props?: Props;
|
|
209
|
-
emits?: Emits | RuntimeEmitsKeys[];
|
|
210
|
-
slots?: Slots;
|
|
211
|
-
setup?: (props: Readonly<InferredProps>, ctx: {
|
|
212
|
-
emit: EmitFn<Emits>;
|
|
213
|
-
slots: Slots;
|
|
214
|
-
attrs: Record<string, any>;
|
|
215
|
-
expose: <T extends Record<string, any> = Exposed>(exposed: T) => void;
|
|
216
|
-
}) => TypeBlock | Exposed | Promise<Exposed> | void;
|
|
217
|
-
render?(ctx: Exposed extends Block ? undefined : ShallowUnwrapRef<Exposed>, props: Readonly<InferredProps>, emit: EmitFn<Emits>, attrs: any, slots: Slots): VaporRenderResult<TypeBlock> | void;
|
|
218
|
-
name?: string;
|
|
219
|
-
vapor?: boolean;
|
|
220
|
-
components?: Record<string, VaporComponent>;
|
|
219
|
+
}) => TypeBlock | Exposed | Promise<Exposed> | void;
|
|
220
|
+
render?(ctx: Exposed extends Block ? undefined : ShallowUnwrapRef<Exposed>, props: Readonly<InferredProps>, emit: EmitFn<Emits>, attrs: any, slots: Slots): VaporRenderResult<TypeBlock> | void;
|
|
221
|
+
name?: string;
|
|
222
|
+
vapor?: boolean;
|
|
223
|
+
components?: Record<string, VaporComponent>;
|
|
221
224
|
}
|
|
222
225
|
interface SharedInternalOptions {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
226
|
+
/**
|
|
227
|
+
* Cached normalized props options.
|
|
228
|
+
* In vapor mode there are no mixins so normalized options can be cached
|
|
229
|
+
* directly on the component
|
|
230
|
+
*/
|
|
231
|
+
__propsOptions?: NormalizedPropsOptions;
|
|
232
|
+
/**
|
|
233
|
+
* Cached normalized props proxy handlers.
|
|
234
|
+
*/
|
|
235
|
+
__propsHandlers?: [ProxyHandler<any> | null, ProxyHandler<any>];
|
|
236
|
+
/**
|
|
237
|
+
* Cached normalized emits options.
|
|
238
|
+
*/
|
|
239
|
+
__emitsOptions?: ObjectEmitsOptions;
|
|
237
240
|
}
|
|
238
241
|
type LooseRawProps = Record<string, (() => unknown) | DynamicPropsSource[]> & {
|
|
239
|
-
|
|
242
|
+
$?: DynamicPropsSource[];
|
|
240
243
|
};
|
|
241
244
|
type LooseRawSlots = Record<string, VaporSlot | DynamicSlotSource[]> & {
|
|
242
|
-
|
|
245
|
+
$?: DynamicSlotSource[];
|
|
243
246
|
};
|
|
244
247
|
export declare function createComponent(component: VaporComponent, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean, appContext?: GenericAppContext): VaporComponentInstance;
|
|
245
248
|
export declare class VaporComponentInstance<Props extends Record<string, any> = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block = Block, TypeRefs extends Record<string, any> = Record<string, any>> implements GenericComponentInstance {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
249
|
+
vapor: true;
|
|
250
|
+
uid: number;
|
|
251
|
+
type: VaporComponent;
|
|
252
|
+
root: GenericComponentInstance | null;
|
|
253
|
+
parent: GenericComponentInstance | null;
|
|
254
|
+
appContext: GenericAppContext;
|
|
255
|
+
block: TypeBlock;
|
|
256
|
+
scope: EffectScope;
|
|
257
|
+
rawProps: RawProps;
|
|
258
|
+
rawSlots: RawSlots;
|
|
259
|
+
props: Readonly<Props>;
|
|
260
|
+
attrs: Record<string, any>;
|
|
261
|
+
propsDefaults: Record<string, any> | null;
|
|
262
|
+
slots: Slots;
|
|
263
|
+
scopeId?: string | null;
|
|
264
|
+
rawPropsRef?: ShallowRef<any>;
|
|
265
|
+
rawSlotsRef?: ShallowRef<any>;
|
|
266
|
+
emit: EmitFn<Emits>;
|
|
267
|
+
emitted: Record<string, boolean> | null;
|
|
268
|
+
expose: (<T extends Record<string, any> = Exposed>(exposed: T) => void) & string[];
|
|
269
|
+
exposed: Exposed | null;
|
|
270
|
+
exposeProxy: Prettify<ShallowUnwrapRef<Exposed>> | null;
|
|
271
|
+
refs: TypeRefs;
|
|
272
|
+
provides: Record<string, any>;
|
|
273
|
+
ids: [string, number, number];
|
|
274
|
+
suspense: SuspenseBoundary | null;
|
|
275
|
+
suspenseId: number;
|
|
276
|
+
asyncDep: Promise<any> | null;
|
|
277
|
+
asyncResolved: boolean;
|
|
278
|
+
renderEffects?: RenderEffect[];
|
|
279
|
+
hasFallthrough: boolean;
|
|
280
|
+
shapeFlag?: number;
|
|
281
|
+
key?: any;
|
|
282
|
+
oncePropsCache?: Record<string | symbol, any>;
|
|
283
|
+
isMounted: boolean;
|
|
284
|
+
isUnmounted: boolean;
|
|
285
|
+
isDeactivated: boolean;
|
|
286
|
+
isUpdating: boolean;
|
|
287
|
+
bc?: LifecycleHook;
|
|
288
|
+
c?: LifecycleHook;
|
|
289
|
+
bm?: LifecycleHook;
|
|
290
|
+
m?: LifecycleHook;
|
|
291
|
+
bu?: LifecycleHook;
|
|
292
|
+
u?: LifecycleHook;
|
|
293
|
+
um?: LifecycleHook;
|
|
294
|
+
bum?: LifecycleHook;
|
|
295
|
+
da?: LifecycleHook;
|
|
296
|
+
a?: LifecycleHook;
|
|
297
|
+
rtg?: LifecycleHook;
|
|
298
|
+
rtc?: LifecycleHook;
|
|
299
|
+
ec?: LifecycleHook;
|
|
300
|
+
sp?: LifecycleHook<() => Promise<unknown>>;
|
|
301
|
+
setupState?: Exposed extends Block ? undefined : ShallowUnwrapRef<Exposed>;
|
|
302
|
+
devtoolsRawSetupState?: any;
|
|
303
|
+
hmrRerender?: () => void;
|
|
304
|
+
hmrReload?: (newComp: VaporComponent) => void;
|
|
305
|
+
parentTeleport?: TeleportFragment | null;
|
|
306
|
+
propsOptions?: NormalizedPropsOptions;
|
|
307
|
+
emitsOptions?: ObjectEmitsOptions | null;
|
|
308
|
+
isSingleRoot?: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* dev only flag to track whether $attrs was used during render.
|
|
311
|
+
* If $attrs was used during render then the warning for failed attrs
|
|
312
|
+
* fallthrough can be suppressed.
|
|
313
|
+
*/
|
|
314
|
+
accessedAttrs: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* @deprecated only used for JSX to detect props types.
|
|
317
|
+
*/
|
|
318
|
+
$props: Props;
|
|
319
|
+
constructor(comp: VaporComponent, rawProps?: RawProps | null, rawSlots?: RawSlots | null, appContext?: GenericAppContext, once?: boolean);
|
|
320
|
+
/**
|
|
321
|
+
* Expose `getKeysFromRawProps` on the instance so it can be used in code
|
|
322
|
+
* paths where it's needed, e.g. `useModel`
|
|
323
|
+
*/
|
|
324
|
+
rawKeys(): string[];
|
|
317
325
|
}
|
|
318
326
|
export declare function isVaporComponent(value: unknown): value is VaporComponentInstance;
|
|
319
327
|
/**
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
328
|
+
* Used when a component cannot be resolved at compile time
|
|
329
|
+
* and needs rely on runtime resolution - where it might fallback to a plain
|
|
330
|
+
* element if the resolution fails.
|
|
331
|
+
*/
|
|
324
332
|
export declare function createComponentWithFallback(comp: VaporComponent | typeof NULL_DYNAMIC_COMPONENT | string, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean, appContext?: GenericAppContext): HTMLElement | VaporComponentInstance;
|
|
325
333
|
export declare function createPlainElement(comp: string, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean): HTMLElement;
|
|
326
|
-
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region temp/packages/runtime-vapor/src/apiCreateApp.d.ts
|
|
327
336
|
export declare const createVaporApp: CreateAppFunction<ParentNode, VaporComponent>;
|
|
328
337
|
export declare const createVaporSSRApp: CreateAppFunction<ParentNode, VaporComponent>;
|
|
329
|
-
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region temp/packages/runtime-vapor/src/apiDefineAsyncComponent.d.ts
|
|
330
340
|
export declare function defineVaporAsyncComponent<T extends VaporComponent>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
|
|
331
|
-
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region temp/packages/runtime-vapor/src/directives/custom.d.ts
|
|
332
343
|
export type VaporDirective = (node: Element | VaporComponentInstance, value?: () => any, argument?: string, modifiers?: DirectiveModifiers) => (() => void) | void;
|
|
333
|
-
type VaporDirectiveArguments = Array<[VaporDirective | undefined] | [VaporDirective | undefined, () => any] | [VaporDirective | undefined, (() => any) | undefined, argument: string] | [
|
|
334
|
-
VaporDirective | undefined,
|
|
335
|
-
value: (() => any) | undefined,
|
|
336
|
-
argument: string | undefined,
|
|
337
|
-
modifiers: DirectiveModifiers
|
|
338
|
-
]>;
|
|
344
|
+
type VaporDirectiveArguments = Array<[VaporDirective | undefined] | [VaporDirective | undefined, () => any] | [VaporDirective | undefined, (() => any) | undefined, argument: string] | [VaporDirective | undefined, value: (() => any) | undefined, argument: string | undefined, modifiers: DirectiveModifiers]>;
|
|
339
345
|
export declare function withVaporDirectives(node: Element | VaporComponentInstance, dirs: VaporDirectiveArguments): void;
|
|
340
|
-
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region temp/packages/runtime-vapor/src/apiDefineCustomElement.d.ts
|
|
341
348
|
export type VaporElementConstructor<P = {}> = {
|
|
342
|
-
|
|
349
|
+
new (initialProps?: Record<string, any>): VaporElement & P;
|
|
343
350
|
};
|
|
344
351
|
export declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}) => RawBindings | VaporRenderResult, options?: Pick<
|
|
350
|
-
|
|
352
|
+
attrs: Record<string, any>;
|
|
353
|
+
slots: StaticSlots;
|
|
354
|
+
emit: EmitFn;
|
|
355
|
+
expose: (exposed: Record<string, any>) => void;
|
|
356
|
+
}) => RawBindings | VaporRenderResult, options?: Pick<VaporComponentOptions, "name" | "inheritAttrs" | "emits"> & CustomElementOptions & {
|
|
357
|
+
props?: (keyof Props)[];
|
|
351
358
|
}): VaporElementConstructor<Props>;
|
|
352
359
|
export declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: {
|
|
360
|
+
attrs: Record<string, any>;
|
|
361
|
+
slots: StaticSlots;
|
|
362
|
+
emit: EmitFn;
|
|
363
|
+
expose: (exposed: Record<string, any>) => void;
|
|
364
|
+
}) => RawBindings | VaporRenderResult, options?: Pick<VaporComponentOptions, "name" | "inheritAttrs" | "emits"> & CustomElementOptions & {
|
|
365
|
+
props?: ComponentObjectPropsOptions<Props>;
|
|
366
|
+
}): VaporElementConstructor<Props>;
|
|
367
|
+
export declare function defineVaporCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, InferredProps = (string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & {
|
|
368
|
+
props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
|
|
369
|
+
emits?: RuntimeEmitsOptions | RuntimeEmitsKeys[];
|
|
370
|
+
slots?: Slots;
|
|
371
|
+
setup?: (props: Readonly<InferredProps>, ctx: {
|
|
353
372
|
attrs: Record<string, any>;
|
|
354
|
-
slots:
|
|
355
|
-
emit: EmitFn
|
|
373
|
+
slots: Slots;
|
|
374
|
+
emit: EmitFn<RuntimeEmitsOptions>;
|
|
356
375
|
expose: (exposed: Record<string, any>) => void;
|
|
357
|
-
}) =>
|
|
358
|
-
props?: ComponentObjectPropsOptions<Props>;
|
|
359
|
-
}): VaporElementConstructor<Props>;
|
|
360
|
-
export declare function defineVaporCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, InferredProps = string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
|
|
361
|
-
[key in RuntimePropsKeys]?: any;
|
|
362
|
-
}, ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & {
|
|
363
|
-
props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
|
|
364
|
-
emits?: RuntimeEmitsOptions | RuntimeEmitsKeys[];
|
|
365
|
-
slots?: Slots;
|
|
366
|
-
setup?: (props: Readonly<InferredProps>, ctx: {
|
|
367
|
-
attrs: Record<string, any>;
|
|
368
|
-
slots: Slots;
|
|
369
|
-
emit: EmitFn<RuntimeEmitsOptions>;
|
|
370
|
-
expose: (exposed: Record<string, any>) => void;
|
|
371
|
-
}) => any;
|
|
376
|
+
}) => any;
|
|
372
377
|
} & ThisType<void>, extraOptions?: CustomElementOptions): VaporElementConstructor<ResolvedProps>;
|
|
373
378
|
export declare function defineVaporCustomElement<T extends DefineVaporComponent<any, any, any, any, any, any, any, any, any, any> | DefineVaporSetupFnComponent<any, any, any, any, any>>(options: T, extraOptions?: CustomElementOptions): VaporElementConstructor<T extends DefineVaporComponent<infer RuntimePropsOptions, any, any, any, any, any, any, any, any, any> ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : T extends DefineVaporSetupFnComponent<infer P extends Record<string, any>, any, any, any, any> ? P : unknown>;
|
|
374
379
|
export declare const defineVaporSSRCustomElement: typeof defineVaporCustomElement;
|
|
375
380
|
type VaporInnerComponentDef = VaporComponent & CustomElementOptions;
|
|
376
381
|
export declare class VaporElement extends VueElementBase<ParentNode, VaporComponent, VaporInnerComponentDef> {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
382
|
+
constructor(def: VaporInnerComponentDef, props?: Record<string, any> | undefined, createAppFn?: CreateAppFunction<ParentNode, VaporComponent>);
|
|
383
|
+
protected _needsHydration(): boolean;
|
|
384
|
+
protected _mount(def: VaporInnerComponentDef): void;
|
|
385
|
+
protected _update(): void;
|
|
386
|
+
protected _unmount(): void;
|
|
387
|
+
/**
|
|
388
|
+
* Only called when shadowRoot is false
|
|
389
|
+
*/
|
|
390
|
+
protected _updateSlotNodes(replacements: Map<Node, Node[]>): void;
|
|
391
|
+
private _createComponent;
|
|
387
392
|
}
|
|
388
|
-
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region temp/packages/runtime-vapor/src/insertionState.d.ts
|
|
389
395
|
type InsertionParent = ParentNode & {
|
|
390
|
-
|
|
391
|
-
|
|
396
|
+
$fc?: Node | null;
|
|
397
|
+
$llc?: Node | null;
|
|
392
398
|
};
|
|
393
399
|
/**
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
400
|
+
* This function is called before a block type that requires insertion
|
|
401
|
+
* (component, slot outlet, if, for) is created. The state is used for actual
|
|
402
|
+
* insertion on client-side render, and used for node adoption during hydration.
|
|
403
|
+
*/
|
|
398
404
|
export declare function setInsertionState(parent: ParentNode & {
|
|
399
|
-
|
|
405
|
+
$fc?: Node | null;
|
|
400
406
|
}, anchor?: Node | 0 | null, logicalIndex?: number, last?: boolean): void;
|
|
401
|
-
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region temp/packages/runtime-vapor/src/dom/template.d.ts
|
|
402
409
|
export declare function template(html: string, root?: boolean, ns?: Namespace): () => Node & {
|
|
403
|
-
|
|
410
|
+
$root?: true;
|
|
404
411
|
};
|
|
405
|
-
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region temp/packages/runtime-vapor/src/dom/node.d.ts
|
|
406
414
|
export declare function createTextNode(value?: string): Text;
|
|
407
415
|
declare const _txt: typeof _child;
|
|
408
416
|
declare function _child(node: InsertionParent): Node;
|
|
409
417
|
declare function _nthChild(node: InsertionParent, i: number): Node;
|
|
410
418
|
declare function _next(node: Node): Node;
|
|
411
419
|
type DelegatedFunction<T extends (...args: any[]) => any> = T & {
|
|
412
|
-
|
|
420
|
+
impl: T;
|
|
413
421
|
};
|
|
414
422
|
export declare const txt: DelegatedFunction<typeof _txt>;
|
|
415
423
|
export declare const child: DelegatedFunction<typeof _child>;
|
|
416
424
|
export declare const next: DelegatedFunction<typeof _next>;
|
|
417
425
|
export declare const nthChild: DelegatedFunction<typeof _nthChild>;
|
|
418
|
-
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region temp/packages/runtime-vapor/src/dom/prop.d.ts
|
|
419
428
|
type TargetElement = Element & {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
429
|
+
$root?: true;
|
|
430
|
+
$html?: string;
|
|
431
|
+
$cls?: string;
|
|
432
|
+
$sty?: NormalizedStyle | string | undefined;
|
|
433
|
+
value?: string;
|
|
434
|
+
_value?: any;
|
|
426
435
|
};
|
|
427
436
|
export declare function setProp(el: any, key: string, value: any): void;
|
|
428
437
|
export declare function setAttr(el: any, key: string, value: any, isSVG?: boolean): void;
|
|
@@ -431,75 +440,82 @@ export declare function setClass(el: TargetElement, value: any, isSVG?: boolean)
|
|
|
431
440
|
export declare function setStyle(el: TargetElement, value: any): void;
|
|
432
441
|
export declare function setValue(el: TargetElement, value: any, forceHydrate?: boolean): void;
|
|
433
442
|
/**
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
443
|
+
* Only called on text nodes!
|
|
444
|
+
* Compiler should also ensure value passed here is already converted by
|
|
445
|
+
* `toDisplayString`
|
|
446
|
+
*/
|
|
438
447
|
export declare function setText(el: Text & {
|
|
439
|
-
|
|
448
|
+
$txt?: string;
|
|
440
449
|
}, value: string): void;
|
|
441
450
|
/**
|
|
442
|
-
|
|
443
|
-
|
|
451
|
+
* Used by setDynamicProps only, so need to guard with `toDisplayString`
|
|
452
|
+
*/
|
|
444
453
|
export declare function setElementText(el: Node & {
|
|
445
|
-
|
|
454
|
+
$txt?: string;
|
|
446
455
|
}, value: unknown): void;
|
|
447
456
|
export declare function setBlockText(block: Block & {
|
|
448
|
-
|
|
457
|
+
$txt?: string;
|
|
449
458
|
}, value: unknown): void;
|
|
450
459
|
export declare function setHtml(el: TargetElement, value: any): void;
|
|
451
460
|
export declare function setBlockHtml(block: Block & {
|
|
452
|
-
|
|
461
|
+
$html?: string;
|
|
453
462
|
}, value: any): void;
|
|
454
463
|
export declare function setDynamicProps(el: any, args: any[], isSVG?: boolean): void;
|
|
455
|
-
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region temp/packages/runtime-vapor/src/dom/event.d.ts
|
|
456
466
|
export declare function on(el: Element, event: string, handler: (e: Event) => any | ((e: Event) => any)[], options?: AddEventListenerOptions & {
|
|
457
|
-
|
|
467
|
+
effect?: boolean;
|
|
458
468
|
}): void;
|
|
459
469
|
export declare function delegate(el: any, event: string, handler: (e: Event) => any): void;
|
|
460
470
|
export declare const delegateEvents: (...names: string[]) => void;
|
|
461
471
|
export declare function setDynamicEvents(el: HTMLElement, events: Record<string, (...args: any[]) => any>): void;
|
|
462
472
|
export declare function createInvoker(handler: (...args: any[]) => any): (...args: any[]) => any;
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region temp/packages/runtime-vapor/src/apiCreateIf.d.ts
|
|
475
|
+
export declare function createIf(condition: () => any, b1: BlockFn, b2?: BlockFn, once?: boolean, index?: number): Block;
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region temp/packages/runtime-vapor/src/apiCreateFragment.d.ts
|
|
466
478
|
/**
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
479
|
+
* Create a dynamic fragment keyed by a reactive value for Vapor transitions.
|
|
480
|
+
* The fragment is re-rendered when the key changes to trigger enter/leave
|
|
481
|
+
* animations.
|
|
482
|
+
*
|
|
483
|
+
* Example:
|
|
484
|
+
* <VaporTransition>
|
|
485
|
+
* <h1 :key="count">{{ count }}</h1>
|
|
486
|
+
* </VaporTransition>
|
|
487
|
+
*/
|
|
476
488
|
export declare function createKeyedFragment(key: () => any, render: BlockFn): Block;
|
|
477
|
-
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region temp/packages/runtime-vapor/src/apiCreateFor.d.ts
|
|
478
491
|
type Source = any[] | Record<any, any> | number | Set<any> | Map<any, any>;
|
|
479
492
|
export declare const createFor: (src: () => Source, renderItem: (item: ShallowRef<any>, key: ShallowRef<any>, index: ShallowRef<number | undefined>) => Block, getKey?: (item: any, key: any, index?: number) => any, flags?: number, setup?: (_: {
|
|
480
|
-
|
|
493
|
+
createSelector: (source: () => any) => (cb: () => void) => void;
|
|
481
494
|
}) => void) => ForFragment;
|
|
482
495
|
export declare function createForSlots(rawSource: Source, getSlot: (item: any, key: any, index?: number) => DynamicSlot): DynamicSlot[];
|
|
483
496
|
export declare function getRestElement(val: any, keys: string[]): any;
|
|
484
497
|
export declare function getDefaultValue(val: any, defaultVal: any): any;
|
|
485
|
-
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region temp/packages/runtime-vapor/src/helpers/useCssVars.d.ts
|
|
486
500
|
export declare function useVaporCssVars(getter: () => Record<string, string>): void;
|
|
487
|
-
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region temp/packages/runtime-vapor/src/apiCreateDynamicComponent.d.ts
|
|
488
503
|
export declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: RawSlots | null, isSingleRoot?: boolean, once?: boolean): VaporFragment;
|
|
489
|
-
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region temp/packages/runtime-vapor/src/directives/vShow.d.ts
|
|
490
506
|
export declare function applyVShow(target: Block, source: () => any): void;
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
export declare const applyTextModel: VaporModelDirective<HTMLInputElement | HTMLTextAreaElement, 'trim' | 'number' | 'lazy'>;
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region temp/packages/runtime-vapor/src/directives/vModel.d.ts
|
|
509
|
+
type VaporModelDirective<T extends HTMLElement = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement, Modifiers extends string = string> = (el: T, get: () => any, set: (v: any) => void, modifiers?: { [key in Modifiers]?: true }) => void;
|
|
510
|
+
export declare const applyTextModel: VaporModelDirective<HTMLInputElement | HTMLTextAreaElement, "trim" | "number" | "lazy">;
|
|
496
511
|
export declare const applyCheckboxModel: VaporModelDirective<HTMLInputElement>;
|
|
497
512
|
export declare const applyRadioModel: VaporModelDirective<HTMLInputElement>;
|
|
498
|
-
export declare const applySelectModel: VaporModelDirective<HTMLSelectElement,
|
|
513
|
+
export declare const applySelectModel: VaporModelDirective<HTMLSelectElement, "number">;
|
|
499
514
|
export declare const applyDynamicModel: VaporModelDirective;
|
|
500
|
-
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region temp/packages/runtime-vapor/src/components/Transition.d.ts
|
|
501
517
|
export declare const VaporTransition: FunctionalVaporComponent<TransitionProps>;
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region temp/packages/runtime-vapor/src/components/TransitionGroup.d.ts
|
|
520
|
+
export declare const VaporTransitionGroup: DefineVaporComponent<{}, string, TransitionGroupProps>;
|
|
521
|
+
//#endregion
|