/** * v1.7.0: CSS generator. * * Turns the new CSS-architecture options (tokens, typeTokens, darkMode, scope, * cssInjection, cssLayer) into a CSS string that the Astro integration injects * alongside the bundled theme file. * * Design goals: * - Backward-compatible: emits nothing when no v1.7.0 options are set. * - No mutation of bundled theme CSS — this generator produces *additional* * override CSS that runs after the theme. * - Composable: every option is independent. Setting `tokens` alone emits * a `:root` block; setting `typeTokens` alone emits per-type variables; * setting `darkMode.strategy: 'class'` emits a `.dark { ... }` wrapper. * * v1.9.0: also exports `generateMinimalThemeCss(opts)` which produces a * complete-but-minimal theme CSS containing only the base styles + the * enabled callout types. Use this INSTEAD of importing the full bundled * `styles.css` when you've restricted types via `types.enable`/`disable`. * * @module css-generator */ import type { RemakeBlocksOptions } from "./types.js"; /** * Generate the full CSS string for the v1.7.0 options. * * Returns an empty string when no v1.7.0 options are set, so the Astro * integration can skip injection entirely. * * The output is wrapped in `@layer { ... }` when `cssInjection: 'layer'`, * with a leading `@layer ;` declaration so the layer exists. */ export declare function generateCss(opts: RemakeBlocksOptions): string; /** * v1.9.0: Generate a complete-but-minimal theme CSS containing only the base * styles and the enabled callout types. * * Use this INSTEAD of importing the full bundled `styles.css` when you've * restricted types via `types.enable` or `types.disable`. For a 5-type * allowlist, this reduces theme CSS from ~28KB to ~5KB. * * The generated CSS contains: * 1. `:root` block with layout variables + per-type `--callout-{type}-border/bg` * for ONLY the enabled types. * 2. Base structural rules (`.callout`, `.callout-title`, `.callout-body`, * `.callout-icon`, etc.) — these are always included. * 3. Per-type class rules (`.callout-{type}`) for ONLY the enabled types. * 4. Dark mode `:root` override (using the same `--callout-{type}-*` vars). * * Note: dark mode values are derived from the light mode palette by darkening * backgrounds. For full dark-mode fidelity, import the full bundled theme. * * @example * ```ts * import { generateMinimalThemeCss } from '@dr-ishaan/remake-blocks'; * * const css = generateMinimalThemeCss({ * types: { enable: ['note', 'tip', 'warning'] } * }); * // Inject `css` into your site's instead of importing styles.css * ``` */ export declare function generateMinimalThemeCss(opts: RemakeBlocksOptions): string; //# sourceMappingURL=css-generator.d.ts.map