/** * Built-in badge presets. * * A preset pairs a Tabler filled icon with a sensible semantic color * AND a layering strategy: a white backing disc + the icon on top. This * fixes the transparent-cutout problem where a Tabler filled icon like * `circle-check` paints the check shape by *omitting* fill — without a * backing, the check turns whatever is behind the icon (usually the * tinted node ring). * * Usage: * * badges: ['check'] // default top-right * badges: [{ preset: 'check', position: 'bottom-left' }] * badges: ['check', 'alert'] // multiple presets stack * badges: [{ preset: 'check' }, { icon: … }] // mixed with explicit badges * * Preset layers are already-resolved raw SVG strings (they call * `tablerFilled` at module init), so they pass through the icon * resolver untouched. */ import type { NodeBadge, BadgePosition, SvgFragment } from './types.js'; /** Reference to a preset by name with optional positional overrides. */ export interface BadgePresetRef { preset: string; position?: BadgePosition; size?: number; } /** * Badge input accepted on NodeDef.badges. May be: * - A preset name: 'check' * - A preset reference with overrides: { preset: 'check', position: 'bottom-left' } * - An explicit NodeBadge (raw control) */ export type BadgeSpec = string | BadgePresetRef | NodeBadge; /** A single visual layer in a preset — no position/size (caller decides). */ interface PresetLayer { icon: SvgFragment; color?: string; iconTheme?: 'theme' | 'native'; } interface BadgePreset { layers: PresetLayer[]; } export declare const BADGE_PRESETS: Record; export interface UnknownPresetError { preset: string; } /** * Expand every BadgeSpec into a flat NodeBadge[] ready for rendering. * Unknown preset names are collected in `errors` (when provided) and * produce no badge output. The caller can surface those as warnings. */ export declare function expandBadges(specs: BadgeSpec[], errors?: UnknownPresetError[]): NodeBadge[]; /** True when `x` is a preset spec (string or { preset: … }). */ export declare function isPresetSpec(x: BadgeSpec): x is string | BadgePresetRef; export {}; //# sourceMappingURL=badges.d.ts.map