@storybook/react 10.1.0-alpha.3 → 10.1.0-alpha.4
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/preset.js +12 -15
- package/package.json +3 -3
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ou6ur9ka85b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ou6ur9ka85b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ou6ur9ka85b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ou6ur9ka85b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ou6ur9ka85b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ou6ur9ka85b.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -5114,7 +5114,7 @@ var componentManifestGenerator = /* @__PURE__ */ __name(async () => {
|
|
|
5114
5114
|
const name = csf._meta?.component ?? entry.title.split("/").at(-1);
|
|
5115
5115
|
const id = entry.id.split("--")[0];
|
|
5116
5116
|
const importPath = entry.importPath;
|
|
5117
|
-
const
|
|
5117
|
+
const stories = Object.keys(csf._stories).map((storyName) => {
|
|
5118
5118
|
try {
|
|
5119
5119
|
return {
|
|
5120
5120
|
name: storyName,
|
|
@@ -5124,10 +5124,7 @@ var componentManifestGenerator = /* @__PURE__ */ __name(async () => {
|
|
|
5124
5124
|
invariant(e instanceof Error);
|
|
5125
5125
|
return {
|
|
5126
5126
|
name: storyName,
|
|
5127
|
-
error: {
|
|
5128
|
-
name: e.name,
|
|
5129
|
-
message: e.message
|
|
5130
|
-
}
|
|
5127
|
+
error: { name: e.name, message: e.message }
|
|
5131
5128
|
};
|
|
5132
5129
|
}
|
|
5133
5130
|
}).filter(Boolean);
|
|
@@ -5135,7 +5132,7 @@ var componentManifestGenerator = /* @__PURE__ */ __name(async () => {
|
|
|
5135
5132
|
id,
|
|
5136
5133
|
name,
|
|
5137
5134
|
path: importPath,
|
|
5138
|
-
|
|
5135
|
+
stories,
|
|
5139
5136
|
jsDocTags: {}
|
|
5140
5137
|
};
|
|
5141
5138
|
if (!entry.componentPath) {
|
|
@@ -5150,7 +5147,7 @@ var componentManifestGenerator = /* @__PURE__ */ __name(async () => {
|
|
|
5150
5147
|
return {
|
|
5151
5148
|
...base,
|
|
5152
5149
|
name,
|
|
5153
|
-
|
|
5150
|
+
stories,
|
|
5154
5151
|
error: {
|
|
5155
5152
|
name: error2.name,
|
|
5156
5153
|
message: csf._metaStatementPath?.buildCodeFrameError(error2.message).message ?? error2.message
|
|
@@ -5165,7 +5162,7 @@ var componentManifestGenerator = /* @__PURE__ */ __name(async () => {
|
|
|
5165
5162
|
return {
|
|
5166
5163
|
...base,
|
|
5167
5164
|
name,
|
|
5168
|
-
|
|
5165
|
+
stories,
|
|
5169
5166
|
error: {
|
|
5170
5167
|
name: "Component file could not be read",
|
|
5171
5168
|
message: `Could not read the component file located at "${entry.componentPath}".
|
|
@@ -5198,7 +5195,7 @@ You can debug your component file in this playground: https://react-docgen.dev/p
|
|
|
5198
5195
|
import: tags.import?.[0],
|
|
5199
5196
|
reactDocgen: docgen,
|
|
5200
5197
|
jsDocTags: tags,
|
|
5201
|
-
|
|
5198
|
+
stories,
|
|
5202
5199
|
error
|
|
5203
5200
|
};
|
|
5204
5201
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "10.1.0-alpha.
|
|
3
|
+
"version": "10.1.0-alpha.4",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@storybook/global": "^5.0.0",
|
|
57
|
-
"@storybook/react-dom-shim": "10.1.0-alpha.
|
|
57
|
+
"@storybook/react-dom-shim": "10.1.0-alpha.4",
|
|
58
58
|
"react-docgen": "^8.0.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
82
82
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
83
|
-
"storybook": "^10.1.0-alpha.
|
|
83
|
+
"storybook": "^10.1.0-alpha.4",
|
|
84
84
|
"typescript": ">= 4.9.x"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|