/** * Style CSS Compiler -- `StyleDef` to scoped CSS with `@layer`, `@scope`, * `@starting-style`. * * Emits component-scoped CSS using modern CSS features: * - `@layer czap.components` for cascade ordering * - `@scope` for DOM subtree containment * - `@starting-style` for entry animations * - `@container` queries via {@link CSSCompiler} delegation for boundary states * * @module */ import type { Style } from '@czap/core'; /** * Output of {@link StyleCSSCompiler.compile}. * * Three complementary serializations: `scoped` is the raw `@scope`-wrapped * rule block, `layers` is the same content re-wrapped in * `@layer czap.components { … }` with any boundary `@container` rules * appended, and `startingStyle` is an `@starting-style` block derived from * the base layer for entry animations. */ export interface StyleCSSResult { /** `@scope`-wrapped rule block (or plain rules when no component name). */ readonly scoped: string; /** `@layer czap.components { … }` block including container queries. */ readonly layers: string; /** `@starting-style { … }` block for entry animations (may be empty). */ readonly startingStyle: string; } /** * Compile a {@link Style.Shape} into layered, scoped CSS. * * When `componentName` is supplied the output is wrapped in an `@scope` * block targeting `.czap-` and bounded at `[data-czap-slot]` * children. Boundary states are compiled into nested `@container` rules * via the core {@link CSSCompiler}. */ declare function compile(style: Style.Shape, componentName?: string): StyleCSSResult; /** * Style CSS compiler namespace. * * Compiles a {@link Style.Shape} into cascade-layered, scoped CSS using * `@layer`, `@scope`, `@starting-style`, and `@container` — the modern CSS * features that let czap deliver component isolation and state-driven * restyling without runtime class toggling. */ export declare const StyleCSSCompiler: { /** Compile a style definition into scoped, layered CSS. */ readonly compile: typeof compile; }; export {}; //# sourceMappingURL=style-css.d.ts.map