UNPKG

histoire

Version:

A fast story book powered by Vite

17 lines • 1.04 kB
import type { UiScreenshotFile } from '@histoire/shared'; /** Upper-bound a persisted receipt path without shortening any public identity. */ export declare function screenshotFilePathForBudget(target: Pick<UiScreenshotFile, 'storyId' | 'variantId'>, format: 'png' | 'webp'): string; /** Create an exclusive image plus bounded identity metadata for recent captures. */ export declare function saveScreenshotFile(root: string, target: { storyId: string; variantId: string; frameKey?: string; }, format: 'png' | 'webp', artifact: Uint8Array): Promise<UiScreenshotFile>; /** Read only generated, bounded metadata and regular images, never arbitrary files. */ export declare function listScreenshotFiles(root: string, requestId?: string): Promise<UiScreenshotFile[]>; /** Serve only generated image filenames from the checked directory to dev thumbnails. */ export declare function readScreenshotFile(root: string, name: string): Promise<{ bytes: NonSharedBuffer; mimeType: string; }>; //# sourceMappingURL=files.d.ts.map