import * as _storybook_types from '@storybook/types'; import { StoryId, StoryName, ComponentTitle, StoryIndex, IndexEntry, Path, Args, PreparedStory, Globals, GlobalTypes, Renderer, ModuleExports, CSFFile, NormalizedStoryAnnotations, NormalizedComponentAnnotations, NormalizedProjectAnnotations, ModuleExport, PreparedMeta, StoryContextForLoaders, ModuleImportFn, ProjectAnnotations, StoryContextForEnhancers, Parameters, StoryIndexV3, API_PreparedStoryIndex, BoundStory } from '@storybook/types'; import { SynchronousPromise } from 'synchronous-promise'; import { H as HooksContext } from './hooks-655fa363.js'; type StorySpecifier = StoryId | { name: StoryName; title: ComponentTitle; } | '*'; declare class StoryIndexStore { entries: StoryIndex['entries']; constructor({ entries }?: StoryIndex); entryFromSpecifier(specifier: StorySpecifier): IndexEntry | undefined; storyIdToEntry(storyId: StoryId): IndexEntry; importPathToEntry(importPath: Path): IndexEntry; } declare class ArgsStore { initialArgsByStoryId: Record; argsByStoryId: Record; get(storyId: StoryId): Args; setInitial(story: PreparedStory): void; updateFromDelta(story: PreparedStory, delta: Args): void; updateFromPersisted(story: PreparedStory, persisted: Args): void; update(storyId: StoryId, argsUpdate: Partial): void; } declare class GlobalsStore { allowedGlobalNames: Set; initialGlobals: Globals; globals: Globals; constructor({ globals, globalTypes, }: { globals?: Globals; globalTypes?: GlobalTypes; }); set({ globals, globalTypes }: { globals?: Globals; globalTypes?: GlobalTypes; }): void; filterAllowedGlobals(globals: Globals): Globals; updateFromPersisted(persisted: Globals): void; get(): Globals; update(newGlobals: Globals): void; } declare function processCSFFile(moduleExports: ModuleExports, importPath: Path, title: ComponentTitle): CSFFile; declare function prepareStory(storyAnnotations: NormalizedStoryAnnotations, componentAnnotations: NormalizedComponentAnnotations, projectAnnotations: NormalizedProjectAnnotations): PreparedStory; declare function prepareMeta(componentAnnotations: NormalizedComponentAnnotations, projectAnnotations: NormalizedProjectAnnotations, moduleExport: ModuleExport): PreparedMeta; declare function prepareContext, 'args' | 'argTypes' | 'globals'>>(context: TContext): TContext & Pick, 'allArgs' | 'argsByTarget' | 'unmappedArgs'>; declare class StoryStore { storyIndex?: StoryIndexStore; importFn?: ModuleImportFn; projectAnnotations?: NormalizedProjectAnnotations; globals?: GlobalsStore; args: ArgsStore; hooks: Record>; cachedCSFFiles?: Record>; processCSFFileWithCache: typeof processCSFFile; prepareMetaWithCache: typeof prepareMeta; prepareStoryWithCache: typeof prepareStory; initializationPromise: SynchronousPromise; resolveInitializationPromise: () => void; constructor(); setProjectAnnotations(projectAnnotations: ProjectAnnotations): void; initialize({ storyIndex, importFn, cache, }: { storyIndex?: StoryIndex; importFn: ModuleImportFn; cache?: boolean; }): Promise; onStoriesChanged({ importFn, storyIndex, }: { importFn?: ModuleImportFn; storyIndex?: StoryIndex; }): Promise; storyIdToEntry(storyId: StoryId): Promise; loadCSFFileByStoryId(storyId: StoryId): Promise>; loadAllCSFFiles({ batchSize }?: { batchSize?: number | undefined; }): Promise['cachedCSFFiles']>; cacheAllCSFFiles(): Promise; preparedMetaFromCSFFile({ csfFile }: { csfFile: CSFFile; }): PreparedMeta; loadStory({ storyId }: { storyId: StoryId; }): Promise>; storyFromCSFFile({ storyId, csfFile, }: { storyId: StoryId; csfFile: CSFFile; }): PreparedStory; componentStoriesFromCSFFile({ csfFile, }: { csfFile: CSFFile; }): PreparedStory[]; loadEntry(id: StoryId): Promise<{ entryExports: ModuleExports; csfFiles: CSFFile[]; }>; getStoryContext(story: PreparedStory, { forceInitialArgs }?: { forceInitialArgs?: boolean | undefined; }): Omit; cleanupStory(story: PreparedStory): void; extract(options?: { includeDocsOnly?: boolean; }): Record>; getSetStoriesPayload(): { v: number; globals: _storybook_types.Globals; globalParameters: {}; kindParameters: Parameters; stories: Record>; }; getStoriesJsonData: () => StoryIndexV3; getSetIndexPayload(): API_PreparedStoryIndex; raw(): BoundStory[]; fromId(storyId: StoryId): BoundStory | null; } export { StoryStore as S, prepareMeta as a, processCSFFile as b, prepareContext as c, StorySpecifier as d, prepareStory as p };