/** * The tiny `manifest.json` that sits inside an image bundle. * * A bundle is "raw images + a description": no HTML, no handoff block, just a * list of exported PNGs with their variant keys. This module owns the manifest * shape and its validation; the adapter owns reading bytes and producing the * normalized {@link DesignReference}. */ import type { DesignTokens, Theme } from "@design-parity/core"; /** One declared image variant in a bundle manifest. */ export interface BundleManifestImage { /** Variant state, e.g. `"default"`, `"pressed"`. Defaults to `"default"`. */ state?: string; theme?: Theme; /** Producer's size/breakpoint label; canonicalized via `normalizeSize`. */ size?: string; /** Bundle-relative path to the PNG (forward slashes). */ path: string; /** Hints only — the adapter reads the real dimensions from the PNG bytes. */ width?: number; height?: number; } /** The parsed, validated `manifest.json`. */ export interface BundleManifest { componentId?: string; tokens?: DesignTokens; images: BundleManifestImage[]; } /** * Parse and validate a bundle `manifest.json` payload. * * @param raw the manifest file contents (UTF-8 JSON). * @param ref the bundle `ref`, for error messages. * @throws {@link BundleManifestError} if the JSON is invalid or the shape is * wrong (no `images` array, an image without a `path`, …). */ export declare function parseManifest(raw: string, ref: string): BundleManifest; //# sourceMappingURL=manifest.d.ts.map