/** * W3C Design Tokens (DTCG) read/write — the community-group JSON format * (design-tokens.github.io/community-group, 2025.10 draft line). * * Read: any nested-group document with $value tokens, $type inheritance, * and {dot.path} alias references. Write: spec-compliant $type/$value with * a "cv.memoire" $extensions block carrying memi's full token shape * (type, collection, cssVariable, mode values) so a round-trip is lossless. * * Unresolvable aliases and unmappable types are reported as warnings — * never silently dropped or guessed. */ import type { DesignToken } from "../engine/registry.js"; export interface DtcgParseResult { tokens: DesignToken[]; warnings: string[]; } /** True when the value looks like a DTCG document (some nested member carries $value). */ export declare function isDtcgDocument(value: unknown, depth?: number): boolean; /** Normalize a token identifier for matching: DTCG "colors.primary" ≡ memi "Colors/Primary". */ export declare function normalizeTokenPath(name: string): string; /** Parse a DTCG document into memi DesignTokens. */ export declare function fromDtcg(document: unknown): DtcgParseResult; /** Serialize memi DesignTokens to a DTCG document (lossless via $extensions). */ export declare function toDtcg(tokens: DesignToken[]): Record;