import { StatusBadgeTone } from './status-badge-tints.js'; import { ConditionalRuleColorSource, ConditionalRule } from './table-properties-types.js'; /** * Colour sources for conditional formatting rules. * * A rule paints one CSS value (`ConditionalRule.bgColor`), and this module is * where that value comes from: * * palette → `RULE_COLORS`, translucent tints over the row background * status → `--status-badge-*-fill`, the exact fills the status chips use, so * "highlight the overdue rows" and the Overdue badge agree. The * tokens are redefined per theme and per high-contrast mode, so the * fill flips with the surface instead of stranding light ink on a * light fill. * custom → the user's colour, wrapped at the palette's tint strength. Tinting * rather than filling is what keeps body text above the contrast * floor in both themes without pairing an ink per rule (P8). */ declare const CONDITIONAL_RULE_COLOR_SOURCES: { value: ConditionalRuleColorSource; label: string; }[]; /** Status badge fills, in the DS tone order (success · info · caution · danger · neutral). */ declare const STATUS_RULE_COLORS: { name: string; tone: StatusBadgeTone; bg: string; }[]; /** Matches the palette tokens' own strength (`--conditional-rule-*` in globals.css). */ declare const CUSTOM_RULE_TINT_PERCENT = 22; declare const DEFAULT_CUSTOM_RULE_COLOR = "#2f6feb"; declare function customRuleBackground(color: string): string; /** The colour inside a custom tint, or `undefined` when `bg` is not one. */ declare function customRuleColorFromBackground(bg: string): string | undefined; /** * Which picker a rule belongs to. Rules saved before colour sources existed have * no `colorSource`, so their background is matched against the known palettes * and anything else is treated as a colour the user chose. */ declare function resolveRuleColorSource(rule: Pick): ConditionalRuleColorSource; /** The colour a custom rule's picker should open on. */ declare function ruleCustomColor(rule: Pick): string; /** The patch that switches a rule to `source`, keeping a sensible colour. */ declare function ruleColorSourcePatch(rule: Pick, source: ConditionalRuleColorSource): Partial; export { CONDITIONAL_RULE_COLOR_SOURCES, CUSTOM_RULE_TINT_PERCENT, DEFAULT_CUSTOM_RULE_COLOR, STATUS_RULE_COLORS, customRuleBackground, customRuleColorFromBackground, resolveRuleColorSource, ruleColorSourcePatch, ruleCustomColor };