UNPKG

pangu

Version:

Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).

120 lines (119 loc) 5.92 kB
export declare const CJK_RADICALS_SUPPLEMENT = "\u2E80-\u2EFF"; export declare const KANGXI_RADICALS = "\u2F00-\u2FDF"; export declare const HIRAGANA = "\u3040-\u309F"; export declare const KATAKANA_NO_MIDDLE_DOT = "\u30A0-\u30FA\u30FC-\u30FF"; export declare const BOPOMOFO = "\u3100-\u312F"; export declare const ENCLOSED_CJK_LETTERS_AND_MONTHS = "\u3200-\u32FF"; export declare const CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = "\u3400-\u4DBF"; export declare const CJK_UNIFIED_IDEOGRAPHS = "\u4E00-\u9FFF"; export declare const CJK_COMPATIBILITY_IDEOGRAPHS = "\uF900-\uFAFF"; export declare const GREEK_AND_COPTIC = "\u0370-\u03FF"; export declare const LATIN_1_SUPPLEMENT_AFTER_NBSP = "\u00A1-\u00FF"; export declare const NUMBER_FORMS = "\u2150-\u218F"; export declare const DINGBATS = "\u2700-\u27BF"; export declare const CJK = "\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u309F\u30A0-\u30FA\u30FC-\u30FF\u3100-\u312F\u3200-\u32FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF"; export declare const AN = "A-Za-z0-9"; export declare const A = "A-Za-z"; export declare const UPPER_AN = "A-Z0-9"; export declare const OPERATORS_BASE = "\\+\\*=&"; export declare const OPERATORS_WITH_HYPHEN = "\\+\\*=&\\-"; export declare const OPERATORS_NO_PLUS = "\\*=&\\-"; export declare const GRADE_OPERATORS = "\\+\\-\\*"; export declare const QUOTES = "`\"\u05F4"; export declare const LEFT_BRACKETS_BASIC = "\\(\\[\\{"; export declare const RIGHT_BRACKETS_BASIC = "\\)\\]\\}"; export declare const LEFT_BRACKETS_EXTENDED = "\\(\\[\\{<>\u201C"; export declare const RIGHT_BRACKETS_EXTENDED = "\\)\\]\\}<>\u201D"; export declare const ANS_CJK_AFTER = "A-Za-z\u0370-\u03FF0-9@\\$%\\^&\\*\\-\\+\\\\=\u00A1-\u00FF\u2150-\u218F\u2700-\u27BF"; export declare const ANS_BEFORE_CJK = "A-Za-z\u0370-\u03FF0-9\\$%\\^&\\*\\-\\+\\\\=\u00A1-\u00FF\u2150-\u218F\u2700-\u27BF"; export declare const FILE_PATH_DIRS = "home|root|usr|etc|var|opt|tmp|dev|mnt|proc|sys|bin|boot|lib|media|run|sbin|srv|node_modules|path|project|src|dist|test|tests|docs|templates|assets|public|static|config|scripts|tools|build|out|target|your|\\.claude|\\.git|\\.vscode"; export declare const FILE_PATH_CHARS = "[A-Za-z0-9_\\-\\.@\\+\\*]+"; export declare const UNIX_ABSOLUTE_FILE_PATH: RegExp; export declare const UNIX_RELATIVE_FILE_PATH: RegExp; export declare const WINDOWS_FILE_PATH: RegExp; export declare const ANY_CJK: RegExp; export declare const CJK_PUNCTUATION: RegExp; export declare const PUNCTUATION_CJK: RegExp; export declare const CJK_TILDE: RegExp; export declare const CJK_TILDE_EQUALS: RegExp; export declare const CJK_PERIOD: RegExp; export declare const AN_PERIOD_CJK: RegExp; export declare const AN_COLON_CJK: RegExp; export declare const DOTS_CJK: RegExp; export declare const FIX_CJK_COLON_ANS: RegExp; export declare const CJK_QUOTE: RegExp; export declare const QUOTE_CJK: RegExp; export declare const FIX_QUOTE_ANY_QUOTE: RegExp; export declare const QUOTE_AN: RegExp; export declare const CJK_QUOTE_AN: RegExp; export declare const CJK_SINGLE_QUOTE_BUT_POSSESSIVE: RegExp; export declare const SINGLE_QUOTE_CJK: RegExp; export declare const FIX_POSSESSIVE_SINGLE_QUOTE: RegExp; export declare const SINGLE_QUOTE_PURE_CJK: RegExp; export declare const HASH_ANS_CJK_HASH: RegExp; export declare const CJK_HASH: RegExp; export declare const HASH_CJK: RegExp; export declare const CJK_FINAL_HASHTAG: RegExp; export declare const CJK_OPERATOR_ANS: RegExp; export declare const ANS_OPERATOR_CJK: RegExp; export declare const CJK_SLASH_CJK: RegExp; export declare const CJK_SLASH_ANS: RegExp; export declare const ANS_SLASH_CJK: RegExp; export declare const PIPE_CJK_CONTACT: RegExp; export declare const PIPE_SEPARATOR: RegExp; export declare const PLUS_CJK_CONTACT: RegExp; export declare const PLUS_SEPARATOR: RegExp; export declare const SINGLE_LETTER_GRADE_CJK: RegExp; export declare const CJK_SIGN_DIGIT: RegExp; export declare const CJK_HYPHEN_FLAG: RegExp; export declare const AN_PLUS_CJK: RegExp; export declare const CJK_LESS_THAN: RegExp; export declare const LESS_THAN_CJK: RegExp; export declare const CJK_GREATER_THAN: RegExp; export declare const GREATER_THAN_CJK: RegExp; export declare const CJK_LEFT_BRACKET: RegExp; export declare const RIGHT_BRACKET_CJK: RegExp; export declare const ANS_CJK_LEFT_BRACKET_ANY_RIGHT_BRACKET: RegExp; export declare const LEFT_BRACKET_ANY_RIGHT_BRACKET_ANS_CJK: RegExp; export declare const ANS_CJK_RIGHT_QUOTE_ANY_RIGHT_QUOTE: RegExp; export declare const AN_LEFT_BRACKET: RegExp; export declare const RIGHT_BRACKET_AN: RegExp; export declare const CJK_UNIX_ABSOLUTE_FILE_PATH: RegExp; export declare const CJK_UNIX_RELATIVE_FILE_PATH: RegExp; export declare const CJK_WINDOWS_PATH: RegExp; export declare const UNIX_ABSOLUTE_FILE_PATH_SLASH_CJK: RegExp; export declare const UNIX_RELATIVE_FILE_PATH_SLASH_CJK: RegExp; export declare const CJK_ANS: RegExp; export declare const ANS_CJK: RegExp; export declare const S_A: RegExp; export declare const MIDDLE_DOT: RegExp; export declare const VOID_HTML_TAGS: Set<string>; export declare const BARE_HTML_TAG: RegExp; export declare const CLOSING_HTML_TAG: RegExp; export declare const CJK_HTML_TAG_MENTION: RegExp; export declare const HTML_TAG_MENTION_CJK: RegExp; export declare const BRACKET_PATTERNS: { pattern: RegExp; open: string; close: string; }[]; export declare class PlaceholderReplacer { private placeholder; private startDelimiter; private endDelimiter; private static patternCache; private items; private index; private pattern; constructor(placeholder: string, startDelimiter: string, endDelimiter: string); store(item: string): string; restore(text: string): string; } export declare class Pangu { version: string; constructor(); spacingText(text: string): string; hasProperSpacing(text: string): boolean; private fixBracketSpacing; } export declare const pangu: Pangu;