@storybook/addon-docs 7.0.0-alpha.11 → 7.0.0-alpha.12
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/preset.js +14 -3
- package/dist/esm/preset.js +9 -1
- package/dist/types/preset.d.ts +7 -2
- package/package.json +17 -17
package/dist/cjs/preset.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.storyIndexers = void 0;
|
|
6
|
+
exports.storyIndexers = exports.docs = void 0;
|
|
7
7
|
exports.webpack = webpack;
|
|
8
8
|
|
|
9
9
|
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
@@ -155,8 +155,19 @@ const storyIndexers = async indexers => {
|
|
|
155
155
|
|
|
156
156
|
return [{
|
|
157
157
|
test: /(stories|story)\.mdx$/,
|
|
158
|
-
indexer: mdxIndexer
|
|
158
|
+
indexer: mdxIndexer,
|
|
159
|
+
addDocsTemplate: true
|
|
159
160
|
}, ...(indexers || [])];
|
|
160
161
|
};
|
|
161
162
|
|
|
162
|
-
exports.storyIndexers = storyIndexers;
|
|
163
|
+
exports.storyIndexers = storyIndexers;
|
|
164
|
+
|
|
165
|
+
const docs = docsOptions => {
|
|
166
|
+
return Object.assign({}, docsOptions, {
|
|
167
|
+
enabled: true,
|
|
168
|
+
defaultName: 'Docs',
|
|
169
|
+
docsPage: true
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
exports.docs = docs;
|
package/dist/esm/preset.js
CHANGED
|
@@ -127,6 +127,14 @@ export const storyIndexers = async indexers => {
|
|
|
127
127
|
|
|
128
128
|
return [{
|
|
129
129
|
test: /(stories|story)\.mdx$/,
|
|
130
|
-
indexer: mdxIndexer
|
|
130
|
+
indexer: mdxIndexer,
|
|
131
|
+
addDocsTemplate: true
|
|
131
132
|
}, ...(indexers || [])];
|
|
133
|
+
};
|
|
134
|
+
export const docs = docsOptions => {
|
|
135
|
+
return Object.assign({}, docsOptions, {
|
|
136
|
+
enabled: true,
|
|
137
|
+
defaultName: 'Docs',
|
|
138
|
+
docsPage: true
|
|
139
|
+
});
|
|
132
140
|
};
|
package/dist/types/preset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Options, StoryIndexer } from '@storybook/core-common';
|
|
1
|
+
import type { DocsOptions, Options, StoryIndexer } from '@storybook/core-common';
|
|
2
2
|
declare type BabelParams = {
|
|
3
3
|
babelOptions?: any;
|
|
4
4
|
mdxBabelOptions?: any;
|
|
@@ -8,5 +8,10 @@ export declare function webpack(webpackConfig: any, options: Options & BabelPara
|
|
|
8
8
|
sourceLoaderOptions: any;
|
|
9
9
|
transcludeMarkdown: boolean;
|
|
10
10
|
}): Promise<any>;
|
|
11
|
-
export declare const storyIndexers: (indexers
|
|
11
|
+
export declare const storyIndexers: (indexers: StoryIndexer[] | null) => Promise<StoryIndexer[]>;
|
|
12
|
+
export declare const docs: (docsOptions: DocsOptions) => {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
defaultName: string;
|
|
15
|
+
docsPage: boolean;
|
|
16
|
+
};
|
|
12
17
|
export {};
|
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.12",
|
|
4
4
|
"description": "Document component usage and properties in Markdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -53,25 +53,25 @@
|
|
|
53
53
|
"@babel/preset-env": "^7.12.11",
|
|
54
54
|
"@jest/transform": "^26.6.2",
|
|
55
55
|
"@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.
|
|
56
|
+
"@storybook/addons": "7.0.0-alpha.12",
|
|
57
|
+
"@storybook/api": "7.0.0-alpha.12",
|
|
58
|
+
"@storybook/blocks": "7.0.0-alpha.12",
|
|
59
|
+
"@storybook/components": "7.0.0-alpha.12",
|
|
60
|
+
"@storybook/core-common": "7.0.0-alpha.12",
|
|
61
|
+
"@storybook/core-events": "7.0.0-alpha.12",
|
|
62
62
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
63
|
-
"@storybook/csf-tools": "7.0.0-alpha.
|
|
64
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
63
|
+
"@storybook/csf-tools": "7.0.0-alpha.12",
|
|
64
|
+
"@storybook/docs-tools": "7.0.0-alpha.12",
|
|
65
65
|
"@storybook/mdx1-csf": "^0.0.1",
|
|
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.
|
|
66
|
+
"@storybook/node-logger": "7.0.0-alpha.12",
|
|
67
|
+
"@storybook/postinstall": "7.0.0-alpha.12",
|
|
68
|
+
"@storybook/preview-web": "7.0.0-alpha.12",
|
|
69
|
+
"@storybook/source-loader": "7.0.0-alpha.12",
|
|
70
|
+
"@storybook/store": "7.0.0-alpha.12",
|
|
71
|
+
"@storybook/theming": "7.0.0-alpha.12",
|
|
72
72
|
"babel-loader": "^8.2.5",
|
|
73
73
|
"core-js": "^3.8.2",
|
|
74
|
-
"
|
|
74
|
+
"dequal": "^2.0.2",
|
|
75
75
|
"global": "^4.4.0",
|
|
76
76
|
"lodash": "^4.17.21",
|
|
77
77
|
"remark-external-links": "^8.0.0",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "5070efff271ecb5c26b3eb94c128c4896171cffe",
|
|
108
108
|
"storybook": {
|
|
109
109
|
"displayName": "Docs",
|
|
110
110
|
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
|