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