@vue/runtime-vapor 3.6.0-beta.6 → 3.6.0-beta.8
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 +13 -20
- package/dist/runtime-vapor.esm-bundler.js +416 -315
- package/package.json +4 -4
package/dist/runtime-vapor.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { IsKeyValues, Namespace, NormalizedStyle, Prettify } from "@vue/shared";
|
|
|
4
4
|
|
|
5
5
|
//#region temp/packages/runtime-vapor/src/apiTemplateRef.d.ts
|
|
6
6
|
type NodeRef = string | Ref | ((ref: Element | VaporComponentInstance, refs: Record<string, any>) => void);
|
|
7
|
-
type RefEl = Element | VaporComponentInstance;
|
|
7
|
+
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
|
|
@@ -24,8 +24,8 @@ type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
|
24
24
|
* Wrap a slot function to track the slot owner.
|
|
25
25
|
*
|
|
26
26
|
* This ensures:
|
|
27
|
-
* 1. createSlot gets rawSlots from the correct
|
|
28
|
-
* 2.
|
|
27
|
+
* 1. createSlot gets rawSlots from the correct instance (slot owner)
|
|
28
|
+
* 2. elements inherit the slot owner's scopeId
|
|
29
29
|
*/
|
|
30
30
|
export declare function withVaporCtx(fn: Function): BlockFn;
|
|
31
31
|
export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block;
|
|
@@ -113,12 +113,11 @@ export declare class DynamicFragment extends VaporFragment {
|
|
|
113
113
|
anchorLabel?: string;
|
|
114
114
|
keyed?: boolean;
|
|
115
115
|
attrs?: Record<string, any>;
|
|
116
|
-
setAsyncRef?: (instance: VaporComponentInstance) => void;
|
|
117
116
|
keepAliveCtx: VaporKeepAliveContext | null;
|
|
118
117
|
slotOwner: VaporComponentInstance | null;
|
|
119
|
-
constructor(anchorLabel?: string, keyed?: boolean);
|
|
118
|
+
constructor(anchorLabel?: string, keyed?: boolean, locate?: boolean);
|
|
120
119
|
update(render?: BlockFn, key?: any): void;
|
|
121
|
-
renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null
|
|
120
|
+
renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null): void;
|
|
122
121
|
hydrate: (isEmpty?: boolean) => void;
|
|
123
122
|
}
|
|
124
123
|
export declare function isFragment(val: NonNullable<unknown>): val is VaporFragment;
|
|
@@ -129,6 +128,7 @@ export interface VaporTransitionHooks extends TransitionHooks {
|
|
|
129
128
|
props: TransitionProps;
|
|
130
129
|
instance: VaporComponentInstance;
|
|
131
130
|
disabled?: boolean;
|
|
131
|
+
applyGroup?: (block: Block, hooks: VaporTransitionHooks) => void;
|
|
132
132
|
}
|
|
133
133
|
interface TransitionOptions {
|
|
134
134
|
$key?: any;
|
|
@@ -197,8 +197,8 @@ declare class TeleportFragment extends VaporFragment {
|
|
|
197
197
|
export declare const VaporTeleport: DefineVaporSetupFnComponent<TeleportProps>;
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region temp/packages/runtime-vapor/src/component.d.ts
|
|
200
|
-
export type VaporComponent = FunctionalVaporComponent | VaporComponentOptions | DefineVaporComponent;
|
|
201
|
-
export type FunctionalVaporComponent<Props = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>> = ((props:
|
|
200
|
+
export type VaporComponent = FunctionalVaporComponent<any> | VaporComponentOptions | DefineVaporComponent;
|
|
201
|
+
export type FunctionalVaporComponent<Props = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>> = ((props: Props & EmitsToProps<Emits>, ctx: {
|
|
202
202
|
emit: EmitFn<Emits>;
|
|
203
203
|
slots: Slots;
|
|
204
204
|
attrs: Record<string, any>;
|
|
@@ -412,17 +412,10 @@ export declare function template(html: string, root?: boolean, ns?: Namespace):
|
|
|
412
412
|
//#endregion
|
|
413
413
|
//#region temp/packages/runtime-vapor/src/dom/node.d.ts
|
|
414
414
|
export declare function createTextNode(value?: string): Text;
|
|
415
|
-
declare
|
|
416
|
-
declare function
|
|
417
|
-
declare function
|
|
418
|
-
declare function
|
|
419
|
-
type DelegatedFunction<T extends (...args: any[]) => any> = T & {
|
|
420
|
-
impl: T;
|
|
421
|
-
};
|
|
422
|
-
export declare const txt: DelegatedFunction<typeof _txt>;
|
|
423
|
-
export declare const child: DelegatedFunction<typeof _child>;
|
|
424
|
-
export declare const next: DelegatedFunction<typeof _next>;
|
|
425
|
-
export declare const nthChild: DelegatedFunction<typeof _nthChild>;
|
|
415
|
+
export declare function txt(node: ParentNode): Node;
|
|
416
|
+
export declare function child(node: InsertionParent, logicalIndex?: number): Node;
|
|
417
|
+
export declare function nthChild(node: InsertionParent, i: number): Node;
|
|
418
|
+
export declare function next(node: Node, logicalIndex?: number): Node;
|
|
426
419
|
//#endregion
|
|
427
420
|
//#region temp/packages/runtime-vapor/src/dom/prop.d.ts
|
|
428
421
|
type TargetElement = Element & {
|
|
@@ -472,7 +465,7 @@ export declare function setDynamicEvents(el: HTMLElement, events: Record<string,
|
|
|
472
465
|
export declare function createInvoker(handler: (...args: any[]) => any): (...args: any[]) => any;
|
|
473
466
|
//#endregion
|
|
474
467
|
//#region temp/packages/runtime-vapor/src/apiCreateIf.d.ts
|
|
475
|
-
export declare function createIf(condition: () => any, b1: BlockFn, b2?: BlockFn, once?: boolean, index?: number): Block;
|
|
468
|
+
export declare function createIf(condition: () => any, b1: BlockFn, b2?: BlockFn, blockShape?: number, once?: boolean, index?: number): Block;
|
|
476
469
|
//#endregion
|
|
477
470
|
//#region temp/packages/runtime-vapor/src/apiCreateFragment.d.ts
|
|
478
471
|
/**
|