@storybook/addon-docs 7.0.0-alpha.37 → 7.0.0-alpha.39
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/cjs/{blocks/index.js → blocks.js} +0 -0
- package/dist/cjs/preset.js +11 -3
- package/dist/esm/{blocks/index.js → blocks.js} +0 -0
- package/dist/esm/preset.js +11 -3
- package/dist/types/{blocks/index.d.ts → blocks.d.ts} +0 -0
- package/package.json +18 -22
- package/blocks.d.ts +0 -2
- package/blocks.js +0 -14
|
File without changes
|
package/dist/cjs/preset.js
CHANGED
|
@@ -30,11 +30,20 @@ function createBabelOptions({
|
|
|
30
30
|
configureJSX
|
|
31
31
|
}) {
|
|
32
32
|
const babelPlugins = (mdxBabelOptions === null || mdxBabelOptions === void 0 ? void 0 : mdxBabelOptions.plugins) || (babelOptions === null || babelOptions === void 0 ? void 0 : babelOptions.plugins) || [];
|
|
33
|
+
const filteredBabelPlugins = babelPlugins.filter(p => {
|
|
34
|
+
const name = Array.isArray(p) ? p[0] : p;
|
|
35
|
+
|
|
36
|
+
if (typeof name === 'string') {
|
|
37
|
+
return !name.includes('plugin-transform-react-jsx');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return true;
|
|
41
|
+
});
|
|
33
42
|
const jsxPlugin = [require.resolve('@babel/plugin-transform-react-jsx'), {
|
|
34
43
|
pragma: 'React.createElement',
|
|
35
44
|
pragmaFrag: 'React.Fragment'
|
|
36
45
|
}];
|
|
37
|
-
const plugins = configureJSX ? [...
|
|
46
|
+
const plugins = configureJSX ? [...filteredBabelPlugins, jsxPlugin] : babelPlugins;
|
|
38
47
|
return Object.assign({
|
|
39
48
|
// don't use the root babelrc by default (users can override this in mdxBabelOptions)
|
|
40
49
|
babelrc: false,
|
|
@@ -47,8 +56,7 @@ function createBabelOptions({
|
|
|
47
56
|
async function webpack(webpackConfig = {}, options) {
|
|
48
57
|
var _global$FEATURES, _global$FEATURES2;
|
|
49
58
|
|
|
50
|
-
const resolvedBabelLoader =
|
|
51
|
-
|
|
59
|
+
const resolvedBabelLoader = await options.presets.apply('babelLoaderRef');
|
|
52
60
|
const {
|
|
53
61
|
module = {}
|
|
54
62
|
} = webpackConfig; // it will reuse babel options that are already in use in storybook
|
|
File without changes
|
package/dist/esm/preset.js
CHANGED
|
@@ -13,11 +13,20 @@ function createBabelOptions({
|
|
|
13
13
|
configureJSX
|
|
14
14
|
}) {
|
|
15
15
|
const babelPlugins = mdxBabelOptions?.plugins || babelOptions?.plugins || [];
|
|
16
|
+
const filteredBabelPlugins = babelPlugins.filter(p => {
|
|
17
|
+
const name = Array.isArray(p) ? p[0] : p;
|
|
18
|
+
|
|
19
|
+
if (typeof name === 'string') {
|
|
20
|
+
return !name.includes('plugin-transform-react-jsx');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return true;
|
|
24
|
+
});
|
|
16
25
|
const jsxPlugin = [require.resolve('@babel/plugin-transform-react-jsx'), {
|
|
17
26
|
pragma: 'React.createElement',
|
|
18
27
|
pragmaFrag: 'React.Fragment'
|
|
19
28
|
}];
|
|
20
|
-
const plugins = configureJSX ? [...
|
|
29
|
+
const plugins = configureJSX ? [...filteredBabelPlugins, jsxPlugin] : babelPlugins;
|
|
21
30
|
return Object.assign({
|
|
22
31
|
// don't use the root babelrc by default (users can override this in mdxBabelOptions)
|
|
23
32
|
babelrc: false,
|
|
@@ -28,8 +37,7 @@ function createBabelOptions({
|
|
|
28
37
|
}
|
|
29
38
|
|
|
30
39
|
export async function webpack(webpackConfig = {}, options) {
|
|
31
|
-
const resolvedBabelLoader =
|
|
32
|
-
|
|
40
|
+
const resolvedBabelLoader = await options.presets.apply('babelLoaderRef');
|
|
33
41
|
const {
|
|
34
42
|
module = {}
|
|
35
43
|
} = webpackConfig; // it will reuse babel options that are already in use in storybook
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-docs",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.39",
|
|
4
4
|
"description": "Document component usage and properties in Markdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -50,38 +50,34 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@babel/plugin-transform-react-jsx": "^7.12.12",
|
|
53
|
-
"@babel/preset-env": "^7.12.11",
|
|
54
53
|
"@jest/transform": "^26.6.2",
|
|
55
54
|
"@mdx-js/react": "^1.6.22",
|
|
56
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
57
|
-
"@storybook/api": "7.0.0-alpha.
|
|
58
|
-
"@storybook/blocks": "7.0.0-alpha.
|
|
59
|
-
"@storybook/components": "7.0.0-alpha.
|
|
60
|
-
"@storybook/core-common": "7.0.0-alpha.
|
|
61
|
-
"@storybook/core-events": "7.0.0-alpha.
|
|
55
|
+
"@storybook/addons": "7.0.0-alpha.39",
|
|
56
|
+
"@storybook/api": "7.0.0-alpha.39",
|
|
57
|
+
"@storybook/blocks": "7.0.0-alpha.39",
|
|
58
|
+
"@storybook/components": "7.0.0-alpha.39",
|
|
59
|
+
"@storybook/core-common": "7.0.0-alpha.39",
|
|
60
|
+
"@storybook/core-events": "7.0.0-alpha.39",
|
|
62
61
|
"@storybook/csf": "0.0.2--canary.49.258942b.0",
|
|
63
|
-
"@storybook/csf-tools": "7.0.0-alpha.
|
|
64
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
62
|
+
"@storybook/csf-tools": "7.0.0-alpha.39",
|
|
63
|
+
"@storybook/docs-tools": "7.0.0-alpha.39",
|
|
65
64
|
"@storybook/mdx1-csf": "0.0.5-canary.13.9ce928a.0",
|
|
66
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
67
|
-
"@storybook/postinstall": "7.0.0-alpha.
|
|
68
|
-
"@storybook/preview-web": "7.0.0-alpha.
|
|
69
|
-
"@storybook/source-loader": "7.0.0-alpha.
|
|
70
|
-
"@storybook/store": "7.0.0-alpha.
|
|
71
|
-
"@storybook/theming": "7.0.0-alpha.
|
|
72
|
-
"babel-loader": "^8.2.5",
|
|
65
|
+
"@storybook/node-logger": "7.0.0-alpha.39",
|
|
66
|
+
"@storybook/postinstall": "7.0.0-alpha.39",
|
|
67
|
+
"@storybook/preview-web": "7.0.0-alpha.39",
|
|
68
|
+
"@storybook/source-loader": "7.0.0-alpha.39",
|
|
69
|
+
"@storybook/store": "7.0.0-alpha.39",
|
|
70
|
+
"@storybook/theming": "7.0.0-alpha.39",
|
|
73
71
|
"dequal": "^2.0.2",
|
|
72
|
+
"fs-extra": "^9.0.1",
|
|
74
73
|
"global": "^4.4.0",
|
|
75
|
-
"lodash": "^4.17.21",
|
|
76
74
|
"remark-external-links": "^8.0.0",
|
|
77
75
|
"remark-slug": "^6.0.0",
|
|
78
|
-
"ts-dedent": "^2.0.0"
|
|
79
|
-
"util-deprecate": "^1.0.2"
|
|
76
|
+
"ts-dedent": "^2.0.0"
|
|
80
77
|
},
|
|
81
78
|
"devDependencies": {
|
|
82
79
|
"@babel/core": "^7.12.10",
|
|
83
80
|
"@storybook/mdx2-csf": "0.0.4-canary.14.04ffbe8.0",
|
|
84
|
-
"@types/util-deprecate": "^1.0.0",
|
|
85
81
|
"typescript": "~4.6.3"
|
|
86
82
|
},
|
|
87
83
|
"peerDependencies": {
|
|
@@ -103,7 +99,7 @@
|
|
|
103
99
|
"publishConfig": {
|
|
104
100
|
"access": "public"
|
|
105
101
|
},
|
|
106
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "47386bd49d141ea70daac41ab3e4d52749fc5da9",
|
|
107
103
|
"storybook": {
|
|
108
104
|
"displayName": "Docs",
|
|
109
105
|
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
|
package/blocks.d.ts
DELETED
package/blocks.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import deprecate from 'util-deprecate';
|
|
2
|
-
import { dedent } from 'ts-dedent';
|
|
3
|
-
|
|
4
|
-
const warnBlocksImport = deprecate(
|
|
5
|
-
() => {},
|
|
6
|
-
dedent`
|
|
7
|
-
Importing from '@storybook/addon-docs/blocks' is deprecated, import directly from '@storybook/addon-docs' instead:
|
|
8
|
-
|
|
9
|
-
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-scoped-blocks-imports
|
|
10
|
-
`
|
|
11
|
-
);
|
|
12
|
-
warnBlocksImport();
|
|
13
|
-
|
|
14
|
-
export * from './dist/esm/blocks';
|