storybook 9.0.0-alpha.9 → 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 +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
@@ -4,7 +4,7 @@ var L = Object.defineProperty;
4
4
  var Le = Object.getOwnPropertyDescriptor;
5
5
  var We = Object.getOwnPropertyNames;
6
6
  var Re = Object.getPrototypeOf, Ge = Object.prototype.hasOwnProperty;
7
- var d = (n, e) => L(n, "name", { value: e, configurable: !0 });
7
+ var l = (n, e) => L(n, "name", { value: e, configurable: !0 });
8
8
  var b = (n, e) => () => (e || n((e = { exports: {} }).exports, e), e.exports);
9
9
  var Ue = (n, e, t, i) => {
10
10
  if (e && typeof e == "object" || typeof e == "function")
@@ -12,7 +12,7 @@ var Ue = (n, e, t, i) => {
12
12
  !Ge.call(n, s) && s !== t && L(n, s, { get: () => e[s], enumerable: !(i = Le(e, s)) || i.enumerable });
13
13
  return n;
14
14
  };
15
- var $ = (n, e, t) => (t = n != null ? Me(Re(n)) : {}, Ue(
15
+ var q = (n, e, t) => (t = n != null ? Me(Re(n)) : {}, Ue(
16
16
  // If the importer is in node compatibility mode or this is not an ESM
17
17
  // file that has been converted to a CommonJS file using a Babel-
18
18
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -22,10 +22,10 @@ var $ = (n, e, t) => (t = n != null ? Me(Re(n)) : {}, Ue(
22
22
  ));
23
23
 
24
24
  // ../node_modules/commander/lib/error.js
25
- var k = b((R) => {
26
- var q = class extends Error {
25
+ var j = b((R) => {
26
+ var $ = class extends Error {
27
27
  static {
28
- d(this, "CommanderError");
28
+ l(this, "CommanderError");
29
29
  }
30
30
  /**
31
31
  * Constructs the CommanderError class
@@ -37,9 +37,9 @@ var k = b((R) => {
37
37
  super(i), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name, this.code = t, this.exitCode = e, this.nestedError =
38
38
  void 0;
39
39
  }
40
- }, W = class extends q {
40
+ }, W = class extends $ {
41
41
  static {
42
- d(this, "InvalidArgumentError");
42
+ l(this, "InvalidArgumentError");
43
43
  }
44
44
  /**
45
45
  * Constructs the InvalidArgumentError class
@@ -49,15 +49,15 @@ var k = b((R) => {
49
49
  super(1, "commander.invalidArgument", e), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
50
50
  }
51
51
  };
52
- R.CommanderError = q;
52
+ R.CommanderError = $;
53
53
  R.InvalidArgumentError = W;
54
54
  });
55
55
 
56
56
  // ../node_modules/commander/lib/argument.js
57
57
  var V = b((U) => {
58
- var { InvalidArgumentError: Je } = k(), G = class {
58
+ var { InvalidArgumentError: Je } = j(), G = class {
59
59
  static {
60
- d(this, "Argument");
60
+ l(this, "Argument");
61
61
  }
62
62
  /**
63
63
  * Initialize a new command argument with the given name and description.
@@ -151,7 +151,7 @@ var V = b((U) => {
151
151
  let e = n.name() + (n.variadic === !0 ? "..." : "");
152
152
  return n.required ? "<" + e + ">" : "[" + e + "]";
153
153
  }
154
- d(Ye, "humanReadableArgName");
154
+ l(Ye, "humanReadableArgName");
155
155
  U.Argument = G;
156
156
  U.humanReadableArgName = Ye;
157
157
  });
@@ -160,7 +160,7 @@ var V = b((U) => {
160
160
  var Y = b((ce) => {
161
161
  var { humanReadableArgName: ze } = V(), J = class {
162
162
  static {
163
- d(this, "Help");
163
+ l(this, "Help");
164
164
  }
165
165
  constructor() {
166
166
  this.helpWidth = void 0, this.sortSubcommands = !1, this.sortOptions = !1, this.showGlobalOptions = !1;
@@ -183,7 +183,7 @@ var Y = b((ce) => {
183
183
  * @returns {number}
184
184
  */
185
185
  compareOptions(e, t) {
186
- let i = /* @__PURE__ */ d((s) => s.short ? s.short.replace(/^-/, "") : s.long.replace(/^--/, ""), "getSortKey");
186
+ let i = /* @__PURE__ */ l((s) => s.short ? s.short.replace(/^-/, "") : s.long.replace(/^--/, ""), "getSortKey");
187
187
  return i(e).localeCompare(i(t));
188
188
  }
189
189
  /**
@@ -378,53 +378,53 @@ var Y = b((ce) => {
378
378
  */
379
379
  formatHelp(e, t) {
380
380
  let i = t.padWidth(e, t), s = t.helpWidth || 80, r = 2, o = 2;
381
- function l(f, v) {
382
- if (v) {
383
- let M = `${f.padEnd(i + o)}${v}`;
381
+ function d(g, w) {
382
+ if (w) {
383
+ let M = `${g.padEnd(i + o)}${w}`;
384
384
  return t.wrap(
385
385
  M,
386
386
  s - r,
387
387
  i + o
388
388
  );
389
389
  }
390
- return f;
390
+ return g;
391
391
  }
392
- d(l, "formatItem");
393
- function a(f) {
394
- return f.join(`
392
+ l(d, "formatItem");
393
+ function a(g) {
394
+ return g.join(`
395
395
  `).replace(/^/gm, " ".repeat(r));
396
396
  }
397
- d(a, "formatList");
397
+ l(a, "formatList");
398
398
  let c = [`Usage: ${t.commandUsage(e)}`, ""], u = t.commandDescription(e);
399
399
  u.length > 0 && (c = c.concat([
400
400
  t.wrap(u, s, 0),
401
401
  ""
402
402
  ]));
403
- let p = t.visibleArguments(e).map((f) => l(
404
- t.argumentTerm(f),
405
- t.argumentDescription(f)
403
+ let p = t.visibleArguments(e).map((g) => d(
404
+ t.argumentTerm(g),
405
+ t.argumentDescription(g)
406
406
  ));
407
407
  p.length > 0 && (c = c.concat(["Arguments:", a(p), ""]));
408
- let m = t.visibleOptions(e).map((f) => l(
409
- t.optionTerm(f),
410
- t.optionDescription(f)
408
+ let m = t.visibleOptions(e).map((g) => d(
409
+ t.optionTerm(g),
410
+ t.optionDescription(g)
411
411
  ));
412
412
  if (m.length > 0 && (c = c.concat(["Options:", a(m), ""])), this.showGlobalOptions) {
413
- let f = t.visibleGlobalOptions(e).map((v) => l(
414
- t.optionTerm(v),
415
- t.optionDescription(v)
413
+ let g = t.visibleGlobalOptions(e).map((w) => d(
414
+ t.optionTerm(w),
415
+ t.optionDescription(w)
416
416
  ));
417
- f.length > 0 && (c = c.concat([
417
+ g.length > 0 && (c = c.concat([
418
418
  "Global Options:",
419
- a(f),
419
+ a(g),
420
420
  ""
421
421
  ]));
422
422
  }
423
- let x = t.visibleCommands(e).map((f) => l(
424
- t.subcommandTerm(f),
425
- t.subcommandDescription(f)
423
+ let v = t.visibleCommands(e).map((g) => d(
424
+ t.subcommandTerm(g),
425
+ t.subcommandDescription(g)
426
426
  ));
427
- return x.length > 0 && (c = c.concat(["Commands:", a(x), ""])), c.join(`
427
+ return v.length > 0 && (c = c.concat(["Commands:", a(v), ""])), c.join(`
428
428
  `);
429
429
  }
430
430
  /**
@@ -456,17 +456,17 @@ var Y = b((ce) => {
456
456
  wrap(e, t, i, s = 40) {
457
457
  let r = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF", o = new RegExp(`[\\n][${r}]+`);
458
458
  if (e.match(o)) return e;
459
- let l = t - i;
460
- if (l < s) return e;
459
+ let d = t - i;
460
+ if (d < s) return e;
461
461
  let a = e.slice(0, i), c = e.slice(i).replace(`\r
462
462
  `, `
463
- `), u = " ".repeat(i), m = "\\s\u200B", x = new RegExp(
463
+ `), u = " ".repeat(i), m = "\\s\u200B", v = new RegExp(
464
464
  `
465
- |.{1,${l - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
465
+ |.{1,${d - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
466
466
  "g"
467
- ), f = c.match(x) || [];
468
- return a + f.map((v, M) => v === `
469
- ` ? "" : (M > 0 ? u : "") + v.trimEnd()).join(`
467
+ ), g = c.match(v) || [];
468
+ return a + g.map((w, M) => w === `
469
+ ` ? "" : (M > 0 ? u : "") + w.trimEnd()).join(`
470
470
  `);
471
471
  }
472
472
  };
@@ -475,9 +475,9 @@ var Y = b((ce) => {
475
475
 
476
476
  // ../node_modules/commander/lib/option.js
477
477
  var X = b((Q) => {
478
- var { InvalidArgumentError: Ke } = k(), z = class {
478
+ var { InvalidArgumentError: Ke } = j(), z = class {
479
479
  static {
480
- d(this, "Option");
480
+ l(this, "Option");
481
481
  }
482
482
  /**
483
483
  * Initialize a new `Option` with the given `flags` and `description`.
@@ -648,7 +648,7 @@ var X = b((Q) => {
648
648
  }
649
649
  }, K = class {
650
650
  static {
651
- d(this, "DualOptions");
651
+ l(this, "DualOptions");
652
652
  }
653
653
  /**
654
654
  * @param {Option[]} options
@@ -678,13 +678,13 @@ var X = b((Q) => {
678
678
  function Qe(n) {
679
679
  return n.split("-").reduce((e, t) => e + t[0].toUpperCase() + t.slice(1));
680
680
  }
681
- d(Qe, "camelcase");
681
+ l(Qe, "camelcase");
682
682
  function Xe(n) {
683
683
  let e, t, i = n.split(/[ |,]+/);
684
684
  return i.length > 1 && !/^[[<]/.test(i[1]) && (e = i.shift()), t = i.shift(), !e && /^-[^-]$/.test(t) && (e = t, t = void 0), { shortFlag: e,
685
685
  longFlag: t };
686
686
  }
687
- d(Xe, "splitOptionFlags");
687
+ l(Xe, "splitOptionFlags");
688
688
  Q.Option = z;
689
689
  Q.DualOptions = K;
690
690
  });
@@ -713,7 +713,7 @@ var pe = b((ue) => {
713
713
  }
714
714
  return t[n.length][e.length];
715
715
  }
716
- d(Ze, "editDistance");
716
+ l(Ze, "editDistance");
717
717
  function et(n, e) {
718
718
  if (!e || e.length === 0) return "";
719
719
  e = Array.from(new Set(e));
@@ -722,23 +722,23 @@ var pe = b((ue) => {
722
722
  let i = [], s = 3, r = 0.4;
723
723
  return e.forEach((o) => {
724
724
  if (o.length <= 1) return;
725
- let l = Ze(n, o), a = Math.max(n.length, o.length);
726
- (a - l) / a > r && (l < s ? (s = l, i = [o]) : l === s && i.push(o));
727
- }), i.sort((o, l) => o.localeCompare(l)), t && (i = i.map((o) => `--${o}`)), i.length > 1 ? `
725
+ let d = Ze(n, o), a = Math.max(n.length, o.length);
726
+ (a - d) / a > r && (d < s ? (s = d, i = [o]) : d === s && i.push(o));
727
+ }), i.sort((o, d) => o.localeCompare(d)), t && (i = i.map((o) => `--${o}`)), i.length > 1 ? `
728
728
  (Did you mean one of ${i.join(", ")}?)` : i.length === 1 ? `
729
729
  (Did you mean ${i[0]}?)` : "";
730
730
  }
731
- d(et, "suggestSimilar");
731
+ l(et, "suggestSimilar");
732
732
  ue.suggestSimilar = et;
733
733
  });
734
734
 
735
735
  // ../node_modules/commander/lib/command.js
736
- var be = b((ge) => {
737
- var tt = require("node:events").EventEmitter, Z = require("node:child_process"), y = require("node:path"), ee = require("node:fs"), h = require("node:process"),
738
- { Argument: it, humanReadableArgName: st } = V(), { CommanderError: te } = k(), { Help: rt } = Y(), { Option: he, DualOptions: nt } = X(),
736
+ var be = b((fe) => {
737
+ var tt = require("node:events").EventEmitter, Z = require("node:child_process"), _ = require("node:path"), ee = require("node:fs"), h = require("node:process"),
738
+ { Argument: it, humanReadableArgName: st } = V(), { CommanderError: te } = j(), { Help: rt } = Y(), { Option: he, DualOptions: nt } = X(),
739
739
  { suggestSimilar: me } = pe(), ie = class n extends tt {
740
740
  static {
741
- d(this, "Command");
741
+ l(this, "Command");
742
742
  }
743
743
  /**
744
744
  * Initialize a new `Command`.
@@ -753,11 +753,11 @@ var be = b((ge) => {
753
753
  null, this._aliases = [], this._combineFlagAndOptionalValue = !0, this._description = "", this._summary = "", this._argsDescription = void 0,
754
754
  this._enablePositionalOptions = !1, this._passThroughOptions = !1, this._lifeCycleHooks = {}, this._showHelpAfterError = !1, this._showSuggestionAfterError =
755
755
  !0, this._outputConfiguration = {
756
- writeOut: /* @__PURE__ */ d((t) => h.stdout.write(t), "writeOut"),
757
- writeErr: /* @__PURE__ */ d((t) => h.stderr.write(t), "writeErr"),
758
- getOutHelpWidth: /* @__PURE__ */ d(() => h.stdout.isTTY ? h.stdout.columns : void 0, "getOutHelpWidth"),
759
- getErrHelpWidth: /* @__PURE__ */ d(() => h.stderr.isTTY ? h.stderr.columns : void 0, "getErrHelpWidth"),
760
- outputError: /* @__PURE__ */ d((t, i) => i(t), "outputError")
756
+ writeOut: /* @__PURE__ */ l((t) => h.stdout.write(t), "writeOut"),
757
+ writeErr: /* @__PURE__ */ l((t) => h.stderr.write(t), "writeErr"),
758
+ getOutHelpWidth: /* @__PURE__ */ l(() => h.stdout.isTTY ? h.stdout.columns : void 0, "getOutHelpWidth"),
759
+ getErrHelpWidth: /* @__PURE__ */ l(() => h.stderr.isTTY ? h.stderr.columns : void 0, "getErrHelpWidth"),
760
+ outputError: /* @__PURE__ */ l((t, i) => i(t), "outputError")
761
761
  }, this._hidden = !1, this._helpOption = void 0, this._addImplicitHelpCommand = void 0, this._helpCommand = void 0, this._helpConfiguration =
762
762
  {};
763
763
  }
@@ -813,9 +813,9 @@ var be = b((ge) => {
813
813
  command(e, t, i) {
814
814
  let s = t, r = i;
815
815
  typeof s == "object" && s !== null && (r = s, s = null), r = r || {};
816
- let [, o, l] = e.match(/([^ ]+) *(.*)/), a = this.createCommand(o);
816
+ let [, o, d] = e.match(/([^ ]+) *(.*)/), a = this.createCommand(o);
817
817
  return s && (a.description(s), a._executableHandler = !0), r.isDefault && (this._defaultCommandName = a._name), a._hidden = !!(r.noHelp ||
818
- r.hidden), a._executableFile = r.executableFile || null, l && a.arguments(l), this._registerCommand(a), a.parent = this, a.copyInheritedSettings(
818
+ r.hidden), a._executableFile = r.executableFile || null, d && a.arguments(d), this._registerCommand(a), a.parent = this, a.copyInheritedSettings(
819
819
  this), s ? this : a;
820
820
  }
821
821
  /**
@@ -1064,7 +1064,7 @@ Expecting one of '${i.join("', '")}'`);
1064
1064
  * @return {Command} `this` command for chaining
1065
1065
  */
1066
1066
  action(e) {
1067
- let t = /* @__PURE__ */ d((i) => {
1067
+ let t = /* @__PURE__ */ l((i) => {
1068
1068
  let s = this.registeredArguments.length, r = i.slice(0, s);
1069
1069
  return this._storeOptionsAsProperties ? r[s] = this : r[s] = this.opts(), r.push(this), e.apply(this, r);
1070
1070
  }, "listener");
@@ -1127,7 +1127,7 @@ Expecting one of '${i.join("', '")}'`);
1127
1127
  * @private
1128
1128
  */
1129
1129
  _registerCommand(e) {
1130
- let t = /* @__PURE__ */ d((s) => [s.name()].concat(s.aliases()), "knownBy"), i = t(e).find(
1130
+ let t = /* @__PURE__ */ l((s) => [s.name()].concat(s.aliases()), "knownBy"), i = t(e).find(
1131
1131
  (s) => this._findCommand(s)
1132
1132
  );
1133
1133
  if (i) {
@@ -1155,11 +1155,11 @@ Expecting one of '${i.join("', '")}'`);
1155
1155
  "default"
1156
1156
  );
1157
1157
  } else e.defaultValue !== void 0 && this.setOptionValueWithSource(i, e.defaultValue, "default");
1158
- let s = /* @__PURE__ */ d((r, o, l) => {
1158
+ let s = /* @__PURE__ */ l((r, o, d) => {
1159
1159
  r == null && e.presetArg !== void 0 && (r = e.presetArg);
1160
1160
  let a = this.getOptionValue(i);
1161
1161
  r !== null && e.parseArg ? r = this._callParseArg(e, r, a, o) : r !== null && e.variadic && (r = e._concatValue(r, a)), r == null &&
1162
- (e.negate ? r = !1 : e.isBoolean() || e.optional ? r = !0 : r = ""), this.setOptionValueWithSource(i, r, l);
1162
+ (e.negate ? r = !1 : e.isBoolean() || e.optional ? r = !0 : r = ""), this.setOptionValueWithSource(i, r, d);
1163
1163
  }, "handleOptionValue");
1164
1164
  return this.on("option:" + t, (r) => {
1165
1165
  let o = `error: option '${e.flags}' argument '${r}' is invalid.`;
@@ -1184,9 +1184,9 @@ Expecting one of '${i.join("', '")}'`);
1184
1184
  if (o.makeOptionMandatory(!!e.mandatory), typeof s == "function")
1185
1185
  o.default(r).argParser(s);
1186
1186
  else if (s instanceof RegExp) {
1187
- let l = s;
1188
- s = /* @__PURE__ */ d((a, c) => {
1189
- let u = l.exec(a);
1187
+ let d = s;
1188
+ s = /* @__PURE__ */ l((a, c) => {
1189
+ let u = d.exec(a);
1190
1190
  return u ? u[0] : c;
1191
1191
  }, "fn"), o.default(r).argParser(s);
1192
1192
  } else
@@ -1467,16 +1467,16 @@ Expecting one of '${i.join("', '")}'`);
1467
1467
  t = t.slice();
1468
1468
  let i = !1, s = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1469
1469
  function r(u, p) {
1470
- let m = y.resolve(u, p);
1470
+ let m = _.resolve(u, p);
1471
1471
  if (ee.existsSync(m)) return m;
1472
- if (s.includes(y.extname(p))) return;
1473
- let x = s.find(
1474
- (f) => ee.existsSync(`${m}${f}`)
1472
+ if (s.includes(_.extname(p))) return;
1473
+ let v = s.find(
1474
+ (g) => ee.existsSync(`${m}${g}`)
1475
1475
  );
1476
- if (x) return `${m}${x}`;
1476
+ if (v) return `${m}${v}`;
1477
1477
  }
1478
- d(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1479
- let o = e._executableFile || `${this._name}-${e._name}`, l = this._executableDir || "";
1478
+ l(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1479
+ let o = e._executableFile || `${this._name}-${e._name}`, d = this._executableDir || "";
1480
1480
  if (this._scriptPath) {
1481
1481
  let u;
1482
1482
  try {
@@ -1484,29 +1484,29 @@ Expecting one of '${i.join("', '")}'`);
1484
1484
  } catch {
1485
1485
  u = this._scriptPath;
1486
1486
  }
1487
- l = y.resolve(
1488
- y.dirname(u),
1489
- l
1487
+ d = _.resolve(
1488
+ _.dirname(u),
1489
+ d
1490
1490
  );
1491
1491
  }
1492
- if (l) {
1493
- let u = r(l, o);
1492
+ if (d) {
1493
+ let u = r(d, o);
1494
1494
  if (!u && !e._executableFile && this._scriptPath) {
1495
- let p = y.basename(
1495
+ let p = _.basename(
1496
1496
  this._scriptPath,
1497
- y.extname(this._scriptPath)
1497
+ _.extname(this._scriptPath)
1498
1498
  );
1499
1499
  p !== this._name && (u = r(
1500
- l,
1500
+ d,
1501
1501
  `${p}-${e._name}`
1502
1502
  ));
1503
1503
  }
1504
1504
  o = u || o;
1505
1505
  }
1506
- i = s.includes(y.extname(o));
1506
+ i = s.includes(_.extname(o));
1507
1507
  let a;
1508
- h.platform !== "win32" ? i ? (t.unshift(o), t = fe(h.execArgv).concat(t), a = Z.spawn(h.argv[0], t, { stdio: "inherit" })) : a = Z.spawn(
1509
- o, t, { stdio: "inherit" }) : (t.unshift(o), t = fe(h.execArgv).concat(t), a = Z.spawn(h.execPath, t, { stdio: "inherit" })), a.killed ||
1508
+ h.platform !== "win32" ? i ? (t.unshift(o), t = ge(h.execArgv).concat(t), a = Z.spawn(h.argv[0], t, { stdio: "inherit" })) : a = Z.spawn(
1509
+ o, t, { stdio: "inherit" }) : (t.unshift(o), t = ge(h.execArgv).concat(t), a = Z.spawn(h.execPath, t, { stdio: "inherit" })), a.killed ||
1510
1510
  ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((p) => {
1511
1511
  h.on(p, () => {
1512
1512
  a.killed === !1 && a.exitCode === null && a.kill(p);
@@ -1523,7 +1523,7 @@ Expecting one of '${i.join("', '")}'`);
1523
1523
  ) : h.exit(u);
1524
1524
  }), a.on("error", (u) => {
1525
1525
  if (u.code === "ENOENT") {
1526
- let p = l ? `searched for local subcommand relative to directory '${l}'` : "no directory for search for local subcommand, use .exe\
1526
+ let p = d ? `searched for local subcommand relative to directory '${d}'` : "no directory for search for local subcommand, use .exe\
1527
1527
  cutableDir() to supply a custom directory", m = `'${o}' does not exist
1528
1528
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\
1529
1529
 
@@ -1594,15 +1594,15 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1594
1594
  * @private
1595
1595
  */
1596
1596
  _processArguments() {
1597
- let e = /* @__PURE__ */ d((i, s, r) => {
1597
+ let e = /* @__PURE__ */ l((i, s, r) => {
1598
1598
  let o = s;
1599
1599
  if (s !== null && i.parseArg) {
1600
- let l = `error: command-argument value '${s}' is invalid for argument '${i.name()}'.`;
1600
+ let d = `error: command-argument value '${s}' is invalid for argument '${i.name()}'.`;
1601
1601
  o = this._callParseArg(
1602
1602
  i,
1603
1603
  s,
1604
1604
  r,
1605
- l
1605
+ d
1606
1606
  );
1607
1607
  }
1608
1608
  return o;
@@ -1611,7 +1611,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1611
1611
  let t = [];
1612
1612
  this.registeredArguments.forEach((i, s) => {
1613
1613
  let r = i.defaultValue;
1614
- i.variadic ? s < this.args.length ? (r = this.args.slice(s), i.parseArg && (r = r.reduce((o, l) => e(i, l, o), i.defaultValue))) : r ===
1614
+ i.variadic ? s < this.args.length ? (r = this.args.slice(s), i.parseArg && (r = r.reduce((o, d) => e(i, d, o), i.defaultValue))) : r ===
1615
1615
  void 0 && (r = []) : s < this.args.length && (r = this.args[s], i.parseArg && (r = e(i, r, i.defaultValue))), t[s] = r;
1616
1616
  }), this.processedArgs = t;
1617
1617
  }
@@ -1678,7 +1678,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1678
1678
  );
1679
1679
  this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName && this.help({ error: !0 }), this.
1680
1680
  _outputHelpIfRequested(i.unknown), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1681
- let s = /* @__PURE__ */ d(() => {
1681
+ let s = /* @__PURE__ */ l(() => {
1682
1682
  i.unknown.length > 0 && this.unknownOption(i.unknown[0]);
1683
1683
  }, "checkForUnknownOptions"), r = `command:${this.name()}`;
1684
1684
  if (this._actionHandler) {
@@ -1784,19 +1784,19 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1784
1784
  function o(a) {
1785
1785
  return a.length > 1 && a[0] === "-";
1786
1786
  }
1787
- d(o, "maybeOption");
1788
- let l = null;
1787
+ l(o, "maybeOption");
1788
+ let d = null;
1789
1789
  for (; r.length; ) {
1790
1790
  let a = r.shift();
1791
1791
  if (a === "--") {
1792
1792
  s === i && s.push(a), s.push(...r);
1793
1793
  break;
1794
1794
  }
1795
- if (l && !o(a)) {
1796
- this.emit(`option:${l.name()}`, a);
1795
+ if (d && !o(a)) {
1796
+ this.emit(`option:${d.name()}`, a);
1797
1797
  continue;
1798
1798
  }
1799
- if (l = null, o(a)) {
1799
+ if (d = null, o(a)) {
1800
1800
  let c = this._findOption(a);
1801
1801
  if (c) {
1802
1802
  if (c.required) {
@@ -1807,7 +1807,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1807
1807
  r.length > 0 && !o(r[0]) && (u = r.shift()), this.emit(`option:${c.name()}`, u);
1808
1808
  } else
1809
1809
  this.emit(`option:${c.name()}`);
1810
- l = c.variadic ? c : null;
1810
+ d = c.variadic ? c : null;
1811
1811
  continue;
1812
1812
  }
1813
1813
  }
@@ -1914,7 +1914,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1914
1914
  * @private
1915
1915
  */
1916
1916
  _parseOptionsImplied() {
1917
- let e = new nt(this.options), t = /* @__PURE__ */ d((i) => this.getOptionValue(i) !== void 0 && !["default", "implied"].includes(this.
1917
+ let e = new nt(this.options), t = /* @__PURE__ */ l((i) => this.getOptionValue(i) !== void 0 && !["default", "implied"].includes(this.
1918
1918
  getOptionValueSource(i)), "hasCustomOptionValue");
1919
1919
  this.options.filter(
1920
1920
  (i) => i.implied !== void 0 && t(i.attributeName()) && e.valueFromOption(
@@ -1969,16 +1969,16 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1969
1969
  * @private
1970
1970
  */
1971
1971
  _conflictingOption(e, t) {
1972
- let i = /* @__PURE__ */ d((o) => {
1973
- let l = o.attributeName(), a = this.getOptionValue(l), c = this.options.find(
1974
- (p) => p.negate && l === p.attributeName()
1972
+ let i = /* @__PURE__ */ l((o) => {
1973
+ let d = o.attributeName(), a = this.getOptionValue(d), c = this.options.find(
1974
+ (p) => p.negate && d === p.attributeName()
1975
1975
  ), u = this.options.find(
1976
- (p) => !p.negate && l === p.attributeName()
1976
+ (p) => !p.negate && d === p.attributeName()
1977
1977
  );
1978
1978
  return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : u || o;
1979
- }, "findBestOptionFromValue"), s = /* @__PURE__ */ d((o) => {
1980
- let l = i(o), a = l.attributeName();
1981
- return this.getOptionValueSource(a) === "env" ? `environment variable '${l.envVar}'` : `option '${l.flags}'`;
1979
+ }, "findBestOptionFromValue"), s = /* @__PURE__ */ l((o) => {
1980
+ let d = i(o), a = d.attributeName();
1981
+ return this.getOptionValueSource(a) === "env" ? `environment variable '${d.envVar}'` : `option '${d.flags}'`;
1982
1982
  }, "getErrorMessage"), r = `error: ${s(e)} cannot be used with ${s(t)}`;
1983
1983
  this.error(r, { code: "commander.conflictingOption" });
1984
1984
  }
@@ -1994,7 +1994,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1994
1994
  if (e.startsWith("--") && this._showSuggestionAfterError) {
1995
1995
  let s = [], r = this;
1996
1996
  do {
1997
- let o = r.createHelp().visibleOptions(r).filter((l) => l.long).map((l) => l.long);
1997
+ let o = r.createHelp().visibleOptions(r).filter((d) => d.long).map((d) => d.long);
1998
1998
  s = s.concat(o), r = r.parent;
1999
1999
  } while (r && !r._enablePositionalOptions);
2000
2000
  t = me(e, s);
@@ -2144,7 +2144,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2144
2144
  * @return {Command}
2145
2145
  */
2146
2146
  nameFromFilename(e) {
2147
- return this._name = y.basename(e, y.extname(e)), this;
2147
+ return this._name = _.basename(e, _.extname(e)), this;
2148
2148
  }
2149
2149
  /**
2150
2150
  * Get or set the directory for searching for executable subcommands of this command.
@@ -2177,7 +2177,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2177
2177
  _getHelpContext(e) {
2178
2178
  e = e || {};
2179
2179
  let t = { error: !!e.error }, i;
2180
- return t.error ? i = /* @__PURE__ */ d((s) => this._outputConfiguration.writeErr(s), "write") : i = /* @__PURE__ */ d((s) => this._outputConfiguration.
2180
+ return t.error ? i = /* @__PURE__ */ l((s) => this._outputConfiguration.writeErr(s), "write") : i = /* @__PURE__ */ l((s) => this._outputConfiguration.
2181
2181
  writeOut(s), "write"), t.write = e.write || i, t.command = this, t;
2182
2182
  }
2183
2183
  /**
@@ -2281,7 +2281,7 @@ Expecting one of '${i.join("', '")}'`);
2281
2281
  t && e.find((s) => t.is(s)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
2282
2282
  }
2283
2283
  };
2284
- function fe(n) {
2284
+ function ge(n) {
2285
2285
  return n.map((e) => {
2286
2286
  if (!e.startsWith("--inspect"))
2287
2287
  return e;
@@ -2291,24 +2291,24 @@ Expecting one of '${i.join("', '")}'`);
2291
2291
  r[3], s = r[4]), t && s !== "0" ? `${t}=${i}:${parseInt(s) + 1}` : e;
2292
2292
  });
2293
2293
  }
2294
- d(fe, "incrementNodeInspectorPort");
2295
- ge.Command = ie;
2294
+ l(ge, "incrementNodeInspectorPort");
2295
+ fe.Command = ie;
2296
2296
  });
2297
2297
 
2298
2298
  // ../node_modules/commander/index.js
2299
- var ve = b((g) => {
2300
- var { Argument: _e } = V(), { Command: se } = be(), { CommanderError: ot, InvalidArgumentError: xe } = k(), { Help: at } = Y(), { Option: ye } = X();
2301
- g.program = new se();
2302
- g.createCommand = (n) => new se(n);
2303
- g.createOption = (n, e) => new ye(n, e);
2304
- g.createArgument = (n, e) => new _e(n, e);
2305
- g.Command = se;
2306
- g.Option = ye;
2307
- g.Argument = _e;
2308
- g.Help = at;
2309
- g.CommanderError = ot;
2310
- g.InvalidArgumentError = xe;
2311
- g.InvalidOptionArgumentError = xe;
2299
+ var we = b((f) => {
2300
+ var { Argument: xe } = V(), { Command: se } = be(), { CommanderError: ot, InvalidArgumentError: ve } = j(), { Help: at } = Y(), { Option: _e } = X();
2301
+ f.program = new se();
2302
+ f.createCommand = (n) => new se(n);
2303
+ f.createOption = (n, e) => new _e(n, e);
2304
+ f.createArgument = (n, e) => new xe(n, e);
2305
+ f.Command = se;
2306
+ f.Option = _e;
2307
+ f.Argument = xe;
2308
+ f.Help = at;
2309
+ f.CommanderError = ot;
2310
+ f.InvalidArgumentError = ve;
2311
+ f.InvalidOptionArgumentError = ve;
2312
2312
  });
2313
2313
 
2314
2314
  // ../node_modules/walk-up-path/dist/cjs/index.js
@@ -2316,31 +2316,31 @@ var Oe = b((H) => {
2316
2316
  "use strict";
2317
2317
  Object.defineProperty(H, "__esModule", { value: !0 });
2318
2318
  H.walkUp = void 0;
2319
- var we = require("path"), lt = /* @__PURE__ */ d(function* (n) {
2320
- for (n = (0, we.resolve)(n); n; ) {
2319
+ var ye = require("path"), dt = /* @__PURE__ */ l(function* (n) {
2320
+ for (n = (0, ye.resolve)(n); n; ) {
2321
2321
  yield n;
2322
- let e = (0, we.dirname)(n);
2322
+ let e = (0, ye.dirname)(n);
2323
2323
  if (e === n)
2324
2324
  break;
2325
2325
  n = e;
2326
2326
  }
2327
2327
  }, "walkUp");
2328
- H.walkUp = lt;
2328
+ H.walkUp = dt;
2329
2329
  });
2330
2330
 
2331
2331
  // ../node_modules/picocolors/picocolors.js
2332
- var $e = b((Nt, oe) => {
2332
+ var qe = b((Nt, oe) => {
2333
2333
  var I = process || {}, Ee = I.argv || [], P = I.env || {}, ut = !(P.NO_COLOR || Ee.includes("--no-color")) && (!!P.FORCE_COLOR || Ee.includes(
2334
- "--color") || I.platform === "win32" || (I.stdout || {}).isTTY && P.TERM !== "dumb" || !!P.CI), pt = /* @__PURE__ */ d((n, e, t = n) => (i) => {
2334
+ "--color") || I.platform === "win32" || (I.stdout || {}).isTTY && P.TERM !== "dumb" || !!P.CI), pt = /* @__PURE__ */ l((n, e, t = n) => (i) => {
2335
2335
  let s = "" + i, r = s.indexOf(e, n.length);
2336
2336
  return ~r ? n + ht(s, e, t, r) + e : n + s + e;
2337
- }, "formatter"), ht = /* @__PURE__ */ d((n, e, t, i) => {
2337
+ }, "formatter"), ht = /* @__PURE__ */ l((n, e, t, i) => {
2338
2338
  let s = "", r = 0;
2339
2339
  do
2340
2340
  s += n.substring(r, i) + t, r = i + e.length, i = n.indexOf(e, r);
2341
2341
  while (~i);
2342
2342
  return s + n.substring(r);
2343
- }, "replaceClose"), Se = /* @__PURE__ */ d((n = ut) => {
2343
+ }, "replaceClose"), Se = /* @__PURE__ */ l((n = ut) => {
2344
2344
  let e = n ? pt : () => String;
2345
2345
  return {
2346
2346
  isColorSupported: n,
@@ -2392,70 +2392,70 @@ var $e = b((Nt, oe) => {
2392
2392
  });
2393
2393
 
2394
2394
  // ../node_modules/ts-dedent/dist/index.js
2395
- var Ne = b((A) => {
2395
+ var Ne = b((k) => {
2396
2396
  "use strict";
2397
- Object.defineProperty(A, "__esModule", { value: !0 });
2398
- A.dedent = void 0;
2397
+ Object.defineProperty(k, "__esModule", { value: !0 });
2398
+ k.dedent = void 0;
2399
2399
  function Ie(n) {
2400
2400
  for (var e = [], t = 1; t < arguments.length; t++)
2401
2401
  e[t - 1] = arguments[t];
2402
2402
  var i = Array.from(typeof n == "string" ? [n] : n);
2403
2403
  i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
2404
- var s = i.reduce(function(l, a) {
2404
+ var s = i.reduce(function(d, a) {
2405
2405
  var c = a.match(/\n([\t ]+|(?!\s).)/g);
2406
- return c ? l.concat(c.map(function(u) {
2406
+ return c ? d.concat(c.map(function(u) {
2407
2407
  var p, m;
2408
2408
  return (m = (p = u.match(/[\t ]/g)) === null || p === void 0 ? void 0 : p.length) !== null && m !== void 0 ? m : 0;
2409
- })) : l;
2409
+ })) : d;
2410
2410
  }, []);
2411
2411
  if (s.length) {
2412
2412
  var r = new RegExp(`
2413
2413
  [ ]{` + Math.min.apply(Math, s) + "}", "g");
2414
- i = i.map(function(l) {
2415
- return l.replace(r, `
2414
+ i = i.map(function(d) {
2415
+ return d.replace(r, `
2416
2416
  `);
2417
2417
  });
2418
2418
  }
2419
2419
  i[0] = i[0].replace(/^\r?\n/, "");
2420
2420
  var o = i[0];
2421
- return e.forEach(function(l, a) {
2422
- var c = o.match(/(?:^|\n)( *)$/), u = c ? c[1] : "", p = l;
2423
- typeof l == "string" && l.includes(`
2424
- `) && (p = String(l).split(`
2425
- `).map(function(m, x) {
2426
- return x === 0 ? m : "" + u + m;
2421
+ return e.forEach(function(d, a) {
2422
+ var c = o.match(/(?:^|\n)( *)$/), u = c ? c[1] : "", p = d;
2423
+ typeof d == "string" && d.includes(`
2424
+ `) && (p = String(d).split(`
2425
+ `).map(function(m, v) {
2426
+ return v === 0 ? m : "" + u + m;
2427
2427
  }).join(`
2428
2428
  `)), o += p + i[a + 1];
2429
2429
  }), o;
2430
2430
  }
2431
- d(Ie, "dedent");
2432
- A.dedent = Ie;
2433
- A.default = Ie;
2431
+ l(Ie, "dedent");
2432
+ k.dedent = Ie;
2433
+ k.default = Ie;
2434
2434
  });
2435
2435
 
2436
2436
  // src/cli/bin/index.ts
2437
- var C = require("storybook/internal/common"), B = require("storybook/internal/node-logger"), Be = require("storybook/internal/telemetry"), j = $(ve(), 1);
2437
+ var C = require("storybook/internal/common"), B = require("storybook/internal/node-logger"), Be = require("storybook/internal/telemetry"), A = q(we(), 1);
2438
2438
 
2439
2439
  // ../node_modules/fd-package-json/dist/esm/main.js
2440
- var Ce = $(Oe(), 1), ke = require("node:path"), D = require("node:fs/promises"), Ae = require("node:fs");
2441
- async function dt(n) {
2440
+ var Ce = q(Oe(), 1), je = require("node:path"), D = require("node:fs/promises"), ke = require("node:fs");
2441
+ async function lt(n) {
2442
2442
  try {
2443
2443
  return (await (0, D.stat)(n)).isFile();
2444
2444
  } catch {
2445
2445
  return !1;
2446
2446
  }
2447
2447
  }
2448
- d(dt, "fileExists");
2448
+ l(lt, "fileExists");
2449
2449
  async function ct(n) {
2450
2450
  for (let e of (0, Ce.walkUp)(n)) {
2451
- let t = (0, ke.resolve)(e, "package.json");
2452
- if (await dt(t))
2451
+ let t = (0, je.resolve)(e, "package.json");
2452
+ if (await lt(t))
2453
2453
  return t;
2454
2454
  }
2455
2455
  return null;
2456
2456
  }
2457
- d(ct, "findPackagePath");
2458
- async function w(n) {
2457
+ l(ct, "findPackagePath");
2458
+ async function y(n) {
2459
2459
  let e = await ct(n);
2460
2460
  if (!e)
2461
2461
  return null;
@@ -2466,10 +2466,10 @@ async function w(n) {
2466
2466
  return null;
2467
2467
  }
2468
2468
  }
2469
- d(w, "findPackage");
2469
+ l(y, "findPackage");
2470
2470
 
2471
2471
  // node_modules/leven/index.js
2472
- var re = [], je = [];
2472
+ var re = [], Ae = [];
2473
2473
  function ne(n, e) {
2474
2474
  if (n === e)
2475
2475
  return 0;
@@ -2483,18 +2483,18 @@ function ne(n, e) {
2483
2483
  r++;
2484
2484
  if (i -= r, s -= r, i === 0)
2485
2485
  return s;
2486
- let o, l, a, c, u = 0, p = 0;
2486
+ let o, d, a, c, u = 0, p = 0;
2487
2487
  for (; u < i; )
2488
- je[u] = n.charCodeAt(r + u), re[u] = ++u;
2488
+ Ae[u] = n.charCodeAt(r + u), re[u] = ++u;
2489
2489
  for (; p < s; )
2490
- for (o = e.charCodeAt(r + p), a = p++, l = p, u = 0; u < i; u++)
2491
- c = o === je[u] ? a : a + 1, a = re[u], l = re[u] = a > l ? c > l ? l + 1 : c : c > a ? a + 1 : c;
2492
- return l;
2490
+ for (o = e.charCodeAt(r + p), a = p++, d = p, u = 0; u < i; u++)
2491
+ c = o === Ae[u] ? a : a + 1, a = re[u], d = re[u] = a > d ? c > d ? d + 1 : c : c > a ? a + 1 : c;
2492
+ return d;
2493
2493
  }
2494
- d(ne, "leven");
2494
+ l(ne, "leven");
2495
2495
 
2496
2496
  // src/cli/bin/index.ts
2497
- var E = $($e(), 1);
2497
+ var E = q(qe(), 1);
2498
2498
 
2499
2499
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
2500
2500
  var mt = process.env.NODE_ENV === "production", ae = "Invariant failed";
@@ -2506,15 +2506,15 @@ function O(n, e) {
2506
2506
  throw new Error(i);
2507
2507
  }
2508
2508
  }
2509
- d(O, "invariant");
2509
+ l(O, "invariant");
2510
2510
 
2511
2511
  // package.json
2512
- var qe = "9.0.0-alpha.9";
2512
+ var $e = "9.0.0-beta.0";
2513
2513
 
2514
2514
  // src/cli/build.ts
2515
2515
  var Ve = require("storybook/internal/common"), N = require("storybook/internal/core-server");
2516
- var He = /* @__PURE__ */ d(async (n) => {
2517
- let e = await w(__dirname);
2516
+ var He = /* @__PURE__ */ l(async (n) => {
2517
+ let e = await y(__dirname);
2518
2518
  O(e, "Failed to find the closest package.json file.");
2519
2519
  let t = {
2520
2520
  ...n,
@@ -2534,7 +2534,7 @@ var He = /* @__PURE__ */ d(async (n) => {
2534
2534
 
2535
2535
  // src/cli/buildIndex.ts
2536
2536
  var De = require("storybook/internal/common"), T = require("storybook/internal/core-server");
2537
- var Pe = /* @__PURE__ */ d(async (n) => {
2537
+ var Pe = /* @__PURE__ */ l(async (n) => {
2538
2538
  let e = {
2539
2539
  ...n,
2540
2540
  configDir: n.configDir || ".storybook",
@@ -2552,26 +2552,26 @@ var Pe = /* @__PURE__ */ d(async (n) => {
2552
2552
  }, "buildIndex");
2553
2553
 
2554
2554
  // src/cli/dev.ts
2555
- var Te = require("storybook/internal/common"), F = require("storybook/internal/core-server"), _ = require("storybook/internal/node-logger");
2556
- var le = $(Ne(), 1);
2557
- function gt(n) {
2558
- _.instance.heading = "", n instanceof Error ? n.error ? _.logger.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.
2559
- errors.forEach((e) => _.logger.plain(e)) : _.logger.error(n) : n.compilation?.errors && n.compilation.errors.forEach((e) => _.logger.plain(
2560
- e)), _.logger.line(), _.logger.warn(
2561
- n.close ? le.dedent`
2555
+ var Te = require("storybook/internal/common"), F = require("storybook/internal/core-server"), x = require("storybook/internal/node-logger");
2556
+ var de = q(Ne(), 1);
2557
+ function ft(n) {
2558
+ x.instance.heading = "", n instanceof Error ? n.error ? x.logger.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.
2559
+ errors.forEach((e) => x.logger.plain(e)) : x.logger.error(n) : n.compilation?.errors && n.compilation.errors.forEach((e) => x.logger.plain(
2560
+ e)), x.logger.line(), x.logger.warn(
2561
+ n.close ? de.dedent`
2562
2562
  FATAL broken build!, will close the process,
2563
2563
  Fix the error below and restart storybook.
2564
- ` : le.dedent`
2564
+ ` : de.dedent`
2565
2565
  Broken build, fix the error above.
2566
2566
  You may need to refresh the browser.
2567
2567
  `
2568
- ), _.logger.line();
2568
+ ), x.logger.line();
2569
2569
  }
2570
- d(gt, "printError");
2571
- var Fe = /* @__PURE__ */ d(async (n) => {
2570
+ l(ft, "printError");
2571
+ var Fe = /* @__PURE__ */ l(async (n) => {
2572
2572
  let { env: e } = process;
2573
2573
  e.NODE_ENV = e.NODE_ENV || "development";
2574
- let t = await w(__dirname);
2574
+ let t = await y(__dirname);
2575
2575
  O(t, "Failed to find the closest package.json file.");
2576
2576
  let i = {
2577
2577
  ...n,
@@ -2586,7 +2586,7 @@ var Fe = /* @__PURE__ */ d(async (n) => {
2586
2586
  {
2587
2587
  cliOptions: n,
2588
2588
  presetOptions: i,
2589
- printError: gt
2589
+ printError: ft
2590
2590
  },
2591
2591
  () => (0, F.buildDevStandalone)(i)
2592
2592
  );
@@ -2594,14 +2594,14 @@ var Fe = /* @__PURE__ */ d(async (n) => {
2594
2594
 
2595
2595
  // src/cli/bin/index.ts
2596
2596
  (0, Be.addToGlobalContext)("cliVersion", C.versions.storybook);
2597
- var S = console, de = /* @__PURE__ */ d((n) => j.program.command(n).option(
2597
+ var S = console, le = /* @__PURE__ */ l((n) => A.program.command(n).option(
2598
2598
  "--disable-telemetry",
2599
2599
  "Disable sending telemetry data",
2600
2600
  // default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true
2601
2601
  process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== "false"
2602
2602
  ).option("--debug", "Get more logs in debug mode", !1).option("--enable-crash-reports", "Enable sending crash reports to telemetry data"), "\
2603
2603
  command");
2604
- de("dev").option("-p, --port <number>", "Port to run Storybook", (n) => parseInt(n, 10)).option("-h, --host <string>", "Host to run Storyboo\
2604
+ le("dev").option("-p, --port <number>", "Port to run Storybook", (n) => parseInt(n, 10)).option("-h, --host <string>", "Host to run Storyboo\
2605
2605
  k").option("-c, --config-dir <dir-name>", "Directory where to load Storybook configurations from").option(
2606
2606
  "--https",
2607
2607
  "Serve Storybook over HTTPS. Note: You must provide your own certificate information."
@@ -2625,7 +2625,7 @@ ly site using addon-docs").option("--exact-port", "Exit early if the desired por
2625
2625
  "URL path to be appended when visiting Storybook for the first time"
2626
2626
  ).action(async (n) => {
2627
2627
  B.logger.setLevel(n.loglevel);
2628
- let e = await w(__dirname);
2628
+ let e = await y(__dirname);
2629
2629
  O(e, "Failed to find the closest package.json file."), S.log(E.default.bold(`${e.name} v${e.version}`) + E.default.reset(`
2630
2630
  `)), (0, C.getEnvConfig)(n, {
2631
2631
  port: "SBCONFIG_PORT",
@@ -2635,7 +2635,7 @@ ly site using addon-docs").option("--exact-port", "Exit early if the desired por
2635
2635
  ci: "CI"
2636
2636
  }), parseInt(`${n.port}`, 10) && (n.port = parseInt(`${n.port}`, 10)), await Fe({ ...n, packageJson: e }).catch(() => process.exit(1));
2637
2637
  });
2638
- de("build").option("-o, --output-dir <dir-name>", "Directory where to store built files").option("-c, --config-dir <dir-name>", "Directory w\
2638
+ le("build").option("-o, --output-dir <dir-name>", "Directory where to store built files").option("-c, --config-dir <dir-name>", "Directory w\
2639
2639
  here to load Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--loglevel <level>", "Control level \
2640
2640
  of logging during build").option("--debug-webpack", "Display final webpack configurations for debugging purposes").option(
2641
2641
  "--webpack-stats-json [directory]",
@@ -2647,7 +2647,7 @@ of logging during build").option("--debug-webpack", "Display final webpack confi
2647
2647
  ly site using addon-docs").option("--test", "Build stories optimized for testing purposes.").action(async (n) => {
2648
2648
  let { env: e } = process;
2649
2649
  e.NODE_ENV = e.NODE_ENV || "production";
2650
- let t = await w(__dirname);
2650
+ let t = await y(__dirname);
2651
2651
  O(t, "Failed to find the closest package.json file."), B.logger.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2652
2652
  `)), (0, C.getEnvConfig)(n, {
2653
2653
  staticDir: "SBCONFIG_STATIC_DIR",
@@ -2659,12 +2659,12 @@ ly site using addon-docs").option("--test", "Build stories optimized for testing
2659
2659
  test: !!n.test || process.env.SB_TESTBUILD === "true"
2660
2660
  }).catch(() => process.exit(1));
2661
2661
  });
2662
- de("index").option("-o, --output-file <file-name>", "JSON file to output index").option("-c, --config-dir <dir-name>", "Directory where to l\
2662
+ le("index").option("-o, --output-file <file-name>", "JSON file to output index").option("-c, --config-dir <dir-name>", "Directory where to l\
2663
2663
  oad Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--loglevel <level>", "Control level of loggin\
2664
2664
  g during build").action(async (n) => {
2665
2665
  let { env: e } = process;
2666
2666
  e.NODE_ENV = e.NODE_ENV || "production";
2667
- let t = await w(__dirname);
2667
+ let t = await y(__dirname);
2668
2668
  O(t, "Failed to find the closest package.json file."), B.logger.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2669
2669
  `)), (0, C.getEnvConfig)(n, {
2670
2670
  configDir: "SBCONFIG_CONFIG_DIR",
@@ -2674,14 +2674,14 @@ g during build").action(async (n) => {
2674
2674
  packageJson: t
2675
2675
  }).catch(() => process.exit(1));
2676
2676
  });
2677
- j.program.on("command:*", ([n]) => {
2677
+ A.program.on("command:*", ([n]) => {
2678
2678
  S.error(
2679
2679
  ` Invalid command: %s.
2680
2680
  See --help for a list of available commands.`,
2681
2681
  n
2682
2682
  );
2683
- let t = j.program.commands.map((i) => i.name()).find((i) => ne(i, n) < 3);
2683
+ let t = A.program.commands.map((i) => i.name()).find((i) => ne(i, n) < 3);
2684
2684
  t && S.info(`
2685
2685
  Did you mean ${t}?`), process.exit(1);
2686
2686
  });
2687
- j.program.usage("<command> [options]").version(String(qe)).parse(process.argv);
2687
+ A.program.usage("<command> [options]").version(String($e)).parse(process.argv);