storybook 9.0.0-alpha.2 → 9.0.0-alpha.3
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.
- package/dist/bin/index.cjs +64 -65
- package/dist/bin/index.js +64 -65
- package/dist/channels/index.cjs +3 -5
- package/dist/channels/index.js +3 -5
- package/dist/cli/bin/index.cjs +12 -12
- package/dist/cli/bin/index.js +14 -14
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +1 -1
- package/dist/common/index.cjs +147 -145
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.js +170 -168
- package/dist/core-server/index.cjs +4 -6
- package/dist/core-server/index.d.ts +1 -1
- package/dist/core-server/index.js +4 -6
- package/dist/manager/globals-runtime.js +4 -6
- package/dist/manager-api/index.cjs +4 -6
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +4 -6
- package/dist/preview/runtime.js +4 -6
- package/dist/preview-api/index.cjs +3 -5
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +3 -5
- package/dist/preview-errors.cjs +1 -1
- package/dist/preview-errors.js +1 -1
- package/dist/test/index.cjs +34915 -0
- package/dist/test/index.d.ts +186 -0
- package/dist/test/index.js +32798 -0
- package/package.json +23 -2
|
@@ -35994,11 +35994,9 @@ var M$ = "UNIVERSAL_STORE:", tr = {
|
|
|
35994
35994
|
throw new TypeError(
|
|
35995
35995
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
35996
35996
|
);
|
|
35997
|
-
if (e.isInternalConstructing = !1, this.id = t.id, this.actorId =
|
|
35998
|
-
|
|
35999
|
-
|
|
36000
|
-
), this.actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${M$}${this.
|
|
36001
|
-
id}`, this.debug("constructor", {
|
|
35997
|
+
if (e.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
35998
|
+
actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${M$}${this.id}`,
|
|
35999
|
+
this.debug("constructor", {
|
|
36002
36000
|
options: t,
|
|
36003
36001
|
environmentOverrides: r,
|
|
36004
36002
|
channelEventName: this.channelEventName
|
|
@@ -37626,7 +37624,7 @@ async function Ek(e, t) {
|
|
|
37626
37624
|
"argTypesRegex"
|
|
37627
37625
|
)} and assigning explicit action with the ${ms.default.cyan(
|
|
37628
37626
|
"fn"
|
|
37629
|
-
)} function from ${ms.default.cyan("
|
|
37627
|
+
)} function from ${ms.default.cyan("storybook/test")} instead:
|
|
37630
37628
|
https://storybook.js.org/docs/essentials/actions#via-storybooktest-fn-spy-function
|
|
37631
37629
|
|
|
37632
37630
|
The build used by the addon for snapshot testing doesn't take the regex into account, which can cause hard to debug problems when a snapshot depends on the presence of action props.
|
|
@@ -423,7 +423,7 @@ declare class UniversalStore<State, CustomEvent extends {
|
|
|
423
423
|
* @example
|
|
424
424
|
*
|
|
425
425
|
* ```ts
|
|
426
|
-
* import * as testUtils from '
|
|
426
|
+
* import * as testUtils from 'storybook/test'; // in stories
|
|
427
427
|
* import { vi as testUtils } from 'vitest'; // ... or in Vitest tests
|
|
428
428
|
*
|
|
429
429
|
* const initialState = { ... };
|
|
@@ -36042,11 +36042,9 @@ var z$ = "UNIVERSAL_STORE:", Qt = {
|
|
|
36042
36042
|
throw new TypeError(
|
|
36043
36043
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
36044
36044
|
);
|
|
36045
|
-
if (e.isInternalConstructing = !1, this.id = t.id, this.actorId =
|
|
36046
|
-
|
|
36047
|
-
|
|
36048
|
-
), this.actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${z$}${this.
|
|
36049
|
-
id}`, this.debug("constructor", {
|
|
36045
|
+
if (e.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
36046
|
+
actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${z$}${this.id}`,
|
|
36047
|
+
this.debug("constructor", {
|
|
36050
36048
|
options: t,
|
|
36051
36049
|
environmentOverrides: r,
|
|
36052
36050
|
channelEventName: this.channelEventName
|
|
@@ -37693,7 +37691,7 @@ async function D_(e, t) {
|
|
|
37693
37691
|
"argTypesRegex"
|
|
37694
37692
|
)} and assigning explicit action with the ${es.default.cyan(
|
|
37695
37693
|
"fn"
|
|
37696
|
-
)} function from ${es.default.cyan("
|
|
37694
|
+
)} function from ${es.default.cyan("storybook/test")} instead:
|
|
37697
37695
|
https://storybook.js.org/docs/essentials/actions#via-storybooktest-fn-spy-function
|
|
37698
37696
|
|
|
37699
37697
|
The build used by the addon for snapshot testing doesn't take the regex into account, which can cause hard to debug problems when a snapshot depends on the presence of action props.
|
|
@@ -25517,11 +25517,9 @@ var a$ = "UNIVERSAL_STORE:", qr = {
|
|
|
25517
25517
|
throw new TypeError(
|
|
25518
25518
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
25519
25519
|
);
|
|
25520
|
-
if (J.isInternalConstructing = !1, this.id = t.id, this.actorId =
|
|
25521
|
-
|
|
25522
|
-
|
|
25523
|
-
), this.actorType = t.leader ? J.ActorType.LEADER : J.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${a$}${this.
|
|
25524
|
-
id}`, this.debug("constructor", {
|
|
25520
|
+
if (J.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
25521
|
+
actorType = t.leader ? J.ActorType.LEADER : J.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${a$}${this.id}`,
|
|
25522
|
+
this.debug("constructor", {
|
|
25525
25523
|
options: t,
|
|
25526
25524
|
environmentOverrides: r,
|
|
25527
25525
|
channelEventName: this.channelEventName
|
|
@@ -41010,7 +41008,7 @@ qe();
|
|
|
41010
41008
|
var UM = P(Kn(), 1), mn = P($M(), 1);
|
|
41011
41009
|
|
|
41012
41010
|
// src/manager-api/version.ts
|
|
41013
|
-
var jM = "9.0.0-alpha.
|
|
41011
|
+
var jM = "9.0.0-alpha.3";
|
|
41014
41012
|
|
|
41015
41013
|
// src/manager-api/modules/versions.ts
|
|
41016
41014
|
var { VERSIONCHECK: Bde } = z, VM = (0, UM.default)(1)(() => {
|
|
@@ -9869,7 +9869,7 @@ O(Wt, {
|
|
|
9869
9869
|
var Ye = b(q(), 1), g0 = b(Ge(), 1), j = b(require("semver"), 1);
|
|
9870
9870
|
|
|
9871
9871
|
// src/manager-api/version.ts
|
|
9872
|
-
var v0 = "9.0.0-alpha.
|
|
9872
|
+
var v0 = "9.0.0-alpha.3";
|
|
9873
9873
|
|
|
9874
9874
|
// src/manager-api/modules/versions.ts
|
|
9875
9875
|
var { VERSIONCHECK: zn } = Ye.global, m0 = (0, g0.default)(1)(() => {
|
|
@@ -10154,11 +10154,9 @@ var gl = "UNIVERSAL_STORE:", F = {
|
|
|
10154
10154
|
throw new TypeError(
|
|
10155
10155
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
10156
10156
|
);
|
|
10157
|
-
if (e.isInternalConstructing = !1, this.id = t.id, this.actorId =
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
), this.actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${gl}${this.
|
|
10161
|
-
id}`, this.debug("constructor", {
|
|
10157
|
+
if (e.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
10158
|
+
actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${gl}${this.id}`,
|
|
10159
|
+
this.debug("constructor", {
|
|
10162
10160
|
options: t,
|
|
10163
10161
|
environmentOverrides: r,
|
|
10164
10162
|
channelEventName: this.channelEventName
|
|
@@ -1103,7 +1103,7 @@ declare const useUniversalStore: {
|
|
|
1103
1103
|
* @example
|
|
1104
1104
|
*
|
|
1105
1105
|
* ```ts
|
|
1106
|
-
* import * as testUtils from '
|
|
1106
|
+
* import * as testUtils from 'storybook/test'; // in stories
|
|
1107
1107
|
* import { vi as testUtils } from 'vitest'; // ... or in Vitest tests
|
|
1108
1108
|
*
|
|
1109
1109
|
* const initialState = { ... };
|
|
@@ -2626,7 +2626,7 @@ var nr = ze(Be(), 1);
|
|
|
2626
2626
|
import j from "semver";
|
|
2627
2627
|
|
|
2628
2628
|
// src/manager-api/version.ts
|
|
2629
|
-
var rr = "9.0.0-alpha.
|
|
2629
|
+
var rr = "9.0.0-alpha.3";
|
|
2630
2630
|
|
|
2631
2631
|
// src/manager-api/modules/versions.ts
|
|
2632
2632
|
var { VERSIONCHECK: dn } = P, ar = (0, nr.default)(1)(() => {
|
|
@@ -3916,11 +3916,9 @@ var d5 = "UNIVERSAL_STORE:", k = {
|
|
|
3916
3916
|
throw new TypeError(
|
|
3917
3917
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
3918
3918
|
);
|
|
3919
|
-
if (R.isInternalConstructing = !1, this.id = t.id, this.actorId =
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
), this.actorType = t.leader ? R.ActorType.LEADER : R.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${d5}${this.
|
|
3923
|
-
id}`, this.debug("constructor", {
|
|
3919
|
+
if (R.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
3920
|
+
actorType = t.leader ? R.ActorType.LEADER : R.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${d5}${this.id}`,
|
|
3921
|
+
this.debug("constructor", {
|
|
3924
3922
|
options: t,
|
|
3925
3923
|
environmentOverrides: r,
|
|
3926
3924
|
channelEventName: this.channelEventName
|
package/dist/preview/runtime.js
CHANGED
|
@@ -2286,11 +2286,9 @@ var Ml = "UNIVERSAL_STORE:", ee = {
|
|
|
2286
2286
|
throw new TypeError(
|
|
2287
2287
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
2288
2288
|
);
|
|
2289
|
-
if (w.isInternalConstructing = !1, this.id = e.id, this.actorId =
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
), this.actorType = e.leader ? w.ActorType.LEADER : w.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${Ml}${this.
|
|
2293
|
-
id}`, this.debug("constructor", {
|
|
2289
|
+
if (w.isInternalConstructing = !1, this.id = e.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
2290
|
+
actorType = e.leader ? w.ActorType.LEADER : w.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${Ml}${this.id}`,
|
|
2291
|
+
this.debug("constructor", {
|
|
2294
2292
|
options: e,
|
|
2295
2293
|
environmentOverrides: t,
|
|
2296
2294
|
channelEventName: this.channelEventName
|
|
@@ -4670,7 +4668,7 @@ for-example-in-the-play-function",
|
|
|
4670
4668
|
This is deprecated and won't work in Storybook 8 anymore.
|
|
4671
4669
|
` : ""}
|
|
4672
4670
|
Please provide an explicit spy to your args like this:
|
|
4673
|
-
import { fn } from '
|
|
4671
|
+
import { fn } from 'storybook/test';
|
|
4674
4672
|
...
|
|
4675
4673
|
args: {
|
|
4676
4674
|
${t.name}: fn()
|
|
@@ -2336,11 +2336,9 @@ var oi = "UNIVERSAL_STORE:", G = {
|
|
|
2336
2336
|
throw new TypeError(
|
|
2337
2337
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
2338
2338
|
);
|
|
2339
|
-
if (r.isInternalConstructing = !1, this.id = e.id, this.actorId =
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
), this.actorType = e.leader ? r.ActorType.LEADER : r.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${oi}${this.
|
|
2343
|
-
id}`, this.debug("constructor", {
|
|
2339
|
+
if (r.isInternalConstructing = !1, this.id = e.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
2340
|
+
actorType = e.leader ? r.ActorType.LEADER : r.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${oi}${this.id}`,
|
|
2341
|
+
this.debug("constructor", {
|
|
2344
2342
|
options: e,
|
|
2345
2343
|
environmentOverrides: t,
|
|
2346
2344
|
channelEventName: this.channelEventName
|
|
@@ -582,7 +582,7 @@ declare const useUniversalStore: {
|
|
|
582
582
|
* @example
|
|
583
583
|
*
|
|
584
584
|
* ```ts
|
|
585
|
-
* import * as testUtils from '
|
|
585
|
+
* import * as testUtils from 'storybook/test'; // in stories
|
|
586
586
|
* import { vi as testUtils } from 'vitest'; // ... or in Vitest tests
|
|
587
587
|
*
|
|
588
588
|
* const initialState = { ... };
|
|
@@ -2279,11 +2279,9 @@ var hs = "UNIVERSAL_STORE:", q = {
|
|
|
2279
2279
|
throw new TypeError(
|
|
2280
2280
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
2281
2281
|
);
|
|
2282
|
-
if (T.isInternalConstructing = !1, this.id = e.id, this.actorId =
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
), this.actorType = e.leader ? T.ActorType.LEADER : T.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${hs}${this.
|
|
2286
|
-
id}`, this.debug("constructor", {
|
|
2282
|
+
if (T.isInternalConstructing = !1, this.id = e.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
2283
|
+
actorType = e.leader ? T.ActorType.LEADER : T.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${hs}${this.id}`,
|
|
2284
|
+
this.debug("constructor", {
|
|
2287
2285
|
options: e,
|
|
2288
2286
|
environmentOverrides: t,
|
|
2289
2287
|
channelEventName: this.channelEventName
|
package/dist/preview-errors.cjs
CHANGED
|
@@ -178,7 +178,7 @@ for-example-in-the-play-function",
|
|
|
178
178
|
This is deprecated and won't work in Storybook 8 anymore.
|
|
179
179
|
` : ""}
|
|
180
180
|
Please provide an explicit spy to your args like this:
|
|
181
|
-
import { fn } from '
|
|
181
|
+
import { fn } from 'storybook/test';
|
|
182
182
|
...
|
|
183
183
|
args: {
|
|
184
184
|
${e.name}: fn()
|
package/dist/preview-errors.js
CHANGED
|
@@ -121,7 +121,7 @@ for-example-in-the-play-function",
|
|
|
121
121
|
This is deprecated and won't work in Storybook 8 anymore.
|
|
122
122
|
` : ""}
|
|
123
123
|
Please provide an explicit spy to your args like this:
|
|
124
|
-
import { fn } from '
|
|
124
|
+
import { fn } from 'storybook/test';
|
|
125
125
|
...
|
|
126
126
|
args: {
|
|
127
127
|
${e.name}: fn()
|