@storybook/ember 6.5.0-alpha.47 → 6.5.0-alpha.48
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/client/docs/config.js +21 -0
- package/dist/cjs/client/docs/index.js +13 -0
- package/dist/cjs/client/docs/jsondoc.js +89 -0
- package/dist/cjs/client/preview/docs/config.js +17 -0
- package/dist/cjs/client/preview/docs/index.js +13 -0
- package/dist/cjs/client/preview/docs/jsondoc.js +89 -0
- package/dist/cjs/server/framework-preset-ember-docs.js +17 -0
- package/dist/cjs/server/options.js +1 -1
- package/dist/cjs/server/preset.js +8 -0
- package/dist/esm/client/docs/config.js +10 -0
- package/dist/esm/client/docs/index.js +1 -0
- package/dist/esm/client/docs/jsondoc.js +67 -0
- package/dist/esm/client/preview/docs/config.js +8 -0
- package/dist/esm/client/preview/docs/index.js +1 -0
- package/dist/esm/client/preview/docs/jsondoc.js +67 -0
- package/dist/esm/server/framework-preset-ember-docs.js +6 -0
- package/dist/esm/server/options.js +1 -1
- package/dist/esm/server/preset.js +1 -0
- package/dist/modern/client/docs/config.js +10 -0
- package/dist/modern/client/docs/index.js +1 -0
- package/dist/modern/client/docs/jsondoc.js +57 -0
- package/dist/modern/client/preview/docs/config.js +8 -0
- package/dist/modern/client/preview/docs/index.js +1 -0
- package/dist/modern/client/preview/docs/jsondoc.js +57 -0
- package/dist/modern/server/framework-preset-ember-docs.js +6 -0
- package/dist/modern/server/options.js +1 -1
- package/dist/modern/server/preset.js +1 -0
- package/dist/ts3.4/src/server/framework-preset-ember-docs.d.ts +2 -0
- package/dist/ts3.4/src/server/preset.d.ts +2 -0
- package/dist/ts3.9/src/server/framework-preset-ember-docs.d.ts +2 -0
- package/dist/ts3.9/src/server/preset.d.ts +2 -0
- package/package.json +6 -6
- package/preset.js +1 -1
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.parameters = exports.argTypesEnhancers = void 0;
|
7
|
+
|
8
|
+
var _docsTools = require("@storybook/docs-tools");
|
9
|
+
|
10
|
+
var _jsondoc = require("./jsondoc");
|
11
|
+
|
12
|
+
var parameters = {
|
13
|
+
docs: {
|
14
|
+
iframeHeight: 80,
|
15
|
+
extractArgTypes: _jsondoc.extractArgTypes,
|
16
|
+
extractComponentDescription: _jsondoc.extractComponentDescription
|
17
|
+
}
|
18
|
+
};
|
19
|
+
exports.parameters = parameters;
|
20
|
+
var argTypesEnhancers = [_docsTools.enhanceArgTypes];
|
21
|
+
exports.argTypesEnhancers = argTypesEnhancers;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "setJSONDoc", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _jsondoc.setJSONDoc;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
var _jsondoc = require("./jsondoc");
|
@@ -0,0 +1,89 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.setJSONDoc = exports.getJSONDoc = exports.extractComponentDescription = exports.extractArgTypes = void 0;
|
7
|
+
|
8
|
+
require("core-js/modules/es.array.find.js");
|
9
|
+
|
10
|
+
require("core-js/modules/es.object.to-string.js");
|
11
|
+
|
12
|
+
require("core-js/modules/es.function.name.js");
|
13
|
+
|
14
|
+
require("core-js/modules/es.symbol.js");
|
15
|
+
|
16
|
+
require("core-js/modules/es.symbol.description.js");
|
17
|
+
|
18
|
+
/* eslint-disable no-underscore-dangle */
|
19
|
+
|
20
|
+
/* global window */
|
21
|
+
var setJSONDoc = function setJSONDoc(jsondoc) {
|
22
|
+
window.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
23
|
+
};
|
24
|
+
|
25
|
+
exports.setJSONDoc = setJSONDoc;
|
26
|
+
|
27
|
+
var getJSONDoc = function getJSONDoc() {
|
28
|
+
return window.__EMBER_GENERATED_DOC_JSON__;
|
29
|
+
};
|
30
|
+
|
31
|
+
exports.getJSONDoc = getJSONDoc;
|
32
|
+
|
33
|
+
var extractArgTypes = function extractArgTypes(componentName) {
|
34
|
+
var json = getJSONDoc();
|
35
|
+
|
36
|
+
if (!(json && json.included)) {
|
37
|
+
return null;
|
38
|
+
}
|
39
|
+
|
40
|
+
var componentDoc = json.included.find(function (doc) {
|
41
|
+
return doc.attributes.name === componentName;
|
42
|
+
});
|
43
|
+
|
44
|
+
if (!componentDoc) {
|
45
|
+
return null;
|
46
|
+
}
|
47
|
+
|
48
|
+
return componentDoc.attributes.arguments.reduce(function (acc, prop) {
|
49
|
+
acc[prop.name] = {
|
50
|
+
name: prop.name,
|
51
|
+
defaultValue: prop.defaultValue,
|
52
|
+
description: prop.description,
|
53
|
+
table: {
|
54
|
+
defaultValue: {
|
55
|
+
summary: prop.defaultValue
|
56
|
+
},
|
57
|
+
type: {
|
58
|
+
summary: prop.type,
|
59
|
+
required: prop.tags.length ? prop.tags.some(function (tag) {
|
60
|
+
return tag.name === 'required';
|
61
|
+
}) : false
|
62
|
+
}
|
63
|
+
}
|
64
|
+
};
|
65
|
+
return acc;
|
66
|
+
}, {});
|
67
|
+
};
|
68
|
+
|
69
|
+
exports.extractArgTypes = extractArgTypes;
|
70
|
+
|
71
|
+
var extractComponentDescription = function extractComponentDescription(componentName) {
|
72
|
+
var json = getJSONDoc();
|
73
|
+
|
74
|
+
if (!(json && json.included)) {
|
75
|
+
return null;
|
76
|
+
}
|
77
|
+
|
78
|
+
var componentDoc = json.included.find(function (doc) {
|
79
|
+
return doc.attributes.name === componentName;
|
80
|
+
});
|
81
|
+
|
82
|
+
if (!componentDoc) {
|
83
|
+
return null;
|
84
|
+
}
|
85
|
+
|
86
|
+
return componentDoc.attributes.description;
|
87
|
+
};
|
88
|
+
|
89
|
+
exports.extractComponentDescription = extractComponentDescription;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.parameters = void 0;
|
7
|
+
|
8
|
+
var _jsondoc = require("./jsondoc");
|
9
|
+
|
10
|
+
var parameters = {
|
11
|
+
docs: {
|
12
|
+
iframeHeight: 80,
|
13
|
+
extractArgTypes: _jsondoc.extractArgTypes,
|
14
|
+
extractComponentDescription: _jsondoc.extractComponentDescription
|
15
|
+
}
|
16
|
+
};
|
17
|
+
exports.parameters = parameters;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "setJSONDoc", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _jsondoc.setJSONDoc;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
var _jsondoc = require("./jsondoc");
|
@@ -0,0 +1,89 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.setJSONDoc = exports.getJSONDoc = exports.extractComponentDescription = exports.extractArgTypes = void 0;
|
7
|
+
|
8
|
+
require("core-js/modules/es.array.find.js");
|
9
|
+
|
10
|
+
require("core-js/modules/es.object.to-string.js");
|
11
|
+
|
12
|
+
require("core-js/modules/es.function.name.js");
|
13
|
+
|
14
|
+
require("core-js/modules/es.symbol.js");
|
15
|
+
|
16
|
+
require("core-js/modules/es.symbol.description.js");
|
17
|
+
|
18
|
+
/* eslint-disable no-underscore-dangle */
|
19
|
+
|
20
|
+
/* global window */
|
21
|
+
var setJSONDoc = function setJSONDoc(jsondoc) {
|
22
|
+
window.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
23
|
+
};
|
24
|
+
|
25
|
+
exports.setJSONDoc = setJSONDoc;
|
26
|
+
|
27
|
+
var getJSONDoc = function getJSONDoc() {
|
28
|
+
return window.__EMBER_GENERATED_DOC_JSON__;
|
29
|
+
};
|
30
|
+
|
31
|
+
exports.getJSONDoc = getJSONDoc;
|
32
|
+
|
33
|
+
var extractArgTypes = function extractArgTypes(componentName) {
|
34
|
+
var json = getJSONDoc();
|
35
|
+
|
36
|
+
if (!(json && json.included)) {
|
37
|
+
return null;
|
38
|
+
}
|
39
|
+
|
40
|
+
var componentDoc = json.included.find(function (doc) {
|
41
|
+
return doc.attributes.name === componentName;
|
42
|
+
});
|
43
|
+
|
44
|
+
if (!componentDoc) {
|
45
|
+
return null;
|
46
|
+
}
|
47
|
+
|
48
|
+
return componentDoc.attributes.arguments.reduce(function (acc, prop) {
|
49
|
+
acc[prop.name] = {
|
50
|
+
name: prop.name,
|
51
|
+
defaultValue: prop.defaultValue,
|
52
|
+
description: prop.description,
|
53
|
+
table: {
|
54
|
+
defaultValue: {
|
55
|
+
summary: prop.defaultValue
|
56
|
+
},
|
57
|
+
type: {
|
58
|
+
summary: prop.type,
|
59
|
+
required: prop.tags.length ? prop.tags.some(function (tag) {
|
60
|
+
return tag.name === 'required';
|
61
|
+
}) : false
|
62
|
+
}
|
63
|
+
}
|
64
|
+
};
|
65
|
+
return acc;
|
66
|
+
}, {});
|
67
|
+
};
|
68
|
+
|
69
|
+
exports.extractArgTypes = extractArgTypes;
|
70
|
+
|
71
|
+
var extractComponentDescription = function extractComponentDescription(componentName) {
|
72
|
+
var json = getJSONDoc();
|
73
|
+
|
74
|
+
if (!(json && json.included)) {
|
75
|
+
return null;
|
76
|
+
}
|
77
|
+
|
78
|
+
var componentDoc = json.included.find(function (doc) {
|
79
|
+
return doc.attributes.name === componentName;
|
80
|
+
});
|
81
|
+
|
82
|
+
if (!componentDoc) {
|
83
|
+
return null;
|
84
|
+
}
|
85
|
+
|
86
|
+
return componentDoc.attributes.description;
|
87
|
+
};
|
88
|
+
|
89
|
+
exports.extractComponentDescription = extractComponentDescription;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.config = void 0;
|
7
|
+
|
8
|
+
var _coreCommon = require("@storybook/core-common");
|
9
|
+
|
10
|
+
var _docsTools = require("@storybook/docs-tools");
|
11
|
+
|
12
|
+
var config = function (entry = [], options) {
|
13
|
+
if (!(0, _docsTools.hasDocsOrControls)(options)) return entry;
|
14
|
+
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/docs/config')];
|
15
|
+
};
|
16
|
+
|
17
|
+
exports.config = config;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { enhanceArgTypes } from '@storybook/docs-tools';
|
2
|
+
import { extractArgTypes, extractComponentDescription } from './jsondoc';
|
3
|
+
export var parameters = {
|
4
|
+
docs: {
|
5
|
+
iframeHeight: 80,
|
6
|
+
extractArgTypes: extractArgTypes,
|
7
|
+
extractComponentDescription: extractComponentDescription
|
8
|
+
}
|
9
|
+
};
|
10
|
+
export var argTypesEnhancers = [enhanceArgTypes];
|
@@ -0,0 +1 @@
|
|
1
|
+
export { setJSONDoc } from './jsondoc';
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import "core-js/modules/es.array.find.js";
|
2
|
+
import "core-js/modules/es.object.to-string.js";
|
3
|
+
import "core-js/modules/es.function.name.js";
|
4
|
+
import "core-js/modules/es.symbol.js";
|
5
|
+
import "core-js/modules/es.symbol.description.js";
|
6
|
+
|
7
|
+
/* eslint-disable no-underscore-dangle */
|
8
|
+
|
9
|
+
/* global window */
|
10
|
+
export var setJSONDoc = function setJSONDoc(jsondoc) {
|
11
|
+
window.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
12
|
+
};
|
13
|
+
export var getJSONDoc = function getJSONDoc() {
|
14
|
+
return window.__EMBER_GENERATED_DOC_JSON__;
|
15
|
+
};
|
16
|
+
export var extractArgTypes = function extractArgTypes(componentName) {
|
17
|
+
var json = getJSONDoc();
|
18
|
+
|
19
|
+
if (!(json && json.included)) {
|
20
|
+
return null;
|
21
|
+
}
|
22
|
+
|
23
|
+
var componentDoc = json.included.find(function (doc) {
|
24
|
+
return doc.attributes.name === componentName;
|
25
|
+
});
|
26
|
+
|
27
|
+
if (!componentDoc) {
|
28
|
+
return null;
|
29
|
+
}
|
30
|
+
|
31
|
+
return componentDoc.attributes.arguments.reduce(function (acc, prop) {
|
32
|
+
acc[prop.name] = {
|
33
|
+
name: prop.name,
|
34
|
+
defaultValue: prop.defaultValue,
|
35
|
+
description: prop.description,
|
36
|
+
table: {
|
37
|
+
defaultValue: {
|
38
|
+
summary: prop.defaultValue
|
39
|
+
},
|
40
|
+
type: {
|
41
|
+
summary: prop.type,
|
42
|
+
required: prop.tags.length ? prop.tags.some(function (tag) {
|
43
|
+
return tag.name === 'required';
|
44
|
+
}) : false
|
45
|
+
}
|
46
|
+
}
|
47
|
+
};
|
48
|
+
return acc;
|
49
|
+
}, {});
|
50
|
+
};
|
51
|
+
export var extractComponentDescription = function extractComponentDescription(componentName) {
|
52
|
+
var json = getJSONDoc();
|
53
|
+
|
54
|
+
if (!(json && json.included)) {
|
55
|
+
return null;
|
56
|
+
}
|
57
|
+
|
58
|
+
var componentDoc = json.included.find(function (doc) {
|
59
|
+
return doc.attributes.name === componentName;
|
60
|
+
});
|
61
|
+
|
62
|
+
if (!componentDoc) {
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
|
66
|
+
return componentDoc.attributes.description;
|
67
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { setJSONDoc } from './jsondoc';
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import "core-js/modules/es.array.find.js";
|
2
|
+
import "core-js/modules/es.object.to-string.js";
|
3
|
+
import "core-js/modules/es.function.name.js";
|
4
|
+
import "core-js/modules/es.symbol.js";
|
5
|
+
import "core-js/modules/es.symbol.description.js";
|
6
|
+
|
7
|
+
/* eslint-disable no-underscore-dangle */
|
8
|
+
|
9
|
+
/* global window */
|
10
|
+
export var setJSONDoc = function setJSONDoc(jsondoc) {
|
11
|
+
window.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
12
|
+
};
|
13
|
+
export var getJSONDoc = function getJSONDoc() {
|
14
|
+
return window.__EMBER_GENERATED_DOC_JSON__;
|
15
|
+
};
|
16
|
+
export var extractArgTypes = function extractArgTypes(componentName) {
|
17
|
+
var json = getJSONDoc();
|
18
|
+
|
19
|
+
if (!(json && json.included)) {
|
20
|
+
return null;
|
21
|
+
}
|
22
|
+
|
23
|
+
var componentDoc = json.included.find(function (doc) {
|
24
|
+
return doc.attributes.name === componentName;
|
25
|
+
});
|
26
|
+
|
27
|
+
if (!componentDoc) {
|
28
|
+
return null;
|
29
|
+
}
|
30
|
+
|
31
|
+
return componentDoc.attributes.arguments.reduce(function (acc, prop) {
|
32
|
+
acc[prop.name] = {
|
33
|
+
name: prop.name,
|
34
|
+
defaultValue: prop.defaultValue,
|
35
|
+
description: prop.description,
|
36
|
+
table: {
|
37
|
+
defaultValue: {
|
38
|
+
summary: prop.defaultValue
|
39
|
+
},
|
40
|
+
type: {
|
41
|
+
summary: prop.type,
|
42
|
+
required: prop.tags.length ? prop.tags.some(function (tag) {
|
43
|
+
return tag.name === 'required';
|
44
|
+
}) : false
|
45
|
+
}
|
46
|
+
}
|
47
|
+
};
|
48
|
+
return acc;
|
49
|
+
}, {});
|
50
|
+
};
|
51
|
+
export var extractComponentDescription = function extractComponentDescription(componentName) {
|
52
|
+
var json = getJSONDoc();
|
53
|
+
|
54
|
+
if (!(json && json.included)) {
|
55
|
+
return null;
|
56
|
+
}
|
57
|
+
|
58
|
+
var componentDoc = json.included.find(function (doc) {
|
59
|
+
return doc.attributes.name === componentName;
|
60
|
+
});
|
61
|
+
|
62
|
+
if (!componentDoc) {
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
|
66
|
+
return componentDoc.attributes.description;
|
67
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { findDistEsm } from '@storybook/core-common';
|
2
|
+
import { hasDocsOrControls } from '@storybook/docs-tools';
|
3
|
+
export var config = function (entry = [], options) {
|
4
|
+
if (!hasDocsOrControls(options)) return entry;
|
5
|
+
return [...entry, findDistEsm(__dirname, 'client/docs/config')];
|
6
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export var addons = [require.resolve('./framework-preset-babel-ember'), require.resolve('./framework-preset-ember-docs')];
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { enhanceArgTypes } from '@storybook/docs-tools';
|
2
|
+
import { extractArgTypes, extractComponentDescription } from './jsondoc';
|
3
|
+
export const parameters = {
|
4
|
+
docs: {
|
5
|
+
iframeHeight: 80,
|
6
|
+
extractArgTypes,
|
7
|
+
extractComponentDescription
|
8
|
+
}
|
9
|
+
};
|
10
|
+
export const argTypesEnhancers = [enhanceArgTypes];
|
@@ -0,0 +1 @@
|
|
1
|
+
export { setJSONDoc } from './jsondoc';
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import "core-js/modules/es.array.reduce.js";
|
2
|
+
|
3
|
+
/* eslint-disable no-underscore-dangle */
|
4
|
+
|
5
|
+
/* global window */
|
6
|
+
export const setJSONDoc = jsondoc => {
|
7
|
+
window.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
8
|
+
};
|
9
|
+
export const getJSONDoc = () => {
|
10
|
+
return window.__EMBER_GENERATED_DOC_JSON__;
|
11
|
+
};
|
12
|
+
export const extractArgTypes = componentName => {
|
13
|
+
const json = getJSONDoc();
|
14
|
+
|
15
|
+
if (!(json && json.included)) {
|
16
|
+
return null;
|
17
|
+
}
|
18
|
+
|
19
|
+
const componentDoc = json.included.find(doc => doc.attributes.name === componentName);
|
20
|
+
|
21
|
+
if (!componentDoc) {
|
22
|
+
return null;
|
23
|
+
}
|
24
|
+
|
25
|
+
return componentDoc.attributes.arguments.reduce((acc, prop) => {
|
26
|
+
acc[prop.name] = {
|
27
|
+
name: prop.name,
|
28
|
+
defaultValue: prop.defaultValue,
|
29
|
+
description: prop.description,
|
30
|
+
table: {
|
31
|
+
defaultValue: {
|
32
|
+
summary: prop.defaultValue
|
33
|
+
},
|
34
|
+
type: {
|
35
|
+
summary: prop.type,
|
36
|
+
required: prop.tags.length ? prop.tags.some(tag => tag.name === 'required') : false
|
37
|
+
}
|
38
|
+
}
|
39
|
+
};
|
40
|
+
return acc;
|
41
|
+
}, {});
|
42
|
+
};
|
43
|
+
export const extractComponentDescription = componentName => {
|
44
|
+
const json = getJSONDoc();
|
45
|
+
|
46
|
+
if (!(json && json.included)) {
|
47
|
+
return null;
|
48
|
+
}
|
49
|
+
|
50
|
+
const componentDoc = json.included.find(doc => doc.attributes.name === componentName);
|
51
|
+
|
52
|
+
if (!componentDoc) {
|
53
|
+
return null;
|
54
|
+
}
|
55
|
+
|
56
|
+
return componentDoc.attributes.description;
|
57
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { setJSONDoc } from './jsondoc';
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import "core-js/modules/es.array.reduce.js";
|
2
|
+
|
3
|
+
/* eslint-disable no-underscore-dangle */
|
4
|
+
|
5
|
+
/* global window */
|
6
|
+
export const setJSONDoc = jsondoc => {
|
7
|
+
window.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
8
|
+
};
|
9
|
+
export const getJSONDoc = () => {
|
10
|
+
return window.__EMBER_GENERATED_DOC_JSON__;
|
11
|
+
};
|
12
|
+
export const extractArgTypes = componentName => {
|
13
|
+
const json = getJSONDoc();
|
14
|
+
|
15
|
+
if (!(json && json.included)) {
|
16
|
+
return null;
|
17
|
+
}
|
18
|
+
|
19
|
+
const componentDoc = json.included.find(doc => doc.attributes.name === componentName);
|
20
|
+
|
21
|
+
if (!componentDoc) {
|
22
|
+
return null;
|
23
|
+
}
|
24
|
+
|
25
|
+
return componentDoc.attributes.arguments.reduce((acc, prop) => {
|
26
|
+
acc[prop.name] = {
|
27
|
+
name: prop.name,
|
28
|
+
defaultValue: prop.defaultValue,
|
29
|
+
description: prop.description,
|
30
|
+
table: {
|
31
|
+
defaultValue: {
|
32
|
+
summary: prop.defaultValue
|
33
|
+
},
|
34
|
+
type: {
|
35
|
+
summary: prop.type,
|
36
|
+
required: prop.tags.length ? prop.tags.some(tag => tag.name === 'required') : false
|
37
|
+
}
|
38
|
+
}
|
39
|
+
};
|
40
|
+
return acc;
|
41
|
+
}, {});
|
42
|
+
};
|
43
|
+
export const extractComponentDescription = componentName => {
|
44
|
+
const json = getJSONDoc();
|
45
|
+
|
46
|
+
if (!(json && json.included)) {
|
47
|
+
return null;
|
48
|
+
}
|
49
|
+
|
50
|
+
const componentDoc = json.included.find(doc => doc.attributes.name === componentName);
|
51
|
+
|
52
|
+
if (!componentDoc) {
|
53
|
+
return null;
|
54
|
+
}
|
55
|
+
|
56
|
+
return componentDoc.attributes.description;
|
57
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { findDistEsm } from '@storybook/core-common';
|
2
|
+
import { hasDocsOrControls } from '@storybook/docs-tools';
|
3
|
+
export var config = function (entry = [], options) {
|
4
|
+
if (!hasDocsOrControls(options)) return entry;
|
5
|
+
return [...entry, findDistEsm(__dirname, 'client/docs/config')];
|
6
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export var addons = [require.resolve('./framework-preset-babel-ember'), require.resolve('./framework-preset-ember-docs')];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/ember",
|
3
|
-
"version": "6.5.0-alpha.
|
3
|
+
"version": "6.5.0-alpha.48",
|
4
4
|
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
5
5
|
"homepage": "https://github.com/storybookjs/storybook/tree/main/app/ember",
|
6
6
|
"bugs": {
|
@@ -42,10 +42,10 @@
|
|
42
42
|
"prepare": "node ../../scripts/prepare.js"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@
|
46
|
-
"@storybook/core": "6.5.0-alpha.
|
47
|
-
"@storybook/
|
48
|
-
"@storybook/store": "6.5.0-alpha.
|
45
|
+
"@storybook/core": "6.5.0-alpha.48",
|
46
|
+
"@storybook/core-common": "6.5.0-alpha.48",
|
47
|
+
"@storybook/docs-tools": "6.5.0-alpha.48",
|
48
|
+
"@storybook/store": "6.5.0-alpha.48",
|
49
49
|
"core-js": "^3.8.2",
|
50
50
|
"global": "^4.4.0",
|
51
51
|
"react": "16.14.0",
|
@@ -66,6 +66,6 @@
|
|
66
66
|
"publishConfig": {
|
67
67
|
"access": "public"
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "5f3afb8cf4389c16be11a6e5099e902d16a82762",
|
70
70
|
"sbmodern": "dist/modern/client/index.js"
|
71
71
|
}
|
package/preset.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
module.exports = require('./dist/cjs/server/
|
1
|
+
module.exports = require('./dist/cjs/server/preset');
|