storybook 9.0.0-alpha.8 → 9.0.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.
Files changed (140) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/addon-controls-args-annotated.png +0 -0
  3. package/assets/docs/addon-controls-args-background-color.png +0 -0
  4. package/assets/docs/addon-controls-args-background-string.png +0 -0
  5. package/assets/docs/addon-controls-args-docs.png +0 -0
  6. package/assets/docs/addon-controls-args-logging.png +0 -0
  7. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  8. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow.png +0 -0
  10. package/assets/docs/addon-controls-args-template.png +0 -0
  11. package/assets/docs/addon-controls-expanded.png +0 -0
  12. package/assets/docs/addon-controls-hero.gif +0 -0
  13. package/assets/docs/addon-controls-install.png +0 -0
  14. package/assets/docs/hero.gif +0 -0
  15. package/assets/docs/highlight.png +0 -0
  16. package/assets/docs/viewport.png +0 -0
  17. package/assets/server/base-preview-head.html +1 -3
  18. package/bin/index.cjs +2 -2
  19. package/dist/actions/decorator.js +67 -72
  20. package/dist/actions/index.cjs +27 -31
  21. package/dist/actions/index.d.ts +0 -3
  22. package/dist/actions/index.js +27 -31
  23. package/dist/actions/preview.cjs +23 -27
  24. package/dist/actions/preview.d.ts +0 -1
  25. package/dist/actions/preview.js +19 -23
  26. package/dist/babel/index.cjs +822 -816
  27. package/dist/babel/index.js +822 -816
  28. package/dist/backgrounds/index.cjs +148 -0
  29. package/dist/backgrounds/index.d.ts +91 -0
  30. package/dist/backgrounds/index.js +130 -0
  31. package/dist/backgrounds/preview.cjs +143 -0
  32. package/dist/backgrounds/preview.d.ts +54 -0
  33. package/dist/backgrounds/preview.js +127 -0
  34. package/dist/bin/index.cjs +73 -92
  35. package/dist/bin/index.js +66 -85
  36. package/dist/builder-manager/index.cjs +316 -296
  37. package/dist/builder-manager/index.js +567 -547
  38. package/dist/channels/index.cjs +1020 -950
  39. package/dist/channels/index.js +1256 -1201
  40. package/dist/cli/bin/index.cjs +198 -198
  41. package/dist/cli/bin/index.js +204 -204
  42. package/dist/cli/index.cjs +61734 -7589
  43. package/dist/cli/index.d.ts +24 -20
  44. package/dist/cli/index.js +61775 -7630
  45. package/dist/common/index.cjs +16175 -9123
  46. package/dist/common/index.d.ts +34 -25
  47. package/dist/common/index.js +16270 -9212
  48. package/dist/component-testing/index.cjs +23 -0
  49. package/dist/component-testing/index.d.ts +3 -0
  50. package/dist/component-testing/index.js +5 -0
  51. package/dist/component-testing/preview.cjs +40 -0
  52. package/dist/component-testing/preview.d.ts +5 -0
  53. package/dist/component-testing/preview.js +25 -0
  54. package/dist/components/index.cjs +6479 -13005
  55. package/dist/components/index.d.ts +8 -257
  56. package/dist/components/index.js +6160 -18689
  57. package/dist/controls/decorator.d.ts +5 -0
  58. package/dist/controls/decorator.js +8 -0
  59. package/dist/controls/index.cjs +26 -0
  60. package/dist/controls/index.d.ts +39 -0
  61. package/dist/controls/index.js +6 -0
  62. package/dist/controls/preview.cjs +26 -0
  63. package/dist/controls/preview.d.ts +54 -0
  64. package/dist/controls/preview.js +9 -0
  65. package/dist/core-events/index.cjs +91 -106
  66. package/dist/core-events/index.d.ts +2 -80
  67. package/dist/core-events/index.js +79 -94
  68. package/dist/core-server/index.cjs +12314 -12114
  69. package/dist/core-server/index.d.ts +32 -23
  70. package/dist/core-server/index.js +12495 -12296
  71. package/dist/core-server/presets/common-manager.css +170 -0
  72. package/dist/core-server/presets/common-manager.js +12153 -12
  73. package/dist/core-server/presets/common-preset.cjs +3004 -3151
  74. package/dist/core-server/presets/common-preset.js +2833 -2981
  75. package/dist/csf/index.d.ts +1 -3
  76. package/dist/csf-tools/index.cjs +412 -403
  77. package/dist/csf-tools/index.d.ts +0 -4
  78. package/dist/csf-tools/index.js +410 -401
  79. package/dist/docs-tools/index.cjs +2569 -575
  80. package/dist/docs-tools/index.js +2565 -564
  81. package/dist/highlight/index.cjs +27 -0
  82. package/dist/highlight/index.d.ts +61 -0
  83. package/dist/highlight/index.js +7 -0
  84. package/dist/highlight/preview.cjs +535 -0
  85. package/dist/highlight/preview.d.ts +54 -0
  86. package/dist/highlight/preview.js +519 -0
  87. package/dist/instrumenter/index.cjs +1417 -1761
  88. package/dist/instrumenter/index.d.ts +8 -7
  89. package/dist/instrumenter/index.js +1332 -1667
  90. package/dist/manager/globals-module-info.cjs +22 -33
  91. package/dist/manager/globals-module-info.js +7 -18
  92. package/dist/manager/globals-runtime.js +45449 -49535
  93. package/dist/manager/runtime.js +4392 -3774
  94. package/dist/manager-api/index.cjs +2622 -2529
  95. package/dist/manager-api/index.d.ts +109 -114
  96. package/dist/manager-api/index.js +2603 -2475
  97. package/dist/manager-errors.js +41 -37
  98. package/dist/measure/index.cjs +476 -0
  99. package/dist/measure/index.d.ts +66 -0
  100. package/dist/measure/index.js +464 -0
  101. package/dist/measure/preview.cjs +466 -0
  102. package/dist/measure/preview.d.ts +59 -0
  103. package/dist/measure/preview.js +450 -0
  104. package/dist/outline/index.cjs +528 -0
  105. package/dist/outline/index.d.ts +66 -0
  106. package/dist/outline/index.js +500 -0
  107. package/dist/outline/preview.cjs +518 -0
  108. package/dist/outline/preview.d.ts +59 -0
  109. package/dist/outline/preview.js +486 -0
  110. package/dist/preview/runtime.js +42328 -38511
  111. package/dist/preview-api/index.cjs +1204 -1293
  112. package/dist/preview-api/index.d.ts +126 -178
  113. package/dist/preview-api/index.js +1614 -1685
  114. package/dist/preview-errors.cjs +65 -51
  115. package/dist/preview-errors.d.ts +6 -2
  116. package/dist/preview-errors.js +176 -142
  117. package/dist/server-errors.cjs +160 -113
  118. package/dist/server-errors.d.ts +12 -2
  119. package/dist/server-errors.js +157 -110
  120. package/dist/telemetry/index.cjs +407 -403
  121. package/dist/telemetry/index.d.ts +1 -1
  122. package/dist/telemetry/index.js +493 -489
  123. package/dist/test/index.cjs +1553 -1552
  124. package/dist/test/index.js +9603 -9514
  125. package/dist/test/preview.cjs +1906 -1905
  126. package/dist/test/preview.d.ts +0 -6
  127. package/dist/test/preview.js +3664 -3603
  128. package/dist/test/spy.cjs +65 -64
  129. package/dist/test/spy.js +59 -58
  130. package/dist/types/index.cjs +11 -12
  131. package/dist/types/index.d.ts +601 -338
  132. package/dist/types/index.js +1 -2
  133. package/dist/viewport/index.cjs +310 -0
  134. package/dist/viewport/index.d.ts +320 -0
  135. package/dist/viewport/index.js +290 -0
  136. package/dist/viewport/preview.cjs +35 -0
  137. package/dist/viewport/preview.d.ts +68 -0
  138. package/dist/viewport/preview.js +19 -0
  139. package/package.json +207 -12
  140. package/dist/actions/manager.js +0 -1196
@@ -4,42 +4,42 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
4
4
  const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
5
5
  const __dirname = ESM_COMPAT_dirname(__filename);
6
6
  const require = ESM_COMPAT_Module.createRequire(import.meta.url);
7
- var ae = Object.create;
8
- var f = Object.defineProperty;
9
- var ie = Object.getOwnPropertyDescriptor;
10
- var ce = Object.getOwnPropertyNames;
11
- var ue = Object.getPrototypeOf, le = Object.prototype.hasOwnProperty;
12
- var s = (t, e) => f(t, "name", { value: e, configurable: !0 });
7
+ var ce = Object.create;
8
+ var R = Object.defineProperty;
9
+ var ue = Object.getOwnPropertyDescriptor;
10
+ var le = Object.getOwnPropertyNames;
11
+ var me = Object.getPrototypeOf, de = Object.prototype.hasOwnProperty;
12
+ var r = (t, e) => R(t, "name", { value: e, configurable: !0 });
13
13
  var O = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
14
- var me = (t, e, o, n) => {
14
+ var ge = (t, e, o, n) => {
15
15
  if (e && typeof e == "object" || typeof e == "function")
16
- for (let c of ce(e))
17
- !le.call(t, c) && c !== o && f(t, c, { get: () => e[c], enumerable: !(n = ie(e, c)) || n.enumerable });
16
+ for (let c of le(e))
17
+ !de.call(t, c) && c !== o && R(t, c, { get: () => e[c], enumerable: !(n = ue(e, c)) || n.enumerable });
18
18
  return t;
19
19
  };
20
- var A = (t, e, o) => (o = t != null ? ae(ue(t)) : {}, me(
20
+ var A = (t, e, o) => (o = t != null ? ce(me(t)) : {}, ge(
21
21
  // If the importer is in node compatibility mode or this is not an ESM
22
22
  // file that has been converted to a CommonJS file using a Babel-
23
23
  // compatible transform (i.e. "__esModule" has not been set), then set
24
24
  // "default" to the CommonJS "module.exports" for node compatibility.
25
- e || !t || !t.__esModule ? f(o, "default", { value: t, enumerable: !0 }) : o,
25
+ e || !t || !t.__esModule ? R(o, "default", { value: t, enumerable: !0 }) : o,
26
26
  t
27
27
  ));
28
28
 
29
29
  // ../node_modules/picocolors/picocolors.js
30
- var w = O((he, k) => {
31
- var E = process || {}, _ = E.argv || [], h = E.env || {}, de = !(h.NO_COLOR || _.includes("--no-color")) && (!!h.FORCE_COLOR || _.includes(
32
- "--color") || E.platform === "win32" || (E.stdout || {}).isTTY && h.TERM !== "dumb" || !!h.CI), ge = /* @__PURE__ */ s((t, e, o = t) => (n) => {
30
+ var C = O((fe, k) => {
31
+ var E = process || {}, _ = E.argv || [], h = E.env || {}, be = !(h.NO_COLOR || _.includes("--no-color")) && (!!h.FORCE_COLOR || _.includes(
32
+ "--color") || E.platform === "win32" || (E.stdout || {}).isTTY && h.TERM !== "dumb" || !!h.CI), pe = /* @__PURE__ */ r((t, e, o = t) => (n) => {
33
33
  let c = "" + n, u = c.indexOf(e, t.length);
34
- return ~u ? t + be(c, e, o, u) + e : t + c + e;
35
- }, "formatter"), be = /* @__PURE__ */ s((t, e, o, n) => {
34
+ return ~u ? t + ye(c, e, o, u) + e : t + c + e;
35
+ }, "formatter"), ye = /* @__PURE__ */ r((t, e, o, n) => {
36
36
  let c = "", u = 0;
37
37
  do
38
38
  c += t.substring(u, n) + o, u = n + e.length, n = t.indexOf(e, u);
39
39
  while (~n);
40
40
  return c + t.substring(u);
41
- }, "replaceClose"), C = /* @__PURE__ */ s((t = de) => {
42
- let e = t ? ge : () => String;
41
+ }, "replaceClose"), w = /* @__PURE__ */ r((t = be) => {
42
+ let e = t ? pe : () => String;
43
43
  return {
44
44
  isColorSupported: t,
45
45
  reset: e("\x1B[0m", "\x1B[0m"),
@@ -85,8 +85,8 @@ var w = O((he, k) => {
85
85
  bgWhiteBright: e("\x1B[107m", "\x1B[49m")
86
86
  };
87
87
  }, "createColors");
88
- k.exports = C();
89
- k.exports.createColors = C;
88
+ k.exports = w();
89
+ k.exports.createColors = w;
90
90
  });
91
91
 
92
92
  // ../node_modules/ts-dedent/dist/index.js
@@ -99,8 +99,8 @@ var S = O((y) => {
99
99
  e[o - 1] = arguments[o];
100
100
  var n = Array.from(typeof t == "string" ? [t] : t);
101
101
  n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
102
- var c = n.reduce(function(m, R) {
103
- var p = R.match(/\n([\t ]+|(?!\s).)/g);
102
+ var c = n.reduce(function(m, f) {
103
+ var p = f.match(/\n([\t ]+|(?!\s).)/g);
104
104
  return p ? m.concat(p.map(function(x) {
105
105
  var g, b;
106
106
  return (b = (g = x.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && b !== void 0 ? b : 0;
@@ -116,23 +116,23 @@ var S = O((y) => {
116
116
  }
117
117
  n[0] = n[0].replace(/^\r?\n/, "");
118
118
  var d = n[0];
119
- return e.forEach(function(m, R) {
119
+ return e.forEach(function(m, f) {
120
120
  var p = d.match(/(?:^|\n)( *)$/), x = p ? p[1] : "", g = m;
121
121
  typeof m == "string" && m.includes(`
122
122
  `) && (g = String(m).split(`
123
- `).map(function(b, ne) {
124
- return ne === 0 ? b : "" + x + b;
123
+ `).map(function(b, ie) {
124
+ return ie === 0 ? b : "" + x + b;
125
125
  }).join(`
126
- `)), d += g + n[R + 1];
126
+ `)), d += g + n[f + 1];
127
127
  }), d;
128
128
  }
129
- s(I, "dedent");
129
+ r(I, "dedent");
130
130
  y.dedent = I;
131
131
  y.default = I;
132
132
  });
133
133
 
134
134
  // src/server-errors.ts
135
- var l = A(w(), 1), i = A(S(), 1);
135
+ var l = A(C(), 1), i = A(S(), 1);
136
136
 
137
137
  // src/storybook-error.ts
138
138
  function M({
@@ -142,7 +142,7 @@ function M({
142
142
  let o = String(t).padStart(4, "0");
143
143
  return `SB_${e}_${o}`;
144
144
  }
145
- s(M, "parseErrorCode");
145
+ r(M, "parseErrorCode");
146
146
  var a = class t extends Error {
147
147
  constructor(o) {
148
148
  super(t.getFullMessage(o));
@@ -156,7 +156,7 @@ var a = class t extends Error {
156
156
  this.category = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
157
157
  }
158
158
  static {
159
- s(this, "StorybookError");
159
+ r(this, "StorybookError");
160
160
  }
161
161
  get fullErrorCode() {
162
162
  return M({ code: this.code, category: this.category });
@@ -185,20 +185,19 @@ More info: ${d}
185
185
  };
186
186
 
187
187
  // src/server-errors.ts
188
- var pe = /* @__PURE__ */ ((r) => (r.CLI = "CLI", r.CLI_INIT = "CLI_INIT", r.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", r.CLI_UPGRADE = "CLI_UPGRAD\
189
- 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 =
190
- "CORE-COMMON", r.NODE_LOGGER = "NODE-LOGGER", r.TELEMETRY = "TELEMETRY", r.BUILDER_MANAGER = "BUILDER-MANAGER", r.BUILDER_VITE = "BUILDER-VI\
191
- TE", r.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", r.SOURCE_LOADER = "SOURCE-LOADER", r.POSTINSTALL = "POSTINSTALL", r.DOCS_TOOLS = "DOCS-TOOLS",
192
- r.CORE_WEBPACK = "CORE-WEBPACK", r.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", r.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", r.FRAMEWORK_HTML_VITE = "\
193
- FRAMEWORK_HTML-VITE", r.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", r.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", r.FRAMEWORK_PREACT_VITE =
194
- "FRAMEWORK_PREACT-VITE", r.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", r.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", r.FRAMEWORK_REACT_WEBPACK5 =
195
- "FRAMEWORK_REACT-WEBPACK5", r.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", r.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", r.
196
- FRAMEWORK_SVELTE_WEBPACK5 = "FRAMEWORK_SVELTE-WEBPACK5", r.FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", r.FRAMEWORK_VUE_VITE = "FRAMEWORK_VU\
197
- E-VITE", r.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5", r.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", r.FRAMEWORK_VUE3_WEBPACK5 = "FR\
198
- AMEWORK_VUE3-WEBPACK5", r.FRAMEWORK_WEB_COMPONENTS_VITE = "FRAMEWORK_WEB-COMPONENTS-VITE", r.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_\
199
- WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
188
+ var he = /* @__PURE__ */ ((s) => (s.CLI = "CLI", s.CLI_INIT = "CLI_INIT", s.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", s.CLI_UPGRADE = "CLI_UPGRAD\
189
+ 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 =
190
+ "CORE-COMMON", s.NODE_LOGGER = "NODE-LOGGER", s.TELEMETRY = "TELEMETRY", s.BUILDER_MANAGER = "BUILDER-MANAGER", s.BUILDER_VITE = "BUILDER-VI\
191
+ TE", s.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", s.SOURCE_LOADER = "SOURCE-LOADER", s.POSTINSTALL = "POSTINSTALL", s.DOCS_TOOLS = "DOCS-TOOLS",
192
+ s.CORE_WEBPACK = "CORE-WEBPACK", s.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", s.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", s.FRAMEWORK_HTML_VITE = "\
193
+ FRAMEWORK_HTML-VITE", s.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.FRAMEWORK_PREACT_VITE =
194
+ "FRAMEWORK_PREACT-VITE", s.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", s.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", s.FRAMEWORK_REACT_WEBPACK5 =
195
+ "FRAMEWORK_REACT-WEBPACK5", s.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", s.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", s.
196
+ FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", s.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", s.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
197
+ s.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", s.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", s.FRAMEWORK_WEB_COMPONENTS_VITE = "FRA\
198
+ MEWORK_WEB-COMPONENTS-VITE", s.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", s))(he || {}), T = class extends a {
200
199
  static {
201
- s(this, "NxProjectDetectedError");
200
+ r(this, "NxProjectDetectedError");
202
201
  }
203
202
  constructor() {
204
203
  super({
@@ -212,7 +211,7 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
212
211
  }
213
212
  }, W = class extends a {
214
213
  static {
215
- s(this, "MissingFrameworkFieldError");
214
+ r(this, "MissingFrameworkFieldError");
216
215
  }
217
216
  constructor() {
218
217
  super({
@@ -225,7 +224,7 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
225
224
  Please run 'npx storybook automigrate' to automatically fix your config.`
226
225
  });
227
226
  }
228
- }, K = class extends a {
227
+ }, v = class extends a {
229
228
  constructor(o) {
230
229
  super({
231
230
  category: "CORE-COMMON",
@@ -240,9 +239,9 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
240
239
  this.data = o;
241
240
  }
242
241
  static {
243
- s(this, "InvalidFrameworkNameError");
242
+ r(this, "InvalidFrameworkNameError");
244
243
  }
245
- }, v = class extends a {
244
+ }, K = class extends a {
246
245
  constructor(o) {
247
246
  super({
248
247
  category: "CORE-COMMON",
@@ -256,11 +255,11 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
256
255
  this.data = o;
257
256
  }
258
257
  static {
259
- s(this, "CouldNotEvaluateFrameworkError");
258
+ r(this, "CouldNotEvaluateFrameworkError");
260
259
  }
261
260
  }, L = class extends a {
262
261
  static {
263
- s(this, "ConflictingStaticDirConfigError");
262
+ r(this, "ConflictingStaticDirConfigError");
264
263
  }
265
264
  constructor() {
266
265
  super({
@@ -277,7 +276,7 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
277
276
  }
278
277
  }, B = class extends a {
279
278
  static {
280
- s(this, "InvalidStoriesEntryError");
279
+ r(this, "InvalidStoriesEntryError");
281
280
  }
282
281
  constructor() {
283
282
  super({
@@ -291,9 +290,9 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
291
290
  Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
292
291
  });
293
292
  }
294
- }, P = class extends a {
293
+ }, N = class extends a {
295
294
  static {
296
- s(this, "WebpackMissingStatsError");
295
+ r(this, "WebpackMissingStatsError");
297
296
  }
298
297
  constructor() {
299
298
  super({
@@ -308,7 +307,7 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
308
307
  Storybook needs Webpack stats (including errors) in order to build correctly.`
309
308
  });
310
309
  }
311
- }, N = class extends a {
310
+ }, j = class extends a {
312
311
  constructor(o) {
313
312
  super({
314
313
  category: "BUILDER-WEBPACK5",
@@ -318,19 +317,19 @@ WEB-COMPONENTS-WEBPACK5", r))(pe || {}), T = class extends a {
318
317
  this.data = o;
319
318
  }
320
319
  static {
321
- s(this, "WebpackInvocationError");
320
+ r(this, "WebpackInvocationError");
322
321
  }
323
322
  };
324
- function V(t = "") {
323
+ function P(t = "") {
325
324
  return t.replace(/\u001B\[[0-9;]*m/g, "");
326
325
  }
327
- s(V, "removeAnsiEscapeCodes");
328
- var $ = class extends a {
326
+ r(P, "removeAnsiEscapeCodes");
327
+ var V = class extends a {
329
328
  constructor(o) {
330
329
  o.errors = o.errors.map((n) => ({
331
330
  ...n,
332
- message: V(n.message),
333
- stack: V(n.stack),
331
+ message: P(n.message),
332
+ stack: P(n.stack),
334
333
  name: n.name
335
334
  }));
336
335
  super({
@@ -345,9 +344,9 @@ var $ = class extends a {
345
344
  this.data = o;
346
345
  }
347
346
  static {
348
- s(this, "WebpackCompilationError");
347
+ r(this, "WebpackCompilationError");
349
348
  }
350
- }, j = class extends a {
349
+ }, $ = class extends a {
351
350
  constructor(o) {
352
351
  super({
353
352
  category: "CLI_INIT",
@@ -360,11 +359,11 @@ var $ = class extends a {
360
359
  this.data = o;
361
360
  }
362
361
  static {
363
- s(this, "MissingAngularJsonError");
362
+ r(this, "MissingAngularJsonError");
364
363
  }
365
364
  }, F = class extends a {
366
365
  static {
367
- s(this, "AngularLegacyBuildOptionsError");
366
+ r(this, "AngularLegacyBuildOptionsError");
368
367
  }
369
368
  constructor() {
370
369
  super({
@@ -399,11 +398,11 @@ var $ = class extends a {
399
398
  this.data = o;
400
399
  }
401
400
  static {
402
- s(this, "CriticalPresetLoadError");
401
+ r(this, "CriticalPresetLoadError");
403
402
  }
404
403
  }, U = class extends a {
405
404
  static {
406
- s(this, "MissingBuilderError");
405
+ r(this, "MissingBuilderError");
407
406
  }
408
407
  constructor() {
409
408
  super({
@@ -434,7 +433,7 @@ var $ = class extends a {
434
433
  this.data = o;
435
434
  }
436
435
  static {
437
- s(this, "GoogleFontsDownloadError");
436
+ r(this, "GoogleFontsDownloadError");
438
437
  }
439
438
  }, Y = class extends a {
440
439
  constructor(o) {
@@ -450,9 +449,23 @@ var $ = class extends a {
450
449
  this.data = o;
451
450
  }
452
451
  static {
453
- s(this, "GoogleFontsLoadingError");
452
+ r(this, "GoogleFontsLoadingError");
454
453
  }
455
- }, H = class extends a {
454
+ }, J = class extends a {
455
+ static {
456
+ r(this, "SvelteViteWithSvelteKitError");
457
+ }
458
+ constructor() {
459
+ super({
460
+ category: "FRAMEWORK_SVELTE-VITE",
461
+ code: 1,
462
+ documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
463
+ message: i.dedent`
464
+ We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported.
465
+ Please use the @storybook/sveltekit framework instead.`
466
+ });
467
+ }
468
+ }, X = class extends a {
456
469
  constructor(o) {
457
470
  super({
458
471
  category: "CORE-SERVER",
@@ -473,9 +486,9 @@ var $ = class extends a {
473
486
  this.data = o;
474
487
  }
475
488
  static {
476
- s(this, "NoMatchingExportError");
489
+ r(this, "NoMatchingExportError");
477
490
  }
478
- }, J = class extends a {
491
+ }, H = class extends a {
479
492
  constructor(o) {
480
493
  let n = [
481
494
  `Storybook failed to load ${o.location}`,
@@ -510,9 +523,9 @@ var $ = class extends a {
510
523
  this.data = o;
511
524
  }
512
525
  static {
513
- s(this, "MainFileESMOnlyImportError");
526
+ r(this, "MainFileESMOnlyImportError");
514
527
  }
515
- }, X = class extends a {
528
+ }, z = class extends a {
516
529
  constructor(o) {
517
530
  let n = {
518
531
  storybook: {
@@ -538,9 +551,9 @@ var $ = class extends a {
538
551
  this.data = o;
539
552
  }
540
553
  static {
541
- s(this, "MainFileMissingError");
554
+ r(this, "MainFileMissingError");
542
555
  }
543
- }, z = class extends a {
556
+ }, q = class extends a {
544
557
  constructor(o) {
545
558
  let n = l.default.white(
546
559
  (o.error.stack || o.error.message).replaceAll(process.cwd(), "")
@@ -557,9 +570,9 @@ var $ = class extends a {
557
570
  this.data = o;
558
571
  }
559
572
  static {
560
- s(this, "MainFileEvaluationError");
573
+ r(this, "MainFileEvaluationError");
561
574
  }
562
- }, q = class extends a {
575
+ }, Q = class extends a {
563
576
  constructor(o) {
564
577
  super({
565
578
  category: "CORE-SERVER",
@@ -573,9 +586,9 @@ var $ = class extends a {
573
586
  this.data = o;
574
587
  }
575
588
  static {
576
- s(this, "StatusTypeIdMismatchError");
589
+ r(this, "StatusTypeIdMismatchError");
577
590
  }
578
- }, Q = class extends a {
591
+ }, Z = class extends a {
579
592
  constructor(o) {
580
593
  super({
581
594
  category: "CLI_INIT",
@@ -589,9 +602,9 @@ var $ = class extends a {
589
602
  this.data = o;
590
603
  }
591
604
  static {
592
- s(this, "GenerateNewProjectOnInitError");
605
+ r(this, "GenerateNewProjectOnInitError");
593
606
  }
594
- }, Z = class extends a {
607
+ }, ee = class extends a {
595
608
  constructor(o) {
596
609
  super({
597
610
  category: "CLI_UPGRADE",
@@ -611,9 +624,9 @@ var $ = class extends a {
611
624
  this.data = o;
612
625
  }
613
626
  static {
614
- s(this, "UpgradeStorybookToLowerVersionError");
627
+ r(this, "UpgradeStorybookToLowerVersionError");
615
628
  }
616
- }, ee = class extends a {
629
+ }, oe = class extends a {
617
630
  constructor(o) {
618
631
  super({
619
632
  category: "CLI_UPGRADE",
@@ -636,11 +649,11 @@ var $ = class extends a {
636
649
  this.data = o;
637
650
  }
638
651
  static {
639
- s(this, "UpgradeStorybookToSameVersionError");
652
+ r(this, "UpgradeStorybookToSameVersionError");
640
653
  }
641
- }, oe = class extends a {
654
+ }, te = class extends a {
642
655
  static {
643
- s(this, "UpgradeStorybookUnknownCurrentVersionError");
656
+ r(this, "UpgradeStorybookUnknownCurrentVersionError");
644
657
  }
645
658
  constructor() {
646
659
  super({
@@ -653,9 +666,9 @@ var $ = class extends a {
653
666
  It might help if you specify your Storybook config directory with the --config-dir flag.`
654
667
  });
655
668
  }
656
- }, te = class extends a {
669
+ }, re = class extends a {
657
670
  static {
658
- s(this, "UpgradeStorybookInWrongWorkingDirectory");
671
+ r(this, "UpgradeStorybookInWrongWorkingDirectory");
659
672
  }
660
673
  constructor() {
661
674
  super({
@@ -667,9 +680,9 @@ var $ = class extends a {
667
680
  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.`
668
681
  });
669
682
  }
670
- }, re = class extends a {
683
+ }, se = class extends a {
671
684
  static {
672
- s(this, "NoStatsForViteDevError");
685
+ r(this, "NoStatsForViteDevError");
673
686
  }
674
687
  constructor() {
675
688
  super({
@@ -681,7 +694,7 @@ var $ = class extends a {
681
694
  Please remove the \`--stats-json\` flag when running in dev mode.`
682
695
  });
683
696
  }
684
- }, se = class extends a {
697
+ }, ne = class extends a {
685
698
  constructor(o) {
686
699
  super({
687
700
  category: "CLI",
@@ -693,36 +706,70 @@ var $ = class extends a {
693
706
  this.data = o;
694
707
  }
695
708
  static {
696
- s(this, "FindPackageVersionsError");
709
+ r(this, "FindPackageVersionsError");
710
+ }
711
+ }, ae = class extends a {
712
+ constructor(o) {
713
+ super({
714
+ category: "FRAMEWORK_NEXTJS",
715
+ code: 3,
716
+ message: i.dedent`
717
+ Incompatible PostCSS configuration format detected.
718
+
719
+ Next.js uses an array-based format for plugins which is not compatible with Vite:
720
+
721
+ // ❌ Incompatible format (used by Next.js)
722
+ const config = {
723
+ plugins: ["@tailwindcss/postcss"],
724
+ };
725
+
726
+ Please transform your PostCSS config to use the object-based format, which is compatible with Next.js and Vite:
727
+
728
+ // ✅ Compatible format (works with Next.js and Vite)
729
+ const config = {
730
+ plugins: {
731
+ "@tailwindcss/postcss": {},
732
+ },
733
+ };
734
+
735
+ Original error: ${o.error.message}
736
+ `
737
+ });
738
+ this.data = o;
739
+ }
740
+ static {
741
+ r(this, "IncompatiblePostCssConfigError");
697
742
  }
698
743
  };
699
744
  export {
700
745
  F as AngularLegacyBuildOptionsError,
701
- pe as Category,
746
+ he as Category,
702
747
  L as ConflictingStaticDirConfigError,
703
- v as CouldNotEvaluateFrameworkError,
748
+ K as CouldNotEvaluateFrameworkError,
704
749
  D as CriticalPresetLoadError,
705
- se as FindPackageVersionsError,
706
- Q as GenerateNewProjectOnInitError,
750
+ ne as FindPackageVersionsError,
751
+ Z as GenerateNewProjectOnInitError,
707
752
  G as GoogleFontsDownloadError,
708
753
  Y as GoogleFontsLoadingError,
709
- K as InvalidFrameworkNameError,
754
+ ae as IncompatiblePostCssConfigError,
755
+ v as InvalidFrameworkNameError,
710
756
  B as InvalidStoriesEntryError,
711
- J as MainFileESMOnlyImportError,
712
- z as MainFileEvaluationError,
713
- X as MainFileMissingError,
714
- j as MissingAngularJsonError,
757
+ H as MainFileESMOnlyImportError,
758
+ q as MainFileEvaluationError,
759
+ z as MainFileMissingError,
760
+ $ as MissingAngularJsonError,
715
761
  U as MissingBuilderError,
716
762
  W as MissingFrameworkFieldError,
717
- H as NoMatchingExportError,
718
- re as NoStatsForViteDevError,
763
+ X as NoMatchingExportError,
764
+ se as NoStatsForViteDevError,
719
765
  T as NxProjectDetectedError,
720
- q as StatusTypeIdMismatchError,
721
- te as UpgradeStorybookInWrongWorkingDirectory,
722
- Z as UpgradeStorybookToLowerVersionError,
723
- ee as UpgradeStorybookToSameVersionError,
724
- oe as UpgradeStorybookUnknownCurrentVersionError,
725
- $ as WebpackCompilationError,
726
- N as WebpackInvocationError,
727
- P as WebpackMissingStatsError
766
+ Q as StatusTypeIdMismatchError,
767
+ J as SvelteViteWithSvelteKitError,
768
+ re as UpgradeStorybookInWrongWorkingDirectory,
769
+ ee as UpgradeStorybookToLowerVersionError,
770
+ oe as UpgradeStorybookToSameVersionError,
771
+ te as UpgradeStorybookUnknownCurrentVersionError,
772
+ V as WebpackCompilationError,
773
+ j as WebpackInvocationError,
774
+ N as WebpackMissingStatsError
728
775
  };