/** * The one table that says which DaisyUI slot each `--pie-*` token comes from, * and one renderer that turns it into variables. Sole source: the `daisyui` * provider adapter is the only thing that reads it, and a host reaches it by * mounting `` or leaving `provider` on `auto`. * * It was consolidated here after the same table had been written out four * times — this adapter, two mappers in a separate `pie-theme-daisyui` package, and * that package's static `bridge.css` — and copies drift. Two defects lived in the * drift: `--pie-missing` was corrected to `--color-warning` in one copy while three * kept it on `--color-error`, and the parity test meant to catch that compared only * the token names, never the slot each one derived from. The copies are gone; the * package was removed once its CSS turned out to be outranked by the inline * variables `` writes, leaving it inert wherever it was imported. */ import { type ColorMeasure } from "./contrast.js"; /** The DaisyUI slots this mapping reads. Not all of DaisyUI's palette. */ export type DaisySlot = "base100" | "base200" | "base300" | "baseContent" | "primary" | "secondary" | "accent" | "neutral" | "neutralContent" | "success" | "error" | "warning"; export declare const DAISY_SLOT_CSS_VARIABLES: Record; export type DaisyMappingEntry = /** The slot, verbatim. */ { token: string; kind: "direct"; from: DaisySlot; } /** A fixed blend, for tints and shades that are not contrast-critical. */ | { token: string; kind: "mix"; from: DaisySlot; towards: DaisySlot; weight: number; } /** * The slot if it already clears `minimum` against the page, otherwise the * largest share of it that does. For the tokens PIE paints as a foreground or * as the boundary of a control, where a DaisyUI surface slot taken verbatim is * unreadable. */ | { token: string; kind: "legible"; from: DaisySlot; minimum: number; fallbackWeight: number; } /** * A fill painted behind text that keeps the page's ink: moved toward that ink * until it clears 3:1 against the page, but never so far that the ink on it * drops under 4.5:1. */ | { token: string; kind: "state-fill"; from: DaisySlot; }; export declare const DAISYUI_PIE_TOKEN_MAP: readonly DaisyMappingEntry[]; /** * @param read one DaisyUI slot's value, or `undefined` when this source has none * @param measure resolves a colour so `legible` entries can be corrected against * a measured ratio. Omit it where the values are `var()` references rather than * colours: those cannot be measured, and every `legible` entry then takes its * pessimistic fixed weight instead. */ export declare function resolveDaisyPieVariables(args: { read: (slot: DaisySlot) => string | undefined; measure?: ColorMeasure | null; }): Record;