UNPKG

@agentman/chat-widget

Version:

Agentman Chat Widget for easy integration with web applications

88 lines (87 loc) 2.56 kB
export declare class OfflineParser { static emojiMap: { ':)': string; ':-)': string; ':(': string; ':-(': string; ':D': string; ':-D': string; ':P': string; ':-P': string; ';)': string; ';-)': string; ':o': string; ':-o': string; '<3': string; '</3': string; ':+1:': string; ':-1:': string; ':fire:': string; ':rocket:': string; ':star:': string; ':check:': string; }; static rules: { h1: { pattern: RegExp; replace: (match: string, content: string) => string; }; h2: { pattern: RegExp; replace: (match: string, content: string) => string; }; h3: { pattern: RegExp; replace: (match: string, content: string) => string; }; bold: { pattern: RegExp; replace: (match: string, content: string) => string; }; italic: { pattern: RegExp; replace: (match: string, content: string) => string; }; markdownLink: { pattern: RegExp; replace: (match: string, text: string, url: string) => string; }; autoLink: { pattern: RegExp; replace: (match: string, url: string) => string; }; markdownImage: { pattern: RegExp; replace: (match: string, alt: string, url: string) => string; }; inlineCode: { pattern: RegExp; replace: (match: string, content: string) => string; }; codeBlock: { pattern: RegExp; replace: (match: string, content: string) => string; }; blockquote: { pattern: RegExp; replace: (match: string, content: string) => string; }; lineBreak: { pattern: RegExp; replace: string; }; autoEmail: { pattern: RegExp; replace: (match: string) => string; }; }; static parse(text: string): string; static escapeHtml(text: string): string; static processEmojis(text: string): string; static sanitizeUrl(url: string): string; static processMarkdownLink(text: string, url: string): string; private static processLists; private static processNumberedLists; private static processBulletLists; static isProcessedHtml(content: string): boolean; }