@vue/runtime-vapor 3.6.0-beta.7 → 3.6.0-beta.9

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.
@@ -75,12 +75,12 @@ export declare function defineVaporComponent<TypeProps, RuntimePropsOptions exte
75
75
  //#endregion
76
76
  //#region temp/packages/runtime-vapor/src/components/KeepAlive.d.ts
77
77
  export interface VaporKeepAliveContext {
78
- processShapeFlag(block: Block): boolean;
78
+ processShapeFlag(block: Block): CacheKey | false;
79
79
  cacheBlock(): void;
80
- cacheScope(key: any, scope: EffectScope$1): void;
80
+ cacheScope(cacheKey: CacheKey, scopeLookupKey: any, scope: EffectScope$1): void;
81
81
  getScope(key: any): EffectScope$1 | undefined;
82
- setCurrentBranchKey(key: any): any;
83
82
  }
83
+ type CacheKey = any;
84
84
  export declare const VaporKeepAlive: DefineVaporComponent<{}, string, KeepAliveProps>;
85
85
  //#endregion
86
86
  //#region temp/packages/runtime-vapor/src/fragment.d.ts
@@ -97,7 +97,10 @@ export declare class VaporFragment<T extends Block = Block> implements Transitio
97
97
  hydrate?: (...args: any[]) => void;
98
98
  setRef?: (instance: VaporComponentInstance, ref: NodeRef, refFor: boolean, refKey: string | undefined) => void;
99
99
  onUpdated?: ((nodes?: Block) => void)[];
100
+ readonly slotOwner: VaporComponentInstance | null;
101
+ readonly keepAliveCtx: VaporKeepAliveContext | null;
100
102
  constructor(nodes: T);
103
+ protected runWithRenderCtx<R>(fn: () => R): R;
101
104
  }
102
105
  declare class ForFragment extends VaporFragment<Block[]> {
103
106
  constructor(nodes: Block[]);
@@ -113,11 +116,9 @@ export declare class DynamicFragment extends VaporFragment {
113
116
  anchorLabel?: string;
114
117
  keyed?: boolean;
115
118
  attrs?: Record<string, any>;
116
- keepAliveCtx: VaporKeepAliveContext | null;
117
- slotOwner: VaporComponentInstance | null;
118
- constructor(anchorLabel?: string, keyed?: boolean);
119
+ constructor(anchorLabel?: string, keyed?: boolean, locate?: boolean);
119
120
  update(render?: BlockFn, key?: any): void;
120
- renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, instance: GenericComponentInstance | null): void;
121
+ renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, key: any): void;
121
122
  hydrate: (isEmpty?: boolean) => void;
122
123
  }
123
124
  export declare function isFragment(val: NonNullable<unknown>): val is VaporFragment;
@@ -128,6 +129,7 @@ export interface VaporTransitionHooks extends TransitionHooks {
128
129
  props: TransitionProps;
129
130
  instance: VaporComponentInstance;
130
131
  disabled?: boolean;
132
+ applyGroup?: (block: Block, props: TransitionProps, state: TransitionState, instance: VaporComponentInstance) => void;
131
133
  }
132
134
  interface TransitionOptions {
133
135
  $key?: any;
@@ -173,22 +175,28 @@ declare class TeleportFragment extends VaporFragment {
173
175
  private rawSlots?;
174
176
  isDisabled?: boolean;
175
177
  private isMounted;
178
+ private childrenInitialized;
179
+ private readonly ownerInstance;
176
180
  target?: ParentNode | null;
177
181
  targetAnchor?: Node | null;
178
182
  targetStart?: Node | null;
179
183
  placeholder?: Node;
180
184
  mountContainer?: ParentNode | null;
181
185
  mountAnchor?: Node | null;
182
- constructor(props: LooseRawProps, slots: LooseRawSlots);
186
+ private mountToTargetJob?;
187
+ constructor(props: LooseRawProps, slots?: LooseRawSlots | null);
183
188
  get parent(): ParentNode | null;
184
189
  private initChildren;
190
+ private ensureChildrenInitialized;
185
191
  private registerUpdateCssVars;
192
+ private bindChildren;
186
193
  private handleChildrenUpdate;
187
194
  private mount;
188
195
  private mountToTarget;
189
196
  private handlePropsUpdate;
190
197
  insert: (container: ParentNode, anchor: Node | null) => void;
191
198
  remove: (parent?: ParentNode | undefined) => void;
199
+ private hydrateTargetAnchors;
192
200
  private hydrateDisabledTeleport;
193
201
  private mountChildren;
194
202
  hydrate: () => void;
@@ -277,7 +285,7 @@ export declare class VaporComponentInstance<Props extends Record<string, any> =
277
285
  renderEffects?: RenderEffect[];
278
286
  hasFallthrough: boolean;
279
287
  shapeFlag?: number;
280
- key?: any;
288
+ $key?: any;
281
289
  oncePropsCache?: Record<string | symbol, any>;
282
290
  isMounted: boolean;
283
291
  isUnmounted: boolean;
@@ -411,17 +419,10 @@ export declare function template(html: string, root?: boolean, ns?: Namespace):
411
419
  //#endregion
412
420
  //#region temp/packages/runtime-vapor/src/dom/node.d.ts
413
421
  export declare function createTextNode(value?: string): Text;
414
- declare const _txt: typeof _child;
415
- declare function _child(node: InsertionParent): Node;
416
- declare function _nthChild(node: InsertionParent, i: number): Node;
417
- declare function _next(node: Node): Node;
418
- type DelegatedFunction<T extends (...args: any[]) => any> = T & {
419
- impl: T;
420
- };
421
- export declare const txt: DelegatedFunction<typeof _txt>;
422
- export declare const child: DelegatedFunction<typeof _child>;
423
- export declare const next: DelegatedFunction<typeof _next>;
424
- export declare const nthChild: DelegatedFunction<typeof _nthChild>;
422
+ export declare function txt(node: ParentNode): Node;
423
+ export declare function child(node: InsertionParent, logicalIndex?: number): Node;
424
+ export declare function nthChild(node: InsertionParent, i: number): Node;
425
+ export declare function next(node: Node, logicalIndex?: number): Node;
425
426
  //#endregion
426
427
  //#region temp/packages/runtime-vapor/src/dom/prop.d.ts
427
428
  type TargetElement = Element & {
@@ -471,7 +472,7 @@ export declare function setDynamicEvents(el: HTMLElement, events: Record<string,
471
472
  export declare function createInvoker(handler: (...args: any[]) => any): (...args: any[]) => any;
472
473
  //#endregion
473
474
  //#region temp/packages/runtime-vapor/src/apiCreateIf.d.ts
474
- export declare function createIf(condition: () => any, b1: BlockFn, b2?: BlockFn, once?: boolean, index?: number): Block;
475
+ export declare function createIf(condition: () => any, b1: BlockFn, b2?: BlockFn, blockShape?: number, once?: boolean, index?: number): Block;
475
476
  //#endregion
476
477
  //#region temp/packages/runtime-vapor/src/apiCreateFragment.d.ts
477
478
  /**
@@ -498,6 +499,11 @@ export declare function getDefaultValue(val: any, defaultVal: any): any;
498
499
  //#region temp/packages/runtime-vapor/src/helpers/useCssVars.d.ts
499
500
  export declare function useVaporCssVars(getter: () => Record<string, string>): void;
500
501
  //#endregion
502
+ //#region temp/packages/runtime-vapor/src/helpers/setKey.d.ts
503
+ export declare function setBlockKey(block: (Block & {
504
+ $key?: any;
505
+ }) | null | undefined, key: any): void;
506
+ //#endregion
501
507
  //#region temp/packages/runtime-vapor/src/apiCreateDynamicComponent.d.ts
502
508
  export declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: RawSlots | null, isSingleRoot?: boolean, once?: boolean): VaporFragment;
503
509
  //#endregion