@vue/runtime-vapor 3.6.0-beta.10 → 3.6.0-beta.12
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 +128 -86
- package/dist/runtime-vapor.esm-bundler.js +4640 -3553
- package/package.json +4 -4
package/dist/runtime-vapor.d.ts
CHANGED
|
@@ -8,80 +8,13 @@ type RefEl = Element | VaporComponentInstance | DynamicFragment | VaporFragment;
|
|
|
8
8
|
type setRefFn = (el: RefEl, ref: NodeRef, refFor?: boolean, refKey?: string) => NodeRef | undefined;
|
|
9
9
|
export declare function createTemplateRefSetter(): setRefFn;
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region temp/packages/runtime-vapor/src/
|
|
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
|
|
11
|
+
//#region temp/packages/runtime-vapor/src/keepAlive.d.ts
|
|
77
12
|
export interface VaporKeepAliveContext {
|
|
78
|
-
processShapeFlag(block: Block):
|
|
13
|
+
processShapeFlag(block: Block): any | false;
|
|
79
14
|
cacheBlock(block?: Block): void;
|
|
80
|
-
cacheScope(cacheKey:
|
|
15
|
+
cacheScope(cacheKey: any, scopeLookupKey: any, scope: EffectScope$1): void;
|
|
81
16
|
getScope(key: any): EffectScope$1 | undefined;
|
|
82
17
|
}
|
|
83
|
-
type CacheKey = any;
|
|
84
|
-
export declare const VaporKeepAlive: DefineVaporComponent<{}, string, KeepAliveProps>;
|
|
85
18
|
//#endregion
|
|
86
19
|
//#region temp/packages/runtime-vapor/src/fragment.d.ts
|
|
87
20
|
export declare class VaporFragment<T extends Block = Block> implements TransitionOptions {
|
|
@@ -91,23 +24,26 @@ export declare class VaporFragment<T extends Block = Block> implements Transitio
|
|
|
91
24
|
vnode?: VNode | null;
|
|
92
25
|
anchor?: Node;
|
|
93
26
|
parentComponent?: GenericComponentInstance | null;
|
|
94
|
-
|
|
27
|
+
validityPending?: boolean;
|
|
95
28
|
insert?: (parent: ParentNode, anchor: Node | null, transitionHooks?: TransitionHooks) => void;
|
|
96
29
|
remove?: (parent?: ParentNode, transitionHooks?: TransitionHooks) => void;
|
|
97
30
|
hydrate?: (...args: any[]) => void;
|
|
98
31
|
setRef?: (instance: VaporComponentInstance, ref: NodeRef, refFor: boolean, refKey: string | undefined) => void;
|
|
99
32
|
onUpdated?: ((nodes?: Block) => void)[];
|
|
33
|
+
readonly renderInstance: GenericComponentInstance | null;
|
|
100
34
|
readonly slotOwner: VaporComponentInstance | null;
|
|
101
|
-
readonly keepAliveCtx
|
|
35
|
+
readonly keepAliveCtx?: VaporKeepAliveContext | null;
|
|
36
|
+
readonly inheritedSlotBoundary: SlotBoundaryContext | null;
|
|
102
37
|
constructor(nodes: T);
|
|
103
|
-
protected runWithRenderCtx<R>(fn: () => R): R;
|
|
38
|
+
protected runWithRenderCtx<R>(fn: () => R, scope?: EffectScope$1): R;
|
|
104
39
|
}
|
|
105
40
|
declare class ForFragment extends VaporFragment<Block[]> {
|
|
41
|
+
resetListeners?: (() => void)[];
|
|
106
42
|
constructor(nodes: Block[]);
|
|
43
|
+
onReset(fn: () => void): void;
|
|
107
44
|
}
|
|
108
45
|
export declare class DynamicFragment extends VaporFragment {
|
|
109
46
|
anchor: Node;
|
|
110
|
-
isAnchorPending?: boolean;
|
|
111
47
|
scope: EffectScope$1 | undefined;
|
|
112
48
|
current?: BlockFn;
|
|
113
49
|
pending?: {
|
|
@@ -116,12 +52,21 @@ export declare class DynamicFragment extends VaporFragment {
|
|
|
116
52
|
};
|
|
117
53
|
anchorLabel?: string;
|
|
118
54
|
keyed?: boolean;
|
|
55
|
+
inTransition?: boolean;
|
|
119
56
|
attrs?: Record<string, any>;
|
|
120
57
|
constructor(anchorLabel?: string, keyed?: boolean, locate?: boolean);
|
|
58
|
+
protected registerSlotBoundaryDirty(): void;
|
|
121
59
|
update(render?: BlockFn, key?: any): void;
|
|
122
60
|
renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, key: any): void;
|
|
123
61
|
hydrate: (isEmpty?: boolean, isSlot?: boolean) => void;
|
|
124
62
|
}
|
|
63
|
+
interface SlotBoundaryContext {
|
|
64
|
+
parent: SlotBoundaryContext | null;
|
|
65
|
+
getFallback: () => BlockFn | undefined;
|
|
66
|
+
run<R>(fn: () => R, scope?: EffectScope$1): R;
|
|
67
|
+
markDirty: () => void;
|
|
68
|
+
redirected?: SlotBoundaryContext;
|
|
69
|
+
}
|
|
125
70
|
export declare function isFragment(val: NonNullable<unknown>): val is VaporFragment;
|
|
126
71
|
//#endregion
|
|
127
72
|
//#region temp/packages/runtime-vapor/src/block.d.ts
|
|
@@ -144,9 +89,8 @@ export declare function insert(block: Block, parent: ParentNode & {
|
|
|
144
89
|
export declare function prepend(parent: ParentNode, ...blocks: Block[]): void;
|
|
145
90
|
export declare function remove(block: Block, parent?: ParentNode): void;
|
|
146
91
|
//#endregion
|
|
147
|
-
//#region temp/packages/runtime-vapor/src/
|
|
92
|
+
//#region temp/packages/runtime-vapor/src/vdomInteropState.d.ts
|
|
148
93
|
declare const interopKey: unique symbol;
|
|
149
|
-
export declare const vaporInteropPlugin: Plugin;
|
|
150
94
|
//#endregion
|
|
151
95
|
//#region temp/packages/runtime-vapor/src/componentProps.d.ts
|
|
152
96
|
type RawProps = Record<string, () => unknown> & {
|
|
@@ -168,6 +112,71 @@ declare class RenderEffect extends ReactiveEffect {
|
|
|
168
112
|
}
|
|
169
113
|
export declare function renderEffect(fn: () => void, noLifecycle?: boolean): void;
|
|
170
114
|
//#endregion
|
|
115
|
+
//#region temp/packages/runtime-vapor/src/componentSlots.d.ts
|
|
116
|
+
type RawSlots = Record<string, VaporSlot> & {
|
|
117
|
+
$?: DynamicSlotSource[];
|
|
118
|
+
};
|
|
119
|
+
type StaticSlots = Record<string, VaporSlot>;
|
|
120
|
+
export type VaporSlot = BlockFn;
|
|
121
|
+
type DynamicSlot = {
|
|
122
|
+
name: string;
|
|
123
|
+
fn: VaporSlot;
|
|
124
|
+
};
|
|
125
|
+
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
126
|
+
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
127
|
+
/**
|
|
128
|
+
* Wrap a slot function to track the slot owner.
|
|
129
|
+
*
|
|
130
|
+
* This ensures:
|
|
131
|
+
* 1. createSlot gets rawSlots from the correct instance (slot owner)
|
|
132
|
+
* 2. elements inherit the slot owner's scopeId
|
|
133
|
+
*/
|
|
134
|
+
export declare function withVaporCtx(fn: Function): BlockFn;
|
|
135
|
+
export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block;
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region temp/packages/runtime-vapor/src/apiDefineComponent.d.ts
|
|
138
|
+
export type VaporPublicProps = ReservedProps & AllowedComponentProps & ComponentCustomProps;
|
|
139
|
+
export type VaporRenderResult<T = Block> = VNode | T | VaporRenderResult<T>[];
|
|
140
|
+
type VaporComponentInstanceConstructor<T extends VaporComponentInstance> = {
|
|
141
|
+
__isFragment?: never;
|
|
142
|
+
__isTeleport?: never;
|
|
143
|
+
__isSuspense?: never;
|
|
144
|
+
new (...args: any[]): T;
|
|
145
|
+
};
|
|
146
|
+
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>;
|
|
147
|
+
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>;
|
|
148
|
+
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: {
|
|
149
|
+
emit: EmitFn<Emits>;
|
|
150
|
+
slots: Slots;
|
|
151
|
+
attrs: Record<string, any>;
|
|
152
|
+
expose: (exposed: Exposed) => void;
|
|
153
|
+
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: VaporComponentOptions<(keyof NoInfer<Props>)[], Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
154
|
+
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: {
|
|
155
|
+
emit: EmitFn<Emits>;
|
|
156
|
+
slots: Slots;
|
|
157
|
+
attrs: Record<string, any>;
|
|
158
|
+
expose: (exposed: Exposed) => void;
|
|
159
|
+
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: VaporComponentOptions<ComponentObjectPropsOptions<Props>, Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
160
|
+
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> & {
|
|
161
|
+
[key: string]: any;
|
|
162
|
+
/**
|
|
163
|
+
* @private for language-tools use only
|
|
164
|
+
*/
|
|
165
|
+
__typeProps?: TypeProps;
|
|
166
|
+
/**
|
|
167
|
+
* @private for language-tools use only
|
|
168
|
+
*/
|
|
169
|
+
__typeEmits?: TypeEmits;
|
|
170
|
+
/**
|
|
171
|
+
* @private for language-tools use only
|
|
172
|
+
*/
|
|
173
|
+
__typeRefs?: TypeRefs;
|
|
174
|
+
/**
|
|
175
|
+
* @private for language-tools use only
|
|
176
|
+
*/
|
|
177
|
+
__typeEl?: TypeBlock;
|
|
178
|
+
} & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, InferredProps, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false>;
|
|
179
|
+
//#endregion
|
|
171
180
|
//#region temp/packages/runtime-vapor/src/components/Teleport.d.ts
|
|
172
181
|
declare class TeleportFragment extends VaporFragment {
|
|
173
182
|
anchor?: Node;
|
|
@@ -178,6 +187,7 @@ declare class TeleportFragment extends VaporFragment {
|
|
|
178
187
|
private isMounted;
|
|
179
188
|
private childrenInitialized;
|
|
180
189
|
private readonly ownerInstance;
|
|
190
|
+
private readonly childrenScope;
|
|
181
191
|
target?: ParentNode | null;
|
|
182
192
|
targetAnchor?: Node | null;
|
|
183
193
|
targetStart?: Node | null;
|
|
@@ -197,7 +207,8 @@ declare class TeleportFragment extends VaporFragment {
|
|
|
197
207
|
private clearMainViewChildren;
|
|
198
208
|
private handlePropsUpdate;
|
|
199
209
|
insert: (container: ParentNode, anchor: Node | null) => void;
|
|
200
|
-
|
|
210
|
+
dispose: () => void;
|
|
211
|
+
remove: (_parent?: ParentNode) => void;
|
|
201
212
|
private hydrateTargetAnchors;
|
|
202
213
|
private hydrateDisabledTeleport;
|
|
203
214
|
private mountChildren;
|
|
@@ -350,11 +361,17 @@ export declare const createVaporSSRApp: CreateAppFunction<ParentNode, VaporCompo
|
|
|
350
361
|
//#region temp/packages/runtime-vapor/src/apiDefineAsyncComponent.d.ts
|
|
351
362
|
export declare function defineVaporAsyncComponent<T extends VaporComponent>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
|
|
352
363
|
//#endregion
|
|
364
|
+
//#region temp/packages/runtime-vapor/src/vdomInterop.d.ts
|
|
365
|
+
export declare const vaporInteropPlugin: Plugin;
|
|
366
|
+
//#endregion
|
|
353
367
|
//#region temp/packages/runtime-vapor/src/directives/custom.d.ts
|
|
354
368
|
export type VaporDirective = (node: Element | VaporComponentInstance, value?: () => any, argument?: string, modifiers?: DirectiveModifiers) => (() => void) | void;
|
|
355
369
|
type VaporDirectiveArguments = Array<[VaporDirective | undefined] | [VaporDirective | undefined, () => any] | [VaporDirective | undefined, (() => any) | undefined, argument: string] | [VaporDirective | undefined, value: (() => any) | undefined, argument: string | undefined, modifiers: DirectiveModifiers]>;
|
|
356
370
|
export declare function withVaporDirectives(node: Element | VaporComponentInstance, dirs: VaporDirectiveArguments): void;
|
|
357
371
|
//#endregion
|
|
372
|
+
//#region temp/packages/runtime-vapor/src/components/KeepAlive.d.ts
|
|
373
|
+
export declare const VaporKeepAlive: DefineVaporComponent<{}, string, KeepAliveProps>;
|
|
374
|
+
//#endregion
|
|
358
375
|
//#region temp/packages/runtime-vapor/src/apiDefineCustomElement.d.ts
|
|
359
376
|
export type VaporElementConstructor<P = {}> = {
|
|
360
377
|
new (initialProps?: Record<string, any>): VaporElement & P;
|
|
@@ -365,7 +382,7 @@ export declare function defineVaporCustomElement<Props, RawBindings = object>(se
|
|
|
365
382
|
emit: EmitFn;
|
|
366
383
|
expose: (exposed: Record<string, any>) => void;
|
|
367
384
|
}) => RawBindings | VaporRenderResult, options?: Pick<VaporComponentOptions, "name" | "inheritAttrs" | "emits"> & CustomElementOptions & {
|
|
368
|
-
props?: (keyof Props)[];
|
|
385
|
+
props?: (keyof NoInfer<Props>)[];
|
|
369
386
|
}): VaporElementConstructor<Props>;
|
|
370
387
|
export declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: {
|
|
371
388
|
attrs: Record<string, any>;
|
|
@@ -398,7 +415,10 @@ export declare class VaporElement extends VueElementBase<ParentNode, VaporCompon
|
|
|
398
415
|
/**
|
|
399
416
|
* Only called when shadowRoot is false
|
|
400
417
|
*/
|
|
401
|
-
protected _updateSlotNodes(replacements: Map<Node,
|
|
418
|
+
protected _updateSlotNodes(replacements: Map<Node, {
|
|
419
|
+
nodes: Node[];
|
|
420
|
+
usedFallback: boolean;
|
|
421
|
+
}>): void;
|
|
402
422
|
private _createComponent;
|
|
403
423
|
}
|
|
404
424
|
//#endregion
|
|
@@ -414,10 +434,10 @@ type InsertionParent = ParentNode & {
|
|
|
414
434
|
*/
|
|
415
435
|
export declare function setInsertionState(parent: ParentNode & {
|
|
416
436
|
$fc?: Node | null;
|
|
417
|
-
}, anchor?: Node | 0 | null, logicalIndex?: number
|
|
437
|
+
}, anchor?: Node | 0 | null, logicalIndex?: number): void;
|
|
418
438
|
//#endregion
|
|
419
439
|
//#region temp/packages/runtime-vapor/src/dom/template.d.ts
|
|
420
|
-
export declare function template(html: string, root?: boolean, ns?: Namespace): () => Node & {
|
|
440
|
+
export declare function template(html: string, root?: boolean, isStatic?: boolean, ns?: Namespace): () => Node & {
|
|
421
441
|
$root?: true;
|
|
422
442
|
};
|
|
423
443
|
//#endregion
|
|
@@ -425,7 +445,7 @@ export declare function template(html: string, root?: boolean, ns?: Namespace):
|
|
|
425
445
|
export declare function createTextNode(value?: string): Text;
|
|
426
446
|
export declare function txt(node: ParentNode): Node;
|
|
427
447
|
export declare function child(node: InsertionParent, logicalIndex?: number): Node;
|
|
428
|
-
export declare function nthChild(node: InsertionParent, i: number): Node;
|
|
448
|
+
export declare function nthChild(node: InsertionParent, i: number, logicalIndex?: number): Node;
|
|
429
449
|
export declare function next(node: Node, logicalIndex?: number): Node;
|
|
430
450
|
//#endregion
|
|
431
451
|
//#region temp/packages/runtime-vapor/src/dom/prop.d.ts
|
|
@@ -433,6 +453,7 @@ type TargetElement = Element & {
|
|
|
433
453
|
$root?: true;
|
|
434
454
|
$html?: string;
|
|
435
455
|
$cls?: string;
|
|
456
|
+
$clsFlags?: number;
|
|
436
457
|
$sty?: NormalizedStyle | string | undefined;
|
|
437
458
|
value?: string;
|
|
438
459
|
_value?: any;
|
|
@@ -440,7 +461,8 @@ type TargetElement = Element & {
|
|
|
440
461
|
export declare function setProp(el: any, key: string, value: any): void;
|
|
441
462
|
export declare function setAttr(el: any, key: string, value: any, isSVG?: boolean): void;
|
|
442
463
|
export declare function setDOMProp(el: any, key: string, value: any, forceHydrate?: boolean, attrName?: string): void;
|
|
443
|
-
export declare function setClass(el: TargetElement, value: any, isSVG?: boolean): void;
|
|
464
|
+
export declare function setClass(el: TargetElement, value: any, isSVG?: boolean, isNormalized?: boolean): void;
|
|
465
|
+
export declare function setClassName(el: TargetElement, flags: number, cls: string | string[], prefix?: string, suffix?: string): void;
|
|
444
466
|
export declare function setStyle(el: TargetElement, value: any): void;
|
|
445
467
|
export declare function setValue(el: TargetElement, value: any, forceHydrate?: boolean): void;
|
|
446
468
|
/**
|
|
@@ -493,9 +515,29 @@ export declare function createKeyedFragment(key: () => any, render: BlockFn): Bl
|
|
|
493
515
|
//#endregion
|
|
494
516
|
//#region temp/packages/runtime-vapor/src/apiCreateFor.d.ts
|
|
495
517
|
type Source = any[] | Record<any, any> | number | Set<any> | Map<any, any>;
|
|
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
|
|
497
|
-
|
|
498
|
-
|
|
518
|
+
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) => ForFragment;
|
|
519
|
+
interface ForSelector {
|
|
520
|
+
(key: any, oper: () => void): void;
|
|
521
|
+
/**
|
|
522
|
+
* Bulk-reset the selector's internal state. Hook into a v-for's fast-reset
|
|
523
|
+
* paths via `forFragment.onReset(selector.reset)` so the lazy per-item
|
|
524
|
+
* `onScopeDispose` teardowns short-circuit instead of doing N individual
|
|
525
|
+
* Map.delete() calls.
|
|
526
|
+
*/
|
|
527
|
+
reset(): void;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Builds a key-indexed selector that activates only the opers registered with
|
|
531
|
+
* the key matching the current source value. Compared to letting each item
|
|
532
|
+
* subscribe directly, this keeps re-renders on source change O(2) instead of
|
|
533
|
+
* O(N) (only previous and new active item re-run).
|
|
534
|
+
*
|
|
535
|
+
* Selector cleanup follows the current scope. Per-item teardown is auto-wired
|
|
536
|
+
* via `onScopeDispose` so callers (typically v-for item scopes) don't need
|
|
537
|
+
* explicit deregistration. For bulk-reset hot paths, attach the selector to
|
|
538
|
+
* the v-for via `frag.onReset(selector.reset)` to skip the per-item Map ops.
|
|
539
|
+
*/
|
|
540
|
+
export declare function createSelector(source: () => any): ForSelector;
|
|
499
541
|
export declare function createForSlots(rawSource: Source, getSlot: (item: any, key: any, index?: number) => DynamicSlot): DynamicSlot[];
|
|
500
542
|
export declare function getRestElement(val: any, keys: string[]): any;
|
|
501
543
|
export declare function getDefaultValue(val: any, defaultVal: any): any;
|