@storybook/react 11.0.0-alpha.9 → 11.0.0-beta.1
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/_browser-chunks/{chunk-7QIM3PHH.js → chunk-6MBKXM7O.js} +1 -1
- package/dist/_browser-chunks/{chunk-EZD3TIPB.js → chunk-I62VTYU3.js} +17 -4
- package/dist/_node-chunks/{chunk-AV7GEKV7.js → chunk-37XDLJI5.js} +6788 -15249
- package/dist/_node-chunks/chunk-FCIBS77S.js +61 -0
- package/dist/_node-chunks/chunk-FUHORIY7.js +1395 -0
- package/dist/_node-chunks/chunk-GQOGANUK.js +35 -0
- package/dist/_node-chunks/chunk-IYZUDUNZ.js +1674 -0
- package/dist/_node-chunks/chunk-PPFRYFMF.js +57 -0
- package/dist/_node-chunks/chunk-RVHW3VEA.js +63 -0
- package/dist/_node-chunks/chunk-U53ZMSA3.js +5442 -0
- package/dist/_node-chunks/chunk-YNIH7TZQ.js +93 -0
- package/dist/_node-chunks/extractArgTypesFromComponentFile-EQEZZAHL.js +42 -0
- package/dist/_node-chunks/extractReactDocgenInfo-COAPYCG6.js +59 -0
- package/dist/_node-chunks/extractReactTypescriptDocgenInfo-7FFDIBEA.js +105 -0
- package/dist/_node-chunks/reactDocgen-6ZJPM2YE.js +26 -0
- package/dist/builder-docgen.d.ts +51 -0
- package/dist/builder-docgen.js +24 -0
- package/dist/{chunk-DwM7QKaD.d.ts → chunk-6b3AvPEC.d.ts} +66 -1
- package/dist/docgen/docgen-worker.js +15 -83
- package/dist/entry-preview.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/preset.js +59 -1353
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +2 -2
- package/package.json +18 -5
- package/template/cli/js/Button.stories.js +11 -10
- package/template/cli/js/Header.stories.js +6 -5
- package/template/cli/js/Page.stories.js +6 -5
- package/template/cli/ts/Button.stories.ts +11 -14
- package/template/cli/ts/Header.stories.ts +6 -9
- package/template/cli/ts/Page.stories.ts +6 -9
|
@@ -60,6 +60,22 @@ function withGlobalActEnvironment(actImplementation) {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
+
function createEventWrapper(act) {
|
|
64
|
+
let isInsideAct = !1;
|
|
65
|
+
return (cb) => {
|
|
66
|
+
if (isInsideAct)
|
|
67
|
+
return cb();
|
|
68
|
+
isInsideAct = !0;
|
|
69
|
+
try {
|
|
70
|
+
let result;
|
|
71
|
+
return act(() => {
|
|
72
|
+
result = cb();
|
|
73
|
+
}), result;
|
|
74
|
+
} finally {
|
|
75
|
+
isInsideAct = !1;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
63
79
|
var getAct = async ({ disableAct = !1 } = {}) => {
|
|
64
80
|
if (process.env.NODE_ENV === "production" || disableAct)
|
|
65
81
|
return (cb) => cb();
|
|
@@ -196,10 +212,7 @@ var decorators = [
|
|
|
196
212
|
setReactActEnvironment(previousActEnvironment);
|
|
197
213
|
}
|
|
198
214
|
},
|
|
199
|
-
eventWrapper: (
|
|
200
|
-
let result;
|
|
201
|
-
return act(() => (result = cb(), result)), result;
|
|
202
|
-
}
|
|
215
|
+
eventWrapper: createEventWrapper(act)
|
|
203
216
|
});
|
|
204
217
|
} catch {
|
|
205
218
|
}
|