import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model'; import type { EditorState } from '@atlaskit/editor-prosemirror/state'; import type { AnalyticsEventPayload } from '../analytics/types/events'; import type { InputMethodInsertLink } from '../analytics/types/insert-events'; export declare const FILEPATH_REGEXP: RegExp; export declare const DONTLINKIFY_REGEXP: RegExp; /** * Instance of class LinkMatcher are used in autoformatting in place of Regex. * Hence it has been made similar to regex with an exec method. * Extending it directly from class Regex was introducing some issues, thus that has been avoided. */ export declare class LinkMatcher { static create(): RegExp; } /** * Adds protocol to url if needed. */ export declare function normalizeUrl(url?: string | null): string; /** * Linkify content in a slice (eg. after a rich text paste) */ export declare function linkifyContent(schema: Schema): (slice: Slice) => Slice; export declare function getLinkDomain(url: string): string; export declare function isFromCurrentDomain(url: string): boolean; interface filepathMatch { endIndex: number; startIndex: number; } export declare const findFilepaths: (text: string, offset?: number) => Array; export declare const isLinkInMatches: (linkStart: number, matchesList: Array) => boolean; export declare function getLinkCreationAnalyticsEvent(inputMethod: InputMethodInsertLink, url: string): AnalyticsEventPayload; export declare const canLinkBeCreatedInRange: (from: number, to: number) => (state: EditorState) => boolean; export {};