/** * Fields of a `mailto:` link (RFC 6068). Address lists hold bare addresses * such as `name@example.com`. */ export interface MailtoFields { to: string[]; cc: string[]; bcc: string[]; subject: string; body: string; /** Other header fields, kept as they are when a link is edited */ headers: Array<[string, string]>; } /** * Splits a user-typed list of addresses separated by commas, semicolons or spaces */ export declare function splitAddresses(value: string): string[]; /** * Returns the addresses of the list that do not look like `name@domain.tld` */ export declare function invalidAddresses(addresses: string[]): string[]; /** * Builds the `href` of a `mailto:` link. Line breaks in the body are sent as CRLF, as the RFC requires. */ export declare function buildMailto(fields: MailtoFields): string; /** * Parses the `href` of a `mailto:` link. Returns null for other links. * Repeated `to`, `cc` and `bcc` fields are merged, `+` is kept as a plus sign. */ export declare function parseMailto(href: string): MailtoFields | null;