@storybook/react 8.1.0-alpha.0 → 8.1.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/index.d.ts +5 -5
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _storybook_types from '@storybook/types';
|
|
2
|
-
import { Args, ComponentAnnotations, AnnotatedStoryFn, ArgsStoryFn, ArgsFromMeta, StoryAnnotations, StrictArgs, DecoratorFunction, LoaderFunction, StoryContext as StoryContext$1, ProjectAnnotations, StoryAnnotationsOrFn, Store_CSFExports, StoriesWithPartialProps } from '@storybook/types';
|
|
2
|
+
import { Args, ComponentAnnotations, AnnotatedStoryFn, ArgsStoryFn, ArgsFromMeta, StoryAnnotations, StrictArgs, DecoratorFunction, LoaderFunction, StoryContext as StoryContext$1, ProjectAnnotations, NamedOrDefaultProjectAnnotations, StoryAnnotationsOrFn, Store_CSFExports, StoriesWithPartialProps } from '@storybook/types';
|
|
3
3
|
export { ArgTypes, Args, Parameters, StrictArgs } from '@storybook/types';
|
|
4
4
|
import { ComponentType, ComponentProps } from 'react';
|
|
5
5
|
import { Simplify, SetOptional } from 'type-fest';
|
|
@@ -52,12 +52,12 @@ type Preview = ProjectAnnotations<ReactRenderer>;
|
|
|
52
52
|
* setProjectAnnotations(projectAnnotations);
|
|
53
53
|
*```
|
|
54
54
|
*
|
|
55
|
-
* @param projectAnnotations - e.g. (import projectAnnotations from '../.storybook/preview')
|
|
55
|
+
* @param projectAnnotations - e.g. (import * as projectAnnotations from '../.storybook/preview')
|
|
56
56
|
*/
|
|
57
|
-
declare function setProjectAnnotations(projectAnnotations:
|
|
57
|
+
declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations<ReactRenderer> | NamedOrDefaultProjectAnnotations<ReactRenderer>[]): void;
|
|
58
58
|
/**
|
|
59
59
|
* Function that will receive a story along with meta (e.g. a default export from a .stories file)
|
|
60
|
-
* and optionally projectAnnotations e.g. (import * from '../.storybook/preview)
|
|
60
|
+
* and optionally projectAnnotations e.g. (import * as projectAnnotations from '../.storybook/preview)
|
|
61
61
|
* and will return a composed component that has all args/parameters/decorators/etc combined and applied to it.
|
|
62
62
|
*
|
|
63
63
|
*
|
|
@@ -85,7 +85,7 @@ declare function setProjectAnnotations(projectAnnotations: ProjectAnnotations<Re
|
|
|
85
85
|
declare function composeStory<TArgs extends Args = Args>(story: StoryAnnotationsOrFn<ReactRenderer, TArgs>, componentAnnotations: Meta<TArgs | any>, projectAnnotations?: ProjectAnnotations<ReactRenderer>, exportsName?: string): _storybook_types.ComposedStoryFn<ReactRenderer, Partial<TArgs>>;
|
|
86
86
|
/**
|
|
87
87
|
* Function that will receive a stories import (e.g. `import * as stories from './Button.stories'`)
|
|
88
|
-
* and optionally projectAnnotations (e.g. `import * from '../.storybook/preview`)
|
|
88
|
+
* and optionally projectAnnotations (e.g. `import * as projectAnnotations from '../.storybook/preview`)
|
|
89
89
|
* and will return an object containing all the stories passed, but now as a composed component that has all args/parameters/decorators/etc combined and applied to it.
|
|
90
90
|
*
|
|
91
91
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "8.1.0-alpha.
|
|
3
|
+
"version": "8.1.0-alpha.2",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@storybook/client-logger": "8.1.0-alpha.
|
|
52
|
-
"@storybook/docs-tools": "8.1.0-alpha.
|
|
51
|
+
"@storybook/client-logger": "8.1.0-alpha.2",
|
|
52
|
+
"@storybook/docs-tools": "8.1.0-alpha.2",
|
|
53
53
|
"@storybook/global": "^5.0.0",
|
|
54
|
-
"@storybook/preview-api": "8.1.0-alpha.
|
|
55
|
-
"@storybook/react-dom-shim": "8.1.0-alpha.
|
|
56
|
-
"@storybook/types": "8.1.0-alpha.
|
|
54
|
+
"@storybook/preview-api": "8.1.0-alpha.2",
|
|
55
|
+
"@storybook/react-dom-shim": "8.1.0-alpha.2",
|
|
56
|
+
"@storybook/types": "8.1.0-alpha.2",
|
|
57
57
|
"@types/escodegen": "^0.0.6",
|
|
58
58
|
"@types/estree": "^0.0.51",
|
|
59
59
|
"@types/node": "^18.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"util-deprecate": "^1.0.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@storybook/test": "8.1.0-alpha.
|
|
74
|
+
"@storybook/test": "8.1.0-alpha.2",
|
|
75
75
|
"@types/babel-plugin-react-docgen": "^4",
|
|
76
76
|
"@types/semver": "^7.3.4",
|
|
77
77
|
"@types/util-deprecate": "^1.0.0",
|