@storybook/react 9.0.0-alpha.0 → 9.0.0-alpha.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.
- package/dist/chunk-6IITSBZU.mjs +9 -0
- package/dist/chunk-GRKIXS2O.mjs +7 -0
- package/dist/entry-preview.js +1 -1
- package/dist/entry-preview.mjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/preset.d.ts +3 -2
- package/dist/preview.d.ts +4 -3
- package/dist/preview.js +3 -3
- package/dist/preview.mjs +2 -2
- package/package.json +7 -11
- package/dist/chunk-DWFEPKAE.mjs +0 -7
- package/dist/chunk-MHYVTTFG.mjs +0 -9
- package/template/cli/ts-3-8/Button.stories.ts +0 -53
- package/template/cli/ts-3-8/Button.tsx +0 -37
- package/template/cli/ts-3-8/Header.stories.ts +0 -33
- package/template/cli/ts-3-8/Header.tsx +0 -56
- package/template/cli/ts-3-8/Page.stories.ts +0 -32
- package/template/cli/ts-3-8/Page.tsx +0 -73
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { entry_preview_exports, renderToCanvas } from './chunk-
|
|
1
|
+
export { __definePreview } from './chunk-GRKIXS2O.mjs';
|
|
2
|
+
import { entry_preview_exports, renderToCanvas } from './chunk-6IITSBZU.mjs';
|
|
3
3
|
import './chunk-EWIU6LHT.mjs';
|
|
4
4
|
import './chunk-XP5HYGXS.mjs';
|
|
5
5
|
import { global } from '@storybook/global';
|
package/dist/preset.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ declare const previewAnnotations: PresetProperty<'previewAnnotations'>;
|
|
|
10
10
|
*
|
|
11
11
|
* We do the exact same thing in the common preset, but that will fail in Yarn PnP because
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Storybook/internal/core-server doesn't have a peer dependency on react This will make
|
|
14
|
+
*
|
|
15
|
+
* @storybook/react projects work in Yarn PnP
|
|
15
16
|
*/
|
|
16
17
|
declare const resolvedReact: (existing: any) => Promise<any>;
|
|
17
18
|
|
package/dist/preview.d.ts
CHANGED
|
@@ -170,7 +170,8 @@ type UnionToIntersection<Union> = (
|
|
|
170
170
|
? Intersection
|
|
171
171
|
: never;
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
/** Do not use, use the definePreview exported from the framework instead */
|
|
174
|
+
declare function __definePreview(preview: ReactPreview['input']): ReactPreview;
|
|
174
175
|
interface ReactPreview extends Preview<ReactRenderer> {
|
|
175
176
|
meta<TArgs extends Args, Decorators extends DecoratorFunction<ReactRenderer, any>, TMetaArgs extends Partial<TArgs>>(meta: {
|
|
176
177
|
render?: ArgsStoryFn<ReactRenderer, TArgs>;
|
|
@@ -190,9 +191,9 @@ interface ReactMeta<Context extends {
|
|
|
190
191
|
story<TInput extends StoryAnnotations<ReactRenderer, Context['args']> & {
|
|
191
192
|
render: () => ReactRenderer['storyResult'];
|
|
192
193
|
}>(story: TInput): ReactStory;
|
|
193
|
-
story<
|
|
194
|
+
story<TInput extends Simplify<StoryAnnotations<ReactRenderer, AddMocks<Context['args'], MetaInput['args']>, SetOptional<Context['args'], keyof Context['args'] & keyof MetaInput['args']>>>>(story: TInput): ReactStory;
|
|
194
195
|
}
|
|
195
196
|
interface ReactStory extends Story<ReactRenderer> {
|
|
196
197
|
}
|
|
197
198
|
|
|
198
|
-
export { ReactPreview,
|
|
199
|
+
export { ReactPreview, ReactStory, __definePreview };
|