@storybook/types 7.0.0-beta.21 → 7.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +26 -7
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1781,6 +1781,7 @@ type NormalizedStoryAnnotations<TRenderer extends Renderer = Renderer> = Omit<St
|
|
|
1781
1781
|
type CSFFile<TRenderer extends Renderer = Renderer> = {
|
|
1782
1782
|
meta: NormalizedComponentAnnotations<TRenderer>;
|
|
1783
1783
|
stories: Record<StoryId, NormalizedStoryAnnotations<TRenderer>>;
|
|
1784
|
+
moduleExports: ModuleExports;
|
|
1784
1785
|
};
|
|
1785
1786
|
type PreparedStory<TRenderer extends Renderer = Renderer> = StoryContextForEnhancers<TRenderer> & {
|
|
1786
1787
|
moduleExport: ModuleExport;
|
|
@@ -2538,17 +2539,35 @@ type API_RefUrl = string;
|
|
|
2538
2539
|
type StoryRenderOptions = {
|
|
2539
2540
|
autoplay?: boolean;
|
|
2540
2541
|
};
|
|
2542
|
+
/**
|
|
2543
|
+
* What do we know about an of={} call?
|
|
2544
|
+
*
|
|
2545
|
+
* Technically, the type names aren't super accurate:
|
|
2546
|
+
* - meta === `CSFFile`
|
|
2547
|
+
* - story === `PreparedStory`
|
|
2548
|
+
* But these shorthands capture the idea of what is being talked about
|
|
2549
|
+
*/
|
|
2550
|
+
type ResolvedModuleExport<TRenderer extends Renderer = Renderer> = {
|
|
2551
|
+
type: 'component';
|
|
2552
|
+
component: TRenderer['component'];
|
|
2553
|
+
} | {
|
|
2554
|
+
type: 'meta';
|
|
2555
|
+
csfFile: CSFFile<TRenderer>;
|
|
2556
|
+
} | {
|
|
2557
|
+
type: 'story';
|
|
2558
|
+
story: PreparedStory<TRenderer>;
|
|
2559
|
+
};
|
|
2541
2560
|
interface DocsContextProps<TRenderer extends Renderer = Renderer> {
|
|
2542
2561
|
/**
|
|
2543
|
-
* Register
|
|
2544
|
-
* Used by the `<Meta of={} />` block
|
|
2562
|
+
* Register a CSF file that this docs entry uses.
|
|
2563
|
+
* Used by the `<Meta of={} />` block to attach, and the `<Story meta={} />` bloc to reference
|
|
2545
2564
|
*/
|
|
2546
|
-
|
|
2565
|
+
referenceMeta: (metaExports: ModuleExports, attach: boolean) => void;
|
|
2547
2566
|
/**
|
|
2548
|
-
* Find a story
|
|
2549
|
-
* This is
|
|
2567
|
+
* Find a component, meta or story object from the direct export(s) from the CSF file.
|
|
2568
|
+
* This is the API that drives the `of={}` syntax.
|
|
2550
2569
|
*/
|
|
2551
|
-
|
|
2570
|
+
resolveModuleExport: (moduleExport: ModuleExport | ResolvedModuleExport<TRenderer>['type']) => ResolvedModuleExport<TRenderer>;
|
|
2552
2571
|
/**
|
|
2553
2572
|
* Find a story's id from the name of the story.
|
|
2554
2573
|
* This is primarily used by the `<Story name={} /> block.
|
|
@@ -2613,4 +2632,4 @@ interface ComposeStoryFn<TRenderer extends Renderer = Renderer, TArgs extends Ar
|
|
|
2613
2632
|
};
|
|
2614
2633
|
}
|
|
2615
2634
|
|
|
2616
|
-
export { API_ActiveTabsType, API_Addon, API_BaseEntry, API_Collection, API_ComponentEntry, API_ComposedRef, API_ComposedRefUpdate, API_DocsEntry, API_Group, API_GroupEntry, API_HashEntry, API_IframeRenderer, API_Layout, API_LeafEntry, API_MatchOptions, API_Notification, API_OptionsData, API_PanelPositions, API_Panels, API_PreparedStoryIndex, API_Provider, API_ProviderData, API_RefId, API_RefUrl, API_Refs, API_ReleaseNotes, API_RenderOptions, API_Root, API_RootEntry, API_RouteOptions, API_SetRefData, API_Settings, API_SidebarOptions, API_StateMerger, API_StoriesHash, API_Story, API_StoryEntry, API_StoryMapper, API_UI, API_UIOptions, API_UnknownEntries, API_Version, API_Versions$1 as API_Versions, API_ViewMode, Addon_AddStoryArgs, Addon_Annotations, Addon_ArgType, Addon_ArgsStoryFn, Addon_BaseAnnotations, Addon_BaseDecorators, Addon_BaseMeta, Addon_BaseStoryFn, Addon_BaseStoryObject, Addon_ClientApiAddon, Addon_ClientApiAddons, Addon_ClientApiReturnFn, Addon_ClientStoryApi, Addon_Collection, Addon_Comparator, Addon_Config, Addon_DecoratorFunction, Addon_Elements, Addon_LegacyStoryFn, Addon_LoadFn, Addon_Loadable, Addon_Loader, Addon_LoaderFunction, Addon_Loaders, Addon_MakeDecoratorResult, Addon_OptionsParameter, Addon_OptionsParameterV7, Addon_PartialStoryFn, Addon_RenderOptions, Addon_RequireContext, Addon_StoryApi, Addon_StoryContext, Addon_StoryContextUpdate, Addon_StoryFn, Addon_StorySortComparator, Addon_StorySortComparatorV7, Addon_StorySortMethod, Addon_StorySortObjectParameter, Addon_StorySortParameter, Addon_StorySortParameterV7, Addon_StoryWrapper, Addon_ToolbarConfig, Addon_Type, Addon_Types, Addon_TypesEnum, Addon_WrapperSettings, Addons_ArgTypes, AnnotatedStoryFn, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, BaseIndexEntry, BaseStory, BoundStory, Builder, BuilderName, BuilderOptions, BuilderResult, BuilderStats, Builder_EnvsRaw, Builder_Unpromise, Builder_WithRequiredProperty, CLIOptions, CSFFile, ComponentAnnotations, ComponentId, ComponentTitle, ComposeStoryFn, ComposedStory, ComposedStoryPlayContext, ComposedStoryPlayFn, Conditional, CoreCommon_AddonEntry, CoreCommon_AddonInfo, CoreCommon_OptionsEntry, CoreCommon_ResolvedAddonPreset, CoreCommon_ResolvedAddonVirtual, CoreCommon_StorybookInfo, CoreConfig, DecoratorApplicator, DecoratorFunction, DocsContextProps, DocsIndexEntry, DocsOptions, DocsRenderFunction, Entry, GlobalTypes, Globals, IncludeExcludeOptions, IndexEntry, IndexEntryLegacy, IndexedCSFFile, IndexedStory, IndexerOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoadOptions, LoadedPreset, LoaderFunction, ModuleExport, ModuleExports, ModuleImportFn, NormalizedComponentAnnotations, NormalizedProjectAnnotations, NormalizedStoriesSpecifier, NormalizedStoryAnnotations, Options, PackageJson, Parameters, PartialStoryFn, Path, PlayFunction, PlayFunctionContext, PreparedStory, PreparedStoryFn, Preset, PresetConfig, PresetProperty, PresetPropertyFn, PresetValue, Presets, PreviewAnnotation, ProjectAnnotations, Ref, ReleaseNotesData, RenderContext, RenderToCanvas, Renderer, RendererName, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, SetGlobalsPayload, SetStoriesPayload, SetStoriesStory, SetStoriesStoryData, Stats, StepFunction, StepLabel, StepRunner, Store_CSFExports, StoriesEntry, StoriesWithPartialProps, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryIndex, StoryIndexEntry, StoryIndexV3, StoryIndexer, StoryKind, StoryName, StoryRenderOptions, StorybookConfig, StorybookConfigOptions, StorybookInternalParameters, StorybookParameters, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, Tag, TeardownRenderToCanvas, TypescriptOptions, V2CompatIndexEntry, VersionCheck, ViewMode, WebRenderer };
|
|
2635
|
+
export { API_ActiveTabsType, API_Addon, API_BaseEntry, API_Collection, API_ComponentEntry, API_ComposedRef, API_ComposedRefUpdate, API_DocsEntry, API_Group, API_GroupEntry, API_HashEntry, API_IframeRenderer, API_Layout, API_LeafEntry, API_MatchOptions, API_Notification, API_OptionsData, API_PanelPositions, API_Panels, API_PreparedStoryIndex, API_Provider, API_ProviderData, API_RefId, API_RefUrl, API_Refs, API_ReleaseNotes, API_RenderOptions, API_Root, API_RootEntry, API_RouteOptions, API_SetRefData, API_Settings, API_SidebarOptions, API_StateMerger, API_StoriesHash, API_Story, API_StoryEntry, API_StoryMapper, API_UI, API_UIOptions, API_UnknownEntries, API_Version, API_Versions$1 as API_Versions, API_ViewMode, Addon_AddStoryArgs, Addon_Annotations, Addon_ArgType, Addon_ArgsStoryFn, Addon_BaseAnnotations, Addon_BaseDecorators, Addon_BaseMeta, Addon_BaseStoryFn, Addon_BaseStoryObject, Addon_ClientApiAddon, Addon_ClientApiAddons, Addon_ClientApiReturnFn, Addon_ClientStoryApi, Addon_Collection, Addon_Comparator, Addon_Config, Addon_DecoratorFunction, Addon_Elements, Addon_LegacyStoryFn, Addon_LoadFn, Addon_Loadable, Addon_Loader, Addon_LoaderFunction, Addon_Loaders, Addon_MakeDecoratorResult, Addon_OptionsParameter, Addon_OptionsParameterV7, Addon_PartialStoryFn, Addon_RenderOptions, Addon_RequireContext, Addon_StoryApi, Addon_StoryContext, Addon_StoryContextUpdate, Addon_StoryFn, Addon_StorySortComparator, Addon_StorySortComparatorV7, Addon_StorySortMethod, Addon_StorySortObjectParameter, Addon_StorySortParameter, Addon_StorySortParameterV7, Addon_StoryWrapper, Addon_ToolbarConfig, Addon_Type, Addon_Types, Addon_TypesEnum, Addon_WrapperSettings, Addons_ArgTypes, AnnotatedStoryFn, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, BaseIndexEntry, BaseStory, BoundStory, Builder, BuilderName, BuilderOptions, BuilderResult, BuilderStats, Builder_EnvsRaw, Builder_Unpromise, Builder_WithRequiredProperty, CLIOptions, CSFFile, ComponentAnnotations, ComponentId, ComponentTitle, ComposeStoryFn, ComposedStory, ComposedStoryPlayContext, ComposedStoryPlayFn, Conditional, CoreCommon_AddonEntry, CoreCommon_AddonInfo, CoreCommon_OptionsEntry, CoreCommon_ResolvedAddonPreset, CoreCommon_ResolvedAddonVirtual, CoreCommon_StorybookInfo, CoreConfig, DecoratorApplicator, DecoratorFunction, DocsContextProps, DocsIndexEntry, DocsOptions, DocsRenderFunction, Entry, GlobalTypes, Globals, IncludeExcludeOptions, IndexEntry, IndexEntryLegacy, IndexedCSFFile, IndexedStory, IndexerOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoadOptions, LoadedPreset, LoaderFunction, ModuleExport, ModuleExports, ModuleImportFn, NormalizedComponentAnnotations, NormalizedProjectAnnotations, NormalizedStoriesSpecifier, NormalizedStoryAnnotations, Options, PackageJson, Parameters, PartialStoryFn, Path, PlayFunction, PlayFunctionContext, PreparedStory, PreparedStoryFn, Preset, PresetConfig, PresetProperty, PresetPropertyFn, PresetValue, Presets, PreviewAnnotation, ProjectAnnotations, Ref, ReleaseNotesData, RenderContext, RenderToCanvas, Renderer, RendererName, ResolvedModuleExport, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, SetGlobalsPayload, SetStoriesPayload, SetStoriesStory, SetStoriesStoryData, Stats, StepFunction, StepLabel, StepRunner, Store_CSFExports, StoriesEntry, StoriesWithPartialProps, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryIndex, StoryIndexEntry, StoryIndexV3, StoryIndexer, StoryKind, StoryName, StoryRenderOptions, StorybookConfig, StorybookConfigOptions, StorybookInternalParameters, StorybookParameters, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, Tag, TeardownRenderToCanvas, TypescriptOptions, V2CompatIndexEntry, VersionCheck, ViewMode, WebRenderer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/types",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.23",
|
|
4
4
|
"description": "Core Storybook Types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@babel/core": "^7.12.10",
|
|
47
|
-
"@storybook/channels": "7.0.0-beta.
|
|
47
|
+
"@storybook/channels": "7.0.0-beta.23",
|
|
48
48
|
"@types/babel__core": "^7.0.0",
|
|
49
49
|
"@types/express": "^4.7.0",
|
|
50
50
|
"express": "^4.17.3",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"./src/index.ts"
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "540859f1e7daeb25a03b2095e4223effc7f590b8"
|
|
67
67
|
}
|