@storybook/addon-docs 6.0.13 → 6.0.17
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.
|
@@ -13,15 +13,22 @@ var parameters = {
|
|
|
13
13
|
docs: {
|
|
14
14
|
inlineStories: true,
|
|
15
15
|
prepareForInline: function prepareForInline(storyFn) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
var html = storyFn();
|
|
17
|
+
|
|
18
|
+
if (typeof html === 'string') {
|
|
18
19
|
// eslint-disable-next-line react/no-danger
|
|
19
|
-
_react["default"].createElement("div", {
|
|
20
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
21
|
dangerouslySetInnerHTML: {
|
|
21
|
-
__html:
|
|
22
|
+
__html: html
|
|
22
23
|
}
|
|
23
|
-
})
|
|
24
|
-
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
|
+
ref: function ref(node) {
|
|
29
|
+
return node ? node.appendChild(html) : null;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
34
|
};
|
|
@@ -12,6 +12,8 @@ require("core-js/modules/es.array.map");
|
|
|
12
12
|
|
|
13
13
|
require("core-js/modules/es.function.name");
|
|
14
14
|
|
|
15
|
+
require("core-js/modules/es.object.assign");
|
|
16
|
+
|
|
15
17
|
require("core-js/modules/es.object.keys");
|
|
16
18
|
|
|
17
19
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -48,8 +50,20 @@ var extractComponentSectionArray = function extractComponentSectionArray(docgenS
|
|
|
48
50
|
var typeSystem = getTypeSystem(docgenSection[0]);
|
|
49
51
|
var createPropDef = (0, _createPropDef.getPropDefFactory)(typeSystem);
|
|
50
52
|
return docgenSection.map(function (item) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
var _item$type;
|
|
54
|
+
|
|
55
|
+
var sanitizedItem = item;
|
|
56
|
+
|
|
57
|
+
if ((_item$type = item.type) === null || _item$type === void 0 ? void 0 : _item$type.elements) {
|
|
58
|
+
sanitizedItem = Object.assign(Object.assign({}, item), {}, {
|
|
59
|
+
type: Object.assign(Object.assign({}, item.type), {}, {
|
|
60
|
+
value: item.type.elements
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return extractProp(sanitizedItem.name, sanitizedItem, typeSystem, createPropDef);
|
|
66
|
+
});
|
|
53
67
|
};
|
|
54
68
|
|
|
55
69
|
exports.extractComponentSectionArray = extractComponentSectionArray;
|
|
@@ -135,7 +135,7 @@ function genImportStory(ast, storyDef, storyName, context) {
|
|
|
135
135
|
var _generate2 = generate(storyDef.expression, {}),
|
|
136
136
|
story = _generate2.code;
|
|
137
137
|
|
|
138
|
-
var storyKey = "".concat(story.split('.').pop(), "
|
|
138
|
+
var storyKey = "_".concat(story.split('.').pop(), "_");
|
|
139
139
|
var statements = ["export const ".concat(storyKey, " = ").concat(story, ";")];
|
|
140
140
|
|
|
141
141
|
if (storyName) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-docs",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.17",
|
|
4
4
|
"description": "Superior documentation for your components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"@mdx-js/loader": "^1.5.1",
|
|
48
48
|
"@mdx-js/mdx": "^1.5.1",
|
|
49
49
|
"@mdx-js/react": "^1.5.1",
|
|
50
|
-
"@storybook/addons": "6.0.
|
|
51
|
-
"@storybook/api": "6.0.
|
|
52
|
-
"@storybook/client-api": "6.0.
|
|
53
|
-
"@storybook/client-logger": "6.0.
|
|
54
|
-
"@storybook/components": "6.0.
|
|
55
|
-
"@storybook/core": "6.0.
|
|
56
|
-
"@storybook/core-events": "6.0.
|
|
50
|
+
"@storybook/addons": "6.0.17",
|
|
51
|
+
"@storybook/api": "6.0.17",
|
|
52
|
+
"@storybook/client-api": "6.0.17",
|
|
53
|
+
"@storybook/client-logger": "6.0.17",
|
|
54
|
+
"@storybook/components": "6.0.17",
|
|
55
|
+
"@storybook/core": "6.0.17",
|
|
56
|
+
"@storybook/core-events": "6.0.17",
|
|
57
57
|
"@storybook/csf": "0.0.1",
|
|
58
|
-
"@storybook/node-logger": "6.0.
|
|
59
|
-
"@storybook/postinstall": "6.0.
|
|
60
|
-
"@storybook/source-loader": "6.0.
|
|
61
|
-
"@storybook/theming": "6.0.
|
|
58
|
+
"@storybook/node-logger": "6.0.17",
|
|
59
|
+
"@storybook/postinstall": "6.0.17",
|
|
60
|
+
"@storybook/source-loader": "6.0.17",
|
|
61
|
+
"@storybook/theming": "6.0.17",
|
|
62
62
|
"acorn": "^7.1.0",
|
|
63
63
|
"acorn-jsx": "^5.1.0",
|
|
64
64
|
"acorn-walk": "^7.0.0",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"@babel/core": "^7.9.6",
|
|
84
84
|
"@emotion/core": "^10.0.20",
|
|
85
85
|
"@emotion/styled": "^10.0.17",
|
|
86
|
-
"@storybook/react": "6.0.
|
|
87
|
-
"@storybook/web-components": "6.0.
|
|
86
|
+
"@storybook/react": "6.0.17",
|
|
87
|
+
"@storybook/web-components": "6.0.17",
|
|
88
88
|
"@types/cross-spawn": "^6.0.1",
|
|
89
89
|
"@types/doctrine": "^0.0.3",
|
|
90
90
|
"@types/enzyme": "^3.10.3",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"jest-specific-snapshot": "^4.0.0",
|
|
103
103
|
"lit-element": "^2.2.1",
|
|
104
104
|
"lit-html": "^1.0.0",
|
|
105
|
-
"prettier": "
|
|
105
|
+
"prettier": "~2.0.5",
|
|
106
106
|
"react": "^16.8.3",
|
|
107
107
|
"react-dom": "^16.8.3",
|
|
108
108
|
"react-is": "^16.12.0",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"publishConfig": {
|
|
145
145
|
"access": "public"
|
|
146
146
|
},
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "cfe34ef01268e3b1607c34da04efd3ed290f381c",
|
|
148
148
|
"typesVersions": {
|
|
149
149
|
"<=3.5": {
|
|
150
150
|
"*": [
|