@storybook/builder-webpack5 7.0.0-alpha.2 → 7.0.0-alpha.23
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/index.js +2 -2
- package/dist/cjs/presets/custom-webpack-preset.js +2 -4
- package/dist/cjs/presets/preview-preset.js +0 -2
- package/dist/cjs/preview/base-webpack.config.js +6 -8
- package/dist/cjs/preview/iframe-webpack.config.js +34 -16
- package/dist/cjs/preview/virtualModuleEntry.template.js +19 -12
- package/dist/esm/index.js +2 -1
- package/dist/esm/presets/custom-webpack-preset.js +1 -2
- package/dist/esm/presets/preview-preset.js +0 -1
- package/dist/esm/preview/base-webpack.config.js +6 -7
- package/dist/esm/preview/iframe-webpack.config.js +32 -15
- package/dist/types/index.d.ts +3 -3
- package/dist/types/types.d.ts +11 -19
- package/package.json +22 -20
- package/LICENSE +0 -21
package/dist/cjs/index.js
CHANGED
|
@@ -14,8 +14,6 @@ var _exportNames = {
|
|
|
14
14
|
};
|
|
15
15
|
exports.start = exports.overridePresets = exports.getConfig = exports.executor = exports.corePresets = exports.build = exports.bail = void 0;
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.promise.js");
|
|
18
|
-
|
|
19
17
|
var _webpack = _interopRequireWildcard(require("webpack"));
|
|
20
18
|
|
|
21
19
|
var _webpackDevMiddleware = _interopRequireDefault(require("webpack-dev-middleware"));
|
|
@@ -102,6 +100,7 @@ var bail = async function () {
|
|
|
102
100
|
|
|
103
101
|
|
|
104
102
|
return new Promise(function (res, rej) {
|
|
103
|
+
// @ts-ignore
|
|
105
104
|
if (process && compilation) {
|
|
106
105
|
try {
|
|
107
106
|
compilation.close(function () {
|
|
@@ -290,6 +289,7 @@ var builder = async function* builderGeneratorFn({
|
|
|
290
289
|
});
|
|
291
290
|
|
|
292
291
|
if (stats && stats.hasWarnings()) {
|
|
292
|
+
// @ts-ignore
|
|
293
293
|
stats.toJson({
|
|
294
294
|
warnings: true
|
|
295
295
|
}).warnings.forEach(function (e) {
|
|
@@ -6,15 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.webpack = webpack;
|
|
7
7
|
exports.webpackVersion = exports.webpackInstance = void 0;
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.promise.js");
|
|
10
|
-
|
|
11
9
|
var webpackReal = _interopRequireWildcard(require("webpack"));
|
|
12
10
|
|
|
13
11
|
var _nodeLogger = require("@storybook/node-logger");
|
|
14
12
|
|
|
15
13
|
var _utilDeprecate = _interopRequireDefault(require("util-deprecate"));
|
|
16
14
|
|
|
17
|
-
var _tsDedent =
|
|
15
|
+
var _tsDedent = require("ts-dedent");
|
|
18
16
|
|
|
19
17
|
var _coreWebpack = require("@storybook/core-webpack");
|
|
20
18
|
|
|
@@ -42,7 +40,7 @@ async function webpack(config, options) {
|
|
|
42
40
|
var finalDefaultConfig = await presets.apply('webpackFinal', defaultConfig, options); // through standalone webpackConfig option
|
|
43
41
|
|
|
44
42
|
if (webpackConfig) {
|
|
45
|
-
return (0, _utilDeprecate.default)(webpackConfig, (0, _tsDedent.
|
|
43
|
+
return (0, _utilDeprecate.default)(webpackConfig, (0, _tsDedent.dedent)`
|
|
46
44
|
You've provided a webpack config directly in CallOptions, this is not recommended. Please use presets instead. This feature will be removed in 7.0
|
|
47
45
|
`)(finalDefaultConfig);
|
|
48
46
|
} // Check whether user has a custom webpack config file and
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.webpack = exports.entries = exports.babel = void 0;
|
|
7
7
|
|
|
8
|
-
require("core-js/modules/es.promise.js");
|
|
9
|
-
|
|
10
8
|
var _iframeWebpack = _interopRequireDefault(require("../preview/iframe-webpack.config"));
|
|
11
9
|
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createDefaultWebpackConfig = createDefaultWebpackConfig;
|
|
7
7
|
|
|
8
|
-
require("core-js/modules/es.promise.js");
|
|
9
|
-
|
|
10
8
|
var _nodeLogger = require("@storybook/node-logger");
|
|
11
9
|
|
|
12
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -16,15 +14,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
14
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
15
|
|
|
18
16
|
async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
19
|
-
var _coreOptions$builder, _storybookBaseConfig
|
|
17
|
+
var _options$presetsList, _options$presetsList2, _coreOptions$builder, _storybookBaseConfig$, _storybookBaseConfig$2;
|
|
20
18
|
|
|
21
|
-
if (options.presetsList.some(function (preset) {
|
|
19
|
+
if ((_options$presetsList = options.presetsList) !== null && _options$presetsList !== void 0 && _options$presetsList.some(function (preset) {
|
|
22
20
|
return /@storybook(\/|\\)preset-create-react-app/.test(typeof preset === 'string' ? preset : preset.name);
|
|
23
21
|
})) {
|
|
24
22
|
return storybookBaseConfig;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
|
-
var hasPostcssAddon = options.presetsList.some(function (preset) {
|
|
25
|
+
var hasPostcssAddon = (_options$presetsList2 = options.presetsList) === null || _options$presetsList2 === void 0 ? void 0 : _options$presetsList2.some(function (preset) {
|
|
28
26
|
return /@storybook(\/|\\)addon-postcss/.test(typeof preset === 'string' ? preset : preset.name);
|
|
29
27
|
});
|
|
30
28
|
var cssLoaders = {};
|
|
@@ -50,7 +48,7 @@ async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
|
50
48
|
|
|
51
49
|
var isProd = storybookBaseConfig.mode !== 'development';
|
|
52
50
|
var coreOptions = await options.presets.apply('core');
|
|
53
|
-
var builderOptions = ((_coreOptions$builder = coreOptions.builder) === null || _coreOptions$builder === void 0 ? void 0 : _coreOptions$builder.options) || {};
|
|
51
|
+
var builderOptions = typeof coreOptions.builder === 'string' ? {} : ((_coreOptions$builder = coreOptions.builder) === null || _coreOptions$builder === void 0 ? void 0 : _coreOptions$builder.options) || {};
|
|
54
52
|
var cacheConfig = builderOptions.fsCache ? {
|
|
55
53
|
cache: {
|
|
56
54
|
type: 'filesystem'
|
|
@@ -63,7 +61,7 @@ async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
|
63
61
|
} : {};
|
|
64
62
|
return _objectSpread(_objectSpread(_objectSpread({}, storybookBaseConfig), {}, {
|
|
65
63
|
module: _objectSpread(_objectSpread({}, storybookBaseConfig.module), {}, {
|
|
66
|
-
rules: [...storybookBaseConfig.module
|
|
64
|
+
rules: [...(((_storybookBaseConfig$ = storybookBaseConfig.module) === null || _storybookBaseConfig$ === void 0 ? void 0 : _storybookBaseConfig$.rules) || []), cssLoaders, {
|
|
67
65
|
test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/,
|
|
68
66
|
type: 'asset/resource',
|
|
69
67
|
generator: {
|
|
@@ -83,7 +81,7 @@ async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
|
83
81
|
}]
|
|
84
82
|
}),
|
|
85
83
|
resolve: _objectSpread(_objectSpread({}, storybookBaseConfig.resolve), {}, {
|
|
86
|
-
fallback: _objectSpread(_objectSpread({}, (_storybookBaseConfig$ = storybookBaseConfig.resolve) === null || _storybookBaseConfig$ === void 0 ? void 0 : _storybookBaseConfig
|
|
84
|
+
fallback: _objectSpread(_objectSpread({}, (_storybookBaseConfig$2 = storybookBaseConfig.resolve) === null || _storybookBaseConfig$2 === void 0 ? void 0 : _storybookBaseConfig$2.fallback), {}, {
|
|
87
85
|
crypto: false,
|
|
88
86
|
assert: false
|
|
89
87
|
})
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
require("core-js/modules/es.promise.js");
|
|
9
|
-
|
|
10
8
|
var _path = _interopRequireDefault(require("path"));
|
|
11
9
|
|
|
12
|
-
var _tsDedent =
|
|
10
|
+
var _tsDedent = require("ts-dedent");
|
|
13
11
|
|
|
14
12
|
var _webpack = require("webpack");
|
|
15
13
|
|
|
@@ -25,6 +23,8 @@ var _forkTsCheckerWebpackPlugin = _interopRequireDefault(require("fork-ts-checke
|
|
|
25
23
|
|
|
26
24
|
var _coreCommon = require("@storybook/core-common");
|
|
27
25
|
|
|
26
|
+
var _coreWebpack = require("@storybook/core-webpack");
|
|
27
|
+
|
|
28
28
|
var _babelLoaderPreview = require("./babel-loader-preview");
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -44,6 +44,8 @@ var storybookPaths = _objectSpread({
|
|
|
44
44
|
}, {}));
|
|
45
45
|
|
|
46
46
|
var _default = async function _default(options) {
|
|
47
|
+
var _coreOptions$builder;
|
|
48
|
+
|
|
47
49
|
var _options$outputDir = options.outputDir,
|
|
48
50
|
outputDir = _options$outputDir === void 0 ? _path.default.join('.', 'public') : _options$outputDir,
|
|
49
51
|
quiet = options.quiet,
|
|
@@ -58,20 +60,15 @@ var _default = async function _default(options) {
|
|
|
58
60
|
var framework = await presets.apply('framework', undefined);
|
|
59
61
|
|
|
60
62
|
if (!framework) {
|
|
61
|
-
throw new Error((0, _tsDedent.
|
|
63
|
+
throw new Error((0, _tsDedent.dedent)`
|
|
62
64
|
You must to specify a framework in '.storybook/main.js' config.
|
|
63
65
|
|
|
64
66
|
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory
|
|
65
67
|
`);
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
options: {}
|
|
71
|
-
} : framework,
|
|
72
|
-
frameworkName = _ref.name,
|
|
73
|
-
frameworkOptions = _ref.options;
|
|
74
|
-
|
|
70
|
+
var frameworkName = typeof framework === 'string' ? framework : framework.name;
|
|
71
|
+
var frameworkOptions = await presets.apply('frameworkOptions');
|
|
75
72
|
var isProd = configType === 'PRODUCTION';
|
|
76
73
|
var envs = await presets.apply('env');
|
|
77
74
|
var logLevel = await presets.apply('logLevel', undefined);
|
|
@@ -79,6 +76,8 @@ var _default = async function _default(options) {
|
|
|
79
76
|
var bodyHtmlSnippet = await presets.apply('previewBody');
|
|
80
77
|
var template = await presets.apply('previewMainTemplate');
|
|
81
78
|
var coreOptions = await presets.apply('core');
|
|
79
|
+
var builderOptions = typeof coreOptions.builder === 'string' ? {} : ((_coreOptions$builder = coreOptions.builder) === null || _coreOptions$builder === void 0 ? void 0 : _coreOptions$builder.options) || {};
|
|
80
|
+
var docsOptions = await presets.apply('docs');
|
|
82
81
|
var configs = [...(await presets.apply('config', [], options)), (0, _coreCommon.loadPreviewOrConfigFile)(options)].filter(Boolean);
|
|
83
82
|
var entries = await presets.apply('entries', [], options);
|
|
84
83
|
var workingDir = process.cwd();
|
|
@@ -93,7 +92,10 @@ var _default = async function _default(options) {
|
|
|
93
92
|
|
|
94
93
|
var storiesPath = _path.default.resolve(_path.default.join(workingDir, storiesFilename));
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
var needPipelinedImport = !!builderOptions.lazyCompilation && !isProd;
|
|
96
|
+
virtualModuleMapping[storiesPath] = (0, _coreWebpack.toImportFn)(stories, {
|
|
97
|
+
needPipelinedImport: needPipelinedImport
|
|
98
|
+
});
|
|
97
99
|
|
|
98
100
|
var configEntryPath = _path.default.resolve(_path.default.join(workingDir, 'storybook-config-entry.js'));
|
|
99
101
|
|
|
@@ -132,13 +134,17 @@ var _default = async function _default(options) {
|
|
|
132
134
|
virtualModuleMapping[_storiesFilename] = (0, _coreCommon.interpolate)(storyTemplate, {
|
|
133
135
|
frameworkName: frameworkName
|
|
134
136
|
}) // Make sure we also replace quotes for this one
|
|
135
|
-
.replace("'{{stories}}'", stories.map(
|
|
137
|
+
.replace("'{{stories}}'", stories.map(_coreWebpack.toRequireContextString).join(','));
|
|
136
138
|
entries.push(_storiesFilename);
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
var shouldCheckTs = typescriptOptions.check && !typescriptOptions.skipBabel;
|
|
141
143
|
var tsCheckOptions = typescriptOptions.checkOptions || {};
|
|
144
|
+
var _process$env = process.env,
|
|
145
|
+
NODE_OPTIONS = _process$env.NODE_OPTIONS,
|
|
146
|
+
NODE_PRESERVE_SYMLINKS = _process$env.NODE_PRESERVE_SYMLINKS;
|
|
147
|
+
var isPreservingSymlinks = !!NODE_PRESERVE_SYMLINKS || (NODE_OPTIONS === null || NODE_OPTIONS === void 0 ? void 0 : NODE_OPTIONS.includes('--preserve-symlinks'));
|
|
142
148
|
return {
|
|
143
149
|
name: 'preview',
|
|
144
150
|
mode: isProd ? 'production' : 'development',
|
|
@@ -173,7 +179,7 @@ var _default = async function _default(options) {
|
|
|
173
179
|
CONFIG_TYPE: configType,
|
|
174
180
|
LOGLEVEL: logLevel,
|
|
175
181
|
FRAMEWORK_OPTIONS: frameworkOptions,
|
|
176
|
-
CHANNEL_OPTIONS: coreOptions
|
|
182
|
+
CHANNEL_OPTIONS: coreOptions.channelOptions,
|
|
177
183
|
FEATURES: features,
|
|
178
184
|
PREVIEW_URL: previewUrl,
|
|
179
185
|
STORIES: stories.map(function (specifier) {
|
|
@@ -181,6 +187,7 @@ var _default = async function _default(options) {
|
|
|
181
187
|
importPathMatcher: specifier.importPathMatcher.source
|
|
182
188
|
});
|
|
183
189
|
}),
|
|
190
|
+
DOCS_OPTIONS: docsOptions,
|
|
184
191
|
SERVER_CHANNEL_URL: serverChannelUrl
|
|
185
192
|
},
|
|
186
193
|
headHtmlSnippet: headHtmlSnippet,
|
|
@@ -200,7 +207,15 @@ var _default = async function _default(options) {
|
|
|
200
207
|
process: require.resolve('process/browser.js')
|
|
201
208
|
}), isProd ? null : new _webpack.HotModuleReplacementPlugin(), new _caseSensitivePathsWebpackPlugin.default(), quiet ? null : new _webpack.ProgressPlugin({}), shouldCheckTs ? new _forkTsCheckerWebpackPlugin.default(tsCheckOptions) : null].filter(Boolean),
|
|
202
209
|
module: {
|
|
203
|
-
rules: [
|
|
210
|
+
rules: [{
|
|
211
|
+
test: /\.m?js$/,
|
|
212
|
+
type: 'javascript/auto'
|
|
213
|
+
}, {
|
|
214
|
+
test: /\.m?js$/,
|
|
215
|
+
resolve: {
|
|
216
|
+
fullySpecified: false
|
|
217
|
+
}
|
|
218
|
+
}, (0, _babelLoaderPreview.createBabelLoader)(babelOptions, typescriptOptions), {
|
|
204
219
|
test: /\.md$/,
|
|
205
220
|
type: 'asset/source'
|
|
206
221
|
}]
|
|
@@ -214,7 +229,10 @@ var _default = async function _default(options) {
|
|
|
214
229
|
path: require.resolve('path-browserify'),
|
|
215
230
|
assert: require.resolve('browser-assert'),
|
|
216
231
|
util: require.resolve('util')
|
|
217
|
-
}
|
|
232
|
+
},
|
|
233
|
+
// Set webpack to resolve symlinks based on whether the user has asked node to.
|
|
234
|
+
// This feels like it should be default out-of-the-box in webpack :shrug:
|
|
235
|
+
symlinks: !isPreservingSymlinks
|
|
218
236
|
},
|
|
219
237
|
optimization: {
|
|
220
238
|
splitChunks: {
|
|
@@ -1,62 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _clientApi = require("{{clientApi}}");
|
|
4
|
+
|
|
5
|
+
var config = _interopRequireWildcard(require("{{configFilename}}"));
|
|
6
|
+
|
|
7
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
8
|
+
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
|
|
1
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
12
|
|
|
3
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
14
|
|
|
5
15
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
16
|
|
|
7
|
-
/* eslint-disable import/no-unresolved */
|
|
8
|
-
import { addDecorator, addParameters, addLoader, addArgs, addArgTypes, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
|
|
9
|
-
import * as config from '{{configFilename}}';
|
|
10
17
|
Object.keys(config).forEach(function (key) {
|
|
11
18
|
var value = config[key];
|
|
12
19
|
|
|
13
20
|
switch (key) {
|
|
14
21
|
case 'args':
|
|
15
22
|
{
|
|
16
|
-
return addArgs(value);
|
|
23
|
+
return (0, _clientApi.addArgs)(value);
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
case 'argTypes':
|
|
20
27
|
{
|
|
21
|
-
return addArgTypes(value);
|
|
28
|
+
return (0, _clientApi.addArgTypes)(value);
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
case 'decorators':
|
|
25
32
|
{
|
|
26
33
|
return value.forEach(function (decorator) {
|
|
27
|
-
return addDecorator(decorator, false);
|
|
34
|
+
return (0, _clientApi.addDecorator)(decorator, false);
|
|
28
35
|
});
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
case 'loaders':
|
|
32
39
|
{
|
|
33
40
|
return value.forEach(function (loader) {
|
|
34
|
-
return addLoader(loader, false);
|
|
41
|
+
return (0, _clientApi.addLoader)(loader, false);
|
|
35
42
|
});
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
case 'parameters':
|
|
39
46
|
{
|
|
40
|
-
return addParameters(_objectSpread({}, value), false);
|
|
47
|
+
return (0, _clientApi.addParameters)(_objectSpread({}, value), false);
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
case 'argTypesEnhancers':
|
|
44
51
|
{
|
|
45
52
|
return value.forEach(function (enhancer) {
|
|
46
|
-
return addArgTypesEnhancer(enhancer);
|
|
53
|
+
return (0, _clientApi.addArgTypesEnhancer)(enhancer);
|
|
47
54
|
});
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
case 'argsEnhancers':
|
|
51
58
|
{
|
|
52
59
|
return value.forEach(function (enhancer) {
|
|
53
|
-
return addArgsEnhancer(enhancer);
|
|
60
|
+
return (0, _clientApi.addArgsEnhancer)(enhancer);
|
|
54
61
|
});
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
case 'render':
|
|
58
65
|
{
|
|
59
|
-
return setGlobalRender(value);
|
|
66
|
+
return (0, _clientApi.setGlobalRender)(value);
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
case 'globals':
|
|
@@ -64,7 +71,7 @@ Object.keys(config).forEach(function (key) {
|
|
|
64
71
|
{
|
|
65
72
|
var v = {};
|
|
66
73
|
v[key] = value;
|
|
67
|
-
return addParameters(v, false);
|
|
74
|
+
return (0, _clientApi.addParameters)(v, false);
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
case '__namedExportsOrder':
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import "core-js/modules/es.promise.js";
|
|
8
7
|
import webpack, { ProgressPlugin } from 'webpack';
|
|
9
8
|
import webpackDevMiddleware from 'webpack-dev-middleware';
|
|
10
9
|
import webpackHotMiddleware from 'webpack-hot-middleware';
|
|
@@ -55,6 +54,7 @@ export var bail = async function () {
|
|
|
55
54
|
|
|
56
55
|
|
|
57
56
|
return new Promise(function (res, rej) {
|
|
57
|
+
// @ts-ignore
|
|
58
58
|
if (process && compilation) {
|
|
59
59
|
try {
|
|
60
60
|
compilation.close(function () {
|
|
@@ -230,6 +230,7 @@ var builder = async function* builderGeneratorFn({
|
|
|
230
230
|
});
|
|
231
231
|
|
|
232
232
|
if (stats && stats.hasWarnings()) {
|
|
233
|
+
// @ts-ignore
|
|
233
234
|
stats.toJson({
|
|
234
235
|
warnings: true
|
|
235
236
|
}).warnings.forEach(function (e) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import "core-js/modules/es.promise.js";
|
|
2
1
|
import * as webpackReal from 'webpack';
|
|
3
2
|
import { logger } from '@storybook/node-logger';
|
|
4
3
|
import deprecate from 'util-deprecate';
|
|
5
|
-
import dedent from 'ts-dedent';
|
|
4
|
+
import { dedent } from 'ts-dedent';
|
|
6
5
|
import { loadCustomWebpackConfig } from '@storybook/core-webpack';
|
|
7
6
|
import { createDefaultWebpackConfig } from '../preview/base-webpack.config';
|
|
8
7
|
export async function webpack(config, options) {
|
|
@@ -4,7 +4,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import "core-js/modules/es.promise.js";
|
|
8
7
|
import webpackConfig from '../preview/iframe-webpack.config';
|
|
9
8
|
export var webpack = async function (_, options) {
|
|
10
9
|
return webpackConfig(options);
|
|
@@ -4,18 +4,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import "core-js/modules/es.promise.js";
|
|
8
7
|
import { logger } from '@storybook/node-logger';
|
|
9
8
|
export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
10
|
-
var _coreOptions$builder, _storybookBaseConfig
|
|
9
|
+
var _options$presetsList, _options$presetsList2, _coreOptions$builder, _storybookBaseConfig$, _storybookBaseConfig$2;
|
|
11
10
|
|
|
12
|
-
if (options.presetsList.some(function (preset) {
|
|
11
|
+
if ((_options$presetsList = options.presetsList) !== null && _options$presetsList !== void 0 && _options$presetsList.some(function (preset) {
|
|
13
12
|
return /@storybook(\/|\\)preset-create-react-app/.test(typeof preset === 'string' ? preset : preset.name);
|
|
14
13
|
})) {
|
|
15
14
|
return storybookBaseConfig;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
var hasPostcssAddon = options.presetsList.some(function (preset) {
|
|
17
|
+
var hasPostcssAddon = (_options$presetsList2 = options.presetsList) === null || _options$presetsList2 === void 0 ? void 0 : _options$presetsList2.some(function (preset) {
|
|
19
18
|
return /@storybook(\/|\\)addon-postcss/.test(typeof preset === 'string' ? preset : preset.name);
|
|
20
19
|
});
|
|
21
20
|
var cssLoaders = {};
|
|
@@ -40,7 +39,7 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
|
40
39
|
|
|
41
40
|
var isProd = storybookBaseConfig.mode !== 'development';
|
|
42
41
|
var coreOptions = await options.presets.apply('core');
|
|
43
|
-
var builderOptions = ((_coreOptions$builder = coreOptions.builder) === null || _coreOptions$builder === void 0 ? void 0 : _coreOptions$builder.options) || {};
|
|
42
|
+
var builderOptions = typeof coreOptions.builder === 'string' ? {} : ((_coreOptions$builder = coreOptions.builder) === null || _coreOptions$builder === void 0 ? void 0 : _coreOptions$builder.options) || {};
|
|
44
43
|
var cacheConfig = builderOptions.fsCache ? {
|
|
45
44
|
cache: {
|
|
46
45
|
type: 'filesystem'
|
|
@@ -53,7 +52,7 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
|
53
52
|
} : {};
|
|
54
53
|
return _objectSpread(_objectSpread(_objectSpread({}, storybookBaseConfig), {}, {
|
|
55
54
|
module: _objectSpread(_objectSpread({}, storybookBaseConfig.module), {}, {
|
|
56
|
-
rules: [...storybookBaseConfig.module
|
|
55
|
+
rules: [...(((_storybookBaseConfig$ = storybookBaseConfig.module) === null || _storybookBaseConfig$ === void 0 ? void 0 : _storybookBaseConfig$.rules) || []), cssLoaders, {
|
|
57
56
|
test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/,
|
|
58
57
|
type: 'asset/resource',
|
|
59
58
|
generator: {
|
|
@@ -73,7 +72,7 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
|
|
|
73
72
|
}]
|
|
74
73
|
}),
|
|
75
74
|
resolve: _objectSpread(_objectSpread({}, storybookBaseConfig.resolve), {}, {
|
|
76
|
-
fallback: _objectSpread(_objectSpread({}, (_storybookBaseConfig$ = storybookBaseConfig.resolve) === null || _storybookBaseConfig$ === void 0 ? void 0 : _storybookBaseConfig
|
|
75
|
+
fallback: _objectSpread(_objectSpread({}, (_storybookBaseConfig$2 = storybookBaseConfig.resolve) === null || _storybookBaseConfig$2 === void 0 ? void 0 : _storybookBaseConfig$2.fallback), {}, {
|
|
77
76
|
crypto: false,
|
|
78
77
|
assert: false
|
|
79
78
|
})
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/es.promise.js";
|
|
2
|
-
|
|
3
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
2
|
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -7,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
6
|
|
|
9
7
|
import path from 'path';
|
|
10
|
-
import dedent from 'ts-dedent';
|
|
8
|
+
import { dedent } from 'ts-dedent';
|
|
11
9
|
import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack';
|
|
12
10
|
import HtmlWebpackPlugin from 'html-webpack-plugin'; // @ts-ignore // -- this has typings for webpack4 in it, won't work
|
|
13
11
|
|
|
@@ -15,7 +13,8 @@ import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
|
|
15
13
|
import TerserWebpackPlugin from 'terser-webpack-plugin';
|
|
16
14
|
import VirtualModulePlugin from 'webpack-virtual-modules';
|
|
17
15
|
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|
18
|
-
import {
|
|
16
|
+
import { stringifyProcessEnvs, handlebars, interpolate, normalizeStories, readTemplate, loadPreviewOrConfigFile } from '@storybook/core-common';
|
|
17
|
+
import { toRequireContextString, toImportFn } from '@storybook/core-webpack';
|
|
19
18
|
import { createBabelLoader } from './babel-loader-preview';
|
|
20
19
|
|
|
21
20
|
var storybookPaths = _objectSpread({
|
|
@@ -27,6 +26,8 @@ var storybookPaths = _objectSpread({
|
|
|
27
26
|
}, {}));
|
|
28
27
|
|
|
29
28
|
export default (async function (options) {
|
|
29
|
+
var _coreOptions$builder;
|
|
30
|
+
|
|
30
31
|
var _options$outputDir = options.outputDir,
|
|
31
32
|
outputDir = _options$outputDir === void 0 ? path.join('.', 'public') : _options$outputDir,
|
|
32
33
|
quiet = options.quiet,
|
|
@@ -48,13 +49,8 @@ export default (async function (options) {
|
|
|
48
49
|
`);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
options: {}
|
|
54
|
-
} : framework,
|
|
55
|
-
frameworkName = _ref.name,
|
|
56
|
-
frameworkOptions = _ref.options;
|
|
57
|
-
|
|
52
|
+
var frameworkName = typeof framework === 'string' ? framework : framework.name;
|
|
53
|
+
var frameworkOptions = await presets.apply('frameworkOptions');
|
|
58
54
|
var isProd = configType === 'PRODUCTION';
|
|
59
55
|
var envs = await presets.apply('env');
|
|
60
56
|
var logLevel = await presets.apply('logLevel', undefined);
|
|
@@ -62,6 +58,8 @@ export default (async function (options) {
|
|
|
62
58
|
var bodyHtmlSnippet = await presets.apply('previewBody');
|
|
63
59
|
var template = await presets.apply('previewMainTemplate');
|
|
64
60
|
var coreOptions = await presets.apply('core');
|
|
61
|
+
var builderOptions = typeof coreOptions.builder === 'string' ? {} : ((_coreOptions$builder = coreOptions.builder) === null || _coreOptions$builder === void 0 ? void 0 : _coreOptions$builder.options) || {};
|
|
62
|
+
var docsOptions = await presets.apply('docs');
|
|
65
63
|
var configs = [...(await presets.apply('config', [], options)), loadPreviewOrConfigFile(options)].filter(Boolean);
|
|
66
64
|
var entries = await presets.apply('entries', [], options);
|
|
67
65
|
var workingDir = process.cwd();
|
|
@@ -74,7 +72,10 @@ export default (async function (options) {
|
|
|
74
72
|
if (features !== null && features !== void 0 && features.storyStoreV7) {
|
|
75
73
|
var storiesFilename = 'storybook-stories.js';
|
|
76
74
|
var storiesPath = path.resolve(path.join(workingDir, storiesFilename));
|
|
77
|
-
|
|
75
|
+
var needPipelinedImport = !!builderOptions.lazyCompilation && !isProd;
|
|
76
|
+
virtualModuleMapping[storiesPath] = toImportFn(stories, {
|
|
77
|
+
needPipelinedImport: needPipelinedImport
|
|
78
|
+
});
|
|
78
79
|
var configEntryPath = path.resolve(path.join(workingDir, 'storybook-config-entry.js'));
|
|
79
80
|
virtualModuleMapping[configEntryPath] = handlebars(await readTemplate(require.resolve('@storybook/builder-webpack5/templates/virtualModuleModernEntry.js.handlebars')), {
|
|
80
81
|
storiesFilename: storiesFilename,
|
|
@@ -117,6 +118,10 @@ export default (async function (options) {
|
|
|
117
118
|
|
|
118
119
|
var shouldCheckTs = typescriptOptions.check && !typescriptOptions.skipBabel;
|
|
119
120
|
var tsCheckOptions = typescriptOptions.checkOptions || {};
|
|
121
|
+
var _process$env = process.env,
|
|
122
|
+
NODE_OPTIONS = _process$env.NODE_OPTIONS,
|
|
123
|
+
NODE_PRESERVE_SYMLINKS = _process$env.NODE_PRESERVE_SYMLINKS;
|
|
124
|
+
var isPreservingSymlinks = !!NODE_PRESERVE_SYMLINKS || (NODE_OPTIONS === null || NODE_OPTIONS === void 0 ? void 0 : NODE_OPTIONS.includes('--preserve-symlinks'));
|
|
120
125
|
return {
|
|
121
126
|
name: 'preview',
|
|
122
127
|
mode: isProd ? 'production' : 'development',
|
|
@@ -151,7 +156,7 @@ export default (async function (options) {
|
|
|
151
156
|
CONFIG_TYPE: configType,
|
|
152
157
|
LOGLEVEL: logLevel,
|
|
153
158
|
FRAMEWORK_OPTIONS: frameworkOptions,
|
|
154
|
-
CHANNEL_OPTIONS: coreOptions
|
|
159
|
+
CHANNEL_OPTIONS: coreOptions.channelOptions,
|
|
155
160
|
FEATURES: features,
|
|
156
161
|
PREVIEW_URL: previewUrl,
|
|
157
162
|
STORIES: stories.map(function (specifier) {
|
|
@@ -159,6 +164,7 @@ export default (async function (options) {
|
|
|
159
164
|
importPathMatcher: specifier.importPathMatcher.source
|
|
160
165
|
});
|
|
161
166
|
}),
|
|
167
|
+
DOCS_OPTIONS: docsOptions,
|
|
162
168
|
SERVER_CHANNEL_URL: serverChannelUrl
|
|
163
169
|
},
|
|
164
170
|
headHtmlSnippet: headHtmlSnippet,
|
|
@@ -178,7 +184,15 @@ export default (async function (options) {
|
|
|
178
184
|
process: require.resolve('process/browser.js')
|
|
179
185
|
}), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
|
|
180
186
|
module: {
|
|
181
|
-
rules: [
|
|
187
|
+
rules: [{
|
|
188
|
+
test: /\.m?js$/,
|
|
189
|
+
type: 'javascript/auto'
|
|
190
|
+
}, {
|
|
191
|
+
test: /\.m?js$/,
|
|
192
|
+
resolve: {
|
|
193
|
+
fullySpecified: false
|
|
194
|
+
}
|
|
195
|
+
}, createBabelLoader(babelOptions, typescriptOptions), {
|
|
182
196
|
test: /\.md$/,
|
|
183
197
|
type: 'asset/source'
|
|
184
198
|
}]
|
|
@@ -192,7 +206,10 @@ export default (async function (options) {
|
|
|
192
206
|
path: require.resolve('path-browserify'),
|
|
193
207
|
assert: require.resolve('browser-assert'),
|
|
194
208
|
util: require.resolve('util')
|
|
195
|
-
}
|
|
209
|
+
},
|
|
210
|
+
// Set webpack to resolve symlinks based on whether the user has asked node to.
|
|
211
|
+
// This feels like it should be default out-of-the-box in webpack :shrug:
|
|
212
|
+
symlinks: !isPreservingSymlinks
|
|
196
213
|
},
|
|
197
214
|
optimization: {
|
|
198
215
|
splitChunks: {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,16 +2,16 @@ import webpack, { Stats, Configuration } from 'webpack';
|
|
|
2
2
|
import type { Builder, Options } from '@storybook/core-common';
|
|
3
3
|
export * from './types';
|
|
4
4
|
declare type WebpackBuilder = Builder<Configuration, Stats>;
|
|
5
|
-
declare type BuilderStartOptions =
|
|
5
|
+
declare type BuilderStartOptions = Parameters<WebpackBuilder['start']>['0'];
|
|
6
6
|
export declare const executor: {
|
|
7
7
|
get: (options: Options) => Promise<typeof webpack>;
|
|
8
8
|
};
|
|
9
9
|
export declare const getConfig: WebpackBuilder['getConfig'];
|
|
10
10
|
export declare const bail: WebpackBuilder['bail'];
|
|
11
11
|
export declare const start: (options: BuilderStartOptions) => Promise<void | {
|
|
12
|
-
stats
|
|
12
|
+
stats?: webpack.Stats | undefined;
|
|
13
13
|
totalTime: [number, number];
|
|
14
|
-
bail: (e?: Error) => Promise<void>;
|
|
14
|
+
bail: (e?: Error | undefined) => Promise<void>;
|
|
15
15
|
}>;
|
|
16
16
|
export declare const build: (options: BuilderStartOptions) => Promise<void | webpack.Stats>;
|
|
17
17
|
export declare const corePresets: string[];
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
import type ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|
2
|
-
import type { PluginOptions } from '@storybook/react-docgen-typescript-plugin';
|
|
3
1
|
import type { Configuration, Stats } from 'webpack';
|
|
4
|
-
import type { Options,
|
|
2
|
+
import type { Options, BuilderResult as BuilderResultBase, StorybookConfig } from '@storybook/core-webpack';
|
|
3
|
+
import type ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|
4
|
+
declare type TypeScriptOptionsBase = Required<StorybookConfig>['typescript'];
|
|
5
5
|
/**
|
|
6
6
|
* Options for TypeScript usage within Storybook.
|
|
7
7
|
*/
|
|
8
|
-
export interface TypescriptOptions extends
|
|
8
|
+
export interface TypescriptOptions extends TypeScriptOptionsBase {
|
|
9
9
|
/**
|
|
10
10
|
* Configures `fork-ts-checker-webpack-plugin`
|
|
11
11
|
*/
|
|
12
12
|
checkOptions?: ForkTsCheckerWebpackPlugin['options'];
|
|
13
|
-
/**
|
|
14
|
-
* Sets the type of Docgen when working with React and TypeScript
|
|
15
|
-
*
|
|
16
|
-
* @default `'react-docgen-typescript'`
|
|
17
|
-
*/
|
|
18
|
-
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
19
|
-
/**
|
|
20
|
-
* Configures `react-docgen-typescript-plugin`
|
|
21
|
-
*
|
|
22
|
-
* @default
|
|
23
|
-
* @see https://github.com/storybookjs/storybook/blob/next/lib/builder-webpack5/src/config/defaults.js#L4-L6
|
|
24
|
-
*/
|
|
25
|
-
reactDocgenTypescriptOptions: PluginOptions;
|
|
26
13
|
}
|
|
27
|
-
export interface
|
|
14
|
+
export interface StorybookConfigWebpack extends Pick<StorybookConfig, 'webpack' | 'webpackFinal'> {
|
|
28
15
|
/**
|
|
29
16
|
* Modify or return a custom Webpack config after the Storybook's default configuration
|
|
30
17
|
* has run (mostly used by addons).
|
|
@@ -35,6 +22,11 @@ export interface StorybookWebpackConfig {
|
|
|
35
22
|
*/
|
|
36
23
|
webpackFinal?: (config: Configuration, options: Options) => Configuration | Promise<Configuration>;
|
|
37
24
|
}
|
|
38
|
-
export
|
|
25
|
+
export declare type BuilderOptions = {
|
|
26
|
+
fsCache?: boolean;
|
|
27
|
+
lazyCompilation?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export interface BuilderResult extends BuilderResultBase {
|
|
39
30
|
stats?: Stats;
|
|
40
31
|
}
|
|
32
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-webpack5",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.23",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -29,27 +29,28 @@
|
|
|
29
29
|
"*.d.ts"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"
|
|
32
|
+
"check": "tsc --noEmit",
|
|
33
|
+
"prepare": "node ../../../scripts/prepare.js"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@babel/core": "^7.12.10",
|
|
36
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
37
|
-
"@storybook/api": "7.0.0-alpha.
|
|
38
|
-
"@storybook/channel-postmessage": "7.0.0-alpha.
|
|
39
|
-
"@storybook/channel-websocket": "7.0.0-alpha.
|
|
40
|
-
"@storybook/channels": "7.0.0-alpha.
|
|
41
|
-
"@storybook/client-api": "7.0.0-alpha.
|
|
42
|
-
"@storybook/client-logger": "7.0.0-alpha.
|
|
43
|
-
"@storybook/components": "7.0.0-alpha.
|
|
44
|
-
"@storybook/core-common": "7.0.0-alpha.
|
|
45
|
-
"@storybook/core-events": "7.0.0-alpha.
|
|
46
|
-
"@storybook/core-webpack": "7.0.0-alpha.
|
|
47
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
48
|
-
"@storybook/preview-web": "7.0.0-alpha.
|
|
49
|
-
"@storybook/router": "7.0.0-alpha.
|
|
37
|
+
"@storybook/addons": "7.0.0-alpha.23",
|
|
38
|
+
"@storybook/api": "7.0.0-alpha.23",
|
|
39
|
+
"@storybook/channel-postmessage": "7.0.0-alpha.23",
|
|
40
|
+
"@storybook/channel-websocket": "7.0.0-alpha.23",
|
|
41
|
+
"@storybook/channels": "7.0.0-alpha.23",
|
|
42
|
+
"@storybook/client-api": "7.0.0-alpha.23",
|
|
43
|
+
"@storybook/client-logger": "7.0.0-alpha.23",
|
|
44
|
+
"@storybook/components": "7.0.0-alpha.23",
|
|
45
|
+
"@storybook/core-common": "7.0.0-alpha.23",
|
|
46
|
+
"@storybook/core-events": "7.0.0-alpha.23",
|
|
47
|
+
"@storybook/core-webpack": "7.0.0-alpha.23",
|
|
48
|
+
"@storybook/node-logger": "7.0.0-alpha.23",
|
|
49
|
+
"@storybook/preview-web": "7.0.0-alpha.23",
|
|
50
|
+
"@storybook/router": "7.0.0-alpha.23",
|
|
50
51
|
"@storybook/semver": "^7.3.2",
|
|
51
|
-
"@storybook/store": "7.0.0-alpha.
|
|
52
|
-
"@storybook/theming": "7.0.0-alpha.
|
|
52
|
+
"@storybook/store": "7.0.0-alpha.23",
|
|
53
|
+
"@storybook/theming": "7.0.0-alpha.23",
|
|
53
54
|
"@types/node": "^14.0.10 || ^16.0.0",
|
|
54
55
|
"babel-loader": "^8.2.5",
|
|
55
56
|
"babel-plugin-named-exports-order": "^0.0.2",
|
|
@@ -79,7 +80,8 @@
|
|
|
79
80
|
"@types/terser-webpack-plugin": "^5.2.0",
|
|
80
81
|
"@types/webpack-dev-middleware": "^5.3.0",
|
|
81
82
|
"@types/webpack-hot-middleware": "^2.25.6",
|
|
82
|
-
"@types/webpack-virtual-modules": "^0.1.1"
|
|
83
|
+
"@types/webpack-virtual-modules": "^0.1.1",
|
|
84
|
+
"typescript": "~4.6.3"
|
|
83
85
|
},
|
|
84
86
|
"peerDependencies": {
|
|
85
87
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -93,5 +95,5 @@
|
|
|
93
95
|
"publishConfig": {
|
|
94
96
|
"access": "public"
|
|
95
97
|
},
|
|
96
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "0900e20acfbc12551c6a3f788b8de5dd6af5f80a"
|
|
97
99
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Kadira Inc. <hello@kadira.io>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|