/** * The three edits a Look diagnostic offers when its remedy names a builder. * * D115 P4 R3b. `values.ts` rewrites a raw CSS filter into the builder that * spells it and `tokens.ts` rewrites a `var(--x)` passthrough into `token()`, * so both need the same two answers — what this module already calls the * builder locally, and the import edit that gives the module the name when it * has none. They live here rather than in either caller because a helper both * read from the other would make the two import each other. */ import { type DiagnosticEdit } from "@velarscript/compiler"; import { type Expression } from "@velarscript/compiler/extension"; import { type LookValueSite } from "../look-sites.ts"; import { type LookFilterRewrite } from "../look-vocabulary-guidance.ts"; import { type LookAnalysisHost } from "./host.ts"; /** Uses an existing alias when present and lists only builders the fix must import. */ export declare function localizeLookBuilderCall(host: LookAnalysisHost, rewrite: LookFilterRewrite): { readonly call: string; readonly missingImports: readonly string[]; }; /** Rewrites either a Look entry expression or the synthetic value of a JSX Look directive. */ export declare function lookBuilderRewrite(host: LookAnalysisHost, value: Expression, call: string, site: LookValueSite, missingImports: readonly string[]): readonly DiagnosticEdit[]; /** * The one import edit a Look rewrite needs, or none when the import line it * would write is the line already there. * * D114 WB-I2: a rewrite gives a module a name and can equally take one away. * `color("var(--brand)")` becomes `token("--brand")`, and the run that made that * edit knew both that `token` had to arrive and that this was the module's last * read of `color` — yet it left the dead specifier behind, so `velar fix` * finished by writing an import of a builder the file no longer calls. `retiring` * names the locals the rewrite consumes the last read of; a name still read * somewhere else keeps its specifier. */ export declare function lookImportEdits(host: LookAnalysisHost, builders: readonly string[], retiring?: readonly string[]): readonly DiagnosticEdit[]; //# sourceMappingURL=edits.d.ts.map