|
| 1 | +{ |
| 2 | + "v": 1, |
| 3 | + "components": { |
| 4 | + "success-component-with-mixed-stories": { |
| 5 | + "id": "success-component-with-mixed-stories", |
| 6 | + "path": "src/components/SuccessWithMixedStories.tsx", |
| 7 | + "name": "SuccessWithMixedStories", |
| 8 | + "description": "A component that loaded successfully but has some stories that failed to generate.", |
| 9 | + "summary": "Success component with both working and failing stories", |
| 10 | + "import": "import { SuccessWithMixedStories } from '@storybook/design-system';", |
| 11 | + "reactDocgen": { |
| 12 | + "props": { |
| 13 | + "text": { |
| 14 | + "description": "The text to display", |
| 15 | + "required": true, |
| 16 | + "tsType": { "name": "string" } |
| 17 | + }, |
| 18 | + "variant": { |
| 19 | + "description": "The visual variant", |
| 20 | + "required": false, |
| 21 | + "tsType": { |
| 22 | + "name": "union", |
| 23 | + "raw": "\"primary\" | \"secondary\"", |
| 24 | + "elements": [ |
| 25 | + { "name": "literal", "value": "\"primary\"" }, |
| 26 | + { "name": "literal", "value": "\"secondary\"" } |
| 27 | + ] |
| 28 | + }, |
| 29 | + "defaultValue": { "value": "\"primary\"", "computed": false } |
| 30 | + } |
| 31 | + } |
| 32 | + }, |
| 33 | + "stories": [ |
| 34 | + { |
| 35 | + "id": "success-component-with-mixed-stories--working", |
| 36 | + "name": "Working", |
| 37 | + "description": "This story generated successfully.", |
| 38 | + "summary": "A working story", |
| 39 | + "import": "import { SuccessWithMixedStories } from '@storybook/design-system';", |
| 40 | + "snippet": "const Working = () => <SuccessWithMixedStories text=\"Hello\" />" |
| 41 | + }, |
| 42 | + { |
| 43 | + "id": "success-component-with-mixed-stories--failed", |
| 44 | + "name": "Failed", |
| 45 | + "error": { |
| 46 | + "name": "SyntaxError", |
| 47 | + "message": "Unexpected token in story code. Unable to generate code snippet." |
| 48 | + } |
| 49 | + } |
| 50 | + ] |
| 51 | + }, |
| 52 | + "error-component-with-success-stories": { |
| 53 | + "id": "error-component-with-success-stories", |
| 54 | + "path": "src/components/ErrorWithSuccessStories.tsx", |
| 55 | + "name": "ErrorWithSuccessStories", |
| 56 | + "error": { |
| 57 | + "name": "TypeError", |
| 58 | + "message": "Failed to parse component: Cannot read property 'name' of undefined in react-docgen parser" |
| 59 | + }, |
| 60 | + "stories": [ |
| 61 | + { |
| 62 | + "id": "error-component-with-success-stories--basic", |
| 63 | + "name": "Basic", |
| 64 | + "description": "Even though the component parsing failed, this story's code snippet was generated.", |
| 65 | + "summary": "Basic usage story", |
| 66 | + "snippet": "const Basic = () => <ErrorWithSuccessStories>Content</ErrorWithSuccessStories>" |
| 67 | + }, |
| 68 | + { |
| 69 | + "id": "error-component-with-success-stories--advanced", |
| 70 | + "name": "Advanced", |
| 71 | + "description": "Another successfully generated story despite component-level errors.", |
| 72 | + "summary": "Advanced usage story", |
| 73 | + "snippet": "const Advanced = () => (\n <ErrorWithSuccessStories disabled>\n Advanced Content\n </ErrorWithSuccessStories>\n)" |
| 74 | + } |
| 75 | + ] |
| 76 | + }, |
| 77 | + "error-component-with-error-stories": { |
| 78 | + "id": "error-component-with-error-stories", |
| 79 | + "path": "src/components/ErrorWithErrorStories.tsx", |
| 80 | + "name": "ErrorWithErrorStories", |
| 81 | + "error": { |
| 82 | + "name": "Error", |
| 83 | + "message": "Failed to extract component metadata: File not found or contains invalid TypeScript" |
| 84 | + }, |
| 85 | + "stories": [ |
| 86 | + { |
| 87 | + "id": "error-component-with-error-stories--broken-story-1", |
| 88 | + "name": "BrokenStory1", |
| 89 | + "description": "This story failed to generate.", |
| 90 | + "error": { |
| 91 | + "name": "Error", |
| 92 | + "message": "Story render function is too complex to analyze" |
| 93 | + } |
| 94 | + }, |
| 95 | + { |
| 96 | + "id": "error-component-with-error-stories--broken-story-2", |
| 97 | + "name": "BrokenStory2", |
| 98 | + "description": "This story also failed to generate.", |
| 99 | + "error": { |
| 100 | + "name": "ReferenceError", |
| 101 | + "message": "Undefined variable referenced in story: missingImport" |
| 102 | + } |
| 103 | + } |
| 104 | + ] |
| 105 | + }, |
| 106 | + "complete-error-component": { |
| 107 | + "id": "complete-error-component", |
| 108 | + "path": "src/components/CompleteError.tsx", |
| 109 | + "name": "CompleteError", |
| 110 | + "error": { |
| 111 | + "name": "ModuleNotFoundError", |
| 112 | + "message": "Cannot find module './CompleteError' or its corresponding type declarations" |
| 113 | + } |
| 114 | + }, |
| 115 | + "partial-success": { |
| 116 | + "id": "partial-success", |
| 117 | + "path": "src/components/PartialSuccess.tsx", |
| 118 | + "name": "PartialSuccess", |
| 119 | + "description": "A component where everything worked except one story.", |
| 120 | + "summary": "Mostly working component with one failing story", |
| 121 | + "import": "import { PartialSuccess } from '@storybook/design-system';", |
| 122 | + "reactDocgen": { |
| 123 | + "props": { |
| 124 | + "title": { |
| 125 | + "description": "The title text", |
| 126 | + "required": true, |
| 127 | + "tsType": { "name": "string" } |
| 128 | + }, |
| 129 | + "subtitle": { |
| 130 | + "description": "Optional subtitle", |
| 131 | + "required": false, |
| 132 | + "tsType": { "name": "string" } |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + "stories": [ |
| 137 | + { |
| 138 | + "id": "partial-success--default", |
| 139 | + "name": "Default", |
| 140 | + "description": "Default usage of the component.", |
| 141 | + "import": "import { PartialSuccess } from '@storybook/design-system';", |
| 142 | + "snippet": "const Default = () => <PartialSuccess title=\"Hello\" />" |
| 143 | + }, |
| 144 | + { |
| 145 | + "id": "partial-success--with-subtitle", |
| 146 | + "name": "WithSubtitle", |
| 147 | + "description": "Component with both title and subtitle.", |
| 148 | + "import": "import { PartialSuccess } from '@storybook/design-system';", |
| 149 | + "snippet": "const WithSubtitle = () => <PartialSuccess title=\"Hello\" subtitle=\"World\" />" |
| 150 | + }, |
| 151 | + { |
| 152 | + "id": "partial-success--complex-case", |
| 153 | + "name": "ComplexCase", |
| 154 | + "description": "A complex story that failed to generate.", |
| 155 | + "error": { |
| 156 | + "name": "Error", |
| 157 | + "message": "Story uses hooks that cannot be statically analyzed" |
| 158 | + } |
| 159 | + } |
| 160 | + ] |
| 161 | + } |
| 162 | + } |
| 163 | +} |
0 commit comments