import type { DtcgDocument } from "../tokens/dtcg-model.js"; export type MigrationResult = { ok: true; document: DtcgDocument; } | { ok: false; reason: string; }; /** * Migrates one parsed token JSON document from Style-Dictionary / Tokens-Studio * `{ value, type }` form to DTCG `{ $value, $type }`. * * Safe by construction: the transformed document is validated with Lyse's own * `dtcg-conformance` walker, and the migration is refused (`ok: false`) if it * would produce ANY conformance issue — the codemod never writes invalid DTCG * or guesses missing information (e.g. a unit for a bare number). */ export declare function migrateTokenJsonToDtcg(json: unknown): MigrationResult; interface TokenMigration { /** Repo-relative path of the token file. */ path: string; /** DTCG JSON content to write (2-space indent + trailing newline). */ content: string; } export interface TokenMigrationPlan { migrations: TokenMigration[]; /** Files that were considered but left untouched, with the reason. */ skipped: { path: string; reason: string; }[]; } /** * Discovers legacy (`{ value, type }`) token JSON under `repoRoot` and computes * the DTCG-migrated content for each. Pure planning — performs NO writes; the * caller (`lyse init --migrate-tokens`) applies the plan behind the safety * guards. Results are sorted by path for determinism. Already-DTCG and * non-conformant-after-conversion files are reported under `skipped`. */ export declare function migrateLegacyTokensToDtcg(repoRoot: string): TokenMigrationPlan; export {};