StorybookAdapter
Defined in: packages/core/src/capture/storybook.ts:161
Discovers stories from a built Storybook via its index file.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new StorybookAdapter():
StorybookAdapter
Returns
Section titled “Returns”StorybookAdapter
Properties
Section titled “Properties”
readonlyname:"storybook"="storybook"
Defined in: packages/core/src/capture/storybook.ts:162
Implementation of
Section titled “Implementation of”screenshotSelector
Section titled “screenshotSelector”
readonlyscreenshotSelector:"#storybook-root"="#storybook-root"
Defined in: packages/core/src/capture/storybook.ts:163
Implementation of
Section titled “Implementation of”StorySourceAdapter.screenshotSelector
Methods
Section titled “Methods”buildUrl()
Section titled “buildUrl()”buildUrl(
baseUrl,storyId,globals?):string
Defined in: packages/core/src/capture/storybook.ts:184
Parameters
Section titled “Parameters”baseUrl
Section titled “baseUrl”string
storyId
Section titled “storyId”string
globals?
Section titled “globals?”Record<string, unknown>
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”discover()
Section titled “discover()”discover(
source,options?):Promise<StoryEntry[]>
Defined in: packages/core/src/capture/storybook.ts:165
Parameters
Section titled “Parameters”source
Section titled “source”string
options?
Section titled “options?”DiscoverOptions = {}
Returns
Section titled “Returns”Promise<StoryEntry[]>
Implementation of
Section titled “Implementation of”discoverTests()
Section titled “discoverTests()”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.
Parameters
Section titled “Parameters”source
Section titled “source”string
Returns
Section titled “Returns”Promise<StoryEntry[]>
loadDependencyGraph()
Section titled “loadDependencyGraph()”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.
Parameters
Section titled “Parameters”source
Section titled “source”string
Returns
Section titled “Returns”Promise<DepGraph | null>