storybook 9.0.0-alpha.10 → 9.0.0-alpha.11

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.
@@ -22,7 +22,7 @@ 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) => {
25
+ var j = b((R) => {
26
26
  var q = class extends Error {
27
27
  static {
28
28
  d(this, "CommanderError");
@@ -55,7 +55,7 @@ var k = b((R) => {
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
60
  d(this, "Argument");
61
61
  }
@@ -395,16 +395,16 @@ var Y = b((ce) => {
395
395
  `).replace(/^/gm, " ".repeat(r));
396
396
  }
397
397
  d(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),
398
+ let c = [`Usage: ${t.commandUsage(e)}`, ""], p = t.commandDescription(e);
399
+ p.length > 0 && (c = c.concat([
400
+ t.wrap(p, s, 0),
401
401
  ""
402
402
  ]));
403
- let p = t.visibleArguments(e).map((f) => l(
403
+ let u = t.visibleArguments(e).map((f) => l(
404
404
  t.argumentTerm(f),
405
405
  t.argumentDescription(f)
406
406
  ));
407
- p.length > 0 && (c = c.concat(["Arguments:", a(p), ""]));
407
+ u.length > 0 && (c = c.concat(["Arguments:", a(u), ""]));
408
408
  let m = t.visibleOptions(e).map((f) => l(
409
409
  t.optionTerm(f),
410
410
  t.optionDescription(f)
@@ -460,13 +460,13 @@ var Y = b((ce) => {
460
460
  if (l < 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", _ = new RegExp(
463
+ `), p = " ".repeat(i), m = "\\s\u200B", _ = new RegExp(
464
464
  `
465
465
  |.{1,${l - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
466
466
  "g"
467
467
  ), f = c.match(_) || [];
468
468
  return a + f.map((v, M) => v === `
469
- ` ? "" : (M > 0 ? u : "") + v.trimEnd()).join(`
469
+ ` ? "" : (M > 0 ? p : "") + v.trimEnd()).join(`
470
470
  `);
471
471
  }
472
472
  };
@@ -475,7 +475,7 @@ 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
480
  d(this, "Option");
481
481
  }
@@ -690,7 +690,7 @@ var X = b((Q) => {
690
690
  });
691
691
 
692
692
  // ../node_modules/commander/lib/suggestSimilar.js
693
- var pe = b((ue) => {
693
+ var ue = b((pe) => {
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);
@@ -729,14 +729,14 @@ var pe = b((ue) => {
729
729
  (Did you mean ${i[0]}?)` : "";
730
730
  }
731
731
  d(et, "suggestSimilar");
732
- ue.suggestSimilar = et;
732
+ pe.suggestSimilar = et;
733
733
  });
734
734
 
735
735
  // ../node_modules/commander/lib/command.js
736
736
  var be = b((ge) => {
737
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(),
739
- { suggestSimilar: me } = pe(), ie = class n extends tt {
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 {
740
740
  static {
741
741
  d(this, "Command");
742
742
  }
@@ -1186,8 +1186,8 @@ Expecting one of '${i.join("', '")}'`);
1186
1186
  else if (s instanceof RegExp) {
1187
1187
  let l = s;
1188
1188
  s = /* @__PURE__ */ d((a, c) => {
1189
- let u = l.exec(a);
1190
- return u ? u[0] : c;
1189
+ let p = l.exec(a);
1190
+ return p ? p[0] : c;
1191
1191
  }, "fn"), o.default(r).argParser(s);
1192
1192
  } else
1193
1193
  o.default(s);
@@ -1466,10 +1466,10 @@ 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(u, p) {
1470
- let m = y.resolve(u, p);
1469
+ function r(p, u) {
1470
+ let m = y.resolve(p, u);
1471
1471
  if (ee.existsSync(m)) return m;
1472
- if (s.includes(y.extname(p))) return;
1472
+ if (s.includes(y.extname(u))) return;
1473
1473
  let _ = s.find(
1474
1474
  (f) => ee.existsSync(`${m}${f}`)
1475
1475
  );
@@ -1478,69 +1478,69 @@ Expecting one of '${i.join("', '")}'`);
1478
1478
  d(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1479
1479
  let o = e._executableFile || `${this._name}-${e._name}`, l = this._executableDir || "";
1480
1480
  if (this._scriptPath) {
1481
- let u;
1481
+ let p;
1482
1482
  try {
1483
- u = ee.realpathSync(this._scriptPath);
1483
+ p = ee.realpathSync(this._scriptPath);
1484
1484
  } catch {
1485
- u = this._scriptPath;
1485
+ p = this._scriptPath;
1486
1486
  }
1487
1487
  l = y.resolve(
1488
- y.dirname(u),
1488
+ y.dirname(p),
1489
1489
  l
1490
1490
  );
1491
1491
  }
1492
1492
  if (l) {
1493
- let u = r(l, o);
1494
- if (!u && !e._executableFile && this._scriptPath) {
1495
- let p = y.basename(
1493
+ let p = r(l, o);
1494
+ if (!p && !e._executableFile && this._scriptPath) {
1495
+ let u = y.basename(
1496
1496
  this._scriptPath,
1497
1497
  y.extname(this._scriptPath)
1498
1498
  );
1499
- p !== this._name && (u = r(
1499
+ u !== this._name && (p = r(
1500
1500
  l,
1501
- `${p}-${e._name}`
1501
+ `${u}-${e._name}`
1502
1502
  ));
1503
1503
  }
1504
- o = u || o;
1504
+ o = p || o;
1505
1505
  }
1506
1506
  i = s.includes(y.extname(o));
1507
1507
  let a;
1508
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
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((p) => {
1511
- h.on(p, () => {
1512
- a.killed === !1 && a.exitCode === null && a.kill(p);
1510
+ ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((u) => {
1511
+ h.on(u, () => {
1512
+ a.killed === !1 && a.exitCode === null && a.kill(u);
1513
1513
  });
1514
1514
  });
1515
1515
  let c = this._exitCallback;
1516
- a.on("close", (u) => {
1517
- u = u ?? 1, c ? c(
1516
+ a.on("close", (p) => {
1517
+ p = p ?? 1, c ? c(
1518
1518
  new te(
1519
- u,
1519
+ p,
1520
1520
  "commander.executeSubCommandAsync",
1521
1521
  "(close)"
1522
1522
  )
1523
- ) : h.exit(u);
1524
- }), a.on("error", (u) => {
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\
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\
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
- - ${p}`;
1531
+ - ${u}`;
1532
1532
  throw new Error(m);
1533
- } else if (u.code === "EACCES")
1533
+ } else if (p.code === "EACCES")
1534
1534
  throw new Error(`'${o}' not executable`);
1535
1535
  if (!c)
1536
1536
  h.exit(1);
1537
1537
  else {
1538
- let p = new te(
1538
+ let u = new te(
1539
1539
  1,
1540
1540
  "commander.executeSubCommandAsync",
1541
1541
  "(error)"
1542
1542
  );
1543
- p.nestedError = u, c(p);
1543
+ u.nestedError = p, c(u);
1544
1544
  }
1545
1545
  }), this.runningCommand = a;
1546
1546
  }
@@ -1800,11 +1800,11 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1800
1800
  let c = this._findOption(a);
1801
1801
  if (c) {
1802
1802
  if (c.required) {
1803
- let u = r.shift();
1804
- u === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, u);
1803
+ let p = r.shift();
1804
+ p === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, p);
1805
1805
  } else if (c.optional) {
1806
- let u = null;
1807
- r.length > 0 && !o(r[0]) && (u = r.shift()), this.emit(`option:${c.name()}`, u);
1806
+ let p = null;
1807
+ r.length > 0 && !o(r[0]) && (p = r.shift()), this.emit(`option:${c.name()}`, p);
1808
1808
  } else
1809
1809
  this.emit(`option:${c.name()}`);
1810
1810
  l = c.variadic ? c : null;
@@ -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("="), u = this._findOption(a.slice(0, c));
1824
- if (u && (u.required || u.optional)) {
1825
- this.emit(`option:${u.name()}`, a.slice(c + 1));
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));
1826
1826
  continue;
1827
1827
  }
1828
1828
  }
@@ -1971,11 +1971,11 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1971
1971
  _conflictingOption(e, t) {
1972
1972
  let i = /* @__PURE__ */ d((o) => {
1973
1973
  let l = o.attributeName(), a = this.getOptionValue(l), c = this.options.find(
1974
- (p) => p.negate && l === p.attributeName()
1975
- ), u = this.options.find(
1976
- (p) => !p.negate && l === p.attributeName()
1974
+ (u) => u.negate && l === u.attributeName()
1975
+ ), p = this.options.find(
1976
+ (u) => !u.negate && l === u.attributeName()
1977
1977
  );
1978
- return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : u || o;
1978
+ return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : p || o;
1979
1979
  }, "findBestOptionFromValue"), s = /* @__PURE__ */ d((o) => {
1980
1980
  let l = i(o), a = l.attributeName();
1981
1981
  return this.getOptionValueSource(a) === "env" ? `environment variable '${l.envVar}'` : `option '${l.flags}'`;
@@ -2297,7 +2297,7 @@ Expecting one of '${i.join("', '")}'`);
2297
2297
 
2298
2298
  // ../node_modules/commander/index.js
2299
2299
  var ve = b((g) => {
2300
- var { Argument: xe } = V(), { Command: se } = be(), { CommanderError: ot, InvalidArgumentError: _e } = k(), { Help: at } = Y(), { Option: ye } = X();
2300
+ var { Argument: xe } = V(), { Command: se } = be(), { CommanderError: ot, InvalidArgumentError: _e } = j(), { Help: at } = Y(), { Option: ye } = X();
2301
2301
  g.program = new se();
2302
2302
  g.createCommand = (n) => new se(n);
2303
2303
  g.createOption = (n, e) => new ye(n, e);
@@ -2330,8 +2330,8 @@ var Oe = b((H) => {
2330
2330
 
2331
2331
  // ../node_modules/picocolors/picocolors.js
2332
2332
  var $e = 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__ */ d((n, e, t = n) => (i) => {
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) => {
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
2337
  }, "formatter"), ht = /* @__PURE__ */ d((n, e, t, i) => {
@@ -2340,8 +2340,8 @@ var $e = b((Nt, oe) => {
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) => {
2344
- let e = n ? pt : () => String;
2343
+ }, "replaceClose"), Se = /* @__PURE__ */ d((n = pt) => {
2344
+ let e = n ? ut : () => String;
2345
2345
  return {
2346
2346
  isColorSupported: n,
2347
2347
  reset: e("\x1B[0m", "\x1B[0m"),
@@ -2392,10 +2392,10 @@ var $e = b((Nt, oe) => {
2392
2392
  });
2393
2393
 
2394
2394
  // ../node_modules/ts-dedent/dist/index.js
2395
- var Ne = b((j) => {
2395
+ var Ne = b((k) => {
2396
2396
  "use strict";
2397
- Object.defineProperty(j, "__esModule", { value: !0 });
2398
- j.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];
@@ -2403,9 +2403,9 @@ var Ne = b((j) => {
2403
2403
  i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
2404
2404
  var s = i.reduce(function(l, a) {
2405
2405
  var c = a.match(/\n([\t ]+|(?!\s).)/g);
2406
- return c ? l.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;
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
2409
  })) : l;
2410
2410
  }, []);
2411
2411
  if (s.length) {
@@ -2419,25 +2419,25 @@ var Ne = b((j) => {
2419
2419
  i[0] = i[0].replace(/^\r?\n/, "");
2420
2420
  var o = i[0];
2421
2421
  return e.forEach(function(l, a) {
2422
- var c = o.match(/(?:^|\n)( *)$/), u = c ? c[1] : "", p = l;
2422
+ var c = o.match(/(?:^|\n)( *)$/), p = c ? c[1] : "", u = l;
2423
2423
  typeof l == "string" && l.includes(`
2424
- `) && (p = String(l).split(`
2424
+ `) && (u = String(l).split(`
2425
2425
  `).map(function(m, _) {
2426
- return _ === 0 ? m : "" + u + m;
2426
+ return _ === 0 ? m : "" + p + m;
2427
2427
  }).join(`
2428
- `)), o += p + i[a + 1];
2428
+ `)), o += u + i[a + 1];
2429
2429
  }), o;
2430
2430
  }
2431
2431
  d(Ie, "dedent");
2432
- j.dedent = Ie;
2433
- j.default = Ie;
2432
+ k.dedent = Ie;
2433
+ k.default = Ie;
2434
2434
  });
2435
2435
 
2436
2436
  // src/cli/bin/index.ts
2437
2437
  var C = require("storybook/internal/common"), B = require("storybook/internal/node-logger"), Be = require("storybook/internal/telemetry"), A = $(ve(), 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"), je = require("node:fs");
2440
+ var Ce = $(Oe(), 1), je = require("node:path"), D = require("node:fs/promises"), ke = require("node:fs");
2441
2441
  async function dt(n) {
2442
2442
  try {
2443
2443
  return (await (0, D.stat)(n)).isFile();
@@ -2448,7 +2448,7 @@ async function dt(n) {
2448
2448
  d(dt, "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");
2451
+ let t = (0, je.resolve)(e, "package.json");
2452
2452
  if (await dt(t))
2453
2453
  return t;
2454
2454
  }
@@ -2483,12 +2483,12 @@ 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;
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++, l = p, u = 0; u < i; u++)
2491
- c = o === Ae[u] ? a : a + 1, a = re[u], l = re[u] = a > l ? c > l ? l + 1 : c : c > a ? a + 1 : c;
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
2492
  return l;
2493
2493
  }
2494
2494
  d(ne, "leven");
@@ -2509,7 +2509,7 @@ function O(n, e) {
2509
2509
  d(O, "invariant");
2510
2510
 
2511
2511
  // package.json
2512
- var qe = "9.0.0-alpha.10";
2512
+ var qe = "9.0.0-alpha.11";
2513
2513
 
2514
2514
  // src/cli/build.ts
2515
2515
  var Ve = require("storybook/internal/common"), N = require("storybook/internal/core-server");