Skip to content

StorybookAdapter

Defined in: packages/core/src/capture/storybook.ts:161

Discovers stories from a built Storybook via its index file.

new StorybookAdapter(): StorybookAdapter

StorybookAdapter

readonly name: "storybook" = "storybook"

Defined in: packages/core/src/capture/storybook.ts:162

StorySourceAdapter.name


readonly screenshotSelector: "#storybook-root" = "#storybook-root"

Defined in: packages/core/src/capture/storybook.ts:163

StorySourceAdapter.screenshotSelector

buildUrl(baseUrl, storyId, globals?): string

Defined in: packages/core/src/capture/storybook.ts:184

string

string

Record<string, unknown>

string

StorySourceAdapter.buildUrl


discover(source, options?): Promise<StoryEntry[]>

Defined in: packages/core/src/capture/storybook.ts:165

string

DiscoverOptions = {}

Promise<StoryEntry[]>

StorySourceAdapter.discover


discoverTests(source): Promise<StoryEntry[]>

Defined in: packages/core/src/capture/storybook.ts:176

The .test() entries of a Storybook 10 build (index subtype: "test"), which discover leaves out. Empty for older Storybooks, whose index has no such entries.

string

Promise<StoryEntry[]>


loadDependencyGraph(source): Promise<DepGraph | null>

Defined in: packages/core/src/capture/storybook.ts:196

Load the Vite stats dependency graph of an extracted build for affected capture. Resolves null when the build ships no usable stats, in which case the orchestrator renders every story.

string

Promise<DepGraph | null>

StorySourceAdapter.loadDependencyGraph