/**
 * Returns the relative portion of a URL when it shares the same origin as the
 * current page (or the provided `origin`). Returns the original value unchanged
 * when the URL is cross-origin, already relative, or falsy.
 *
 * @param url - The URL to normalise.
 * @param origin - Origin to compare against (defaults to `window.location.origin`).
 */
export declare function toRelativeUrl(url: string | null | undefined, origin?: string): string | undefined;
export declare const appendProtocol: (inputUrl: string, defaultProtocol?: string, ignoreRelativeUrl?: boolean) => string;
export declare const isValidUrl: (urlString: string) => boolean;
export declare const RELATIVE_URL_REGEX: string;
export declare const URL_VALIDATION_REGEX: string;
export declare const URL_DOMAIN_VALIDATION_REGEX: string;
export declare const URL_PROTOCOL_VALIDATION_REGEX: string;
