/** * Figma variables export — the "Figma second" target. * * The neutral DTCG file (see `dtcg.ts`) is the portable token export; this is * the Figma-shaped projection of the same {@link DesignTokens}, ready to create * a local **variable collection** (the structure the Figma plugin / REST * `POST variables` endpoint consumes). Colours become `COLOR` variables, corner * radii and spacing become `FLOAT` variables; typography is left to text styles * (Figma has no composite type variable). * * Light/dark are expressed as Figma **modes**: a colour token keyed * `.` (the suffix `@design-parity/core` uses for themed palettes) * contributes its value under that mode; an un-suffixed token applies to every * mode. Pure data — the caller serializes or hands it to a writer. */ import type { DesignTokens } from "@design-parity/core"; export type FigmaVariableType = "COLOR" | "FLOAT" | "STRING" | "BOOLEAN"; /** One Figma variable: a value per mode id. */ export interface FigmaVariable { name: string; resolvedType: FigmaVariableType; /** Value keyed by mode id; a single `"value"` mode when the token isn't themed. */ valuesByMode: Record; } /** A Figma variable collection (a design system) with its modes. */ export interface FigmaVariableCollection { name: string; /** Mode id → human mode name (`"light"`, `"dark"`, or the default `"value"`). */ modes: Record; defaultModeId: string; variables: FigmaVariable[]; } /** One named Figma text style projected from a symbolic typography token. */ export interface FigmaTextStyleSpec { name: string; fontFamily?: string; fontSize?: number; fontWeight?: number | string; fontStyle?: string; lineHeight?: number; letterSpacing?: number; /** Native-code expression shown in Dev Mode. */ androidCodeSyntax: string; } /** Preserve typography role names so imports become reusable local text styles. */ export declare function toFigmaTextStyles(tokens: DesignTokens): FigmaTextStyleSpec[]; /** * Project a {@link DesignTokens} bag onto a {@link FigmaVariableCollection}. * * @param name collection name (usually the catalog title). */ export declare function toFigmaVariables(tokens: DesignTokens, name: string): FigmaVariableCollection; //# sourceMappingURL=figma.d.ts.map