@cabloy/vue-runtime-core 3.4.34 → 3.4.36
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/README.md +1 -1
- package/dist/runtime-core.cjs.js +2308 -2265
- package/dist/runtime-core.cjs.prod.js +2047 -2024
- package/dist/runtime-core.d.ts +23 -13
- package/dist/runtime-core.esm-bundler.js +2312 -2268
- package/package.json +3 -3
package/dist/runtime-core.d.ts
CHANGED
|
@@ -47,9 +47,8 @@ interface SchedulerJob extends Function {
|
|
|
47
47
|
/**
|
|
48
48
|
* Attached by renderer.ts when setting up a component's render effect
|
|
49
49
|
* Used to obtain component information when reporting max recursive updates.
|
|
50
|
-
* dev only.
|
|
51
50
|
*/
|
|
52
|
-
|
|
51
|
+
i?: ComponentInternalInstance;
|
|
53
52
|
}
|
|
54
53
|
type SchedulerJobs = SchedulerJob | SchedulerJob[];
|
|
55
54
|
export declare function nextTick<T = void, R = void>(this: T, fn?: (this: T) => R): Promise<Awaited<R>>;
|
|
@@ -280,7 +279,7 @@ export interface HydrationRenderer extends Renderer<Element | ShadowRoot> {
|
|
|
280
279
|
export type ElementNamespace = 'svg' | 'mathml' | undefined;
|
|
281
280
|
export type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, namespace?: ElementNamespace) => void;
|
|
282
281
|
export interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> {
|
|
283
|
-
patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace,
|
|
282
|
+
patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace, parentComponent?: ComponentInternalInstance | null): void;
|
|
284
283
|
insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void;
|
|
285
284
|
remove(el: HostNode): void;
|
|
286
285
|
createElement(type: string, namespace?: ElementNamespace, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & {
|
|
@@ -298,7 +297,7 @@ export interface RendererOptions<HostNode = RendererNode, HostElement = Renderer
|
|
|
298
297
|
insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, namespace: ElementNamespace, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode];
|
|
299
298
|
}
|
|
300
299
|
export interface RendererNode {
|
|
301
|
-
[key: string]: any;
|
|
300
|
+
[key: string | symbol]: any;
|
|
302
301
|
}
|
|
303
302
|
export interface RendererElement extends RendererNode {
|
|
304
303
|
}
|
|
@@ -323,7 +322,6 @@ type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode |
|
|
|
323
322
|
type NextFn = (vnode: VNode) => RendererNode | null;
|
|
324
323
|
type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void;
|
|
325
324
|
type RemoveFn = (vnode: VNode) => void;
|
|
326
|
-
type UnmountChildrenFn = (children: VNode[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean, start?: number) => void;
|
|
327
325
|
type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void;
|
|
328
326
|
type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void;
|
|
329
327
|
declare enum MoveType {
|
|
@@ -509,7 +507,7 @@ export interface ObjectDirective<T = any, V = any> {
|
|
|
509
507
|
export type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
|
|
510
508
|
export type Directive<T = any, V = any> = ObjectDirective<T, V> | FunctionDirective<T, V>;
|
|
511
509
|
type DirectiveModifiers = Record<string, boolean>;
|
|
512
|
-
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string, DirectiveModifiers]>;
|
|
510
|
+
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>;
|
|
513
511
|
/**
|
|
514
512
|
* Adds directives to a VNode.
|
|
515
513
|
*/
|
|
@@ -848,7 +846,7 @@ declare enum TeleportMoveTypes {
|
|
|
848
846
|
REORDER = 2
|
|
849
847
|
}
|
|
850
848
|
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void;
|
|
851
|
-
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
849
|
+
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
852
850
|
export declare const Teleport: {
|
|
853
851
|
new (): {
|
|
854
852
|
$props: VNodeProps & TeleportProps;
|
|
@@ -885,9 +883,21 @@ export declare const Static: unique symbol;
|
|
|
885
883
|
export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl;
|
|
886
884
|
export type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void);
|
|
887
885
|
type VNodeNormalizedRefAtom = {
|
|
886
|
+
/**
|
|
887
|
+
* component instance
|
|
888
|
+
*/
|
|
888
889
|
i: ComponentInternalInstance;
|
|
890
|
+
/**
|
|
891
|
+
* Actual ref
|
|
892
|
+
*/
|
|
889
893
|
r: VNodeRef;
|
|
894
|
+
/**
|
|
895
|
+
* setup ref key
|
|
896
|
+
*/
|
|
890
897
|
k?: string;
|
|
898
|
+
/**
|
|
899
|
+
* refInFor marker
|
|
900
|
+
*/
|
|
891
901
|
f?: boolean;
|
|
892
902
|
};
|
|
893
903
|
type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[];
|
|
@@ -928,6 +938,7 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
|
|
|
928
938
|
el: HostNode | null;
|
|
929
939
|
anchor: HostNode | null;
|
|
930
940
|
target: HostElement | null;
|
|
941
|
+
targetStart: HostNode | null;
|
|
931
942
|
targetAnchor: HostNode | null;
|
|
932
943
|
suspense: SuspenseBoundary | null;
|
|
933
944
|
shapeFlag: number;
|
|
@@ -1122,8 +1133,6 @@ export interface ComponentInternalInstance {
|
|
|
1122
1133
|
slots: InternalSlots;
|
|
1123
1134
|
refs: Data;
|
|
1124
1135
|
emit: EmitFn;
|
|
1125
|
-
attrsProxy: Data | null;
|
|
1126
|
-
slotsProxy: Slots | null;
|
|
1127
1136
|
isMounted: boolean;
|
|
1128
1137
|
isUnmounted: boolean;
|
|
1129
1138
|
isDeactivated: boolean;
|
|
@@ -1348,7 +1357,7 @@ type InferDefaults<T> = {
|
|
|
1348
1357
|
type NativeType = null | number | string | boolean | symbol | Function;
|
|
1349
1358
|
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
1350
1359
|
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Readonly<MappedOmit<T, keyof Defaults>> & {
|
|
1351
|
-
readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never;
|
|
1360
|
+
readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never;
|
|
1352
1361
|
} & {
|
|
1353
1362
|
readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;
|
|
1354
1363
|
};
|
|
@@ -1438,12 +1447,13 @@ export declare enum ErrorCodes {
|
|
|
1438
1447
|
APP_WARN_HANDLER = 11,
|
|
1439
1448
|
FUNCTION_REF = 12,
|
|
1440
1449
|
ASYNC_COMPONENT_LOADER = 13,
|
|
1441
|
-
SCHEDULER = 14
|
|
1450
|
+
SCHEDULER = 14,
|
|
1451
|
+
COMPONENT_UPDATE = 15
|
|
1442
1452
|
}
|
|
1443
1453
|
type ErrorTypes = LifecycleHooks | ErrorCodes;
|
|
1444
|
-
export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;
|
|
1454
|
+
export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, args?: unknown[]): any;
|
|
1445
1455
|
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;
|
|
1446
|
-
export declare function handleError(err: unknown, instance: ComponentInternalInstance | null, type: ErrorTypes, throwInDev?: boolean): void;
|
|
1456
|
+
export declare function handleError(err: unknown, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, throwInDev?: boolean): void;
|
|
1447
1457
|
|
|
1448
1458
|
export declare function initCustomFormatter(): void;
|
|
1449
1459
|
|