import { type ParityFindingsEntry } from "./parityFindings.js"; import { type KnownDifferencesResult } from "./knownDifferences.js"; import { type ManifestOptions } from "./manifest.js"; import type { Catalog } from "./types.js"; export interface WriteOptions extends ManifestOptions { /** Root that relative image `uri`s resolve against. Default: `process.cwd()`. */ sourceRoot?: string; /** Also emit the Figma variable-collection projection. Default `true`. */ figmaVariables?: boolean; /** Pretty-print JSON with this indent. Default `2`. */ indent?: number; /** * Also carry the source repo's `.design-parity/known-differences*` into the bundle. Default * `true`. * * The escape hatch exists for a caller assembling a bundle from a directory that is not the * acceptances' repository — the only case where reading `.design-parity/` would carry someone * else's records. It is **not** an optimisation: skipping it makes every committed acceptance in * that bundle suppress nothing. */ knownDifferences?: boolean; /** * Repository root the committed acceptances are read from. Default: `process.cwd()`. * * Deliberately **not** [sourceRoot]. That one is where a bundle's relative image URIs resolve — * the render output, routinely a temp dir or an unzipped artifact — while acceptances are * repository content committed beside `design-map.json`. Reusing `sourceRoot` here type-checks, * reads perfectly plausibly, and publishes nothing at all: `/.design-parity/` never * exists, so every committed acceptance would silently fail to reach the bundle. */ knownDifferencesRoot?: string; /** * A run's verdicts, to publish as `parity/findings.json` — the a11y, i18n, token and layout * findings a preview server shows under its comparison panels. * * Passed in rather than derived, because this package cannot produce one: a catalog export is * code-led and knows only what the code IS, while a finding is a claim about a code/design PAIR * that only a diff run has. A caller with no verdicts (the ordinary sticker-sheet export) omits * this and the file is not written — which is also what a run whose every component passed gets, * since a set with no findings is dropped. */ parityFindings?: readonly ParityFindingsEntry[]; /** Stamped into `parity/findings.json`. Omitted when absent, never defaulted to "now". */ generatedAt?: string; } export interface WriteResult { /** Absolute path to the written `catalog.json`. */ manifestPath: string; /** Absolute path to the DTCG token file, when tokens were exported. */ tokensPath?: string; /** * Absolute path to each alternate theme's DTCG token file, in manifest order. * Absent when the system declares no alternate themes. */ themeTokensPaths?: string[]; /** Absolute path to the Figma variables file, when written. */ figmaPath?: string; /** Number of image files written. */ imageCount: number; /** Number of wireframe SVG files written. */ wireframeCount?: number; /** Absolute path to the annotation manifest, when the catalog produced one. */ annotationsPath?: string; /** Absolute path to `parity/findings.json`, when a caller supplied verdicts carrying findings. */ parityFindingsPath?: string; /** * What the source repo's committed known differences produced, when it commits any. * * Present even when nothing was carried, so a caller can tell "this repo accepts nothing" from * "the acceptances were skipped" — `skipped` is the half worth reading, and a publisher that * dropped a mask without saying so would leave an acceptance suppressing nothing with nothing * anywhere explaining why. */ knownDifferences?: KnownDifferencesResult; } /** Write the full importable catalog bundle to `outDir`. */ export declare function writeCatalog(catalog: Catalog, outDir: string, opts?: WriteOptions): Promise; //# sourceMappingURL=write.d.ts.map