histoire
Version:
A fast story book powered by Vite
59 lines • 2.78 kB
TypeScript
import type { ProjectRuntimeHandle } from '../types.js';
import type { SnapshotOptions } from './types.js';
/** Obtains canonical provider without duplicate collector observers or source readers. */
export declare function attachRuntimeCatalog(runtime: ProjectRuntimeHandle, options: SnapshotOptions): {
catalog: {
readonly current: import("./types.js").CatalogSnapshot;
readonly updating: boolean;
readonly executionRevision: number;
markUpdating(): void;
subscribe(listener: (snapshot: import("./types.js").CatalogSnapshot) => void): () => void;
publish(ctx: import("../../context.js").Context, outcomes?: ReadonlyMap<string, import("../../collect/outcome.js").StoryCollectionOutcome>): Promise<import("./types.js").CatalogSnapshot>;
getStory(storyId: string, expectedRevision?: string): {
projectId: string;
revision: string;
story: import("./types.js").CatalogStory;
};
getTarget(storyId: string, variantId: string, expectedRevision?: string): {
projectId: string;
revision: string;
story: import("./types.js").CatalogStory;
variant: {
id: string;
title: string;
};
};
};
ready: Promise<void>;
/** Invalidates immediately; outstanding hashing cannot publish after disposal. */
close(): void;
};
/** Looks up shared generation publication without creating another provider or collector. */
export declare function getRuntimeCatalogForContext(context: ProjectRuntimeHandle['context']): {
catalog: {
readonly current: import("./types.js").CatalogSnapshot;
readonly updating: boolean;
readonly executionRevision: number;
markUpdating(): void;
subscribe(listener: (snapshot: import("./types.js").CatalogSnapshot) => void): () => void;
publish(ctx: import("../../context.js").Context, outcomes?: ReadonlyMap<string, import("../../collect/outcome.js").StoryCollectionOutcome>): Promise<import("./types.js").CatalogSnapshot>;
getStory(storyId: string, expectedRevision?: string): {
projectId: string;
revision: string;
story: import("./types.js").CatalogStory;
};
getTarget(storyId: string, variantId: string, expectedRevision?: string): {
projectId: string;
revision: string;
story: import("./types.js").CatalogStory;
variant: {
id: string;
title: string;
};
};
};
ready: Promise<void>;
/** Invalidates immediately; outstanding hashing cannot publish after disposal. */
close(): void;
};
//# sourceMappingURL=attachment.d.ts.map