storybook 9.1.0-alpha.9 → 9.1.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.
@@ -47120,9 +47120,8 @@ ue();
47120
47120
  function jU() {
47121
47121
  try {
47122
47122
  return (
47123
- // @ts-expect-error this property exists in certain environments
47124
- !!globalThis.__vitest_browser__ || // @ts-expect-error this property exists in certain environments
47125
- !!globalThis.__playwright__binding__
47123
+ // @ts-expect-error This property exists in Vitest browser mode
47124
+ !!globalThis.__vitest_browser__ || !!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)
47126
47125
  );
47127
47126
  } catch {
47128
47127
  return !1;
@@ -50828,7 +50827,7 @@ prototype.toString.call(e) === "[object Module]", "isModule"), J7e = /* @__PURE_
50828
50827
  return {};
50829
50828
  }
50830
50829
  }, "construct"), B7 = /* @__PURE__ */ a(() => ({
50831
- renderPhase: void 0,
50830
+ renderPhase: "preparing",
50832
50831
  isDebugging: !1,
50833
50832
  isPlaying: !1,
50834
50833
  isLocked: !1,
@@ -50872,18 +50871,20 @@ prototype.toString.call(e) === "[object Module]", "isModule"), J7e = /* @__PURE_
50872
50871
  this.loadParentWindowState();
50873
50872
  let t = /* @__PURE__ */ a(({
50874
50873
  storyId: u,
50875
- isPlaying: c = !0,
50876
- isDebugging: d = !1
50874
+ renderPhase: c,
50875
+ isPlaying: d = !0,
50876
+ isDebugging: f = !1
50877
50877
  }) => {
50878
- let f = this.getState(u);
50878
+ let p = this.getState(u);
50879
50879
  this.setState(u, {
50880
50880
  ...B7(),
50881
- ...lY(f, d),
50882
- shadowCalls: d ? f.shadowCalls : [],
50883
- chainedCallIds: d ? f.chainedCallIds : /* @__PURE__ */ new Set(),
50884
- playUntil: d ? f.playUntil : void 0,
50885
- isPlaying: c,
50886
- isDebugging: d
50881
+ ...lY(p, f),
50882
+ renderPhase: c || p.renderPhase,
50883
+ shadowCalls: f ? p.shadowCalls : [],
50884
+ chainedCallIds: f ? p.chainedCallIds : /* @__PURE__ */ new Set(),
50885
+ playUntil: f ? p.playUntil : void 0,
50886
+ isPlaying: d,
50887
+ isDebugging: f
50887
50888
  }), this.sync(u);
50888
50889
  }, "resetState"), r = /* @__PURE__ */ a((u) => ({ storyId: c, playUntil: d }) => {
50889
50890
  this.getState(c).isDebugging || this.setState(c, ({ calls: p }) => ({
@@ -50921,17 +50922,31 @@ prototype.toString.call(e) === "[object Module]", "isModule"), J7e = /* @__PURE_
50921
50922
  }
50922
50923
  }, "next"), s = /* @__PURE__ */ a(({ storyId: u }) => {
50923
50924
  this.setState(u, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(u).resolvers).forEach((c) => c());
50924
- }, "end"), l = /* @__PURE__ */ a(({ storyId: u, newPhase: c }) => {
50925
+ }, "end"), l = /* @__PURE__ */ a(({
50926
+ storyId: u,
50927
+ newPhase: c
50928
+ }) => {
50925
50929
  let { isDebugging: d } = this.getState(u);
50926
- this.setState(u, { renderPhase: c }), c === "preparing" && d && t({ storyId: u }), c === "playing" && t({ storyId: u, isDebugging: d }),
50927
- c === "played" && this.setState(u, {
50930
+ if (c === "preparing" && d)
50931
+ return t({ storyId: u, renderPhase: c });
50932
+ if (c === "playing")
50933
+ return t({ storyId: u, renderPhase: c, isDebugging: d });
50934
+ c === "played" ? this.setState(u, {
50935
+ renderPhase: c,
50928
50936
  isLocked: !1,
50929
50937
  isPlaying: !1,
50930
50938
  isDebugging: !1
50931
- }), c === "errored" && this.setState(u, {
50939
+ }) : c === "errored" ? this.setState(u, {
50940
+ renderPhase: c,
50932
50941
  isLocked: !1,
50933
50942
  isPlaying: !1
50934
- });
50943
+ }) : c === "aborted" ? this.setState(u, {
50944
+ renderPhase: c,
50945
+ isLocked: !0,
50946
+ isPlaying: !1
50947
+ }) : this.setState(u, {
50948
+ renderPhase: c
50949
+ }), this.sync(u);
50935
50950
  }, "renderPhaseChanged");
50936
50951
  Gv && Gv.ready().then(() => {
50937
50952
  this.channel = Gv.getChannel(), this.channel.on(xu, t), this.channel.on(q4, l), this.channel.on(Vs, () => {
@@ -50944,8 +50959,10 @@ prototype.toString.call(e) === "[object Module]", "isModule"), J7e = /* @__PURE_
50944
50959
  return this.state[t] || B7();
50945
50960
  }
50946
50961
  setState(t, r) {
50947
- let n = this.getState(t), o = typeof r == "function" ? r(n) : r;
50948
- this.state = { ...this.state, [t]: { ...n, ...o } }, this.updateParentWindowState();
50962
+ if (t) {
50963
+ let n = this.getState(t), o = typeof r == "function" ? r(n) : r;
50964
+ this.state = { ...this.state, [t]: { ...n, ...o } }, this.updateParentWindowState();
50965
+ }
50949
50966
  }
50950
50967
  cleanup() {
50951
50968
  this.state = Object.entries(this.state).reduce(
@@ -68997,7 +69014,7 @@ Ct();
68997
69014
  var Ome = N(Wa(), 1), Nn = N(Pme(), 1);
68998
69015
 
68999
69016
  // src/manager-api/version.ts
69000
- var Tme = "9.1.0-alpha.9";
69017
+ var Tme = "9.1.0-beta.0";
69001
69018
 
69002
69019
  // src/manager-api/modules/versions.ts
69003
69020
  var { VERSIONCHECK: bst } = Z, Ame = (0, Ome.default)(1)(() => {
@@ -4403,7 +4403,7 @@ U(wr, {
4403
4403
  var kt = require("@storybook/global"), on = L(rr(), 1), $ = L(require("semver"), 1);
4404
4404
 
4405
4405
  // src/manager-api/version.ts
4406
- var tn = "9.1.0-alpha.9";
4406
+ var tn = "9.1.0-beta.0";
4407
4407
 
4408
4408
  // src/manager-api/modules/versions.ts
4409
4409
  var { VERSIONCHECK: Qs } = kt.global, rn = (0, on.default)(1)(() => {
@@ -3217,7 +3217,7 @@ import { global as Sr } from "@storybook/global";
3217
3217
  import $ from "semver";
3218
3218
 
3219
3219
  // src/manager-api/version.ts
3220
- var No = "9.1.0-alpha.9";
3220
+ var No = "9.1.0-beta.0";
3221
3221
 
3222
3222
  // src/manager-api/modules/versions.ts
3223
3223
  var { VERSIONCHECK: ca } = Sr, jo = (0, ko.default)(1)(() => {