import { PluginKey } from '@milkdown/kit/prose/state'; /** * Metadata keys for link transactions */ export declare const TENTATIVE_LINK_META = "tentativeLinkMark"; export declare const CONFIRM_LINK_META = "confirmLinkMark"; /** Set by the tooltip when the user dismisses without confirming; plugin then cleans up empty links. */ export declare const CLEANUP_TENTATIVE_LINK_META = "cleanupTentativeLinkMark"; /** * Tracks ranges of tentative (empty href) link marks that need cleanup */ interface TentativeLinkRange { from: number; to: number; } interface TentativeLinkPluginState { tentativeLinks: TentativeLinkRange[]; } declare const tentativeLinkPluginKey: PluginKey; /** * Creates a ProseMirror plugin that automatically cleans up tentative (empty) link marks. * * When a transaction creates a link with metadata { tentativeLinkMark: true }, the plugin * tracks that range. On the next transaction (unless it has { confirmLinkMark: true }), * the tentative link is automatically removed by appending removal steps to the transaction. * * This prevents empty link marks from lingering when users click away without entering a URL. */ export declare const tentativeLinkPlugin: import('@milkdown/utils').$Prose; export { tentativeLinkPluginKey };