/* tslint:disable */ /* eslint-disable */ export class Output { private constructor(); free(): void; [Symbol.dispose](): void; /** * Get the code */ readonly code: string; /** * Get the css */ readonly css: string | undefined; readonly cssFile: string | undefined; readonly map: string | undefined; readonly updatedBaseStyle: boolean; } export function codeExtract(filename: string, code: string, _package: string, css_dir: string, single_css: boolean, import_main_css_in_code: boolean, import_main_css_in_css: boolean, import_aliases: any): Output; export function codeExtractWithoutSourceMap(filename: string, code: string, _package: string, css_dir: string, single_css: boolean, import_main_css_in_code: boolean, import_main_css_in_css: boolean, import_aliases: any): Output; export function exportCanonicalMap(): string; export function exportClassMap(): string; export function exportFileMap(): string; export function exportSheet(): string; export function getCss(file_num: number | null | undefined, import_main_css: boolean): string; export function getDefaultTheme(): string | undefined; export function getPrefix(): string | undefined; export function getThemeInterface(package_name: string, color_interface_name: string, typography_interface_name: string, length_interface_name: string, shadows_interface_name: string, theme_interface_name: string): string; export function hasDevupUI(filename: string, code: string, _package: string): boolean; export function importCanonicalMap(map_object: any): void; export function importClassMap(sheet_object: any): void; export function importFileMap(sheet_object: any): void; /** * Import the file -> set-of-route-ids mapping used to decide atom hoisting. * * Accepts a JS object like `{ "src/page.tsx": [0, 3], "src/card.tsx": [0] }` * where each value is the set of leaf-route ids whose render closure includes * that file. Populated by the build-time pre-pass. */ export function importFileRoutes(map_object: any): void; export function importSheet(sheet_object: any): void; export function isDebug(): boolean; export function registerShorthands(shorthands: any): void; export function registerTheme(theme_object: any): void; /** * Set the atom-level hoist threshold. * * When set to `Some(n)`, a style atom whose content is used by `>= n` distinct * routes is emitted into the shared global `devup-ui.css` (shipped once) instead * of duplicated into each per-route chunk. `None` (the default) disables atom * hoisting entirely (identity behavior). * * MUST be called BEFORE `codeExtract` so atoms receive global (shared) class * names; enabling it afterwards leaves per-file names and nothing hoists. * Pair with `importFileRoutes` to provide the file -> routes mapping. */ export function setAtomHoist(threshold?: number | null): void; export function setDebug(debug: boolean): void; /** * Set the CSS class name prefix * * # Example (Vite Config) * ```javascript * import init, { setPrefix, codeExtract } from 'devup-ui-wasm'; * * export default { * plugins: [ * { * name: 'devup-ui', * apply: 'pre', * async configResolved() { * await init(); * setPrefix('du-'); // Set prefix to 'du-' * }, * // ... other plugin code * } * ] * } * ``` * * # Example (Next.js Plugin) * ```typescript * import init, { setPrefix } from 'devup-ui-wasm'; * * const withDevupUI = (nextConfig) => { * return { * ...nextConfig, * webpack: (config, options) => { * if (!options.isServer && !global.devupUIInitialized) { * init().then(() => { * setPrefix('du-'); * global.devupUIInitialized = true; * }); * } * return config; * } * }; * }; * ``` */ export function setPrefix(prefix?: string | null): void;