import type { Comment, Program } from 'oxc-parser'; import { type CSSClassesMapBySlot, type CSSRulesByBucket } from '@griffel/core'; import type { StyleCall, TransformMetadata } from './types.mjs'; /** CSS output produced while transforming a `makeStyles()` call. */ export type StylesCSSOutput = { classnamesMapping: CSSClassesMapBySlot; resolvedCSSRules: CSSRulesByBucket; }; /** CSS output produced while transforming a `makeResetStyles()` call. */ export type ResetCSSOutput = string[] | CSSRulesByBucket; /** * A single style call paired with the CSS output produced while transforming it. This is the * per-call contract consumed by `generateTransformMetadata()`: the caller emits one entry per style call, * in source order, so that no lookup by declarator id is required. */ export type ProcessedStyleCall = { styleCall: StyleCall; } & ({ functionKind: 'makeStyles'; css: StylesCSSOutput; } | { functionKind: 'makeResetStyles'; css: ResetCSSOutput; } | { functionKind: 'makeStaticStyles'; }); export type GenerateMetadataOptions = { source: string; program: Program; comments: Comment[]; processedStyleCalls: ProcessedStyleCall[]; }; /** * Builds transform metadata (CSS entries, source locations, comment directives) from the collected * style calls and their resolved CSS output. * * Style calls are iterated in source order, so all entries (and their keys) are produced * top-to-bottom, matching the order in which consumers (e.g. `@griffel/postcss-syntax`) emit CSS. */ export declare function generateTransformMetadata(options: GenerateMetadataOptions): TransformMetadata;