histoire
Version:
A fast story book powered by Vite
34 lines • 1.54 kB
TypeScript
import type { HistoireSettings } from '@histoire/protocol';
import type { NodeArtifact } from '../../deploy/artifact-reader.js';
import type { CatalogStory } from './types.js';
/** Reads exact immutable capture targets/settings from copied static or Node output. */
export declare function readBuiltPreviewSnapshot(directory: string): Promise<Readonly<{
outputRoot: string;
publicRoot: string;
mode: "node" | "static";
base: string;
buildId: any;
defaults: Pick<HistoireSettings, "backgroundColor" | "colorScheme" | "globals" | "textDirection">;
catalog: import("@histoire/protocol").HistoireCatalog;
/** Exact immutable story authority independent of live project files. */
getStory(storyId: string): {
projectId: string;
revision: string;
story: CatalogStory;
};
/** Exact scoped variant lookup never silently chooses duplicates. */
getTarget(storyId: string, variantId: string): {
projectId: string;
revision: string;
story: CatalogStory;
variant: {
id: string;
title: string;
};
};
}>>;
/** Validated immutable output target authority consumed by owned preview host. */
export type BuiltPreviewSnapshot = Awaited<ReturnType<typeof readBuiltPreviewSnapshot>>;
/** First-party HTTP adapter reuses exact captured artifact without rereading private metadata. */
export declare function getBuiltNodeArtifact(snapshot: BuiltPreviewSnapshot): NodeArtifact | undefined;
//# sourceMappingURL=built.d.ts.map