import type * as CSS from "csstype"; /** * A nested block — used for pseudo-selectors, breakpoint shorthands, and * raw `@media` queries. Only flat CSS properties are allowed inside (no * further nesting). * * Each key preserves its specific csstype value union — e.g. `display` only * accepts `"flex" | "block" | "grid" | ...` not an arbitrary string. * * Examples of valid keys that hold a `CSSNestedBlock`: * - `"&:hover"`, `"&::before"`, `"&:nth-child(2)"`, `"&[disabled]"` * - `"md"`, `"lg"` (breakpoint shorthands) * - `"@media (min-width: 900px)"` (raw media query) */ export type CSSNestedBlock = { [K in keyof CSS.Properties]?: CSS.Properties[K]; } & { [key: string]: CSS.Properties[keyof CSS.Properties] | undefined; }; /** * A flat block of CSS properties. * * Known CSS property keys (camelCase, e.g. `display`, `backgroundColor`) get * full value-level intellisense from csstype — typing `display:` will suggest * `"flex"`, `"block"`, `"grid"`, etc. * * The index signature allows: * - Pseudo-selector keys: `"&:hover"`, `"&::before"`, `"&[disabled]"` … * - Breakpoint shorthands: `"md"`, `"lg"` … * - Raw media queries: `"@media (min-width: 900px)"` … * - CSS custom properties: `"--my-var"` … */ export type CSSBlock = { [K in keyof CSS.Properties]?: CSS.Properties[K]; } & { [key: string]: CSS.Properties[keyof CSS.Properties] | CSSNestedBlock | undefined; }; /** * The full rules object accepted by `css()` and `globalCSS()`. * * Top-level keys are developer-chosen block names (`"button"`, `"card"`, …). * Each block is a `CSSBlock` — typed CSS properties plus optional nested keys * for pseudo-selectors, breakpoint shorthands, or raw `@media` strings. * * @example * ```ts * const cl = css({ * button: { * display: "inline-flex", // ✅ autocompletes "flex" | "block" | … * padding: "0.5rem 1rem", * "&:hover": { opacity: "0.9" }, * "md": { fontSize: "1.125rem" }, * }, * }); * ``` */ export type CSSRulesInput = Record; /** * Configure global CSS-in-JS options. * Shallow-merges additional or override existing breakpoint shorthand keys. * * @example * ```ts * configureCSS({ breakpoints: { md: "900px", "3xl": "1920px" } }); * ``` */ export declare function configureCSS(options: { breakpoints?: Record; }): void; /** * Options for `serializeRules`. */ export interface SerializeOptions { /** When true, use the block name as-is as the CSS class name (no generated suffix). */ literal?: boolean; } /** * Serialize a full `css()` rules object into a monolithic classMap. * * For each named block: * - All plain CSS properties are collected into a single base rule. * - Pseudo-selector blocks (`"&:hover"`, `"&::before"`, …) each become a * separate rule sharing the same class name. * - Breakpoint shorthands (`"md"`, `"lg"`, …) and raw `"@media ..."` keys * each become a separate `@media` rule sharing the same class name. * - Unknown nested object keys throw a descriptive error at call time. * - Invalid or empty blocks produce an empty string entry and no rules. * * Returns `{ blockName → "className" }`. * New CSS rule strings are pushed to `pendingRules` as a side-effect. */ export declare function serializeRules(rules: CSSRulesInput, pendingRules: string[], options?: SerializeOptions): Record; /** * Resets the class counter back to 0 and restores the default breakpoints. * Intended for test isolation only — never call this in production code. */ export declare function resetAtomicCache(): void; //# sourceMappingURL=serialize.d.ts.map