/** * Variation expansion — turns a spec's `variantAxes` declaration into a * concrete list of variants with stable hashes for caching. * * v1: cartesian product only. Sparse / budget-capped / random sampling modes * are deferred — they will plug into `expandAxes` without touching callers. */ import type { ComponentSpec } from "./types.js"; export interface VariantDescriptor { /** Canonical id (e.g. "sm-neutral"). Stable across runs. */ id: string; /** User-facing display name, identical to id in v1. */ name: string; /** Per-axis values for this variant. */ axisValues: Record; /** Content hash — changes when spec, axis values, or tokens change. */ hash: string; } /** Expand `variantAxes` as a full cartesian product, minus any `variantConstraints.forbid` combos. */ export declare function expandAxes(spec: ComponentSpec, tokenVersion?: string): VariantDescriptor[]; /** Stable hash for a variant — drives on-disk cache keying. */ export declare function hashVariant(specHash: string, axisValues: Record, tokenVersion: string): string; /** * Hash only the fields of a spec that affect generated output. * `updatedAt`, `createdAt`, and provenance are excluded so timestamp * churn doesn't bust every variant. */ export declare function hashSpecShape(spec: ComponentSpec): string;