import { Editor } from '../../core/Editor.js'; import { Mark } from 'prosemirror-model'; export interface HyperlinkMarkAttrs { href?: string | null; anchor?: string | null; docLocation?: string | null; tooltip?: string | null; target?: string | null; rel?: string | null; rId?: string | null; } export interface HyperlinkWriteSpec { href?: string; anchor?: string; docLocation?: string; tooltip?: string; target?: string; rel?: string; } /** * Validates and sanitizes an href string. * Returns the sanitized href or throws if the protocol is blocked. */ export declare function sanitizeHrefOrThrow(href: string): string; /** * Builds PM mark attrs from a hyperlink write spec. * Handles rId creation and anchor-to-href synthesis. */ export declare function buildMarkAttrs(editor: Editor, spec: HyperlinkWriteSpec): HyperlinkMarkAttrs; export declare function wrapWithLink(editor: Editor, from: number, to: number, spec: HyperlinkWriteSpec): boolean; export declare function insertLinkedText(editor: Editor, pos: number, text: string, spec: HyperlinkWriteSpec): boolean; export interface PatchLinkAttrs { href?: string | null; anchor?: string | null; docLocation?: string | null; tooltip?: string | null; target?: string | null; rel?: string | null; } export declare function patchLinkMark(editor: Editor, from: number, to: number, existingMark: Mark, patch: PatchLinkAttrs): boolean; export declare function unwrapLink(editor: Editor, from: number, to: number): boolean; export declare function deleteLinkedText(editor: Editor, from: number, to: number): boolean; //# sourceMappingURL=hyperlink-mutation-helper.d.ts.map