UNPKG

histoire

Version:

A fast story book powered by Vite

31 lines • 1.46 kB
import type { HistoireTestRegistration, StoryFile } from '@histoire/shared'; import type { WithRegistry } from './variant-test-session/registry.js'; interface RenderMountOptions { /** Positions the render host off the viewport so it stays invisible to the user. */ offscreen?: boolean; /** Maximum time to wait for the render-ready event. */ timeoutMs: number; } interface MountedRenderVariant { story: StoryFile['story']; variant: StoryFile['story']['variants'][number]; canvas: HTMLElement; registrations: HistoireTestRegistration[]; /** Story-setup executions caused by this mount (see {@link mountStoryApp}). */ ownExecutionIds: Set<number>; cleanup: () => void; } interface BootstrappedVariant { registrations: HistoireTestRegistration[]; /** Story-setup executions caused by this mount (see {@link mountStoryApp}). */ ownExecutionIds: Set<number>; cleanup: () => void; } /** * Mounts the hidden story bootstrap tree and captures any test registrations * emitted during setup before the render variant mounts. */ export declare function bootstrapVariant(file: StoryFile, variantId: string, withRegistry: WithRegistry, timeoutMs: number): Promise<BootstrappedVariant>; export declare function mountRenderVariant(file: StoryFile, variantId: string, withRegistry: WithRegistry, options: RenderMountOptions): Promise<MountedRenderVariant>; export {}; //# sourceMappingURL=variant-test-mount.d.ts.map