import { Plugin } from "vite"; //#region code/frameworks/angular-vite/.dts-emit/code/frameworks/angular-vite/src/node/vitest.d.ts /** * Collect every ancestor directory of `startDir` (inclusive) that contains a `node_modules` folder, * normalized to Vite's forward-slash convention. All are kept rather than stopping at the first * because Storybook's cache creates a `node_modules/.cache` in the project directory, which would * otherwise shadow the real workspace root (e.g. an Angular workspace, where dependencies live at * the root above `projects//`). */ declare const findNodeModulesRoots: (startDir: string) => string[]; /** * Angular build options that influence how stories compile under Vitest. * Known keys give autocomplete; the index signature is NOT speculative — it * models Angular's genuinely open-ended builder-options surface (the framework's * internal type is `Record`, and Angular adds builder options * across versions). The upstream consumer is real and open-ended. */ interface AngularVitestOptions { zoneless?: boolean; styles?: string[]; stylePreprocessorOptions?: { sass?: Record; loadPaths?: string[]; }; assets?: unknown[]; sourceMap?: boolean; preserveSymlinks?: boolean; tsConfig?: string; [key: string]: unknown; } /** * Pure options bridge for standalone `vitest` runs (no parent `storybook dev`). * Add to your `vitest.config.ts` `plugins` array alongside `storybookTest`. The * env var is set SYNCHRONOUSLY in this factory body — before storybookTest's * inline `presets.apply('viteFinal')` reads it — so timing does not depend on * Vite plugin-hook ordering. Returns a near-noop plugin only so it lives in the * `plugins` array (which is how the addon-vitest postinstall injects it). * * Does NOT register `@analogjs/vite-plugin-angular`; the framework's own * `viteFinal` still injects analog. This only carries Angular build options * into the env channel the framework already consumes. */ declare function storybookAngularVitest(options?: AngularVitestOptions): Plugin; //#endregion export { AngularVitestOptions, findNodeModulesRoots, storybookAngularVitest };