@terrazzo/parser
Version:
Parser/validator for the Design Tokens Community Group (DTCG) standard.
667 lines (664 loc) • 25.8 kB
TypeScript
import { CustomTransformOptions, TokenNormalized as TokenNormalized$1, TokenNormalizedSet as TokenNormalizedSet$1 } from "@terrazzo/token-tools";
import * as momoa from "@humanwhocodes/momoa";
import { InputSource, InputSourceWithDocument } from "@terrazzo/json-schema-tools";
import { AliasToken, AliasValue, BooleanToken, BooleanTokenNormalized, BooleanValue, BorderToken, BorderTokenNormalized, BorderValue, BorderValueNormalized, ColorSpace, ColorToken, ColorTokenNormalized, ColorValue, ColorValueNormalized, CubicBezierToken, CubicBezierTokenNormalized, CubicBezierValue, DimensionToken, DimensionTokenNormalized, DimensionValue, DurationToken, DurationTokenNormalized, DurationValue, FontFamilyToken, FontFamilyTokenNormalized, FontFamilyValue, FontFamilyValueNormalized, FontWeightToken, FontWeightTokenNormalized, FontWeightValue, FontWeightValueNormalized, GradientStop, GradientStopNormalized, GradientToken, GradientTokenNormalized, GradientValue, GradientValueNormalized, Group, Group as Group$1, GroupCore, GroupOrToken, LinkToken, LinkTokenNormalized, LinkValue, ModeMap, NumberToken, NumberTokenNormalized, NumberValue, ShadowToken, ShadowTokenNormalized, ShadowValue, ShadowValueNormalized, StringToken, StringTokenNormalized, StringValue, StrokeStyleToken, StrokeStyleTokenNormalized, StrokeStyleValue, StrokeStyleValueExpanded, Token, TokenCore, TokenMode, TokenNormalized, TokenNormalized as TokenNormalized$2, TokenNormalizedCore, TokenNormalizedSet, TokenNormalizedSet as TokenNormalizedSet$2, TokenTransformed, TokenTransformed as TokenTransformed$1, TokenTransformedBase, TokenTransformedBase as TokenTransformedBase$1, TokensSet, TransitionToken, TransitionTokenNormalized, TransitionValue, TransitionValueNormalized, TypographyToken, TypographyTokenNormalized, TypographyValue, TypographyValueNormalized } from "@terrazzo/token-types";
import ytm from "yaml-to-momoa";
//#region src/logger.d.ts
declare const LOG_ORDER: readonly ["error", "warn", "info", "debug"];
type LogSeverity = 'error' | 'warn' | 'info' | 'debug';
type LogLevel = LogSeverity | 'silent';
type LogGroup = 'config' | 'import' | 'lint' | 'parser' | 'plugin' | 'resolver' | 'server';
interface LogEntry {
/** Originator of log message */
group: LogGroup;
/** Error message to be logged */
message: string;
/** Prefix message with label */
label?: string;
/** File in disk */
filename?: URL;
/**
* Continue on error?
* @default false
*/
continueOnError?: boolean;
/** Show a code frame for the erring node */
node?: momoa.AnyNode;
/** To show a code frame, provide the original source code */
src?: string;
/** Display performance timing */
timing?: number;
}
interface DebugEntry {
group: LogGroup;
/** Error message to be logged */
message: string;
/** Current subtask or submodule */
label?: string;
/** Show code below message */
codeFrame?: {
src: string;
line: number;
column: number;
};
/** Display performance timing */
timing?: number;
}
/**
* @param {Entry} entry
* @param {Severity} severity
* @return {string}
*/
declare function formatMessage(entry: LogEntry, severity: LogSeverity): string;
declare class Logger {
level: LogLevel;
debugScope: string;
errorCount: number;
warnCount: number;
infoCount: number;
debugCount: number;
constructor(options?: {
level?: LogLevel;
debugScope?: string;
});
setLevel(level: LogLevel): void;
/** Log an error message (always; can’t be silenced) */
error(...entries: LogEntry[]): void;
/** Log an info message (if logging level permits) */
info(...entries: LogEntry[]): void;
/** Log a warning message (if logging level permits) */
warn(...entries: LogEntry[]): void;
/** Log a diagnostics message (if logging level permits) */
debug(...entries: DebugEntry[]): void;
/** Get stats for current logger instance */
stats(): {
errorCount: number;
warnCount: number;
infoCount: number;
debugCount: number;
};
}
declare class TokensJSONError extends Error {
constructor(message: string);
}
//#endregion
//#region src/types.d.ts
interface PluginHookContext {
logger: Logger;
}
interface BuildHookOptions {
/** Plugin hook context (provides access to shared logger) */
context: PluginHookContext;
/** Map of tokens */
tokens: Record<string, TokenNormalized$2>;
/** Query transformed values */
getTransforms(this: void, params: TransformParams): TokenTransformed$1[];
/** Momoa documents */
sources: InputSourceWithDocument[];
/** Resolver */
resolver: Resolver;
outputFile: (/** Filename to output (relative to outDir) */
filename: string, /** Contents to write to file */
contents: string | Buffer) => void;
}
interface BuildRunnerResult {
outputFiles: OutputFileExpanded[];
}
interface BuildEndHookOptions {
/** Plugin hook context (provides access to shared logger) */
context: PluginHookContext;
/** Map of tokens */
tokens: Record<string, TokenNormalized$2>;
/** Query transformed values */
getTransforms(this: void, params: TransformParams): TokenTransformed$1[];
/** Momoa documents */
sources: InputSourceWithDocument[];
/** Final files to be written */
outputFiles: OutputFileExpanded[];
}
interface Config {
/**
* Path to tokens.json
* @default "./tokens.json"
*/
tokens?: string | string[];
/**
* Output directory
* @default "./tokens/"
*/
outDir?: string;
/** Specify plugins */
plugins?: Plugin[];
/** Alphabetize tokens by ID to make output more consistent (note: some plugins may not preserve this order). @default true */
alphabetize?: boolean;
/** Specify linting settings */
lint?: {
/** Configure build behavior */build?: {
/**
* Should linters run with `tz build`?
* @default true
*/
enabled?: boolean;
}; /** Configure lint rules */
rules?: Record<string, LintRuleShorthand | LintRuleLonghand>;
};
/** Ignore token groups */
ignore?: {
/** Token patterns to ignore. Accepts globs. */tokens?: string[]; /** Ignore deprecated tokens */
deprecated?: boolean;
};
/**
* Set the maximum number of permutations before the listPermutations API is disabled.
*
* This is a safety feature to prevent denial of service issues on complex resolvers.
*
* @default 1000
*/
permutationLimit?: number;
}
interface VisitorContext {
parent?: momoa.AnyNode;
filename: URL;
path: string[];
}
type Visitor<T extends momoa.AnyNode = momoa.ObjectNode | momoa.DocumentNode> = (node: T, context: VisitorContext) => T | void | null | undefined;
interface TransformVisitors {
boolean?: Visitor;
border?: Visitor;
color?: Visitor;
cubicBezier?: Visitor;
dimension?: Visitor;
duration?: Visitor;
fontFamily?: Visitor;
fontWeight?: Visitor;
gradient?: Visitor;
group?: Visitor;
link?: Visitor;
number?: Visitor;
root?: Visitor;
shadow?: Visitor;
strokeStyle?: Visitor;
token?: Visitor;
transition?: Visitor;
typography?: Visitor;
[key: string]: Visitor | undefined;
}
interface ConfigInit {
tokens: URL[];
outDir: URL;
plugins: Plugin[];
alphabetize: boolean;
lint: {
build: NonNullable<NonNullable<Config['lint']>['build']>;
rules: Record<string, LintRuleLonghand>;
};
ignore: {
tokens: NonNullable<NonNullable<Config['ignore']>['tokens']>;
deprecated: NonNullable<NonNullable<Config['ignore']>['deprecated']>;
};
permutationLimit: number;
}
interface ConfigOptions {
logger?: Logger;
/** @terrazzo/parser needs cwd so this can be run without Node.js. Importing defineConfig from @terrazzo/cli doesn’t need this. */
cwd: URL;
}
interface LintNotice {
/** Lint message shown to the user */
message: string;
/** Erring node (used to point to a specific line) */
node?: momoa.AnyNode;
}
type LintRuleSeverity = 'error' | 'warn' | 'off';
type LintRuleShorthand = LintRuleSeverity | 0 | 1 | 2;
type LintRuleLonghand = [LintRuleSeverity | 0 | 1 | 2, any];
interface LintRuleNormalized<O = any> {
id: string;
severity: LintRuleSeverity;
options?: O;
}
type LintReportDescriptor<MessageIds extends string> = {
/** To error on a specific token source file, provide a Momoa node */node?: momoa.AnyNode; /** To provide correct line numbers, specify the filename (usually found on `token.source.loc`) */
filename?: string; /** Provide data for messages */
data?: Record<string, unknown>;
} & ({
/** Provide the error message to display */message: string;
messageId?: never;
} | {
message?: never; /** Provide the error message ID */
messageId: MessageIds;
});
interface LintRule<MessageIds extends string, LintRuleOptions extends Record<string, any> = Record<string, never>, LintRuleDocs = unknown> {
meta?: LintRuleMetaData<MessageIds, LintRuleOptions, LintRuleDocs>;
/**
* Function which returns an object with methods that ESLint calls to “visit”
* nodes while traversing the abstract syntax tree.
*/
create(context: Readonly<LintRuleContext<MessageIds, LintRuleOptions>>): void | Promise<void>;
/**
* Default options the rule will be run with
*/
defaultOptions: LintRuleOptions;
}
interface LintRuleContext<MessageIds extends string, LintRuleOptions extends object | undefined = undefined> {
/** The rule ID. */
id: string;
/**
* An array of the configured options for this rule. This array does not
* include the rule severity.
*/
options: LintRuleOptions;
/** The current working directory. */
cwd?: URL;
/**
* All source files present in this run. To find the original source, match a
* token’s `source.loc` filename to one of the source’s `filename`s.
*/
sources: InputSourceWithDocument[];
/** Source file location. */
filename?: URL;
/** ID:Token map of all tokens. */
tokens: Record<string, TokenNormalized$2>;
/** Reports a problem in the code. */
report(descriptor: LintReportDescriptor<MessageIds>): void;
}
interface LintRuleMetaData<MessageIds extends string, LintRuleOptions extends object | undefined = undefined, LintRuleDocs = unknown> {
/**
* Documentation for the rule
*/
docs?: LintRuleDocs & LintRuleMetaDataDocs;
/**
* A map of messages which the rule can report. The key is the messageId, and
* the string is the parameterized error string.
*/
messages?: Record<MessageIds, string>;
/**
* Specifies default options for the rule. If present, any user-provided
* options in their config will be merged on top of them recursively. This
* merging will be applied directly to `context.options`.
*/
defaultOptions?: LintRuleOptions;
}
interface LintRuleMetaDataDocs {
/** Concise description of the rule. */
description: string;
/** The URL of the rule's docs. */
url?: string;
}
interface OutputFile {
/** Filename, relative to outDir */
filename: string;
/** File contents */
contents: string | Buffer;
/** Plugin name that generated the file */
plugin?: string;
/** Time taken to generate file */
time?: number;
}
interface OutputFileExpanded extends OutputFile {
/** The `name` of the plugin that produced this file. */
plugin: string;
/** How long this output took to make. */
time: number;
}
interface ParseOptions {
logger?: Logger;
config: ConfigInit;
/**
* Handle requests to loading remote files, either from a remote URL or on the filesystem.
* - Remote requests will have an "https:' protocol
* - Filesystem files will have a "file:" protocol
*/
req?: (src: URL, origin: URL) => Promise<string>;
/**
* Skip lint step
* @default false
*/
skipLint?: boolean;
/**
* Continue on error? (Useful for `tz check`)
* @default false
*/
continueOnError?: boolean;
/** Provide yamlToMomoa module to parse YAML (by default, this isn’t shipped to cut down on package weight) */
yamlToMomoa?: typeof ytm;
/**
* Transform API
* @see https://terrazzo.app/docs/api/js#transform-api
*/
transform?: TransformVisitors;
/** (internal cache; do not use) */
_sources?: Record<string, InputSourceWithDocument>;
/** Resolve DTCG aliases? You’d typically only pass in `false` when normalizing or performing partial parsing. */
resolveAliases?: boolean;
}
interface Plugin {
name: string;
/** Read config, and optionally modify */
config?(config: ConfigInit, context: PluginHookContext): void | ConfigInit | undefined;
/**
* Declare:
* - `"pre"`: run this plugin BEFORE all others
* - `"post"`: run this plugin AFTER all others
* - (default) run this plugin in default order (array order)
*/
enforce?: 'pre' | 'post';
/** Throw lint errors/warnings */
lint?(): Record<string, LintRule<any, any, any>>;
transform?(options: TransformHookOptions): void | Promise<void>;
build?(options: BuildHookOptions): void | Promise<void>;
buildEnd?(options: BuildEndHookOptions): void | Promise<void>;
}
interface ReferenceObject {
$ref: string;
}
type ResolverInput = Record<string, string>;
type ResolverApplicationOptions = {
sets?: string[];
modifiers?: string[];
};
interface Resolver<Inputs extends Record<string, string[]> = Record<string, string[]>, Input = Record<keyof Inputs, Inputs[keyof Inputs][number]>> {
/**
* Supply values to modifiers to produce a final tokens set. This caches the
* results, so calling a 2nd time with the same inputs will return the same
* results (it ignores object key order, and takes defaults into account for
* better caching).
*/
apply: (input: Partial<Input>, options?: ResolverApplicationOptions) => TokenNormalizedSet$2;
/**
* List all possible valid input combinations. Ignores default values, as they
* would duplicate some other permutations. This also caches results, so it’s
* only computed once on the first call.
*
* If the resolver is deemed to complex, this API is not provided.
*/
listPermutations?: () => Input[];
getPermutationID: (input: Input) => string;
/** The original resolver document, simplified */
source: ResolverSourceNormalized;
/** Helper function for permutations—see if a particular input is valid. Automatically applies default values. */
isValidInput: (input: Input, throwError?: boolean) => boolean;
/**
* Do all modifiers in this resolver operate on unique tokens?
*
* This is all-or-nothing, if even a single token is referenced in 2
* modifiers, the entire resolver is non-orthogonal.
*/
orthogonal: boolean;
}
interface ResolverSource {
/** Human-friendly name of this resolver */
name?: string;
/** DTCG version */
version: '2025.10';
/** Description of this resolver */
description?: string;
/** Mapping of sets */
sets?: Record<string, ResolverSet>;
/** Mapping of modifiers */
modifiers?: Record<string, ResolverModifier>;
resolutionOrder: (ResolverSetInline | ResolverModifierInline | ReferenceObject)[];
$extensions?: Record<string, unknown>;
$defs?: Record<string, unknown>;
}
/** Resolver where all tokens are loaded and flattened in-memory, so only the final merging is left */
interface ResolverSourceNormalized {
name: string | undefined;
version: '2025.10';
description: string | undefined;
sets: Record<string, ResolverSetNormalized> | undefined;
modifiers: Record<string, ResolverModifierNormalized> | undefined;
/**
* Array of all sets and modifiers that have been converted to inline,
* regardless of original declaration. In a normalized resolver, only a single
* pass over the resolutionOrder array is needed.
*/
resolutionOrder: (ResolverSetNormalized | ResolverModifierNormalized)[];
_source: {
filename?: URL;
document: momoa.DocumentNode;
};
}
interface ResolverModifier<Context extends string = string> {
description?: string;
contexts: Record<Context, (Group$1 | ReferenceObject)[]>;
default?: Context;
$extensions?: Record<string, unknown>;
$defs?: Record<string, unknown>;
}
type ResolverModifierInline<Context extends string = string> = ResolverModifier<Context> & {
name: string;
type: 'modifier';
};
interface ResolverModifierNormalized {
name: string;
type: 'modifier';
description: string | undefined;
contexts: Record<string, Group$1[]>;
default: string | undefined;
$extensions: Record<string, unknown> | undefined;
$defs: Record<string, unknown> | undefined;
}
interface ResolverSet {
description?: string;
sources: (Group$1 | ReferenceObject)[];
$extensions?: Record<string, unknown>;
$defs?: Record<string, unknown>;
}
type ResolverSetInline = ResolverSet & {
name: string;
type: 'set';
};
interface ResolverSetNormalized {
name: string;
type: 'set';
description: string | undefined;
sources: Group$1[];
$extensions: Record<string, unknown> | undefined;
$defs: Record<string, unknown> | undefined;
}
type TransformParams = TransformParamsLegacy | TransformParamsResolver;
interface TransformParamsBase {
/** ID of an existing format */
format: string;
/** Glob of tokens to select (e.g. `"color.*"` to select all tokens starting with `"color."`) */
id?: string | string[];
/** $type(s) to filter for */
$type?: string | string[];
}
interface TransformParamsLegacy extends TransformParamsBase {
/**
* Mode name, if selecting a mode
* @deprecated Use input instead.
* @default "."
*/
mode?: string | string[];
/** Input that marks the transformation as a permutation */
input?: never;
}
interface TransformParamsResolver extends TransformParamsBase {
mode?: never;
/** Input that marks the transformation as a permutation */
input: ResolverInput;
}
interface TransformHookOptions {
/** Plugin hook context (provides access to shared logger) */
context: PluginHookContext;
/** Map of tokens */
tokens: Record<string, TokenNormalized$2>;
/** Query transformed values */
getTransforms(this: void, params: TransformParams): TokenTransformed$1[];
/** Update transformed values */
setTransform(this: void, id: string, params: {
format: string;
localID?: string;
value: string | Record<string, string>; /** @deprecated */
mode?: string;
input?: never;
meta?: TokenTransformedBase$1['meta'];
} | {
format: string;
localID?: string;
value: string | Record<string, string>;
mode?: never;
input: ResolverInput;
meta?: TokenTransformedBase$1['meta'];
}): void;
/** Resolver */
resolver: Resolver;
/** Momoa documents */
sources: InputSourceWithDocument[];
}
interface RefMapEntry {
filename: string;
refChain: string[];
}
type RefMap = Record<string, RefMapEntry>;
//#endregion
//#region src/build/index.d.ts
interface BuildRunnerOptions {
sources: InputSourceWithDocument[];
config: ConfigInit;
resolver: Resolver;
logger?: Logger;
}
declare const SINGLE_VALUE = "SINGLE_VALUE";
declare const MULTI_VALUE = "MULTI_VALUE";
/** Run build stage */
declare function build(tokens: Record<string, TokenNormalized$1>, {
resolver,
sources,
logger,
config
}: BuildRunnerOptions): Promise<BuildRunnerResult>;
//#endregion
//#region src/config.d.ts
/**
* Validate and normalize a config
*/
declare function defineConfig(rawConfig: Config, {
logger,
cwd
}?: ConfigOptions): ConfigInit;
/** Merge configs */
declare function mergeConfigs(a: Config, b: Config): Config;
//#endregion
//#region src/lint/plugin-core/index.d.ts
declare const RECOMMENDED_CONFIG: Record<string, LintRuleLonghand>;
//#endregion
//#region src/lint/index.d.ts
interface LintRunnerOptions {
tokens: TokenNormalizedSet$1;
filename?: URL;
config: ConfigInit;
sources: InputSourceWithDocument[];
logger: Logger;
}
declare function lintRunner({
tokens,
filename,
config,
sources,
logger
}: LintRunnerOptions): Promise<void>;
//#endregion
//#region src/parse/index.d.ts
interface ParseResult {
tokens: TokenNormalizedSet$1;
sources: InputSourceWithDocument[];
resolver: Resolver;
}
/** Parse */
declare function parse(_input: InputSource | InputSource[], {
logger,
req,
skipLint,
config,
continueOnError,
resolveAliases,
yamlToMomoa,
transform
}?: ParseOptions): Promise<ParseResult>;
//#endregion
//#region src/resolver/load.d.ts
interface LoadResolverOptions {
config: ConfigInit;
logger: Logger;
req: (url: URL, origin: URL) => Promise<string>;
yamlToMomoa?: typeof ytm;
}
/** Quick-parse input sources and find a resolver */
declare function loadResolver(inputs: InputSource[], {
config,
logger,
req,
yamlToMomoa: ytm
}: LoadResolverOptions): Promise<{
resolver: Resolver | undefined;
tokens: TokenNormalizedSet$1;
sources: InputSourceWithDocument[];
}>;
interface CreateResolverOptions {
config: ConfigInit;
logger: Logger;
sources: InputSourceWithDocument[];
orthogonal: boolean;
}
/** Create an interface to resolve permutations */
declare function createResolver(resolverSource: ResolverSourceNormalized, {
config,
logger,
sources,
orthogonal
}: CreateResolverOptions): Resolver;
/** Calculate all permutations */
declare function calculatePermutations(options: [string, string[]][]): Record<string, string>[];
//#endregion
//#region src/resolver/normalize.d.ts
interface NormalizeResolverOptions {
logger: Logger;
yamlToMomoa?: typeof ytm;
filename: URL;
req: (url: URL, origin: URL) => Promise<string>;
src?: any;
}
/** Normalize resolver (assuming it’s been validated) */
declare function normalizeResolver(document: momoa.DocumentNode, {
logger,
filename,
req,
src,
yamlToMomoa: ytm
}: NormalizeResolverOptions): Promise<ResolverSourceNormalized>;
//#endregion
//#region src/resolver/validate.d.ts
/**
* Determine whether this is likely a resolver
* We use terms the word “likely” because this occurs before validation. Since
* we may be dealing with a doc _intended_ to be a resolver, but may be lacking
* some critical information, how can we determine intent? There’s a bit of
* guesswork here, but we try and find a reasonable edge case where we sniff out
* invalid DTCG syntax that a resolver doc would have.
*/
declare function isLikelyResolver(doc: momoa.DocumentNode): boolean;
interface ValidateResolverOptions {
logger: Logger;
src: string;
}
/**
* Validate a resolver document.
* There’s a ton of boilerplate here, only to surface detailed code frames. Is there a better abstraction?
*/
declare function validateResolver(node: momoa.DocumentNode, {
logger,
src
}: ValidateResolverOptions): void;
declare function validateSet(node: momoa.ObjectNode, isInline: boolean | undefined, {
src
}: ValidateResolverOptions): LogEntry[];
declare function validateModifier(node: momoa.ObjectNode, isInline: boolean | undefined, {
src
}: ValidateResolverOptions): LogEntry[];
//#endregion
export { type AliasToken, type AliasValue, type BooleanToken, type BooleanTokenNormalized, type BooleanValue, type BorderToken, type BorderTokenNormalized, type BorderValue, type BorderValueNormalized, BuildEndHookOptions, BuildHookOptions, BuildRunnerOptions, BuildRunnerResult, type ColorSpace, type ColorToken, type ColorTokenNormalized, type ColorValue, type ColorValueNormalized, Config, ConfigInit, ConfigOptions, CreateResolverOptions, type CubicBezierToken, type CubicBezierTokenNormalized, type CubicBezierValue, type CustomTransformOptions, DebugEntry, type DimensionToken, type DimensionTokenNormalized, type DimensionValue, type DurationToken, type DurationTokenNormalized, type DurationValue, type FontFamilyToken, type FontFamilyTokenNormalized, type FontFamilyValue, type FontFamilyValueNormalized, type FontWeightToken, type FontWeightTokenNormalized, type FontWeightValue, type FontWeightValueNormalized, type GradientStop, type GradientStopNormalized, type GradientToken, type GradientTokenNormalized, type GradientValue, type GradientValueNormalized, type Group, type GroupCore, type GroupOrToken, LOG_ORDER, type LinkToken, type LinkTokenNormalized, type LinkValue, LintNotice, LintReportDescriptor, LintRule, LintRuleContext, LintRuleLonghand, LintRuleMetaData, LintRuleMetaDataDocs, LintRuleNormalized, LintRuleSeverity, LintRuleShorthand, LintRunnerOptions, LoadResolverOptions, LogEntry, LogGroup, LogLevel, LogSeverity, Logger, MULTI_VALUE, type ModeMap, NormalizeResolverOptions, type NumberToken, type NumberTokenNormalized, type NumberValue, OutputFile, OutputFileExpanded, ParseOptions, ParseResult, Plugin, PluginHookContext, RECOMMENDED_CONFIG, RefMap, RefMapEntry, ReferenceObject, Resolver, ResolverApplicationOptions, ResolverInput, ResolverModifier, ResolverModifierInline, ResolverModifierNormalized, ResolverSet, ResolverSetInline, ResolverSetNormalized, ResolverSource, ResolverSourceNormalized, SINGLE_VALUE, type ShadowToken, type ShadowTokenNormalized, type ShadowValue, type ShadowValueNormalized, type StringToken, type StringTokenNormalized, type StringValue, type StrokeStyleToken, type StrokeStyleTokenNormalized, type StrokeStyleValue, type StrokeStyleValueExpanded, type Token, type TokenCore, type TokenMode, type TokenNormalized, type TokenNormalizedCore, type TokenNormalizedSet, type TokenTransformed, type TokenTransformedBase, TokensJSONError, type TokensSet, TransformHookOptions, TransformParams, TransformParamsBase, TransformParamsLegacy, TransformParamsResolver, TransformVisitors, type TransitionToken, type TransitionTokenNormalized, type TransitionValue, type TransitionValueNormalized, type TypographyToken, type TypographyTokenNormalized, type TypographyValue, type TypographyValueNormalized, ValidateResolverOptions, Visitor, VisitorContext, build, calculatePermutations, createResolver, defineConfig, formatMessage, isLikelyResolver, lintRunner, loadResolver, mergeConfigs, normalizeResolver, parse, validateModifier, validateResolver, validateSet };
//# sourceMappingURL=index.d.ts.map