storybook 10.1.0-alpha.9 → 10.1.0-beta.0
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-FDWKXLBI.js → chunk-2XZMBGTA.js} +44 -109
- 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-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-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- 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-FQ7SLVLR.js +66 -0
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/chunk-GFY5R5EY.js +47 -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-OWPZQM2D.js → chunk-L4RMQ7D7.js} +60 -110
- package/dist/_browser-chunks/chunk-P4F4UVXX.js +951 -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-SS2NHR7W.js +2969 -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-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-CAVLW7PM.js → syntaxhighlighter-IQDEPFLK.js} +704 -1848
- package/dist/_node-chunks/{builder-manager-SM3UWERX.js → builder-manager-BDAQHXFI.js} +510 -1019
- package/dist/_node-chunks/camelcase-3C7DZZPX.js +37 -0
- package/dist/_node-chunks/chunk-2IIQTGNE.js +6024 -0
- package/dist/_node-chunks/chunk-56U5LEMP.js +3043 -0
- package/dist/_node-chunks/chunk-7LIRCAQE.js +20 -0
- package/dist/_node-chunks/chunk-7RN6TXKP.js +603 -0
- package/dist/_node-chunks/chunk-7SJ7PZNL.js +4523 -0
- package/dist/_node-chunks/{chunk-HHSTA6QS.js → chunk-BG4RDXG7.js} +8 -10
- package/dist/_node-chunks/chunk-CBQKMXLQ.js +18 -0
- package/dist/_node-chunks/chunk-CN2IW2KQ.js +1564 -0
- package/dist/_node-chunks/chunk-CQMAU6UQ.js +943 -0
- package/dist/_node-chunks/{chunk-EBUEXRH5.js → chunk-D6ND3TVY.js} +116 -276
- package/dist/_node-chunks/chunk-DC355CYB.js +61 -0
- package/dist/_node-chunks/{chunk-SGM3ZCCT.js → chunk-EVK2SBW5.js} +292 -688
- package/dist/_node-chunks/chunk-IXWEUXJ2.js +119 -0
- package/dist/_node-chunks/{chunk-F6EFOEC7.js → chunk-KVRF22SH.js} +469 -983
- package/dist/_node-chunks/chunk-LEDP4QQW.js +919 -0
- package/dist/_node-chunks/{chunk-GHIBZRKD.js → chunk-MMVV6DGG.js} +8133 -8887
- package/dist/_node-chunks/chunk-O5CGEVRI.js +29 -0
- package/dist/_node-chunks/chunk-OZZO56XN.js +299 -0
- package/dist/_node-chunks/chunk-POT2EVGD.js +78 -0
- package/dist/_node-chunks/chunk-R5YGFSTV.js +3781 -0
- package/dist/_node-chunks/chunk-SQCTM2OS.js +23 -0
- package/dist/_node-chunks/chunk-UFOFO5H7.js +54 -0
- package/dist/_node-chunks/chunk-VBF7ALJF.js +72 -0
- package/dist/_node-chunks/chunk-W6MAMTUF.js +70 -0
- package/dist/_node-chunks/chunk-WURL4XOT.js +46662 -0
- package/dist/_node-chunks/chunk-XGK6MVKR.js +61 -0
- package/dist/_node-chunks/chunk-YV3GDSDT.js +765 -0
- package/dist/_node-chunks/{chunk-ATDHMMIZ.js → chunk-YWV55YW3.js} +15 -24
- package/dist/_node-chunks/dist-KEP4IFRN.js +121 -0
- package/dist/_node-chunks/globby-4WUBTDCN.js +3452 -0
- package/dist/_node-chunks/lib-JVOEKTYM.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-C5WFYYXR.js +14329 -0
- package/dist/_node-chunks/p-limit-LDY632RS.js +116 -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 +10 -11
- package/dist/bin/core.js +601 -1548
- package/dist/bin/dispatcher.js +36 -36
- package/dist/bin/loader.js +24 -38
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.d.ts +1479 -133
- package/dist/cli/index.js +30 -8540
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.d.ts +139 -62
- package/dist/common/index.js +66 -51
- package/dist/components/index.d.ts +575 -273
- package/dist/components/index.js +14863 -4313
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.d.ts +3 -2
- package/dist/core-server/index.js +2908 -8518
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +2521 -5233
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +663 -962
- package/dist/csf/index.js +534 -1179
- 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 +59044 -67141
- package/dist/manager/globals.js +2 -3
- package/dist/manager/manager-stores.d.ts +1 -0
- package/dist/manager/manager-stores.js +23 -0
- package/dist/manager/runtime.js +11511 -10953
- package/dist/manager-api/index.d.ts +1811 -2
- package/dist/manager-api/index.js +1348 -2401
- package/dist/manager-errors.d.ts +9 -0
- package/dist/manager-errors.js +3 -3
- package/dist/mocking-utils/index.d.ts +1126 -0
- package/dist/mocking-utils/index.js +1181 -0
- package/dist/node-logger/index.d.ts +192 -24
- package/dist/node-logger/index.js +23 -4471
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10799 -22393
- package/dist/preview-api/index.d.ts +68 -69
- package/dist/preview-api/index.js +13 -13
- package/dist/preview-errors.d.ts +9 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +34 -1
- package/dist/server-errors.js +17 -10
- package/dist/telemetry/index.d.ts +24 -3
- package/dist/telemetry/index.js +25 -24
- package/dist/test/index.js +6131 -11916
- package/dist/theming/create.d.ts +1 -0
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3366 -2599
- package/dist/theming/index.js +501 -1091
- package/dist/types/index.d.ts +72 -8
- package/dist/types/index.js +27 -12
- package/dist/viewport/index.js +3 -3
- package/package.json +26 -17
- 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-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-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-RW5PKMWM.js +0 -4182
- 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-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-H5QSGQLK.js +0 -18
- package/dist/_node-chunks/chunk-3THWHQOC.js +0 -61
- package/dist/_node-chunks/chunk-45YUOLTU.js +0 -69
- package/dist/_node-chunks/chunk-4QSNCPAU.js +0 -64656
- package/dist/_node-chunks/chunk-744PQSOU.js +0 -79
- package/dist/_node-chunks/chunk-74Z2U7QG.js +0 -1544
- package/dist/_node-chunks/chunk-7MB7TFPO.js +0 -1198
- package/dist/_node-chunks/chunk-A7GS4RFT.js +0 -697
- package/dist/_node-chunks/chunk-BIA3A5UM.js +0 -61
- package/dist/_node-chunks/chunk-C5G7CLWX.js +0 -1657
- package/dist/_node-chunks/chunk-DLFUKMYJ.js +0 -1531
- package/dist/_node-chunks/chunk-EMRGRXKT.js +0 -111
- package/dist/_node-chunks/chunk-EX46EHHY.js +0 -420
- package/dist/_node-chunks/chunk-F76QKNOJ.js +0 -304
- package/dist/_node-chunks/chunk-HDCRUTEF.js +0 -220
- package/dist/_node-chunks/chunk-HUYAOIPH.js +0 -90
- package/dist/_node-chunks/chunk-IBJZQZJC.js +0 -101
- package/dist/_node-chunks/chunk-KZN2RDDT.js +0 -6712
- package/dist/_node-chunks/chunk-LYUNFU3F.js +0 -4741
- package/dist/_node-chunks/chunk-N44SIS6K.js +0 -28
- package/dist/_node-chunks/chunk-NILZM6KR.js +0 -18
- package/dist/_node-chunks/chunk-PC4ZRP6W.js +0 -34
- package/dist/_node-chunks/chunk-TJNGOQUH.js +0 -4272
- package/dist/_node-chunks/chunk-UBSYLHIL.js +0 -1250
- package/dist/_node-chunks/chunk-UTCLXPOC.js +0 -1518
- package/dist/_node-chunks/chunk-WOXXODXP.js +0 -5029
- package/dist/_node-chunks/chunk-XC4MEUA6.js +0 -1586
- package/dist/_node-chunks/chunk-YRXXMKRR.js +0 -2256
- package/dist/_node-chunks/dist-SL73W244.js +0 -175
- package/dist/_node-chunks/globby-ZSHAUQZ5.js +0 -5222
- package/dist/_node-chunks/lib-U2VIPUTI.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-ZLHD33JK.js +0 -22017
- package/dist/_node-chunks/p-limit-K5BS5MSV.js +0 -168
- package/dist/_node-chunks/plugin-5PD4YIUH.js +0 -129
- package/dist/_node-chunks/plugin-MONDT2WL.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-EUZJRG3W.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-T4LDXEHE.js +0 -124
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -36
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -33
|
@@ -1,146 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_hjmvusgt1gv from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_hjmvusgt1gv from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_hjmvusgt1gv from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_hjmvusgt1gv.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hjmvusgt1gv.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_hjmvusgt1gv.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
StorybookError
|
|
14
|
+
} from "./chunk-POT2EVGD.js";
|
|
12
15
|
import {
|
|
13
16
|
require_dist
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XGK6MVKR.js";
|
|
15
18
|
import {
|
|
16
19
|
require_picocolors
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YWV55YW3.js";
|
|
18
21
|
import {
|
|
19
|
-
__name,
|
|
20
22
|
__toESM
|
|
21
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UFOFO5H7.js";
|
|
22
24
|
|
|
23
25
|
// src/server-errors.ts
|
|
24
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
// src/storybook-error.ts
|
|
28
|
-
function parseErrorCode({
|
|
29
|
-
code,
|
|
30
|
-
category
|
|
31
|
-
}) {
|
|
32
|
-
const paddedCode = String(code).padStart(4, "0");
|
|
33
|
-
return `SB_${category}_${paddedCode}`;
|
|
34
|
-
}
|
|
35
|
-
__name(parseErrorCode, "parseErrorCode");
|
|
36
|
-
function appendErrorRef(url) {
|
|
37
|
-
if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url)) {
|
|
38
|
-
return url;
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
const urlObj = new URL(url);
|
|
42
|
-
urlObj.searchParams.set("ref", "error");
|
|
43
|
-
return urlObj.toString();
|
|
44
|
-
} catch {
|
|
45
|
-
return url;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
__name(appendErrorRef, "appendErrorRef");
|
|
49
|
-
var StorybookError = class _StorybookError extends Error {
|
|
50
|
-
constructor(props) {
|
|
51
|
-
super(_StorybookError.getFullMessage(props));
|
|
52
|
-
/**
|
|
53
|
-
* Data associated with the error. Used to provide additional information in the error message or
|
|
54
|
-
* to be passed to telemetry.
|
|
55
|
-
*/
|
|
56
|
-
this.data = {};
|
|
57
|
-
/** Flag used to easily determine if the error originates from Storybook. */
|
|
58
|
-
this.fromStorybook = true;
|
|
59
|
-
this.category = props.category;
|
|
60
|
-
this.documentation = props.documentation ?? false;
|
|
61
|
-
this.code = props.code;
|
|
62
|
-
}
|
|
63
|
-
static {
|
|
64
|
-
__name(this, "StorybookError");
|
|
65
|
-
}
|
|
66
|
-
get fullErrorCode() {
|
|
67
|
-
return parseErrorCode({ code: this.code, category: this.category });
|
|
68
|
-
}
|
|
69
|
-
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
70
|
-
get name() {
|
|
71
|
-
const errorName = this.constructor.name;
|
|
72
|
-
return `${this.fullErrorCode} (${errorName})`;
|
|
73
|
-
}
|
|
74
|
-
/** Generates the error message along with additional documentation link (if applicable). */
|
|
75
|
-
static getFullMessage({
|
|
76
|
-
documentation,
|
|
77
|
-
code,
|
|
78
|
-
category,
|
|
79
|
-
message
|
|
80
|
-
}) {
|
|
81
|
-
let page;
|
|
82
|
-
if (documentation === true) {
|
|
83
|
-
page = `https://storybook.js.org/error/${parseErrorCode({ code, category })}?ref=error`;
|
|
84
|
-
} else if (typeof documentation === "string") {
|
|
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 ? `
|
|
91
|
-
|
|
92
|
-
More info: ${page}
|
|
93
|
-
` : ""}`;
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
// 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
|
-
}
|
|
26
|
+
var import_picocolors = __toESM(require_picocolors(), 1), import_ts_dedent = __toESM(require_dist(), 1);
|
|
27
|
+
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
28
|
constructor() {
|
|
143
29
|
super({
|
|
30
|
+
name: "NxProjectDetectedError",
|
|
144
31
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
145
32
|
code: 1,
|
|
146
33
|
documentation: "https://nx.dev/nx-api/storybook#generating-storybook-configuration",
|
|
@@ -149,13 +36,10 @@ var NxProjectDetectedError = class extends StorybookError {
|
|
|
149
36
|
Run "nx g @nx/storybook:configuration <your-project-name>" to add Storybook to a given Nx app or lib.`
|
|
150
37
|
});
|
|
151
38
|
}
|
|
152
|
-
}
|
|
153
|
-
var MissingFrameworkFieldError = class extends StorybookError {
|
|
154
|
-
static {
|
|
155
|
-
__name(this, "MissingFrameworkFieldError");
|
|
156
|
-
}
|
|
39
|
+
}, MissingFrameworkFieldError = class extends StorybookError {
|
|
157
40
|
constructor() {
|
|
158
41
|
super({
|
|
42
|
+
name: "MissingFrameworkFieldError",
|
|
159
43
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
160
44
|
code: 1,
|
|
161
45
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
|
|
@@ -165,10 +49,10 @@ var MissingFrameworkFieldError = class extends StorybookError {
|
|
|
165
49
|
Please run 'npx storybook automigrate' to automatically fix your config.`
|
|
166
50
|
});
|
|
167
51
|
}
|
|
168
|
-
}
|
|
169
|
-
var InvalidFrameworkNameError = class extends StorybookError {
|
|
52
|
+
}, InvalidFrameworkNameError = class extends StorybookError {
|
|
170
53
|
constructor(data) {
|
|
171
54
|
super({
|
|
55
|
+
name: "InvalidFrameworkNameError",
|
|
172
56
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
173
57
|
code: 2,
|
|
174
58
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
|
|
@@ -180,13 +64,10 @@ var InvalidFrameworkNameError = class extends StorybookError {
|
|
|
180
64
|
});
|
|
181
65
|
this.data = data;
|
|
182
66
|
}
|
|
183
|
-
|
|
184
|
-
__name(this, "InvalidFrameworkNameError");
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
var CouldNotEvaluateFrameworkError = class extends StorybookError {
|
|
67
|
+
}, CouldNotEvaluateFrameworkError = class extends StorybookError {
|
|
188
68
|
constructor(data) {
|
|
189
69
|
super({
|
|
70
|
+
name: "CouldNotEvaluateFrameworkError",
|
|
190
71
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
191
72
|
code: 3,
|
|
192
73
|
documentation: "",
|
|
@@ -197,16 +78,10 @@ var CouldNotEvaluateFrameworkError = class extends StorybookError {
|
|
|
197
78
|
});
|
|
198
79
|
this.data = data;
|
|
199
80
|
}
|
|
200
|
-
|
|
201
|
-
__name(this, "CouldNotEvaluateFrameworkError");
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var ConflictingStaticDirConfigError = class extends StorybookError {
|
|
205
|
-
static {
|
|
206
|
-
__name(this, "ConflictingStaticDirConfigError");
|
|
207
|
-
}
|
|
81
|
+
}, ConflictingStaticDirConfigError = class extends StorybookError {
|
|
208
82
|
constructor() {
|
|
209
83
|
super({
|
|
84
|
+
name: "ConflictingStaticDirConfigError",
|
|
210
85
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
211
86
|
code: 1,
|
|
212
87
|
documentation: "https://storybook.js.org/docs/configure/integration/images-and-assets#serving-static-files-via-storybook-configuration",
|
|
@@ -218,30 +93,24 @@ var ConflictingStaticDirConfigError = class extends StorybookError {
|
|
|
218
93
|
Please remove the CLI flag from your storybook script and use only the 'staticDirs' option instead.`
|
|
219
94
|
});
|
|
220
95
|
}
|
|
221
|
-
}
|
|
222
|
-
var InvalidStoriesEntryError = class extends StorybookError {
|
|
223
|
-
static {
|
|
224
|
-
__name(this, "InvalidStoriesEntryError");
|
|
225
|
-
}
|
|
96
|
+
}, InvalidStoriesEntryError = class extends StorybookError {
|
|
226
97
|
constructor() {
|
|
227
98
|
super({
|
|
99
|
+
name: "InvalidStoriesEntryError",
|
|
228
100
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
229
101
|
code: 4,
|
|
230
102
|
documentation: "https://storybook.js.org/docs/faq#can-i-have-a-storybook-with-no-local-stories",
|
|
231
103
|
message: import_ts_dedent.dedent`
|
|
232
104
|
Storybook could not index your stories.
|
|
233
|
-
Your main configuration
|
|
105
|
+
Your main configuration does not contain a 'stories' field, or it resolved to an empty array.
|
|
234
106
|
|
|
235
107
|
Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
|
|
236
108
|
});
|
|
237
109
|
}
|
|
238
|
-
}
|
|
239
|
-
var WebpackMissingStatsError = class extends StorybookError {
|
|
240
|
-
static {
|
|
241
|
-
__name(this, "WebpackMissingStatsError");
|
|
242
|
-
}
|
|
110
|
+
}, WebpackMissingStatsError = class extends StorybookError {
|
|
243
111
|
constructor() {
|
|
244
112
|
super({
|
|
113
|
+
name: "WebpackMissingStatsError",
|
|
245
114
|
category: "BUILDER-WEBPACK5" /* BUILDER_WEBPACK5 */,
|
|
246
115
|
code: 1,
|
|
247
116
|
documentation: [
|
|
@@ -253,35 +122,30 @@ var WebpackMissingStatsError = class extends StorybookError {
|
|
|
253
122
|
Storybook needs Webpack stats (including errors) in order to build correctly.`
|
|
254
123
|
});
|
|
255
124
|
}
|
|
256
|
-
}
|
|
257
|
-
var WebpackInvocationError = class extends StorybookError {
|
|
125
|
+
}, WebpackInvocationError = class extends StorybookError {
|
|
258
126
|
constructor(data) {
|
|
259
127
|
super({
|
|
128
|
+
name: "WebpackInvocationError",
|
|
260
129
|
category: "BUILDER-WEBPACK5" /* BUILDER_WEBPACK5 */,
|
|
261
130
|
code: 2,
|
|
262
131
|
message: data.error.message.trim()
|
|
263
132
|
});
|
|
264
133
|
this.data = data;
|
|
265
134
|
}
|
|
266
|
-
static {
|
|
267
|
-
__name(this, "WebpackInvocationError");
|
|
268
|
-
}
|
|
269
135
|
};
|
|
270
136
|
function removeAnsiEscapeCodes(input = "") {
|
|
271
137
|
return input.replace(/\u001B\[[0-9;]*m/g, "");
|
|
272
138
|
}
|
|
273
|
-
__name(removeAnsiEscapeCodes, "removeAnsiEscapeCodes");
|
|
274
139
|
var WebpackCompilationError = class extends StorybookError {
|
|
275
140
|
constructor(data) {
|
|
276
|
-
data.errors = data.errors.map((err) => {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
};
|
|
283
|
-
});
|
|
141
|
+
data.errors = data.errors.map((err) => ({
|
|
142
|
+
...err,
|
|
143
|
+
message: removeAnsiEscapeCodes(err.message),
|
|
144
|
+
stack: removeAnsiEscapeCodes(err.stack),
|
|
145
|
+
name: err.name
|
|
146
|
+
}));
|
|
284
147
|
super({
|
|
148
|
+
name: "WebpackCompilationError",
|
|
285
149
|
category: "BUILDER-WEBPACK5" /* BUILDER_WEBPACK5 */,
|
|
286
150
|
code: 3,
|
|
287
151
|
// This error message is a followup of errors logged by Webpack to the user
|
|
@@ -292,13 +156,10 @@ var WebpackCompilationError = class extends StorybookError {
|
|
|
292
156
|
});
|
|
293
157
|
this.data = data;
|
|
294
158
|
}
|
|
295
|
-
|
|
296
|
-
__name(this, "WebpackCompilationError");
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
var MissingAngularJsonError = class extends StorybookError {
|
|
159
|
+
}, MissingAngularJsonError = class extends StorybookError {
|
|
300
160
|
constructor(data) {
|
|
301
161
|
super({
|
|
162
|
+
name: "MissingAngularJsonError",
|
|
302
163
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
303
164
|
code: 2,
|
|
304
165
|
documentation: "https://storybook.js.org/docs/faq#error-no-angularjson-file-found?ref=error",
|
|
@@ -308,16 +169,10 @@ var MissingAngularJsonError = class extends StorybookError {
|
|
|
308
169
|
});
|
|
309
170
|
this.data = data;
|
|
310
171
|
}
|
|
311
|
-
|
|
312
|
-
__name(this, "MissingAngularJsonError");
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
var AngularLegacyBuildOptionsError = class extends StorybookError {
|
|
316
|
-
static {
|
|
317
|
-
__name(this, "AngularLegacyBuildOptionsError");
|
|
318
|
-
}
|
|
172
|
+
}, AngularLegacyBuildOptionsError = class extends StorybookError {
|
|
319
173
|
constructor() {
|
|
320
174
|
super({
|
|
175
|
+
name: "AngularLegacyBuildOptionsError",
|
|
321
176
|
category: "FRAMEWORK_ANGULAR" /* FRAMEWORK_ANGULAR */,
|
|
322
177
|
code: 1,
|
|
323
178
|
documentation: [
|
|
@@ -331,10 +186,10 @@ var AngularLegacyBuildOptionsError = class extends StorybookError {
|
|
|
331
186
|
Please run 'npx storybook automigrate' to automatically fix your config.`
|
|
332
187
|
});
|
|
333
188
|
}
|
|
334
|
-
}
|
|
335
|
-
var CriticalPresetLoadError = class extends StorybookError {
|
|
189
|
+
}, CriticalPresetLoadError = class extends StorybookError {
|
|
336
190
|
constructor(data) {
|
|
337
191
|
super({
|
|
192
|
+
name: "CriticalPresetLoadError",
|
|
338
193
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
339
194
|
code: 2,
|
|
340
195
|
documentation: "",
|
|
@@ -349,16 +204,10 @@ var CriticalPresetLoadError = class extends StorybookError {
|
|
|
349
204
|
});
|
|
350
205
|
this.data = data;
|
|
351
206
|
}
|
|
352
|
-
|
|
353
|
-
__name(this, "CriticalPresetLoadError");
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
var MissingBuilderError = class extends StorybookError {
|
|
357
|
-
static {
|
|
358
|
-
__name(this, "MissingBuilderError");
|
|
359
|
-
}
|
|
207
|
+
}, MissingBuilderError = class extends StorybookError {
|
|
360
208
|
constructor() {
|
|
361
209
|
super({
|
|
210
|
+
name: "MissingBuilderError",
|
|
362
211
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
363
212
|
code: 3,
|
|
364
213
|
documentation: "https://github.com/storybookjs/storybook/issues/24071",
|
|
@@ -374,10 +223,10 @@ var MissingBuilderError = class extends StorybookError {
|
|
|
374
223
|
If you believe this is a bug, please describe your issue in detail on Github.`
|
|
375
224
|
});
|
|
376
225
|
}
|
|
377
|
-
}
|
|
378
|
-
var GoogleFontsDownloadError = class extends StorybookError {
|
|
226
|
+
}, GoogleFontsDownloadError = class extends StorybookError {
|
|
379
227
|
constructor(data) {
|
|
380
228
|
super({
|
|
229
|
+
name: "GoogleFontsDownloadError",
|
|
381
230
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
382
231
|
code: 1,
|
|
383
232
|
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
|
|
@@ -386,13 +235,10 @@ var GoogleFontsDownloadError = class extends StorybookError {
|
|
|
386
235
|
});
|
|
387
236
|
this.data = data;
|
|
388
237
|
}
|
|
389
|
-
|
|
390
|
-
__name(this, "GoogleFontsDownloadError");
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
var GoogleFontsLoadingError = class extends StorybookError {
|
|
238
|
+
}, GoogleFontsLoadingError = class extends StorybookError {
|
|
394
239
|
constructor(data) {
|
|
395
240
|
super({
|
|
241
|
+
name: "GoogleFontsLoadingError",
|
|
396
242
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
397
243
|
code: 2,
|
|
398
244
|
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
|
|
@@ -403,16 +249,10 @@ var GoogleFontsLoadingError = class extends StorybookError {
|
|
|
403
249
|
});
|
|
404
250
|
this.data = data;
|
|
405
251
|
}
|
|
406
|
-
|
|
407
|
-
__name(this, "GoogleFontsLoadingError");
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
var SvelteViteWithSvelteKitError = class extends StorybookError {
|
|
411
|
-
static {
|
|
412
|
-
__name(this, "SvelteViteWithSvelteKitError");
|
|
413
|
-
}
|
|
252
|
+
}, SvelteViteWithSvelteKitError = class extends StorybookError {
|
|
414
253
|
constructor() {
|
|
415
254
|
super({
|
|
255
|
+
name: "SvelteViteWithSvelteKitError",
|
|
416
256
|
category: "FRAMEWORK_SVELTE-VITE" /* FRAMEWORK_SVELTE_VITE */,
|
|
417
257
|
code: 1,
|
|
418
258
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
|
|
@@ -421,10 +261,10 @@ var SvelteViteWithSvelteKitError = class extends StorybookError {
|
|
|
421
261
|
Please use the @storybook/sveltekit framework instead.`
|
|
422
262
|
});
|
|
423
263
|
}
|
|
424
|
-
}
|
|
425
|
-
var NoMatchingExportError = class extends StorybookError {
|
|
264
|
+
}, NoMatchingExportError = class extends StorybookError {
|
|
426
265
|
constructor(data) {
|
|
427
266
|
super({
|
|
267
|
+
name: "NoMatchingExportError",
|
|
428
268
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
429
269
|
code: 4,
|
|
430
270
|
documentation: "",
|
|
@@ -442,13 +282,9 @@ var NoMatchingExportError = class extends StorybookError {
|
|
|
442
282
|
});
|
|
443
283
|
this.data = data;
|
|
444
284
|
}
|
|
445
|
-
|
|
446
|
-
__name(this, "NoMatchingExportError");
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
var MainFileMissingError = class extends StorybookError {
|
|
285
|
+
}, MainFileMissingError = class extends StorybookError {
|
|
450
286
|
constructor(data) {
|
|
451
|
-
|
|
287
|
+
let map = {
|
|
452
288
|
storybook: {
|
|
453
289
|
helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.",
|
|
454
290
|
documentation: "https://storybook.js.org/docs/configure?ref=error"
|
|
@@ -458,9 +294,9 @@ var MainFileMissingError = class extends StorybookError {
|
|
|
458
294
|
// TODO: add proper docs once available
|
|
459
295
|
documentation: "https://storybook.js.org/docs/configure?ref=error"
|
|
460
296
|
}
|
|
461
|
-
};
|
|
462
|
-
const { documentation, helperMessage } = map[data.source || "storybook"];
|
|
297
|
+
}, { documentation, helperMessage } = map[data.source || "storybook"];
|
|
463
298
|
super({
|
|
299
|
+
name: "MainFileMissingError",
|
|
464
300
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
465
301
|
code: 6,
|
|
466
302
|
documentation,
|
|
@@ -472,16 +308,13 @@ var MainFileMissingError = class extends StorybookError {
|
|
|
472
308
|
});
|
|
473
309
|
this.data = data;
|
|
474
310
|
}
|
|
475
|
-
|
|
476
|
-
__name(this, "MainFileMissingError");
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
var MainFileEvaluationError = class extends StorybookError {
|
|
311
|
+
}, MainFileEvaluationError = class extends StorybookError {
|
|
480
312
|
constructor(data) {
|
|
481
|
-
|
|
313
|
+
let errorText = import_picocolors.default.white(
|
|
482
314
|
(data.error.stack || data.error.message).replaceAll(process.cwd(), "")
|
|
483
315
|
);
|
|
484
316
|
super({
|
|
317
|
+
name: "MainFileEvaluationError",
|
|
485
318
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
486
319
|
code: 7,
|
|
487
320
|
message: import_ts_dedent.dedent`
|
|
@@ -492,13 +325,10 @@ var MainFileEvaluationError = class extends StorybookError {
|
|
|
492
325
|
});
|
|
493
326
|
this.data = data;
|
|
494
327
|
}
|
|
495
|
-
|
|
496
|
-
__name(this, "MainFileEvaluationError");
|
|
497
|
-
}
|
|
498
|
-
};
|
|
499
|
-
var StatusTypeIdMismatchError = class extends StorybookError {
|
|
328
|
+
}, StatusTypeIdMismatchError = class extends StorybookError {
|
|
500
329
|
constructor(data) {
|
|
501
330
|
super({
|
|
331
|
+
name: "StatusTypeIdMismatchError",
|
|
502
332
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
503
333
|
code: 16,
|
|
504
334
|
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
|
|
@@ -509,13 +339,10 @@ var StatusTypeIdMismatchError = class extends StorybookError {
|
|
|
509
339
|
});
|
|
510
340
|
this.data = data;
|
|
511
341
|
}
|
|
512
|
-
|
|
513
|
-
__name(this, "StatusTypeIdMismatchError");
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
var GenerateNewProjectOnInitError = class extends StorybookError {
|
|
342
|
+
}, GenerateNewProjectOnInitError = class extends StorybookError {
|
|
517
343
|
constructor(data) {
|
|
518
344
|
super({
|
|
345
|
+
name: "GenerateNewProjectOnInitError",
|
|
519
346
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
520
347
|
code: 3,
|
|
521
348
|
documentation: "",
|
|
@@ -526,13 +353,33 @@ var GenerateNewProjectOnInitError = class extends StorybookError {
|
|
|
526
353
|
});
|
|
527
354
|
this.data = data;
|
|
528
355
|
}
|
|
529
|
-
|
|
530
|
-
|
|
356
|
+
}, AddonVitestPostinstallPrerequisiteCheckError = class extends StorybookError {
|
|
357
|
+
constructor(data) {
|
|
358
|
+
super({
|
|
359
|
+
name: "AddonVitestPostinstallPrerequisiteCheckError",
|
|
360
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
361
|
+
isHandledError: !0,
|
|
362
|
+
code: 4,
|
|
363
|
+
documentation: "",
|
|
364
|
+
message: "The prerequisite check for the Vitest addon failed."
|
|
365
|
+
});
|
|
366
|
+
this.data = data;
|
|
531
367
|
}
|
|
532
|
-
}
|
|
533
|
-
|
|
368
|
+
}, AddonVitestPostinstallError = class extends StorybookError {
|
|
369
|
+
constructor(data) {
|
|
370
|
+
super({
|
|
371
|
+
name: "AddonVitestPostinstallError",
|
|
372
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
373
|
+
isHandledError: !0,
|
|
374
|
+
code: 5,
|
|
375
|
+
message: "The Vitest addon setup failed."
|
|
376
|
+
});
|
|
377
|
+
this.data = data;
|
|
378
|
+
}
|
|
379
|
+
}, UpgradeStorybookToLowerVersionError = class extends StorybookError {
|
|
534
380
|
constructor(data) {
|
|
535
381
|
super({
|
|
382
|
+
name: "UpgradeStorybookToLowerVersionError",
|
|
536
383
|
category: "CLI_UPGRADE" /* CLI_UPGRADE */,
|
|
537
384
|
code: 3,
|
|
538
385
|
message: import_ts_dedent.dedent`
|
|
@@ -549,16 +396,10 @@ var UpgradeStorybookToLowerVersionError = class extends StorybookError {
|
|
|
549
396
|
});
|
|
550
397
|
this.data = data;
|
|
551
398
|
}
|
|
552
|
-
|
|
553
|
-
__name(this, "UpgradeStorybookToLowerVersionError");
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
var UpgradeStorybookUnknownCurrentVersionError = class extends StorybookError {
|
|
557
|
-
static {
|
|
558
|
-
__name(this, "UpgradeStorybookUnknownCurrentVersionError");
|
|
559
|
-
}
|
|
399
|
+
}, UpgradeStorybookUnknownCurrentVersionError = class extends StorybookError {
|
|
560
400
|
constructor() {
|
|
561
401
|
super({
|
|
402
|
+
name: "UpgradeStorybookUnknownCurrentVersionError",
|
|
562
403
|
category: "CLI_UPGRADE" /* CLI_UPGRADE */,
|
|
563
404
|
code: 5,
|
|
564
405
|
message: import_ts_dedent.dedent`
|
|
@@ -568,13 +409,10 @@ var UpgradeStorybookUnknownCurrentVersionError = class extends StorybookError {
|
|
|
568
409
|
It might help if you specify your Storybook config directory with the --config-dir flag.`
|
|
569
410
|
});
|
|
570
411
|
}
|
|
571
|
-
}
|
|
572
|
-
var NoStatsForViteDevError = class extends StorybookError {
|
|
573
|
-
static {
|
|
574
|
-
__name(this, "NoStatsForViteDevError");
|
|
575
|
-
}
|
|
412
|
+
}, NoStatsForViteDevError = class extends StorybookError {
|
|
576
413
|
constructor() {
|
|
577
414
|
super({
|
|
415
|
+
name: "NoStatsForViteDevError",
|
|
578
416
|
category: "BUILDER-VITE" /* BUILDER_VITE */,
|
|
579
417
|
code: 1,
|
|
580
418
|
message: import_ts_dedent.dedent`
|
|
@@ -583,10 +421,10 @@ var NoStatsForViteDevError = class extends StorybookError {
|
|
|
583
421
|
Please remove the \`--stats-json\` flag when running in dev mode.`
|
|
584
422
|
});
|
|
585
423
|
}
|
|
586
|
-
}
|
|
587
|
-
var FindPackageVersionsError = class extends StorybookError {
|
|
424
|
+
}, FindPackageVersionsError = class extends StorybookError {
|
|
588
425
|
constructor(data) {
|
|
589
426
|
super({
|
|
427
|
+
name: "FindPackageVersionsError",
|
|
590
428
|
category: "CLI" /* CLI */,
|
|
591
429
|
code: 1,
|
|
592
430
|
message: import_ts_dedent.dedent`
|
|
@@ -595,13 +433,10 @@ var FindPackageVersionsError = class extends StorybookError {
|
|
|
595
433
|
});
|
|
596
434
|
this.data = data;
|
|
597
435
|
}
|
|
598
|
-
|
|
599
|
-
__name(this, "FindPackageVersionsError");
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
var IncompatiblePostCssConfigError = class extends StorybookError {
|
|
436
|
+
}, IncompatiblePostCssConfigError = class extends StorybookError {
|
|
603
437
|
constructor(data) {
|
|
604
438
|
super({
|
|
439
|
+
name: "IncompatiblePostCssConfigError",
|
|
605
440
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
606
441
|
code: 3,
|
|
607
442
|
message: import_ts_dedent.dedent`
|
|
@@ -628,13 +463,10 @@ var IncompatiblePostCssConfigError = class extends StorybookError {
|
|
|
628
463
|
});
|
|
629
464
|
this.data = data;
|
|
630
465
|
}
|
|
631
|
-
|
|
632
|
-
__name(this, "IncompatiblePostCssConfigError");
|
|
633
|
-
}
|
|
634
|
-
};
|
|
635
|
-
var SavingGlobalSettingsFileError = class extends StorybookError {
|
|
466
|
+
}, SavingGlobalSettingsFileError = class extends StorybookError {
|
|
636
467
|
constructor(data) {
|
|
637
468
|
super({
|
|
469
|
+
name: "SavingGlobalSettingsFileError",
|
|
638
470
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
639
471
|
code: 1,
|
|
640
472
|
message: import_ts_dedent.dedent`
|
|
@@ -643,16 +475,10 @@ var SavingGlobalSettingsFileError = class extends StorybookError {
|
|
|
643
475
|
});
|
|
644
476
|
this.data = data;
|
|
645
477
|
}
|
|
646
|
-
|
|
647
|
-
__name(this, "SavingGlobalSettingsFileError");
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
var CommonJsConfigNotSupportedError = class extends StorybookError {
|
|
651
|
-
static {
|
|
652
|
-
__name(this, "CommonJsConfigNotSupportedError");
|
|
653
|
-
}
|
|
478
|
+
}, CommonJsConfigNotSupportedError = class extends StorybookError {
|
|
654
479
|
constructor() {
|
|
655
480
|
super({
|
|
481
|
+
name: "CommonJsConfigNotSupportedError",
|
|
656
482
|
category: "CLI_AUTOMIGRATE" /* CLI_AUTOMIGRATE */,
|
|
657
483
|
code: 1,
|
|
658
484
|
documentation: "https://storybook.js.org/docs/configure/overview?ref=error#es-modules",
|
|
@@ -664,10 +490,21 @@ var CommonJsConfigNotSupportedError = class extends StorybookError {
|
|
|
664
490
|
Please convert your config to use ES modules (import/export syntax).`
|
|
665
491
|
});
|
|
666
492
|
}
|
|
493
|
+
}, AutomigrateError = class extends StorybookError {
|
|
494
|
+
constructor(data) {
|
|
495
|
+
super({
|
|
496
|
+
name: "AutomigrateError",
|
|
497
|
+
category: "CLI_AUTOMIGRATE" /* CLI_AUTOMIGRATE */,
|
|
498
|
+
code: 2,
|
|
499
|
+
message: import_ts_dedent.dedent`
|
|
500
|
+
An error occurred while running the automigrate command.
|
|
501
|
+
`
|
|
502
|
+
});
|
|
503
|
+
this.data = data;
|
|
504
|
+
}
|
|
667
505
|
};
|
|
668
506
|
|
|
669
507
|
export {
|
|
670
|
-
StorybookError,
|
|
671
508
|
Category,
|
|
672
509
|
NxProjectDetectedError,
|
|
673
510
|
MissingFrameworkFieldError,
|
|
@@ -690,11 +527,14 @@ export {
|
|
|
690
527
|
MainFileEvaluationError,
|
|
691
528
|
StatusTypeIdMismatchError,
|
|
692
529
|
GenerateNewProjectOnInitError,
|
|
530
|
+
AddonVitestPostinstallPrerequisiteCheckError,
|
|
531
|
+
AddonVitestPostinstallError,
|
|
693
532
|
UpgradeStorybookToLowerVersionError,
|
|
694
533
|
UpgradeStorybookUnknownCurrentVersionError,
|
|
695
534
|
NoStatsForViteDevError,
|
|
696
535
|
FindPackageVersionsError,
|
|
697
536
|
IncompatiblePostCssConfigError,
|
|
698
537
|
SavingGlobalSettingsFileError,
|
|
699
|
-
CommonJsConfigNotSupportedError
|
|
538
|
+
CommonJsConfigNotSupportedError,
|
|
539
|
+
AutomigrateError
|
|
700
540
|
};
|