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