@vue/runtime-vapor 3.6.0-beta.13 → 3.6.0-beta.14

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.
@@ -27,6 +27,7 @@ export declare class VaporFragment<T extends Block = Block> implements Transitio
27
27
  anchor?: Node;
28
28
  parentComponent?: GenericComponentInstance | null;
29
29
  validityPending?: boolean;
30
+ isBlockValid?: () => boolean;
30
31
  insert?: (parent: ParentNode, anchor: Node | null, transitionHooks?: TransitionHooks) => void;
31
32
  remove?: (parent?: ParentNode, transitionHooks?: TransitionHooks) => void;
32
33
  hydrate?(...args: any[]): void;
@@ -44,7 +45,7 @@ export declare class VaporFragment<T extends Block = Block> implements Transitio
44
45
  }
45
46
  declare class ForFragment extends VaporFragment<Block[]> {
46
47
  resetListeners?: (() => void)[];
47
- constructor(nodes: Block[]);
48
+ constructor(nodes: Block[], trackSlotBoundary: boolean);
48
49
  onReset(fn: () => void): void;
49
50
  }
50
51
  export declare class DynamicFragment extends VaporFragment {
@@ -58,12 +59,13 @@ export declare class DynamicFragment extends VaporFragment {
58
59
  };
59
60
  anchorLabel?: string;
60
61
  keyed?: boolean;
62
+ isSlot?: boolean;
61
63
  inTransition?: boolean;
62
64
  hasFallthroughAttrs?: true;
63
65
  constructor(anchorLabel?: string, keyed?: boolean, locate?: boolean, trackSlotBoundary?: boolean);
64
- update(render?: BlockFn, key?: any, noScope?: boolean): void;
65
- renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, key: any, noScope?: boolean): void;
66
- hydrate(isEmpty?: boolean, isSlot?: boolean): void;
66
+ update(render?: BlockFn, key?: any, noScope?: boolean, shouldInsert?: boolean): void;
67
+ renderBranch(render: BlockFn | undefined, transition: VaporTransitionHooks | undefined, parent: ParentNode | null, key: any, noScope?: boolean, notifyUpdated?: boolean): void;
68
+ hydrate(isEmpty?: boolean): void;
67
69
  }
68
70
  interface SlotBoundaryContext {
69
71
  parent: SlotBoundaryContext | null;
@@ -121,6 +123,9 @@ export declare function renderEffect(fn: () => void, noLifecycle?: boolean): voi
121
123
  type RawSlots = Record<string, VaporSlot> & {
122
124
  $?: DynamicSlotSource[];
123
125
  };
126
+ type LooseRawSlots = VaporSlot | (Record<string, VaporSlot | DynamicSlotSource[]> & {
127
+ $?: DynamicSlotSource[];
128
+ });
124
129
  type StaticSlots = Record<string, VaporSlot>;
125
130
  export type VaporSlot = BlockFn;
126
131
  type DynamicSlot = {
@@ -129,14 +134,6 @@ type DynamicSlot = {
129
134
  };
130
135
  type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
131
136
  type DynamicSlotSource = StaticSlots | DynamicSlotFn;
132
- /**
133
- * Wrap a slot function to track the slot owner.
134
- *
135
- * This ensures:
136
- * 1. createSlot gets rawSlots from the correct instance (slot owner)
137
- * 2. elements inherit the slot owner's scopeId
138
- */
139
- export declare function withVaporCtx(fn: Function): BlockFn;
140
137
  export declare function createSlot(name?: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, flags?: number): Block;
141
138
  //#endregion
142
139
  //#region temp/packages/runtime-vapor/src/apiDefineComponent.d.ts
@@ -182,45 +179,6 @@ export declare function defineVaporComponent<TypeProps, RuntimePropsOptions exte
182
179
  __typeEl?: TypeBlock;
183
180
  } & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, InferredProps, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false>;
184
181
  //#endregion
185
- //#region temp/packages/runtime-vapor/src/components/Teleport.d.ts
186
- declare class TeleportFragment extends VaporFragment {
187
- anchor?: Node;
188
- private rawProps?;
189
- private resolvedProps?;
190
- private rawSlots?;
191
- isDisabled?: boolean;
192
- private isMounted;
193
- private childrenInitialized;
194
- private readonly ownerInstance;
195
- private readonly childrenScope;
196
- target?: ParentNode | null;
197
- targetAnchor?: Node | null;
198
- targetStart?: Node | null;
199
- placeholder?: Node;
200
- mountContainer?: ParentNode | null;
201
- mountAnchor?: Node | null;
202
- private mountToTargetJob?;
203
- constructor(props: LooseRawProps, slots?: RawSlots | null);
204
- get parent(): ParentNode | null;
205
- private initChildren;
206
- private ensureChildrenInitialized;
207
- private registerUpdateCssVars;
208
- private bindChildren;
209
- private handleChildrenUpdate;
210
- private mount;
211
- private mountToTarget;
212
- private clearMainViewChildren;
213
- private handlePropsUpdate;
214
- insert: (container: ParentNode, anchor: Node | null) => void;
215
- dispose: () => void;
216
- remove: (_parent?: ParentNode) => void;
217
- private hydrateTargetAnchors;
218
- private hydrateDisabledTeleport;
219
- private mountChildren;
220
- hydrate: () => void;
221
- }
222
- export declare const VaporTeleport: DefineVaporSetupFnComponent<TeleportProps>;
223
- //#endregion
224
182
  //#region temp/packages/runtime-vapor/src/component.d.ts
225
183
  export type VaporComponent = FunctionalVaporComponent<any> | VaporComponentOptions | DefineVaporComponent;
226
184
  export type FunctionalVaporComponent<Props = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>> = ((props: Props & EmitsToProps<Emits>, ctx: {
@@ -266,10 +224,7 @@ interface SharedInternalOptions {
266
224
  type LooseRawProps = Record<string, unknown> & {
267
225
  $?: DynamicPropsSource[];
268
226
  };
269
- type LooseRawSlots = VaporSlot | (Record<string, VaporSlot | DynamicSlotSource[]> & {
270
- $?: DynamicSlotSource[];
271
- });
272
- export declare function createComponent(component: VaporComponent, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean, appContext?: GenericAppContext, managedMount?: boolean): VaporComponentInstance;
227
+ export declare function createComponent(component: VaporComponent, rawProps?: LooseRawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean, appContext?: GenericAppContext, managedMount?: boolean, ce?: (instance: VaporComponentInstance) => void): VaporComponentInstance;
273
228
  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 {
274
229
  vapor: true;
275
230
  uid: number;
@@ -302,7 +257,6 @@ export declare class VaporComponentInstance<Props extends Record<string, any> =
302
257
  asyncResolved: boolean;
303
258
  restoreAsyncContext?: () => void | (() => void);
304
259
  deferredHydrationBoundary?: () => void;
305
- renderEffects?: RenderEffect[];
306
260
  hasFallthrough: boolean;
307
261
  shapeFlag?: number;
308
262
  $key?: any;
@@ -330,10 +284,10 @@ export declare class VaporComponentInstance<Props extends Record<string, any> =
330
284
  devtoolsRawSetupState?: any;
331
285
  hmrRerender?: () => void;
332
286
  hmrReload?: (newComp: VaporComponent) => void;
333
- parentTeleport?: TeleportFragment | null;
334
287
  propsOptions?: NormalizedPropsOptions;
335
288
  emitsOptions?: ObjectEmitsOptions | null;
336
289
  isSingleRoot?: boolean;
290
+ renderEffects?: RenderEffect[];
337
291
  /**
338
292
  * dev only flag to track whether $attrs was used during render.
339
293
  * If $attrs was used during render then the warning for failed attrs
@@ -344,7 +298,7 @@ export declare class VaporComponentInstance<Props extends Record<string, any> =
344
298
  * @deprecated only used for JSX to detect props types.
345
299
  */
346
300
  $props: Props;
347
- constructor(comp: VaporComponent, rawProps?: RawProps | null, rawSlots?: LooseRawSlots | null, appContext?: GenericAppContext, once?: boolean);
301
+ constructor(comp: VaporComponent, rawProps?: RawProps | null, rawSlots?: LooseRawSlots | null, appContext?: GenericAppContext, once?: boolean, ce?: (instance: VaporComponentInstance) => void);
348
302
  /**
349
303
  * Expose `getKeysFromRawProps` on the instance so it can be used in code
350
304
  * paths where it's needed, e.g. `useModel`
@@ -381,6 +335,9 @@ export type VaporDirective = (node: Element | VaporComponentInstance, value?: ()
381
335
  type VaporDirectiveArguments = Array<[VaporDirective | undefined] | [VaporDirective | undefined, () => any] | [VaporDirective | undefined, (() => any) | undefined, argument: string] | [VaporDirective | undefined, value: (() => any) | undefined, argument: string | undefined, modifiers: DirectiveModifiers]>;
382
336
  export declare function withVaporDirectives(node: Element | VaporComponentInstance, dirs: VaporDirectiveArguments): void;
383
337
  //#endregion
338
+ //#region temp/packages/runtime-vapor/src/components/Teleport.d.ts
339
+ export declare const VaporTeleport: DefineVaporSetupFnComponent<TeleportProps>;
340
+ //#endregion
384
341
  //#region temp/packages/runtime-vapor/src/components/KeepAlive.d.ts
385
342
  export declare const VaporKeepAlive: DefineVaporComponent<{}, string, KeepAliveProps>;
386
343
  //#endregion
@@ -556,7 +513,7 @@ interface ForSelector {
556
513
  export declare function createSelector(source: () => any): ForSelector;
557
514
  export declare function createForSlots(rawSource: Source, getSlot: (item: any, key: any, index?: number) => DynamicSlot): DynamicSlot[];
558
515
  export declare function getRestElement(val: any, keys: string[]): any;
559
- export declare function getDefaultValue(val: any, defaultVal: any): any;
516
+ export declare function getDefaultValue(val: any, getDefaultVal: () => any): any;
560
517
  //#endregion
561
518
  //#region temp/packages/runtime-vapor/src/helpers/useCssVars.d.ts
562
519
  export declare function useVaporCssVars(getter: () => Record<string, string>): void;
@@ -567,7 +524,7 @@ export declare function setBlockKey(block: (Block & {
567
524
  }) | null | undefined, key: any): void;
568
525
  //#endregion
569
526
  //#region temp/packages/runtime-vapor/src/apiCreateDynamicComponent.d.ts
570
- export declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: LooseRawSlots | null, isSingleRoot?: boolean, once?: boolean): VaporFragment;
527
+ export declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: LooseRawSlots | null, flags?: number): VaporFragment;
571
528
  //#endregion
572
529
  //#region temp/packages/runtime-vapor/src/apiSetupHelpers.d.ts
573
530
  export declare function withAsyncContext(getAwaitable: () => any): [any, () => void];