@storybook/blocks 8.0.0-alpha.11 → 8.0.0-alpha.13

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { Conditional, DocsContextProps, PreparedStory, ModuleExports, ModuleExport, Parameters as Parameters$1, StrictArgTypes, Renderer as Renderer$1, Args as Args$1, StoryId, StoryContextForLoaders, ResolvedModuleExportType, ResolvedModuleExportFromType, ProjectAnnotations, BaseAnnotations, ComponentTitle } from '@storybook/types';
1
+ import { Conditional, DocsContextProps, PreparedStory, ModuleExports, Renderer as Renderer$1, Args as Args$1, StoryId, ModuleExport, StoryContextForLoaders, ResolvedModuleExportType, ResolvedModuleExportFromType, Parameters as Parameters$1, ProjectAnnotations, BaseAnnotations, ComponentTitle } from '@storybook/types';
2
2
  export { DocsContextProps } from '@storybook/types';
3
3
  import React, { ComponentProps, FunctionComponent, ReactNode, FC, PropsWithChildren, Context, ReactElement } from 'react';
4
4
  import { Renderer } from '@storybook/csf';
@@ -97,12 +97,12 @@ interface ArgsTableErrorProps {
97
97
  interface ArgsTableLoadingProps {
98
98
  isLoading: boolean;
99
99
  }
100
- type ArgsTableProps$1 = ArgsTableOptionProps & (ArgsTableDataProps | ArgsTableErrorProps | ArgsTableLoadingProps);
100
+ type ArgsTableProps = ArgsTableOptionProps & (ArgsTableDataProps | ArgsTableErrorProps | ArgsTableLoadingProps);
101
101
  /**
102
102
  * Display the props for a component as a props table. Each row is a collection of
103
103
  * ArgDefs, usually derived from docgen info for the component.
104
104
  */
105
- declare const ArgsTable$1: FC<ArgsTableProps$1>;
105
+ declare const ArgsTable: FC<ArgsTableProps>;
106
106
 
107
107
  interface CommonProps {
108
108
  story: PreparedStory;
@@ -120,12 +120,12 @@ interface IFrameStoryProps extends CommonProps {
120
120
  inline: false;
121
121
  height: string;
122
122
  }
123
- type StoryProps$2 = InlineStoryProps | IFrameStoryProps;
123
+ type StoryProps$1 = InlineStoryProps | IFrameStoryProps;
124
124
  /**
125
125
  * A story element, either rendered inline or in an iframe,
126
126
  * with configurable height.
127
127
  */
128
- declare const Story$1: FunctionComponent<StoryProps$2>;
128
+ declare const Story$1: FunctionComponent<StoryProps$1>;
129
129
 
130
130
  interface TypesetProps {
131
131
  fontFamily?: string;
@@ -193,44 +193,6 @@ type ArgTypesProps = ArgTypesParameters & {
193
193
  };
194
194
  declare const ArgTypes: FC<ArgTypesProps>;
195
195
 
196
- declare const PRIMARY_STORY = "^";
197
- type Component = any;
198
- type DocsStoryProps = {
199
- of: ModuleExport;
200
- expanded?: boolean;
201
- withToolbar?: boolean;
202
- __forceInitialArgs?: boolean;
203
- __primary?: boolean;
204
- };
205
-
206
- interface BaseProps {
207
- include?: PropDescriptor;
208
- exclude?: PropDescriptor;
209
- sort?: SortType;
210
- }
211
- type OfProps = BaseProps & {
212
- of: '^' | Component;
213
- };
214
- type ComponentsProps = BaseProps & {
215
- parameters: Parameters$1;
216
- components: {
217
- [label: string]: Component;
218
- };
219
- };
220
- type StoryProps$1 = BaseProps & {
221
- story: '.' | '^' | string;
222
- showComponent?: boolean;
223
- };
224
- type ArgsTableProps = BaseProps | OfProps | ComponentsProps | StoryProps$1;
225
- declare const extractComponentArgTypes: (component: Component, parameters: Parameters$1, include?: PropDescriptor, exclude?: PropDescriptor) => StrictArgTypes;
226
- declare const getComponent: (props: ArgsTableProps, component: Component) => Component;
227
- declare const StoryTable: FC<StoryProps$1 & {
228
- component: Component;
229
- subcomponents: Record<string, Component>;
230
- }>;
231
- declare const ComponentsTable: FC<ComponentsProps>;
232
- declare const ArgsTable: FC<ArgsTableProps>;
233
-
234
196
  declare const DocsContext: Context<DocsContextProps<Renderer$1>>;
235
197
 
236
198
  type ArgsHash = string;
@@ -445,6 +407,16 @@ interface DocsContainerProps<TFramework extends Renderer$1 = Renderer$1> {
445
407
  }
446
408
  declare const DocsContainer: FC<PropsWithChildren<DocsContainerProps>>;
447
409
 
410
+ declare const PRIMARY_STORY = "^";
411
+ type Component = any;
412
+ type DocsStoryProps = {
413
+ of: ModuleExport;
414
+ expanded?: boolean;
415
+ withToolbar?: boolean;
416
+ __forceInitialArgs?: boolean;
417
+ __primary?: boolean;
418
+ };
419
+
448
420
  declare const DocsStory: FC<DocsStoryProps>;
449
421
 
450
422
  type ExternalDocsProps<TRenderer extends Renderer$1 = Renderer$1> = {
@@ -645,4 +617,4 @@ type ColorProps = ColorControlProps;
645
617
  declare const LazyColorControl: React.LazyExoticComponent<React.FC<ColorControlProps>>;
646
618
  declare const ColorControl: (props: ComponentProps<typeof LazyColorControl>) => React.JSX.Element;
647
619
 
648
- export { AddContext, Anchor, AnchorMdx, AnchorProps, ArgTypes, ArgsTable, BooleanConfig, BooleanControl, BooleanProps, BooleanValue, Canvas, CodeOrSourceMdx, ColorConfig, ColorControl, ColorItem, ColorPalette, ColorProps, ColorValue, Component, ComponentsTable, Control, ControlProps, ControlType, Controls, DateConfig, DateControl, DateProps, DateValue, DescriptionContainer as Description, DescriptionType, Docs, DocsContainer, DocsContainerProps, DocsContext, DocsPage, DocsProps, DocsStory, DocsStoryProps, ExternalDocs, ExternalDocsContainer, ExternalDocsProps, FilesControl, FilesControlProps, HeaderMdx, HeadersMdx, Heading, HeadingProps, IconGallery, IconItem, Markdown, Meta, NormalizedOptionsConfig, NumberConfig, NumberControl, NumberValue, ObjectConfig, ObjectControl, ObjectProps, ObjectValue, Of, Options, OptionsArray, OptionsConfig, OptionsControl, OptionsControlType, OptionsMultiSelection, OptionsObject, OptionsProps, OptionsSelection, OptionsSingleSelection, PRIMARY_STORY, PresetColor, Primary, ArgsTable$1 as PureArgsTable, RangeConfig, RangeControl, SortType, Source, SourceContainer, SourceContext, SourceContextProps, SourceItem, SourceProps, Stories, Story, StoryProps, StorySources, StoryTable, Subheading, Subtitle, TextConfig, TextControl, TextProps, TextValue, Title, Typeset, UNKNOWN_ARGS_HASH, Unstyled, Wrapper, anchorBlockIdFromId, argsHash, assertIsFn, extractComponentArgTypes, extractTitle, format, formatDate, formatTime, getComponent, getStoryId, getStoryProps, parse, parseDate, parseTime, useOf, useSourceProps };
620
+ export { AddContext, Anchor, AnchorMdx, AnchorProps, ArgTypes, BooleanConfig, BooleanControl, BooleanProps, BooleanValue, Canvas, CodeOrSourceMdx, ColorConfig, ColorControl, ColorItem, ColorPalette, ColorProps, ColorValue, Component, Control, ControlProps, ControlType, Controls, DateConfig, DateControl, DateProps, DateValue, DescriptionContainer as Description, DescriptionType, Docs, DocsContainer, DocsContainerProps, DocsContext, DocsPage, DocsProps, DocsStory, DocsStoryProps, ExternalDocs, ExternalDocsContainer, ExternalDocsProps, FilesControl, FilesControlProps, HeaderMdx, HeadersMdx, Heading, HeadingProps, IconGallery, IconItem, Markdown, Meta, NormalizedOptionsConfig, NumberConfig, NumberControl, NumberValue, ObjectConfig, ObjectControl, ObjectProps, ObjectValue, Of, Options, OptionsArray, OptionsConfig, OptionsControl, OptionsControlType, OptionsMultiSelection, OptionsObject, OptionsProps, OptionsSelection, OptionsSingleSelection, PRIMARY_STORY, PresetColor, Primary, ArgsTable as PureArgsTable, RangeConfig, RangeControl, SortType, Source, SourceContainer, SourceContext, SourceContextProps, SourceItem, SourceProps, Stories, Story, StoryProps, StorySources, Subheading, Subtitle, TextConfig, TextControl, TextProps, TextValue, Title, Typeset, UNKNOWN_ARGS_HASH, Unstyled, Wrapper, anchorBlockIdFromId, argsHash, assertIsFn, extractTitle, format, formatDate, formatTime, getStoryId, getStoryProps, parse, parseDate, parseTime, useOf, useSourceProps };