@storybook/cli 7.0.0-beta.6 → 7.0.0-beta.61
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/.eslintrc.js +1 -0
- package/bin/index.js +6 -1
- package/dist/chunk-HBVTX4IN.mjs +1239 -0
- package/dist/chunk-ZKUAYCCT.mjs +16 -0
- package/dist/generate.d.ts +1 -0
- package/dist/generate.js +5671 -291
- package/dist/generate.mjs +4423 -274
- package/dist/index.d.ts +134 -0
- package/dist/index.js +845 -0
- package/dist/index.mjs +12 -0
- package/package.json +33 -17
- package/rendererAssets/common/Introduction.mdx +1 -1
- package/rendererAssets/common/header.css +1 -1
- package/rendererAssets/common/page.css +1 -1
- package/templates/angular/template-csf/.storybook/tsconfig.json +5 -4
- package/templates/react-native/template-csf/storybook/addons.js +0 -3
- package/templates/react-native/template-csf/storybook/index.js +0 -29
- package/templates/react-native/template-csf/storybook/rn-addons.js +0 -2
- package/templates/react-native/template-csf/storybook/stories/Button/Button.stories.js +0 -20
- package/templates/react-native/template-csf/storybook/stories/Button/index.js +0 -17
- package/templates/react-native/template-csf/storybook/stories/CenterView/index.js +0 -16
- package/templates/react-native/template-csf/storybook/stories/CenterView/style.js +0 -8
- package/templates/react-native/template-csf/storybook/stories/Welcome/Welcome.stories.js +0 -6
- package/templates/react-native/template-csf/storybook/stories/Welcome/index.js +0 -57
- package/templates/react-native/template-csf/storybook/stories/index.js +0 -2
- package/templates/server/template-csf/.storybook/preview.js +0 -5
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.61",
|
|
4
4
|
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -22,6 +22,19 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"author": "Storybook Team",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"node": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.js",
|
|
29
|
+
"import": "./dist/index.mjs",
|
|
30
|
+
"types": "./dist/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
"./bin/index": "./bin/index.js"
|
|
34
|
+
},
|
|
35
|
+
"main": "dist/index.js",
|
|
36
|
+
"module": "dist/index.mjs",
|
|
37
|
+
"types": "dist/index.d.ts",
|
|
25
38
|
"bin": {
|
|
26
39
|
"getstorybook": "./bin/index.js",
|
|
27
40
|
"sb": "./bin/index.js"
|
|
@@ -43,13 +56,14 @@
|
|
|
43
56
|
"dependencies": {
|
|
44
57
|
"@babel/core": "^7.20.2",
|
|
45
58
|
"@babel/preset-env": "^7.20.2",
|
|
46
|
-
"@
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@storybook/core-
|
|
49
|
-
"@storybook/
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@storybook/
|
|
59
|
+
"@ndelangen/get-tarball": "^3.0.7",
|
|
60
|
+
"@storybook/codemod": "7.0.0-beta.61",
|
|
61
|
+
"@storybook/core-common": "7.0.0-beta.61",
|
|
62
|
+
"@storybook/core-server": "7.0.0-beta.61",
|
|
63
|
+
"@storybook/csf-tools": "7.0.0-beta.61",
|
|
64
|
+
"@storybook/node-logger": "7.0.0-beta.61",
|
|
65
|
+
"@storybook/telemetry": "7.0.0-beta.61",
|
|
66
|
+
"@storybook/types": "7.0.0-beta.61",
|
|
53
67
|
"@types/semver": "^7.3.4",
|
|
54
68
|
"boxen": "^5.1.2",
|
|
55
69
|
"chalk": "^4.1.0",
|
|
@@ -60,43 +74,45 @@
|
|
|
60
74
|
"execa": "^5.0.0",
|
|
61
75
|
"express": "^4.17.3",
|
|
62
76
|
"find-up": "^5.0.0",
|
|
63
|
-
"fs-extra": "^
|
|
77
|
+
"fs-extra": "^11.1.0",
|
|
78
|
+
"get-npm-tarball-url": "^2.0.3",
|
|
64
79
|
"get-port": "^5.1.1",
|
|
65
80
|
"giget": "^1.0.0",
|
|
66
81
|
"globby": "^11.0.2",
|
|
67
|
-
"jscodeshift": "^0.
|
|
82
|
+
"jscodeshift": "^0.14.0",
|
|
68
83
|
"leven": "^3.1.0",
|
|
84
|
+
"prettier": "^2.8.0",
|
|
69
85
|
"prompts": "^2.4.0",
|
|
70
86
|
"puppeteer-core": "^2.1.1",
|
|
71
87
|
"read-pkg-up": "^7.0.1",
|
|
72
88
|
"semver": "^7.3.7",
|
|
73
89
|
"shelljs": "^0.8.5",
|
|
90
|
+
"simple-update-notifier": "^1.0.0",
|
|
74
91
|
"strip-json-comments": "^3.0.1",
|
|
92
|
+
"tempy": "^1.0.1",
|
|
75
93
|
"ts-dedent": "^2.0.0",
|
|
76
|
-
"update-notifier": "^6.0.2",
|
|
77
94
|
"util-deprecate": "^1.0.2"
|
|
78
95
|
},
|
|
79
96
|
"devDependencies": {
|
|
80
|
-
"@storybook/client-api": "7.0.0-beta.
|
|
97
|
+
"@storybook/client-api": "7.0.0-beta.61",
|
|
81
98
|
"@types/cross-spawn": "^6.0.2",
|
|
82
99
|
"@types/prompts": "^2.0.9",
|
|
83
100
|
"@types/puppeteer-core": "^2.1.0",
|
|
84
101
|
"@types/semver": "^7.3.4",
|
|
85
102
|
"@types/shelljs": "^0.8.7",
|
|
86
|
-
"@types/update-notifier": "^6.0.1",
|
|
87
103
|
"@types/util-deprecate": "^1.0.0",
|
|
88
104
|
"strip-json-comments": "^3.1.1",
|
|
89
|
-
"typescript": "~4.9.3"
|
|
90
|
-
"update-notifier": "^6.0.2"
|
|
105
|
+
"typescript": "~4.9.3"
|
|
91
106
|
},
|
|
92
107
|
"publishConfig": {
|
|
93
108
|
"access": "public"
|
|
94
109
|
},
|
|
95
110
|
"bundler": {
|
|
96
111
|
"entries": [
|
|
97
|
-
"./src/generate.ts"
|
|
112
|
+
"./src/generate.ts",
|
|
113
|
+
"./src/index.ts"
|
|
98
114
|
],
|
|
99
115
|
"platform": "node"
|
|
100
116
|
},
|
|
101
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "c4707c66fa1b173da15d232f35e03dd647aa6a42"
|
|
102
118
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
2
|
+
"extends": "../tsconfig.app.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"types": ["node"],
|
|
5
|
-
"allowSyntheticDefaultImports": true
|
|
5
|
+
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"resolveJsonModule": true
|
|
6
7
|
},
|
|
7
|
-
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"
|
|
8
|
-
"include": ["../src/**/*", "
|
|
8
|
+
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
|
|
9
|
+
"include": ["../src/**/*", "./preview.ts"],
|
|
9
10
|
"files": ["./typings.d.ts"]
|
|
10
11
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// if you use expo remove this line
|
|
2
|
-
import { AppRegistry } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { getStorybookUI, configure, addDecorator } from '@storybook/react-native';
|
|
5
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
6
|
-
|
|
7
|
-
import './rn-addons';
|
|
8
|
-
|
|
9
|
-
// enables knobs for all stories
|
|
10
|
-
addDecorator(withKnobs);
|
|
11
|
-
|
|
12
|
-
// import stories
|
|
13
|
-
configure(
|
|
14
|
-
() => {
|
|
15
|
-
require('./stories');
|
|
16
|
-
},
|
|
17
|
-
module,
|
|
18
|
-
false
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
// Refer to https://github.com/storybookjs/react-native/tree/master/app/react-native#getstorybookui-options
|
|
22
|
-
// To find allowed options for getStorybookUI
|
|
23
|
-
const StorybookUIRoot = getStorybookUI({});
|
|
24
|
-
|
|
25
|
-
// If you are using React Native vanilla and after installation you don't see your app name here, write it manually.
|
|
26
|
-
// If you use Expo you should remove this line.
|
|
27
|
-
AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);
|
|
28
|
-
|
|
29
|
-
export default StorybookUIRoot;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { text } from '@storybook/addon-knobs';
|
|
3
|
-
import { storiesOf } from '@storybook/react-native';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Text } from 'react-native';
|
|
6
|
-
import Button from '.';
|
|
7
|
-
import CenterView from '../CenterView';
|
|
8
|
-
|
|
9
|
-
storiesOf('Button', module)
|
|
10
|
-
.addDecorator((getStory) => <CenterView>{getStory()}</CenterView>)
|
|
11
|
-
.add('with text', () => (
|
|
12
|
-
<Button onPress={action('clicked-text')}>
|
|
13
|
-
<Text>{text('Button text', 'Hello Button')}</Text>
|
|
14
|
-
</Button>
|
|
15
|
-
))
|
|
16
|
-
.add('with some emoji', () => (
|
|
17
|
-
<Button onPress={action('clicked-emoji')}>
|
|
18
|
-
<Text>😀 😎 👍 💯</Text>
|
|
19
|
-
</Button>
|
|
20
|
-
));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { TouchableHighlight } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export default function Button({ onPress, label }) {
|
|
6
|
-
return <TouchableHighlight onPress={onPress}>{label}</TouchableHighlight>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
Button.defaultProps = {
|
|
10
|
-
label: null,
|
|
11
|
-
onPress: () => {},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
Button.propTypes = {
|
|
15
|
-
label: PropTypes.node,
|
|
16
|
-
onPress: PropTypes.func,
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { View } from 'react-native';
|
|
4
|
-
import style from './style';
|
|
5
|
-
|
|
6
|
-
export default function CenterView({ label }) {
|
|
7
|
-
return <View style={style.main}>{label}</View>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
CenterView.defaultProps = {
|
|
11
|
-
label: null,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
CenterView.propTypes = {
|
|
15
|
-
label: PropTypes.node,
|
|
16
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { View, Text } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export default class Welcome extends React.Component {
|
|
6
|
-
styles = {
|
|
7
|
-
wrapper: {
|
|
8
|
-
flex: 1,
|
|
9
|
-
padding: 24,
|
|
10
|
-
justifyContent: 'center',
|
|
11
|
-
},
|
|
12
|
-
header: {
|
|
13
|
-
fontSize: 18,
|
|
14
|
-
marginBottom: 18,
|
|
15
|
-
},
|
|
16
|
-
content: {
|
|
17
|
-
fontSize: 12,
|
|
18
|
-
marginBottom: 10,
|
|
19
|
-
lineHeight: 18,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
showApp = (event) => {
|
|
24
|
-
const { showApp } = this.props;
|
|
25
|
-
event.preventDefault();
|
|
26
|
-
|
|
27
|
-
if (showApp) {
|
|
28
|
-
showApp();
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
render() {
|
|
33
|
-
return (
|
|
34
|
-
<View style={this.styles.wrapper}>
|
|
35
|
-
<Text style={this.styles.header}>Welcome to React Native Storybook</Text>
|
|
36
|
-
<Text style={this.styles.content}>
|
|
37
|
-
This is a UI Component development environment for your React Native app. Here you can
|
|
38
|
-
display and interact with your UI components as stories. A story is a single state of one
|
|
39
|
-
or more UI components. You can have as many stories as you want. In other words a story is
|
|
40
|
-
like a visual test case.
|
|
41
|
-
</Text>
|
|
42
|
-
<Text style={this.styles.content}>
|
|
43
|
-
We have added some stories inside the "storybook/stories" directory for examples. Try
|
|
44
|
-
editing the "storybook/stories/Welcome.js" file to edit this message.
|
|
45
|
-
</Text>
|
|
46
|
-
</View>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
Welcome.defaultProps = {
|
|
52
|
-
showApp: null,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
Welcome.propTypes = {
|
|
56
|
-
showApp: PropTypes.func,
|
|
57
|
-
};
|