storybook 10.0.7 → 10.0.8

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 (80) hide show
  1. package/dist/_browser-chunks/{chunk-RW5PKMWM.js → chunk-HERDX7MO.js} +2 -2
  2. package/dist/_browser-chunks/{chunk-UTNZYD2N.js → chunk-KHNISLMN.js} +81 -37
  3. package/dist/_browser-chunks/{chunk-B4A3ADP3.js → chunk-U2JWIJRX.js} +1 -1
  4. package/dist/_browser-chunks/{chunk-SYS437NN.js → chunk-VQJJDUCI.js} +1 -1
  5. package/dist/_node-chunks/{builder-manager-IMGYSQ6C.js → builder-manager-32BKVJNY.js} +12 -12
  6. package/dist/_node-chunks/camelcase-A6XPJDW2.js +18 -0
  7. package/dist/_node-chunks/{chunk-WEXHDPHI.js → chunk-2JVDNALC.js} +7 -7
  8. package/dist/_node-chunks/{chunk-PVBMWXLV.js → chunk-2YHAMJAY.js} +7 -7
  9. package/dist/_node-chunks/{chunk-ODTNT22I.js → chunk-425EMBPZ.js} +297 -768
  10. package/dist/_node-chunks/{chunk-SQJQNNLJ.js → chunk-4UOXOBHK.js} +22 -16
  11. package/dist/_node-chunks/{chunk-X52AL5YW.js → chunk-4WKJYHSS.js} +7 -7
  12. package/dist/_node-chunks/{chunk-MD57HJIM.js → chunk-5VYG646K.js} +7 -7
  13. package/dist/_node-chunks/chunk-A3KNZ5FW.js +18 -0
  14. package/dist/_node-chunks/{chunk-24QJCCAD.js → chunk-C4ROO6RE.js} +7 -7
  15. package/dist/_node-chunks/{chunk-UMPQ4E76.js → chunk-CWWI6A7W.js} +8 -8
  16. package/dist/_node-chunks/{chunk-V3HQ6KQZ.js → chunk-DPKZQ6YX.js} +7 -7
  17. package/dist/_node-chunks/{chunk-QJE3V7EA.js → chunk-EGWLH7SG.js} +10 -10
  18. package/dist/_node-chunks/{chunk-76Y6LEGH.js → chunk-F6NUZ463.js} +9 -9
  19. package/dist/_node-chunks/{chunk-QWKN7XKO.js → chunk-FYLSDVSH.js} +21 -21
  20. package/dist/_node-chunks/{chunk-WB52FWVJ.js → chunk-HUKSE3QZ.js} +7 -7
  21. package/dist/_node-chunks/{chunk-LL7YW7JI.js → chunk-IR6AN3RK.js} +8 -8
  22. package/dist/_node-chunks/{chunk-WRVTNG75.js → chunk-J5R55OCP.js} +7 -7
  23. package/dist/_node-chunks/{chunk-H6EU5XDR.js → chunk-JBW3FROT.js} +6 -6
  24. package/dist/_node-chunks/{chunk-QHZ7UVRT.js → chunk-JFMDUYER.js} +7 -7
  25. package/dist/_node-chunks/{chunk-ZTMF3ZLU.js → chunk-JVUHT63V.js} +8 -8
  26. package/dist/_node-chunks/{chunk-2JHMFGYJ.js → chunk-K373EZTP.js} +12 -12
  27. package/dist/_node-chunks/{chunk-5I4UHD7U.js → chunk-KVR64UU2.js} +529 -284
  28. package/dist/_node-chunks/chunk-NEOS45YA.js +61 -0
  29. package/dist/_node-chunks/{chunk-RDC6YPRK.js → chunk-OVJEF4RI.js} +9 -9
  30. package/dist/_node-chunks/{chunk-I3VS3SZG.js → chunk-PK3UILX6.js} +7 -7
  31. package/dist/_node-chunks/{chunk-63N4MMRO.js → chunk-QHYQ5G5G.js} +7 -7
  32. package/dist/_node-chunks/{chunk-R5RWAUHB.js → chunk-TKXE3RQ5.js} +12 -12
  33. package/dist/_node-chunks/{chunk-CEKA7D2C.js → chunk-UOLIYXDF.js} +7 -7
  34. package/dist/_node-chunks/{chunk-RCEDZ5SF.js → chunk-V4MKEKP7.js} +7 -7
  35. package/dist/_node-chunks/{chunk-ZA2S75S7.js → chunk-V7ZKSK5R.js} +7 -7
  36. package/dist/_node-chunks/{chunk-LX7DNOAF.js → chunk-VTD5TIUC.js} +8 -8
  37. package/dist/_node-chunks/{chunk-3QRUKHNZ.js → chunk-VWYF3SCI.js} +7 -7
  38. package/dist/_node-chunks/{chunk-RQQ26RE6.js → chunk-YUFML7ZZ.js} +7 -7
  39. package/dist/_node-chunks/{chunk-5Y7ADYYI.js → chunk-ZDZQHU26.js} +6 -6
  40. package/dist/_node-chunks/{dist-64XMYCKL.js → dist-SD7YZH5A.js} +9 -9
  41. package/dist/_node-chunks/{globby-VVSMFUOS.js → globby-FODEQLAP.js} +9 -9
  42. package/dist/_node-chunks/{lib-3737YTFI.js → lib-G6JECM5H.js} +7 -7
  43. package/dist/_node-chunks/{mdx-N42X6CFJ-MMTNLXDP.js → mdx-N42X6CFJ-MK2KTUH7.js} +8 -8
  44. package/dist/_node-chunks/{p-limit-JUZ6J4TE.js → p-limit-IJ5D4B4L.js} +10 -7
  45. package/dist/_node-chunks/{plugin-53K4FV2S.js → plugin-NXD266M2.js} +10 -10
  46. package/dist/_node-chunks/{plugin-J57WYAS6.js → plugin-SAVMZDUL.js} +10 -10
  47. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-TSBFN4GA.js → webpack-inject-mocker-runtime-plugin-2PG2OIHX.js} +30 -24
  48. package/dist/_node-chunks/{webpack-mock-plugin-FFF3YTJU.js → webpack-mock-plugin-CQH72GQV.js} +9 -9
  49. package/dist/babel/index.d.ts +671 -335
  50. package/dist/babel/index.js +11 -11
  51. package/dist/bin/core.js +12 -12
  52. package/dist/bin/dispatcher.js +11 -11
  53. package/dist/bin/loader.js +9 -9
  54. package/dist/cli/index.js +77 -82
  55. package/dist/common/index.js +20 -20
  56. package/dist/components/index.js +394 -176
  57. package/dist/core-server/index.js +55 -44
  58. package/dist/core-server/presets/common-manager.js +238 -230
  59. package/dist/core-server/presets/common-override-preset.js +9 -9
  60. package/dist/core-server/presets/common-preset.js +24 -23
  61. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  62. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  63. package/dist/csf/index.js +3 -3
  64. package/dist/csf-tools/index.js +9 -9
  65. package/dist/docs-tools/index.js +2 -2
  66. package/dist/manager/globals-runtime.js +4291 -4116
  67. package/dist/manager/runtime.js +1 -1
  68. package/dist/manager-api/index.js +3 -3
  69. package/dist/node-logger/index.js +576 -531
  70. package/dist/preview/runtime.js +953 -891
  71. package/dist/preview-api/index.d.ts +68 -67
  72. package/dist/preview-api/index.js +3 -3
  73. package/dist/server-errors.js +10 -10
  74. package/dist/telemetry/index.js +24 -24
  75. package/dist/test/index.js +609 -547
  76. package/dist/theming/index.d.ts +3363 -2597
  77. package/package.json +2 -2
  78. package/dist/_node-chunks/camelcase-IT57EA7A.js +0 -18
  79. package/dist/_node-chunks/chunk-W3ZTHPZN.js +0 -18
  80. package/dist/_node-chunks/chunk-X5UKDYKW.js +0 -61
@@ -1,27 +1,27 @@
1
- import CJS_COMPAT_NODE_URL_gikfs3u543o from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gikfs3u543o from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gikfs3u543o from "node:module";
1
+ import CJS_COMPAT_NODE_URL_39zvq8kkt8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_39zvq8kkt8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_39zvq8kkt8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gikfs3u543o.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gikfs3u543o.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gikfs3u543o.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_39zvq8kkt8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_39zvq8kkt8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_39zvq8kkt8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  resolvePackageDir
14
- } from "./chunk-ODTNT22I.js";
15
- import "./chunk-WRVTNG75.js";
14
+ } from "./chunk-425EMBPZ.js";
15
+ import "./chunk-J5R55OCP.js";
16
16
  import {
17
17
  require_gen_mapping_umd,
18
18
  require_trace_mapping_umd
19
- } from "./chunk-PVBMWXLV.js";
19
+ } from "./chunk-2YHAMJAY.js";
20
20
  import {
21
21
  __commonJS,
22
22
  __name,
23
23
  __require
24
- } from "./chunk-H6EU5XDR.js";
24
+ } from "./chunk-JBW3FROT.js";
25
25
 
26
26
  // ../node_modules/lodash/_freeGlobal.js
27
27
  var require_freeGlobal = __commonJS({
@@ -51732,7 +51732,7 @@ var require_bundle_min = __commonJS({
51732
51732
  return decls.length ? make_node(AST_Var, var_statement, { definitions: decls }) : null;
51733
51733
  }
51734
51734
  __name(remove_initializers, "remove_initializers");
51735
- function trim_unreachable_code(compressor, stat, target) {
51735
+ function extract_from_unreachable_code(compressor, stat, target) {
51736
51736
  walk(stat, (node) => {
51737
51737
  if (node instanceof AST_Var) {
51738
51738
  const no_initializers = remove_initializers(node);
@@ -51754,12 +51754,12 @@ var require_bundle_min = __commonJS({
51754
51754
  target.push(node);
51755
51755
  return true;
51756
51756
  }
51757
- if (node instanceof AST_Scope) {
51757
+ if (node instanceof AST_Scope || node instanceof AST_Class) {
51758
51758
  return true;
51759
51759
  }
51760
51760
  });
51761
51761
  }
51762
- __name(trim_unreachable_code, "trim_unreachable_code");
51762
+ __name(extract_from_unreachable_code, "extract_from_unreachable_code");
51763
51763
  function tighten_body(statements, compressor) {
51764
51764
  const nearest_scope = compressor.find_scope();
51765
51765
  const defun_scope = nearest_scope.get_defun_scope();
@@ -52617,7 +52617,7 @@ var require_bundle_min = __commonJS({
52617
52617
  CHANGED = n != len;
52618
52618
  if (has_quit)
52619
52619
  has_quit.forEach(function(stat2) {
52620
- trim_unreachable_code(compressor2, stat2, statements2);
52620
+ extract_from_unreachable_code(compressor2, stat2, statements2);
52621
52621
  });
52622
52622
  }
52623
52623
  __name(eliminate_dead_code, "eliminate_dead_code");
@@ -53529,6 +53529,11 @@ var require_bundle_min = __commonJS({
53529
53529
  }
53530
53530
  }
53531
53531
  }
53532
+ /** True if compressor.self()'s result will be turned into a 32-bit integer.
53533
+ * ex:
53534
+ * ~{expr}
53535
+ * (1, 2, {expr}) | 0
53536
+ **/
53532
53537
  in_32_bit_context(other_operand_must_be_number) {
53533
53538
  if (!this.option("evaluate")) return false;
53534
53539
  var self2 = this.self();
@@ -53543,7 +53548,8 @@ var require_bundle_min = __commonJS({
53543
53548
  if (p instanceof AST_UnaryPrefix) {
53544
53549
  return p.operator === "~";
53545
53550
  }
53546
- if (p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||" || p.operator == "??") || p instanceof AST_Conditional && p.condition !== self2 || p.tail_node() === self2) {
53551
+ if (p instanceof AST_Binary && // Don't talk about p.left. Can change branch taken
53552
+ (p.operator == "&&" && p.right === self2 || p.operator == "||" && p.right === self2 || p.operator == "??" && p.right === self2) || p instanceof AST_Conditional && p.condition !== self2 || p.tail_node() === self2) {
53547
53553
  self2 = p;
53548
53554
  } else {
53549
53555
  return false;
@@ -54037,7 +54043,7 @@ var require_bundle_min = __commonJS({
54037
54043
  body: self2.condition
54038
54044
  }));
54039
54045
  }
54040
- trim_unreachable_code(compressor, self2.body, body);
54046
+ extract_from_unreachable_code(compressor, self2.body, body);
54041
54047
  return make_node(AST_BlockStatement, self2, {
54042
54048
  body
54043
54049
  });
@@ -54107,7 +54113,7 @@ var require_bundle_min = __commonJS({
54107
54113
  if (cond instanceof AST_Node) cond = self2.condition.tail_node().evaluate(compressor);
54108
54114
  if (!cond) {
54109
54115
  var body = [];
54110
- trim_unreachable_code(compressor, self2.body, body);
54116
+ extract_from_unreachable_code(compressor, self2.body, body);
54111
54117
  if (self2.init instanceof AST_Statement) {
54112
54118
  body.push(self2.init);
54113
54119
  } else if (self2.init) {
@@ -54137,7 +54143,7 @@ var require_bundle_min = __commonJS({
54137
54143
  if (cond instanceof AST_Node) cond = self2.condition.tail_node().evaluate(compressor);
54138
54144
  if (!cond) {
54139
54145
  var body = [];
54140
- trim_unreachable_code(compressor, self2.body, body);
54146
+ extract_from_unreachable_code(compressor, self2.body, body);
54141
54147
  body.push(make_node(AST_SimpleStatement, self2.condition, {
54142
54148
  body: self2.condition
54143
54149
  }));
@@ -54150,7 +54156,7 @@ var require_bundle_min = __commonJS({
54150
54156
  }));
54151
54157
  body.push(self2.body);
54152
54158
  if (self2.alternative) {
54153
- trim_unreachable_code(compressor, self2.alternative, body);
54159
+ extract_from_unreachable_code(compressor, self2.alternative, body);
54154
54160
  }
54155
54161
  return make_node(AST_BlockStatement, self2, { body }).optimize(compressor);
54156
54162
  }
@@ -54346,7 +54352,7 @@ var require_bundle_min = __commonJS({
54346
54352
  let i2 = body.length - 1;
54347
54353
  for (; i2 >= 0; i2--) {
54348
54354
  let bbody = body[i2].body;
54349
- if (is_break(bbody[bbody.length - 1], compressor)) bbody.pop();
54355
+ while (is_break(bbody[bbody.length - 1], compressor)) bbody.pop();
54350
54356
  if (!is_inert_body(body[i2])) break;
54351
54357
  }
54352
54358
  i2++;
@@ -54355,9 +54361,9 @@ var require_bundle_min = __commonJS({
54355
54361
  let branch2 = body[j];
54356
54362
  if (branch2 === default_or_exact) {
54357
54363
  default_or_exact = null;
54358
- body.pop();
54364
+ eliminate_branch(body.pop());
54359
54365
  } else if (!branch2.expression.has_side_effects(compressor)) {
54360
- body.pop();
54366
+ eliminate_branch(body.pop());
54361
54367
  } else {
54362
54368
  break;
54363
54369
  }
@@ -54513,7 +54519,7 @@ var require_bundle_min = __commonJS({
54513
54519
  if (prev && !aborts(prev)) {
54514
54520
  prev.body = prev.body.concat(branch2.body);
54515
54521
  } else {
54516
- trim_unreachable_code(compressor, branch2, decl);
54522
+ extract_from_unreachable_code(compressor, branch2, decl);
54517
54523
  }
54518
54524
  }
54519
54525
  __name(eliminate_branch, "eliminate_branch");
@@ -54566,7 +54572,7 @@ var require_bundle_min = __commonJS({
54566
54572
  if (compressor.option("dead_code") && self2.body.body.every(is_empty)) {
54567
54573
  var body = [];
54568
54574
  if (self2.bcatch) {
54569
- trim_unreachable_code(compressor, self2.bcatch, body);
54575
+ extract_from_unreachable_code(compressor, self2.bcatch, body);
54570
54576
  }
54571
54577
  if (self2.bfinally) body.push(...self2.bfinally.body);
54572
54578
  return make_node(AST_BlockStatement, self2, {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_gikfs3u543o from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gikfs3u543o from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gikfs3u543o from "node:module";
1
+ import CJS_COMPAT_NODE_URL_39zvq8kkt8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_39zvq8kkt8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_39zvq8kkt8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gikfs3u543o.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gikfs3u543o.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gikfs3u543o.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_39zvq8kkt8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_39zvq8kkt8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_39zvq8kkt8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -15,11 +15,11 @@ import {
15
15
  getIsExternal,
16
16
  resolveExternalModule,
17
17
  resolveWithExtensions
18
- } from "./chunk-ZTMF3ZLU.js";
19
- import "./chunk-WRVTNG75.js";
18
+ } from "./chunk-JVUHT63V.js";
19
+ import "./chunk-J5R55OCP.js";
20
20
  import {
21
21
  __name
22
- } from "./chunk-H6EU5XDR.js";
22
+ } from "./chunk-JBW3FROT.js";
23
23
 
24
24
  // src/core-server/presets/webpack/plugins/webpack-mock-plugin.ts
25
25
  import { createRequire } from "node:module";