import { BlockNoteExtension } from "@blocknote/core"; export interface LinkMatch { /** Offset of the first character of the URL within the scanned string. */ start: number; /** Offset just past the last character of the URL. */ end: number; /** The matched URL, used verbatim as the `href`. */ href: string; } /** * Find every `http(s)://` URL inside a plain string and return their offsets. * Pure and DOM-free so it can be unit-tested directly. */ export declare function detectLinks(text: string): LinkMatch[]; interface AutoLinkPluginOptions { /** * When `true`, a plain click opens the link. When `false` (default), the * platform modifier (Cmd/Ctrl) is required so plain clicks still place the * text cursor for editing — the safer default inside an editor. */ openOnPlainClick: boolean; } /** * BlockNote extension that renders bare `http(s)://` URLs as clickable links. * * Editor extensions are supplied at editor-creation time and cannot be carried * by the schema, so consumers add this to their `useCreateBlockNote` call: * * ```ts * useCreateBlockNote({ * schema: customSchema, * extensions: [autoLinkExtension()], * }); * ``` * * By default a link opens on Cmd/Ctrl+click (plain clicks still edit the text). * Pass `{ openOnPlainClick: true }` to open on a plain click instead. */ export declare class AutoLinkExtension extends BlockNoteExtension { static key(): string; constructor(options?: Partial); } /** Factory for the `extensions` option of `useCreateBlockNote`. */ export declare const autoLinkExtension: (options?: Partial) => AutoLinkExtension; export {};