import { Plugin } from 'rollup'; import { TypestylesIntegrationMode, TypestylesExtractOptions } from '@typestyles/build-runner'; export { DEFAULT_EXTRACT_MODULE_CANDIDATES, TypestylesExtractOptions, discoverDefaultExtractModules, extractNamespaces } from '@typestyles/build-runner'; interface TypestylesRollupPluginOptions { /** * When true (default), fail the build if the same logical `styles.component` / `styles.class` * namespace appears in more than one module. Set to `false` to skip this check. */ warnDuplicates?: boolean; /** * Integration mode: * - `"runtime"` (default when no extraction modules resolve): no static extraction. * - `"build"`: emit static CSS and disable runtime insertion. * - `"hybrid"`: emit static CSS and keep runtime-compatible behavior. * * When omitted and at least one extraction module resolves (explicit `extract.modules` or a * discovered convention entry), defaults to `"build"`. */ mode?: TypestylesIntegrationMode; /** * Build-time extraction options for `"build"` and `"hybrid"` modes. * * Omitted entirely: discover a convention entry under `root` (see * {@link discoverDefaultExtractModules}); if none exist, stays in runtime-only mode. */ extract?: TypestylesExtractOptions; /** * Project root used to resolve extraction modules and convention discovery. * Defaults to `process.cwd()`. */ root?: string; } /** * Rollup plugin for typestyles runtime + optional static extraction. * * Rolldown supports Rollup-compatible plugins, so this plugin also works * as a starting integration there. */ declare function typestylesRollupPlugin(options?: TypestylesRollupPluginOptions): Plugin; export { type TypestylesRollupPluginOptions, typestylesRollupPlugin as default };