/** * MIME tables and format-family classification for the media pipeline. * * @remarks * Internal sibling of the `@nhtio/adk/batteries/media` entry. Ported from the source server's * `format_families.ts` support tiers, reshaped for the DSL's verb-applicability checks: * * - Tier 1 (full read + mutate): OOXML (docx/xlsx/pptx) and ODF (odt/ods/odp, via a normalize * engine), plus PDF for page-level operations. * - Tier 2 (extraction only): legacy Office (doc/xls/ppt) and Apple iWork — mutation verbs * reject these with a reason string rather than a throw, so callers can surface * model-actionable failures. * - Everything else classifies by top-level MIME family (image/audio/text). */ import type { FormatFamily } from "./verbs"; /** Well-known MIME constants used across the battery. */ export declare const MIME: { readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation"; readonly ODT: "application/vnd.oasis.opendocument.text"; readonly ODS: "application/vnd.oasis.opendocument.spreadsheet"; readonly ODP: "application/vnd.oasis.opendocument.presentation"; readonly PDF: "application/pdf"; readonly DOC: "application/msword"; readonly XLS: "application/vnd.ms-excel"; readonly PPT: "application/vnd.ms-powerpoint"; readonly PAGES: "application/x-iwork-pages-sffpages"; readonly NUMBERS: "application/x-iwork-numbers-sffnumbers"; readonly KEYNOTE: "application/x-iwork-keynote-sffkey"; readonly XLSM: "application/vnd.ms-excel.sheet.macroEnabled.12"; readonly XLSB: "application/vnd.ms-excel.sheet.binary.macroEnabled.12"; readonly FODS: "application/vnd.oasis.opendocument.spreadsheet-flat-xml"; readonly SYLK: "application/x-sylk"; readonly DIF: "application/x-dif"; readonly DBF: "application/x-dbf"; readonly TXT: "text/plain"; readonly MD: "text/markdown"; readonly CSV: "text/csv"; readonly HTML: "text/html"; readonly JSON: "application/json"; readonly YAML: "application/yaml"; readonly PNG: "image/png"; readonly JPEG: "image/jpeg"; readonly WEBP: "image/webp"; readonly TIFF: "image/tiff"; readonly AVIF: "image/avif"; readonly WAV: "audio/wav"; readonly MP3: "audio/mpeg"; }; /** Legacy Office MIME types (extraction only — mutation is rejected). */ export declare const LEGACY_OFFICE_MIMES: ReadonlySet; /** Apple iWork MIME types (extraction only — mutation is rejected). */ export declare const IWORK_MIMES: ReadonlySet; /** Every MIME the battery classifies as a spreadsheet (drives verb applicability + normalize). */ export declare const SPREADSHEET_MIMES: ReadonlySet; /** * Classify a MIME type into the verb table's broad format family. * * @param mimeType - The media MIME type. * @returns The family used by verb-applicability checks. */ export declare const familyOf: (mimeType: string) => FormatFamily; /** * Reason a mutation verb cannot run against this MIME type, or `undefined` when mutation is * allowed. Returns a reason string (not a throw) so callers compose model-actionable failures. * * @param mimeType - The media MIME type. * @returns A human-readable reason, or `undefined` when mutation is supported. */ export declare const unsupportedForMutationReason: (mimeType: string) => string | undefined; /** A small extension → MIME lookup for filenames produced by transforms. */ export declare const EXT_TO_MIME: Readonly>; /** * Replace (or add) a filename's extension. * * @param filename - The original filename. * @param ext - The new extension, without the dot. * @returns The filename with the new extension. */ export declare const replaceExtension: (filename: string, ext: string) => string;