storybook 9.0.0-beta.0 → 9.0.0-beta.2

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.
@@ -389,9 +389,9 @@ var W = b((ae) => {
389
389
  */
390
390
  formatHelp(e, t) {
391
391
  let i = t.padWidth(e, t), s = t.helpWidth || 80, r = 2, o = 2;
392
- function d(g, _) {
393
- if (_) {
394
- let I = `${g.padEnd(i + o)}${_}`;
392
+ function d(g, w) {
393
+ if (w) {
394
+ let I = `${g.padEnd(i + o)}${w}`;
395
395
  return t.wrap(
396
396
  I,
397
397
  s - r,
@@ -421,9 +421,9 @@ var W = b((ae) => {
421
421
  t.optionDescription(g)
422
422
  ));
423
423
  if (m.length > 0 && (c = c.concat(["Options:", a(m), ""])), this.showGlobalOptions) {
424
- let g = t.visibleGlobalOptions(e).map((_) => d(
425
- t.optionTerm(_),
426
- t.optionDescription(_)
424
+ let g = t.visibleGlobalOptions(e).map((w) => d(
425
+ t.optionTerm(w),
426
+ t.optionDescription(w)
427
427
  ));
428
428
  g.length > 0 && (c = c.concat([
429
429
  "Global Options:",
@@ -476,8 +476,8 @@ var W = b((ae) => {
476
476
  |.{1,${d - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
477
477
  "g"
478
478
  ), g = c.match(x) || [];
479
- return a + g.map((_, I) => _ === `
480
- ` ? "" : (I > 0 ? u : "") + _.trimEnd()).join(`
479
+ return a + g.map((w, I) => w === `
480
+ ` ? "" : (I > 0 ? u : "") + w.trimEnd()).join(`
481
481
  `);
482
482
  }
483
483
  };
@@ -485,7 +485,7 @@ var W = b((ae) => {
485
485
  });
486
486
 
487
487
  // ../node_modules/commander/lib/option.js
488
- var J = b((U) => {
488
+ var J = b((G) => {
489
489
  var { InvalidArgumentError: Me } = j(), R = class {
490
490
  static {
491
491
  l(this, "Option");
@@ -657,7 +657,7 @@ var J = b((U) => {
657
657
  isBoolean() {
658
658
  return !this.required && !this.optional && !this.negate;
659
659
  }
660
- }, G = class {
660
+ }, U = class {
661
661
  static {
662
662
  l(this, "DualOptions");
663
663
  }
@@ -696,8 +696,8 @@ var J = b((U) => {
696
696
  longFlag: t };
697
697
  }
698
698
  l(We, "splitOptionFlags");
699
- U.Option = R;
700
- U.DualOptions = G;
699
+ G.Option = R;
700
+ G.DualOptions = U;
701
701
  });
702
702
 
703
703
  // ../node_modules/commander/lib/suggestSimilar.js
@@ -725,7 +725,7 @@ var le = b((de) => {
725
725
  return t[n.length][e.length];
726
726
  }
727
727
  l(Re, "editDistance");
728
- function Ge(n, e) {
728
+ function Ue(n, e) {
729
729
  if (!e || e.length === 0) return "";
730
730
  e = Array.from(new Set(e));
731
731
  let t = n.startsWith("--");
@@ -739,15 +739,15 @@ var le = b((de) => {
739
739
  (Did you mean one of ${i.join(", ")}?)` : i.length === 1 ? `
740
740
  (Did you mean ${i[0]}?)` : "";
741
741
  }
742
- l(Ge, "suggestSimilar");
743
- de.suggestSimilar = Ge;
742
+ l(Ue, "suggestSimilar");
743
+ de.suggestSimilar = Ue;
744
744
  });
745
745
 
746
746
  // ../node_modules/commander/lib/command.js
747
747
  var me = b((he) => {
748
- var Ue = C("node:events").EventEmitter, Y = C("node:child_process"), v = C("node:path"), z = C("node:fs"), h = C("node:process"), { Argument: Je,
748
+ var Ge = C("node:events").EventEmitter, Y = C("node:child_process"), v = C("node:path"), z = C("node:fs"), h = C("node:process"), { Argument: Je,
749
749
  humanReadableArgName: Ye } = V(), { CommanderError: K } = j(), { Help: ze } = W(), { Option: ce, DualOptions: Ke } = J(), { suggestSimilar: ue } = le(),
750
- Q = class n extends Ue {
750
+ Q = class n extends Ge {
751
751
  static {
752
752
  l(this, "Command");
753
753
  }
@@ -2323,7 +2323,7 @@ var xe = b((f) => {
2323
2323
  });
2324
2324
 
2325
2325
  // ../node_modules/walk-up-path/dist/cjs/index.js
2326
- var _e = b((H) => {
2326
+ var we = b((H) => {
2327
2327
  "use strict";
2328
2328
  Object.defineProperty(H, "__esModule", { value: !0 });
2329
2329
  H.walkUp = void 0;
@@ -2446,12 +2446,12 @@ var qe = b((k) => {
2446
2446
 
2447
2447
  // src/cli/bin/index.ts
2448
2448
  var A = q(xe(), 1);
2449
- import { getEnvConfig as re, parseList as wt, versions as yt } from "storybook/internal/common";
2449
+ import { getEnvConfig as re, parseList as _t, versions as yt } from "storybook/internal/common";
2450
2450
  import { logger as ne } from "storybook/internal/node-logger";
2451
2451
  import { addToGlobalContext as Ot } from "storybook/internal/telemetry";
2452
2452
 
2453
2453
  // ../node_modules/fd-package-json/dist/esm/main.js
2454
- var we = q(_e(), 1);
2454
+ var _e = q(we(), 1);
2455
2455
  import { resolve as et } from "node:path";
2456
2456
  import { stat as tt, readFile as it } from "node:fs/promises";
2457
2457
  import { statSync as Wt, readFileSync as Rt } from "node:fs";
@@ -2464,7 +2464,7 @@ async function st(n) {
2464
2464
  }
2465
2465
  l(st, "fileExists");
2466
2466
  async function rt(n) {
2467
- for (let e of (0, we.walkUp)(n)) {
2467
+ for (let e of (0, _e.walkUp)(n)) {
2468
2468
  let t = et(e, "package.json");
2469
2469
  if (await st(t))
2470
2470
  return t;
@@ -2472,7 +2472,7 @@ async function rt(n) {
2472
2472
  return null;
2473
2473
  }
2474
2474
  l(rt, "findPackagePath");
2475
- async function w(n) {
2475
+ async function _(n) {
2476
2476
  let e = await rt(n);
2477
2477
  if (!e)
2478
2478
  return null;
@@ -2483,7 +2483,7 @@ async function w(n) {
2483
2483
  return null;
2484
2484
  }
2485
2485
  }
2486
- l(w, "findPackage");
2486
+ l(_, "findPackage");
2487
2487
 
2488
2488
  // node_modules/leven/index.js
2489
2489
  var Z = [], ye = [];
@@ -2526,13 +2526,13 @@ function y(n, e) {
2526
2526
  l(y, "invariant");
2527
2527
 
2528
2528
  // package.json
2529
- var ke = "9.0.0-beta.0";
2529
+ var ke = "9.0.0-beta.2";
2530
2530
 
2531
2531
  // src/cli/build.ts
2532
2532
  import { cache as ct } from "storybook/internal/common";
2533
2533
  import { buildStaticStandalone as ut, withTelemetry as pt } from "storybook/internal/core-server";
2534
2534
  var Ae = /* @__PURE__ */ l(async (n) => {
2535
- let e = await w(__dirname);
2535
+ let e = await _(__dirname);
2536
2536
  y(e, "Failed to find the closest package.json file.");
2537
2537
  let t = {
2538
2538
  ...n,
@@ -2575,7 +2575,7 @@ import { cache as ft } from "storybook/internal/common";
2575
2575
  import { buildDevStandalone as bt, withTelemetry as xt } from "storybook/internal/core-server";
2576
2576
  import { logger as O, instance as vt } from "storybook/internal/node-logger";
2577
2577
  var se = q(qe(), 1);
2578
- function _t(n) {
2578
+ function wt(n) {
2579
2579
  vt.heading = "", n instanceof Error ? n.error ? O.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.errors.forEach(
2580
2580
  (e) => O.plain(e)) : O.error(n) : n.compilation?.errors && n.compilation.errors.forEach((e) => O.plain(e)), O.line(), O.warn(
2581
2581
  n.close ? se.dedent`
@@ -2587,11 +2587,11 @@ function _t(n) {
2587
2587
  `
2588
2588
  ), O.line();
2589
2589
  }
2590
- l(_t, "printError");
2590
+ l(wt, "printError");
2591
2591
  var $e = /* @__PURE__ */ l(async (n) => {
2592
2592
  let { env: e } = process;
2593
2593
  e.NODE_ENV = e.NODE_ENV || "development";
2594
- let t = await w(__dirname);
2594
+ let t = await _(__dirname);
2595
2595
  y(t, "Failed to find the closest package.json file.");
2596
2596
  let i = {
2597
2597
  ...n,
@@ -2606,7 +2606,7 @@ var $e = /* @__PURE__ */ l(async (n) => {
2606
2606
  {
2607
2607
  cliOptions: n,
2608
2608
  presetOptions: i,
2609
- printError: _t
2609
+ printError: wt
2610
2610
  },
2611
2611
  () => bt(i)
2612
2612
  );
@@ -2628,7 +2628,7 @@ k").option("-c, --config-dir <dir-name>", "Directory where to load Storybook con
2628
2628
  ).option(
2629
2629
  "--ssl-ca <ca>",
2630
2630
  "Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)",
2631
- wt
2631
+ _t
2632
2632
  ).option("--ssl-cert <cert>", "Provide an SSL certificate. (Required with --https)").option("--ssl-key <key>", "Provide an SSL key. (Require\
2633
2633
  d with --https)").option("--smoke-test", "Exit after successful start").option("--ci", "CI mode (skip interactive prompts, don't open browse\
2634
2634
  r)").option("--no-open", "Do not open Storybook automatically in the browser").option("--loglevel <level>", "Control level of logging during\
@@ -2643,9 +2643,9 @@ ack", "Display final webpack configurations for debugging purposes").option(
2643
2643
  ly site using addon-docs").option("--exact-port", "Exit early if the desired port is not available").option(
2644
2644
  "--initial-path [path]",
2645
2645
  "URL path to be appended when visiting Storybook for the first time"
2646
- ).action(async (n) => {
2646
+ ).option("--preview-only", "Use the preview without the manager UI").action(async (n) => {
2647
2647
  ne.setLevel(n.loglevel);
2648
- let e = await w(__dirname);
2648
+ let e = await _(__dirname);
2649
2649
  y(e, "Failed to find the closest package.json file."), S.log(E.default.bold(`${e.name} v${e.version}`) + E.default.reset(`
2650
2650
  `)), re(n, {
2651
2651
  port: "SBCONFIG_PORT",
@@ -2664,10 +2664,11 @@ of logging during build").option("--debug-webpack", "Display final webpack confi
2664
2664
  "--preview-url <string>",
2665
2665
  "Disables the default storybook preview and lets your use your own"
2666
2666
  ).option("--force-build-preview", "Build the preview iframe even if you are using --preview-url").option("--docs", "Build a documentation-on\
2667
- ly site using addon-docs").option("--test", "Build stories optimized for testing purposes.").action(async (n) => {
2667
+ ly site using addon-docs").option("--test", "Build stories optimized for testing purposes.").option("--preview-only", "Use the preview witho\
2668
+ ut the manager UI").action(async (n) => {
2668
2669
  let { env: e } = process;
2669
2670
  e.NODE_ENV = e.NODE_ENV || "production";
2670
- let t = await w(__dirname);
2671
+ let t = await _(__dirname);
2671
2672
  y(t, "Failed to find the closest package.json file."), ne.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2672
2673
  `)), re(n, {
2673
2674
  staticDir: "SBCONFIG_STATIC_DIR",
@@ -2684,7 +2685,7 @@ oad Storybook configurations from").option("--quiet", "Suppress verbose build ou
2684
2685
  g during build").action(async (n) => {
2685
2686
  let { env: e } = process;
2686
2687
  e.NODE_ENV = e.NODE_ENV || "production";
2687
- let t = await w(__dirname);
2688
+ let t = await _(__dirname);
2688
2689
  y(t, "Failed to find the closest package.json file."), ne.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2689
2690
  `)), re(n, {
2690
2691
  configDir: "SBCONFIG_CONFIG_DIR",