import { DrawingKind } from './index.js'; /** * How a visual-object family is treated by drawing rendering. * * - `supported`: projected into a real layout contract and rendered. * - `fail-closed`: preserved for save/reopen, never silently dropped, and * surfaced with a named diagnostic + placeholder instead of guessed output. * - `deferred`: explicitly out of current scope; no support claim is made and * no rendering path is added unless a later plan pulls it in. */ export type DrawingSupportLevel = 'supported' | 'fail-closed' | 'deferred'; /** * Existing layout-contract target a supported family projects into. `none` * marks families that are policies (e.g. `mc:AlternateContent` traversal) or * have no layout target (fail-closed / deferred families). * * The string values intentionally match the public layout contract names in * `index.ts` so the taxonomy is greppable against the real contracts. */ export type DrawingContractTarget = 'ImageRun' | 'ImageBlock' | 'ImageDrawing' | 'DrawingBlock' | 'selected-choice' | 'none'; /** * The `DrawingBlock` discriminant a supported drawing family maps to, when its * contract target is `DrawingBlock`. Reuses the layout contract `DrawingKind` * union so the taxonomy cannot drift from the painter's accepted kinds. */ export type DrawingTaxonomyDrawingKind = Extract; /** * Frozen canonical diagnostic codes for drawing rendering. * * New extractor/adapter diagnostics MUST use these exact strings. Family- * specific codes are required — do not collapse everything to * `render.unsupported-inline-ooxml` (plan §4). */ export declare const DRAWING_DIAGNOSTIC_CODES: { /** External image relationship (`r:link` / `TargetMode="External"`). Not fetched. */ readonly externalImageDeferred: "render.media.external-image-deferred"; /** Drawing references a relationship id that does not exist on the owner part. */ readonly missingRelationship: "render.drawing.missing-relationship"; /** Relationship resolves but the target media part bytes are missing/empty. */ readonly missingMediaPart: "render.media.missing-part"; /** Relationship exists but is not an image relationship type. */ readonly unsupportedRelationshipType: "render.drawing.unsupported-relationship-type"; /** Media MIME is not in the supported allowlist. */ readonly unsupportedMime: "render.media.unsupported-mime"; /** Media part exceeds the host byte-size policy before bytes are materialized. */ readonly imageTooLarge: "render.media.image-too-large"; /** SVG content rejected by the SVG safety policy. */ readonly unsafeSvg: "render.media.unsafe-svg"; /** Metafile / TIFF (EMF, WMF, TIFF) with no approved conversion path. */ readonly unsupportedFormat: "render.media.unsupported-format"; /** OLE / ActiveX / embedded package object. */ readonly embeddedObjectNotSupported: "render.embedded-object-not-supported"; /** SmartArt / diagram / unknown external graphic-data object. */ readonly unsupportedObject: "render.drawing.unsupported-object"; /** VML structure outside any supported image-like subset. */ readonly vmlUnsupported: "render.drawing.vml-unsupported"; /** VML image-like content that could not be promoted to a supported image. */ readonly vmlImageUnsupported: "render.drawing.vml-image-unsupported"; /** Custom geometry command the extractor does not implement (e.g. `arcTo`). */ readonly unsupportedGeometryCommand: "render.drawing.unsupported-geometry-command"; /** Anchor fields required for honest placement are unsupported. */ readonly anchorUnsupported: "render.drawing.anchor-unsupported"; /** Wrap fields required for honest placement are unsupported. */ readonly wrapUnsupported: "render.drawing.wrap-unsupported"; /** `mc:AlternateContent` had no supported choice and no usable fallback. */ readonly altContentNoSupportedChoice: "render.drawing.altcontent-no-supported-choice"; /** A child of an otherwise-supported group is unsupported. */ readonly groupChildUnsupported: "render.drawing.group-child-unsupported"; /** Chart object (fail-closed by decision). */ readonly chartNotSupported: "render.chart-not-supported"; }; export type DrawingDiagnosticCode = (typeof DRAWING_DIAGNOSTIC_CODES)[keyof typeof DRAWING_DIAGNOSTIC_CODES]; /** * Existing pre-Phase-15 diagnostic codes that remain valid compatibility * aliases (plan §4: "Existing resolver codes can remain compatibility aliases * when they already exist"). Each maps to the canonical code it aliases so * consumers and the Labs oracles can normalize without renaming live emitters. * * These remain emitted by the host resolver / adapter for now; the taxonomy does * not rename live emitters in this plan. Later plans may converge emitters onto * the canonical codes, but the aliases must keep resolving here until then. */ export declare const DRAWING_DIAGNOSTIC_CODE_ALIASES: Readonly>; /** * Every visual-object family the taxonomy classifies. Names are stable identifiers * used by the extractor, adapter diagnostics, Labs summaries, and the closeout * support matrix. */ export type DrawingFamily = 'inlineBitmap' | 'anchoredBitmap' | 'imageChildInGroup' | 'vectorShape' | 'shapeGroup' | 'alternateContent' | 'externalImage' | 'missingRelationship' | 'missingMediaPart' | 'wrongRelationshipType' | 'unsupportedMime' | 'oversizedMediaPart' | 'unsafeSvg' | 'metafileOrTiff' | 'embeddedObject' | 'smartArtOrDiagram' | 'vml' | 'vmlImageLike' | 'unsupportedGeometryCommand' | 'unsupportedAnchorFields' | 'unsupportedWrapFields' | 'alternateContentNoSupportedChoice' | 'groupChildUnsupported' | 'chart' | 'objectEditing' | 'customWrapPolygon' | 'chartFidelity' | 'vmlFidelity' | 'decorativeAccessibilityUi'; /** Frozen classification record for a single visual-object family. */ export interface DrawingFamilySpec { readonly family: DrawingFamily; readonly support: DrawingSupportLevel; /** Human-facing one-line description for matrices and diagnostics. */ readonly description: string; /** Layout-contract target for supported families; `none` otherwise. */ readonly contract: DrawingContractTarget; /** `DrawingBlock` discriminant when `contract === 'DrawingBlock'`. */ readonly drawingKind?: DrawingTaxonomyDrawingKind; /** Canonical diagnostic code for fail-closed families. */ readonly diagnostic?: DrawingDiagnosticCode; } /** * The frozen drawing support taxonomy. * * Invariants (enforced by `drawing-taxonomy.test.ts`): * - every `supported` family has a real contract target (`!== 'none'`); * - every `DrawingBlock`-targeted family declares a `drawingKind`; * - every `fail-closed` family declares a canonical `diagnostic`; * - every canonical diagnostic code is referenced by at least one fail-closed * family; * - `deferred` families make no support claim (`contract: 'none'`, no * diagnostic). */ export declare const DRAWING_SUPPORT_TAXONOMY: Readonly>; /** Every classified family, in declaration order. */ export declare const DRAWING_FAMILIES: readonly DrawingFamily[]; /** Resolve a family's frozen classification spec. */ export declare function getDrawingFamilySpec(family: DrawingFamily): DrawingFamilySpec; /** True when the family renders into a real layout contract. */ export declare function isSupportedDrawingFamily(family: DrawingFamily): boolean; /** * Normalize a possibly-aliased diagnostic code to its canonical code. * Returns the canonical code when `code` is itself canonical, the aliased * canonical code when `code` is a known compatibility alias, or `null` when the * code is outside the drawing diagnostic vocabulary. */ export declare function canonicalDrawingDiagnosticCode(code: string): DrawingDiagnosticCode | null; //# sourceMappingURL=drawing-taxonomy.d.ts.map