create-storybook 9.2.0-alpha.3 → 10.0.0-beta.1
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/README.md +7 -1
- package/dist/_node-chunks/chunk-T3MAYGYW.js +101 -0
- package/dist/_node-chunks/chunk-W6DMVTOY.js +18054 -0
- package/dist/_node-chunks/run-5P25MPU4.js +3091 -0
- package/dist/bin/index.js +28 -30
- package/dist/index.js +17 -8
- package/package.json +14 -21
- package/rendererAssets/common/Configure.mdx +11 -11
- package/bin/index.cjs +0 -29
- package/dist/acorn-S663NUPJ.js +0 -23
- package/dist/angular-2B6ABFHH.js +0 -9
- package/dist/babel-MNAPHRD7.js +0 -23
- package/dist/chunk-CLZ3BCYS.js +0 -8
- package/dist/chunk-O2GNSM63.js +0 -8
- package/dist/chunk-RC45H3ZY.js +0 -2911
- package/dist/chunk-VASF4FB5.js +0 -8
- package/dist/estree-33GAXYFB.js +0 -44
- package/dist/flow-G75PDG3L.js +0 -27
- package/dist/glimmer-6NKSN2XR.js +0 -38
- package/dist/globby-MUDC2HZV.js +0 -19
- package/dist/graphql-SR6B3LNT.js +0 -37
- package/dist/html-334HIZF4.js +0 -31
- package/dist/lib-JRUFT6VI.js +0 -13
- package/dist/markdown-IU6WPIRS.js +0 -71
- package/dist/meriyah-XCEGMU42.js +0 -12
- package/dist/p-limit-6IADBR6D.js +0 -10
- package/dist/postcss-ZQW7AFNR.js +0 -62
- package/dist/prettier-T3HPK5X5.js +0 -150
- package/dist/typescript-LM3Q5WBB.js +0 -28
- package/dist/yaml-LI2SVAD5.js +0 -169
package/dist/bin/index.js
CHANGED
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import 'node:url';
|
|
3
|
-
import 'node:path';
|
|
4
|
-
import
|
|
5
|
-
import '../chunk-CLZ3BCYS.js';
|
|
6
|
-
import '../chunk-O2GNSM63.js';
|
|
7
|
-
import { __commonJS, __require, __toESM } from '../chunk-VASF4FB5.js';
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import CJS_COMPAT_NODE_URL_hzp3snl9xm9 from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_hzp3snl9xm9 from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_hzp3snl9xm9 from "node:module";
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_hzp3snl9xm9.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hzp3snl9xm9.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_hzp3snl9xm9.createRequire(import.meta.url);
|
|
9
|
+
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
12
|
+
// ------------------------------------------------------------
|
|
13
|
+
import {
|
|
14
|
+
__toESM,
|
|
15
|
+
require_dist
|
|
16
|
+
} from "../_node-chunks/chunk-T3MAYGYW.js";
|
|
17
|
+
|
|
18
|
+
// src/bin/index.ts
|
|
19
|
+
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
20
|
+
import { logger } from "storybook/internal/node-logger";
|
|
21
|
+
var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(Number);
|
|
22
|
+
if (majorNodeVersion < 20 || majorNodeVersion === 20 && minorNodeVersion < 19 || majorNodeVersion === 22 && minorNodeVersion < 12) {
|
|
23
|
+
logger.error(
|
|
24
|
+
import_ts_dedent.dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
|
|
25
|
+
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
26
|
+
);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
import("../_node-chunks/run-5P25MPU4.js");
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'node:
|
|
3
|
-
import
|
|
4
|
-
export { doInitiate as initiate } from './chunk-RC45H3ZY.js';
|
|
5
|
-
import './chunk-CLZ3BCYS.js';
|
|
6
|
-
import './chunk-O2GNSM63.js';
|
|
7
|
-
import './chunk-VASF4FB5.js';
|
|
1
|
+
import CJS_COMPAT_NODE_URL_hzp3snl9xm9 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_hzp3snl9xm9 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_hzp3snl9xm9 from "node:module";
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_hzp3snl9xm9.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hzp3snl9xm9.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_hzp3snl9xm9.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
doInitiate
|
|
14
|
+
} from "./_node-chunks/chunk-W6DMVTOY.js";
|
|
15
|
+
import "./_node-chunks/chunk-T3MAYGYW.js";
|
|
16
|
+
export {
|
|
17
|
+
doInitiate as initiate
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-storybook",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "10.0.0-beta.1",
|
|
4
|
+
"description": "Storybook installer: Develop, document, and test UI components in isolation",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"storybook",
|
|
7
|
+
"cli",
|
|
8
|
+
"create",
|
|
9
|
+
"init"
|
|
10
|
+
],
|
|
5
11
|
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/create-storybook",
|
|
6
12
|
"bugs": {
|
|
7
13
|
"url": "https://github.com/storybookjs/storybook/issues"
|
|
@@ -20,12 +26,9 @@
|
|
|
20
26
|
"type": "module",
|
|
21
27
|
"exports": {
|
|
22
28
|
".": "./dist/index.js",
|
|
23
|
-
"./bin/index.cjs": "./bin/index.cjs",
|
|
24
29
|
"./package.json": "./package.json"
|
|
25
30
|
},
|
|
26
|
-
"
|
|
27
|
-
"module": "dist/index.js",
|
|
28
|
-
"bin": "./bin/index.cjs",
|
|
31
|
+
"bin": "./dist/bin/index.js",
|
|
29
32
|
"files": [
|
|
30
33
|
"bin/**/*",
|
|
31
34
|
"dist/**/*",
|
|
@@ -35,11 +38,12 @@
|
|
|
35
38
|
"!src/**/*"
|
|
36
39
|
],
|
|
37
40
|
"scripts": {
|
|
38
|
-
"check": "jiti
|
|
39
|
-
"prep": "jiti
|
|
41
|
+
"check": "jiti ../../../scripts/check/check-package.ts",
|
|
42
|
+
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"semver": "^7.6.2"
|
|
45
|
+
"semver": "^7.6.2",
|
|
46
|
+
"storybook": "10.0.0-beta.1"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
45
49
|
"@types/prompts": "^2.0.9",
|
|
@@ -52,7 +56,6 @@
|
|
|
52
56
|
"picocolors": "^1.1.0",
|
|
53
57
|
"prompts": "^2.4.0",
|
|
54
58
|
"react": "^18.2.0",
|
|
55
|
-
"storybook": "9.2.0-alpha.3",
|
|
56
59
|
"tiny-invariant": "^1.3.1",
|
|
57
60
|
"ts-dedent": "^2.0.0",
|
|
58
61
|
"typescript": "^5.8.3"
|
|
@@ -60,15 +63,5 @@
|
|
|
60
63
|
"publishConfig": {
|
|
61
64
|
"access": "public"
|
|
62
65
|
},
|
|
63
|
-
"
|
|
64
|
-
"entries": [
|
|
65
|
-
"./src/index.ts",
|
|
66
|
-
"./src/bin/index.ts"
|
|
67
|
-
],
|
|
68
|
-
"formats": [
|
|
69
|
-
"node-esm"
|
|
70
|
-
],
|
|
71
|
-
"types": false
|
|
72
|
-
},
|
|
73
|
-
"gitHead": "ce6a1e4a8d5ad69c699021a0b183df89cfc7b684"
|
|
66
|
+
"gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae16"
|
|
74
67
|
}
|
|
@@ -48,7 +48,7 @@ export const RightArrow = () => <svg
|
|
|
48
48
|
<h4 className="sb-section-item-heading">Add styling and CSS</h4>
|
|
49
49
|
<p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
|
|
50
50
|
<a
|
|
51
|
-
href="https://storybook.js.org/docs/configure/styling-and-css/?renderer={{renderer}}"
|
|
51
|
+
href="https://storybook.js.org/docs/configure/styling-and-css/?renderer={{renderer}}&ref=configure"
|
|
52
52
|
target="_blank"
|
|
53
53
|
>Learn more<RightArrow /></a>
|
|
54
54
|
</div>
|
|
@@ -60,7 +60,7 @@ export const RightArrow = () => <svg
|
|
|
60
60
|
<h4 className="sb-section-item-heading">Provide context and mocking</h4>
|
|
61
61
|
<p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
|
|
62
62
|
<a
|
|
63
|
-
href="https://storybook.js.org/docs/writing-stories/decorators/?renderer={{renderer}}#context-for-mocking"
|
|
63
|
+
href="https://storybook.js.org/docs/writing-stories/decorators/?renderer={{renderer}}&ref=configure#context-for-mocking"
|
|
64
64
|
target="_blank"
|
|
65
65
|
>Learn more<RightArrow /></a>
|
|
66
66
|
</div>
|
|
@@ -72,7 +72,7 @@ export const RightArrow = () => <svg
|
|
|
72
72
|
`staticDirs` configuration option to specify folders to load when
|
|
73
73
|
starting Storybook.</p>
|
|
74
74
|
<a
|
|
75
|
-
href="https://storybook.js.org/docs/configure/images-and-assets/?renderer={{renderer}}"
|
|
75
|
+
href="https://storybook.js.org/docs/configure/images-and-assets/?renderer={{renderer}}&ref=configure"
|
|
76
76
|
target="_blank"
|
|
77
77
|
>Learn more<RightArrow /></a>
|
|
78
78
|
</div>
|
|
@@ -94,7 +94,7 @@ export const RightArrow = () => <svg
|
|
|
94
94
|
<p className="sb-section-item-paragraph">Auto-generate living,
|
|
95
95
|
interactive reference documentation from your components and stories.</p>
|
|
96
96
|
<a
|
|
97
|
-
href="https://storybook.js.org/docs/writing-docs/autodocs/?renderer={{renderer}}"
|
|
97
|
+
href="https://storybook.js.org/docs/writing-docs/autodocs/?renderer={{renderer}}&ref=configure"
|
|
98
98
|
target="_blank"
|
|
99
99
|
>Learn more<RightArrow /></a>
|
|
100
100
|
</div>
|
|
@@ -103,7 +103,7 @@ export const RightArrow = () => <svg
|
|
|
103
103
|
<h4 className="sb-section-item-heading">Publish to Chromatic</h4>
|
|
104
104
|
<p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
|
|
105
105
|
<a
|
|
106
|
-
href="https://storybook.js.org/docs/sharing/publish-storybook/?renderer={{renderer}}#publish-storybook-with-chromatic"
|
|
106
|
+
href="https://storybook.js.org/docs/sharing/publish-storybook/?renderer={{renderer}}&ref=configure#publish-storybook-with-chromatic"
|
|
107
107
|
target="_blank"
|
|
108
108
|
>Learn more<RightArrow /></a>
|
|
109
109
|
</div>
|
|
@@ -113,7 +113,7 @@ export const RightArrow = () => <svg
|
|
|
113
113
|
<p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
|
|
114
114
|
implementation in one place.</p>
|
|
115
115
|
<a
|
|
116
|
-
href="https://storybook.js.org/docs/sharing/design-integrations/?renderer={{renderer}}#embed-storybook-in-figma-with-the-plugin"
|
|
116
|
+
href="https://storybook.js.org/docs/sharing/design-integrations/?renderer={{renderer}}&ref=configure#embed-storybook-in-figma-with-the-plugin"
|
|
117
117
|
target="_blank"
|
|
118
118
|
>Learn more<RightArrow /></a>
|
|
119
119
|
</div>
|
|
@@ -123,7 +123,7 @@ export const RightArrow = () => <svg
|
|
|
123
123
|
<p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
|
|
124
124
|
complex.</p>
|
|
125
125
|
<a
|
|
126
|
-
href="https://storybook.js.org/docs/writing-tests/?renderer={{renderer}}"
|
|
126
|
+
href="https://storybook.js.org/docs/writing-tests/?renderer={{renderer}}&ref=configure"
|
|
127
127
|
target="_blank"
|
|
128
128
|
>Learn more<RightArrow /></a>
|
|
129
129
|
</div>
|
|
@@ -132,7 +132,7 @@ export const RightArrow = () => <svg
|
|
|
132
132
|
<h4 className="sb-section-item-heading">Accessibility</h4>
|
|
133
133
|
<p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
|
|
134
134
|
<a
|
|
135
|
-
href="https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer={{renderer}}"
|
|
135
|
+
href="https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer={{renderer}}&ref=configure"
|
|
136
136
|
target="_blank"
|
|
137
137
|
>Learn more<RightArrow /></a>
|
|
138
138
|
</div>
|
|
@@ -141,7 +141,7 @@ export const RightArrow = () => <svg
|
|
|
141
141
|
<h4 className="sb-section-item-heading">Theming</h4>
|
|
142
142
|
<p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
|
|
143
143
|
<a
|
|
144
|
-
href="https://storybook.js.org/docs/configure/theming/?renderer={{renderer}}"
|
|
144
|
+
href="https://storybook.js.org/docs/configure/theming/?renderer={{renderer}}&ref=configure"
|
|
145
145
|
target="_blank"
|
|
146
146
|
>Learn more<RightArrow /></a>
|
|
147
147
|
</div>
|
|
@@ -153,7 +153,7 @@ export const RightArrow = () => <svg
|
|
|
153
153
|
<h4>Addons</h4>
|
|
154
154
|
<p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
|
|
155
155
|
<a
|
|
156
|
-
href="https://storybook.js.org/addons
|
|
156
|
+
href="https://storybook.js.org/addons/?ref=configure"
|
|
157
157
|
target="_blank"
|
|
158
158
|
>Discover all addons<RightArrow /></a>
|
|
159
159
|
</div>
|
|
@@ -199,7 +199,7 @@ export const RightArrow = () => <svg
|
|
|
199
199
|
<p>Follow guided walkthroughs on for key workflows.</p>
|
|
200
200
|
|
|
201
201
|
<a
|
|
202
|
-
href="https://storybook.js.org/tutorials
|
|
202
|
+
href="https://storybook.js.org/tutorials/?ref=configure"
|
|
203
203
|
target="_blank"
|
|
204
204
|
>Discover tutorials<RightArrow /></a>
|
|
205
205
|
</div>
|
package/bin/index.cjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const majorNodeVersion = parseInt(process.versions.node, 10);
|
|
4
|
-
if (majorNodeVersion < 20) {
|
|
5
|
-
console.error('To run Storybook you need to have Node.js 20 or higher');
|
|
6
|
-
process.exit(1);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// The Storybook CLI has a catch block for all of its commands, but if an error
|
|
10
|
-
// occurs before the command even runs, for instance, if an import fails, then
|
|
11
|
-
// such error will fall under the uncaughtException handler.
|
|
12
|
-
// This is the earliest moment we can catch such errors.
|
|
13
|
-
process.once('uncaughtException', (error) => {
|
|
14
|
-
if (error.message.includes('string-width')) {
|
|
15
|
-
console.error(
|
|
16
|
-
[
|
|
17
|
-
'🔴 Error: It looks like you are having a known issue with package hoisting.',
|
|
18
|
-
'Please check the following issue for details and solutions: https://github.com/storybookjs/storybook/issues/22431#issuecomment-1630086092\n\n',
|
|
19
|
-
].join('\n')
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
throw error;
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
import('../dist/bin/index.js').catch((error) => {
|
|
27
|
-
console.error(error);
|
|
28
|
-
process.exit(1);
|
|
29
|
-
});
|