storybook 9.0.0-alpha.2 → 9.0.0-alpha.21

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 (162) hide show
  1. package/README.md +1 -1
  2. package/assets/docs/addon-backgrounds.gif +0 -0
  3. package/assets/docs/addon-controls-args-annotated.png +0 -0
  4. package/assets/docs/addon-controls-args-background-color.png +0 -0
  5. package/assets/docs/addon-controls-args-background-string.png +0 -0
  6. package/assets/docs/addon-controls-args-docs.png +0 -0
  7. package/assets/docs/addon-controls-args-logging.png +0 -0
  8. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  10. package/assets/docs/addon-controls-args-reflow.png +0 -0
  11. package/assets/docs/addon-controls-args-template.png +0 -0
  12. package/assets/docs/addon-controls-expanded.png +0 -0
  13. package/assets/docs/addon-controls-hero.gif +0 -0
  14. package/assets/docs/addon-controls-install.png +0 -0
  15. package/assets/docs/hero.gif +0 -0
  16. package/assets/docs/highlight.png +0 -0
  17. package/assets/docs/viewport.png +0 -0
  18. package/assets/server/base-preview-head.html +1 -3
  19. package/bin/index.cjs +2 -2
  20. package/dist/actions/decorator.d.ts +6 -0
  21. package/dist/actions/decorator.js +134 -0
  22. package/dist/actions/index.cjs +123 -0
  23. package/dist/actions/index.d.ts +102 -0
  24. package/dist/actions/index.js +108 -0
  25. package/dist/actions/preview.cjs +161 -0
  26. package/dist/actions/preview.d.ts +54 -0
  27. package/dist/actions/preview.js +152 -0
  28. package/dist/babel/index.cjs +822 -816
  29. package/dist/babel/index.js +822 -816
  30. package/dist/backgrounds/index.cjs +148 -0
  31. package/dist/backgrounds/index.d.ts +91 -0
  32. package/dist/backgrounds/index.js +130 -0
  33. package/dist/backgrounds/preview.cjs +143 -0
  34. package/dist/backgrounds/preview.d.ts +54 -0
  35. package/dist/backgrounds/preview.js +127 -0
  36. package/dist/bin/index.cjs +49 -70
  37. package/dist/bin/index.js +49 -70
  38. package/dist/builder-manager/index.cjs +319 -326
  39. package/dist/builder-manager/index.js +576 -583
  40. package/dist/channels/index.cjs +1026 -981
  41. package/dist/channels/index.js +1258 -1207
  42. package/dist/cli/bin/index.cjs +483 -483
  43. package/dist/cli/bin/index.js +495 -495
  44. package/dist/cli/index.cjs +61735 -7590
  45. package/dist/cli/index.d.ts +25 -21
  46. package/dist/cli/index.js +61776 -7631
  47. package/dist/client-logger/index.cjs +56 -88
  48. package/dist/client-logger/index.js +41 -47
  49. package/dist/common/index.cjs +16137 -9085
  50. package/dist/common/index.d.ts +35 -30
  51. package/dist/common/index.js +16230 -9172
  52. package/dist/component-testing/index.cjs +23 -0
  53. package/dist/component-testing/index.d.ts +3 -0
  54. package/dist/component-testing/index.js +5 -0
  55. package/dist/component-testing/preview.cjs +40 -0
  56. package/dist/component-testing/preview.d.ts +5 -0
  57. package/dist/component-testing/preview.js +25 -0
  58. package/dist/components/index.cjs +16268 -24926
  59. package/dist/components/index.d.ts +98 -347
  60. package/dist/components/index.js +5905 -19177
  61. package/dist/controls/decorator.d.ts +5 -0
  62. package/dist/controls/decorator.js +8 -0
  63. package/dist/controls/index.cjs +26 -0
  64. package/dist/controls/index.d.ts +39 -0
  65. package/dist/controls/index.js +6 -0
  66. package/dist/controls/preview.cjs +26 -0
  67. package/dist/controls/preview.d.ts +54 -0
  68. package/dist/controls/preview.js +9 -0
  69. package/dist/core-events/index.cjs +91 -106
  70. package/dist/core-events/index.d.ts +139 -104
  71. package/dist/core-events/index.js +79 -94
  72. package/dist/core-server/index.cjs +13898 -13409
  73. package/dist/core-server/index.d.ts +270 -3
  74. package/dist/core-server/index.js +13981 -13497
  75. package/dist/core-server/presets/common-manager.css +170 -0
  76. package/dist/core-server/presets/common-manager.js +12149 -17
  77. package/dist/core-server/presets/common-preset.cjs +3009 -3155
  78. package/dist/core-server/presets/common-preset.js +2862 -3009
  79. package/dist/csf/index.cjs +76 -120
  80. package/dist/csf/index.d.ts +2 -6
  81. package/dist/csf/index.js +69 -113
  82. package/dist/csf-tools/index.cjs +412 -403
  83. package/dist/csf-tools/index.d.ts +0 -4
  84. package/dist/csf-tools/index.js +410 -401
  85. package/dist/docs-tools/index.cjs +2569 -575
  86. package/dist/docs-tools/index.d.ts +2 -2
  87. package/dist/docs-tools/index.js +2565 -564
  88. package/dist/highlight/index.cjs +27 -0
  89. package/dist/highlight/index.d.ts +61 -0
  90. package/dist/highlight/index.js +7 -0
  91. package/dist/highlight/preview.cjs +535 -0
  92. package/dist/highlight/preview.d.ts +54 -0
  93. package/dist/highlight/preview.js +519 -0
  94. package/dist/instrumenter/index.cjs +2207 -2342
  95. package/dist/instrumenter/index.d.ts +8 -7
  96. package/dist/instrumenter/index.js +2430 -2603
  97. package/dist/manager/globals-module-info.cjs +291 -151
  98. package/dist/manager/globals-module-info.d.ts +1 -1
  99. package/dist/manager/globals-module-info.js +275 -135
  100. package/dist/manager/globals-runtime.js +60263 -28383
  101. package/dist/manager/globals.cjs +23 -19
  102. package/dist/manager/globals.d.ts +8 -5
  103. package/dist/manager/globals.js +10 -6
  104. package/dist/manager/runtime.js +4625 -3921
  105. package/dist/manager-api/index.cjs +4228 -3833
  106. package/dist/manager-api/index.d.ts +398 -102
  107. package/dist/manager-api/index.js +3500 -3084
  108. package/dist/manager-errors.d.ts +25 -1
  109. package/dist/manager-errors.js +50 -30
  110. package/dist/measure/index.cjs +476 -0
  111. package/dist/measure/index.d.ts +66 -0
  112. package/dist/measure/index.js +464 -0
  113. package/dist/measure/preview.cjs +466 -0
  114. package/dist/measure/preview.d.ts +59 -0
  115. package/dist/measure/preview.js +450 -0
  116. package/dist/outline/index.cjs +528 -0
  117. package/dist/outline/index.d.ts +66 -0
  118. package/dist/outline/index.js +500 -0
  119. package/dist/outline/preview.cjs +518 -0
  120. package/dist/outline/preview.d.ts +59 -0
  121. package/dist/outline/preview.js +486 -0
  122. package/dist/preview/globals.cjs +21 -17
  123. package/dist/preview/globals.d.ts +4 -1
  124. package/dist/preview/globals.js +6 -2
  125. package/dist/preview/runtime.js +46311 -6614
  126. package/dist/preview-api/index.cjs +1363 -1899
  127. package/dist/preview-api/index.d.ts +81 -395
  128. package/dist/preview-api/index.js +1711 -2169
  129. package/dist/preview-errors.cjs +119 -88
  130. package/dist/preview-errors.d.ts +30 -2
  131. package/dist/preview-errors.js +192 -142
  132. package/dist/router/index.cjs +847 -871
  133. package/dist/router/index.js +193 -199
  134. package/dist/server-errors.cjs +188 -124
  135. package/dist/server-errors.d.ts +36 -2
  136. package/dist/server-errors.js +188 -124
  137. package/dist/telemetry/index.cjs +1056 -1979
  138. package/dist/telemetry/index.d.ts +26 -5
  139. package/dist/telemetry/index.js +1091 -2010
  140. package/dist/test/index.cjs +35686 -0
  141. package/dist/test/index.d.ts +186 -0
  142. package/dist/test/index.js +33840 -0
  143. package/dist/test/preview.cjs +15870 -0
  144. package/dist/test/preview.d.ts +48 -0
  145. package/dist/test/preview.js +14501 -0
  146. package/dist/test/spy.cjs +258 -0
  147. package/dist/test/spy.d.ts +66 -0
  148. package/dist/test/spy.js +240 -0
  149. package/dist/theming/create.cjs +79 -2269
  150. package/dist/theming/create.js +67 -841
  151. package/dist/theming/index.cjs +1065 -3232
  152. package/dist/theming/index.js +951 -1719
  153. package/dist/types/index.cjs +11 -12
  154. package/dist/types/index.d.ts +684 -163
  155. package/dist/types/index.js +1 -2
  156. package/dist/viewport/index.cjs +310 -0
  157. package/dist/viewport/index.d.ts +320 -0
  158. package/dist/viewport/index.js +290 -0
  159. package/dist/viewport/preview.cjs +35 -0
  160. package/dist/viewport/preview.d.ts +68 -0
  161. package/dist/viewport/preview.js +19 -0
  162. package/package.json +359 -12
@@ -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 ne = Object.create;
8
- var f = Object.defineProperty;
9
- var ae = Object.getOwnPropertyDescriptor;
10
- var ie = Object.getOwnPropertyNames;
11
- var ce = Object.getPrototypeOf, ue = 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 le = (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 ie(e))
17
- !ue.call(t, c) && c !== o && f(t, c, { get: () => e[c], enumerable: !(n = ae(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 ? ne(ce(t)) : {}, le(
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((ye, k) => {
31
- var E = process || {}, _ = E.argv || [], h = E.env || {}, me = !(h.NO_COLOR || _.includes("--no-color")) && (!!h.FORCE_COLOR || _.includes(
32
- "--color") || E.platform === "win32" || (E.stdout || {}).isTTY && h.TERM !== "dumb" || !!h.CI), be = /* @__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 + ge(c, e, o, u) + e : t + c + e;
35
- }, "formatter"), ge = /* @__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 = me) => {
42
- let e = t ? be : () => 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,25 +85,25 @@ var w = O((ye, 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
93
- var T = O((y) => {
93
+ var S = O((y) => {
94
94
  "use strict";
95
95
  Object.defineProperty(y, "__esModule", { value: !0 });
96
96
  y.dedent = void 0;
97
- function M(t) {
97
+ function I(t) {
98
98
  for (var e = [], o = 1; o < arguments.length; o++)
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
- var g, d;
106
- return (d = (g = x.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && d !== void 0 ? d : 0;
105
+ var g, b;
106
+ return (b = (g = x.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && b !== void 0 ? b : 0;
107
107
  })) : m;
108
108
  }, []);
109
109
  if (c.length) {
@@ -115,34 +115,34 @@ var T = O((y) => {
115
115
  });
116
116
  }
117
117
  n[0] = n[0].replace(/^\r?\n/, "");
118
- var b = n[0];
119
- return e.forEach(function(m, R) {
120
- var p = b.match(/(?:^|\n)( *)$/), x = p ? p[1] : "", g = m;
118
+ var d = n[0];
119
+ return e.forEach(function(m, f) {
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(d, se) {
124
- return se === 0 ? d : "" + x + d;
123
+ `).map(function(b, ie) {
124
+ return ie === 0 ? b : "" + x + b;
125
125
  }).join(`
126
- `)), b += g + n[R + 1];
127
- }), b;
126
+ `)), d += g + n[f + 1];
127
+ }), d;
128
128
  }
129
- s(M, "dedent");
130
- y.dedent = M;
131
- y.default = M;
129
+ r(I, "dedent");
130
+ y.dedent = I;
131
+ y.default = I;
132
132
  });
133
133
 
134
134
  // src/server-errors.ts
135
- var l = A(w(), 1), i = A(T(), 1);
135
+ var l = A(C(), 1), i = A(S(), 1);
136
136
 
137
137
  // src/storybook-error.ts
138
- function I({
138
+ function M({
139
139
  code: t,
140
140
  category: e
141
141
  }) {
142
142
  let o = String(t).padStart(4, "0");
143
143
  return `SB_${e}_${o}`;
144
144
  }
145
- s(I, "parseErrorCode");
145
+ r(M, "parseErrorCode");
146
146
  var a = class t extends Error {
147
147
  constructor(o) {
148
148
  super(t.getFullMessage(o));
@@ -156,10 +156,10 @@ 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
- return I({ code: this.code, category: this.category });
162
+ return M({ code: this.code, category: this.category });
163
163
  }
164
164
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
165
165
  get name() {
@@ -173,32 +173,31 @@ var a = class t extends Error {
173
173
  category: c,
174
174
  message: u
175
175
  }) {
176
- let b;
177
- return o === !0 ? b = `https://storybook.js.org/error/${I({ code: n, category: c })}` : typeof o == "string" ? b = o : Array.isArray(o) &&
178
- (b = `
176
+ let d;
177
+ return o === !0 ? d = `https://storybook.js.org/error/${M({ code: n, category: c })}` : typeof o == "string" ? d = o : Array.isArray(o) &&
178
+ (d = `
179
179
  ${o.map((m) => ` - ${m}`).join(`
180
- `)}`), `${u}${b != null ? `
180
+ `)}`), `${u}${d != null ? `
181
181
 
182
- More info: ${b}
182
+ More info: ${d}
183
183
  ` : ""}`;
184
184
  }
185
185
  };
186
186
 
187
187
  // src/server-errors.ts
188
- var de = /* @__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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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))(de || {}), S = 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 j = 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 j = class extends a {
345
344
  this.data = o;
346
345
  }
347
346
  static {
348
- s(this, "WebpackCompilationError");
347
+ r(this, "WebpackCompilationError");
349
348
  }
350
- }, F = class extends a {
349
+ }, $ = class extends a {
351
350
  constructor(o) {
352
351
  super({
353
352
  category: "CLI_INIT",
@@ -360,11 +359,11 @@ var j = class extends a {
360
359
  this.data = o;
361
360
  }
362
361
  static {
363
- s(this, "MissingAngularJsonError");
362
+ r(this, "MissingAngularJsonError");
364
363
  }
365
- }, $ = class extends a {
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 j = 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 j = 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 j = 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 j = class extends a {
473
486
  this.data = o;
474
487
  }
475
488
  static {
476
- s(this, "NoMatchingExportError");
489
+ r(this, "NoMatchingExportError");
477
490
  }
478
- }, X = 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,7 +523,7 @@ var j = class extends a {
510
523
  this.data = o;
511
524
  }
512
525
  static {
513
- s(this, "MainFileESMOnlyImportError");
526
+ r(this, "MainFileESMOnlyImportError");
514
527
  }
515
528
  }, z = class extends a {
516
529
  constructor(o) {
@@ -538,9 +551,9 @@ var j = class extends a {
538
551
  this.data = o;
539
552
  }
540
553
  static {
541
- s(this, "MainFileMissingError");
554
+ r(this, "MainFileMissingError");
542
555
  }
543
- }, J = 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,25 @@ var j = 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 {
576
+ constructor(o) {
577
+ super({
578
+ category: "CORE-SERVER",
579
+ code: 16,
580
+ message: `Status has typeId "${o.status.typeId}" but was added to store with typeId "${o.typeId}". Full status: ${JSON.stringify(
581
+ o.status,
582
+ null,
583
+ 2
584
+ )}`
585
+ });
586
+ this.data = o;
587
+ }
588
+ static {
589
+ r(this, "StatusTypeIdMismatchError");
590
+ }
591
+ }, Z = class extends a {
563
592
  constructor(o) {
564
593
  super({
565
594
  category: "CLI_INIT",
@@ -573,9 +602,9 @@ var j = class extends a {
573
602
  this.data = o;
574
603
  }
575
604
  static {
576
- s(this, "GenerateNewProjectOnInitError");
605
+ r(this, "GenerateNewProjectOnInitError");
577
606
  }
578
- }, Q = class extends a {
607
+ }, ee = class extends a {
579
608
  constructor(o) {
580
609
  super({
581
610
  category: "CLI_UPGRADE",
@@ -595,9 +624,9 @@ var j = class extends a {
595
624
  this.data = o;
596
625
  }
597
626
  static {
598
- s(this, "UpgradeStorybookToLowerVersionError");
627
+ r(this, "UpgradeStorybookToLowerVersionError");
599
628
  }
600
- }, Z = class extends a {
629
+ }, oe = class extends a {
601
630
  constructor(o) {
602
631
  super({
603
632
  category: "CLI_UPGRADE",
@@ -620,11 +649,11 @@ var j = class extends a {
620
649
  this.data = o;
621
650
  }
622
651
  static {
623
- s(this, "UpgradeStorybookToSameVersionError");
652
+ r(this, "UpgradeStorybookToSameVersionError");
624
653
  }
625
- }, ee = class extends a {
654
+ }, te = class extends a {
626
655
  static {
627
- s(this, "UpgradeStorybookUnknownCurrentVersionError");
656
+ r(this, "UpgradeStorybookUnknownCurrentVersionError");
628
657
  }
629
658
  constructor() {
630
659
  super({
@@ -637,9 +666,9 @@ var j = class extends a {
637
666
  It might help if you specify your Storybook config directory with the --config-dir flag.`
638
667
  });
639
668
  }
640
- }, oe = class extends a {
669
+ }, re = class extends a {
641
670
  static {
642
- s(this, "UpgradeStorybookInWrongWorkingDirectory");
671
+ r(this, "UpgradeStorybookInWrongWorkingDirectory");
643
672
  }
644
673
  constructor() {
645
674
  super({
@@ -651,9 +680,9 @@ var j = class extends a {
651
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.`
652
681
  });
653
682
  }
654
- }, te = class extends a {
683
+ }, se = class extends a {
655
684
  static {
656
- s(this, "NoStatsForViteDevError");
685
+ r(this, "NoStatsForViteDevError");
657
686
  }
658
687
  constructor() {
659
688
  super({
@@ -665,7 +694,7 @@ var j = class extends a {
665
694
  Please remove the \`--stats-json\` flag when running in dev mode.`
666
695
  });
667
696
  }
668
- }, re = class extends a {
697
+ }, ne = class extends a {
669
698
  constructor(o) {
670
699
  super({
671
700
  category: "CLI",
@@ -677,35 +706,70 @@ var j = class extends a {
677
706
  this.data = o;
678
707
  }
679
708
  static {
680
- 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");
681
742
  }
682
743
  };
683
744
  export {
684
- $ as AngularLegacyBuildOptionsError,
685
- de as Category,
745
+ F as AngularLegacyBuildOptionsError,
746
+ he as Category,
686
747
  L as ConflictingStaticDirConfigError,
687
- v as CouldNotEvaluateFrameworkError,
748
+ K as CouldNotEvaluateFrameworkError,
688
749
  D as CriticalPresetLoadError,
689
- re as FindPackageVersionsError,
690
- q as GenerateNewProjectOnInitError,
750
+ ne as FindPackageVersionsError,
751
+ Z as GenerateNewProjectOnInitError,
691
752
  G as GoogleFontsDownloadError,
692
753
  Y as GoogleFontsLoadingError,
693
- K as InvalidFrameworkNameError,
754
+ ae as IncompatiblePostCssConfigError,
755
+ v as InvalidFrameworkNameError,
694
756
  B as InvalidStoriesEntryError,
695
- X as MainFileESMOnlyImportError,
696
- J as MainFileEvaluationError,
757
+ H as MainFileESMOnlyImportError,
758
+ q as MainFileEvaluationError,
697
759
  z as MainFileMissingError,
698
- F as MissingAngularJsonError,
760
+ $ as MissingAngularJsonError,
699
761
  U as MissingBuilderError,
700
762
  W as MissingFrameworkFieldError,
701
- H as NoMatchingExportError,
702
- te as NoStatsForViteDevError,
703
- S as NxProjectDetectedError,
704
- oe as UpgradeStorybookInWrongWorkingDirectory,
705
- Q as UpgradeStorybookToLowerVersionError,
706
- Z as UpgradeStorybookToSameVersionError,
707
- ee as UpgradeStorybookUnknownCurrentVersionError,
708
- j as WebpackCompilationError,
709
- N as WebpackInvocationError,
710
- P as WebpackMissingStatsError
763
+ X as NoMatchingExportError,
764
+ se as NoStatsForViteDevError,
765
+ T as NxProjectDetectedError,
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
711
775
  };