/** * How generated tokens map onto Figma variables: the variable type per token `$type`, and the * scopes per (collection, token). Keyed on token type and path group rather than on variable * names, so a renamed token keeps its scopes. `scopes.test.ts` asserts the rules cover every * token `tokens create` generates, so a new token group fails CI here instead of surfacing as a * drift warning in the Figma plugin. */ /** The Figma variable types tokens map onto. A subset of Figma's `VariableResolvedDataType`. */ export type FigmaVariableType = 'COLOR' | 'FLOAT' | 'STRING'; /** The Figma variable scopes the rules assign. A subset of Figma's `VariableScope`. */ export type FigmaVariableScope = 'ALL_SCOPES' | 'CORNER_RADIUS' | 'FONT_FAMILY' | 'FONT_SIZE' | 'FONT_STYLE' | 'GAP' | 'OPACITY' | 'STROKE_FLOAT' | 'WIDTH_HEIGHT'; export type FigmaVariableToken = { /** Token path within its set, e.g. `['border-radius', 'sm']`. */ path: readonly string[]; /** The token `$type`, e.g. `dimension`. */ type: string | null | undefined; }; /** The Figma variable type for a token `$type`, or null when the token never becomes a variable. */ export declare function figmaVariableType(type: string | null | undefined): FigmaVariableType | null; /** * Tokens with a `_`-prefixed path segment (e.g. `_size.base`, `size._step`) are private: they only * feed other variables and intentionally get neither scopes nor code syntax. */ export declare const isPrivateTokenPath: (path: readonly string[]) => boolean; /** * The scopes a variable should have, `[]` when it intentionally has none (private tokens, raw * theme inputs, per-mode values), or `null` when no rule matched, which is a naming-drift signal. * * @param collection The Figma collection, one of {@link FIGMA_COLLECTION}. */ export declare function figmaVariableScopes(collection: string, token: FigmaVariableToken): FigmaVariableScope[] | null;