@storybook/server 6.5.0-alpha.7 → 6.5.0-beta.1
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/README.md +1 -1
- package/dist/cjs/client/index.js +16 -16
- package/dist/cjs/client/preview/config.js +1 -1
- package/dist/cjs/client/preview/index.js +3 -3
- package/dist/cjs/client/preview/render.js +10 -8
- package/dist/cjs/client/preview/types.js +5 -1
- package/dist/cjs/lib/compiler/stringifier.js +17 -10
- package/dist/cjs/server/framework-preset-server.js +3 -4
- package/dist/esm/client/preview/index.js +1 -1
- package/dist/esm/client/preview/render.js +5 -4
- package/dist/esm/client/preview/types.js +1 -0
- package/dist/esm/lib/compiler/stringifier.js +11 -6
- package/dist/esm/server/framework-preset-server.js +1 -2
- package/dist/modern/client/preview/index.js +1 -1
- package/dist/modern/client/preview/types.js +1 -0
- package/dist/modern/lib/compiler/stringifier.js +5 -2
- package/dist/modern/server/framework-preset-server.js +1 -2
- package/dist/ts3.4/client/preview/index.d.ts +2 -2
- package/dist/ts3.4/server/framework-preset-server.d.ts +2 -2
- package/dist/ts3.9/client/preview/index.d.ts +4 -4
- package/dist/ts3.9/client/preview/render.d.ts +3 -3
- package/dist/ts3.9/client/preview/types.d.ts +1 -1
- package/dist/ts3.9/server/framework-preset-server.d.ts +3 -3
- package/dist/ts3.9/server/options.d.ts +1 -1
- package/package.json +11 -11
- package/dist/cjs/typings.d.js +0 -1
- package/dist/esm/typings.d.js +0 -0
- package/dist/modern/typings.d.js +0 -0
package/README.md
CHANGED
|
@@ -230,7 +230,7 @@ Just like CSF stories we can define `argTypes` to specify the controls used in t
|
|
|
230
230
|
|
|
231
231
|
## Addon compatibility
|
|
232
232
|
|
|
233
|
-
Storybook also comes with a lot of [addons](https://storybook.js.org/
|
|
233
|
+
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. As some addons assume the story is rendered in JS, they may not work with `@storybook/server` (yet!).
|
|
234
234
|
|
|
235
235
|
Many addons that act on the manager side (such as `backgrounds` and `viewport`) will work out of the box with `@storybook/server` -- you can configure them with parameters written on the server as usual.
|
|
236
236
|
|
package/dist/cjs/client/index.js
CHANGED
|
@@ -3,18 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "storiesOf", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _preview.storiesOf;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "setAddon", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _preview.setAddon;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
6
|
Object.defineProperty(exports, "addDecorator", {
|
|
19
7
|
enumerable: true,
|
|
20
8
|
get: function get() {
|
|
@@ -33,16 +21,16 @@ Object.defineProperty(exports, "configure", {
|
|
|
33
21
|
return _preview.configure;
|
|
34
22
|
}
|
|
35
23
|
});
|
|
36
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "forceReRender", {
|
|
37
25
|
enumerable: true,
|
|
38
26
|
get: function get() {
|
|
39
|
-
return _preview.
|
|
27
|
+
return _preview.forceReRender;
|
|
40
28
|
}
|
|
41
29
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "getStorybook", {
|
|
43
31
|
enumerable: true,
|
|
44
32
|
get: function get() {
|
|
45
|
-
return _preview.
|
|
33
|
+
return _preview.getStorybook;
|
|
46
34
|
}
|
|
47
35
|
});
|
|
48
36
|
Object.defineProperty(exports, "raw", {
|
|
@@ -51,6 +39,18 @@ Object.defineProperty(exports, "raw", {
|
|
|
51
39
|
return _preview.raw;
|
|
52
40
|
}
|
|
53
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "setAddon", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _preview.setAddon;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "storiesOf", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _preview.storiesOf;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
54
|
|
|
55
55
|
var _preview = require("./preview");
|
|
56
56
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.parameters = void 0;
|
|
6
7
|
Object.defineProperty(exports, "render", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function get() {
|
|
@@ -15,7 +16,6 @@ Object.defineProperty(exports, "renderToDOM", {
|
|
|
15
16
|
return _render.renderToDOM;
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
|
-
exports.parameters = void 0;
|
|
19
19
|
|
|
20
20
|
var _render = require("./render");
|
|
21
21
|
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.storiesOf = exports.setAddon = exports.raw = exports.getStorybook = exports.forceReRender = exports.configure = exports.clearDecorators = exports.addParameters = exports.addDecorator = void 0;
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/es.array.concat.js");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _core = require("@storybook/core");
|
|
11
11
|
|
|
12
12
|
require("./globals");
|
|
13
13
|
|
|
14
14
|
var _render = require("./render");
|
|
15
15
|
|
|
16
16
|
var framework = 'server';
|
|
17
|
-
var api = (0,
|
|
17
|
+
var api = (0, _core.start)(_render.renderToDOM, {
|
|
18
18
|
render: _render.render
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -7,29 +7,31 @@ require("core-js/modules/es.object.freeze.js");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.renderToDOM = renderToDOM;
|
|
11
10
|
exports.render = void 0;
|
|
11
|
+
exports.renderToDOM = renderToDOM;
|
|
12
12
|
|
|
13
13
|
require("regenerator-runtime/runtime.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.promise.js");
|
|
16
|
-
|
|
17
15
|
require("core-js/modules/es.object.to-string.js");
|
|
18
16
|
|
|
19
|
-
require("core-js/modules/
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.string.iterator.js");
|
|
17
|
+
require("core-js/modules/es.promise.js");
|
|
22
18
|
|
|
23
19
|
require("core-js/modules/es.array.iterator.js");
|
|
24
20
|
|
|
21
|
+
require("core-js/modules/es.string.iterator.js");
|
|
22
|
+
|
|
25
23
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
26
24
|
|
|
27
|
-
require("core-js/modules/
|
|
25
|
+
require("core-js/modules/web.url.js");
|
|
28
26
|
|
|
29
|
-
require("core-js/modules/
|
|
27
|
+
require("core-js/modules/web.url-search-params.js");
|
|
28
|
+
|
|
29
|
+
require("core-js/modules/es.array.concat.js");
|
|
30
30
|
|
|
31
31
|
require("core-js/modules/es.regexp.exec.js");
|
|
32
32
|
|
|
33
|
+
require("core-js/modules/es.string.search.js");
|
|
34
|
+
|
|
33
35
|
require("core-js/modules/es.regexp.to-string.js");
|
|
34
36
|
|
|
35
37
|
require("core-js/modules/es.object.assign.js");
|
|
@@ -8,27 +8,29 @@ require("core-js/modules/es.object.to-string.js");
|
|
|
8
8
|
|
|
9
9
|
require("core-js/modules/es.symbol.iterator.js");
|
|
10
10
|
|
|
11
|
-
require("core-js/modules/es.string.iterator.js");
|
|
12
|
-
|
|
13
11
|
require("core-js/modules/es.array.iterator.js");
|
|
14
12
|
|
|
13
|
+
require("core-js/modules/es.string.iterator.js");
|
|
14
|
+
|
|
15
15
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
16
16
|
|
|
17
17
|
require("core-js/modules/es.array.slice.js");
|
|
18
18
|
|
|
19
19
|
require("core-js/modules/es.array.from.js");
|
|
20
20
|
|
|
21
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
22
|
+
|
|
21
23
|
require("core-js/modules/es.object.freeze.js");
|
|
22
24
|
|
|
23
25
|
Object.defineProperty(exports, "__esModule", {
|
|
24
26
|
value: true
|
|
25
27
|
});
|
|
26
|
-
exports.stringifyObject = stringifyObject;
|
|
27
|
-
exports.stringifyImports = stringifyImports;
|
|
28
28
|
exports.stringifyDecorators = stringifyDecorators;
|
|
29
29
|
exports.stringifyDefault = stringifyDefault;
|
|
30
|
-
exports.
|
|
30
|
+
exports.stringifyImports = stringifyImports;
|
|
31
|
+
exports.stringifyObject = stringifyObject;
|
|
31
32
|
exports.stringifySection = stringifySection;
|
|
33
|
+
exports.stringifyStory = stringifyStory;
|
|
32
34
|
|
|
33
35
|
require("core-js/modules/es.string.repeat.js");
|
|
34
36
|
|
|
@@ -42,6 +44,8 @@ require("core-js/modules/es.object.keys.js");
|
|
|
42
44
|
|
|
43
45
|
require("core-js/modules/es.object.entries.js");
|
|
44
46
|
|
|
47
|
+
require("core-js/modules/es.array.sort.js");
|
|
48
|
+
|
|
45
49
|
require("core-js/modules/es.function.name.js");
|
|
46
50
|
|
|
47
51
|
require("core-js/modules/es.object.assign.js");
|
|
@@ -50,13 +54,16 @@ var _tsDedent = _interopRequireDefault(require("ts-dedent"));
|
|
|
50
54
|
|
|
51
55
|
var _templateObject;
|
|
52
56
|
|
|
57
|
+
var _excluded = ["title", "imports", "decorators", "stories"],
|
|
58
|
+
_excluded2 = ["name"];
|
|
59
|
+
|
|
53
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
54
61
|
|
|
55
62
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
56
63
|
|
|
57
64
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
58
65
|
|
|
59
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator
|
|
66
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
60
67
|
|
|
61
68
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
62
69
|
|
|
@@ -74,11 +81,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
74
81
|
|
|
75
82
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
76
83
|
|
|
77
|
-
function _iterableToArrayLimit(arr, i) {
|
|
84
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
78
85
|
|
|
79
86
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
80
87
|
|
|
81
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
88
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
82
89
|
|
|
83
90
|
var _require = require('safe-identifier'),
|
|
84
91
|
identifier = _require.identifier;
|
|
@@ -141,7 +148,7 @@ function stringifyDefault(section) {
|
|
|
141
148
|
imports = section.imports,
|
|
142
149
|
decorators = section.decorators,
|
|
143
150
|
stories = section.stories,
|
|
144
|
-
options = _objectWithoutProperties(section,
|
|
151
|
+
options = _objectWithoutProperties(section, _excluded);
|
|
145
152
|
|
|
146
153
|
var decoratorsString = stringifyDecorators(decorators);
|
|
147
154
|
var optionsString = stringifyObject(options, 0, true);
|
|
@@ -150,7 +157,7 @@ function stringifyDefault(section) {
|
|
|
150
157
|
|
|
151
158
|
function stringifyStory(story) {
|
|
152
159
|
var name = story.name,
|
|
153
|
-
options = _objectWithoutProperties(story,
|
|
160
|
+
options = _objectWithoutProperties(story, _excluded2);
|
|
154
161
|
|
|
155
162
|
var storyId = identifier(name);
|
|
156
163
|
var exportedStory = Object.assign({
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.previewAnnotations = void 0;
|
|
6
7
|
exports.webpack = webpack;
|
|
7
|
-
exports.config = void 0;
|
|
8
8
|
|
|
9
9
|
var _path = _interopRequireDefault(require("path"));
|
|
10
10
|
|
|
@@ -12,7 +12,6 @@ var _coreCommon = require("@storybook/core-common");
|
|
|
12
12
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
16
15
|
function webpack(config) {
|
|
17
16
|
config.module.rules.push({
|
|
18
17
|
type: 'javascript/auto',
|
|
@@ -27,8 +26,8 @@ function webpack(config) {
|
|
|
27
26
|
return config;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
var
|
|
29
|
+
var previewAnnotations = function (entry = []) {
|
|
31
30
|
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/preview/config')];
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
exports.
|
|
33
|
+
exports.previewAnnotations = previewAnnotations;
|
|
@@ -8,15 +8,16 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
8
8
|
|
|
9
9
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
10
|
|
|
11
|
-
import "core-js/modules/es.promise.js";
|
|
12
11
|
import "core-js/modules/es.object.to-string.js";
|
|
13
|
-
import "core-js/modules/
|
|
14
|
-
import "core-js/modules/es.string.iterator.js";
|
|
12
|
+
import "core-js/modules/es.promise.js";
|
|
15
13
|
import "core-js/modules/es.array.iterator.js";
|
|
14
|
+
import "core-js/modules/es.string.iterator.js";
|
|
16
15
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
16
|
+
import "core-js/modules/web.url.js";
|
|
17
|
+
import "core-js/modules/web.url-search-params.js";
|
|
17
18
|
import "core-js/modules/es.array.concat.js";
|
|
18
|
-
import "core-js/modules/es.string.search.js";
|
|
19
19
|
import "core-js/modules/es.regexp.exec.js";
|
|
20
|
+
import "core-js/modules/es.string.search.js";
|
|
20
21
|
import "core-js/modules/es.regexp.to-string.js";
|
|
21
22
|
import "core-js/modules/es.object.assign.js";
|
|
22
23
|
import "core-js/modules/web.dom-collections.for-each.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,20 +2,24 @@ import "core-js/modules/es.symbol.js";
|
|
|
2
2
|
import "core-js/modules/es.symbol.description.js";
|
|
3
3
|
import "core-js/modules/es.object.to-string.js";
|
|
4
4
|
import "core-js/modules/es.symbol.iterator.js";
|
|
5
|
-
import "core-js/modules/es.string.iterator.js";
|
|
6
5
|
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
8
8
|
import "core-js/modules/es.array.slice.js";
|
|
9
9
|
import "core-js/modules/es.array.from.js";
|
|
10
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
10
11
|
import "core-js/modules/es.object.freeze.js";
|
|
11
12
|
|
|
12
13
|
var _templateObject;
|
|
13
14
|
|
|
15
|
+
var _excluded = ["title", "imports", "decorators", "stories"],
|
|
16
|
+
_excluded2 = ["name"];
|
|
17
|
+
|
|
14
18
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
19
|
|
|
16
20
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
21
|
|
|
18
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator
|
|
22
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
23
|
|
|
20
24
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
25
|
|
|
@@ -33,11 +37,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
33
37
|
|
|
34
38
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
39
|
|
|
36
|
-
function _iterableToArrayLimit(arr, i) {
|
|
40
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
41
|
|
|
38
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
43
|
|
|
40
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
44
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
41
45
|
|
|
42
46
|
import "core-js/modules/es.string.repeat.js";
|
|
43
47
|
import "core-js/modules/es.array.map.js";
|
|
@@ -45,6 +49,7 @@ import "core-js/modules/es.array.join.js";
|
|
|
45
49
|
import "core-js/modules/es.array.concat.js";
|
|
46
50
|
import "core-js/modules/es.object.keys.js";
|
|
47
51
|
import "core-js/modules/es.object.entries.js";
|
|
52
|
+
import "core-js/modules/es.array.sort.js";
|
|
48
53
|
import "core-js/modules/es.function.name.js";
|
|
49
54
|
import "core-js/modules/es.object.assign.js";
|
|
50
55
|
import dedent from 'ts-dedent';
|
|
@@ -107,7 +112,7 @@ export function stringifyDefault(section) {
|
|
|
107
112
|
imports = section.imports,
|
|
108
113
|
decorators = section.decorators,
|
|
109
114
|
stories = section.stories,
|
|
110
|
-
options = _objectWithoutProperties(section,
|
|
115
|
+
options = _objectWithoutProperties(section, _excluded);
|
|
111
116
|
|
|
112
117
|
var decoratorsString = stringifyDecorators(decorators);
|
|
113
118
|
var optionsString = stringifyObject(options, 0, true);
|
|
@@ -115,7 +120,7 @@ export function stringifyDefault(section) {
|
|
|
115
120
|
}
|
|
116
121
|
export function stringifyStory(story) {
|
|
117
122
|
var name = story.name,
|
|
118
|
-
options = _objectWithoutProperties(story,
|
|
123
|
+
options = _objectWithoutProperties(story, _excluded2);
|
|
119
124
|
|
|
120
125
|
var storyId = identifier(name);
|
|
121
126
|
var exportedStory = Object.assign({
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
1
|
import path from 'path';
|
|
3
2
|
import { findDistEsm } from '@storybook/core-common';
|
|
4
3
|
export function webpack(config) {
|
|
@@ -14,6 +13,6 @@ export function webpack(config) {
|
|
|
14
13
|
});
|
|
15
14
|
return config;
|
|
16
15
|
}
|
|
17
|
-
export var
|
|
16
|
+
export var previewAnnotations = function (entry = []) {
|
|
18
17
|
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
|
19
18
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const _excluded = ["title", "imports", "decorators", "stories"],
|
|
2
|
+
_excluded2 = ["name"];
|
|
3
|
+
|
|
1
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
5
|
|
|
3
6
|
import dedent from 'ts-dedent';
|
|
@@ -50,7 +53,7 @@ export function stringifyDefault(section) {
|
|
|
50
53
|
title,
|
|
51
54
|
decorators
|
|
52
55
|
} = section,
|
|
53
|
-
options = _objectWithoutPropertiesLoose(section,
|
|
56
|
+
options = _objectWithoutPropertiesLoose(section, _excluded);
|
|
54
57
|
|
|
55
58
|
const decoratorsString = stringifyDecorators(decorators);
|
|
56
59
|
const optionsString = stringifyObject(options, 0, true);
|
|
@@ -65,7 +68,7 @@ export function stringifyStory(story) {
|
|
|
65
68
|
const {
|
|
66
69
|
name
|
|
67
70
|
} = story,
|
|
68
|
-
options = _objectWithoutPropertiesLoose(story,
|
|
71
|
+
options = _objectWithoutPropertiesLoose(story, _excluded2);
|
|
69
72
|
|
|
70
73
|
const storyId = identifier(name);
|
|
71
74
|
const exportedStory = Object.assign({
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
1
|
import path from 'path';
|
|
3
2
|
import { findDistEsm } from '@storybook/core-common';
|
|
4
3
|
export function webpack(config) {
|
|
@@ -14,6 +13,6 @@ export function webpack(config) {
|
|
|
14
13
|
});
|
|
15
14
|
return config;
|
|
16
15
|
}
|
|
17
|
-
export var
|
|
16
|
+
export var previewAnnotations = function (entry = []) {
|
|
18
17
|
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
|
19
18
|
};
|
|
@@ -13,9 +13,9 @@ interface ClientApi extends ClientStoryApi<ServerFramework['storyResult']> {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const storiesOf: ClientApi['storiesOf'];
|
|
15
15
|
export declare const configure: ClientApi['configure'];
|
|
16
|
-
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<ServerFramework, import("@storybook/addons").Args>) => void), addParameters: ((
|
|
16
|
+
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<ServerFramework, import("@storybook/addons").Args>) => void), addParameters: (({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
17
17
|
globals?: import("@storybook/csf").Globals;
|
|
18
18
|
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
19
|
-
}) => void)
|
|
19
|
+
}) => void) | (() => never), clearDecorators: (() => void) | (() => never), setAddon: ((addon: any) => void) | (() => never), getStorybook: (() => never) | (() => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<ServerFramework>[]), raw: (() => never) | (() => import("@storybook/store").BoundStory<ServerFramework>[]);
|
|
20
20
|
export declare const forceReRender: (() => never) | (() => void);
|
|
21
21
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Configuration } from 'webpack';
|
|
2
1
|
import { StorybookConfig } from '@storybook/core-common';
|
|
2
|
+
import { Configuration } from 'webpack';
|
|
3
3
|
export declare function webpack(config: Configuration): Configuration;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="webpack-env" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
3
|
+
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
4
|
import './globals';
|
|
5
|
-
import { IStorybookSection, ServerFramework } from './types';
|
|
5
|
+
import type { IStorybookSection, ServerFramework } from './types';
|
|
6
6
|
interface ClientApi extends ClientStoryApi<ServerFramework['storyResult']> {
|
|
7
7
|
setAddon(addon: any): void;
|
|
8
8
|
configure(loader: Loadable, module: NodeModule): void;
|
|
@@ -13,9 +13,9 @@ interface ClientApi extends ClientStoryApi<ServerFramework['storyResult']> {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const storiesOf: ClientApi['storiesOf'];
|
|
15
15
|
export declare const configure: ClientApi['configure'];
|
|
16
|
-
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<ServerFramework, import("@storybook/addons").Args>) => void), addParameters: ((
|
|
16
|
+
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<ServerFramework, import("@storybook/addons").Args>) => void), addParameters: (({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
17
17
|
globals?: import("@storybook/csf").Globals;
|
|
18
18
|
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
19
|
-
}) => void)
|
|
19
|
+
}) => void) | (() => never), clearDecorators: (() => void) | (() => never), setAddon: ((addon: any) => void) | (() => never), getStorybook: (() => never) | (() => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<ServerFramework>[]), raw: (() => never) | (() => import("@storybook/store").BoundStory<ServerFramework>[]);
|
|
20
20
|
export declare const forceReRender: (() => never) | (() => void);
|
|
21
21
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RenderContext } from '@storybook/store';
|
|
2
|
-
import { StoryFn } from '@storybook/csf';
|
|
3
|
-
import { ServerFramework } from './types';
|
|
1
|
+
import type { RenderContext } from '@storybook/store';
|
|
2
|
+
import type { StoryFn } from '@storybook/csf';
|
|
3
|
+
import type { ServerFramework } from './types';
|
|
4
4
|
export declare const render: StoryFn<ServerFramework>;
|
|
5
5
|
export declare function renderToDOM({ id, title, name, showMain, showError, forceRemount, storyFn, storyContext, storyContext: { parameters, args, argTypes }, }: RenderContext<ServerFramework>, domElement: HTMLElement): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { StorybookConfig } from '@storybook/core-common';
|
|
2
|
+
import type { Configuration } from 'webpack';
|
|
3
3
|
export declare function webpack(config: Configuration): Configuration;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/server",
|
|
3
|
-
"version": "6.5.0-
|
|
3
|
+
"version": "6.5.0-beta.1",
|
|
4
4
|
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "6.5.0-
|
|
49
|
-
"@storybook/api": "6.5.0-
|
|
50
|
-
"@storybook/client-api": "6.5.0-
|
|
51
|
-
"@storybook/core": "6.5.0-
|
|
52
|
-
"@storybook/core-common": "6.5.0-
|
|
53
|
-
"@storybook/csf": "0.0.2--canary.
|
|
54
|
-
"@storybook/node-logger": "6.5.0-
|
|
55
|
-
"@storybook/preview-web": "6.5.0-
|
|
56
|
-
"@storybook/store": "6.5.0-
|
|
48
|
+
"@storybook/addons": "6.5.0-beta.1",
|
|
49
|
+
"@storybook/api": "6.5.0-beta.1",
|
|
50
|
+
"@storybook/client-api": "6.5.0-beta.1",
|
|
51
|
+
"@storybook/core": "6.5.0-beta.1",
|
|
52
|
+
"@storybook/core-common": "6.5.0-beta.1",
|
|
53
|
+
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
54
|
+
"@storybook/node-logger": "6.5.0-beta.1",
|
|
55
|
+
"@storybook/preview-web": "6.5.0-beta.1",
|
|
56
|
+
"@storybook/store": "6.5.0-beta.1",
|
|
57
57
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
58
58
|
"@types/webpack-env": "^1.16.0",
|
|
59
59
|
"core-js": "^3.8.2",
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "85bcae3041a0664d7c0ee4756241e29ad1063a9a",
|
|
80
80
|
"sbmodern": "dist/modern/client/index.js"
|
|
81
81
|
}
|
package/dist/cjs/typings.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/esm/typings.d.js
DELETED
|
File without changes
|
package/dist/modern/typings.d.js
DELETED
|
File without changes
|