/** * `@czap/vite` — **LiteShip** Vite 8 plugin: turns `@token` / `@theme` / * `@style` / `@quantize` at-rule blocks into native CSS and **rigs** HMR for * `@czap/*` definitions. * * The plugin hooks into Vite's `resolveId`, `load`, `transform`, and * `handleHotUpdate` phases: * * - `resolveId` + `load`: map `virtual:czap/*` specifiers to generated * modules (device capabilities, WASM URL, ...). * - `transform`: rewrite `@token`, `@theme`, `@style`, and `@quantize` * at-rule blocks into native CSS (custom properties, * `html[data-theme]` selectors, scoped `@layer` / `@scope` rules, * and `@container` queries). * - `handleHotUpdate`: emit surgical HMR payloads so CSS variables, * shader uniforms, and boundary definitions update without a full * page reload. * * Definitions are discovered by convention (`tokens.ts` / `*.tokens.ts`, * `themes.ts` / `*.themes.ts`, ... next to the referencing file, then at * the project root) — no listing required. Override the search directory * per primitive kind via {@link PluginConfig.dirs}. * * @example * ```ts * // vite.config.ts * import { defineConfig } from 'vite'; * import { czap } from '@czap/vite'; * * const config = defineConfig({ * plugins: [czap({ dirs: { theme: 'src/themes' }, hmr: true })], * }); * ``` * * @module */ export type { PluginConfig } from './plugin.js'; export { plugin } from './plugin.js'; export { plugin as czap } from './plugin.js'; export { resolveWASM } from './wasm-resolve.js'; export type { WASMResolution } from './wasm-resolve.js'; export type { QuantizeBlock, QuantizeStateBody, QuantizeNestedRule, QuantizeAtRuleGroup, QuantizeSheetContext, } from './css-quantize.js'; export { parseQuantizeBlocks, compileQuantizeBlock, viewportContainmentRule } from './css-quantize.js'; export type { TokenBlock } from './token-transform.js'; export { parseTokenBlocks, compileTokenBlock } from './token-transform.js'; export type { ThemeBlock } from './theme-transform.js'; export { parseThemeBlocks, compileThemeBlock } from './theme-transform.js'; export type { StyleBlock } from './style-transform.js'; export { parseStyleBlocks, compileStyleBlock } from './style-transform.js'; export { transformHTML } from './html-transform.js'; export type { VirtualModuleId, VirtualModuleData } from './virtual-modules.js'; export { resolveVirtualId, isVirtualId, loadVirtualModule } from './virtual-modules.js'; export type { CollectBoundaryManifestOptions } from './boundary-manifest.js'; export { collectBoundaryManifest, serializeBoundaryOutput } from './boundary-manifest.js'; export type { CollectTokenManifestOptions, CollectThemeManifestOptions, TokenManifest, TokenManifestEntry, ThemeManifest, ThemeManifestEntry, } from './token-manifest.js'; export { collectTokenManifest, collectThemeManifest, compileCollectedTokensCss } from './token-manifest.js'; export type { HMRPayload } from './hmr.js'; export { handleHMR } from './hmr.js'; export type { PrimitiveKind, PrimitiveResolution, PrimitiveShape } from './primitive-resolve.js'; export { resolvePrimitive, primitiveSearchPatterns } from './primitive-resolve.js'; //# sourceMappingURL=index.d.ts.map