/** * What a Look value may be written as, and the sentence that says so when it is * written as something else: the multi-token shorthand strings that have a * checked builder equivalent, the CSS filter functions that rewrite into filter * builders, and the keyword vocabulary a property publishes once a written * value falls outside it. * * D115 P4 R3a: this is the Look *vocabulary* half of the analyzer's Look work — * a value and a property name in, a rewrite or a sentence out — and it reads * nothing the analyzer is carrying, so it reads as a module. */ import { type Expression } from "@velarscript/compiler/extension"; import { type LookPropertyValueKind } from "../look.ts"; export declare function numericLiteral(expression: Expression | null): number | null; export declare function lookDurationLiteral(expression: Expression | null): number | null; export declare function lookShorthandStringGuidance(name: string, value: Expression): string | null; export interface LookFilterRewrite { readonly call: string; readonly builders: readonly string[]; } export declare function lookFilterRewrite(text: string): LookFilterRewrite | null; /** * D104 rule 2 — what a refusal says when two entries in one scope write the * same CSS declaration. Written once because two positions raise it: a Look * block's entries and an element's `look:` directives lower to the same * one-rule-per-property stylesheet, so they have the same defect and deserve * the same sentence (D57 rule 134). * * The message leads with the mechanism, because the pair is legal CSS and the * author has every reason to expect source order to settle it. It does not * here: see LOOK_SHORTHAND_LONGHANDS for why the winner is decided module-wide. */ export declare function lookShorthandOverlapMessage(shorthand: string, longhand: string, subject: string): string; export declare const lookCssWideKeywords: Set; export declare const lookMetricKeywords: Set; /** * D73 rule 187: what a refusal says the property's *other* half is, so the * keyword list it goes on to print reads as the keyword half of a real value * space rather than as the whole of it. */ export declare function lookVocabularyLead(kind: LookPropertyValueKind): string; export declare const lookColorKeywords: Set; /** * D67 rule 174 — what a rejected Look string could have been. * * The message this replaces said "use one of the closed `name` keywords" and * stopped there, so the answer to "which ones?" lived only in the source of the * table. The evidence that this is not a hypothetical reader problem is that * the usage tour — written by someone who knew the design intent — shipped * twelve values no property had, and this diagnostic could not have told him. * * A near miss gets the one spelling meant, because naming the single correct * word is the strongest form of the promise. Otherwise a set small enough to * read is written out whole, and a larger one says what it holds. The CSS-wide * keywords join the search either way, so a misspelled `inherit` is caught the * same as a misspelled `groove`. */ export declare function lookVocabularyGuidance(property: string, written: string, own: readonly string[], lead: string): LookValueGuidance; export interface LookValueGuidance { /** The clause that follows "does not accept 'value';". */ readonly text: string; /** * Whether the clause named the one spelling the author meant. When it did, * the property's recorded exclusion is left off: the record answers "why is * my value not here?", and that question is not the one a misspelling asks. */ readonly named: boolean; } /** * Every string this expression can be when it is written out of literals alone * — one literal, or a ternary whose branches are literals all the way down. * Answers null when a value is decided anywhere else, which is the signal that * a check reading it has nothing static to look at. */ export declare function literalStringValues(expression: Expression): readonly string[] | null; //# sourceMappingURL=look-vocabulary-guidance.d.ts.map