/** * tweakcn integration — parse themes exported from tweakcn.com * (Apache-2.0, https://github.com/jnsahaj/tweakcn) into Memoire DesignTokens. * * tweakcn produces CSS blocks like: * * :root { * --background: 0 0% 100%; * --primary: 221.2 83.2% 53.3%; * --radius: 0.5rem; * } * .dark { --background: 222.2 84% 4.9%; ... } * * or Tailwind v4 @theme syntax: * * @theme { * --color-primary: oklch(0.6 0.18 250); * --radius-md: 0.5rem; * } * * We accept both. Output is a `DesignToken[]` that plugs straight into * the publisher and `generateTailwindV4Theme()`. */ import type { DesignToken } from "../engine/registry.js"; /** Infer the DesignToken type from a CSS variable name. */ export declare function inferTokenType(name: string): DesignToken["type"]; export interface ParsedTweakcnTheme { tokens: DesignToken[]; /** Per-mode value maps (e.g. "default", "dark") for tokens that appeared in both :root and .dark */ hasDarkMode: boolean; } /** * Parse a tweakcn-exported CSS block into Memoire DesignTokens. * * Handles both v3 (`:root { ... } .dark { ... }`) and v4 (`@theme { ... }`) syntax. * Tokens appearing in both `:root` and `.dark` become multi-mode tokens * (values = { default, dark }). */ export declare function parseTweakcnCss(css: string): ParsedTweakcnTheme; /** * Fetch a tweakcn theme from a URL (share link, raw CSS, or any public * HTTPS URL). Returns the raw CSS text. */ export declare function fetchTweakcnTheme(url: string, timeoutMs?: number): Promise;