export { i as bad_codecs } from './index-C0CpbZiO.cjs'; export { badness, is_bad, sequence_weirdness } from './badness.cjs'; export { character_width, display_center, display_ljust, display_rjust, monospaced_width } from './formatting.cjs'; import './sloppy-Md2gXz46.cjs'; declare const __version__ = "6.3.2"; declare const __upstream_commit__ = "74dd0452b48286a3770013b3a02755313bd5575e"; type ExplanationAction = "encode" | "decode" | "transcode" | "apply" | "normalize"; type ExplanationStep = [action: ExplanationAction, parameter: string]; type Explanation = ExplanationStep[] | null; type ExplainedText = [text: string, explanation: Explanation] & { readonly text: string; readonly explanation: Explanation; }; type Normalization = "NFC" | "NFD" | "NFKC" | "NFKD" | null; interface TextFixerConfigOptions { unescape_html: "auto" | boolean; remove_terminal_escapes: boolean; fix_encoding: boolean; restore_byte_a0: boolean; replace_lossy_sequences: boolean; decode_inconsistent_utf8: boolean; fix_c1_controls: boolean; fix_latin_ligatures: boolean; fix_character_width: boolean; uncurl_quotes: boolean; fix_line_breaks: boolean; fix_surrogates: boolean; remove_control_chars: boolean; normalization: Normalization; max_decode_length: number; explain: boolean; /** Deprecated upstream spelling retained for compatibility. */ fix_entities?: boolean; } declare class TextFixerConfig implements Omit { readonly unescape_html: "auto" | boolean; readonly remove_terminal_escapes: boolean; readonly fix_encoding: boolean; readonly restore_byte_a0: boolean; readonly replace_lossy_sequences: boolean; readonly decode_inconsistent_utf8: boolean; readonly fix_c1_controls: boolean; readonly fix_latin_ligatures: boolean; readonly fix_character_width: boolean; readonly uncurl_quotes: boolean; readonly fix_line_breaks: boolean; readonly fix_surrogates: boolean; readonly remove_control_chars: boolean; readonly normalization: Normalization; readonly max_decode_length: number; readonly explain: boolean; constructor(options?: Partial); replace(options: Partial): TextFixerConfig; } type ConfigInput = TextFixerConfig | Partial | undefined; type StringFixer = (text: string) => string; type ByteFixer = (bytes: Uint8Array) => Uint8Array; declare const FIXERS: Readonly>; /** Fix text in independent line-sized segments, matching `ftfy.fix_text`. */ declare function fix_text(text: string, config?: ConfigInput): string; /** Fix one segment and return both its text and a replayable explanation. */ declare function fix_and_explain(text: string, config?: ConfigInput): ExplainedText; declare function fix_encoding_and_explain(text: string, config?: ConfigInput): ExplainedText; declare function fix_encoding(text: string, config?: ConfigInput): string; declare const ftfy: typeof fix_text; declare function fix_text_segment(text: string, config?: ConfigInput): string; type FileLine = string | Uint8Array; declare function fix_file(input: Iterable, encoding?: string | null, config?: ConfigInput): Generator; type GuessedBytes = [text: string, encoding: string] & { readonly text: string; readonly encoding: string; }; declare function guess_bytes(bytes: Uint8Array): GuessedBytes; declare function apply_plan(text: string, plan: readonly ExplanationStep[]): string; declare function explain_unicode(text: string): void; export { type ExplainedText, type Explanation, type ExplanationAction, type ExplanationStep, FIXERS, type FileLine, type GuessedBytes, type Normalization, TextFixerConfig, type TextFixerConfigOptions, __upstream_commit__, __version__, apply_plan, explain_unicode, fix_and_explain, fix_encoding, fix_encoding_and_explain, fix_file, fix_text, fix_text_segment, ftfy, guess_bytes };