storybook 9.0.0-alpha.9 → 9.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +61735 -7589
  43. package/dist/cli/index.d.ts +24 -20
  44. package/dist/cli/index.js +61776 -7630
  45. package/dist/common/index.cjs +16133 -9095
  46. package/dist/common/index.d.ts +32 -24
  47. package/dist/common/index.js +16227 -9183
  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 +12409 -12231
  69. package/dist/core-server/index.d.ts +32 -23
  70. package/dist/core-server/index.js +12567 -12389
  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 +1411 -1758
  88. package/dist/instrumenter/index.d.ts +8 -7
  89. package/dist/instrumenter/index.js +1325 -1663
  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 +45452 -49541
  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 +41973 -38159
  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 +374 -370
  121. package/dist/telemetry/index.d.ts +1 -1
  122. package/dist/telemetry/index.js +460 -456
  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 -334
  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
@@ -1,42 +1,42 @@
1
1
  "use strict";
2
- var ce = Object.create;
2
+ var le = 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 me = Object.getOwnPropertyDescriptor;
5
+ var de = Object.getOwnPropertyNames;
6
+ var ge = 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), pe = (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
+ }, Z = (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 de(e))
14
+ !be.call(t, c) && c !== o && y(t, c, { get: () => e[c], enumerable: !(n = me(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 ee = (t, e, o) => (o = t != null ? le(ge(t)) : {}, Z(
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
+ )), ye = (t) => Z(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 re = Q((ke, k) => {
28
+ var f = process || {}, oe = f.argv || [], E = f.env || {}, he = !(E.NO_COLOR || oe.includes("--no-color")) && (!!E.FORCE_COLOR || oe.includes(
29
+ "--color") || f.platform === "win32" || (f.stdout || {}).isTTY && E.TERM !== "dumb" || !!E.CI), Ee = /* @__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 + fe(c, e, o, u) + e : t + c + e;
32
+ }, "formatter"), fe = /* @__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"), te = /* @__PURE__ */ r((t = he) => {
39
+ let e = t ? Ee : () => 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 = te();
86
+ k.exports.createColors = te;
87
87
  });
88
88
 
89
89
  // ../node_modules/ts-dedent/dist/index.js
90
- var re = z((h) => {
90
+ var ne = 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 se(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
99
  var c = n.reduce(function(m, x) {
100
100
  var p = x.match(/\n([\t ]+|(?!\s).)/g);
101
- return p ? m.concat(p.map(function(f) {
101
+ return p ? m.concat(p.map(function(R) {
102
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;
103
+ return (b = (g = R.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && b !== void 0 ? b : 0;
104
104
  })) : m;
105
105
  }, []);
106
106
  if (c.length) {
@@ -114,64 +114,66 @@ var re = z((h) => {
114
114
  n[0] = n[0].replace(/^\r?\n/, "");
115
115
  var d = n[0];
116
116
  return e.forEach(function(m, x) {
117
- var p = d.match(/(?:^|\n)( *)$/), f = p ? p[1] : "", g = m;
117
+ var p = d.match(/(?:^|\n)( *)$/), R = p ? p[1] : "", g = m;
118
118
  typeof m == "string" && m.includes(`
119
119
  `) && (g = String(m).split(`
120
- `).map(function(b, ie) {
121
- return ie === 0 ? b : "" + f + b;
120
+ `).map(function(b, ue) {
121
+ return ue === 0 ? b : "" + R + b;
122
122
  }).join(`
123
123
  `)), d += g + n[x + 1];
124
124
  }), d;
125
125
  }
126
- s(te, "dedent");
127
- h.dedent = te;
128
- h.default = te;
126
+ r(se, "dedent");
127
+ h.dedent = se;
128
+ h.default = se;
129
129
  });
130
130
 
131
131
  // src/server-errors.ts
132
- var Ee = {};
133
- ge(Ee, {
134
- AngularLegacyBuildOptionsError: () => K,
135
- Category: () => ae,
136
- ConflictingStaticDirConfigError: () => w,
137
- CouldNotEvaluateFrameworkError: () => C,
138
- CriticalPresetLoadError: () => v,
139
- FindPackageVersionsError: () => X,
140
- GenerateNewProjectOnInitError: () => D,
132
+ var xe = {};
133
+ pe(xe, {
134
+ AngularLegacyBuildOptionsError: () => v,
135
+ Category: () => ce,
136
+ ConflictingStaticDirConfigError: () => C,
137
+ CouldNotEvaluateFrameworkError: () => w,
138
+ CriticalPresetLoadError: () => K,
139
+ FindPackageVersionsError: () => z,
140
+ GenerateNewProjectOnInitError: () => U,
141
141
  GoogleFontsDownloadError: () => B,
142
- GoogleFontsLoadingError: () => P,
142
+ GoogleFontsLoadingError: () => N,
143
+ IncompatiblePostCssConfigError: () => q,
143
144
  InvalidFrameworkNameError: () => _,
144
145
  InvalidStoriesEntryError: () => I,
145
146
  MainFileESMOnlyImportError: () => V,
146
- MainFileEvaluationError: () => j,
147
+ MainFileEvaluationError: () => F,
147
148
  MainFileMissingError: () => $,
148
149
  MissingAngularJsonError: () => W,
149
150
  MissingBuilderError: () => L,
150
151
  MissingFrameworkFieldError: () => A,
151
- NoMatchingExportError: () => N,
152
- NoStatsForViteDevError: () => J,
152
+ NoMatchingExportError: () => P,
153
+ NoStatsForViteDevError: () => H,
153
154
  NxProjectDetectedError: () => O,
154
- StatusTypeIdMismatchError: () => F,
155
- UpgradeStorybookInWrongWorkingDirectory: () => H,
156
- UpgradeStorybookToLowerVersionError: () => U,
157
- UpgradeStorybookToSameVersionError: () => G,
158
- UpgradeStorybookUnknownCurrentVersionError: () => Y,
155
+ StatusTypeIdMismatchError: () => D,
156
+ SvelteViteWithSvelteKitError: () => j,
157
+ UpgradeStorybookInWrongWorkingDirectory: () => X,
158
+ UpgradeStorybookToLowerVersionError: () => G,
159
+ UpgradeStorybookToSameVersionError: () => Y,
160
+ UpgradeStorybookUnknownCurrentVersionError: () => J,
159
161
  WebpackCompilationError: () => T,
160
162
  WebpackInvocationError: () => M,
161
163
  WebpackMissingStatsError: () => S
162
164
  });
163
- module.exports = be(Ee);
164
- var l = Q(oe(), 1), i = Q(re(), 1);
165
+ module.exports = ye(xe);
166
+ var l = ee(re(), 1), i = ee(ne(), 1);
165
167
 
166
168
  // src/storybook-error.ts
167
- function se({
169
+ function ae({
168
170
  code: t,
169
171
  category: e
170
172
  }) {
171
173
  let o = String(t).padStart(4, "0");
172
174
  return `SB_${e}_${o}`;
173
175
  }
174
- s(se, "parseErrorCode");
176
+ r(ae, "parseErrorCode");
175
177
  var a = class t extends Error {
176
178
  constructor(o) {
177
179
  super(t.getFullMessage(o));
@@ -185,10 +187,10 @@ var a = class t extends Error {
185
187
  this.category = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
186
188
  }
187
189
  static {
188
- s(this, "StorybookError");
190
+ r(this, "StorybookError");
189
191
  }
190
192
  get fullErrorCode() {
191
- return se({ code: this.code, category: this.category });
193
+ return ae({ code: this.code, category: this.category });
192
194
  }
193
195
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
194
196
  get name() {
@@ -203,7 +205,7 @@ var a = class t extends Error {
203
205
  message: u
204
206
  }) {
205
207
  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) &&
208
+ return o === !0 ? d = `https://storybook.js.org/error/${ae({ code: n, category: c })}` : typeof o == "string" ? d = o : Array.isArray(o) &&
207
209
  (d = `
208
210
  ${o.map((m) => ` - ${m}`).join(`
209
211
  `)}`), `${u}${d != null ? `
@@ -214,20 +216,19 @@ More info: ${d}
214
216
  };
215
217
 
216
218
  // 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 {
219
+ var ce = /* @__PURE__ */ ((s) => (s.CLI = "CLI", s.CLI_INIT = "CLI_INIT", s.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", s.CLI_UPGRADE = "CLI_UPGRAD\
220
+ 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 =
221
+ "CORE-COMMON", s.NODE_LOGGER = "NODE-LOGGER", s.TELEMETRY = "TELEMETRY", s.BUILDER_MANAGER = "BUILDER-MANAGER", s.BUILDER_VITE = "BUILDER-VI\
222
+ TE", s.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", s.SOURCE_LOADER = "SOURCE-LOADER", s.POSTINSTALL = "POSTINSTALL", s.DOCS_TOOLS = "DOCS-TOOLS",
223
+ s.CORE_WEBPACK = "CORE-WEBPACK", s.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", s.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", s.FRAMEWORK_HTML_VITE = "\
224
+ FRAMEWORK_HTML-VITE", s.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.FRAMEWORK_PREACT_VITE =
225
+ "FRAMEWORK_PREACT-VITE", s.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", s.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", s.FRAMEWORK_REACT_WEBPACK5 =
226
+ "FRAMEWORK_REACT-WEBPACK5", s.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", s.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", s.
227
+ FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", s.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", s.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
228
+ s.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", s.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", s.FRAMEWORK_WEB_COMPONENTS_VITE = "FRA\
229
+ MEWORK_WEB-COMPONENTS-VITE", s.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", s))(ce || {}), O = class extends a {
229
230
  static {
230
- s(this, "NxProjectDetectedError");
231
+ r(this, "NxProjectDetectedError");
231
232
  }
232
233
  constructor() {
233
234
  super({
@@ -241,7 +242,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
241
242
  }
242
243
  }, A = class extends a {
243
244
  static {
244
- s(this, "MissingFrameworkFieldError");
245
+ r(this, "MissingFrameworkFieldError");
245
246
  }
246
247
  constructor() {
247
248
  super({
@@ -269,9 +270,9 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
269
270
  this.data = o;
270
271
  }
271
272
  static {
272
- s(this, "InvalidFrameworkNameError");
273
+ r(this, "InvalidFrameworkNameError");
273
274
  }
274
- }, C = class extends a {
275
+ }, w = class extends a {
275
276
  constructor(o) {
276
277
  super({
277
278
  category: "CORE-COMMON",
@@ -285,11 +286,11 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
285
286
  this.data = o;
286
287
  }
287
288
  static {
288
- s(this, "CouldNotEvaluateFrameworkError");
289
+ r(this, "CouldNotEvaluateFrameworkError");
289
290
  }
290
- }, w = class extends a {
291
+ }, C = class extends a {
291
292
  static {
292
- s(this, "ConflictingStaticDirConfigError");
293
+ r(this, "ConflictingStaticDirConfigError");
293
294
  }
294
295
  constructor() {
295
296
  super({
@@ -306,7 +307,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
306
307
  }
307
308
  }, I = class extends a {
308
309
  static {
309
- s(this, "InvalidStoriesEntryError");
310
+ r(this, "InvalidStoriesEntryError");
310
311
  }
311
312
  constructor() {
312
313
  super({
@@ -322,7 +323,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
322
323
  }
323
324
  }, S = class extends a {
324
325
  static {
325
- s(this, "WebpackMissingStatsError");
326
+ r(this, "WebpackMissingStatsError");
326
327
  }
327
328
  constructor() {
328
329
  super({
@@ -347,19 +348,19 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
347
348
  this.data = o;
348
349
  }
349
350
  static {
350
- s(this, "WebpackInvocationError");
351
+ r(this, "WebpackInvocationError");
351
352
  }
352
353
  };
353
- function ne(t = "") {
354
+ function ie(t = "") {
354
355
  return t.replace(/\u001B\[[0-9;]*m/g, "");
355
356
  }
356
- s(ne, "removeAnsiEscapeCodes");
357
+ r(ie, "removeAnsiEscapeCodes");
357
358
  var T = class extends a {
358
359
  constructor(o) {
359
360
  o.errors = o.errors.map((n) => ({
360
361
  ...n,
361
- message: ne(n.message),
362
- stack: ne(n.stack),
362
+ message: ie(n.message),
363
+ stack: ie(n.stack),
363
364
  name: n.name
364
365
  }));
365
366
  super({
@@ -374,7 +375,7 @@ var T = class extends a {
374
375
  this.data = o;
375
376
  }
376
377
  static {
377
- s(this, "WebpackCompilationError");
378
+ r(this, "WebpackCompilationError");
378
379
  }
379
380
  }, W = class extends a {
380
381
  constructor(o) {
@@ -389,11 +390,11 @@ var T = class extends a {
389
390
  this.data = o;
390
391
  }
391
392
  static {
392
- s(this, "MissingAngularJsonError");
393
+ r(this, "MissingAngularJsonError");
393
394
  }
394
- }, K = class extends a {
395
+ }, v = class extends a {
395
396
  static {
396
- s(this, "AngularLegacyBuildOptionsError");
397
+ r(this, "AngularLegacyBuildOptionsError");
397
398
  }
398
399
  constructor() {
399
400
  super({
@@ -410,7 +411,7 @@ var T = class extends a {
410
411
  Please run 'npx storybook automigrate' to automatically fix your config.`
411
412
  });
412
413
  }
413
- }, v = class extends a {
414
+ }, K = class extends a {
414
415
  constructor(o) {
415
416
  super({
416
417
  category: "CORE-SERVER",
@@ -428,11 +429,11 @@ var T = class extends a {
428
429
  this.data = o;
429
430
  }
430
431
  static {
431
- s(this, "CriticalPresetLoadError");
432
+ r(this, "CriticalPresetLoadError");
432
433
  }
433
434
  }, L = class extends a {
434
435
  static {
435
- s(this, "MissingBuilderError");
436
+ r(this, "MissingBuilderError");
436
437
  }
437
438
  constructor() {
438
439
  super({
@@ -463,9 +464,9 @@ var T = class extends a {
463
464
  this.data = o;
464
465
  }
465
466
  static {
466
- s(this, "GoogleFontsDownloadError");
467
+ r(this, "GoogleFontsDownloadError");
467
468
  }
468
- }, P = class extends a {
469
+ }, N = class extends a {
469
470
  constructor(o) {
470
471
  super({
471
472
  category: "FRAMEWORK_NEXTJS",
@@ -479,9 +480,23 @@ var T = class extends a {
479
480
  this.data = o;
480
481
  }
481
482
  static {
482
- s(this, "GoogleFontsLoadingError");
483
+ r(this, "GoogleFontsLoadingError");
483
484
  }
484
- }, N = class extends a {
485
+ }, j = class extends a {
486
+ static {
487
+ r(this, "SvelteViteWithSvelteKitError");
488
+ }
489
+ constructor() {
490
+ super({
491
+ category: "FRAMEWORK_SVELTE-VITE",
492
+ code: 1,
493
+ documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
494
+ message: i.dedent`
495
+ We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported.
496
+ Please use the @storybook/sveltekit framework instead.`
497
+ });
498
+ }
499
+ }, P = class extends a {
485
500
  constructor(o) {
486
501
  super({
487
502
  category: "CORE-SERVER",
@@ -502,7 +517,7 @@ var T = class extends a {
502
517
  this.data = o;
503
518
  }
504
519
  static {
505
- s(this, "NoMatchingExportError");
520
+ r(this, "NoMatchingExportError");
506
521
  }
507
522
  }, V = class extends a {
508
523
  constructor(o) {
@@ -539,7 +554,7 @@ var T = class extends a {
539
554
  this.data = o;
540
555
  }
541
556
  static {
542
- s(this, "MainFileESMOnlyImportError");
557
+ r(this, "MainFileESMOnlyImportError");
543
558
  }
544
559
  }, $ = class extends a {
545
560
  constructor(o) {
@@ -567,9 +582,9 @@ var T = class extends a {
567
582
  this.data = o;
568
583
  }
569
584
  static {
570
- s(this, "MainFileMissingError");
585
+ r(this, "MainFileMissingError");
571
586
  }
572
- }, j = class extends a {
587
+ }, F = class extends a {
573
588
  constructor(o) {
574
589
  let n = l.default.white(
575
590
  (o.error.stack || o.error.message).replaceAll(process.cwd(), "")
@@ -586,9 +601,9 @@ var T = class extends a {
586
601
  this.data = o;
587
602
  }
588
603
  static {
589
- s(this, "MainFileEvaluationError");
604
+ r(this, "MainFileEvaluationError");
590
605
  }
591
- }, F = class extends a {
606
+ }, D = class extends a {
592
607
  constructor(o) {
593
608
  super({
594
609
  category: "CORE-SERVER",
@@ -602,9 +617,9 @@ var T = class extends a {
602
617
  this.data = o;
603
618
  }
604
619
  static {
605
- s(this, "StatusTypeIdMismatchError");
620
+ r(this, "StatusTypeIdMismatchError");
606
621
  }
607
- }, D = class extends a {
622
+ }, U = class extends a {
608
623
  constructor(o) {
609
624
  super({
610
625
  category: "CLI_INIT",
@@ -618,9 +633,9 @@ var T = class extends a {
618
633
  this.data = o;
619
634
  }
620
635
  static {
621
- s(this, "GenerateNewProjectOnInitError");
636
+ r(this, "GenerateNewProjectOnInitError");
622
637
  }
623
- }, U = class extends a {
638
+ }, G = class extends a {
624
639
  constructor(o) {
625
640
  super({
626
641
  category: "CLI_UPGRADE",
@@ -640,9 +655,9 @@ var T = class extends a {
640
655
  this.data = o;
641
656
  }
642
657
  static {
643
- s(this, "UpgradeStorybookToLowerVersionError");
658
+ r(this, "UpgradeStorybookToLowerVersionError");
644
659
  }
645
- }, G = class extends a {
660
+ }, Y = class extends a {
646
661
  constructor(o) {
647
662
  super({
648
663
  category: "CLI_UPGRADE",
@@ -665,11 +680,11 @@ var T = class extends a {
665
680
  this.data = o;
666
681
  }
667
682
  static {
668
- s(this, "UpgradeStorybookToSameVersionError");
683
+ r(this, "UpgradeStorybookToSameVersionError");
669
684
  }
670
- }, Y = class extends a {
685
+ }, J = class extends a {
671
686
  static {
672
- s(this, "UpgradeStorybookUnknownCurrentVersionError");
687
+ r(this, "UpgradeStorybookUnknownCurrentVersionError");
673
688
  }
674
689
  constructor() {
675
690
  super({
@@ -682,9 +697,9 @@ var T = class extends a {
682
697
  It might help if you specify your Storybook config directory with the --config-dir flag.`
683
698
  });
684
699
  }
685
- }, H = class extends a {
700
+ }, X = class extends a {
686
701
  static {
687
- s(this, "UpgradeStorybookInWrongWorkingDirectory");
702
+ r(this, "UpgradeStorybookInWrongWorkingDirectory");
688
703
  }
689
704
  constructor() {
690
705
  super({
@@ -696,9 +711,9 @@ var T = class extends a {
696
711
  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
712
  });
698
713
  }
699
- }, J = class extends a {
714
+ }, H = class extends a {
700
715
  static {
701
- s(this, "NoStatsForViteDevError");
716
+ r(this, "NoStatsForViteDevError");
702
717
  }
703
718
  constructor() {
704
719
  super({
@@ -710,7 +725,7 @@ var T = class extends a {
710
725
  Please remove the \`--stats-json\` flag when running in dev mode.`
711
726
  });
712
727
  }
713
- }, X = class extends a {
728
+ }, z = class extends a {
714
729
  constructor(o) {
715
730
  super({
716
731
  category: "CLI",
@@ -722,6 +737,38 @@ var T = class extends a {
722
737
  this.data = o;
723
738
  }
724
739
  static {
725
- s(this, "FindPackageVersionsError");
740
+ r(this, "FindPackageVersionsError");
741
+ }
742
+ }, q = class extends a {
743
+ constructor(o) {
744
+ super({
745
+ category: "FRAMEWORK_NEXTJS",
746
+ code: 3,
747
+ message: i.dedent`
748
+ Incompatible PostCSS configuration format detected.
749
+
750
+ Next.js uses an array-based format for plugins which is not compatible with Vite:
751
+
752
+ // ❌ Incompatible format (used by Next.js)
753
+ const config = {
754
+ plugins: ["@tailwindcss/postcss"],
755
+ };
756
+
757
+ Please transform your PostCSS config to use the object-based format, which is compatible with Next.js and Vite:
758
+
759
+ // ✅ Compatible format (works with Next.js and Vite)
760
+ const config = {
761
+ plugins: {
762
+ "@tailwindcss/postcss": {},
763
+ },
764
+ };
765
+
766
+ Original error: ${o.error.message}
767
+ `
768
+ });
769
+ this.data = o;
770
+ }
771
+ static {
772
+ r(this, "IncompatiblePostCssConfigError");
726
773
  }
727
774
  };
@@ -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;
@@ -292,5 +294,13 @@ declare class FindPackageVersionsError extends StorybookError {
292
294
  packageManager: string;
293
295
  });
294
296
  }
297
+ declare class IncompatiblePostCssConfigError extends StorybookError {
298
+ data: {
299
+ error: Error;
300
+ };
301
+ constructor(data: {
302
+ error: Error;
303
+ });
304
+ }
295
305
 
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 };
306
+ export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, IncompatiblePostCssConfigError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileESMOnlyImportError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookInWrongWorkingDirectory, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };