@vue/runtime-vapor 3.6.0-beta.3 → 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 +369 -353
- package/dist/runtime-vapor.esm-bundler.js +3456 -4710
- package/package.json +4 -4
package/dist/runtime-vapor.d.ts
CHANGED
|
@@ -1,427 +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
|
|
12
|
+
interface KeepAliveContext {
|
|
13
|
+
processShapeFlag(block: Block): boolean;
|
|
14
|
+
cacheBlock(): void;
|
|
15
|
+
cacheScope(key: any, scope: EffectScope$1): void;
|
|
16
|
+
getScope(key: any): EffectScope$1 | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare const VaporKeepAliveImpl: ObjectVaporComponent;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region temp/packages/runtime-vapor/src/fragment.d.ts
|
|
10
21
|
export declare class VaporFragment<T extends Block = Block> implements TransitionOptions {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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);
|
|
24
35
|
}
|
|
25
36
|
declare class ForFragment extends VaporFragment<Block[]> {
|
|
26
|
-
|
|
37
|
+
constructor(nodes: Block[]);
|
|
27
38
|
}
|
|
28
39
|
declare class DynamicFragment extends VaporFragment {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, instance: GenericComponentInstance | null): void;
|
|
48
|
-
hydrate: (isEmpty?: boolean) => void;
|
|
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;
|
|
49
58
|
}
|
|
50
59
|
export declare function isFragment(val: NonNullable<unknown>): val is VaporFragment;
|
|
51
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region temp/packages/runtime-vapor/src/block.d.ts
|
|
52
62
|
export interface VaporTransitionHooks extends TransitionHooks {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
state: TransitionState;
|
|
64
|
+
props: TransitionProps;
|
|
65
|
+
instance: VaporComponentInstance;
|
|
66
|
+
disabled?: boolean;
|
|
57
67
|
}
|
|
58
68
|
interface TransitionOptions {
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
$key?: any;
|
|
70
|
+
$transition?: VaporTransitionHooks;
|
|
61
71
|
}
|
|
62
72
|
export type Block = Node | VaporFragment | DynamicFragment | VaporComponentInstance | Block[];
|
|
63
73
|
type BlockFn = (...args: any[]) => Block;
|
|
64
74
|
export declare function insert(block: Block, parent: ParentNode & {
|
|
65
|
-
|
|
66
|
-
}, anchor?: Node | null | 0,
|
|
67
|
-
parentSuspense?: any): void;
|
|
75
|
+
$fc?: Node | null;
|
|
76
|
+
}, anchor?: Node | null | 0, parentSuspense?: any): void;
|
|
68
77
|
export declare function prepend(parent: ParentNode, ...blocks: Block[]): void;
|
|
69
78
|
export declare function remove(block: Block, parent?: ParentNode): void;
|
|
70
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region temp/packages/runtime-vapor/src/vdomInterop.d.ts
|
|
71
81
|
declare const interopKey: unique symbol;
|
|
72
82
|
export declare const vaporInteropPlugin: Plugin;
|
|
73
|
-
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region temp/packages/runtime-vapor/src/componentProps.d.ts
|
|
74
85
|
type RawProps = Record<string, () => unknown> & {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
$?: DynamicPropsSource[] & {
|
|
87
|
+
[interopKey]?: boolean;
|
|
88
|
+
};
|
|
78
89
|
};
|
|
79
90
|
type DynamicPropsSource = (() => Record<string, unknown>) | Record<string, () => unknown>;
|
|
80
|
-
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region temp/packages/runtime-vapor/src/renderEffect.d.ts
|
|
81
93
|
declare class RenderEffect extends ReactiveEffect {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
render: () => void;
|
|
95
|
+
i: VaporComponentInstance | null;
|
|
96
|
+
job: SchedulerJob;
|
|
97
|
+
updateJob: SchedulerJob;
|
|
98
|
+
constructor(render: () => void);
|
|
99
|
+
fn(): void;
|
|
100
|
+
notify(): void;
|
|
89
101
|
}
|
|
90
102
|
export declare function renderEffect(fn: () => void, noLifecycle?: boolean): void;
|
|
91
|
-
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region temp/packages/runtime-vapor/src/componentSlots.d.ts
|
|
92
105
|
type RawSlots = Record<string, VaporSlot> & {
|
|
93
|
-
|
|
106
|
+
$?: DynamicSlotSource[];
|
|
94
107
|
};
|
|
95
108
|
type StaticSlots = Record<string, VaporSlot>;
|
|
96
109
|
export type VaporSlot = BlockFn;
|
|
97
110
|
type DynamicSlot = {
|
|
98
|
-
|
|
99
|
-
|
|
111
|
+
name: string;
|
|
112
|
+
fn: VaporSlot;
|
|
100
113
|
};
|
|
101
114
|
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
102
115
|
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
103
116
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
*/
|
|
110
123
|
export declare function withVaporCtx(fn: Function): BlockFn;
|
|
111
124
|
export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block;
|
|
112
|
-
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region temp/packages/runtime-vapor/src/components/Teleport.d.ts
|
|
113
127
|
export declare const VaporTeleportImpl: {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
128
|
+
name: string;
|
|
129
|
+
__isTeleport: boolean;
|
|
130
|
+
__vapor: boolean;
|
|
131
|
+
process(props: LooseRawProps, slots: LooseRawSlots): TeleportFragment;
|
|
118
132
|
};
|
|
119
133
|
declare class TeleportFragment extends VaporFragment {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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;
|
|
144
158
|
}
|
|
145
|
-
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region temp/packages/runtime-vapor/src/apiDefineComponent.d.ts
|
|
146
161
|
export type VaporPublicProps = ReservedProps & AllowedComponentProps & ComponentCustomProps;
|
|
147
162
|
export type VaporRenderResult<T = Block> = VNode | T | VaporRenderResult<T>[];
|
|
148
163
|
type VaporComponentInstanceConstructor<T extends VaporComponentInstance> = {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
__isFragment?: never;
|
|
165
|
+
__isTeleport?: never;
|
|
166
|
+
__isSuspense?: never;
|
|
167
|
+
new (...args: any[]): T;
|
|
153
168
|
};
|
|
154
|
-
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> : {
|
|
155
|
-
[key in RuntimePropsKeys]?: any;
|
|
156
|
-
}, 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>;
|
|
157
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>;
|
|
158
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: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
172
|
+
emit: EmitFn<Emits>;
|
|
173
|
+
slots: Slots;
|
|
174
|
+
attrs: Record<string, any>;
|
|
175
|
+
expose: (exposed: Exposed) => void;
|
|
163
176
|
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: ObjectVaporComponent<(keyof Props)[], Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
164
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: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
178
|
+
emit: EmitFn<Emits>;
|
|
179
|
+
slots: Slots;
|
|
180
|
+
attrs: Record<string, any>;
|
|
181
|
+
expose: (exposed: Exposed) => void;
|
|
169
182
|
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: ObjectVaporComponent<ComponentObjectPropsOptions<Props>, Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
170
|
-
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> : {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
*/
|
|
188
|
-
__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;
|
|
189
200
|
} & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false, InferredProps>;
|
|
190
|
-
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region temp/packages/runtime-vapor/src/component.d.ts
|
|
191
203
|
export type VaporComponent = FunctionalVaporComponent | ObjectVaporComponent | DefineVaporComponent;
|
|
192
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: {
|
|
193
218
|
emit: EmitFn<Emits>;
|
|
194
219
|
slots: Slots;
|
|
195
220
|
attrs: Record<string, any>;
|
|
196
221
|
expose: <T extends Record<string, any> = Exposed>(exposed: T) => void;
|
|
197
|
-
}) =>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
props?: Props;
|
|
203
|
-
emits?: Emits | RuntimeEmitsKeys[];
|
|
204
|
-
slots?: Slots;
|
|
205
|
-
setup?: (props: Readonly<InferredProps>, ctx: {
|
|
206
|
-
emit: EmitFn<Emits>;
|
|
207
|
-
slots: Slots;
|
|
208
|
-
attrs: Record<string, any>;
|
|
209
|
-
expose: <T extends Record<string, any> = Exposed>(exposed: T) => void;
|
|
210
|
-
}) => TypeBlock | Exposed | Promise<Exposed> | void;
|
|
211
|
-
render?(ctx: Exposed extends Block ? undefined : ShallowUnwrapRef<Exposed>, props: Readonly<InferredProps>, emit: EmitFn<Emits>, attrs: any, slots: Slots): VaporRenderResult<TypeBlock> | void;
|
|
212
|
-
name?: string;
|
|
213
|
-
vapor?: boolean;
|
|
214
|
-
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>;
|
|
215
227
|
}
|
|
216
228
|
interface SharedInternalOptions {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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;
|
|
231
243
|
}
|
|
232
244
|
type LooseRawProps = Record<string, (() => unknown) | DynamicPropsSource[]> & {
|
|
233
|
-
|
|
245
|
+
$?: DynamicPropsSource[];
|
|
234
246
|
};
|
|
235
247
|
type LooseRawSlots = Record<string, VaporSlot | DynamicSlotSource[]> & {
|
|
236
|
-
|
|
248
|
+
$?: DynamicSlotSource[];
|
|
237
249
|
};
|
|
238
250
|
export declare function createComponent(component: VaporComponent, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean, appContext?: GenericAppContext): VaporComponentInstance;
|
|
239
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 {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
|
|
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[];
|
|
311
323
|
}
|
|
312
324
|
export declare function isVaporComponent(value: unknown): value is VaporComponentInstance;
|
|
313
325
|
/**
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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
|
+
*/
|
|
318
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;
|
|
319
331
|
export declare function createPlainElement(comp: string, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean): HTMLElement;
|
|
320
|
-
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region temp/packages/runtime-vapor/src/apiCreateApp.d.ts
|
|
321
334
|
export declare const createVaporApp: CreateAppFunction<ParentNode, VaporComponent>;
|
|
322
335
|
export declare const createVaporSSRApp: CreateAppFunction<ParentNode, VaporComponent>;
|
|
323
|
-
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region temp/packages/runtime-vapor/src/apiDefineAsyncComponent.d.ts
|
|
324
338
|
export declare function defineVaporAsyncComponent<T extends VaporComponent>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
|
|
325
|
-
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region temp/packages/runtime-vapor/src/directives/custom.d.ts
|
|
326
341
|
export type VaporDirective = (node: Element | VaporComponentInstance, value?: () => any, argument?: string, modifiers?: DirectiveModifiers) => (() => void) | void;
|
|
327
|
-
type VaporDirectiveArguments = Array<[VaporDirective | undefined] | [VaporDirective | undefined, () => any] | [VaporDirective | undefined, (() => any) | undefined, argument: string] | [
|
|
328
|
-
VaporDirective | undefined,
|
|
329
|
-
value: (() => any) | undefined,
|
|
330
|
-
argument: string | undefined,
|
|
331
|
-
modifiers: DirectiveModifiers
|
|
332
|
-
]>;
|
|
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]>;
|
|
333
343
|
export declare function withVaporDirectives(node: Element | VaporComponentInstance, dirs: VaporDirectiveArguments): void;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region temp/packages/runtime-vapor/src/apiDefineCustomElement.d.ts
|
|
337
346
|
export type VaporElementConstructor<P = {}> = {
|
|
338
|
-
|
|
347
|
+
new (initialProps?: Record<string, any>): VaporElement & P;
|
|
339
348
|
};
|
|
340
349
|
export declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}) => RawBindings | VaporRenderResult, options?: Pick<ObjectVaporComponent,
|
|
346
|
-
|
|
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)[];
|
|
347
356
|
}): VaporElementConstructor<Props>;
|
|
348
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: {
|
|
349
370
|
attrs: Record<string, any>;
|
|
350
|
-
slots:
|
|
351
|
-
emit: EmitFn
|
|
371
|
+
slots: Slots;
|
|
372
|
+
emit: EmitFn<RuntimeEmitsOptions>;
|
|
352
373
|
expose: (exposed: Record<string, any>) => void;
|
|
353
|
-
}) =>
|
|
354
|
-
props?: ComponentObjectPropsOptions<Props>;
|
|
355
|
-
}): VaporElementConstructor<Props>;
|
|
356
|
-
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> : {
|
|
357
|
-
[key in RuntimePropsKeys]?: any;
|
|
358
|
-
}, ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & {
|
|
359
|
-
props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
|
|
360
|
-
emits?: RuntimeEmitsOptions | RuntimeEmitsKeys[];
|
|
361
|
-
slots?: Slots;
|
|
362
|
-
setup?: (props: Readonly<InferredProps>, ctx: {
|
|
363
|
-
attrs: Record<string, any>;
|
|
364
|
-
slots: Slots;
|
|
365
|
-
emit: EmitFn<RuntimeEmitsOptions>;
|
|
366
|
-
expose: (exposed: Record<string, any>) => void;
|
|
367
|
-
}) => any;
|
|
374
|
+
}) => any;
|
|
368
375
|
} & ThisType<void>, extraOptions?: CustomElementOptions): VaporElementConstructor<ResolvedProps>;
|
|
369
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>;
|
|
370
377
|
export declare const defineVaporSSRCustomElement: typeof defineVaporCustomElement;
|
|
371
378
|
type VaporInnerComponentDef = VaporComponent & CustomElementOptions;
|
|
372
379
|
export declare class VaporElement extends VueElementBase<ParentNode, VaporComponent, VaporInnerComponentDef> {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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;
|
|
383
390
|
}
|
|
384
|
-
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region temp/packages/runtime-vapor/src/insertionState.d.ts
|
|
385
393
|
type InsertionParent = ParentNode & {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
$lpn?: Node | null;
|
|
389
|
-
$lan?: Node | null;
|
|
390
|
-
$curIdx?: number;
|
|
394
|
+
$fc?: Node | null;
|
|
395
|
+
$llc?: Node | null;
|
|
391
396
|
};
|
|
392
397
|
/**
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
+
*/
|
|
397
402
|
export declare function setInsertionState(parent: ParentNode & {
|
|
398
|
-
|
|
399
|
-
}, anchor?: Node | 0 | null
|
|
400
|
-
|
|
403
|
+
$fc?: Node | null;
|
|
404
|
+
}, anchor?: Node | 0 | null, logicalIndex?: number, last?: boolean): void;
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region temp/packages/runtime-vapor/src/dom/template.d.ts
|
|
401
407
|
export declare function template(html: string, root?: boolean, ns?: Namespace): () => Node & {
|
|
402
|
-
|
|
408
|
+
$root?: true;
|
|
403
409
|
};
|
|
404
|
-
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region temp/packages/runtime-vapor/src/dom/node.d.ts
|
|
405
412
|
export declare function createTextNode(value?: string): Text;
|
|
406
413
|
declare const _txt: typeof _child;
|
|
407
414
|
declare function _child(node: InsertionParent): Node;
|
|
408
415
|
declare function _nthChild(node: InsertionParent, i: number): Node;
|
|
409
416
|
declare function _next(node: Node): Node;
|
|
410
417
|
type DelegatedFunction<T extends (...args: any[]) => any> = T & {
|
|
411
|
-
|
|
418
|
+
impl: T;
|
|
412
419
|
};
|
|
413
420
|
export declare const txt: DelegatedFunction<typeof _txt>;
|
|
414
421
|
export declare const child: DelegatedFunction<typeof _child>;
|
|
415
422
|
export declare const next: DelegatedFunction<typeof _next>;
|
|
416
423
|
export declare const nthChild: DelegatedFunction<typeof _nthChild>;
|
|
417
|
-
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region temp/packages/runtime-vapor/src/dom/prop.d.ts
|
|
418
426
|
type TargetElement = Element & {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
427
|
+
$root?: true;
|
|
428
|
+
$html?: string;
|
|
429
|
+
$cls?: string;
|
|
430
|
+
$sty?: NormalizedStyle | string | undefined;
|
|
431
|
+
value?: string;
|
|
432
|
+
_value?: any;
|
|
425
433
|
};
|
|
426
434
|
export declare function setProp(el: any, key: string, value: any): void;
|
|
427
435
|
export declare function setAttr(el: any, key: string, value: any, isSVG?: boolean): void;
|
|
@@ -430,75 +438,83 @@ export declare function setClass(el: TargetElement, value: any, isSVG?: boolean)
|
|
|
430
438
|
export declare function setStyle(el: TargetElement, value: any): void;
|
|
431
439
|
export declare function setValue(el: TargetElement, value: any, forceHydrate?: boolean): void;
|
|
432
440
|
/**
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
441
|
+
* Only called on text nodes!
|
|
442
|
+
* Compiler should also ensure value passed here is already converted by
|
|
443
|
+
* `toDisplayString`
|
|
444
|
+
*/
|
|
437
445
|
export declare function setText(el: Text & {
|
|
438
|
-
|
|
446
|
+
$txt?: string;
|
|
439
447
|
}, value: string): void;
|
|
440
448
|
/**
|
|
441
|
-
|
|
442
|
-
|
|
449
|
+
* Used by setDynamicProps only, so need to guard with `toDisplayString`
|
|
450
|
+
*/
|
|
443
451
|
export declare function setElementText(el: Node & {
|
|
444
|
-
|
|
452
|
+
$txt?: string;
|
|
445
453
|
}, value: unknown): void;
|
|
446
454
|
export declare function setBlockText(block: Block & {
|
|
447
|
-
|
|
455
|
+
$txt?: string;
|
|
448
456
|
}, value: unknown): void;
|
|
449
457
|
export declare function setHtml(el: TargetElement, value: any): void;
|
|
450
458
|
export declare function setBlockHtml(block: Block & {
|
|
451
|
-
|
|
459
|
+
$html?: string;
|
|
452
460
|
}, value: any): void;
|
|
453
461
|
export declare function setDynamicProps(el: any, args: any[], isSVG?: boolean): void;
|
|
454
|
-
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region temp/packages/runtime-vapor/src/dom/event.d.ts
|
|
455
464
|
export declare function on(el: Element, event: string, handler: (e: Event) => any | ((e: Event) => any)[], options?: AddEventListenerOptions & {
|
|
456
|
-
|
|
465
|
+
effect?: boolean;
|
|
457
466
|
}): void;
|
|
458
467
|
export declare function delegate(el: any, event: string, handler: (e: Event) => any): void;
|
|
459
468
|
export declare const delegateEvents: (...names: string[]) => void;
|
|
460
469
|
export declare function setDynamicEvents(el: HTMLElement, events: Record<string, (...args: any[]) => any>): void;
|
|
461
470
|
export declare function createInvoker(handler: (...args: any[]) => any): (...args: any[]) => any;
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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
|
|
465
476
|
/**
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
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
|
+
*/
|
|
475
486
|
export declare function createKeyedFragment(key: () => any, render: BlockFn): Block;
|
|
476
|
-
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region temp/packages/runtime-vapor/src/apiCreateFor.d.ts
|
|
477
489
|
type Source = any[] | Record<any, any> | number | Set<any> | Map<any, any>;
|
|
478
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?: (_: {
|
|
479
|
-
|
|
491
|
+
createSelector: (source: () => any) => (cb: () => void) => void;
|
|
480
492
|
}) => void) => ForFragment;
|
|
481
493
|
export declare function createForSlots(rawSource: Source, getSlot: (item: any, key: any, index?: number) => DynamicSlot): DynamicSlot[];
|
|
482
494
|
export declare function getRestElement(val: any, keys: string[]): any;
|
|
483
495
|
export declare function getDefaultValue(val: any, defaultVal: any): any;
|
|
484
|
-
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region temp/packages/runtime-vapor/src/helpers/useCssVars.d.ts
|
|
485
498
|
export declare function useVaporCssVars(getter: () => Record<string, string>): void;
|
|
486
|
-
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region temp/packages/runtime-vapor/src/apiCreateDynamicComponent.d.ts
|
|
487
501
|
export declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: RawSlots | null, isSingleRoot?: boolean, once?: boolean): VaporFragment;
|
|
488
|
-
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region temp/packages/runtime-vapor/src/directives/vShow.d.ts
|
|
489
504
|
export declare function applyVShow(target: Block, source: () => any): void;
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
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">;
|
|
495
509
|
export declare const applyCheckboxModel: VaporModelDirective<HTMLInputElement>;
|
|
496
510
|
export declare const applyRadioModel: VaporModelDirective<HTMLInputElement>;
|
|
497
|
-
export declare const applySelectModel: VaporModelDirective<HTMLSelectElement,
|
|
511
|
+
export declare const applySelectModel: VaporModelDirective<HTMLSelectElement, "number">;
|
|
498
512
|
export declare const applyDynamicModel: VaporModelDirective;
|
|
499
|
-
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region temp/packages/runtime-vapor/src/components/Transition.d.ts
|
|
500
515
|
export declare const VaporTransition: FunctionalVaporComponent<TransitionProps>;
|
|
501
|
-
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region temp/packages/runtime-vapor/src/components/TransitionGroup.d.ts
|
|
502
518
|
export declare const VaporTransitionGroup: ObjectVaporComponent;
|
|
503
|
-
|
|
504
|
-
export { VaporKeepAliveImpl as VaporKeepAlive, VaporTeleportImpl as VaporTeleport, };
|
|
519
|
+
//#endregion
|
|
520
|
+
export { VaporKeepAliveImpl as VaporKeepAlive, VaporTeleportImpl as VaporTeleport, };
|