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