UNPKG

dockview-vue

Version:

Zero dependency layout manager supporting tabs, grids and splitviews

19 lines (18 loc) 994 B
import { type ComponentInternalInstance } from 'vue'; export interface ViewComponentConfig<TApi, TOptions, TProps, TEvents, TView, TFrameworkOptions> { componentName: string; propertyKeys: readonly (keyof TOptions)[]; createApi: (element: HTMLElement, options: TOptions & TFrameworkOptions) => TApi; createView: (id: string, name: string | undefined, component: any, instance: ComponentInternalInstance) => TView; extractCoreOptions: (props: TProps) => TOptions; } export declare function useViewComponent<TApi extends { dispose(): void; updateOptions(options: Partial<TOptions>): void; layout(width: number, height: number): void; }, TOptions, TProps, TEvents, TView, TFrameworkOptions>(config: ViewComponentConfig<TApi, TOptions, TProps, TEvents, TView, TFrameworkOptions>, props: TProps, emit: (event: 'ready', payload: { api: TApi; }) => void): { el: import("vue").Ref<HTMLElement>; instance: import("vue").Ref<import("vue").UnwrapRef<TApi>>; };