/** * Checked design-token references (D103): what a token name is, what it lowers * to, and how a written `var(--name)` is read back. */ /** * A CSS custom property identifier, as a Look token name. `--` and at least one * more character, from the ASCII ident set a design system's tokens are written * with. CSS itself also admits non-ASCII ident code points and backslash * escapes; both are outside this set on purpose, because the text goes straight * into a compiler-owned stylesheet where an escape is a way out of the * declaration (the same reasoning LOK-U9 applies to `keyframes:` values). */ export declare const LOOK_TOKEN_NAME_PATTERN: RegExp; /** The whole rule, in the terms a diagnostic teaches it. */ export declare const LOOK_TOKEN_NAME_RULE = "a design token name is a literal string holding a CSS custom property identifier: '--' followed by one or more letters, digits, hyphens, or underscores"; /** * D103 rule 5 — why there is no second parameter. A design token is the design * system's closed contract; a token that is missing is a defect in that system, * to be fixed once where it is defined, rather than a decision each of hundreds * of use sites re-makes for itself. A per-site fallback would also be the one * part of the reference the compiler could neither see nor check. */ export declare const LOOK_TOKEN_NO_FALLBACK_GUIDANCE = "token(name) takes the token name and nothing else: a design token is the design system's closed contract, so a token that is missing is a defect to fix where the token is defined rather than a fallback decided again at every use site"; export declare function isLookTokenName(name: string): boolean; /** The CSS text a checked token reference lowers to. */ export declare function lookTokenReference(name: string): string; /** * The token name a whole `var(--name)` string names, or null. Only the complete * value is read: `var()` inside a larger value — the tail of a font stack, one * layer of a filter — is a legitimate free-text spelling with no single token * to rewrite it to, so it is not this function's business. A `var(--x, red)` * fallback form answers null here and is diagnosed by its own message, because * the closed contract above has no fallback to migrate it to. */ export declare function lookVarReferenceName(text: string): string | null; /** Whether a whole string is a `var(...)` reference of any shape, fallback included. */ export declare function isLookVarReference(text: string): boolean; //# sourceMappingURL=tokens.d.ts.map