import type { DockviewApi, DockviewGroupPanel, IContentRenderer, IDockviewGroupPanel, IGroupDragGhostRenderer, IGroupHeaderProps, IHeaderActionsRenderer, ITabGroupChipRenderer, ITabGroup, ITabRenderer, IWatermarkRenderer, IContextMenuItemRenderer, IContextMenuItemComponentProps, IChipContextMenuItemComponentProps, PanelUpdateEvent, Parameters, TabPartInitParameters, WatermarkRendererInitParameters } from 'dockview'; import { type VueSlotReference } from './slots'; import { type ComponentOptionsBase, type ShallowRef, type DefineComponent, type ComponentInternalInstance } from 'vue'; export type ComponentInterface = ComponentOptionsBase; export type VueComponent = DefineComponent; /** * What a renderer mounts: a component, or a named slot of the host. * * @internal */ export type VueRenderable = VueComponent | VueSlotReference; export declare function findComponent(parent: ComponentInternalInstance, name: string, components?: Record): VueComponent | null; export declare function resolveComponent(value: string | VueComponent | undefined, parent: ComponentInternalInstance, components?: Record): VueComponent | undefined; /** * @see https://vuejs.org/api/render-function.html#clonevnode * @see https://vuejs.org/api/render-function.html#mergeprops */ export declare function mountVueComponent>(component: VueComponent, parent: ComponentInternalInstance, props: T, element: HTMLElement): { update: (newProps: any) => void; dispose: () => void; }; export interface VueMountDisposable { update: (props: Record) => void; dispose: () => void; } /** * A single component to be teleported by the host's ``. * * `props` is a {@link ShallowRef} so reassigning it triggers a re-render * without Vue deeply proxying the value. The params object carries raw * dockview API instances that must not be made reactive. */ export interface VueMountEntry { readonly id: number; readonly component: VueComponent; readonly target: HTMLElement; readonly props: ShallowRef>; } /** * Shared, reactive registry of components that a host (`dockview.vue`, * `splitview.vue`, ...) renders via `` instead of the detached * `render()` root used by {@link mountVueComponent}. * * Teleporting keeps each panel a true descendant of the host in the Vue * component tree, so framework features that walk the tree work natively: * KeepAlive (`onActivated`/`onDeactivated`), `provide`/`inject`, `` * and error boundaries. */ export declare class VueRendererRegistry { readonly entries: import("vue").ShallowReactive; mount(component: VueComponent, target: HTMLElement, props: Record): VueMountDisposable; } declare abstract class AbstractVueRenderer { protected readonly component: VueRenderable; protected readonly parent: ComponentInternalInstance; protected readonly registry?: VueRendererRegistry; protected readonly _element: HTMLElement; protected _renderDisposable: VueMountDisposable | undefined; get element(): HTMLElement; constructor(component: VueRenderable, parent: ComponentInternalInstance, registry?: VueRendererRegistry); /** * Mount `component` into `this.element`. When a {@link VueRendererRegistry} * is provided the component is teleported by the host (keeping it in the * Vue component tree); otherwise it falls back to the detached * {@link mountVueComponent} render root. * * A {@link VueSlotReference} is mounted as a {@link VueSlotOutlet}, which * renders the host's slot with `props.params` as the slot props. */ protected mount(props: Record): void; } export declare class VueRenderer extends AbstractVueRenderer implements ITabRenderer, IContentRenderer { private _props; private readonly _titleDisposable; init(parameters: TabPartInitParameters): void; update(event: PanelUpdateEvent): void; dispose(): void; } export declare class VueWatermarkRenderer extends AbstractVueRenderer implements IWatermarkRenderer { get element(): HTMLElement; init(parameters: WatermarkRendererInitParameters): void; update(event: PanelUpdateEvent): void; dispose(): void; } export declare class VueHeaderActionsRenderer extends AbstractVueRenderer implements IHeaderActionsRenderer { private readonly group; private readonly _mutableDisposable; private _baseProps; get element(): HTMLElement; constructor(component: VueRenderable, parent: ComponentInternalInstance, group: DockviewGroupPanel, registry?: VueRendererRegistry); init(props: IGroupHeaderProps): void; dispose(): void; private buildEnrichedProps; private updateProps; private updateLocation; } export declare class VueContextMenuItemRenderer extends AbstractVueRenderer implements IContextMenuItemRenderer { init(props: IContextMenuItemComponentProps | IChipContextMenuItemComponentProps): void; dispose(): void; } export declare class VueTabGroupChipRenderer extends AbstractVueRenderer implements ITabGroupChipRenderer { get element(): HTMLElement; constructor(component: VueComponent, parent: ComponentInternalInstance, registry?: VueRendererRegistry); private _api; init(params: { tabGroup: ITabGroup; api: DockviewApi; }): void; update(params: { tabGroup: ITabGroup; }): void; dispose(): void; } export declare class VueGroupDragGhostRenderer extends AbstractVueRenderer implements IGroupDragGhostRenderer { constructor(component: VueComponent, parent: ComponentInternalInstance, registry?: VueRendererRegistry); init(params: { group: IDockviewGroupPanel; api: DockviewApi; }): void; dispose(): void; } export declare class VuePart = any> { private readonly element; private readonly vueComponent; private readonly parent; private props; private readonly registry?; private _renderDisposable; constructor(element: HTMLElement, vueComponent: VueComponent, parent: ComponentInternalInstance, props: T, registry?: VueRendererRegistry); init(): void; update(props: T): void; dispose(): void; } export {};