Socket
Socket
Sign inDemoInstall

@vue/runtime-core

Package Overview
Dependencies
Maintainers
1
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/runtime-core - npm Package Compare versions

Comparing version 3.0.0-alpha.4 to 3.0.0-alpha.5

248

dist/runtime-core.d.ts
import { ComputedGetter } from '@vue/reactivity';
import { ComputedRef } from '@vue/reactivity';
import { DebuggerEvent } from '@vue/reactivity';
import { effect } from '@vue/reactivity';
import { isReactive } from '@vue/reactivity';

@@ -16,2 +15,3 @@ import { isReadonly } from '@vue/reactivity';

import { ref } from '@vue/reactivity';
import { shallowReactive } from '@vue/reactivity';
import { toRaw } from '@vue/reactivity';

@@ -33,3 +33,3 @@ import { toRefs } from '@vue/reactivity';

directive(name: string, directive: Directive): this;
mount(rootContainer: HostElement | string): ComponentPublicInstance;
mount(rootContainer: HostElement | string, isHydrate?: boolean): ComponentPublicInstance;
unmount(rootContainer: HostElement | string): void;

@@ -40,2 +40,3 @@ provide<T>(key: InjectionKey<T> | string, value: T): this;

_container: HostElement | null;
_context: AppContext;
}

@@ -79,2 +80,8 @@

declare interface BaseWatchOptions {
flush?: 'pre' | 'post' | 'sync';
onTrack?: ReactiveEffectOptions['onTrack'];
onTrigger?: ReactiveEffectOptions['onTrigger'];
}
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any[];

@@ -86,4 +93,2 @@

export declare const capitalize: (s: string) => string;
export declare type CleanupRegistrator = (invalidate: () => void) => void;

@@ -120,3 +125,3 @@

accessCache: Data | null;
renderCache: (Function | VNode)[] | null;
renderCache: (Function | VNode)[];
components: Record<string, Component>;

@@ -128,2 +133,3 @@ directives: Record<string, Directive>;

attrs: Data;
vnodeHooks: Data;
slots: Slots;

@@ -172,6 +178,4 @@ proxy: ComponentPublicInstance | null;

render?: Function;
ssrRender?: Function;
components?: Record<string, Component | {
new (): ComponentPublicInstance<any, any, any, any, any>;
}>;
ssrRender?: (ctx: any, push: (item: any) => void, parentInstance: ComponentInternalInstance) => void;
components?: Record<string, PublicAPIComponent>;
directives?: Record<string, Directive>;

@@ -237,5 +241,3 @@ inheritAttrs?: boolean;

export declare type CreateAppFunction<HostElement> = (rootComponent: Component | {
new (): ComponentPublicInstance<any, any, any, any, any>;
}, rootProps?: Data | null) => App<HostElement>;
export declare type CreateAppFunction<HostElement> = (rootComponent: PublicAPIComponent, rootProps?: Data | null) => App<HostElement>;

@@ -248,5 +250,5 @@ export declare function createBlock(type: VNodeTypes, props?: {

export declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null): ComponentInternalInstance;
declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null): ComponentInternalInstance;
export declare const createHook: <T extends Function = () => any>(lifecycle: LifecycleHooks) => (hook: T, target?: ComponentInternalInstance | null) => false | void;
export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer;

@@ -270,9 +272,8 @@ declare function createRecord(id: string, comp: ComponentOptions): boolean;

*/
export declare function createRenderer<HostNode extends object = any, HostElement extends HostNode = any>(options: RendererOptions<HostNode, HostElement>): {
render: RootRenderFunction<HostNode, HostElement>;
createApp: CreateAppFunction<HostElement>;
};
export declare function createRenderer<HostNode extends object = any, HostElement extends HostNode = any>(options: RendererOptions<HostNode, HostElement>): Renderer<HostNode, HostElement>;
export declare function createSlots(slots: Record<string, Slot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[])[]): Record<string, Slot>;
export declare function createStaticVNode(content: string): VNode;
export declare function createTextVNode(text?: string, flag?: number): VNode;

@@ -287,3 +288,3 @@

export declare type DebuggerHook = (e: DebuggerEvent) => void;
declare type DebuggerHook = (e: DebuggerEvent) => void;

@@ -324,7 +325,6 @@ declare type DefaultFactory<T> = () => T | null | undefined;

declare type DirectiveModifiers = Record<string, boolean>;
export { effect }
declare type Emit = (event: string, ...args: unknown[]) => any[];
export declare type ErrorCapturedHook = (err: Error, instance: ComponentPublicInstance | null, info: string) => boolean | void;
declare type ErrorCapturedHook = (err: Error, instance: ComponentPublicInstance | null, info: string) => boolean | void;

@@ -385,9 +385,7 @@ declare const enum ErrorCodes {

export declare function h(type: typeof Fragment, children?: VNodeChildren): VNode;
export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode;
export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeChildren): VNode;
export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode;
export declare function h(type: typeof Portal, props: RawProps & {
target: any;
}, children: RawChildren): VNode;
export declare function h(type: typeof Portal, props: RawProps & PortalProps, children: RawChildren): VNode;

@@ -420,2 +418,6 @@ export declare function h(type: typeof Suspense, children?: RawChildren): VNode;

export declare interface HydrationRenderer extends Renderer<Node, Element> {
hydrate: RootHydrateFunction;
}
declare type InferPropType<T> = T extends null ? any : T extends {

@@ -433,10 +435,6 @@ type: null | true;

export declare function injectHook(type: LifecycleHooks, hook: Function & {
__weh?: Function;
}, target?: ComponentInternalInstance | null, prepend?: boolean): void;
export declare interface InjectionKey<T> extends Symbol {
}
export declare function instanceWatch(this: ComponentInternalInstance, source: string | Function, cb: Function, options?: WatchOptions): StopHandle;
declare function instanceWatch(this: ComponentInternalInstance, source: string | Function, cb: Function, options?: WatchOptions): StopHandle;

@@ -450,4 +448,6 @@ declare type InternalSlots = {

declare function isVNode(value: any): value is VNode;
export declare const KeepAlive: new () => {
$props: KeepAliveProps;
$props: VNodeProps & KeepAliveProps;
};

@@ -506,2 +506,6 @@

declare type MapOldSources<T, Immediate> = {
[K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? (V | undefined) : V : never;
};
declare type MapSources<T> = {

@@ -521,2 +525,9 @@ [K in keyof T]: T[K] extends WatchSource<infer V> ? V : never;

declare type MountChildrenFn<HostNode, HostElement> = (children: VNodeArrayChildren<HostNode, HostElement>, container: HostElement, anchor: HostNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, isSVG: boolean, optimized: boolean, start?: number) => void;
declare type MountComponentFn<HostNode, HostElement> = (initialVNode: VNode<HostNode, HostElement>, container: HostElement | null, // only null during hydration
anchor: HostNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, isSVG: boolean) => void;
declare type MoveFn<HostNode, HostElement> = (vnode: VNode<HostNode, HostElement>, container: HostElement, anchor: HostNode | null, type: MoveType, parentSuspense?: SuspenseBoundary<HostNode, HostElement> | null) => void;
declare const enum MoveType {

@@ -528,5 +539,7 @@ ENTER = 0,

declare type NextFn<HostNode, HostElement> = (vnode: VNode<HostNode, HostElement>) => HostNode | null;
export declare function nextTick(fn?: () => void): Promise<void>;
declare type NormalizedChildren<HostNode = any, HostElement = any> = string | VNodeChildren<HostNode, HostElement> | RawSlots | null;
declare function normalizeVNode<T, U>(child: VNodeChild<T, U>): VNode<T, U>;

@@ -568,16 +581,9 @@ export declare interface ObjectDirective<T = any> {

export declare const PatchFlags: {
TEXT: number;
CLASS: number;
STYLE: number;
PROPS: number;
NEED_PATCH: number;
FULL_PROPS: number;
STABLE_FRAGMENT: number;
KEYED_FRAGMENT: number;
UNKEYED_FRAGMENT: number;
DYNAMIC_SLOTS: number;
BAIL: number;
};
declare type PatchBlockChildrenFn<HostNode, HostElement> = (oldChildren: VNode<HostNode, HostElement>[], newChildren: VNode<HostNode, HostElement>[], fallbackContainer: HostElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, isSVG: boolean) => void;
declare type PatchChildrenFn<HostNode, HostElement> = (n1: VNode<HostNode, HostElement> | null, n2: VNode<HostNode, HostElement>, container: HostElement, anchor: HostNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, isSVG: boolean, optimized?: boolean) => void;
declare type PatchFn<HostNode, HostElement> = (n1: VNode<HostNode, HostElement> | null, // null means this is a mount
n2: VNode<HostNode, HostElement>, container: HostElement, anchor?: HostNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary<HostNode, HostElement> | null, isSVG?: boolean, optimized?: boolean) => void;
export declare type Plugin = PluginInstallFunction & {

@@ -595,5 +601,3 @@ install?: PluginInstallFunction;

new (): {
$props: VNodeProps & {
target: string | object;
};
$props: VNodeProps & PortalProps;
};

@@ -603,2 +607,13 @@ __isPortal: true;

declare const PortalImpl: {
__isPortal: boolean;
process(n1: VNode<any, any> | null, n2: VNode<any, any>, container: object, anchor: object | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<any, any, VNode<any, any>> | null, isSVG: boolean, optimized: boolean, { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, m: move, c: insertComment, o: { querySelector, setElementText } }: RendererInternals<any, any>): void;
};
export declare interface PortalProps {
target: string | object;
}
declare type ProcessTextOrCommentFn<HostNode, HostElement> = (n1: VNode<HostNode, HostElement> | null, n2: VNode<HostNode, HostElement>, container: HostElement, anchor: HostNode | null) => void;
export declare type Prop<T> = PropOptions<T> | PropType<T>;

@@ -623,5 +638,9 @@

declare type PublicAPIComponent = Component | {
new (): ComponentPublicInstance<any, any, any, any, any>;
};
export declare function pushScopeId(id: string): void;
declare type RawChildren = string | number | boolean | VNode | VNodeChildren | (() => any);
declare type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);

@@ -636,3 +655,3 @@ declare type RawProps = VNodeProps & {

$stable?: boolean;
_compiled?: boolean;
_?: 1;
};

@@ -643,4 +662,2 @@ export { reactive }

export { readonly }
export declare function recordEffect(effect: ReactiveEffect): void;
export { Ref }

@@ -653,13 +670,24 @@ export { ref }

declare function renderComponentRoot(instance: ComponentInternalInstance): VNode;
export declare interface Renderer<HostNode = any, HostElement = any> {
render: RootRenderFunction<HostNode, HostElement>;
createApp: CreateAppFunction<HostElement>;
}
declare interface RendererInternals<HostNode = any, HostElement = any> {
patch: (n1: VNode<HostNode, HostElement> | null, // null means this is a mount
n2: VNode<HostNode, HostElement>, container: HostElement, anchor?: HostNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary<HostNode, HostElement> | null, isSVG?: boolean, optimized?: boolean) => void;
unmount: (vnode: VNode<HostNode, HostElement>, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, doRemove?: boolean) => void;
move: (vnode: VNode<HostNode, HostElement>, container: HostElement, anchor: HostNode | null, type: MoveType, parentSuspense?: SuspenseBoundary<HostNode, HostElement> | null) => void;
next: (vnode: VNode<HostNode, HostElement>) => HostNode | null;
options: RendererOptions<HostNode, HostElement>;
p: PatchFn<HostNode, HostElement>;
um: UnmountFn<HostNode, HostElement>;
m: MoveFn<HostNode, HostElement>;
mt: MountComponentFn<HostNode, HostElement>;
mc: MountChildrenFn<HostNode, HostElement>;
pc: PatchChildrenFn<HostNode, HostElement>;
pbc: PatchBlockChildrenFn<HostNode, HostElement>;
n: NextFn<HostNode, HostElement>;
o: RendererOptions<HostNode, HostElement>;
c: ProcessTextOrCommentFn<HostNode, HostElement>;
}
export declare interface RendererOptions<HostNode = any, HostElement = any> {
patchProp(el: HostElement, key: string, value: any, oldValue: any, isSVG?: boolean, prevChildren?: VNode<HostNode, HostElement>[], parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary<HostNode, HostElement> | null, unmountChildren?: (children: VNode<HostNode, HostElement>[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null) => void): void;
patchProp(el: HostElement, key: string, value: any, oldValue: any, isSVG?: boolean, prevChildren?: VNode<HostNode, HostElement>[], parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary<HostNode, HostElement> | null, unmountChildren?: UnmountChildrenFn<HostNode, HostElement>): void;
insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void;

@@ -674,4 +702,6 @@ remove(el: HostNode): void;

nextSibling(node: HostNode): HostNode | null;
querySelector(selector: string): HostElement | null;
setScopeId(el: HostNode, id: string): void;
querySelector?(selector: string): HostElement | null;
setScopeId?(el: HostElement, id: string): void;
cloneNode?(node: HostNode): HostNode;
insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, isSVG: boolean): HostElement;
}

@@ -686,3 +716,3 @@

export declare function renderSlot(slots: Record<string, Slot>, name: string, props?: Data, fallback?: VNodeChildren): VNode;
export declare function renderSlot(slots: Record<string, Slot>, name: string, props?: Data, fallback?: VNodeArrayChildren): VNode;

@@ -707,9 +737,13 @@ declare type RequiredKeys<T, MakeDefaultRequired> = {

export declare type RootRenderFunction<HostNode, HostElement> = (vnode: VNode<HostNode, HostElement> | null, dom: HostElement) => void;
export declare type RootHydrateFunction = (vnode: VNode<Node, Element>, container: Element) => void;
export declare type RootRenderFunction<HostNode, HostElement> = (vnode: VNode<HostNode, HostElement> | null, container: HostElement) => void;
export declare function setBlockTracking(value: number): void;
declare function setCurrentRenderingInstance(instance: ComponentInternalInstance | null): void;
export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;
export declare function setupComponent(instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null): Promise<void> | undefined;
declare function setupComponent(instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null, isSSR?: boolean): Promise<void> | undefined;

@@ -722,2 +756,5 @@ export declare interface SetupContext {

declare type SetupRenderEffectFn<HostNode, HostElement> = (instance: ComponentInternalInstance, initialVNode: VNode<HostNode, HostElement>, container: HostElement | null, // only null during hydration
anchor: HostNode | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, isSVG: boolean) => void;
declare interface SFCInternalOptions {

@@ -729,29 +766,4 @@ __scopeId?: string;

}
export { shallowReactive }
export declare const ShapeFlags: {
ELEMENT: ShapeFlags_2;
FUNCTIONAL_COMPONENT: ShapeFlags_2;
STATEFUL_COMPONENT: ShapeFlags_2;
TEXT_CHILDREN: ShapeFlags_2;
ARRAY_CHILDREN: ShapeFlags_2;
SLOTS_CHILDREN: ShapeFlags_2;
SUSPENSE: ShapeFlags_2;
COMPONENT_SHOULD_KEEP_ALIVE: ShapeFlags_2;
COMPONENT_KEPT_ALIVE: ShapeFlags_2;
COMPONENT: ShapeFlags_2;
};
declare const enum ShapeFlags_2 {
ELEMENT = 1,
FUNCTIONAL_COMPONENT = 2,
STATEFUL_COMPONENT = 4,
TEXT_CHILDREN = 8,
ARRAY_CHILDREN = 16,
SLOTS_CHILDREN = 32,
SUSPENSE = 64,
COMPONENT_SHOULD_KEEP_ALIVE = 128,
COMPONENT_KEPT_ALIVE = 256,
COMPONENT = 6
}
export declare type Slot = (...args: any[]) => VNode[];

@@ -761,2 +773,15 @@

export declare const ssrContextKey: unique symbol;
export declare const ssrUtils: {
createComponentInstance: typeof createComponentInstance;
setupComponent: typeof setupComponent;
renderComponentRoot: typeof renderComponentRoot;
setCurrentRenderingInstance: typeof setCurrentRenderingInstance;
isVNode: typeof isVNode;
normalizeVNode: typeof normalizeVNode;
};
declare const Static: unique symbol;
export declare type StopHandle = () => void;

@@ -766,3 +791,3 @@

new (): {
$props: SuspenseProps;
$props: VNodeProps & SuspenseProps;
};

@@ -791,3 +816,3 @@ __isSuspense: true;

next(): HostNode | null;
registerDep(instance: ComponentInternalInstance, setupRenderEffect: (instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, initialVNode: VNode<HostNode, HostElement>, container: HostElement, anchor: HostNode | null, isSVG: boolean) => void): void;
registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn<HostNode, HostElement>): void;
unmount(parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, doRemove?: boolean): void;

@@ -832,6 +857,12 @@ }

export { TriggerOpTypes }
declare type UnmountChildrenFn<HostNode, HostElement> = (children: VNode<HostNode, HostElement>[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, doRemove?: boolean, start?: number) => void;
declare type UnmountFn<HostNode, HostElement> = (vnode: VNode<HostNode, HostElement>, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary<HostNode, HostElement> | null, doRemove?: boolean) => void;
export { UnwrapRef }
export declare function useCSSModule(name?: string): Record<string, string>;
export declare const useCSSModule: (name?: string) => Record<string, string>;
export declare const useSSRContext: <T = Record<string, any>>() => T | undefined;
export declare function useTransitionState(): TransitionState;

@@ -848,3 +879,3 @@

scopeId: string | null;
children: NormalizedChildren<HostNode, HostElement>;
children: VNodeNormalizedChildren<HostNode, HostElement>;
component: ComponentInternalInstance | null;

@@ -864,8 +895,10 @@ suspense: SuspenseBoundary<HostNode, HostElement> | null;

declare type VNodeChild<HostNode = any, HostElement = any> = VNodeChildAtom<HostNode, HostElement> | VNodeChildren<HostNode, HostElement>;
export declare interface VNodeArrayChildren<HostNode = any, HostElement = any> extends Array<VNodeArrayChildren<HostNode, HostElement> | VNodeChildAtom<HostNode, HostElement>> {
}
declare type VNodeChild<HostNode = any, HostElement = any> = VNodeChildAtom<HostNode, HostElement> | VNodeArrayChildren<HostNode, HostElement>;
declare type VNodeChildAtom<HostNode, HostElement> = VNode<HostNode, HostElement> | string | number | boolean | null | void;
declare interface VNodeChildren<HostNode = any, HostElement = any> extends Array<VNodeChildren<HostNode, HostElement> | VNodeChildAtom<HostNode, HostElement>> {
}
export declare type VNodeNormalizedChildren<HostNode = any, HostElement = any> = string | VNodeArrayChildren<HostNode, HostElement> | RawSlots | null;

@@ -884,15 +917,15 @@ export declare interface VNodeProps {

export declare type VNodeTypes = string | Component | typeof Fragment | typeof Portal | typeof Text | typeof Comment | typeof SuspenseImpl;
export declare type VNodeTypes = string | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof PortalImpl | typeof SuspenseImpl;
export declare function warn(msg: string, ...args: any[]): void;
export declare function watch(effect: WatchEffect, options?: WatchOptions): StopHandle;
export declare function watch(effect: WatchEffect, options?: BaseWatchOptions): StopHandle;
export declare function watch<T>(source: WatchSource<T>, cb: WatchCallback<T>, options?: WatchOptions): StopHandle;
export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? (T | undefined) : T>, options?: WatchOptions<Immediate>): StopHandle;
export declare function watch<T extends Readonly<WatchSource<unknown>[]>>(sources: T, cb: WatchCallback<MapSources<T>>, options?: WatchOptions): StopHandle;
export declare function watch<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchOptions<Immediate>): StopHandle;
export declare type WatchCallback<T = any> = (value: T, oldValue: T, onCleanup: CleanupRegistrator) => any;
export declare type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: CleanupRegistrator) => any;
export declare type WatchEffect = (onCleanup: CleanupRegistrator) => void;
declare type WatchEffect = (onCleanup: CleanupRegistrator) => void;

@@ -903,8 +936,5 @@ declare type WatchOptionItem = string | WatchCallback | {

export declare interface WatchOptions {
lazy?: boolean;
flush?: 'pre' | 'post' | 'sync';
export declare interface WatchOptions<Immediate = boolean> extends BaseWatchOptions {
immediate?: Immediate;
deep?: boolean;
onTrack?: ReactiveEffectOptions['onTrack'];
onTrigger?: ReactiveEffectOptions['onTrigger'];
}

@@ -911,0 +941,0 @@

{
"name": "@vue/runtime-core",
"version": "3.0.0-alpha.4",
"version": "3.0.0-alpha.5",
"description": "@vue/runtime-core",

@@ -34,4 +34,4 @@ "main": "index.js",

"dependencies": {
"@vue/reactivity": "3.0.0-alpha.4"
"@vue/reactivity": "3.0.0-alpha.5"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc