@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
32 lines (31 loc) • 960 B
TypeScript
/**
* This file has been duplicated in packages/linking-platform/link-picker/src/common/utils/url.ts
* Any changes made here should be mirrored there.
*/
import LinkifyIt from 'linkify-it';
/**
* Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
*/
export declare const isSafeUrl: (url: string) => boolean;
export interface Match {
schema: any;
index: number;
lastIndex: number;
raw: string;
text: string;
url: string;
length?: number;
input?: string;
}
export declare const linkify: LinkifyIt.LinkifyIt;
export declare const LINK_REGEXP: RegExp;
export declare const linkifyMatch: (text: string) => Match[];
export declare function getLinkMatch(str?: string): Match | null;
/**
* Adds protocol to url if needed.
*/
export declare function normalizeUrl(url?: string): string;
/**
* checks if root relative link
*/
export declare function isRootRelative(url: string): boolean;