UNPKG

histoire

Version:

A fast story book powered by Vite

21 lines • 1.49 kB
import type { ServerStoryFile } from '@histoire/shared'; import type { Context } from './context.js'; /** Registers collection feedback for one captured project context. */ export declare function onStoryChange(ctx: Context, handler: (file?: ServerStoryFile) => unknown): () => void; /** Requests collection without notifying another project's listeners. */ export declare function notifyStoryChange(ctx: Context, file?: ServerStoryFile): void; /** Registers inventory changes owned by one project. */ export declare function onStoryListChange(ctx: Context, handler: () => unknown): () => void; /** Announces structural changes to the captured project inventory. */ export declare function notifyStoryListChange(ctx: Context): void; /** Watches one project and exposes completion of its initial filesystem scan. */ export declare function watchStories(context: Context): Promise<import("chokidar").FSWatcher & { ready: Promise<void>; }>; /** Registers one physical or generated story without duplicating its path. */ export declare function addStory(context: Context, relativeFilePath: string, virtualModuleCode?: string): ServerStoryFile; /** Removes a registered story using its project-relative path. */ export declare function removeStory(context: Context, relativeFilePath: string): void; /** Scans a project once; does not replace another live watcher's context. */ export declare function findAllStories(context: Context): Promise<void>; //# sourceMappingURL=stories.d.ts.map