import { Node as ProseMirrorNode } from '@tiptap/pm/model';

export interface DBlockViewHandle {
    id: string;
    dom: HTMLElement;
    gutterElement: HTMLElement;
    contentElement: HTMLElement;
    getPos: () => number;
    getNode: () => ProseMirrorNode;
    refresh: () => void;
    onCopyHeadingLink?: (link: string) => void;
}
type DBlockDebugExtra = Record<string, boolean | number | string | null | undefined>;
interface DestroyedDBlockNodeViewTargets {
    nodeView: object;
    dom: HTMLElement;
    gutterElement: HTMLElement;
    contentElement: HTMLElement;
    contentDOM: HTMLElement;
}
export interface DBlockDebugSnapshot {
    event: string;
    label?: string;
    created: number;
    destroyed: number;
    registered: number;
    connected: number;
    detached: number;
    maxRegistered: number;
    unregisterMisses: number;
    [key: string]: boolean | number | string | null | undefined;
}
declare global {
    interface Window {
        __ddocDBlockDebug?: {
            snapshot: (label?: string) => DBlockDebugSnapshot;
            destroyedRefsSnapshot: (label?: string) => DBlockDebugSnapshot;
            getStats: () => DBlockDebugSnapshot;
            reset: () => DBlockDebugSnapshot;
        };
    }
}
export declare const logDBlockLifecycleSnapshot: (label: string, extra?: DBlockDebugExtra) => DBlockDebugSnapshot;
export declare const trackDestroyedDBlockNodeViewRefs: (targets: DestroyedDBlockNodeViewTargets) => void;
export declare const registerDBlockView: (handle: DBlockViewHandle) => () => void;
export declare const getDBlockViewFromElement: (element: Element | null) => DBlockViewHandle | null;
export declare const getDBlockViewFromEventTarget: (target: EventTarget | null) => DBlockViewHandle | null;
export declare const refreshRegisteredDBlockViews: () => void;
export {};
