diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index e38d7112a906..15026f5f0af8 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -52,9 +52,8 @@ "@storybook/builder-vite": "workspace:*", "@storybook/react": "workspace:*", "@vitejs/plugin-react": "^3.0.1", - "ast-types": "^0.14.2", "magic-string": "^0.30.0", - "react-docgen": "6.0.0-alpha.3" + "react-docgen": "^6.0.2" }, "devDependencies": { "@types/node": "^16.0.0", diff --git a/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts b/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts index efa6717b47b2..01889ddf9dcf 100644 --- a/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts +++ b/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts @@ -9,40 +9,46 @@ * directly from displayNameHandler, using the same approach as babel-plugin-react-docgen. */ -import { namedTypes as t } from 'ast-types'; -import type { NodePath } from 'ast-types/lib/node-path'; -import { getNameOrValue, isReactForwardRefCall } from 'react-docgen/dist/utils'; -import type { Importer } from 'react-docgen/dist/parse'; -import type Documentation from 'react-docgen/dist/Documentation'; +import type { Handler, NodePath, babelTypes as t } from 'react-docgen'; +import { utils } from 'react-docgen'; -export default function actualNameHandler( - documentation: Documentation, - path: NodePath, - importer: Importer -): void { - if (t.ClassDeclaration.check(path.node) || t.FunctionDeclaration.check(path.node)) { - documentation.set('actualName', getNameOrValue(path.get('id'))); +const { getNameOrValue, isReactForwardRefCall } = utils; + +const actualNameHandler: Handler = function actualNameHandler(documentation, componentDefinition) { + if ( + (componentDefinition.isClassDeclaration() || componentDefinition.isFunctionDeclaration()) && + componentDefinition.has('id') + ) { + documentation.set( + 'actualName', + getNameOrValue(componentDefinition.get('id') as NodePath) + ); } else if ( - t.ArrowFunctionExpression.check(path.node) || - t.FunctionExpression.check(path.node) || - isReactForwardRefCall(path, importer) + componentDefinition.isArrowFunctionExpression() || + componentDefinition.isFunctionExpression() || + isReactForwardRefCall(componentDefinition) ) { - let currentPath = path; - while (currentPath.parent) { - if (t.VariableDeclarator.check(currentPath.parent.node)) { - documentation.set('actualName', getNameOrValue(currentPath.parent.get('id'))); + let currentPath: NodePath = componentDefinition; + + while (currentPath.parentPath) { + if (currentPath.parentPath.isVariableDeclarator()) { + documentation.set('actualName', getNameOrValue(currentPath.parentPath.get('id'))); return; } - if (t.AssignmentExpression.check(currentPath.parent.node)) { - const leftPath = currentPath.parent.get('left'); - if (t.Identifier.check(leftPath.node) || t.Literal.check(leftPath.node)) { + if (currentPath.parentPath.isAssignmentExpression()) { + const leftPath = currentPath.parentPath.get('left'); + + if (leftPath.isIdentifier() || leftPath.isLiteral()) { documentation.set('actualName', getNameOrValue(leftPath)); return; } } - currentPath = currentPath.parent; + + currentPath = currentPath.parentPath; } // Could not find an actual name documentation.set('actualName', ''); } -} +}; + +export default actualNameHandler; diff --git a/code/frameworks/react-vite/src/plugins/react-docgen.ts b/code/frameworks/react-vite/src/plugins/react-docgen.ts index 0561456f8618..9c35568f45ba 100644 --- a/code/frameworks/react-vite/src/plugins/react-docgen.ts +++ b/code/frameworks/react-vite/src/plugins/react-docgen.ts @@ -1,22 +1,23 @@ import path from 'path'; import { createFilter } from '@rollup/pluginutils'; +import type { Documentation } from 'react-docgen'; import { + ERROR_CODES, parse, - handlers as docgenHandlers, - resolver as docgenResolver, - importers as docgenImporters, + builtinHandlers as docgenHandlers, + builtinResolvers as docgenResolver, + builtinImporters as docgenImporters, } from 'react-docgen'; -import type { DocumentationObject } from 'react-docgen/dist/Documentation'; import MagicString from 'magic-string'; import type { PluginOption } from 'vite'; import actualNameHandler from './docgen-handlers/actualNameHandler'; -type DocObj = DocumentationObject & { actualName: string }; +type DocObj = Documentation & { actualName: string }; // TODO: None of these are able to be overridden, so `default` is aspirational here. const defaultHandlers = Object.values(docgenHandlers).map((handler) => handler); -const defaultResolver = docgenResolver.findAllExportedComponentDefinitions; -const defaultImporter = docgenImporters.makeFsImporter(); +const defaultResolver = new docgenResolver.FindExportedDefinitionsResolver(); +const defaultImporter = docgenImporters.fsImporter; const handlers = [...defaultHandlers, actualNameHandler]; type Options = { @@ -39,8 +40,9 @@ export function reactDocgen({ if (!filter(relPath)) return; try { - // Since we're using `findAllExportedComponentDefinitions`, this will always be an array. - const docgenResults = parse(src, defaultResolver, handlers, { + const docgenResults = parse(src, { + resolver: defaultResolver, + handlers, importer: defaultImporter, filename: id, }) as DocObj[]; @@ -59,10 +61,12 @@ export function reactDocgen({ code: s.toString(), map: s.generateMap(), }; - } catch (e) { - // Usually this is just an error from react-docgen that it couldn't find a component - // Only uncomment for troubleshooting - // console.error(e); + } catch (e: any) { + // Ignore the error when react-docgen cannot find a react component + if (e.code === ERROR_CODES.MISSING_DEFINITION) { + return; + } + throw e; } }, }; diff --git a/code/lib/docs-tools/src/argTypes/convert/convert.test.ts b/code/lib/docs-tools/src/argTypes/convert/convert.test.ts index 51ad20482478..f5139d7847a1 100644 --- a/code/lib/docs-tools/src/argTypes/convert/convert.test.ts +++ b/code/lib/docs-tools/src/argTypes/convert/convert.test.ts @@ -180,30 +180,18 @@ describe('storybook type system', () => { { "kind": { "raw": "'default' | 'action'", - "name": "union", + "name": "enum", "value": [ - { - "name": "other", - "value": "literal" - }, - { - "name": "other", - "value": "literal" - } + "default", + "action" ] }, "inlinedNumericLiteralUnion": { "raw": "0 | 1", - "name": "union", + "name": "enum", "value": [ - { - "name": "other", - "value": "literal" - }, - { - "name": "other", - "value": "literal" - } + 0, + 1 ] }, "enumUnion": { diff --git a/code/lib/docs-tools/src/argTypes/convert/proptypes/convert.ts b/code/lib/docs-tools/src/argTypes/convert/proptypes/convert.ts index 6caa89a5d268..82b85c0333e1 100644 --- a/code/lib/docs-tools/src/argTypes/convert/proptypes/convert.ts +++ b/code/lib/docs-tools/src/argTypes/convert/proptypes/convert.ts @@ -2,7 +2,7 @@ import mapValues from 'lodash/mapValues.js'; import type { SBType } from '@storybook/types'; import type { PTType } from './types'; -import { includesQuotes, trimQuotes } from '../utils'; +import { parseLiteral } from '../utils'; const SIGNATURE_REGEXP = /^\(.*\) => /; @@ -13,15 +13,7 @@ export const convert = (type: PTType): SBType | any => { switch (name) { case 'enum': { - const values = computed - ? value - : value.map((v: PTType) => { - const trimmedValue = trimQuotes(v.value); - - return includesQuotes(v.value) || Number.isNaN(Number(trimmedValue)) - ? trimmedValue - : Number(trimmedValue); - }); + const values = computed ? value : value.map((v: PTType) => parseLiteral(v.value)); return { ...base, name, value: values }; } case 'string': diff --git a/code/lib/docs-tools/src/argTypes/convert/typescript/convert.ts b/code/lib/docs-tools/src/argTypes/convert/typescript/convert.ts index 4683b933f845..ffec5b18db20 100644 --- a/code/lib/docs-tools/src/argTypes/convert/typescript/convert.ts +++ b/code/lib/docs-tools/src/argTypes/convert/typescript/convert.ts @@ -1,6 +1,7 @@ /* eslint-disable no-case-declarations */ import type { SBType } from '@storybook/types'; import type { TSType, TSSigType } from './types'; +import { parseLiteral } from '../utils'; const convertSig = (type: TSSigType) => { switch (type.type) { @@ -37,6 +38,18 @@ export const convert = (type: TSType): SBType | void => { case 'signature': return { ...base, ...convertSig(type) }; case 'union': + let result; + if (type.elements.every((element) => element.name === 'literal')) { + result = { + ...base, + name: 'enum', + // @ts-expect-error fix types + value: type.elements.map((v) => parseLiteral(v.value)), + }; + } else { + result = { ...base, name, value: type.elements.map(convert) }; + } + return result; case 'intersection': return { ...base, name, value: type.elements.map(convert) }; default: diff --git a/code/lib/docs-tools/src/argTypes/convert/typescript/types.ts b/code/lib/docs-tools/src/argTypes/convert/typescript/types.ts index dee016d76734..aed18f3f4160 100644 --- a/code/lib/docs-tools/src/argTypes/convert/typescript/types.ts +++ b/code/lib/docs-tools/src/argTypes/convert/typescript/types.ts @@ -33,7 +33,7 @@ type TSObjectSigType = TSBaseType & { }; type TSScalarType = TSBaseType & { - name: 'any' | 'boolean' | 'number' | 'void' | 'string' | 'symbol'; + name: 'any' | 'boolean' | 'number' | 'void' | 'string' | 'symbol' | 'literal'; }; type TSArrayType = TSBaseType & { diff --git a/code/lib/docs-tools/src/argTypes/convert/utils.ts b/code/lib/docs-tools/src/argTypes/convert/utils.ts index 6523490388a8..8af215e69aec 100644 --- a/code/lib/docs-tools/src/argTypes/convert/utils.ts +++ b/code/lib/docs-tools/src/argTypes/convert/utils.ts @@ -1,3 +1,10 @@ const QUOTE_REGEX = /^['"]|['"]$/g; export const trimQuotes = (str: string) => str.replace(QUOTE_REGEX, ''); export const includesQuotes = (str: string) => QUOTE_REGEX.test(str); +export const parseLiteral = (str: string) => { + const trimmedValue = trimQuotes(str); + + return includesQuotes(str) || Number.isNaN(Number(trimmedValue)) + ? trimmedValue + : Number(trimmedValue); +}; diff --git a/code/lib/docs-tools/src/argTypes/docgen/typeScript/createType.ts b/code/lib/docs-tools/src/argTypes/docgen/typeScript/createType.ts index 7b03da0e2411..8aa541f38c6d 100644 --- a/code/lib/docs-tools/src/argTypes/docgen/typeScript/createType.ts +++ b/code/lib/docs-tools/src/argTypes/docgen/typeScript/createType.ts @@ -9,9 +9,12 @@ export function createType({ tsType, required }: DocgenInfo): PropType { return null; } + let typeName = tsType.name; if (!required) { - return createSummaryValue(tsType.name.replace(' | undefined', '')); + typeName = typeName.replace(' | undefined', ''); } - return createSummaryValue(tsType.name); + return createSummaryValue( + ['Array', 'Record', 'signature'].includes(tsType.name) ? tsType.raw : typeName + ); } diff --git a/code/lib/docs-tools/src/argTypes/docgen/types.ts b/code/lib/docs-tools/src/argTypes/docgen/types.ts index 498daee4ac58..d671a2bae8b7 100644 --- a/code/lib/docs-tools/src/argTypes/docgen/types.ts +++ b/code/lib/docs-tools/src/argTypes/docgen/types.ts @@ -26,8 +26,9 @@ export interface DocgenFlowType extends DocgenType { elements?: any[]; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface DocgenTypeScriptType extends DocgenType {} +export interface DocgenTypeScriptType extends DocgenType { + raw?: string; +} // export type DocgenType = DocgenPropType | DocgenFlowType | DocgenTypeScriptType; diff --git a/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot b/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot index dde0ac32a22f..560ce954feb2 100644 --- a/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot @@ -23,10 +23,15 @@ Object { }, "title": Object { "control": Object { - "type": "object", + "type": "radio", }, "description": "A title that brings attention to the alert.", "name": "title", + "options": Array [ + "Code Red", + "Code Yellow", + "Code Green", + ], "table": Object { "defaultValue": Object { "detail": undefined, @@ -39,22 +44,13 @@ Object { }, }, "type": Object { - "name": "union", + "name": "enum", "raw": "'Code Red' | 'Code Yellow' | 'Code Green'", "required": false, "value": Array [ - Object { - "name": "other", - "value": "literal", - }, - Object { - "name": "other", - "value": "literal", - }, - Object { - "name": "other", - "value": "literal", - }, + "Code Red", + "Code Yellow", + "Code Green", ], }, }, diff --git a/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/properties.snapshot b/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/properties.snapshot index f6be2f921ecf..1333ed781146 100644 --- a/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/properties.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9493-ts-display-name/properties.snapshot @@ -12,21 +12,12 @@ Object { "name": "title", "required": false, "sbType": Object { - "name": "union", + "name": "enum", "raw": "'Code Red' | 'Code Yellow' | 'Code Green'", "value": Array [ - Object { - "name": "other", - "value": "literal", - }, - Object { - "name": "other", - "value": "literal", - }, - Object { - "name": "other", - "value": "literal", - }, + "Code Red", + "Code Yellow", + "Code Green", ], }, "type": Object { diff --git a/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot b/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot index cfe5c6d41a5a..35afb4cfba6f 100644 --- a/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot @@ -13,7 +13,7 @@ Object { "jsDocTags": undefined, "type": Object { "detail": undefined, - "summary": "signature", + "summary": "{ width: number; height: number }", }, }, "type": Object { diff --git a/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot b/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot index 9a88cea0e370..05ad26d8baee 100644 --- a/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot @@ -22,7 +22,7 @@ Object { }, "type": Object { "detail": undefined, - "summary": "signature", + "summary": "{ width: number; height: number }", }, }, ], diff --git a/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot b/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot index d37d679b5b9d..0f05e4e2bdf5 100644 --- a/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot @@ -13,7 +13,7 @@ Object { "jsDocTags": undefined, "type": Object { "detail": undefined, - "summary": "Array", + "summary": "string[]", }, }, "type": Object { diff --git a/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/properties.snapshot b/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/properties.snapshot index 5d944694e62b..06f92d9ce2e5 100644 --- a/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/properties.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9827-ts-default-values/properties.snapshot @@ -48,7 +48,7 @@ Object { }, "type": Object { "detail": undefined, - "summary": "Array", + "summary": "string[]", }, }, ], diff --git a/code/yarn.lock b/code/yarn.lock index af6301afc76b..3f9dbaca64d1 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -414,6 +414,16 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/code-frame@npm:7.22.10" + dependencies: + "@babel/highlight": ^7.22.10 + chalk: ^2.4.2 + checksum: fc5fe681eda128f15b928287b6c8e2ccec45776b8662524945cde005fba725642cc47ab0cfef4e7ff9ba5acccb3e907eebc2b3a7f075b8b31b19011229170b27 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": version: 7.22.9 resolution: "@babel/compat-data@npm:7.22.9" @@ -513,7 +523,30 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.22.9": +"@babel/core@npm:^7.18.9": + version: 7.22.10 + resolution: "@babel/core@npm:7.22.10" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.22.10 + "@babel/generator": ^7.22.10 + "@babel/helper-compilation-targets": ^7.22.10 + "@babel/helper-module-transforms": ^7.22.9 + "@babel/helpers": ^7.22.10 + "@babel/parser": ^7.22.10 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.10 + "@babel/types": ^7.22.10 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.2 + semver: ^6.3.1 + checksum: aebc08abfc4d4370d3023b1c5a22db2edd896ddbe21ed54f11c654660481f598b08fd456f9a5aa90cd2d81e0ea6767cd73f72fc11f7ad04d897f8fb20671cc1c + languageName: node + linkType: hard + +"@babel/generator@npm:7.22.9, @babel/generator@npm:^7.12.11, @babel/generator@npm:^7.22.5, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.7.2, @babel/generator@npm:^7.8.7": version: 7.22.9 resolution: "@babel/generator@npm:7.22.9" dependencies: @@ -525,7 +558,19 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.22.15, @babel/generator@npm:^7.22.5, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.7.2, @babel/generator@npm:^7.8.7": +"@babel/generator@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/generator@npm:7.22.10" + dependencies: + "@babel/types": ^7.22.10 + "@jridgewell/gen-mapping": ^0.3.2 + "@jridgewell/trace-mapping": ^0.3.17 + jsesc: ^2.5.1 + checksum: 2f26ac64f0b606cd9e7799eb2bc42d371b378ba2cb3c7c92c01a3bfccca271371990bcd2dc67fee5547721ba3e1fa83ca03fe3aab30bdf417c3078b9759d2f10 + languageName: node + linkType: hard + +"@babel/generator@npm:^7.22.15": version: 7.22.15 resolution: "@babel/generator@npm:7.22.15" dependencies: @@ -568,6 +613,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/helper-compilation-targets@npm:7.22.10" + dependencies: + "@babel/compat-data": ^7.22.9 + "@babel/helper-validator-option": ^7.22.5 + browserslist: ^4.21.9 + lru-cache: ^5.1.1 + semver: ^6.3.1 + checksum: edef207b819f491ded9462ac73858eadb155f4a0afe6cf3951459e47ad23b743ed56d7bd8a1b3f63fd25b39543db42ea58fea7b2193dcb4c98a511d7f1ad547a + languageName: node + linkType: hard + "@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.22.11, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.22.5": version: 7.22.15 resolution: "@babel/helper-create-class-features-plugin@npm:7.22.15" @@ -775,7 +833,7 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.22.15, @babel/helpers@npm:^7.22.5, @babel/helpers@npm:^7.22.6, @babel/helpers@npm:^7.8.4": +"@babel/helpers@npm:^7.22.10, @babel/helpers@npm:^7.22.15, @babel/helpers@npm:^7.22.5, @babel/helpers@npm:^7.22.6, @babel/helpers@npm:^7.8.4": version: 7.22.15 resolution: "@babel/helpers@npm:7.22.15" dependencies: @@ -786,6 +844,17 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/highlight@npm:7.22.10" + dependencies: + "@babel/helper-validator-identifier": ^7.22.5 + chalk: ^2.4.2 + js-tokens: ^4.0.0 + checksum: ac321ed90d37f76df74a44addc1692658eff64060375550bfb64919959573b14000ac83744e1ed30cc51b8b2f1291b0f0e98a3398d3c33c9c4548dd326a898fc + languageName: node + linkType: hard + "@babel/highlight@npm:^7.22.13": version: 7.22.13 resolution: "@babel/highlight@npm:7.22.13" @@ -806,6 +875,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/parser@npm:7.22.10" + bin: + parser: ./bin/babel-parser.js + checksum: 22de4b5b2e20dd5b44a73963e5fceef44501bacdd14f0b3b96fc16975826553c83c3e424e2ea906b4f2fb8c2129b176bcee33ae99e30de9006ceb28ded5c6ac7 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.15, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5": version: 7.22.15 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.15" @@ -2307,7 +2385,25 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.17, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.0, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.8.6, @babel/types@npm:^7.8.7, @babel/types@npm:^7.9.6": +"@babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/traverse@npm:7.22.10" + dependencies: + "@babel/code-frame": ^7.22.10 + "@babel/generator": ^7.22.10 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.22.10 + "@babel/types": ^7.22.10 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: 8e8b63b053962908408ed9d954810e93f241122222db115327ed5876d020f420fc115ef2d79623c2a4928447ddc002ec220be2a152b241d19de2480c88e10cfb + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.10, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.17, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.0, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.8.6, @babel/types@npm:^7.8.7, @babel/types@npm:^7.9.6": version: 7.22.17 resolution: "@babel/types@npm:7.22.17" dependencies: @@ -7655,9 +7751,8 @@ __metadata: "@storybook/react": "workspace:*" "@types/node": ^16.0.0 "@vitejs/plugin-react": ^3.0.1 - ast-types: ^0.14.2 magic-string: ^0.30.0 - react-docgen: 6.0.0-alpha.3 + react-docgen: ^6.0.2 typescript: ~4.9.3 vite: ^4.0.0 peerDependencies: @@ -8833,6 +8928,19 @@ __metadata: linkType: hard "@types/babel__core@npm:^7, @types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.1.7": + version: 7.20.0 + resolution: "@types/babel__core@npm:7.20.0" + dependencies: + "@babel/parser": ^7.20.7 + "@babel/types": ^7.20.7 + "@types/babel__generator": "*" + "@types/babel__template": "*" + "@types/babel__traverse": "*" + checksum: 75dcd39258bc008b6fd4db7de2c8bfeb29b5cd2c726f54407f70243ddea1d8ce9e7082281557614c4a5f9f30d478387ca6ab6cc576fc829cebeb159bfaa8799f + languageName: node + linkType: hard + +"@types/babel__core@npm:^7.18.0": version: 7.20.1 resolution: "@types/babel__core@npm:7.20.1" dependencies: @@ -8878,7 +8986,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": +"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6, @types/babel__traverse@npm:^7.18.0": version: 7.20.1 resolution: "@types/babel__traverse@npm:7.20.1" dependencies: @@ -9003,6 +9111,13 @@ __metadata: languageName: node linkType: hard +"@types/doctrine@npm:^0.0.5": + version: 0.0.5 + resolution: "@types/doctrine@npm:0.0.5" + checksum: 9b38d1b110e94fa34632e21f83b64ed05116f6349b5666c11bc0d4081c793f9b0be25b9d8b34df0ec38d440741836c17d4c84576e22dc00a18fe972f96688bf3 + languageName: node + linkType: hard + "@types/ejs@npm:^3.1.1": version: 3.1.2 resolution: "@types/ejs@npm:3.1.2" @@ -9593,6 +9708,13 @@ __metadata: languageName: node linkType: hard +"@types/resolve@npm:^1.20.2": + version: 1.20.2 + resolution: "@types/resolve@npm:1.20.2" + checksum: c5b7e1770feb5ccfb6802f6ad82a7b0d50874c99331e0c9b259e415e55a38d7a86ad0901c57665d93f75938be2a6a0bc9aa06c9749192cadb2e4512800bbc6e6 + languageName: node + linkType: hard + "@types/responselike@npm:^1.0.0": version: 1.0.0 resolution: "@types/responselike@npm:1.0.0" @@ -12819,13 +12941,20 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001517": +"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001464": version: 1.0.30001533 resolution: "caniuse-lite@npm:1.0.30001533" checksum: bb07dc0845f4f05ee833eaf25c0eb93af2c6e1c59b0897ea85218cf9ef2e880c8b5e1f20c1b32916d4687cd557d945f8c43c64c8e3200d1a433681b30b42fe54 languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001517": + version: 1.0.30001520 + resolution: "caniuse-lite@npm:1.0.30001520" + checksum: 48daf0d55e72e343f09fe17cbd47303a5bf4d65f6ec08ef68cc998c4fed073c9789d710e296496140e8179138dccb4667b786e260ca5451e1663786ef889db3b + languageName: node + linkType: hard + "case-sensitive-paths-webpack-plugin@npm:^2.4.0": version: 2.4.0 resolution: "case-sensitive-paths-webpack-plugin@npm:2.4.0" @@ -15167,9 +15296,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.477": - version: 1.4.515 - resolution: "electron-to-chromium@npm:1.4.515" - checksum: 635bad718d0b301fe3e37adad623cf2ae35544863a213b481efb6acf12fbe684e3cfe6553a7bf21532ff186e46fc088c5e9700058d15ce07804797bd0528c230 + version: 1.4.490 + resolution: "electron-to-chromium@npm:1.4.490" + checksum: d205e3c9f4bf14cbaaa2be5bf3f3d498e161ec0cc6f10da7bfdd2c355e4ae1937244335fabe8b376e970d14ba2b2c415aa2a2d89ea61c000f54e6ed137853bb9 languageName: node linkType: hard @@ -23323,7 +23452,7 @@ __metadata: languageName: node linkType: hard -"min-indent@npm:^1.0.0": +"min-indent@npm:^1.0.0, min-indent@npm:^1.0.1": version: 1.0.1 resolution: "min-indent@npm:1.0.1" checksum: 7e207bd5c20401b292de291f02913230cb1163abca162044f7db1d951fa245b174dc00869d40dd9a9f32a885ad6a5f3e767ee104cf278f399cb4e92d3f582d5c @@ -26819,26 +26948,6 @@ __metadata: languageName: node linkType: hard -"react-docgen@npm:6.0.0-alpha.3": - version: 6.0.0-alpha.3 - resolution: "react-docgen@npm:6.0.0-alpha.3" - dependencies: - "@babel/core": ^7.7.5 - "@babel/generator": ^7.12.11 - ast-types: ^0.14.2 - commander: ^2.19.0 - doctrine: ^3.0.0 - estree-to-babel: ^3.1.0 - neo-async: ^2.6.1 - node-dir: ^0.1.10 - resolve: ^1.17.0 - strip-indent: ^3.0.0 - bin: - react-docgen: bin/react-docgen.js - checksum: 284bba5528d5e9084c3ed36b2d2fec8fc5d55f3fb8ca544ec3a0d1ab98c39001ecb7db6e03a1088b82eb3d750c1343cde2fc9b7729540277eda40e10f38912d8 - languageName: node - linkType: hard - "react-docgen@npm:^5.0.0": version: 5.4.3 resolution: "react-docgen@npm:5.4.3" @@ -26859,6 +26968,24 @@ __metadata: languageName: node linkType: hard +"react-docgen@npm:^6.0.2": + version: 6.0.2 + resolution: "react-docgen@npm:6.0.2" + dependencies: + "@babel/core": ^7.18.9 + "@babel/traverse": ^7.18.9 + "@babel/types": ^7.18.9 + "@types/babel__core": ^7.18.0 + "@types/babel__traverse": ^7.18.0 + "@types/doctrine": ^0.0.5 + "@types/resolve": ^1.20.2 + doctrine: ^3.0.0 + resolve: ^1.22.1 + strip-indent: ^4.0.0 + checksum: 040f9b460982d6b4690ed5381b6181c58f6a2cd9cd6d70cfc449663527eaf93908cc6f7f06b018d9bc345b65d0cb87cb3d05541403556f20c1feab28342b0b4c + languageName: node + linkType: hard + "react-dom@npm:^16.8.0": version: 16.14.0 resolution: "react-dom@npm:16.14.0" @@ -28164,7 +28291,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.15.1, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.4, resolve@npm:^1.3.2, resolve@npm:^1.4.0": +"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.15.1, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:^1.3.2, resolve@npm:^1.4.0": version: 1.22.4 resolution: "resolve@npm:1.22.4" dependencies: @@ -28203,7 +28330,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.13.1#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.15.1#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.4#~builtin, resolve@patch:resolve@^1.3.2#~builtin, resolve@patch:resolve@^1.4.0#~builtin": +"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.13.1#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.15.1#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin, resolve@patch:resolve@^1.3.2#~builtin, resolve@patch:resolve@^1.4.0#~builtin": version: 1.22.4 resolution: "resolve@patch:resolve@npm%3A1.22.4#~builtin::version=1.22.4&hash=c3c19d" dependencies: @@ -29756,6 +29883,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-indent@npm:4.0.0" + dependencies: + min-indent: ^1.0.1 + checksum: 6b1fb4e22056867f5c9e7a6f3f45922d9a2436cac758607d58aeaac0d3b16ec40b1c43317de7900f1b8dd7a4107352fa47fb960f2c23566538c51e8585c8870e + languageName: node + linkType: hard + "strip-json-comments@npm:^2.0.0": version: 2.0.1 resolution: "strip-json-comments@npm:2.0.1"