Skip to content

Upgrading @storybook/react 6 to 7

Breaking6.5.16 → 7.6.24Breaking43Security11Platform11Deprecated4New183Changed297Fixed701Other577

BreakingUpgrade verdict

43 breaking changes and 11 platform requirement changes and 11 security fixes.

  • Removes defaultProps in the Stories doc block.
  • Renames index to createIndex in the indexer.
  • Storybook no longer refers to the api package or the two deprecated channel packages, so anything relying on them may break.
  • A deprecated way for addons to register panels has been removed, so addons still using it need updating.
Top 5 of 69 that need code or config changes

@storybook/react publishes an official migration guide for version 7. It covers more than the release notes do.

Migration guide ↗

Node.js requirement changed in 7.0.0-beta.3: >=10.13.0 → >=16.0.0.

Adds @storybook/core-client 7.6.24, @storybook/global ^5.0.0, @storybook/preview-api 7.6.24, @storybook/react-dom-shim 7.6.24, @storybook/types 7.6.24, @types/escodegen ^0.0.6, type-fest ~2.19.

Drops @babel/preset-flow, @babel/preset-react, @pmmmwh/react-refresh-webpack-plugin, @storybook/addons, @storybook/core, @storybook/core-common, @storybook/csf, @storybook/node-logger, @storybook/react-docgen-typescript-plugin, @storybook/semver, @storybook/store, @types/webpack-env, babel-plugin-add-react-displayname, babel-plugin-react-docgen, core-js, fs-extra, global, react-refresh, read-pkg-up, regenerator-runtime, webpack.

Installs 229 packages in all (was 1445).

Breaking43
Removes defaultProps in the Stories doc block.
StoriesdefaultProps
Renames index to createIndex in the indexer.
indexcreateIndex
Removes references to api and the 2 deprecated channel packages.
api
Removes deprecated addPanel use and includes miscellaneous improvements.
addPanel
Angular removes deprecated component and propsMeta from story.
componentpropsMeta
Removes deprecated flags and properties.
Renames the framework parameter to renderer.
frameworkrenderer
Removes DocsOptions.disable.
DocsOptions.disable
Drops lit1 support for web components.
Removes svelte-options from Svelte/Vite.
svelte-options
Removes the deprecated --no-manager-cache CLI flag.
--no-manager-cache
Removes the deprecated ArgTypes.defaultValue from CSF.
ArgTypes.defaultValue
Renames storyByModuleExport to resolveModuleExport in Addon-docs.
storyByModuleExportresolveModuleExport
Renames docsPage to autodocs.
docsPageautodocs
Renames docsOptions.enabled to docsOptions.disable.
docsOptions.enableddocsOptions.disable
API: Renames api to manager-api.
apimanager-api
Renames Framework to Renderer in CSF.
FrameworkRenderer
Preact now uses inline stories without an iframe by default in docs.
Removes the deprecated -s flag on sb init.
sb init-s
Renames storybook/ui to storybook/manager.
storybook/uistorybook/manager
Removes the final batch of deprecated APIs.
Removes deprecated features from preview-web.
preview-web
Removes deprecated features in lib/api.
lib/api
Removes default selection in docblocks.
docblocks
Removes deprecated addon APIs.
Removes the onBeforeRender hook.
onBeforeRender
Removes the old showRoots config option.
showRoots
Removes the html entrypoint of lib/components.
lib/components
Removes the deprecated Preview component.
Preview
Removes deprecated channel APIs.
Removes framework angulars storymodule story-component handling.
Removes deprecated glob fixing.
Addon-docs: Remove STORYBOOK_REACT_CLASSES and global/globals.ts.
STORYBOOK_REACT_CLASSESglobal/globals.ts
Replaces config with previewAnnotations and removes previewEntries in Presets.
configpreviewAnnotationspreviewEntries
Renames Storybook DOM root IDs in the preview.
Removes the docs tab from the UI.
Removes standalone node APIs from Core.
Creates frameworks and renames renderers.
Removes start-storybook and build-storybook from all frameworks.
start-storybookbuild-storybook
Removes experimental components.
Addon-docs upgrades to MDXv2.
Addon-docsMDXv2
Build chain upgrades to TS4, Webpack5, modern ESM, and TSUP.
Factors webpack dependencies out of core-webpack.
Security11
Hardens the websocket connection.
Replaces the ip function in Core to address security concerns.
ip
Updates the ip dependency to fix CVE-2023-42282.
ip
Updates @babel/traverse and @babel/core to fix a vulnerability.
@babel/traverse@babel/core
Updates the browserify-sign transitive dependency.
browserify-sign
Filters addon options in telemetry to protect sensitive info.
Upgrades escodegen to fix a security issue.
escodegen
Fixes the security report concerning the download-tarball package.
download-tarball
Fixes a trim vulnerability.
trim
Upgrades express to fix a security warning.
express
Updates x-default-browser and fixes an issue with the package.
x-default-browser
Platform11
Removes the need for react as a peerDependency.
react
Moves typescript from devDependencies to peerDependencies in the React package.
typescript
Pins @yarnpkg package versions to support Node 16.
@yarnpkg
Makes vite a peer dependency and updates Vite plugins.
vite
Adds an optional TypeScript peer dependency.
typescript
Adds a runtime check for the React peer dependency in the CLI.
React
Extends the Angular Zone.js peer dependency range.
Zone.js
Fixes peer dependencies for npm8, pnpm and yarn PnP.
NextJS: Adds Next13 peer dependency.
Adds babel loader 9.0.0 to vue-webpack5 peer dependencies for Vue.
babel-loadervue-webpack5
Makes babel-loader an optional peer dependency of addon-docs.
babel-loaderaddon-docs
Deprecated4
Adds a deprecation notice for Vite with CommonJS.
Vite
Deprecates storyStoreV6 (including storiesOf) and storyIndexers.
storyStoreV6storiesOfstoryIndexers
Deprecates the key in the addon render function as it is no longer available.
key
Fixes the addon-links d.ts file and deprecates LinkTo.
LinkTo

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • removed: const Button: { ({ children, onClick }: { children: React.ReactNode; onClick: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void }): JSX.Element; displayName: string…
  • removed: const Welcome: { ({ showApp }: { showApp: () => void }): JSX.Element; displayName: string; propTypes: { showApp: PropTypes.Requireable<(...args: any[]) => any> }; defaultProp…
  • added: const parameters: {}
  • added: const render: ArgsStoryFn<ReactRenderer>
  • added: function renderToCanvas({ storyContext, unboundStoryFn, showMain, showException, forceRemount }: RenderContext<ReactRenderer>, canvasElement: ReactRenderer['canvasElement']): Promise<() => void>
  • added: const applyDecorators: (storyFn: LegacyStoryFn<ReactRenderer>, decorators: DecoratorFunction<ReactRenderer>[]) => LegacyStoryFn<ReactRenderer>
  • added: const argTypesEnhancers: ArgTypesEnhancer<ReactRenderer>[]
  • added: const decorators: DecoratorFunction<ReactRenderer>[]
  • added: const parameters: { docs: { story: { inline: boolean }; extractArgTypes: _storybook_docs_tools.ArgTypesExtractor; extractComponentDescription: typeof extractComponentDescription…
  • added: const configure: ClientApi['configure']
  • added: const forceReRender: ClientApi['forceReRender']
  • added: const raw: ClientApi['raw']
  • added: const storiesOf: ClientApi['storiesOf']
  • added: export { ArgTypes } from '@storybook/types'
  • added: export { Args } from '@storybook/types'
  • added: export { Parameters } from '@storybook/types'
  • added: export { ReactRenderer }
  • added: export { StrictArgs } from '@storybook/types'
  • added: function composeStories<TModule extends Store_CSFExports<ReactRenderer, any>>(csfExports: TModule, projectAnnotations?: ProjectAnnotations<ReactRenderer>): Omit<StoriesWithPartialProps<ReactRenderer, TModule>, keyof Store_CSFExports>
  • added: function composeStory<TArgs extends Args = Args>(story: StoryAnnotationsOrFn<ReactRenderer, TArgs>, componentAnnotations: Meta<TArgs | any>, projectAnnotations?: ProjectAnnotations<ReactRenderer>, exportsName?: string): _storybook_types.ComposedStoryFn<ReactRenderer, Partial<TArgs>>
  • added: function setGlobalConfig(projectAnnotations: ProjectAnnotations<ReactRenderer> | ProjectAnnotations<ReactRenderer>[]): void
  • added: function setProjectAnnotations(projectAnnotations: ProjectAnnotations<ReactRenderer> | ProjectAnnotations<ReactRenderer>[]): void
  • added: type ComponentMeta<T extends JSXElement> = Meta<ComponentProps<T>>
  • added: type ComponentStory<T extends JSXElement> = ComponentStoryFn<T>
  • added: type ComponentStoryFn<T extends JSXElement> = StoryFn<ComponentProps<T>>
  • added: type ComponentStoryObj<T extends JSXElement> = StoryObj<ComponentProps<T>>
  • added: type Decorator<TArgs = StrictArgs> = DecoratorFunction<ReactRenderer, TArgs>
  • added: type DecoratorFn = DecoratorFunction<ReactRenderer>
  • added: type Loader<TArgs = StrictArgs> = LoaderFunction<ReactRenderer, TArgs>
  • added: type Meta<TCmpOrArgs = Args> = [TCmpOrArgs] extends [ComponentType<any>] ? ComponentAnnotations<ReactRenderer, ComponentProps<TCmpOrArgs>> : ComponentAnnotations<ReactRenderer, TCmpOrArgs>
  • added: type Preview = ProjectAnnotations<ReactRenderer>
  • added: type Story<TArgs = Args> = StoryFn<TArgs>
  • added: type StoryContext<TArgs = StrictArgs> = StoryContext$1<ReactRenderer, TArgs>
  • added: type StoryFn<TCmpOrArgs = Args> = [TCmpOrArgs] extends [ComponentType<any>] ? AnnotatedStoryFn<ReactRenderer, ComponentProps<TCmpOrArgs>> : AnnotatedStoryFn<ReactRenderer, TCmpOrArgs>
  • added: type StoryObj<TMetaOrCmpOrArgs = Args> = [TMetaOrCmpOrArgs] extends [{ render?: ArgsStoryFn<ReactRenderer, any>; component?: infer Component; args?: infer DefaultArgs }] ? Simplify<(Component extends…
  • added: const addons: StorybookConfig['addons']
  • added: const previewAnnotations: StorybookConfig['previewAnnotations']
  • removed: const argTypesEnhancers: (<TFramework extends import('@storybook/csf').AnyFramework>(context: import('@storybook/csf').StoryContextForEnhancers<TFramework, import('@storybook/csf').Arg…
  • removed: const decorators: ((storyFn: PartialStoryFn<ReactFramework, import('@storybook/csf').Args>, context: import('@storybook/csf').StoryContext<ReactFramework, import('@storybook/csf…
  • removed: const parameters: { docs: { inlineStories: boolean; prepareForInline: (storyFn: PartialStoryFn<ReactFramework>) => import('../preview/types').StoryFnReactReturnType; extractArgT…
  • removed: const extractArgTypes: ArgTypesExtractor
  • removed: const extractProps: PropsExtractor
  • removed: index PropDefMap[p: string]: PropDef
  • removed: interface PropDefMap
  • removed: const jsxDecorator: (storyFn: PartialStoryFn<ReactFramework>, context: StoryContext<ReactFramework>) => import('../preview/types').StoryFnReactReturnType
  • removed: const renderJsx: (code: React.ReactElement, options: JSXOptions) => string
  • removed: const skipJsxRender: (context: StoryContext<ReactFramework>) => any
  • removed: const ARRAY_CAPTION = 'array'
  • removed: const CLASS_CAPTION = 'class'
  • removed: const CUSTOM_CAPTION = 'custom'
  • removed: const ELEMENT_CAPTION = 'element'
  • removed: const FUNCTION_CAPTION = 'func'
  • removed: const OBJECT_CAPTION = 'object'
  • removed: const isForwardRef: (component: any) => boolean
  • removed: const isMemo: (component: any) => boolean
  • removed: function createDefaultValue(defaultValue: string): PropDefaultValue
  • removed: function createDefaultValueFromRawDefaultProp(rawDefaultProp: any, propDef: PropDef, typeResolvers?: TypeResolvers): PropDefaultValue
  • removed: function createTypeResolvers(customResolvers?: Partial<TypeResolvers>): TypeResolvers
  • removed: function extractFunctionName(func: Function, propName: string): string
  • removed: interface TypeResolvers
  • removed: property TypeResolvers.default: TypeResolver
  • removed: property TypeResolvers.function: TypeResolver
  • removed: property TypeResolvers.object: TypeResolver
  • removed: property TypeResolvers.string: TypeResolver
  • removed: type TypeResolver = (rawDefaultProp: any, propDef: PropDef) => PropDefaultValue
  • removed: function generateArray({ inferredType, ast }: InspectionResult): PropDefaultValue
  • removed: function generateObject({ inferredType, ast }: InspectionResult): PropDefaultValue
  • removed: export * from './createDefaultValue'
  • removed: export * from './createFromRawDefaultProp'
  • removed: function getPrettyElementIdentifier(identifier: string): string
  • removed: function getPrettyFuncIdentifier(identifier: string, hasArguments: boolean): string
  • removed: function getPrettyIdentifier(inferredType: InspectionIdentifiableInferedType): string
  • removed: function generateArrayCode(ast: any, compact?: boolean): string
  • removed: function generateCode(ast: any, compact?: boolean): string
  • removed: function generateObjectCode(ast: any, compact?: boolean): string
  • removed: export * from './captions'
  • removed: export * from './componentTypes'
  • removed: export * from './generateCode'
  • removed: export * from './isHtmlTag'
  • removed: function parse(value: string): ParsingResult<InspectionInferedType>
  • removed: export * from './inspectValue'
  • removed: export * from './types'
  • removed: function inspectValue(value: string): InspectionResult
  • removed: enum InspectionType
  • removed: interface InspectionArray extends InspectionInferedType
  • removed: interface InspectionClass extends InspectionInferedType
  • removed: interface InspectionElement extends InspectionInferedType
  • removed: interface InspectionFunction extends InspectionInferedType
  • removed: interface InspectionIdentifier extends InspectionInferedType
  • removed: interface InspectionInferedType
  • removed: interface InspectionLiteral extends InspectionInferedType
  • removed: interface InspectionObject extends InspectionInferedType
  • removed: interface InspectionResult
  • removed: interface InspectionUnknown extends InspectionInferedType
  • removed: member InspectionType.ARRAY = 'Array'
  • removed: member InspectionType.CLASS = 'Class'
  • removed: member InspectionType.ELEMENT = 'Element'
  • removed: member InspectionType.FUNCTION = 'Function'
  • removed: member InspectionType.IDENTIFIER = 'Identifier'
  • removed: member InspectionType.LITERAL = 'Literal'
  • removed: member InspectionType.OBJECT = 'Object'
  • removed: member InspectionType.UNKNOWN = 'Unknown'
  • removed: property InspectionArray.depth: number
  • removed: property InspectionArray.type: InspectionType.ARRAY
  • removed: property InspectionClass.identifier: string
  • removed: property InspectionClass.type: InspectionType.CLASS
  • removed: property InspectionElement.identifier?: string
  • removed: property InspectionElement.type: InspectionType.ELEMENT
  • removed: property InspectionFunction.hasParams: boolean
  • removed: property InspectionFunction.identifier?: string
  • removed: property InspectionFunction.params: any[]
  • removed: property InspectionFunction.type: InspectionType.FUNCTION
  • removed: property InspectionIdentifier.identifier: string
  • removed: property InspectionIdentifier.type: InspectionType.IDENTIFIER
  • removed: property InspectionInferedType.type: InspectionType
  • removed: property InspectionLiteral.type: InspectionType.LITERAL
  • removed: property InspectionObject.depth: number
  • removed: property InspectionObject.type: InspectionType.OBJECT
  • removed: property InspectionResult.ast?: any
  • removed: property InspectionResult.inferredType: InspectionInferedType
  • removed: property InspectionUnknown.type: InspectionType.UNKNOWN
  • removed: type InspectionIdentifiableInferedType = InspectionIdentifier | InspectionClass | InspectionFunction | InspectionElement
  • removed: function isHtmlTag(tagName: string): boolean
  • removed: function createType(extractedProp: ExtractedProp): PropType
  • removed: function generateFuncSignature(params: ExtractedJsDocParam[], returns: ExtractedJsDocReturns): string
  • removed: function generateShortFuncSignature(params: ExtractedJsDocParam[], returns: ExtractedJsDocReturns): string
  • removed: function toMultilineSignature(signature: string): string
  • removed: function enhancePropTypesProp(extractedProp: ExtractedProp, rawDefaultProp?: any): PropDef
  • removed: function enhancePropTypesProps(extractedProps: ExtractedProp[], component: Component): PropDef[]
  • removed: const rawDefaultPropTypeResolvers: import('../lib/defaultValues').TypeResolvers
  • removed: function keepOriginalDefinitionOrder(extractedProps: PropDef[], component: Component): PropDef[]
  • removed: function enhanceTypeScriptProp(extractedProp: ExtractedProp, rawDefaultProp?: any): PropDef
  • removed: function enhanceTypeScriptProps(extractedProps: ExtractedProp[]): PropDef[]
  • removed: export * from './preview/types-6-3'
  • removed: export * from './testing'
  • removed: export { DecoratorFn } from './preview'
  • removed: export { addDecorator } from './preview'
  • removed: export { addParameters } from './preview'
  • removed: export { configure } from './preview'
  • removed: export { forceReRender } from './preview'
  • removed: export { getStorybook } from './preview'
  • removed: export { raw } from './preview'
  • removed: export { setAddon } from './preview'
  • removed: export { storiesOf } from './preview'
  • removed: const parameters: { framework: string }
  • removed: export { render } from './render'
  • removed: export { renderToDOM } from './render'
  • removed: const addDecorator: ClientApi['addDecorator']
  • removed: const addParameters: ClientApi['addParameters']
  • removed: const clearDecorators: ClientApi['clearDecorators']
  • removed: const configure: ClientApi['configure']
  • removed: const forceReRender: ClientApi['forceReRender']
  • removed: const getStorybook: ClientApi['getStorybook']
  • removed: const raw: ClientApi['raw']
  • removed: const setAddon: ClientApi['setAddon']
  • removed: const storiesOf: ClientApi['storiesOf']
  • removed: type DecoratorFn = Parameters<typeof addDecorator>[0]
  • removed: const render: ArgsStoryFn<ReactFramework>
  • removed: function renderToDOM({ storyContext, unboundStoryFn, showMain, showException, forceRemount }: RenderContext<ReactFramework>, domElement: HTMLElement): Promise<void>
  • removed: export { RenderContext } from '@storybook/store'
  • removed: export { StoryContext } from '@storybook/csf'
  • removed: interface IStorybookSection
  • removed: interface IStorybookStory
  • removed: interface ShowErrorArgs
  • removed: property IStorybookSection.kind: string
  • removed: property IStorybookSection.stories: IStorybookStory[]
  • removed: property IStorybookStory.name: string
  • removed: property IStorybookStory.render: (context: any) => any
  • removed: property ShowErrorArgs.description: string
  • removed: property ShowErrorArgs.title: string
  • removed: type StoryFnReactReturnType = ReactElement<unknown>
  • removed: export { ArgTypes } from '@storybook/csf'
  • removed: export { Args } from '@storybook/csf'
  • removed: export { Parameters } from '@storybook/csf'
  • removed: export { StoryContext } from '@storybook/csf'
  • removed: type Meta<TArgs = Args> = ComponentAnnotations<ReactFramework, TArgs>
  • removed: type ReactFramework = { component: ComponentType<any>; storyResult: StoryFnReactReturnType }
  • removed: type Story<TArgs = Args> = StoryFn<TArgs>
  • removed: type StoryFn<TArgs = Args> = AnnotatedStoryFn<ReactFramework, TArgs>
  • removed: type StoryObj<TArgs = Args> = StoryAnnotations<ReactFramework, TArgs>
  • removed: export * from './types-6-0'
  • removed: type ComponentMeta<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = Meta<ComponentProps<T>>
  • removed: type ComponentStory<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = Story<ComponentProps<T>>
  • removed: type ComponentStoryFn<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = StoryFn<ComponentProps<T>>
  • removed: type ComponentStoryObj<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = StoryObj<ComponentProps<T>>
  • removed: export { ComponentMeta } from './types-6-3'
  • removed: export { ComponentStoryFn } from './types-6-3'
  • removed: export { ComponentStoryObj } from './types-6-3'
  • removed: export { Meta } from './types-6-0'
  • removed: export { StoryFn } from './types-6-0'
  • removed: export { StoryObj } from './types-6-0'
  • removed: type ComponentStory<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = ComponentStoryObj<T>
  • removed: type Story<TArgs = Args> = StoryObj<TArgs>
  • removed: function composeStories<TModule extends CSFExports<ReactFramework>>(csfExports: TModule, projectAnnotations?: ProjectAnnotations<ReactFramework>): Pick<StoriesWithPartialProps<ReactFramework, TModule>, Exclude<keyof TModule, 'default' | '__esModule' | '__namedExportsOrder'>>
  • removed: function composeStory<TArgs = Args>(story: ComposedStory<ReactFramework, TArgs>, componentAnnotations: Meta<TArgs | any>, projectAnnotations?: ProjectAnnotations<ReactFramework>, exportsName?: string): { (extraArgs: Partial<TArgs>): import('../preview/types').StoryFnReactReturnType; storyName: string; args: Args; play: import('@storybook/store').ComposedStoryPlayFn; parameters: import('@storybook…
  • removed: function setGlobalConfig(projectAnnotations: ProjectAnnotations<ReactFramework> | ProjectAnnotations<ReactFramework>[]): void
  • removed: function setProjectAnnotations(projectAnnotations: ProjectAnnotations<ReactFramework> | ProjectAnnotations<ReactFramework>[]): void
  • removed: const Button: FunctionComponent<Props>
  • removed: default Button
  • removed: const default: FunctionComponent<WelcomeProps>
  • removed: function getReactScriptsPath({ noCache }?: { noCache?: boolean }): string
  • removed: function isReactScriptsInstalled(requiredVersion?: string): boolean
  • removed: function webpackFinal(config: Configuration, { presetsList }: Options): Configuration
  • removed: function babel(config: TransformOptions, options: Options): Promise<TransformOptions>
  • removed: function babelDefault(config: TransformOptions): Promise<TransformOptions>
  • removed: function webpackFinal(config: Configuration, options: Options): Promise<Configuration>
  • removed: const previewAnnotations: StorybookConfig['previewAnnotations']
  • removed: function babel(config: TransformOptions, options: Options): Promise<TransformOptions>
  • removed: function webpackFinal(config: Configuration, options: Options): Promise<Configuration>
  • removed: function webpackFinal(config: Configuration): Promise<{ plugins: import('webpack').Plugin[]; mode?: 'none' | 'production' | 'development'; name?: string; context?: string; entry?: string | string[] | import('webpack').Entry | import('webpack').EntryFunc; devtool?: string | boolean; output?: import('webpack').Output; module?: import('webpack').Module; resolve?: import('webpack').Resolve; resolveLo…
  • removed: const _default: LoadOptions
  • removed: default _default
  • removed: const addons: StorybookConfig['addons']
  • removed: const previewAnnotations: StorybookConfig['previewAnnotations']
  • removed: const argTypesEnhancers: (<TFramework extends import('@storybook/csf').AnyFramework>(context: import('@storybook/csf').StoryContextForEnhancers<TFramework, import('@storybook/csf').Arg…
  • removed: const decorators: ((storyFn: PartialStoryFn<ReactFramework, import('@storybook/csf').Args>, context: import('@storybook/csf').StoryContext<ReactFramework, import('@storybook/csf…
  • removed: const parameters: { docs: { inlineStories: boolean; prepareForInline: (storyFn: PartialStoryFn<ReactFramework>) => import('../preview/types').StoryFnReactReturnType; extractArgT…
  • removed: const extractArgTypes: ArgTypesExtractor
  • removed: const extractProps: PropsExtractor
  • removed: index PropDefMap[p: string]: PropDef
  • removed: interface PropDefMap
  • removed: const jsxDecorator: (storyFn: PartialStoryFn<ReactFramework>, context: StoryContext<ReactFramework>) => import('../preview/types').StoryFnReactReturnType
  • removed: const renderJsx: (code: React.ReactElement, options: JSXOptions) => string
  • removed: const skipJsxRender: (context: StoryContext<ReactFramework>) => any
  • removed: const ARRAY_CAPTION = 'array'
  • removed: const CLASS_CAPTION = 'class'
  • removed: const CUSTOM_CAPTION = 'custom'
  • removed: const ELEMENT_CAPTION = 'element'
  • removed: const FUNCTION_CAPTION = 'func'
  • removed: const OBJECT_CAPTION = 'object'
  • removed: const isForwardRef: (component: any) => boolean
  • removed: const isMemo: (component: any) => boolean
  • removed: function createDefaultValue(defaultValue: string): PropDefaultValue
  • removed: function createDefaultValueFromRawDefaultProp(rawDefaultProp: any, propDef: PropDef, typeResolvers?: TypeResolvers): PropDefaultValue
  • removed: function createTypeResolvers(customResolvers?: Partial<TypeResolvers>): TypeResolvers
  • removed: function extractFunctionName(func: Function, propName: string): string
  • removed: interface TypeResolvers
  • removed: property TypeResolvers.default: TypeResolver
  • removed: property TypeResolvers.function: TypeResolver
  • removed: property TypeResolvers.object: TypeResolver
  • removed: property TypeResolvers.string: TypeResolver
  • removed: type TypeResolver = (rawDefaultProp: any, propDef: PropDef) => PropDefaultValue
  • removed: function generateArray({ inferredType, ast }: InspectionResult): PropDefaultValue
  • removed: function generateObject({ inferredType, ast }: InspectionResult): PropDefaultValue
  • removed: export * from './createDefaultValue'
  • removed: export * from './createFromRawDefaultProp'
  • removed: function getPrettyElementIdentifier(identifier: string): string
  • removed: function getPrettyFuncIdentifier(identifier: string, hasArguments: boolean): string
  • removed: function getPrettyIdentifier(inferredType: InspectionIdentifiableInferedType): string
  • removed: function generateArrayCode(ast: any, compact?: boolean): string
  • removed: function generateCode(ast: any, compact?: boolean): string
  • removed: function generateObjectCode(ast: any, compact?: boolean): string
  • removed: export * from './captions'
  • removed: export * from './componentTypes'
  • removed: export * from './generateCode'
  • removed: export * from './isHtmlTag'
  • removed: function parse(value: string): ParsingResult<InspectionInferedType>
  • removed: export * from './inspectValue'
  • removed: export * from './types'
  • removed: function inspectValue(value: string): InspectionResult
  • removed: enum InspectionType
  • removed: interface InspectionArray extends InspectionInferedType
  • removed: interface InspectionClass extends InspectionInferedType
  • removed: interface InspectionElement extends InspectionInferedType
  • removed: interface InspectionFunction extends InspectionInferedType
  • removed: interface InspectionIdentifier extends InspectionInferedType
  • removed: interface InspectionInferedType
  • removed: interface InspectionLiteral extends InspectionInferedType
  • removed: interface InspectionObject extends InspectionInferedType
  • removed: interface InspectionResult
  • removed: interface InspectionUnknown extends InspectionInferedType
  • removed: member InspectionType.ARRAY = 'Array'
  • removed: member InspectionType.CLASS = 'Class'
  • removed: member InspectionType.ELEMENT = 'Element'
  • removed: member InspectionType.FUNCTION = 'Function'
  • removed: member InspectionType.IDENTIFIER = 'Identifier'
  • removed: member InspectionType.LITERAL = 'Literal'
  • removed: member InspectionType.OBJECT = 'Object'
  • removed: member InspectionType.UNKNOWN = 'Unknown'
  • removed: property InspectionArray.depth: number
  • removed: property InspectionArray.type: InspectionType.ARRAY
  • removed: property InspectionClass.identifier: string
  • removed: property InspectionClass.type: InspectionType.CLASS
  • removed: property InspectionElement.identifier?: string
  • removed: property InspectionElement.type: InspectionType.ELEMENT
  • removed: property InspectionFunction.hasParams: boolean
  • removed: property InspectionFunction.identifier?: string
  • removed: property InspectionFunction.params: any[]
  • removed: property InspectionFunction.type: InspectionType.FUNCTION
  • removed: property InspectionIdentifier.identifier: string
  • removed: property InspectionIdentifier.type: InspectionType.IDENTIFIER
  • removed: property InspectionInferedType.type: InspectionType
  • removed: property InspectionLiteral.type: InspectionType.LITERAL
  • removed: property InspectionObject.depth: number
  • removed: property InspectionObject.type: InspectionType.OBJECT
  • removed: property InspectionResult.ast?: any
  • removed: property InspectionResult.inferredType: InspectionInferedType
  • removed: property InspectionUnknown.type: InspectionType.UNKNOWN
  • removed: type InspectionIdentifiableInferedType = InspectionIdentifier | InspectionClass | InspectionFunction | InspectionElement
  • removed: function isHtmlTag(tagName: string): boolean
  • removed: function createType(extractedProp: ExtractedProp): PropType
  • removed: function generateFuncSignature(params: ExtractedJsDocParam[], returns: ExtractedJsDocReturns): string
  • removed: function generateShortFuncSignature(params: ExtractedJsDocParam[], returns: ExtractedJsDocReturns): string
  • removed: function toMultilineSignature(signature: string): string
  • removed: function enhancePropTypesProp(extractedProp: ExtractedProp, rawDefaultProp?: any): PropDef
  • removed: function enhancePropTypesProps(extractedProps: ExtractedProp[], component: Component): PropDef[]
  • removed: const rawDefaultPropTypeResolvers: import('../lib/defaultValues').TypeResolvers
  • removed: function keepOriginalDefinitionOrder(extractedProps: PropDef[], component: Component): PropDef[]
  • removed: function enhanceTypeScriptProp(extractedProp: ExtractedProp, rawDefaultProp?: any): PropDef
  • removed: function enhanceTypeScriptProps(extractedProps: ExtractedProp[]): PropDef[]
  • removed: export * from './preview/types-6-3'
  • removed: export * from './testing'
  • removed: export { DecoratorFn } from './preview'
  • removed: export { addDecorator } from './preview'
  • removed: export { addParameters } from './preview'
  • removed: export { configure } from './preview'
  • removed: export { forceReRender } from './preview'
  • removed: export { getStorybook } from './preview'
  • removed: export { raw } from './preview'
  • removed: export { setAddon } from './preview'
  • removed: export { storiesOf } from './preview'
  • removed: const parameters: { framework: string }
  • removed: export { render } from './render'
  • removed: export { renderToDOM } from './render'
  • removed: const addDecorator: ClientApi['addDecorator']
  • removed: const addParameters: ClientApi['addParameters']
  • removed: const clearDecorators: ClientApi['clearDecorators']
  • removed: const configure: ClientApi['configure']
  • removed: const forceReRender: ClientApi['forceReRender']
  • removed: const getStorybook: ClientApi['getStorybook']
  • removed: const raw: ClientApi['raw']
  • removed: const setAddon: ClientApi['setAddon']
  • removed: const storiesOf: ClientApi['storiesOf']
  • removed: type DecoratorFn = Parameters<typeof addDecorator>[0]
  • removed: const render: ArgsStoryFn<ReactFramework>
  • removed: function renderToDOM({ storyContext, unboundStoryFn, showMain, showException, forceRemount }: RenderContext<ReactFramework>, domElement: HTMLElement): Promise<void>
  • removed: export { RenderContext } from '@storybook/store'
  • removed: export { StoryContext } from '@storybook/csf'
  • removed: interface IStorybookSection
  • removed: interface IStorybookStory
  • removed: interface ShowErrorArgs
  • removed: property IStorybookSection.kind: string
  • removed: property IStorybookSection.stories: IStorybookStory[]
  • removed: property IStorybookStory.name: string
  • removed: property IStorybookStory.render: (context: any) => any
  • removed: property ShowErrorArgs.description: string
  • removed: property ShowErrorArgs.title: string
  • removed: type StoryFnReactReturnType = ReactElement<unknown>
  • removed: export { ArgTypes } from '@storybook/csf'
  • removed: export { Args } from '@storybook/csf'
  • removed: export { Parameters } from '@storybook/csf'
  • removed: export { StoryContext } from '@storybook/csf'
  • removed: type Meta<TArgs = Args> = ComponentAnnotations<ReactFramework, TArgs>
  • removed: type ReactFramework = { component: ComponentType<any>; storyResult: StoryFnReactReturnType }
  • removed: type Story<TArgs = Args> = StoryFn<TArgs>
  • removed: type StoryFn<TArgs = Args> = AnnotatedStoryFn<ReactFramework, TArgs>
  • removed: type StoryObj<TArgs = Args> = StoryAnnotations<ReactFramework, TArgs>
  • removed: export * from './types-6-0'
  • removed: type ComponentMeta<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = Meta<ComponentProps<T>>
  • removed: type ComponentStory<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = Story<ComponentProps<T>>
  • removed: type ComponentStoryFn<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = StoryFn<ComponentProps<T>>
  • removed: type ComponentStoryObj<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = StoryObj<ComponentProps<T>>
  • removed: export { ComponentMeta } from './types-6-3'
  • removed: export { ComponentStoryFn } from './types-6-3'
  • removed: export { ComponentStoryObj } from './types-6-3'
  • removed: export { Meta } from './types-6-0'
  • removed: export { StoryFn } from './types-6-0'
  • removed: export { StoryObj } from './types-6-0'
  • removed: type ComponentStory<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = ComponentStoryObj<T>
  • removed: type Story<TArgs = Args> = StoryObj<TArgs>
  • removed: function composeStories<TModule extends CSFExports<ReactFramework>>(csfExports: TModule, projectAnnotations?: ProjectAnnotations<ReactFramework>): Pick<StoriesWithPartialProps<ReactFramework, TModule>, Exclude<keyof TModule, 'default' | '__esModule' | '__namedExportsOrder'>>
  • removed: function composeStory<TArgs = Args>(story: ComposedStory<ReactFramework, TArgs>, componentAnnotations: Meta<TArgs | any>, projectAnnotations?: ProjectAnnotations<ReactFramework>, exportsName?: string): { (extraArgs: Partial<TArgs>): import('../preview/types').StoryFnReactReturnType; storyName: string; args: Args; play: import('@storybook/store').ComposedStoryPlayFn; parameters: import('@storybook…
  • removed: function setGlobalConfig(projectAnnotations: ProjectAnnotations<ReactFramework> | ProjectAnnotations<ReactFramework>[]): void
  • removed: function setProjectAnnotations(projectAnnotations: ProjectAnnotations<ReactFramework> | ProjectAnnotations<ReactFramework>[]): void
  • removed: const Button: FunctionComponent<Props>
  • removed: default Button
  • removed: const default: FunctionComponent<WelcomeProps>
  • removed: function getReactScriptsPath({ noCache }?: { noCache?: boolean }): string
  • removed: function isReactScriptsInstalled(requiredVersion?: string): boolean
  • removed: function webpackFinal(config: Configuration, { presetsList }: Options): Configuration
  • removed: function babel(config: TransformOptions, options: Options): Promise<TransformOptions>
  • removed: function babelDefault(config: TransformOptions): Promise<TransformOptions>
  • removed: function webpackFinal(config: Configuration, options: Options): Promise<Configuration>
  • removed: const previewAnnotations: StorybookConfig['previewAnnotations']
  • removed: function babel(config: TransformOptions, options: Options): Promise<TransformOptions>
  • removed: function webpackFinal(config: Configuration, options: Options): Promise<Configuration>
  • removed: function webpackFinal(config: Configuration): Promise<{ plugins: import('webpack').Plugin[]; mode?: 'none' | 'production' | 'development'; name?: string; context?: string; entry?: string | string[] | import('webpack').Entry | import('webpack').EntryFunc; devtool?: string | boolean; output?: import('webpack').Output; module?: import('webpack').Module; resolve?: import('webpack').Resolve; resolveLo…
  • removed: const _default: LoadOptions
  • removed: default _default
  • removed: const addons: StorybookConfig['addons']
  • removed: const previewAnnotations: StorybookConfig['previewAnnotations']
  • added: interface R extends WebRenderer
  • added: property R.component: ComponentType<this['T']>
  • added: property R.storyResult: StoryFnReactReturnType
  • removed: export * from './dist/ts3.9/client/preview/types-6-0.d'
  • removed: export * from './dist/ts3.9/client/preview/types-7-0.d'