storybook 10.1.0-alpha.1 → 10.1.0-alpha.11
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/_browser-chunks/Color-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/chunk-L4RMQ7D7.js +223 -0
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
- package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-WKBQ5RC7.js} +707 -1851
- package/dist/_node-chunks/{builder-manager-6UBDPV7P.js → builder-manager-PMPHOSM2.js} +495 -1013
- package/dist/_node-chunks/camelcase-K3IOOFQW.js +18 -0
- package/dist/_node-chunks/{chunk-QNUGJO6L.js → chunk-32NE3UE3.js} +15 -24
- package/dist/_node-chunks/chunk-4GZCFQFG.js +58 -0
- package/dist/_node-chunks/chunk-5QK5MSOI.js +943 -0
- package/dist/_node-chunks/{chunk-3FPF5Y2F.js → chunk-6ZOLETQK.js} +8 -10
- package/dist/_node-chunks/chunk-7I22Y76Z.js +1047 -0
- package/dist/_node-chunks/chunk-AKTRSR3O.js +72 -0
- package/dist/_node-chunks/chunk-BBOP3XCK.js +119 -0
- package/dist/_node-chunks/chunk-C2GQVDWI.js +34 -0
- package/dist/_node-chunks/{chunk-SCTKVDWR.js → chunk-GG2WQZSG.js} +4619 -7350
- package/dist/_node-chunks/chunk-GQJOWVVR.js +3214 -0
- package/dist/_node-chunks/chunk-JCRM2YVK.js +3009 -0
- package/dist/_node-chunks/chunk-KK4AT5F3.js +1029 -0
- package/dist/_node-chunks/chunk-L7MYXJUM.js +1114 -0
- package/dist/_node-chunks/{chunk-LAU7VVPC.js → chunk-LCZO45L7.js} +469 -983
- package/dist/_node-chunks/chunk-LR3QITDI.js +209 -0
- package/dist/_node-chunks/chunk-LXG4DK35.js +3171 -0
- package/dist/_node-chunks/chunk-MJ3WOS6F.js +37 -0
- package/dist/_node-chunks/chunk-PHOZWZZO.js +61 -0
- package/dist/_node-chunks/chunk-QECOQWRJ.js +936 -0
- package/dist/_node-chunks/chunk-QH4V5YDB.js +20 -0
- package/dist/_node-chunks/chunk-R6HWGZWD.js +26 -0
- package/dist/_node-chunks/chunk-SPQXMU2Q.js +759 -0
- package/dist/_node-chunks/chunk-TXZY6V6O.js +1564 -0
- package/dist/_node-chunks/chunk-UGDPX5LE.js +756 -0
- package/dist/_node-chunks/chunk-UY26MQLT.js +603 -0
- package/dist/_node-chunks/chunk-WK3EMYK6.js +61 -0
- package/dist/_node-chunks/{chunk-CJHAP7SE.js → chunk-WLHMN7AP.js} +292 -688
- package/dist/_node-chunks/chunk-XGVLB4UJ.js +54 -0
- package/dist/_node-chunks/{chunk-J7N7PD5Q.js → chunk-YHRFI6BE.js} +87 -227
- package/dist/_node-chunks/chunk-YK4KVMFW.js +18 -0
- package/dist/_node-chunks/chunk-ZZALGOA6.js +4523 -0
- package/dist/_node-chunks/chunk-ZZPBSYA5.js +301 -0
- package/dist/_node-chunks/chunk-ZZSRFAC6.js +45571 -0
- package/dist/_node-chunks/dist-4DWOCZUD.js +121 -0
- package/dist/_node-chunks/globby-AAARUKEU.js +3452 -0
- package/dist/_node-chunks/lib-HEUKGL62.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-DCVRPS6N.js +14329 -0
- package/dist/_node-chunks/p-limit-F5ZKJ6WZ.js +116 -0
- package/dist/_node-chunks/plugin-7YY7JXCH.js +123 -0
- package/dist/_node-chunks/{plugin-HJLCLGNT.js → plugin-SZP3CW6W.js} +36 -56
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-TGKNDPO6.js +46623 -0
- package/dist/_node-chunks/webpack-mock-plugin-LNTZZFBE.js +92 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +592 -1546
- package/dist/bin/dispatcher.js +26 -37
- package/dist/bin/loader.js +23 -34
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.js +1966 -5347
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.d.ts +210 -3
- package/dist/common/index.js +28 -20
- package/dist/components/index.d.ts +472 -280
- package/dist/components/index.js +15992 -75
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.js +3837 -7191
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +2511 -5219
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +434 -924
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
- package/dist/csf/index.js +534 -1172
- package/dist/csf-tools/index.d.ts +15 -4
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +47968 -56484
- package/dist/manager/globals.js +2 -3
- package/dist/manager/runtime.js +4901 -10318
- package/dist/manager-api/index.d.ts +11 -3
- package/dist/manager-api/index.js +1250 -2397
- package/dist/manager-errors.d.ts +3 -0
- package/dist/manager-errors.js +3 -3
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1270 -2593
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10767 -22386
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/preview-api/index.js +15 -15
- package/dist/preview-errors.d.ts +3 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +3 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +6129 -11914
- package/dist/theming/create.d.ts +4 -2
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3397 -2628
- package/dist/theming/index.js +502 -1091
- package/dist/types/index.d.ts +50 -5
- package/dist/types/index.js +2 -11
- package/dist/viewport/index.js +3 -3
- package/package.json +17 -9
- package/dist/_browser-chunks/Color-7ZNS6F6B.js +0 -1676
- package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-BOOOPFZF.js +0 -2335
- package/dist/_browser-chunks/chunk-C4XOKMDU.js +0 -270
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-I74EUU5O.js +0 -5809
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RNE2IUTB.js +0 -1300
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-W4QKLQSC.js +0 -4182
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-WKJOVNPM.js +0 -18
- package/dist/_node-chunks/chunk-2RIKHYCS.js +0 -304
- package/dist/_node-chunks/chunk-3JCSHYSU.js +0 -1657
- package/dist/_node-chunks/chunk-4GE6Q4MX.js +0 -1531
- package/dist/_node-chunks/chunk-5SEHHENC.js +0 -64656
- package/dist/_node-chunks/chunk-6GD23U64.js +0 -420
- package/dist/_node-chunks/chunk-6OAXYS5T.js +0 -1544
- package/dist/_node-chunks/chunk-7TNUMFKR.js +0 -4741
- package/dist/_node-chunks/chunk-BCDHUXAJ.js +0 -4272
- package/dist/_node-chunks/chunk-BYVQZ2HU.js +0 -220
- package/dist/_node-chunks/chunk-DAMVKHAC.js +0 -101
- package/dist/_node-chunks/chunk-FEOC7OX2.js +0 -1586
- package/dist/_node-chunks/chunk-FY7XZPLY.js +0 -2248
- package/dist/_node-chunks/chunk-GD2FXWDF.js +0 -697
- package/dist/_node-chunks/chunk-HM6B7FE5.js +0 -18
- package/dist/_node-chunks/chunk-HORWITP7.js +0 -90
- package/dist/_node-chunks/chunk-II4AFH3V.js +0 -28
- package/dist/_node-chunks/chunk-MF2PUEWG.js +0 -5029
- package/dist/_node-chunks/chunk-RVE4UTVQ.js +0 -1518
- package/dist/_node-chunks/chunk-TUFWZUTO.js +0 -69
- package/dist/_node-chunks/chunk-TXHNWNH4.js +0 -79
- package/dist/_node-chunks/chunk-ULWNTI6M.js +0 -1198
- package/dist/_node-chunks/chunk-VYRFXLRO.js +0 -6712
- package/dist/_node-chunks/chunk-WNOSTIYP.js +0 -34
- package/dist/_node-chunks/chunk-X67VGZN4.js +0 -1250
- package/dist/_node-chunks/chunk-XCEBYOA4.js +0 -61
- package/dist/_node-chunks/chunk-XW7YMR7I.js +0 -111
- package/dist/_node-chunks/chunk-ZRFYQ46H.js +0 -61
- package/dist/_node-chunks/dist-APCKHSY3.js +0 -175
- package/dist/_node-chunks/globby-TSGXGDA2.js +0 -5222
- package/dist/_node-chunks/lib-DZ5TVIU5.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-Z6BYQCPN.js +0 -22017
- package/dist/_node-chunks/p-limit-MLJNGG2K.js +0 -168
- package/dist/_node-chunks/plugin-J3JI3ZKJ.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-3QHNTM5B.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-4Y3MWPJ6.js +0 -124
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_843v2rliy1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_843v2rliy1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_843v2rliy1 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_843v2rliy1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_843v2rliy1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_843v2rliy1.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
var __create = Object.create;
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {
|
|
18
|
+
get: (a, b) => (typeof require < "u" ? require : a)[b]
|
|
19
|
+
}) : x)(function(x) {
|
|
20
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
21
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
+
});
|
|
23
|
+
var __esm = (fn, res) => function() {
|
|
24
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
25
|
+
};
|
|
26
|
+
var __commonJS = (cb, mod) => function() {
|
|
27
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
28
|
+
};
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
32
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
33
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
34
|
+
for (let key of __getOwnPropNames(from))
|
|
35
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
36
|
+
return to;
|
|
37
|
+
};
|
|
38
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
39
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
40
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
41
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
42
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
43
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
44
|
+
mod
|
|
45
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
__require,
|
|
49
|
+
__esm,
|
|
50
|
+
__commonJS,
|
|
51
|
+
__export,
|
|
52
|
+
__toESM,
|
|
53
|
+
__toCommonJS
|
|
54
|
+
};
|
|
@@ -1,51 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_843v2rliy1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_843v2rliy1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_843v2rliy1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_843v2rliy1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_843v2rliy1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_843v2rliy1.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_dist
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PHOZWZZO.js";
|
|
15
15
|
import {
|
|
16
16
|
require_picocolors
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-32NE3UE3.js";
|
|
18
18
|
import {
|
|
19
|
-
__name,
|
|
20
19
|
__toESM
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XGVLB4UJ.js";
|
|
22
21
|
|
|
23
22
|
// src/server-errors.ts
|
|
24
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
25
|
-
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
23
|
+
var import_picocolors = __toESM(require_picocolors(), 1), import_ts_dedent = __toESM(require_dist(), 1);
|
|
26
24
|
|
|
27
25
|
// src/storybook-error.ts
|
|
28
26
|
function parseErrorCode({
|
|
29
27
|
code,
|
|
30
28
|
category
|
|
31
29
|
}) {
|
|
32
|
-
|
|
30
|
+
let paddedCode = String(code).padStart(4, "0");
|
|
33
31
|
return `SB_${category}_${paddedCode}`;
|
|
34
32
|
}
|
|
35
|
-
__name(parseErrorCode, "parseErrorCode");
|
|
36
33
|
function appendErrorRef(url) {
|
|
37
|
-
if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url))
|
|
34
|
+
if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url))
|
|
38
35
|
return url;
|
|
39
|
-
}
|
|
40
36
|
try {
|
|
41
|
-
|
|
42
|
-
urlObj.searchParams.set("ref", "error");
|
|
43
|
-
return urlObj.toString();
|
|
37
|
+
let urlObj = new URL(url);
|
|
38
|
+
return urlObj.searchParams.set("ref", "error"), urlObj.toString();
|
|
44
39
|
} catch {
|
|
45
40
|
return url;
|
|
46
41
|
}
|
|
47
42
|
}
|
|
48
|
-
__name(appendErrorRef, "appendErrorRef");
|
|
49
43
|
var StorybookError = class _StorybookError extends Error {
|
|
50
44
|
constructor(props) {
|
|
51
45
|
super(_StorybookError.getFullMessage(props));
|
|
@@ -55,22 +49,20 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
55
49
|
*/
|
|
56
50
|
this.data = {};
|
|
57
51
|
/** Flag used to easily determine if the error originates from Storybook. */
|
|
58
|
-
this.fromStorybook =
|
|
59
|
-
this.category = props.category;
|
|
60
|
-
this.documentation = props.documentation ?? false;
|
|
61
|
-
this.code = props.code;
|
|
62
|
-
}
|
|
63
|
-
static {
|
|
64
|
-
__name(this, "StorybookError");
|
|
52
|
+
this.fromStorybook = !0;
|
|
53
|
+
this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.name = props.name;
|
|
65
54
|
}
|
|
66
55
|
get fullErrorCode() {
|
|
67
56
|
return parseErrorCode({ code: this.code, category: this.category });
|
|
68
57
|
}
|
|
69
58
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
70
59
|
get name() {
|
|
71
|
-
|
|
60
|
+
let errorName = this._name || this.constructor.name;
|
|
72
61
|
return `${this.fullErrorCode} (${errorName})`;
|
|
73
62
|
}
|
|
63
|
+
set name(name) {
|
|
64
|
+
this._name = name;
|
|
65
|
+
}
|
|
74
66
|
/** Generates the error message along with additional documentation link (if applicable). */
|
|
75
67
|
static getFullMessage({
|
|
76
68
|
documentation,
|
|
@@ -79,15 +71,9 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
79
71
|
message
|
|
80
72
|
}) {
|
|
81
73
|
let page;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
page = appendErrorRef(documentation);
|
|
86
|
-
} else if (Array.isArray(documentation)) {
|
|
87
|
-
page = `
|
|
88
|
-
${documentation.map((doc) => ` - ${appendErrorRef(doc)}`).join("\n")}`;
|
|
89
|
-
}
|
|
90
|
-
return `${message}${page != null ? `
|
|
74
|
+
return documentation === !0 ? page = `https://storybook.js.org/error/${parseErrorCode({ code, category })}?ref=error` : typeof documentation == "string" ? page = appendErrorRef(documentation) : Array.isArray(documentation) && (page = `
|
|
75
|
+
${documentation.map((doc) => ` - ${appendErrorRef(doc)}`).join(`
|
|
76
|
+
`)}`), `${message}${page != null ? `
|
|
91
77
|
|
|
92
78
|
More info: ${page}
|
|
93
79
|
` : ""}`;
|
|
@@ -95,52 +81,10 @@ More info: ${page}
|
|
|
95
81
|
};
|
|
96
82
|
|
|
97
83
|
// src/server-errors.ts
|
|
98
|
-
var Category = /* @__PURE__ */ ((Category2) => {
|
|
99
|
-
Category2["CLI"] = "CLI";
|
|
100
|
-
Category2["CLI_INIT"] = "CLI_INIT";
|
|
101
|
-
Category2["CLI_AUTOMIGRATE"] = "CLI_AUTOMIGRATE";
|
|
102
|
-
Category2["CLI_UPGRADE"] = "CLI_UPGRADE";
|
|
103
|
-
Category2["CLI_ADD"] = "CLI_ADD";
|
|
104
|
-
Category2["CODEMOD"] = "CODEMOD";
|
|
105
|
-
Category2["CORE_SERVER"] = "CORE-SERVER";
|
|
106
|
-
Category2["CSF_PLUGIN"] = "CSF-PLUGIN";
|
|
107
|
-
Category2["CSF_TOOLS"] = "CSF-TOOLS";
|
|
108
|
-
Category2["CORE_COMMON"] = "CORE-COMMON";
|
|
109
|
-
Category2["NODE_LOGGER"] = "NODE-LOGGER";
|
|
110
|
-
Category2["TELEMETRY"] = "TELEMETRY";
|
|
111
|
-
Category2["BUILDER_MANAGER"] = "BUILDER-MANAGER";
|
|
112
|
-
Category2["BUILDER_VITE"] = "BUILDER-VITE";
|
|
113
|
-
Category2["BUILDER_WEBPACK5"] = "BUILDER-WEBPACK5";
|
|
114
|
-
Category2["SOURCE_LOADER"] = "SOURCE-LOADER";
|
|
115
|
-
Category2["POSTINSTALL"] = "POSTINSTALL";
|
|
116
|
-
Category2["DOCS_TOOLS"] = "DOCS-TOOLS";
|
|
117
|
-
Category2["CORE_WEBPACK"] = "CORE-WEBPACK";
|
|
118
|
-
Category2["FRAMEWORK_ANGULAR"] = "FRAMEWORK_ANGULAR";
|
|
119
|
-
Category2["FRAMEWORK_EMBER"] = "FRAMEWORK_EMBER";
|
|
120
|
-
Category2["FRAMEWORK_HTML_VITE"] = "FRAMEWORK_HTML-VITE";
|
|
121
|
-
Category2["FRAMEWORK_HTML_WEBPACK5"] = "FRAMEWORK_HTML-WEBPACK5";
|
|
122
|
-
Category2["FRAMEWORK_NEXTJS"] = "FRAMEWORK_NEXTJS";
|
|
123
|
-
Category2["FRAMEWORK_PREACT_VITE"] = "FRAMEWORK_PREACT-VITE";
|
|
124
|
-
Category2["FRAMEWORK_PREACT_WEBPACK5"] = "FRAMEWORK_PREACT-WEBPACK5";
|
|
125
|
-
Category2["FRAMEWORK_REACT_VITE"] = "FRAMEWORK_REACT-VITE";
|
|
126
|
-
Category2["FRAMEWORK_REACT_WEBPACK5"] = "FRAMEWORK_REACT-WEBPACK5";
|
|
127
|
-
Category2["FRAMEWORK_SERVER_WEBPACK5"] = "FRAMEWORK_SERVER-WEBPACK5";
|
|
128
|
-
Category2["FRAMEWORK_SVELTE_VITE"] = "FRAMEWORK_SVELTE-VITE";
|
|
129
|
-
Category2["FRAMEWORK_SVELTEKIT"] = "FRAMEWORK_SVELTEKIT";
|
|
130
|
-
Category2["FRAMEWORK_VUE_VITE"] = "FRAMEWORK_VUE-VITE";
|
|
131
|
-
Category2["FRAMEWORK_VUE_WEBPACK5"] = "FRAMEWORK_VUE-WEBPACK5";
|
|
132
|
-
Category2["FRAMEWORK_VUE3_VITE"] = "FRAMEWORK_VUE3-VITE";
|
|
133
|
-
Category2["FRAMEWORK_VUE3_WEBPACK5"] = "FRAMEWORK_VUE3-WEBPACK5";
|
|
134
|
-
Category2["FRAMEWORK_WEB_COMPONENTS_VITE"] = "FRAMEWORK_WEB-COMPONENTS-VITE";
|
|
135
|
-
Category2["FRAMEWORK_WEB_COMPONENTS_WEBPACK5"] = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5";
|
|
136
|
-
return Category2;
|
|
137
|
-
})(Category || {});
|
|
138
|
-
var NxProjectDetectedError = class extends StorybookError {
|
|
139
|
-
static {
|
|
140
|
-
__name(this, "NxProjectDetectedError");
|
|
141
|
-
}
|
|
84
|
+
var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2.CLI_INIT = "CLI_INIT", Category2.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", Category2.CLI_UPGRADE = "CLI_UPGRADE", Category2.CLI_ADD = "CLI_ADD", Category2.CODEMOD = "CODEMOD", Category2.CORE_SERVER = "CORE-SERVER", Category2.CSF_PLUGIN = "CSF-PLUGIN", Category2.CSF_TOOLS = "CSF-TOOLS", Category2.CORE_COMMON = "CORE-COMMON", Category2.NODE_LOGGER = "NODE-LOGGER", Category2.TELEMETRY = "TELEMETRY", Category2.BUILDER_MANAGER = "BUILDER-MANAGER", Category2.BUILDER_VITE = "BUILDER-VITE", Category2.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", Category2.SOURCE_LOADER = "SOURCE-LOADER", Category2.POSTINSTALL = "POSTINSTALL", Category2.DOCS_TOOLS = "DOCS-TOOLS", Category2.CORE_WEBPACK = "CORE-WEBPACK", Category2.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", Category2.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", Category2.FRAMEWORK_HTML_VITE = "FRAMEWORK_HTML-VITE", Category2.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", Category2.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", Category2.FRAMEWORK_PREACT_VITE = "FRAMEWORK_PREACT-VITE", Category2.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", Category2.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", Category2.FRAMEWORK_REACT_WEBPACK5 = "FRAMEWORK_REACT-WEBPACK5", Category2.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", Category2.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", Category2.FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", Category2.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", Category2.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5", Category2.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", Category2.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", Category2.FRAMEWORK_WEB_COMPONENTS_VITE = "FRAMEWORK_WEB-COMPONENTS-VITE", Category2.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", Category2))(Category || {}), NxProjectDetectedError = class extends StorybookError {
|
|
142
85
|
constructor() {
|
|
143
86
|
super({
|
|
87
|
+
name: "NxProjectDetectedError",
|
|
144
88
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
145
89
|
code: 1,
|
|
146
90
|
documentation: "https://nx.dev/nx-api/storybook#generating-storybook-configuration",
|
|
@@ -149,13 +93,10 @@ var NxProjectDetectedError = class extends StorybookError {
|
|
|
149
93
|
Run "nx g @nx/storybook:configuration <your-project-name>" to add Storybook to a given Nx app or lib.`
|
|
150
94
|
});
|
|
151
95
|
}
|
|
152
|
-
}
|
|
153
|
-
var MissingFrameworkFieldError = class extends StorybookError {
|
|
154
|
-
static {
|
|
155
|
-
__name(this, "MissingFrameworkFieldError");
|
|
156
|
-
}
|
|
96
|
+
}, MissingFrameworkFieldError = class extends StorybookError {
|
|
157
97
|
constructor() {
|
|
158
98
|
super({
|
|
99
|
+
name: "MissingFrameworkFieldError",
|
|
159
100
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
160
101
|
code: 1,
|
|
161
102
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
|
|
@@ -165,10 +106,10 @@ var MissingFrameworkFieldError = class extends StorybookError {
|
|
|
165
106
|
Please run 'npx storybook automigrate' to automatically fix your config.`
|
|
166
107
|
});
|
|
167
108
|
}
|
|
168
|
-
}
|
|
169
|
-
var InvalidFrameworkNameError = class extends StorybookError {
|
|
109
|
+
}, InvalidFrameworkNameError = class extends StorybookError {
|
|
170
110
|
constructor(data) {
|
|
171
111
|
super({
|
|
112
|
+
name: "InvalidFrameworkNameError",
|
|
172
113
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
173
114
|
code: 2,
|
|
174
115
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
|
|
@@ -180,13 +121,10 @@ var InvalidFrameworkNameError = class extends StorybookError {
|
|
|
180
121
|
});
|
|
181
122
|
this.data = data;
|
|
182
123
|
}
|
|
183
|
-
|
|
184
|
-
__name(this, "InvalidFrameworkNameError");
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
var CouldNotEvaluateFrameworkError = class extends StorybookError {
|
|
124
|
+
}, CouldNotEvaluateFrameworkError = class extends StorybookError {
|
|
188
125
|
constructor(data) {
|
|
189
126
|
super({
|
|
127
|
+
name: "CouldNotEvaluateFrameworkError",
|
|
190
128
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
191
129
|
code: 3,
|
|
192
130
|
documentation: "",
|
|
@@ -197,16 +135,10 @@ var CouldNotEvaluateFrameworkError = class extends StorybookError {
|
|
|
197
135
|
});
|
|
198
136
|
this.data = data;
|
|
199
137
|
}
|
|
200
|
-
|
|
201
|
-
__name(this, "CouldNotEvaluateFrameworkError");
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var ConflictingStaticDirConfigError = class extends StorybookError {
|
|
205
|
-
static {
|
|
206
|
-
__name(this, "ConflictingStaticDirConfigError");
|
|
207
|
-
}
|
|
138
|
+
}, ConflictingStaticDirConfigError = class extends StorybookError {
|
|
208
139
|
constructor() {
|
|
209
140
|
super({
|
|
141
|
+
name: "ConflictingStaticDirConfigError",
|
|
210
142
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
211
143
|
code: 1,
|
|
212
144
|
documentation: "https://storybook.js.org/docs/configure/integration/images-and-assets#serving-static-files-via-storybook-configuration",
|
|
@@ -218,13 +150,10 @@ var ConflictingStaticDirConfigError = class extends StorybookError {
|
|
|
218
150
|
Please remove the CLI flag from your storybook script and use only the 'staticDirs' option instead.`
|
|
219
151
|
});
|
|
220
152
|
}
|
|
221
|
-
}
|
|
222
|
-
var InvalidStoriesEntryError = class extends StorybookError {
|
|
223
|
-
static {
|
|
224
|
-
__name(this, "InvalidStoriesEntryError");
|
|
225
|
-
}
|
|
153
|
+
}, InvalidStoriesEntryError = class extends StorybookError {
|
|
226
154
|
constructor() {
|
|
227
155
|
super({
|
|
156
|
+
name: "InvalidStoriesEntryError",
|
|
228
157
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
229
158
|
code: 4,
|
|
230
159
|
documentation: "https://storybook.js.org/docs/faq#can-i-have-a-storybook-with-no-local-stories",
|
|
@@ -235,13 +164,10 @@ var InvalidStoriesEntryError = class extends StorybookError {
|
|
|
235
164
|
Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
|
|
236
165
|
});
|
|
237
166
|
}
|
|
238
|
-
}
|
|
239
|
-
var WebpackMissingStatsError = class extends StorybookError {
|
|
240
|
-
static {
|
|
241
|
-
__name(this, "WebpackMissingStatsError");
|
|
242
|
-
}
|
|
167
|
+
}, WebpackMissingStatsError = class extends StorybookError {
|
|
243
168
|
constructor() {
|
|
244
169
|
super({
|
|
170
|
+
name: "WebpackMissingStatsError",
|
|
245
171
|
category: "BUILDER-WEBPACK5" /* BUILDER_WEBPACK5 */,
|
|
246
172
|
code: 1,
|
|
247
173
|
documentation: [
|
|
@@ -253,35 +179,30 @@ var WebpackMissingStatsError = class extends StorybookError {
|
|
|
253
179
|
Storybook needs Webpack stats (including errors) in order to build correctly.`
|
|
254
180
|
});
|
|
255
181
|
}
|
|
256
|
-
}
|
|
257
|
-
var WebpackInvocationError = class extends StorybookError {
|
|
182
|
+
}, WebpackInvocationError = class extends StorybookError {
|
|
258
183
|
constructor(data) {
|
|
259
184
|
super({
|
|
185
|
+
name: "WebpackInvocationError",
|
|
260
186
|
category: "BUILDER-WEBPACK5" /* BUILDER_WEBPACK5 */,
|
|
261
187
|
code: 2,
|
|
262
188
|
message: data.error.message.trim()
|
|
263
189
|
});
|
|
264
190
|
this.data = data;
|
|
265
191
|
}
|
|
266
|
-
static {
|
|
267
|
-
__name(this, "WebpackInvocationError");
|
|
268
|
-
}
|
|
269
192
|
};
|
|
270
193
|
function removeAnsiEscapeCodes(input = "") {
|
|
271
194
|
return input.replace(/\u001B\[[0-9;]*m/g, "");
|
|
272
195
|
}
|
|
273
|
-
__name(removeAnsiEscapeCodes, "removeAnsiEscapeCodes");
|
|
274
196
|
var WebpackCompilationError = class extends StorybookError {
|
|
275
197
|
constructor(data) {
|
|
276
|
-
data.errors = data.errors.map((err) => {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
};
|
|
283
|
-
});
|
|
198
|
+
data.errors = data.errors.map((err) => ({
|
|
199
|
+
...err,
|
|
200
|
+
message: removeAnsiEscapeCodes(err.message),
|
|
201
|
+
stack: removeAnsiEscapeCodes(err.stack),
|
|
202
|
+
name: err.name
|
|
203
|
+
}));
|
|
284
204
|
super({
|
|
205
|
+
name: "WebpackCompilationError",
|
|
285
206
|
category: "BUILDER-WEBPACK5" /* BUILDER_WEBPACK5 */,
|
|
286
207
|
code: 3,
|
|
287
208
|
// This error message is a followup of errors logged by Webpack to the user
|
|
@@ -292,13 +213,10 @@ var WebpackCompilationError = class extends StorybookError {
|
|
|
292
213
|
});
|
|
293
214
|
this.data = data;
|
|
294
215
|
}
|
|
295
|
-
|
|
296
|
-
__name(this, "WebpackCompilationError");
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
var MissingAngularJsonError = class extends StorybookError {
|
|
216
|
+
}, MissingAngularJsonError = class extends StorybookError {
|
|
300
217
|
constructor(data) {
|
|
301
218
|
super({
|
|
219
|
+
name: "MissingAngularJsonError",
|
|
302
220
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
303
221
|
code: 2,
|
|
304
222
|
documentation: "https://storybook.js.org/docs/faq#error-no-angularjson-file-found?ref=error",
|
|
@@ -308,16 +226,10 @@ var MissingAngularJsonError = class extends StorybookError {
|
|
|
308
226
|
});
|
|
309
227
|
this.data = data;
|
|
310
228
|
}
|
|
311
|
-
|
|
312
|
-
__name(this, "MissingAngularJsonError");
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
var AngularLegacyBuildOptionsError = class extends StorybookError {
|
|
316
|
-
static {
|
|
317
|
-
__name(this, "AngularLegacyBuildOptionsError");
|
|
318
|
-
}
|
|
229
|
+
}, AngularLegacyBuildOptionsError = class extends StorybookError {
|
|
319
230
|
constructor() {
|
|
320
231
|
super({
|
|
232
|
+
name: "AngularLegacyBuildOptionsError",
|
|
321
233
|
category: "FRAMEWORK_ANGULAR" /* FRAMEWORK_ANGULAR */,
|
|
322
234
|
code: 1,
|
|
323
235
|
documentation: [
|
|
@@ -331,10 +243,10 @@ var AngularLegacyBuildOptionsError = class extends StorybookError {
|
|
|
331
243
|
Please run 'npx storybook automigrate' to automatically fix your config.`
|
|
332
244
|
});
|
|
333
245
|
}
|
|
334
|
-
}
|
|
335
|
-
var CriticalPresetLoadError = class extends StorybookError {
|
|
246
|
+
}, CriticalPresetLoadError = class extends StorybookError {
|
|
336
247
|
constructor(data) {
|
|
337
248
|
super({
|
|
249
|
+
name: "CriticalPresetLoadError",
|
|
338
250
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
339
251
|
code: 2,
|
|
340
252
|
documentation: "",
|
|
@@ -349,16 +261,10 @@ var CriticalPresetLoadError = class extends StorybookError {
|
|
|
349
261
|
});
|
|
350
262
|
this.data = data;
|
|
351
263
|
}
|
|
352
|
-
|
|
353
|
-
__name(this, "CriticalPresetLoadError");
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
var MissingBuilderError = class extends StorybookError {
|
|
357
|
-
static {
|
|
358
|
-
__name(this, "MissingBuilderError");
|
|
359
|
-
}
|
|
264
|
+
}, MissingBuilderError = class extends StorybookError {
|
|
360
265
|
constructor() {
|
|
361
266
|
super({
|
|
267
|
+
name: "MissingBuilderError",
|
|
362
268
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
363
269
|
code: 3,
|
|
364
270
|
documentation: "https://github.com/storybookjs/storybook/issues/24071",
|
|
@@ -374,10 +280,10 @@ var MissingBuilderError = class extends StorybookError {
|
|
|
374
280
|
If you believe this is a bug, please describe your issue in detail on Github.`
|
|
375
281
|
});
|
|
376
282
|
}
|
|
377
|
-
}
|
|
378
|
-
var GoogleFontsDownloadError = class extends StorybookError {
|
|
283
|
+
}, GoogleFontsDownloadError = class extends StorybookError {
|
|
379
284
|
constructor(data) {
|
|
380
285
|
super({
|
|
286
|
+
name: "GoogleFontsDownloadError",
|
|
381
287
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
382
288
|
code: 1,
|
|
383
289
|
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
|
|
@@ -386,13 +292,10 @@ var GoogleFontsDownloadError = class extends StorybookError {
|
|
|
386
292
|
});
|
|
387
293
|
this.data = data;
|
|
388
294
|
}
|
|
389
|
-
|
|
390
|
-
__name(this, "GoogleFontsDownloadError");
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
var GoogleFontsLoadingError = class extends StorybookError {
|
|
295
|
+
}, GoogleFontsLoadingError = class extends StorybookError {
|
|
394
296
|
constructor(data) {
|
|
395
297
|
super({
|
|
298
|
+
name: "GoogleFontsLoadingError",
|
|
396
299
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
397
300
|
code: 2,
|
|
398
301
|
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
|
|
@@ -403,16 +306,10 @@ var GoogleFontsLoadingError = class extends StorybookError {
|
|
|
403
306
|
});
|
|
404
307
|
this.data = data;
|
|
405
308
|
}
|
|
406
|
-
|
|
407
|
-
__name(this, "GoogleFontsLoadingError");
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
var SvelteViteWithSvelteKitError = class extends StorybookError {
|
|
411
|
-
static {
|
|
412
|
-
__name(this, "SvelteViteWithSvelteKitError");
|
|
413
|
-
}
|
|
309
|
+
}, SvelteViteWithSvelteKitError = class extends StorybookError {
|
|
414
310
|
constructor() {
|
|
415
311
|
super({
|
|
312
|
+
name: "SvelteViteWithSvelteKitError",
|
|
416
313
|
category: "FRAMEWORK_SVELTE-VITE" /* FRAMEWORK_SVELTE_VITE */,
|
|
417
314
|
code: 1,
|
|
418
315
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
|
|
@@ -421,10 +318,10 @@ var SvelteViteWithSvelteKitError = class extends StorybookError {
|
|
|
421
318
|
Please use the @storybook/sveltekit framework instead.`
|
|
422
319
|
});
|
|
423
320
|
}
|
|
424
|
-
}
|
|
425
|
-
var NoMatchingExportError = class extends StorybookError {
|
|
321
|
+
}, NoMatchingExportError = class extends StorybookError {
|
|
426
322
|
constructor(data) {
|
|
427
323
|
super({
|
|
324
|
+
name: "NoMatchingExportError",
|
|
428
325
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
429
326
|
code: 4,
|
|
430
327
|
documentation: "",
|
|
@@ -442,13 +339,9 @@ var NoMatchingExportError = class extends StorybookError {
|
|
|
442
339
|
});
|
|
443
340
|
this.data = data;
|
|
444
341
|
}
|
|
445
|
-
|
|
446
|
-
__name(this, "NoMatchingExportError");
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
var MainFileMissingError = class extends StorybookError {
|
|
342
|
+
}, MainFileMissingError = class extends StorybookError {
|
|
450
343
|
constructor(data) {
|
|
451
|
-
|
|
344
|
+
let map = {
|
|
452
345
|
storybook: {
|
|
453
346
|
helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.",
|
|
454
347
|
documentation: "https://storybook.js.org/docs/configure?ref=error"
|
|
@@ -458,9 +351,9 @@ var MainFileMissingError = class extends StorybookError {
|
|
|
458
351
|
// TODO: add proper docs once available
|
|
459
352
|
documentation: "https://storybook.js.org/docs/configure?ref=error"
|
|
460
353
|
}
|
|
461
|
-
};
|
|
462
|
-
const { documentation, helperMessage } = map[data.source || "storybook"];
|
|
354
|
+
}, { documentation, helperMessage } = map[data.source || "storybook"];
|
|
463
355
|
super({
|
|
356
|
+
name: "MainFileMissingError",
|
|
464
357
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
465
358
|
code: 6,
|
|
466
359
|
documentation,
|
|
@@ -472,16 +365,13 @@ var MainFileMissingError = class extends StorybookError {
|
|
|
472
365
|
});
|
|
473
366
|
this.data = data;
|
|
474
367
|
}
|
|
475
|
-
|
|
476
|
-
__name(this, "MainFileMissingError");
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
var MainFileEvaluationError = class extends StorybookError {
|
|
368
|
+
}, MainFileEvaluationError = class extends StorybookError {
|
|
480
369
|
constructor(data) {
|
|
481
|
-
|
|
370
|
+
let errorText = import_picocolors.default.white(
|
|
482
371
|
(data.error.stack || data.error.message).replaceAll(process.cwd(), "")
|
|
483
372
|
);
|
|
484
373
|
super({
|
|
374
|
+
name: "MainFileEvaluationError",
|
|
485
375
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
486
376
|
code: 7,
|
|
487
377
|
message: import_ts_dedent.dedent`
|
|
@@ -492,13 +382,10 @@ var MainFileEvaluationError = class extends StorybookError {
|
|
|
492
382
|
});
|
|
493
383
|
this.data = data;
|
|
494
384
|
}
|
|
495
|
-
|
|
496
|
-
__name(this, "MainFileEvaluationError");
|
|
497
|
-
}
|
|
498
|
-
};
|
|
499
|
-
var StatusTypeIdMismatchError = class extends StorybookError {
|
|
385
|
+
}, StatusTypeIdMismatchError = class extends StorybookError {
|
|
500
386
|
constructor(data) {
|
|
501
387
|
super({
|
|
388
|
+
name: "StatusTypeIdMismatchError",
|
|
502
389
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
503
390
|
code: 16,
|
|
504
391
|
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
|
|
@@ -509,13 +396,10 @@ var StatusTypeIdMismatchError = class extends StorybookError {
|
|
|
509
396
|
});
|
|
510
397
|
this.data = data;
|
|
511
398
|
}
|
|
512
|
-
|
|
513
|
-
__name(this, "StatusTypeIdMismatchError");
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
var GenerateNewProjectOnInitError = class extends StorybookError {
|
|
399
|
+
}, GenerateNewProjectOnInitError = class extends StorybookError {
|
|
517
400
|
constructor(data) {
|
|
518
401
|
super({
|
|
402
|
+
name: "GenerateNewProjectOnInitError",
|
|
519
403
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
520
404
|
code: 3,
|
|
521
405
|
documentation: "",
|
|
@@ -526,13 +410,10 @@ var GenerateNewProjectOnInitError = class extends StorybookError {
|
|
|
526
410
|
});
|
|
527
411
|
this.data = data;
|
|
528
412
|
}
|
|
529
|
-
|
|
530
|
-
__name(this, "GenerateNewProjectOnInitError");
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
var UpgradeStorybookToLowerVersionError = class extends StorybookError {
|
|
413
|
+
}, UpgradeStorybookToLowerVersionError = class extends StorybookError {
|
|
534
414
|
constructor(data) {
|
|
535
415
|
super({
|
|
416
|
+
name: "UpgradeStorybookToLowerVersionError",
|
|
536
417
|
category: "CLI_UPGRADE" /* CLI_UPGRADE */,
|
|
537
418
|
code: 3,
|
|
538
419
|
message: import_ts_dedent.dedent`
|
|
@@ -549,16 +430,10 @@ var UpgradeStorybookToLowerVersionError = class extends StorybookError {
|
|
|
549
430
|
});
|
|
550
431
|
this.data = data;
|
|
551
432
|
}
|
|
552
|
-
|
|
553
|
-
__name(this, "UpgradeStorybookToLowerVersionError");
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
var UpgradeStorybookUnknownCurrentVersionError = class extends StorybookError {
|
|
557
|
-
static {
|
|
558
|
-
__name(this, "UpgradeStorybookUnknownCurrentVersionError");
|
|
559
|
-
}
|
|
433
|
+
}, UpgradeStorybookUnknownCurrentVersionError = class extends StorybookError {
|
|
560
434
|
constructor() {
|
|
561
435
|
super({
|
|
436
|
+
name: "UpgradeStorybookUnknownCurrentVersionError",
|
|
562
437
|
category: "CLI_UPGRADE" /* CLI_UPGRADE */,
|
|
563
438
|
code: 5,
|
|
564
439
|
message: import_ts_dedent.dedent`
|
|
@@ -568,13 +443,10 @@ var UpgradeStorybookUnknownCurrentVersionError = class extends StorybookError {
|
|
|
568
443
|
It might help if you specify your Storybook config directory with the --config-dir flag.`
|
|
569
444
|
});
|
|
570
445
|
}
|
|
571
|
-
}
|
|
572
|
-
var NoStatsForViteDevError = class extends StorybookError {
|
|
573
|
-
static {
|
|
574
|
-
__name(this, "NoStatsForViteDevError");
|
|
575
|
-
}
|
|
446
|
+
}, NoStatsForViteDevError = class extends StorybookError {
|
|
576
447
|
constructor() {
|
|
577
448
|
super({
|
|
449
|
+
name: "NoStatsForViteDevError",
|
|
578
450
|
category: "BUILDER-VITE" /* BUILDER_VITE */,
|
|
579
451
|
code: 1,
|
|
580
452
|
message: import_ts_dedent.dedent`
|
|
@@ -583,10 +455,10 @@ var NoStatsForViteDevError = class extends StorybookError {
|
|
|
583
455
|
Please remove the \`--stats-json\` flag when running in dev mode.`
|
|
584
456
|
});
|
|
585
457
|
}
|
|
586
|
-
}
|
|
587
|
-
var FindPackageVersionsError = class extends StorybookError {
|
|
458
|
+
}, FindPackageVersionsError = class extends StorybookError {
|
|
588
459
|
constructor(data) {
|
|
589
460
|
super({
|
|
461
|
+
name: "FindPackageVersionsError",
|
|
590
462
|
category: "CLI" /* CLI */,
|
|
591
463
|
code: 1,
|
|
592
464
|
message: import_ts_dedent.dedent`
|
|
@@ -595,13 +467,10 @@ var FindPackageVersionsError = class extends StorybookError {
|
|
|
595
467
|
});
|
|
596
468
|
this.data = data;
|
|
597
469
|
}
|
|
598
|
-
|
|
599
|
-
__name(this, "FindPackageVersionsError");
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
var IncompatiblePostCssConfigError = class extends StorybookError {
|
|
470
|
+
}, IncompatiblePostCssConfigError = class extends StorybookError {
|
|
603
471
|
constructor(data) {
|
|
604
472
|
super({
|
|
473
|
+
name: "IncompatiblePostCssConfigError",
|
|
605
474
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
606
475
|
code: 3,
|
|
607
476
|
message: import_ts_dedent.dedent`
|
|
@@ -628,13 +497,10 @@ var IncompatiblePostCssConfigError = class extends StorybookError {
|
|
|
628
497
|
});
|
|
629
498
|
this.data = data;
|
|
630
499
|
}
|
|
631
|
-
|
|
632
|
-
__name(this, "IncompatiblePostCssConfigError");
|
|
633
|
-
}
|
|
634
|
-
};
|
|
635
|
-
var SavingGlobalSettingsFileError = class extends StorybookError {
|
|
500
|
+
}, SavingGlobalSettingsFileError = class extends StorybookError {
|
|
636
501
|
constructor(data) {
|
|
637
502
|
super({
|
|
503
|
+
name: "SavingGlobalSettingsFileError",
|
|
638
504
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
639
505
|
code: 1,
|
|
640
506
|
message: import_ts_dedent.dedent`
|
|
@@ -643,16 +509,10 @@ var SavingGlobalSettingsFileError = class extends StorybookError {
|
|
|
643
509
|
});
|
|
644
510
|
this.data = data;
|
|
645
511
|
}
|
|
646
|
-
|
|
647
|
-
__name(this, "SavingGlobalSettingsFileError");
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
var CommonJsConfigNotSupportedError = class extends StorybookError {
|
|
651
|
-
static {
|
|
652
|
-
__name(this, "CommonJsConfigNotSupportedError");
|
|
653
|
-
}
|
|
512
|
+
}, CommonJsConfigNotSupportedError = class extends StorybookError {
|
|
654
513
|
constructor() {
|
|
655
514
|
super({
|
|
515
|
+
name: "CommonJsConfigNotSupportedError",
|
|
656
516
|
category: "CLI_AUTOMIGRATE" /* CLI_AUTOMIGRATE */,
|
|
657
517
|
code: 1,
|
|
658
518
|
documentation: "https://storybook.js.org/docs/configure/overview?ref=error#es-modules",
|