storybook 9.0.0-alpha.13 → 9.0.0-alpha.15

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.
Files changed (36) hide show
  1. package/dist/actions/decorator.js +46 -47
  2. package/dist/actions/index.cjs +28 -29
  3. package/dist/actions/index.d.ts +0 -3
  4. package/dist/actions/index.js +27 -28
  5. package/dist/actions/preview.cjs +22 -23
  6. package/dist/actions/preview.js +18 -19
  7. package/dist/bin/index.cjs +67 -71
  8. package/dist/bin/index.js +56 -60
  9. package/dist/channels/index.cjs +1018 -948
  10. package/dist/channels/index.js +1194 -1161
  11. package/dist/cli/bin/index.cjs +1 -1
  12. package/dist/cli/bin/index.js +1 -1
  13. package/dist/cli/index.cjs +1860 -1871
  14. package/dist/cli/index.js +308 -319
  15. package/dist/common/index.cjs +43 -49
  16. package/dist/common/index.d.ts +0 -4
  17. package/dist/common/index.js +43 -49
  18. package/dist/components/index.cjs +6375 -12708
  19. package/dist/components/index.d.ts +1 -2
  20. package/dist/components/index.js +4647 -10782
  21. package/dist/core-server/index.cjs +13626 -13550
  22. package/dist/core-server/index.js +11863 -11787
  23. package/dist/core-server/presets/common-manager.js +3221 -3138
  24. package/dist/manager/globals-runtime.js +29817 -33554
  25. package/dist/manager-api/index.cjs +2518 -2330
  26. package/dist/manager-api/index.js +2432 -2234
  27. package/dist/preview/runtime.js +18415 -16011
  28. package/dist/preview-api/index.cjs +619 -603
  29. package/dist/preview-api/index.d.ts +386 -118
  30. package/dist/preview-api/index.js +542 -526
  31. package/dist/server-errors.cjs +132 -118
  32. package/dist/server-errors.d.ts +4 -2
  33. package/dist/server-errors.js +127 -113
  34. package/dist/test/preview.d.ts +6 -0
  35. package/dist/types/index.d.ts +1 -4
  36. package/package.json +2 -2
@@ -1,42 +1,42 @@
1
1
  "use strict";
2
- var ce = Object.create;
2
+ var ue = Object.create;
3
3
  var y = Object.defineProperty;
4
- var ue = Object.getOwnPropertyDescriptor;
5
- var le = Object.getOwnPropertyNames;
6
- var me = Object.getPrototypeOf, de = Object.prototype.hasOwnProperty;
7
- var s = (t, e) => y(t, "name", { value: e, configurable: !0 });
8
- var z = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), ge = (t, e) => {
4
+ var le = Object.getOwnPropertyDescriptor;
5
+ var me = Object.getOwnPropertyNames;
6
+ var de = Object.getPrototypeOf, be = Object.prototype.hasOwnProperty;
7
+ var r = (t, e) => y(t, "name", { value: e, configurable: !0 });
8
+ var q = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), ge = (t, e) => {
9
9
  for (var o in e)
10
10
  y(t, o, { get: e[o], enumerable: !0 });
11
- }, q = (t, e, o, n) => {
11
+ }, Q = (t, e, o, n) => {
12
12
  if (e && typeof e == "object" || typeof e == "function")
13
- for (let c of le(e))
14
- !de.call(t, c) && c !== o && y(t, c, { get: () => e[c], enumerable: !(n = ue(e, c)) || n.enumerable });
13
+ for (let c of me(e))
14
+ !be.call(t, c) && c !== o && y(t, c, { get: () => e[c], enumerable: !(n = le(e, c)) || n.enumerable });
15
15
  return t;
16
16
  };
17
- var Q = (t, e, o) => (o = t != null ? ce(me(t)) : {}, q(
17
+ var Z = (t, e, o) => (o = t != null ? ue(de(t)) : {}, Q(
18
18
  // If the importer is in node compatibility mode or this is not an ESM
19
19
  // file that has been converted to a CommonJS file using a Babel-
20
20
  // compatible transform (i.e. "__esModule" has not been set), then set
21
21
  // "default" to the CommonJS "module.exports" for node compatibility.
22
22
  e || !t || !t.__esModule ? y(o, "default", { value: t, enumerable: !0 }) : o,
23
23
  t
24
- )), be = (t) => q(y({}, "__esModule", { value: !0 }), t);
24
+ )), pe = (t) => Q(y({}, "__esModule", { value: !0 }), t);
25
25
 
26
26
  // ../node_modules/picocolors/picocolors.js
27
- var oe = z((xe, k) => {
28
- var R = process || {}, Z = R.argv || [], E = R.env || {}, pe = !(E.NO_COLOR || Z.includes("--no-color")) && (!!E.FORCE_COLOR || Z.includes(
29
- "--color") || R.platform === "win32" || (R.stdout || {}).isTTY && E.TERM !== "dumb" || !!E.CI), ye = /* @__PURE__ */ s((t, e, o = t) => (n) => {
27
+ var te = q((Re, k) => {
28
+ var x = process || {}, ee = x.argv || [], E = x.env || {}, ye = !(E.NO_COLOR || ee.includes("--no-color")) && (!!E.FORCE_COLOR || ee.includes(
29
+ "--color") || x.platform === "win32" || (x.stdout || {}).isTTY && E.TERM !== "dumb" || !!E.CI), he = /* @__PURE__ */ r((t, e, o = t) => (n) => {
30
30
  let c = "" + n, u = c.indexOf(e, t.length);
31
- return ~u ? t + he(c, e, o, u) + e : t + c + e;
32
- }, "formatter"), he = /* @__PURE__ */ s((t, e, o, n) => {
31
+ return ~u ? t + Ee(c, e, o, u) + e : t + c + e;
32
+ }, "formatter"), Ee = /* @__PURE__ */ r((t, e, o, n) => {
33
33
  let c = "", u = 0;
34
34
  do
35
35
  c += t.substring(u, n) + o, u = n + e.length, n = t.indexOf(e, u);
36
36
  while (~n);
37
37
  return c + t.substring(u);
38
- }, "replaceClose"), ee = /* @__PURE__ */ s((t = pe) => {
39
- let e = t ? ye : () => String;
38
+ }, "replaceClose"), oe = /* @__PURE__ */ r((t = ye) => {
39
+ let e = t ? he : () => String;
40
40
  return {
41
41
  isColorSupported: t,
42
42
  reset: e("\x1B[0m", "\x1B[0m"),
@@ -82,25 +82,25 @@ var oe = z((xe, k) => {
82
82
  bgWhiteBright: e("\x1B[107m", "\x1B[49m")
83
83
  };
84
84
  }, "createColors");
85
- k.exports = ee();
86
- k.exports.createColors = ee;
85
+ k.exports = oe();
86
+ k.exports.createColors = oe;
87
87
  });
88
88
 
89
89
  // ../node_modules/ts-dedent/dist/index.js
90
- var re = z((h) => {
90
+ var se = q((h) => {
91
91
  "use strict";
92
92
  Object.defineProperty(h, "__esModule", { value: !0 });
93
93
  h.dedent = void 0;
94
- function te(t) {
94
+ function re(t) {
95
95
  for (var e = [], o = 1; o < arguments.length; o++)
96
96
  e[o - 1] = arguments[o];
97
97
  var n = Array.from(typeof t == "string" ? [t] : t);
98
98
  n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
99
- var c = n.reduce(function(m, x) {
100
- var p = x.match(/\n([\t ]+|(?!\s).)/g);
101
- return p ? m.concat(p.map(function(f) {
102
- var g, b;
103
- return (b = (g = f.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && b !== void 0 ? b : 0;
99
+ var c = n.reduce(function(m, f) {
100
+ var p = f.match(/\n([\t ]+|(?!\s).)/g);
101
+ return p ? m.concat(p.map(function(R) {
102
+ var b, g;
103
+ return (g = (b = R.match(/[\t ]/g)) === null || b === void 0 ? void 0 : b.length) !== null && g !== void 0 ? g : 0;
104
104
  })) : m;
105
105
  }, []);
106
106
  if (c.length) {
@@ -113,65 +113,66 @@ var re = z((h) => {
113
113
  }
114
114
  n[0] = n[0].replace(/^\r?\n/, "");
115
115
  var d = n[0];
116
- return e.forEach(function(m, x) {
117
- var p = d.match(/(?:^|\n)( *)$/), f = p ? p[1] : "", g = m;
116
+ return e.forEach(function(m, f) {
117
+ var p = d.match(/(?:^|\n)( *)$/), R = p ? p[1] : "", b = m;
118
118
  typeof m == "string" && m.includes(`
119
- `) && (g = String(m).split(`
120
- `).map(function(b, ie) {
121
- return ie === 0 ? b : "" + f + b;
119
+ `) && (b = String(m).split(`
120
+ `).map(function(g, ce) {
121
+ return ce === 0 ? g : "" + R + g;
122
122
  }).join(`
123
- `)), d += g + n[x + 1];
123
+ `)), d += b + n[f + 1];
124
124
  }), d;
125
125
  }
126
- s(te, "dedent");
127
- h.dedent = te;
128
- h.default = te;
126
+ r(re, "dedent");
127
+ h.dedent = re;
128
+ h.default = re;
129
129
  });
130
130
 
131
131
  // src/server-errors.ts
132
- var Ee = {};
133
- ge(Ee, {
134
- AngularLegacyBuildOptionsError: () => K,
135
- Category: () => ae,
132
+ var xe = {};
133
+ ge(xe, {
134
+ AngularLegacyBuildOptionsError: () => W,
135
+ Category: () => ie,
136
136
  ConflictingStaticDirConfigError: () => w,
137
137
  CouldNotEvaluateFrameworkError: () => C,
138
- CriticalPresetLoadError: () => v,
139
- FindPackageVersionsError: () => X,
140
- GenerateNewProjectOnInitError: () => D,
138
+ CriticalPresetLoadError: () => K,
139
+ FindPackageVersionsError: () => z,
140
+ GenerateNewProjectOnInitError: () => U,
141
141
  GoogleFontsDownloadError: () => B,
142
142
  GoogleFontsLoadingError: () => P,
143
143
  InvalidFrameworkNameError: () => _,
144
144
  InvalidStoriesEntryError: () => I,
145
145
  MainFileESMOnlyImportError: () => V,
146
- MainFileEvaluationError: () => j,
146
+ MainFileEvaluationError: () => F,
147
147
  MainFileMissingError: () => $,
148
- MissingAngularJsonError: () => W,
148
+ MissingAngularJsonError: () => v,
149
149
  MissingBuilderError: () => L,
150
150
  MissingFrameworkFieldError: () => A,
151
- NoMatchingExportError: () => N,
152
- NoStatsForViteDevError: () => J,
151
+ NoMatchingExportError: () => j,
152
+ NoStatsForViteDevError: () => X,
153
153
  NxProjectDetectedError: () => O,
154
- StatusTypeIdMismatchError: () => F,
155
- UpgradeStorybookInWrongWorkingDirectory: () => H,
156
- UpgradeStorybookToLowerVersionError: () => U,
157
- UpgradeStorybookToSameVersionError: () => G,
158
- UpgradeStorybookUnknownCurrentVersionError: () => Y,
154
+ StatusTypeIdMismatchError: () => D,
155
+ SvelteViteWithSvelteKitError: () => N,
156
+ UpgradeStorybookInWrongWorkingDirectory: () => J,
157
+ UpgradeStorybookToLowerVersionError: () => G,
158
+ UpgradeStorybookToSameVersionError: () => Y,
159
+ UpgradeStorybookUnknownCurrentVersionError: () => H,
159
160
  WebpackCompilationError: () => T,
160
- WebpackInvocationError: () => M,
161
- WebpackMissingStatsError: () => S
161
+ WebpackInvocationError: () => S,
162
+ WebpackMissingStatsError: () => M
162
163
  });
163
- module.exports = be(Ee);
164
- var l = Q(oe(), 1), i = Q(re(), 1);
164
+ module.exports = pe(xe);
165
+ var l = Z(te(), 1), i = Z(se(), 1);
165
166
 
166
167
  // src/storybook-error.ts
167
- function se({
168
+ function ne({
168
169
  code: t,
169
170
  category: e
170
171
  }) {
171
172
  let o = String(t).padStart(4, "0");
172
173
  return `SB_${e}_${o}`;
173
174
  }
174
- s(se, "parseErrorCode");
175
+ r(ne, "parseErrorCode");
175
176
  var a = class t extends Error {
176
177
  constructor(o) {
177
178
  super(t.getFullMessage(o));
@@ -185,10 +186,10 @@ var a = class t extends Error {
185
186
  this.category = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
186
187
  }
187
188
  static {
188
- s(this, "StorybookError");
189
+ r(this, "StorybookError");
189
190
  }
190
191
  get fullErrorCode() {
191
- return se({ code: this.code, category: this.category });
192
+ return ne({ code: this.code, category: this.category });
192
193
  }
193
194
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
194
195
  get name() {
@@ -203,7 +204,7 @@ var a = class t extends Error {
203
204
  message: u
204
205
  }) {
205
206
  let d;
206
- return o === !0 ? d = `https://storybook.js.org/error/${se({ code: n, category: c })}` : typeof o == "string" ? d = o : Array.isArray(o) &&
207
+ return o === !0 ? d = `https://storybook.js.org/error/${ne({ code: n, category: c })}` : typeof o == "string" ? d = o : Array.isArray(o) &&
207
208
  (d = `
208
209
  ${o.map((m) => ` - ${m}`).join(`
209
210
  `)}`), `${u}${d != null ? `
@@ -214,20 +215,19 @@ More info: ${d}
214
215
  };
215
216
 
216
217
  // src/server-errors.ts
217
- var ae = /* @__PURE__ */ ((r) => (r.CLI = "CLI", r.CLI_INIT = "CLI_INIT", r.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", r.CLI_UPGRADE = "CLI_UPGRAD\
218
- E", r.CLI_ADD = "CLI_ADD", r.CODEMOD = "CODEMOD", r.CORE_SERVER = "CORE-SERVER", r.CSF_PLUGIN = "CSF-PLUGIN", r.CSF_TOOLS = "CSF-TOOLS", r.CORE_COMMON =
219
- "CORE-COMMON", r.NODE_LOGGER = "NODE-LOGGER", r.TELEMETRY = "TELEMETRY", r.BUILDER_MANAGER = "BUILDER-MANAGER", r.BUILDER_VITE = "BUILDER-VI\
220
- TE", r.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", r.SOURCE_LOADER = "SOURCE-LOADER", r.POSTINSTALL = "POSTINSTALL", r.DOCS_TOOLS = "DOCS-TOOLS",
221
- r.CORE_WEBPACK = "CORE-WEBPACK", r.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", r.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", r.FRAMEWORK_HTML_VITE = "\
222
- FRAMEWORK_HTML-VITE", r.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", r.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", r.FRAMEWORK_PREACT_VITE =
223
- "FRAMEWORK_PREACT-VITE", r.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", r.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", r.FRAMEWORK_REACT_WEBPACK5 =
224
- "FRAMEWORK_REACT-WEBPACK5", r.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", r.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", r.
225
- FRAMEWORK_SVELTE_WEBPACK5 = "FRAMEWORK_SVELTE-WEBPACK5", r.FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", r.FRAMEWORK_VUE_VITE = "FRAMEWORK_VU\
226
- E-VITE", r.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5", r.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", r.FRAMEWORK_VUE3_WEBPACK5 = "FR\
227
- AMEWORK_VUE3-WEBPACK5", r.FRAMEWORK_WEB_COMPONENTS_VITE = "FRAMEWORK_WEB-COMPONENTS-VITE", r.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_\
228
- WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
218
+ var ie = /* @__PURE__ */ ((s) => (s.CLI = "CLI", s.CLI_INIT = "CLI_INIT", s.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", s.CLI_UPGRADE = "CLI_UPGRAD\
219
+ E", s.CLI_ADD = "CLI_ADD", s.CODEMOD = "CODEMOD", s.CORE_SERVER = "CORE-SERVER", s.CSF_PLUGIN = "CSF-PLUGIN", s.CSF_TOOLS = "CSF-TOOLS", s.CORE_COMMON =
220
+ "CORE-COMMON", s.NODE_LOGGER = "NODE-LOGGER", s.TELEMETRY = "TELEMETRY", s.BUILDER_MANAGER = "BUILDER-MANAGER", s.BUILDER_VITE = "BUILDER-VI\
221
+ TE", s.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", s.SOURCE_LOADER = "SOURCE-LOADER", s.POSTINSTALL = "POSTINSTALL", s.DOCS_TOOLS = "DOCS-TOOLS",
222
+ s.CORE_WEBPACK = "CORE-WEBPACK", s.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", s.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", s.FRAMEWORK_HTML_VITE = "\
223
+ FRAMEWORK_HTML-VITE", s.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.FRAMEWORK_PREACT_VITE =
224
+ "FRAMEWORK_PREACT-VITE", s.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", s.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", s.FRAMEWORK_REACT_WEBPACK5 =
225
+ "FRAMEWORK_REACT-WEBPACK5", s.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", s.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", s.
226
+ FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", s.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", s.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
227
+ s.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", s.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", s.FRAMEWORK_WEB_COMPONENTS_VITE = "FRA\
228
+ MEWORK_WEB-COMPONENTS-VITE", s.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", s))(ie || {}), O = class extends a {
229
229
  static {
230
- s(this, "NxProjectDetectedError");
230
+ r(this, "NxProjectDetectedError");
231
231
  }
232
232
  constructor() {
233
233
  super({
@@ -241,7 +241,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
241
241
  }
242
242
  }, A = class extends a {
243
243
  static {
244
- s(this, "MissingFrameworkFieldError");
244
+ r(this, "MissingFrameworkFieldError");
245
245
  }
246
246
  constructor() {
247
247
  super({
@@ -269,7 +269,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
269
269
  this.data = o;
270
270
  }
271
271
  static {
272
- s(this, "InvalidFrameworkNameError");
272
+ r(this, "InvalidFrameworkNameError");
273
273
  }
274
274
  }, C = class extends a {
275
275
  constructor(o) {
@@ -285,11 +285,11 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
285
285
  this.data = o;
286
286
  }
287
287
  static {
288
- s(this, "CouldNotEvaluateFrameworkError");
288
+ r(this, "CouldNotEvaluateFrameworkError");
289
289
  }
290
290
  }, w = class extends a {
291
291
  static {
292
- s(this, "ConflictingStaticDirConfigError");
292
+ r(this, "ConflictingStaticDirConfigError");
293
293
  }
294
294
  constructor() {
295
295
  super({
@@ -306,7 +306,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
306
306
  }
307
307
  }, I = class extends a {
308
308
  static {
309
- s(this, "InvalidStoriesEntryError");
309
+ r(this, "InvalidStoriesEntryError");
310
310
  }
311
311
  constructor() {
312
312
  super({
@@ -320,9 +320,9 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
320
320
  Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
321
321
  });
322
322
  }
323
- }, S = class extends a {
323
+ }, M = class extends a {
324
324
  static {
325
- s(this, "WebpackMissingStatsError");
325
+ r(this, "WebpackMissingStatsError");
326
326
  }
327
327
  constructor() {
328
328
  super({
@@ -337,7 +337,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
337
337
  Storybook needs Webpack stats (including errors) in order to build correctly.`
338
338
  });
339
339
  }
340
- }, M = class extends a {
340
+ }, S = class extends a {
341
341
  constructor(o) {
342
342
  super({
343
343
  category: "BUILDER-WEBPACK5",
@@ -347,19 +347,19 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
347
347
  this.data = o;
348
348
  }
349
349
  static {
350
- s(this, "WebpackInvocationError");
350
+ r(this, "WebpackInvocationError");
351
351
  }
352
352
  };
353
- function ne(t = "") {
353
+ function ae(t = "") {
354
354
  return t.replace(/\u001B\[[0-9;]*m/g, "");
355
355
  }
356
- s(ne, "removeAnsiEscapeCodes");
356
+ r(ae, "removeAnsiEscapeCodes");
357
357
  var T = class extends a {
358
358
  constructor(o) {
359
359
  o.errors = o.errors.map((n) => ({
360
360
  ...n,
361
- message: ne(n.message),
362
- stack: ne(n.stack),
361
+ message: ae(n.message),
362
+ stack: ae(n.stack),
363
363
  name: n.name
364
364
  }));
365
365
  super({
@@ -374,9 +374,9 @@ var T = class extends a {
374
374
  this.data = o;
375
375
  }
376
376
  static {
377
- s(this, "WebpackCompilationError");
377
+ r(this, "WebpackCompilationError");
378
378
  }
379
- }, W = class extends a {
379
+ }, v = class extends a {
380
380
  constructor(o) {
381
381
  super({
382
382
  category: "CLI_INIT",
@@ -389,11 +389,11 @@ var T = class extends a {
389
389
  this.data = o;
390
390
  }
391
391
  static {
392
- s(this, "MissingAngularJsonError");
392
+ r(this, "MissingAngularJsonError");
393
393
  }
394
- }, K = class extends a {
394
+ }, W = class extends a {
395
395
  static {
396
- s(this, "AngularLegacyBuildOptionsError");
396
+ r(this, "AngularLegacyBuildOptionsError");
397
397
  }
398
398
  constructor() {
399
399
  super({
@@ -410,7 +410,7 @@ var T = class extends a {
410
410
  Please run 'npx storybook automigrate' to automatically fix your config.`
411
411
  });
412
412
  }
413
- }, v = class extends a {
413
+ }, K = class extends a {
414
414
  constructor(o) {
415
415
  super({
416
416
  category: "CORE-SERVER",
@@ -428,11 +428,11 @@ var T = class extends a {
428
428
  this.data = o;
429
429
  }
430
430
  static {
431
- s(this, "CriticalPresetLoadError");
431
+ r(this, "CriticalPresetLoadError");
432
432
  }
433
433
  }, L = class extends a {
434
434
  static {
435
- s(this, "MissingBuilderError");
435
+ r(this, "MissingBuilderError");
436
436
  }
437
437
  constructor() {
438
438
  super({
@@ -463,7 +463,7 @@ var T = class extends a {
463
463
  this.data = o;
464
464
  }
465
465
  static {
466
- s(this, "GoogleFontsDownloadError");
466
+ r(this, "GoogleFontsDownloadError");
467
467
  }
468
468
  }, P = class extends a {
469
469
  constructor(o) {
@@ -479,9 +479,23 @@ var T = class extends a {
479
479
  this.data = o;
480
480
  }
481
481
  static {
482
- s(this, "GoogleFontsLoadingError");
482
+ r(this, "GoogleFontsLoadingError");
483
483
  }
484
484
  }, N = class extends a {
485
+ static {
486
+ r(this, "SvelteViteWithSvelteKitError");
487
+ }
488
+ constructor() {
489
+ super({
490
+ category: "FRAMEWORK_SVELTE-VITE",
491
+ code: 1,
492
+ documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
493
+ message: i.dedent`
494
+ We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported.
495
+ Please use the @storybook/sveltekit framework instead.`
496
+ });
497
+ }
498
+ }, j = class extends a {
485
499
  constructor(o) {
486
500
  super({
487
501
  category: "CORE-SERVER",
@@ -502,7 +516,7 @@ var T = class extends a {
502
516
  this.data = o;
503
517
  }
504
518
  static {
505
- s(this, "NoMatchingExportError");
519
+ r(this, "NoMatchingExportError");
506
520
  }
507
521
  }, V = class extends a {
508
522
  constructor(o) {
@@ -539,7 +553,7 @@ var T = class extends a {
539
553
  this.data = o;
540
554
  }
541
555
  static {
542
- s(this, "MainFileESMOnlyImportError");
556
+ r(this, "MainFileESMOnlyImportError");
543
557
  }
544
558
  }, $ = class extends a {
545
559
  constructor(o) {
@@ -567,9 +581,9 @@ var T = class extends a {
567
581
  this.data = o;
568
582
  }
569
583
  static {
570
- s(this, "MainFileMissingError");
584
+ r(this, "MainFileMissingError");
571
585
  }
572
- }, j = class extends a {
586
+ }, F = class extends a {
573
587
  constructor(o) {
574
588
  let n = l.default.white(
575
589
  (o.error.stack || o.error.message).replaceAll(process.cwd(), "")
@@ -586,9 +600,9 @@ var T = class extends a {
586
600
  this.data = o;
587
601
  }
588
602
  static {
589
- s(this, "MainFileEvaluationError");
603
+ r(this, "MainFileEvaluationError");
590
604
  }
591
- }, F = class extends a {
605
+ }, D = class extends a {
592
606
  constructor(o) {
593
607
  super({
594
608
  category: "CORE-SERVER",
@@ -602,9 +616,9 @@ var T = class extends a {
602
616
  this.data = o;
603
617
  }
604
618
  static {
605
- s(this, "StatusTypeIdMismatchError");
619
+ r(this, "StatusTypeIdMismatchError");
606
620
  }
607
- }, D = class extends a {
621
+ }, U = class extends a {
608
622
  constructor(o) {
609
623
  super({
610
624
  category: "CLI_INIT",
@@ -618,9 +632,9 @@ var T = class extends a {
618
632
  this.data = o;
619
633
  }
620
634
  static {
621
- s(this, "GenerateNewProjectOnInitError");
635
+ r(this, "GenerateNewProjectOnInitError");
622
636
  }
623
- }, U = class extends a {
637
+ }, G = class extends a {
624
638
  constructor(o) {
625
639
  super({
626
640
  category: "CLI_UPGRADE",
@@ -640,9 +654,9 @@ var T = class extends a {
640
654
  this.data = o;
641
655
  }
642
656
  static {
643
- s(this, "UpgradeStorybookToLowerVersionError");
657
+ r(this, "UpgradeStorybookToLowerVersionError");
644
658
  }
645
- }, G = class extends a {
659
+ }, Y = class extends a {
646
660
  constructor(o) {
647
661
  super({
648
662
  category: "CLI_UPGRADE",
@@ -665,11 +679,11 @@ var T = class extends a {
665
679
  this.data = o;
666
680
  }
667
681
  static {
668
- s(this, "UpgradeStorybookToSameVersionError");
682
+ r(this, "UpgradeStorybookToSameVersionError");
669
683
  }
670
- }, Y = class extends a {
684
+ }, H = class extends a {
671
685
  static {
672
- s(this, "UpgradeStorybookUnknownCurrentVersionError");
686
+ r(this, "UpgradeStorybookUnknownCurrentVersionError");
673
687
  }
674
688
  constructor() {
675
689
  super({
@@ -682,9 +696,9 @@ var T = class extends a {
682
696
  It might help if you specify your Storybook config directory with the --config-dir flag.`
683
697
  });
684
698
  }
685
- }, H = class extends a {
699
+ }, J = class extends a {
686
700
  static {
687
- s(this, "UpgradeStorybookInWrongWorkingDirectory");
701
+ r(this, "UpgradeStorybookInWrongWorkingDirectory");
688
702
  }
689
703
  constructor() {
690
704
  super({
@@ -696,9 +710,9 @@ var T = class extends a {
696
710
  Did you mean to run it in a different directory? Make sure the directory you run this command in contains a package.json with your Storybook dependencies.`
697
711
  });
698
712
  }
699
- }, J = class extends a {
713
+ }, X = class extends a {
700
714
  static {
701
- s(this, "NoStatsForViteDevError");
715
+ r(this, "NoStatsForViteDevError");
702
716
  }
703
717
  constructor() {
704
718
  super({
@@ -710,7 +724,7 @@ var T = class extends a {
710
724
  Please remove the \`--stats-json\` flag when running in dev mode.`
711
725
  });
712
726
  }
713
- }, X = class extends a {
727
+ }, z = class extends a {
714
728
  constructor(o) {
715
729
  super({
716
730
  category: "CLI",
@@ -722,6 +736,6 @@ var T = class extends a {
722
736
  this.data = o;
723
737
  }
724
738
  static {
725
- s(this, "FindPackageVersionsError");
739
+ r(this, "FindPackageVersionsError");
726
740
  }
727
741
  };
@@ -83,7 +83,6 @@ declare enum Category {
83
83
  FRAMEWORK_REACT_WEBPACK5 = "FRAMEWORK_REACT-WEBPACK5",
84
84
  FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5",
85
85
  FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE",
86
- FRAMEWORK_SVELTE_WEBPACK5 = "FRAMEWORK_SVELTE-WEBPACK5",
87
86
  FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT",
88
87
  FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE",
89
88
  FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
@@ -191,6 +190,9 @@ declare class GoogleFontsLoadingError extends StorybookError {
191
190
  url: string;
192
191
  });
193
192
  }
193
+ declare class SvelteViteWithSvelteKitError extends StorybookError {
194
+ constructor();
195
+ }
194
196
  declare class NoMatchingExportError extends StorybookError {
195
197
  data: {
196
198
  error: unknown | Error;
@@ -293,4 +295,4 @@ declare class FindPackageVersionsError extends StorybookError {
293
295
  });
294
296
  }
295
297
 
296
- export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileESMOnlyImportError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, StatusTypeIdMismatchError, UpgradeStorybookInWrongWorkingDirectory, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
298
+ export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileESMOnlyImportError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookInWrongWorkingDirectory, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };