@vue/runtime-vapor 3.6.0-alpha.7 → 3.6.0-beta.2
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 +18 -6
- package/dist/runtime-vapor.esm-bundler.js +601 -452
- package/package.json +4 -4
package/dist/runtime-vapor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VNode, GenericComponentInstance, TransitionHooks, TransitionState, TransitionProps, Plugin, SchedulerJob, EmitsOptions, ComponentObjectPropsOptions, ExtractPropTypes, ReservedProps, AllowedComponentProps, ComponentCustomProps, EmitsToProps, ExtractDefaultPropTypes, EmitFn, ComponentTypeEmits, TypeEmitsToOptions, GenericAppContext, EffectScope as EffectScope$1, ShallowUnwrapRef, SuspenseBoundary, LifecycleHook, NormalizedPropsOptions, ObjectEmitsOptions, ComponentInternalOptions, AsyncComponentInternalOptions, ComponentPropsOptions, CreateAppFunction, AsyncComponentLoader, AsyncComponentOptions, DirectiveModifiers, CustomElementOptions, VueElementBase } from '@vue/runtime-dom';
|
|
2
|
-
import { Ref, EffectScope, ReactiveEffect,
|
|
2
|
+
import { Ref, EffectScope, ReactiveEffect, ShallowRef } from '@vue/reactivity';
|
|
3
3
|
import { Prettify, IsKeyValues, Namespace, NormalizedStyle } from '@vue/shared';
|
|
4
4
|
|
|
5
5
|
type NodeRef = string | Ref | ((ref: Element | VaporComponentInstance, refs: Record<string, any>) => void);
|
|
@@ -29,6 +29,10 @@ declare class DynamicFragment extends VaporFragment {
|
|
|
29
29
|
anchor: Node;
|
|
30
30
|
scope: EffectScope | undefined;
|
|
31
31
|
current?: BlockFn;
|
|
32
|
+
pending?: {
|
|
33
|
+
render?: BlockFn;
|
|
34
|
+
key: any;
|
|
35
|
+
};
|
|
32
36
|
fallback?: BlockFn;
|
|
33
37
|
anchorLabel?: string;
|
|
34
38
|
attrs?: Record<string, any>;
|
|
@@ -93,9 +97,7 @@ type DynamicSlot = {
|
|
|
93
97
|
name: string;
|
|
94
98
|
fn: VaporSlot;
|
|
95
99
|
};
|
|
96
|
-
type DynamicSlotFn = (
|
|
97
|
-
_cache?: ComputedRef<DynamicSlot | DynamicSlot[]>;
|
|
98
|
-
};
|
|
100
|
+
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
99
101
|
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
100
102
|
/**
|
|
101
103
|
* Wrap a slot function to track the slot owner.
|
|
@@ -145,7 +147,7 @@ type VaporComponentInstanceConstructor<T extends VaporComponentInstance> = {
|
|
|
145
147
|
__isFragment?: never;
|
|
146
148
|
__isTeleport?: never;
|
|
147
149
|
__isSuspense?: never;
|
|
148
|
-
new (
|
|
150
|
+
new (...args: any[]): T;
|
|
149
151
|
};
|
|
150
152
|
export type DefineVaporComponent<RuntimePropsOptions = {}, RuntimePropsKeys extends string = string, 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, InferredProps = string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
|
|
151
153
|
[key in RuntimePropsKeys]?: any;
|
|
@@ -265,6 +267,7 @@ export declare class VaporComponentInstance<Props extends Record<string, any> =
|
|
|
265
267
|
renderEffects?: RenderEffect[];
|
|
266
268
|
hasFallthrough: boolean;
|
|
267
269
|
shapeFlag?: number;
|
|
270
|
+
oncePropsCache?: Record<string | symbol, any>;
|
|
268
271
|
isMounted: boolean;
|
|
269
272
|
isUnmounted: boolean;
|
|
270
273
|
isDeactivated: boolean;
|
|
@@ -393,7 +396,6 @@ export declare function setInsertionState(parent: ParentNode & {
|
|
|
393
396
|
$fc?: Node | null;
|
|
394
397
|
}, anchor?: Node | 0 | null | number, last?: boolean): void;
|
|
395
398
|
|
|
396
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
397
399
|
export declare function template(html: string, root?: boolean, ns?: Namespace): () => Node & {
|
|
398
400
|
$root?: true;
|
|
399
401
|
};
|
|
@@ -458,6 +460,16 @@ export declare function createInvoker(handler: (...args: any[]) => any): (...arg
|
|
|
458
460
|
|
|
459
461
|
export declare function createIf(condition: () => any, b1: BlockFn, b2?: BlockFn, once?: boolean): Block;
|
|
460
462
|
|
|
463
|
+
/**
|
|
464
|
+
* Create a dynamic fragment keyed by a reactive value for Vapor transitions.
|
|
465
|
+
* The fragment is re-rendered when the key changes to trigger enter/leave
|
|
466
|
+
* animations.
|
|
467
|
+
*
|
|
468
|
+
* Example:
|
|
469
|
+
* <VaporTransition>
|
|
470
|
+
* <h1 :key="count">{{ count }}</h1>
|
|
471
|
+
* </VaporTransition>
|
|
472
|
+
*/
|
|
461
473
|
export declare function createKeyedFragment(key: () => any, render: BlockFn): Block;
|
|
462
474
|
|
|
463
475
|
type Source = any[] | Record<any, any> | number | Set<any> | Map<any, any>;
|