storybook-builder-rsbuild 2.1.6 → 3.0.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/compiled/@storybook/core-webpack/index.d.ts +4 -3066
- package/compiled/@storybook/core-webpack/index.js +323 -281
- package/compiled/@storybook/core-webpack/package.json +1 -1
- package/dist/_node-chunks/chunk-MIMCYZFR.js +45 -0
- package/dist/index.d.ts +3 -72
- package/dist/index.js +423 -650
- package/dist/loaders/export-order-loader.js +31 -52
- package/dist/preview-preset.js +17 -39
- package/package.json +17 -30
- package/dist/chunk-TTFRSOOU.mjs +0 -34
- package/dist/index.mjs +0 -947
- package/dist/loaders/export-order-loader.d.ts +0 -5
- package/dist/loaders/export-order-loader.mjs +0 -49
- package/dist/preview-preset.d.ts +0 -3
|
@@ -1,61 +1,182 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
toImportFn: () => toImportFn,
|
|
33
|
-
toImportFnPart: () => toImportFnPart,
|
|
34
|
-
toRequireContext: () => toRequireContext,
|
|
35
|
-
toRequireContextString: () => toRequireContextString,
|
|
36
|
-
webpackIncludeRegexp: () => webpackIncludeRegexp,
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(index_exports);
|
|
39
|
-
var import_node_path = __nccwpck_require__(928),
|
|
40
|
-
import_common = __nccwpck_require__(253),
|
|
41
|
-
webpackConfigs = ["webpack.config", "webpackfile"],
|
|
42
|
-
loadCustomWebpackConfig = (configDir) =>
|
|
43
|
-
(0, import_common.serverRequire)(
|
|
44
|
-
webpackConfigs.map((configName) =>
|
|
45
|
-
(0, import_node_path.resolve)(configDir, configName),
|
|
46
|
-
),
|
|
1
|
+
import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_internal_common_7991bda6__ from "storybook/internal/common";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_internal_node_logger_87de4309__ from "storybook/internal/node-logger";
|
|
4
|
+
var __webpack_modules__ = {
|
|
5
|
+
980: (__unused_webpack_module, exports) => {
|
|
6
|
+
var __webpack_unused_export__;
|
|
7
|
+
__webpack_unused_export__ = { value: true };
|
|
8
|
+
exports.TW = void 0;
|
|
9
|
+
function dedent(templ) {
|
|
10
|
+
var values = [];
|
|
11
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
12
|
+
values[_i - 1] = arguments[_i];
|
|
13
|
+
}
|
|
14
|
+
var strings = Array.from(typeof templ === "string" ? [templ] : templ);
|
|
15
|
+
strings[strings.length - 1] = strings[strings.length - 1].replace(
|
|
16
|
+
/\r?\n([\t ]*)$/,
|
|
17
|
+
"",
|
|
18
|
+
);
|
|
19
|
+
var indentLengths = strings.reduce(function (arr, str) {
|
|
20
|
+
var matches = str.match(/\n([\t ]+|(?!\s).)/g);
|
|
21
|
+
if (matches) {
|
|
22
|
+
return arr.concat(
|
|
23
|
+
matches.map(function (match) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
return (_b =
|
|
26
|
+
(_a = match.match(/[\t ]/g)) === null || _a === void 0
|
|
27
|
+
? void 0
|
|
28
|
+
: _a.length) !== null && _b !== void 0
|
|
29
|
+
? _b
|
|
30
|
+
: 0;
|
|
31
|
+
}),
|
|
47
32
|
);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
33
|
+
}
|
|
34
|
+
return arr;
|
|
35
|
+
}, []);
|
|
36
|
+
if (indentLengths.length) {
|
|
37
|
+
var pattern_1 = new RegExp(
|
|
38
|
+
"\n[\t ]{" + Math.min.apply(Math, indentLengths) + "}",
|
|
39
|
+
"g",
|
|
40
|
+
);
|
|
41
|
+
strings = strings.map(function (str) {
|
|
42
|
+
return str.replace(pattern_1, "\n");
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
strings[0] = strings[0].replace(/^\r?\n/, "");
|
|
46
|
+
var string = strings[0];
|
|
47
|
+
values.forEach(function (value, i) {
|
|
48
|
+
var endentations = string.match(/(?:^|\n)( *)$/);
|
|
49
|
+
var endentation = endentations ? endentations[1] : "";
|
|
50
|
+
var indentedValue = value;
|
|
51
|
+
if (typeof value === "string" && value.includes("\n")) {
|
|
52
|
+
indentedValue = String(value)
|
|
53
|
+
.split("\n")
|
|
54
|
+
.map(function (str, i) {
|
|
55
|
+
return i === 0 ? str : "" + endentation + str;
|
|
56
|
+
})
|
|
57
|
+
.join("\n");
|
|
58
|
+
}
|
|
59
|
+
string += indentedValue + strings[i + 1];
|
|
60
|
+
});
|
|
61
|
+
return string;
|
|
62
|
+
}
|
|
63
|
+
exports.TW = dedent;
|
|
64
|
+
__webpack_unused_export__ = dedent;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
var __webpack_module_cache__ = {};
|
|
68
|
+
function __nccwpck_require__(moduleId) {
|
|
69
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
70
|
+
if (cachedModule !== undefined) {
|
|
71
|
+
return cachedModule.exports;
|
|
72
|
+
}
|
|
73
|
+
var module = (__webpack_module_cache__[moduleId] = { exports: {} });
|
|
74
|
+
var threw = true;
|
|
75
|
+
try {
|
|
76
|
+
__webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
|
77
|
+
threw = false;
|
|
78
|
+
} finally {
|
|
79
|
+
if (threw) delete __webpack_module_cache__[moduleId];
|
|
80
|
+
}
|
|
81
|
+
return module.exports;
|
|
82
|
+
}
|
|
83
|
+
(() => {
|
|
84
|
+
__nccwpck_require__.d = (exports, definition) => {
|
|
85
|
+
for (var key in definition) {
|
|
86
|
+
if (
|
|
87
|
+
__nccwpck_require__.o(definition, key) &&
|
|
88
|
+
!__nccwpck_require__.o(exports, key)
|
|
89
|
+
) {
|
|
90
|
+
Object.defineProperty(exports, key, {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: definition[key],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
})();
|
|
98
|
+
(() => {
|
|
99
|
+
__nccwpck_require__.o = (obj, prop) =>
|
|
100
|
+
Object.prototype.hasOwnProperty.call(obj, prop);
|
|
101
|
+
})();
|
|
102
|
+
if (typeof __nccwpck_require__ !== "undefined")
|
|
103
|
+
__nccwpck_require__.ab =
|
|
104
|
+
new URL(".", import.meta.url).pathname.slice(
|
|
105
|
+
import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0,
|
|
106
|
+
-1,
|
|
107
|
+
) + "/";
|
|
108
|
+
var __webpack_exports__ = {};
|
|
109
|
+
__nccwpck_require__.d(__webpack_exports__, {
|
|
110
|
+
il: () => checkWebpackVersion,
|
|
111
|
+
Tu: () => loadCustomWebpackConfig,
|
|
112
|
+
SV: () => mergeConfigs,
|
|
113
|
+
T1: () => toImportFn,
|
|
114
|
+
i8: () => toImportFnPart,
|
|
115
|
+
sg: () => toRequireContext,
|
|
116
|
+
HO: () => toRequireContextString,
|
|
117
|
+
hO: () => webpackIncludeRegexp,
|
|
118
|
+
});
|
|
119
|
+
const external_node_url_namespaceObject = __WEBPACK_EXTERNAL_createRequire(
|
|
120
|
+
import.meta.url,
|
|
121
|
+
)("node:url");
|
|
122
|
+
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(
|
|
123
|
+
import.meta.url,
|
|
124
|
+
)("node:path");
|
|
125
|
+
const external_node_module_namespaceObject = __WEBPACK_EXTERNAL_createRequire(
|
|
126
|
+
import.meta.url,
|
|
127
|
+
)("node:module");
|
|
128
|
+
var x = (y) => {
|
|
129
|
+
var x = {};
|
|
130
|
+
__nccwpck_require__.d(x, y);
|
|
131
|
+
return x;
|
|
132
|
+
};
|
|
133
|
+
var y = (x) => () => x;
|
|
134
|
+
const common_namespaceObject = x({
|
|
135
|
+
["globToRegexp"]: () =>
|
|
136
|
+
__WEBPACK_EXTERNAL_MODULE_storybook_internal_common_7991bda6__.globToRegexp,
|
|
137
|
+
["serverRequire"]: () =>
|
|
138
|
+
__WEBPACK_EXTERNAL_MODULE_storybook_internal_common_7991bda6__.serverRequire,
|
|
139
|
+
});
|
|
140
|
+
var node_logger_x = (y) => {
|
|
141
|
+
var x = {};
|
|
142
|
+
__nccwpck_require__.d(x, y);
|
|
143
|
+
return x;
|
|
144
|
+
};
|
|
145
|
+
var node_logger_y = (x) => () => x;
|
|
146
|
+
const node_logger_namespaceObject = node_logger_x({
|
|
147
|
+
["logger"]: () =>
|
|
148
|
+
__WEBPACK_EXTERNAL_MODULE_storybook_internal_node_logger_87de4309__.logger,
|
|
149
|
+
});
|
|
150
|
+
var dist = __nccwpck_require__(980);
|
|
151
|
+
var dist_filename = external_node_url_namespaceObject.fileURLToPath(
|
|
152
|
+
import.meta.url,
|
|
153
|
+
);
|
|
154
|
+
var dist_dirname = external_node_path_namespaceObject.dirname(dist_filename);
|
|
155
|
+
var dist_require = external_node_module_namespaceObject.createRequire(
|
|
156
|
+
import.meta.url,
|
|
157
|
+
);
|
|
158
|
+
var __defProp = Object.defineProperty;
|
|
159
|
+
var __name = (target, value) =>
|
|
160
|
+
__defProp(target, "name", { value, configurable: true });
|
|
161
|
+
var webpackConfigs = ["webpack.config", "webpackfile"];
|
|
162
|
+
var loadCustomWebpackConfig = __name(
|
|
163
|
+
async (configDir) =>
|
|
164
|
+
(0, common_namespaceObject.serverRequire)(
|
|
165
|
+
webpackConfigs.map((configName) =>
|
|
166
|
+
(0, external_node_path_namespaceObject.resolve)(configDir, configName),
|
|
167
|
+
),
|
|
168
|
+
),
|
|
169
|
+
"loadCustomWebpackConfig",
|
|
170
|
+
);
|
|
171
|
+
var checkWebpackVersion = __name((webpack, specifier, caption) => {
|
|
172
|
+
if (!webpack.version) {
|
|
173
|
+
node_logger_namespaceObject.logger.info(
|
|
174
|
+
"Skipping webpack version check, no version available",
|
|
175
|
+
);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (webpack.version !== specifier) {
|
|
179
|
+
node_logger_namespaceObject.logger.warn((0, dist.TW)`
|
|
59
180
|
Unexpected webpack version in ${caption}:
|
|
60
181
|
- Received '${webpack.version}'
|
|
61
182
|
- Expected '${specifier}'
|
|
@@ -64,109 +185,108 @@
|
|
|
64
185
|
|
|
65
186
|
For more info about Webpack 5 support: https://gist.github.com/shilman/8856ea1786dcd247139b47b270912324#troubleshooting
|
|
66
187
|
`);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return import_ts_dedent2.dedent`
|
|
188
|
+
}
|
|
189
|
+
}, "checkWebpackVersion");
|
|
190
|
+
function mergePluginsField(defaultPlugins = [], customPlugins = []) {
|
|
191
|
+
return [...defaultPlugins, ...customPlugins];
|
|
192
|
+
}
|
|
193
|
+
__name(mergePluginsField, "mergePluginsField");
|
|
194
|
+
function mergeRulesField(defaultRules = [], customRules = []) {
|
|
195
|
+
return [...defaultRules, ...customRules];
|
|
196
|
+
}
|
|
197
|
+
__name(mergeRulesField, "mergeRulesField");
|
|
198
|
+
function mergeExtensionsField(
|
|
199
|
+
{ extensions: defaultExtensions = [] },
|
|
200
|
+
{ extensions: customExtensions = [] },
|
|
201
|
+
) {
|
|
202
|
+
return [...defaultExtensions, ...customExtensions];
|
|
203
|
+
}
|
|
204
|
+
__name(mergeExtensionsField, "mergeExtensionsField");
|
|
205
|
+
function mergeAliasField(
|
|
206
|
+
{ alias: defaultAlias = {} },
|
|
207
|
+
{ alias: customAlias = {} },
|
|
208
|
+
) {
|
|
209
|
+
return { ...defaultAlias, ...customAlias };
|
|
210
|
+
}
|
|
211
|
+
__name(mergeAliasField, "mergeAliasField");
|
|
212
|
+
function mergeModuleField(a, b) {
|
|
213
|
+
return { ...a, ...b, rules: mergeRulesField(a.rules || [], b.rules || []) };
|
|
214
|
+
}
|
|
215
|
+
__name(mergeModuleField, "mergeModuleField");
|
|
216
|
+
function mergeResolveField(
|
|
217
|
+
{ resolve: defaultResolve = {} },
|
|
218
|
+
{ resolve: customResolve = {} },
|
|
219
|
+
) {
|
|
220
|
+
return {
|
|
221
|
+
...defaultResolve,
|
|
222
|
+
...customResolve,
|
|
223
|
+
alias: mergeAliasField(defaultResolve, customResolve),
|
|
224
|
+
extensions: mergeExtensionsField(defaultResolve, customResolve),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
__name(mergeResolveField, "mergeResolveField");
|
|
228
|
+
function mergeOptimizationField(
|
|
229
|
+
{ optimization: defaultOptimization = {} },
|
|
230
|
+
{ optimization: customOptimization = {} },
|
|
231
|
+
) {
|
|
232
|
+
return { ...defaultOptimization, ...customOptimization };
|
|
233
|
+
}
|
|
234
|
+
__name(mergeOptimizationField, "mergeOptimizationField");
|
|
235
|
+
function mergeConfigs(config, customConfig) {
|
|
236
|
+
return {
|
|
237
|
+
...customConfig,
|
|
238
|
+
...config,
|
|
239
|
+
devtool: customConfig.devtool || config.devtool,
|
|
240
|
+
plugins: mergePluginsField(config.plugins, customConfig.plugins),
|
|
241
|
+
module: mergeModuleField(config.module || {}, customConfig.module || {}),
|
|
242
|
+
resolve: mergeResolveField(config, customConfig),
|
|
243
|
+
optimization: mergeOptimizationField(config, customConfig),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
__name(mergeConfigs, "mergeConfigs");
|
|
247
|
+
function importPipeline() {
|
|
248
|
+
let importGate = Promise.resolve();
|
|
249
|
+
return async (importFn) => {
|
|
250
|
+
await importGate;
|
|
251
|
+
const moduleExportsPromise = importFn();
|
|
252
|
+
importGate = importGate.then(async () => {
|
|
253
|
+
await moduleExportsPromise;
|
|
254
|
+
});
|
|
255
|
+
return moduleExportsPromise;
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
__name(importPipeline, "importPipeline");
|
|
259
|
+
function adjustRegexToExcludeNodeModules(originalRegex) {
|
|
260
|
+
const originalRegexString = originalRegex.source;
|
|
261
|
+
const startsWithCaret = originalRegexString.startsWith("^");
|
|
262
|
+
const excludeNodeModulesPattern = startsWithCaret
|
|
263
|
+
? "(?!.*node_modules)"
|
|
264
|
+
: "^(?!.*node_modules)";
|
|
265
|
+
const adjustedRegexString = startsWithCaret
|
|
266
|
+
? `^${excludeNodeModulesPattern}${originalRegexString.substring(1)}`
|
|
267
|
+
: excludeNodeModulesPattern + originalRegexString;
|
|
268
|
+
return new RegExp(adjustedRegexString);
|
|
269
|
+
}
|
|
270
|
+
__name(adjustRegexToExcludeNodeModules, "adjustRegexToExcludeNodeModules");
|
|
271
|
+
function webpackIncludeRegexp(specifier) {
|
|
272
|
+
const { directory, files } = specifier;
|
|
273
|
+
const directoryWithoutLeadingDots = directory.replace(/^(\.+\/)+/, "/");
|
|
274
|
+
const webpackIncludeGlob = [".", ".."].includes(directory)
|
|
275
|
+
? files
|
|
276
|
+
: `${directoryWithoutLeadingDots}/${files}`;
|
|
277
|
+
const webpackIncludeRegexpWithCaret = webpackIncludeGlob.includes(
|
|
278
|
+
"node_modules",
|
|
279
|
+
)
|
|
280
|
+
? (0, common_namespaceObject.globToRegexp)(webpackIncludeGlob)
|
|
281
|
+
: adjustRegexToExcludeNodeModules(
|
|
282
|
+
(0, common_namespaceObject.globToRegexp)(webpackIncludeGlob),
|
|
283
|
+
);
|
|
284
|
+
return new RegExp(webpackIncludeRegexpWithCaret.source.replace(/^\^/, ""));
|
|
285
|
+
}
|
|
286
|
+
__name(webpackIncludeRegexp, "webpackIncludeRegexp");
|
|
287
|
+
function toImportFnPart(specifier) {
|
|
288
|
+
const { directory, importPathMatcher } = specifier;
|
|
289
|
+
return (0, dist.TW)`
|
|
170
290
|
async (path) => {
|
|
171
291
|
if (!${importPathMatcher}.exec(path)) {
|
|
172
292
|
return;
|
|
@@ -181,17 +301,18 @@
|
|
|
181
301
|
}
|
|
182
302
|
|
|
183
303
|
`;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
304
|
+
}
|
|
305
|
+
__name(toImportFnPart, "toImportFnPart");
|
|
306
|
+
function toImportFn(stories, { needPipelinedImport } = {}) {
|
|
307
|
+
let pipelinedImport = `const pipeline = (x) => x();`;
|
|
308
|
+
if (needPipelinedImport) {
|
|
309
|
+
pipelinedImport = `\n const importPipeline = ${importPipeline};\n const pipeline = importPipeline();\n `;
|
|
310
|
+
}
|
|
311
|
+
return (0, dist.TW)`
|
|
191
312
|
${pipelinedImport}
|
|
192
313
|
|
|
193
314
|
const importers = [
|
|
194
|
-
${stories.map(toImportFnPart).join(
|
|
315
|
+
${stories.map(toImportFnPart).join(",\n")}
|
|
195
316
|
];
|
|
196
317
|
|
|
197
318
|
export async function importFn(path) {
|
|
@@ -202,117 +323,38 @@
|
|
|
202
323
|
}
|
|
203
324
|
}
|
|
204
325
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
match,
|
|
216
|
-
};
|
|
217
|
-
},
|
|
218
|
-
toRequireContextString = (specifier) => {
|
|
219
|
-
let { path: p, recursive: r, match: m } = toRequireContext(specifier);
|
|
220
|
-
return `require.context('${p}', ${r}, ${m})`;
|
|
221
|
-
};
|
|
222
|
-
0 && 0;
|
|
223
|
-
},
|
|
224
|
-
980: (__unused_webpack_module, exports) => {
|
|
225
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
226
|
-
exports.dedent = void 0;
|
|
227
|
-
function dedent(templ) {
|
|
228
|
-
var values = [];
|
|
229
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
230
|
-
values[_i - 1] = arguments[_i];
|
|
231
|
-
}
|
|
232
|
-
var strings = Array.from(typeof templ === "string" ? [templ] : templ);
|
|
233
|
-
strings[strings.length - 1] = strings[strings.length - 1].replace(
|
|
234
|
-
/\r?\n([\t ]*)$/,
|
|
235
|
-
"",
|
|
236
|
-
);
|
|
237
|
-
var indentLengths = strings.reduce(function (arr, str) {
|
|
238
|
-
var matches = str.match(/\n([\t ]+|(?!\s).)/g);
|
|
239
|
-
if (matches) {
|
|
240
|
-
return arr.concat(
|
|
241
|
-
matches.map(function (match) {
|
|
242
|
-
var _a, _b;
|
|
243
|
-
return (_b =
|
|
244
|
-
(_a = match.match(/[\t ]/g)) === null || _a === void 0
|
|
245
|
-
? void 0
|
|
246
|
-
: _a.length) !== null && _b !== void 0
|
|
247
|
-
? _b
|
|
248
|
-
: 0;
|
|
249
|
-
}),
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
return arr;
|
|
253
|
-
}, []);
|
|
254
|
-
if (indentLengths.length) {
|
|
255
|
-
var pattern_1 = new RegExp(
|
|
256
|
-
"\n[\t ]{" + Math.min.apply(Math, indentLengths) + "}",
|
|
257
|
-
"g",
|
|
258
|
-
);
|
|
259
|
-
strings = strings.map(function (str) {
|
|
260
|
-
return str.replace(pattern_1, "\n");
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
strings[0] = strings[0].replace(/^\r?\n/, "");
|
|
264
|
-
var string = strings[0];
|
|
265
|
-
values.forEach(function (value, i) {
|
|
266
|
-
var endentations = string.match(/(?:^|\n)( *)$/);
|
|
267
|
-
var endentation = endentations ? endentations[1] : "";
|
|
268
|
-
var indentedValue = value;
|
|
269
|
-
if (typeof value === "string" && value.includes("\n")) {
|
|
270
|
-
indentedValue = String(value)
|
|
271
|
-
.split("\n")
|
|
272
|
-
.map(function (str, i) {
|
|
273
|
-
return i === 0 ? str : "" + endentation + str;
|
|
274
|
-
})
|
|
275
|
-
.join("\n");
|
|
276
|
-
}
|
|
277
|
-
string += indentedValue + strings[i + 1];
|
|
278
|
-
});
|
|
279
|
-
return string;
|
|
280
|
-
}
|
|
281
|
-
exports.dedent = dedent;
|
|
282
|
-
exports["default"] = dedent;
|
|
283
|
-
},
|
|
284
|
-
928: (module) => {
|
|
285
|
-
module.exports = require("path");
|
|
286
|
-
},
|
|
287
|
-
253: (module) => {
|
|
288
|
-
module.exports = require("storybook/internal/common");
|
|
289
|
-
},
|
|
290
|
-
519: (module) => {
|
|
291
|
-
module.exports = require("storybook/internal/node-logger");
|
|
292
|
-
},
|
|
326
|
+
`;
|
|
327
|
+
}
|
|
328
|
+
__name(toImportFn, "toImportFn");
|
|
329
|
+
var toRequireContext = __name((specifier) => {
|
|
330
|
+
const { directory, files } = specifier;
|
|
331
|
+
const match = (0, common_namespaceObject.globToRegexp)(`./${files}`);
|
|
332
|
+
return {
|
|
333
|
+
path: directory,
|
|
334
|
+
recursive: files.includes("**") || files.split("/").length > 1,
|
|
335
|
+
match,
|
|
293
336
|
};
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
})();
|
|
337
|
+
}, "toRequireContext");
|
|
338
|
+
var toRequireContextString = __name((specifier) => {
|
|
339
|
+
const { path: p, recursive: r, match: m } = toRequireContext(specifier);
|
|
340
|
+
const result = `require.context('${p}', ${r}, ${m})`;
|
|
341
|
+
return result;
|
|
342
|
+
}, "toRequireContextString");
|
|
343
|
+
var __webpack_exports__checkWebpackVersion = __webpack_exports__.il;
|
|
344
|
+
var __webpack_exports__loadCustomWebpackConfig = __webpack_exports__.Tu;
|
|
345
|
+
var __webpack_exports__mergeConfigs = __webpack_exports__.SV;
|
|
346
|
+
var __webpack_exports__toImportFn = __webpack_exports__.T1;
|
|
347
|
+
var __webpack_exports__toImportFnPart = __webpack_exports__.i8;
|
|
348
|
+
var __webpack_exports__toRequireContext = __webpack_exports__.sg;
|
|
349
|
+
var __webpack_exports__toRequireContextString = __webpack_exports__.HO;
|
|
350
|
+
var __webpack_exports__webpackIncludeRegexp = __webpack_exports__.hO;
|
|
351
|
+
export {
|
|
352
|
+
__webpack_exports__checkWebpackVersion as checkWebpackVersion,
|
|
353
|
+
__webpack_exports__loadCustomWebpackConfig as loadCustomWebpackConfig,
|
|
354
|
+
__webpack_exports__mergeConfigs as mergeConfigs,
|
|
355
|
+
__webpack_exports__toImportFn as toImportFn,
|
|
356
|
+
__webpack_exports__toImportFnPart as toImportFnPart,
|
|
357
|
+
__webpack_exports__toRequireContext as toRequireContext,
|
|
358
|
+
__webpack_exports__toRequireContextString as toRequireContextString,
|
|
359
|
+
__webpack_exports__webpackIncludeRegexp as webpackIncludeRegexp,
|
|
360
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@storybook/core-webpack","version":"
|
|
1
|
+
{"name":"@storybook/core-webpack","version":"10.0.7","funding":{"type":"opencollective","url":"https://opencollective.com/storybook"},"license":"MIT","types":"index.d.ts","type":"module"}
|