export interface StorybookSource {
kind: "static" | "url";
base: string;
index: unknown;
}
export interface StoryRef {
id: string;
title: string;
url: string;
}
/**
* Locates a pre-built Storybook. URL wins if given. Otherwise checks the
* explicit `dir` (relative to repoRoot or absolute) then the conventional
* `storybook-static/`, looking for `index.json` (v7+) or `stories.json`
* (legacy). Returns null when none is found — the caller treats this as N/A.
*/
export declare function resolveStorybook(repoRoot: string, opts: {
dir?: string;
url?: string;
}): StorybookSource | null;
/**
* Enumerates non-docs stories from the resolved index. For URL sources with no
* pre-loaded index, fetches `/index.json` best-effort (returns [] on any
* failure — never throws). Sorted by id for determinism.
*/
export declare function listStories(source: StorybookSource): Promise;