storybook 9.0.0-alpha.12 → 9.0.0-alpha.14

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 (89) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/highlight.png +0 -0
  3. package/dist/actions/decorator.js +46 -47
  4. package/dist/actions/index.cjs +28 -29
  5. package/dist/actions/index.d.ts +0 -3
  6. package/dist/actions/index.js +27 -28
  7. package/dist/actions/preview.cjs +22 -23
  8. package/dist/actions/preview.js +18 -19
  9. package/dist/backgrounds/index.cjs +148 -0
  10. package/dist/backgrounds/index.d.ts +91 -0
  11. package/dist/backgrounds/index.js +130 -0
  12. package/dist/backgrounds/preview.cjs +143 -0
  13. package/dist/backgrounds/preview.d.ts +54 -0
  14. package/dist/backgrounds/preview.js +127 -0
  15. package/dist/bin/index.cjs +62 -73
  16. package/dist/bin/index.js +57 -68
  17. package/dist/builder-manager/index.cjs +390 -380
  18. package/dist/builder-manager/index.js +489 -479
  19. package/dist/channels/index.cjs +1018 -948
  20. package/dist/channels/index.js +1194 -1161
  21. package/dist/cli/bin/index.cjs +225 -225
  22. package/dist/cli/bin/index.js +234 -234
  23. package/dist/cli/index.cjs +1860 -1873
  24. package/dist/cli/index.js +308 -321
  25. package/dist/common/index.cjs +2396 -2380
  26. package/dist/common/index.d.ts +0 -11
  27. package/dist/common/index.js +2604 -2588
  28. package/dist/components/index.cjs +6393 -12704
  29. package/dist/components/index.d.ts +1 -2
  30. package/dist/components/index.js +4665 -10778
  31. package/dist/core-events/index.cjs +72 -84
  32. package/dist/core-events/index.d.ts +2 -77
  33. package/dist/core-events/index.js +61 -73
  34. package/dist/core-server/index.cjs +13484 -13318
  35. package/dist/core-server/index.js +13652 -13486
  36. package/dist/core-server/presets/common-manager.js +9815 -12
  37. package/dist/core-server/presets/common-preset.cjs +2809 -3005
  38. package/dist/core-server/presets/common-preset.js +2891 -3087
  39. package/dist/docs-tools/index.cjs +626 -600
  40. package/dist/docs-tools/index.js +613 -587
  41. package/dist/highlight/index.cjs +27 -0
  42. package/dist/highlight/index.d.ts +17 -0
  43. package/dist/highlight/index.js +7 -0
  44. package/dist/highlight/preview.cjs +81 -0
  45. package/dist/highlight/preview.d.ts +54 -0
  46. package/dist/highlight/preview.js +67 -0
  47. package/dist/instrumenter/index.cjs +70 -60
  48. package/dist/instrumenter/index.d.ts +8 -7
  49. package/dist/instrumenter/index.js +98 -88
  50. package/dist/manager/globals-module-info.cjs +12 -22
  51. package/dist/manager/globals-module-info.js +2 -12
  52. package/dist/manager/globals-runtime.js +31295 -33999
  53. package/dist/manager/runtime.js +3419 -3522
  54. package/dist/manager-api/index.cjs +2521 -2445
  55. package/dist/manager-api/index.d.ts +7 -21
  56. package/dist/manager-api/index.js +2431 -2349
  57. package/dist/measure/index.cjs +474 -0
  58. package/dist/measure/index.d.ts +66 -0
  59. package/dist/measure/index.js +462 -0
  60. package/dist/measure/preview.cjs +464 -0
  61. package/dist/measure/preview.d.ts +59 -0
  62. package/dist/measure/preview.js +448 -0
  63. package/dist/outline/index.cjs +528 -0
  64. package/dist/outline/index.d.ts +66 -0
  65. package/dist/outline/index.js +500 -0
  66. package/dist/outline/preview.cjs +518 -0
  67. package/dist/outline/preview.d.ts +59 -0
  68. package/dist/outline/preview.js +486 -0
  69. package/dist/preview/runtime.js +20735 -17220
  70. package/dist/preview-api/index.cjs +1069 -1057
  71. package/dist/preview-api/index.d.ts +384 -157
  72. package/dist/preview-api/index.js +1123 -1109
  73. package/dist/server-errors.cjs +66 -67
  74. package/dist/server-errors.d.ts +0 -1
  75. package/dist/server-errors.js +68 -69
  76. package/dist/test/index.cjs +1547 -1546
  77. package/dist/test/index.js +2308 -2307
  78. package/dist/test/preview.cjs +1906 -1905
  79. package/dist/test/preview.js +1439 -1438
  80. package/dist/test/spy.cjs +65 -64
  81. package/dist/test/spy.js +59 -58
  82. package/dist/types/index.cjs +10 -10
  83. package/dist/types/index.d.ts +203 -243
  84. package/package.json +122 -17
  85. package/dist/actions/manager.js +0 -1195
  86. package/dist/component-testing/manager.js +0 -3126
  87. package/dist/controls/manager.js +0 -5593
  88. package/dist/viewport/manager.js +0 -400
  89. /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
@@ -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
@@ -23,9 +23,9 @@ var $ = (n, e, t) => (t = n != null ? Me(Re(n)) : {}, Ue(
23
23
 
24
24
  // ../node_modules/commander/lib/error.js
25
25
  var j = b((R) => {
26
- var q = class extends Error {
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 j = 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,7 +49,7 @@ var j = 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
 
@@ -57,7 +57,7 @@ var j = b((R) => {
57
57
  var V = b((U) => {
58
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");
398
- let c = [`Usage: ${t.commandUsage(e)}`, ""], p = t.commandDescription(e);
399
- p.length > 0 && (c = c.concat([
400
- t.wrap(p, s, 0),
397
+ l(a, "formatList");
398
+ let c = [`Usage: ${t.commandUsage(e)}`, ""], u = t.commandDescription(e);
399
+ u.length > 0 && (c = c.concat([
400
+ t.wrap(u, s, 0),
401
401
  ""
402
402
  ]));
403
- let u = 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
- u.length > 0 && (c = c.concat(["Arguments:", a(u), ""]));
408
- let m = t.visibleOptions(e).map((f) => l(
409
- t.optionTerm(f),
410
- t.optionDescription(f)
407
+ p.length > 0 && (c = c.concat(["Arguments:", a(p), ""]));
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 _ = 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 _.length > 0 && (c = c.concat(["Commands:", a(_), ""])), 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
- `), p = " ".repeat(i), m = "\\s\u200B", _ = 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(_) || [];
468
- return a + f.map((v, M) => v === `
469
- ` ? "" : (M > 0 ? p : "") + 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
  };
@@ -477,7 +477,7 @@ var Y = b((ce) => {
477
477
  var X = b((Q) => {
478
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,19 +678,19 @@ 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
  });
691
691
 
692
692
  // ../node_modules/commander/lib/suggestSimilar.js
693
- var ue = b((pe) => {
693
+ var pe = b((ue) => {
694
694
  function Ze(n, e) {
695
695
  if (Math.abs(n.length - e.length) > 3)
696
696
  return Math.max(n.length, e.length);
@@ -713,7 +713,7 @@ var ue = b((pe) => {
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 ue = b((pe) => {
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");
732
- pe.suggestSimilar = et;
731
+ l(et, "suggestSimilar");
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"),
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
738
  { Argument: it, humanReadableArgName: st } = V(), { CommanderError: te } = j(), { Help: rt } = Y(), { Option: he, DualOptions: nt } = X(),
739
- { suggestSimilar: me } = ue(), ie = class n extends tt {
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,10 +1184,10 @@ 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 p = l.exec(a);
1190
- return p ? p[0] : c;
1187
+ let d = s;
1188
+ s = /* @__PURE__ */ l((a, c) => {
1189
+ let u = d.exec(a);
1190
+ return u ? u[0] : c;
1191
1191
  }, "fn"), o.default(r).argParser(s);
1192
1192
  } else
1193
1193
  o.default(s);
@@ -1466,81 +1466,81 @@ Expecting one of '${i.join("', '")}'`);
1466
1466
  _executeSubCommand(e, t) {
1467
1467
  t = t.slice();
1468
1468
  let i = !1, s = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1469
- function r(p, u) {
1470
- let m = y.resolve(p, u);
1469
+ function r(u, p) {
1470
+ let m = _.resolve(u, p);
1471
1471
  if (ee.existsSync(m)) return m;
1472
- if (s.includes(y.extname(u))) return;
1473
- let _ = 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 (_) return `${m}${_}`;
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
- let p;
1481
+ let u;
1482
1482
  try {
1483
- p = ee.realpathSync(this._scriptPath);
1483
+ u = ee.realpathSync(this._scriptPath);
1484
1484
  } catch {
1485
- p = this._scriptPath;
1485
+ u = this._scriptPath;
1486
1486
  }
1487
- l = y.resolve(
1488
- y.dirname(p),
1489
- l
1487
+ d = _.resolve(
1488
+ _.dirname(u),
1489
+ d
1490
1490
  );
1491
1491
  }
1492
- if (l) {
1493
- let p = r(l, o);
1494
- if (!p && !e._executableFile && this._scriptPath) {
1495
- let u = y.basename(
1492
+ if (d) {
1493
+ let u = r(d, o);
1494
+ if (!u && !e._executableFile && this._scriptPath) {
1495
+ let p = _.basename(
1496
1496
  this._scriptPath,
1497
- y.extname(this._scriptPath)
1497
+ _.extname(this._scriptPath)
1498
1498
  );
1499
- u !== this._name && (p = r(
1500
- l,
1501
- `${u}-${e._name}`
1499
+ p !== this._name && (u = r(
1500
+ d,
1501
+ `${p}-${e._name}`
1502
1502
  ));
1503
1503
  }
1504
- o = p || o;
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 ||
1510
- ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((u) => {
1511
- h.on(u, () => {
1512
- a.killed === !1 && a.exitCode === null && a.kill(u);
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
+ ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((p) => {
1511
+ h.on(p, () => {
1512
+ a.killed === !1 && a.exitCode === null && a.kill(p);
1513
1513
  });
1514
1514
  });
1515
1515
  let c = this._exitCallback;
1516
- a.on("close", (p) => {
1517
- p = p ?? 1, c ? c(
1516
+ a.on("close", (u) => {
1517
+ u = u ?? 1, c ? c(
1518
1518
  new te(
1519
- p,
1519
+ u,
1520
1520
  "commander.executeSubCommandAsync",
1521
1521
  "(close)"
1522
1522
  )
1523
- ) : h.exit(p);
1524
- }), a.on("error", (p) => {
1525
- if (p.code === "ENOENT") {
1526
- let u = l ? `searched for local subcommand relative to directory '${l}'` : "no directory for search for local subcommand, use .exe\
1523
+ ) : h.exit(u);
1524
+ }), a.on("error", (u) => {
1525
+ if (u.code === "ENOENT") {
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
 
1530
1530
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
1531
- - ${u}`;
1531
+ - ${p}`;
1532
1532
  throw new Error(m);
1533
- } else if (p.code === "EACCES")
1533
+ } else if (u.code === "EACCES")
1534
1534
  throw new Error(`'${o}' not executable`);
1535
1535
  if (!c)
1536
1536
  h.exit(1);
1537
1537
  else {
1538
- let u = new te(
1538
+ let p = new te(
1539
1539
  1,
1540
1540
  "commander.executeSubCommandAsync",
1541
1541
  "(error)"
1542
1542
  );
1543
- u.nestedError = p, c(u);
1543
+ p.nestedError = u, c(p);
1544
1544
  }
1545
1545
  }), this.runningCommand = a;
1546
1546
  }
@@ -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,30 +1784,30 @@ 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) {
1803
- let p = r.shift();
1804
- p === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, p);
1803
+ let u = r.shift();
1804
+ u === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, u);
1805
1805
  } else if (c.optional) {
1806
- let p = null;
1807
- r.length > 0 && !o(r[0]) && (p = r.shift()), this.emit(`option:${c.name()}`, p);
1806
+ let u = null;
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
  }
@@ -1820,9 +1820,9 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1820
1820
  }
1821
1821
  }
1822
1822
  if (/^--[^=]+=/.test(a)) {
1823
- let c = a.indexOf("="), p = this._findOption(a.slice(0, c));
1824
- if (p && (p.required || p.optional)) {
1825
- this.emit(`option:${p.name()}`, a.slice(c + 1));
1823
+ let c = a.indexOf("="), u = this._findOption(a.slice(0, c));
1824
+ if (u && (u.required || u.optional)) {
1825
+ this.emit(`option:${u.name()}`, a.slice(c + 1));
1826
1826
  continue;
1827
1827
  }
1828
1828
  }
@@ -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
- (u) => u.negate && l === u.attributeName()
1975
- ), p = this.options.find(
1976
- (u) => !u.negate && l === u.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
+ ), u = this.options.find(
1976
+ (p) => !p.negate && d === p.attributeName()
1977
1977
  );
1978
- return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : p || 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}'`;
1978
+ return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : u || o;
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: xe } = V(), { Command: se } = be(), { CommanderError: ot, InvalidArgumentError: _e } = j(), { 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 xe(n, e);
2305
- g.Command = se;
2306
- g.Option = ye;
2307
- g.Argument = xe;
2308
- g.Help = at;
2309
- g.CommanderError = ot;
2310
- g.InvalidArgumentError = _e;
2311
- g.InvalidOptionArgumentError = _e;
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,32 +2316,32 @@ 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) => {
2333
- var I = process || {}, Ee = I.argv || [], P = I.env || {}, pt = !(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), ut = /* @__PURE__ */ d((n, e, t = n) => (i) => {
2332
+ var qe = b((Nt, oe) => {
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__ */ 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 = pt) => {
2344
- let e = n ? ut : () => String;
2343
+ }, "replaceClose"), Se = /* @__PURE__ */ l((n = ut) => {
2344
+ let e = n ? pt : () => String;
2345
2345
  return {
2346
2346
  isColorSupported: n,
2347
2347
  reset: e("\x1B[0m", "\x1B[0m"),
@@ -2401,61 +2401,61 @@ var Ne = b((k) => {
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(p) {
2407
- var u, m;
2408
- return (m = (u = p.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && m !== void 0 ? m : 0;
2409
- })) : l;
2406
+ return c ? d.concat(c.map(function(u) {
2407
+ var p, m;
2408
+ return (m = (p = u.match(/[\t ]/g)) === null || p === void 0 ? void 0 : p.length) !== null && m !== void 0 ? m : 0;
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)( *)$/), p = c ? c[1] : "", u = l;
2423
- typeof l == "string" && l.includes(`
2424
- `) && (u = String(l).split(`
2425
- `).map(function(m, _) {
2426
- return _ === 0 ? m : "" + p + 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
- `)), o += u + i[a + 1];
2428
+ `)), o += p + i[a + 1];
2429
2429
  }), o;
2430
2430
  }
2431
- d(Ie, "dedent");
2431
+ l(Ie, "dedent");
2432
2432
  k.dedent = Ie;
2433
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"), A = $(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), je = require("node:path"), D = require("node:fs/promises"), ke = 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
2451
  let t = (0, je.resolve)(e, "package.json");
2452
- if (await dt(t))
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,7 +2466,7 @@ 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
2472
  var re = [], Ae = [];
@@ -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, p = 0, u = 0;
2487
- for (; p < i; )
2488
- Ae[p] = n.charCodeAt(r + p), re[p] = ++p;
2489
- for (; u < s; )
2490
- for (o = e.charCodeAt(r + u), a = u++, l = u, p = 0; p < i; p++)
2491
- c = o === Ae[p] ? a : a + 1, a = re[p], l = re[p] = a > l ? c > l ? l + 1 : c : c > a ? a + 1 : c;
2492
- return l;
2486
+ let o, d, a, c, u = 0, p = 0;
2487
+ for (; u < i; )
2488
+ Ae[u] = n.charCodeAt(r + u), re[u] = ++u;
2489
+ for (; p < s; )
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.12";
2512
+ var $e = "9.0.0-alpha.14";
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",
@@ -2553,25 +2553,25 @@ var Pe = /* @__PURE__ */ d(async (n) => {
2553
2553
 
2554
2554
  // src/cli/dev.ts
2555
2555
  var Te = require("storybook/internal/common"), F = require("storybook/internal/core-server"), x = require("storybook/internal/node-logger");
2556
- var le = $(Ne(), 1);
2557
- function gt(n) {
2556
+ var de = q(Ne(), 1);
2557
+ function ft(n) {
2558
2558
  x.instance.heading = "", n instanceof Error ? n.error ? x.logger.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.
2559
2559
  errors.forEach((e) => x.logger.plain(e)) : x.logger.error(n) : n.compilation?.errors && n.compilation.errors.forEach((e) => x.logger.plain(
2560
2560
  e)), x.logger.line(), x.logger.warn(
2561
- n.close ? le.dedent`
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
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) => A.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",
@@ -2684,4 +2684,4 @@ A.program.on("command:*", ([n]) => {
2684
2684
  t && S.info(`
2685
2685
  Did you mean ${t}?`), process.exit(1);
2686
2686
  });
2687
- A.program.usage("<command> [options]").version(String(qe)).parse(process.argv);
2687
+ A.program.usage("<command> [options]").version(String($e)).parse(process.argv);