@vue/runtime-vapor 3.6.0-alpha.5 → 3.6.0-alpha.6

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.
@@ -1,4 +1,4 @@
1
- import { VNode, TransitionHooks, TransitionState, TransitionProps, Plugin, SchedulerJob, GenericComponentInstance, GenericAppContext, EffectScope as EffectScope$1, EmitFn, SuspenseBoundary, LifecycleHook, NormalizedPropsOptions, ObjectEmitsOptions, ComponentInternalOptions, AsyncComponentInternalOptions, ComponentPropsOptions, EmitsOptions, CreateAppFunction, AsyncComponentLoader, AsyncComponentOptions, DirectiveModifiers, VueElementBase, CustomElementOptions } from '@vue/runtime-dom';
1
+ import { VNode, GenericComponentInstance, TransitionHooks, TransitionState, TransitionProps, Plugin, SchedulerJob, GenericAppContext, EffectScope as EffectScope$1, EmitFn, SuspenseBoundary, LifecycleHook, NormalizedPropsOptions, ObjectEmitsOptions, ComponentInternalOptions, AsyncComponentInternalOptions, ComponentPropsOptions, EmitsOptions, CreateAppFunction, AsyncComponentLoader, AsyncComponentOptions, DirectiveModifiers, VueElementBase, CustomElementOptions } from '@vue/runtime-dom';
2
2
  import { Ref, EffectScope, ReactiveEffect, ShallowRef } from '@vue/reactivity';
3
3
  import { Namespace, NormalizedStyle } from '@vue/shared';
4
4
 
@@ -13,6 +13,7 @@ export declare class VaporFragment<T extends Block = Block> implements Transitio
13
13
  nodes: T;
14
14
  vnode?: VNode | null;
15
15
  anchor?: Node;
16
+ parentComponent?: GenericComponentInstance | null;
16
17
  fallback?: BlockFn;
17
18
  insert?: (parent: ParentNode, anchor: Node | null, transitionHooks?: TransitionHooks) => void;
18
19
  remove?: (parent?: ParentNode, transitionHooks?: TransitionHooks) => void;
@@ -30,6 +31,8 @@ declare class DynamicFragment extends VaporFragment {
30
31
  current?: BlockFn;
31
32
  fallback?: BlockFn;
32
33
  anchorLabel?: string;
34
+ attrs?: Record<string, any>;
35
+ setAsyncRef?: (instance: VaporComponentInstance) => void;
33
36
  getScope?: (key: any) => EffectScope | undefined;
34
37
  beforeTeardown?: ((oldKey: any, nodes: Block, scope: EffectScope) => boolean)[];
35
38
  beforeMount?: ((newKey: any, nodes: Block, scope: EffectScope) => void)[];
@@ -45,7 +48,6 @@ interface VaporTransitionHooks extends TransitionHooks {
45
48
  props: TransitionProps;
46
49
  instance: VaporComponentInstance;
47
50
  disabled?: boolean;
48
- group?: boolean;
49
51
  }
50
52
  interface TransitionOptions {
51
53
  $key?: any;
@@ -93,12 +95,14 @@ type DynamicSlot = {
93
95
  type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
94
96
  type DynamicSlotSource = StaticSlots | DynamicSlotFn;
95
97
  /**
96
- * Wrap a slot function to memoize currentInstance
97
- * 1. ensure correct currentInstance in forwarded slots
98
- * 2. elements created in the slot inherit the slot owner's scopeId
98
+ * Wrap a slot function to track the slot owner.
99
+ *
100
+ * This ensures:
101
+ * 1. createSlot gets rawSlots from the correct component (slot owner)
102
+ * 2. Elements inherit the slot owner's scopeId
99
103
  */
100
104
  export declare function withVaporCtx(fn: Function): BlockFn;
101
- export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean): Block;
105
+ export declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block;
102
106
 
103
107
  export declare const VaporTeleportImpl: {
104
108
  name: string;
@@ -118,16 +122,17 @@ declare class TeleportFragment extends VaporFragment {
118
122
  placeholder?: Node;
119
123
  mountContainer?: ParentNode | null;
120
124
  mountAnchor?: Node | null;
121
- parentComponent: GenericComponentInstance;
122
125
  constructor(props: LooseRawProps, slots: LooseRawSlots);
123
126
  get parent(): ParentNode | null;
124
127
  private initChildren;
125
128
  private handleChildrenUpdate;
129
+ private mount;
130
+ private mountToTarget;
126
131
  private handlePropsUpdate;
127
132
  insert: (container: ParentNode, anchor: Node | null) => void;
128
133
  remove: (parent?: ParentNode | undefined) => void;
129
134
  private hydrateDisabledTeleport;
130
- private mount;
135
+ private mountChildren;
131
136
  hydrate: () => void;
132
137
  }
133
138
 
@@ -195,6 +200,9 @@ declare class VaporComponentInstance implements GenericComponentInstance {
195
200
  provides: Record<string, any>;
196
201
  ids: [string, number, number];
197
202
  suspense: SuspenseBoundary | null;
203
+ suspenseId: number;
204
+ asyncDep: Promise<any> | null;
205
+ asyncResolved: boolean;
198
206
  renderEffects?: RenderEffect[];
199
207
  hasFallthrough: boolean;
200
208
  shapeFlag?: number;
@@ -224,7 +232,13 @@ declare class VaporComponentInstance implements GenericComponentInstance {
224
232
  propsOptions?: NormalizedPropsOptions;
225
233
  emitsOptions?: ObjectEmitsOptions | null;
226
234
  isSingleRoot?: boolean;
227
- constructor(comp: VaporComponent, rawProps?: RawProps | null, rawSlots?: RawSlots | null, appContext?: GenericAppContext, once?: boolean, parent?: GenericComponentInstance | null);
235
+ /**
236
+ * dev only flag to track whether $attrs was used during render.
237
+ * If $attrs was used during render then the warning for failed attrs
238
+ * fallthrough can be suppressed.
239
+ */
240
+ accessedAttrs: boolean;
241
+ constructor(comp: VaporComponent, rawProps?: RawProps | null, rawSlots?: RawSlots | null, appContext?: GenericAppContext, once?: boolean);
228
242
  /**
229
243
  * Expose `getKeysFromRawProps` on the instance so it can be used in code
230
244
  * paths where it's needed, e.g. `useModel`
@@ -353,7 +367,7 @@ export declare function setBlockHtml(block: Block & {
353
367
  }, value: any): void;
354
368
  export declare function setDynamicProps(el: any, args: any[], isSVG?: boolean): void;
355
369
 
356
- export declare function on(el: Element, event: string, handler: (e: Event) => any, options?: AddEventListenerOptions & {
370
+ export declare function on(el: Element, event: string, handler: (e: Event) => any | ((e: Event) => any)[], options?: AddEventListenerOptions & {
357
371
  effect?: boolean;
358
372
  }): void;
359
373
  export declare function delegate(el: any, event: string, handler: (e: Event) => any): void;