/** * handlers/text.ts — Plain text / source code / markup handler * * For text-based formats (TXT, MD, HTML, JSON, XML, CSV, JS, TS, etc.), * we append the signature as a structured comment block at the very end. * * Format: * \n\n\n * * \n\n * * The HTML comment markers are chosen because they are: * - Valid in HTML, XML, and SVG * - Visually clear in plain text * - Easily searchable/strippable * - Not affecting rendering in most formats * * For JSON files specifically, the block is still appended (making it technically * invalid JSON), which means you should strip before parsing JSON. */ import { FormatHandler } from "../../types"; export declare class TextHandler implements FormatHandler { readonly name = "Text/Markup/Source"; readonly supportedMimeTypes: readonly string[]; canHandle(bytes: Uint8Array, mimeType?: string): boolean; embed(bytes: Uint8Array, signatureJson: string): Promise; extract(bytes: Uint8Array): Promise; strip(bytes: Uint8Array): Promise; }