/** * Design tokens and the idempotent stylesheet injector shared by every * dshloader UI component. * * Tokens are the DSH shell's own CSS custom properties, each paired with a * fallback so a component still renders sanely when the shell changes or the * plugin is previewed outside it. The names were harvested from the shell * styling the plugins in this family already rely on; when dsh renames one, * this file is the single place to fix. * * @module @dsh-plugin/dsh-loader/ui/style */ /** `var(--name, fallback)` — a token reference that degrades instead of breaking. */ export declare function token(name: string, fallback: string): string; /** The DSH shell tokens dshloader components consume. */ export declare const T: { /** Primary body text. */ readonly labelPrimary: string; /** Secondary / supporting text. */ readonly labelSecondary: string; /** Tertiary text (hints, units). */ readonly labelTertiary: string; /** Caption / disabled text. */ readonly labelCaption: string; /** Page / card background. */ readonly bgBase: string; /** Raised surface inside a page (shell layer 1). */ readonly bgLayer1: string; /** Subtle raised surface. */ readonly bgSubtle: string; /** Hover wash for interactive rows. */ readonly bgHover: string; /** Default control border. */ readonly border: string; /** Lighter divider. */ readonly borderSubtle: string; /** Primary button fill — the shell's own button colour, NOT the brand accent. */ readonly buttonPrimaryFill: string; /** Text placed on top of {@link buttonPrimaryFill}. */ readonly buttonPrimaryForeground: string; /** Brand accent (checked states, focus rings). */ readonly accent: string; /** Accent text placed on top of the accent fill. */ readonly accentOn: string; /** Destructive accent. */ readonly danger: string; /** Success state (saved confirmations). */ readonly success: string; /** Monospace stack for code / paths. */ readonly fontCode: string; }; /** * Shared control geometry so every dshloader control lines up. * * The values mirror the shell's native settings-page metrics (as established by * dsh-auxiliary's section): pill-shaped primary buttons at height 32, inputs at * height 28 with radius 6, cards with radius 10 and padding 16. */ export declare const G: { /** Control height for inputs / selects. */ readonly controlHeight: 28; /** Compact control height. */ readonly controlHeightSm: 24; /** Primary button height (the shell's buttons run taller than inputs). */ readonly buttonHeight: 32; /** Standard corner radius (inputs). */ readonly radius: 6; /** Card corner radius. */ readonly cardRadius: 10; /** Pill radius (primary buttons, switches, chips). */ readonly radiusPill: 999; /** Horizontal padding inside an input. */ readonly padX: 8; /** Horizontal padding inside a primary button. */ readonly padXButton: 14; /** Standard row gap. */ readonly gap: 8; /** Base font size. */ readonly fontSize: 13; /** Small font size (descriptions). */ readonly fontSizeSm: 12; }; /** * Inject a stylesheet once, tagged with the DSH client-module ownership * attributes (`data-plugin` / `data-plugin-css`) so the HMR driver can reclaim * it. Calling this repeatedly with the same `cssId` is a no-op. * * @param pluginId - owning plugin id (package name), for `data-plugin`. * @param cssId - stylesheet id within the plugin, e.g. `'ui/components.css'`. * @param css - the stylesheet text. * @returns a disposer removing the tag, for callers that want one. */ export declare function injectStyle(pluginId: string, cssId: string, css: string): () => void; /** The class-name prefix every dshloader UI class carries. */ export declare const CX = "dshl"; /** Join truthy class names. */ export declare function cx(...parts: Array): string;