@storybook/preact 7.0.0-alpha.50 → 7.0.0-alpha.52
Sign up to get free protection for your applications and to get access to all the features.
package/dist/config.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Addon_ClientStoryApi, Addon_Loadable, Args, ComponentAnnotations, AnnotatedStoryFn, StoryAnnotations, StrictArgs, DecoratorFunction, LoaderFunction, StoryContext as StoryContext$1 } from '@storybook/types';
|
2
2
|
export { ArgTypes, Args, Parameters, StrictArgs } from '@storybook/types';
|
3
|
-
import { P as PreactRenderer } from './types-
|
4
|
-
export { P as PreactRenderer } from './types-
|
3
|
+
import { P as PreactRenderer } from './types-aea856cd.js';
|
4
|
+
export { P as PreactRenderer } from './types-aea856cd.js';
|
5
5
|
import 'preact';
|
6
6
|
|
7
7
|
interface ClientApi extends Addon_ClientStoryApi<PreactRenderer['storyResult']> {
|
@@ -20,19 +20,19 @@ declare const raw: ClientApi['raw'];
|
|
20
20
|
*
|
21
21
|
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
22
22
|
*/
|
23
|
-
|
23
|
+
type Meta<TArgs = Args> = ComponentAnnotations<PreactRenderer, TArgs>;
|
24
24
|
/**
|
25
25
|
* Story function that represents a CSFv2 component example.
|
26
26
|
*
|
27
27
|
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
28
28
|
*/
|
29
|
-
|
29
|
+
type StoryFn<TArgs = Args> = AnnotatedStoryFn<PreactRenderer, TArgs>;
|
30
30
|
/**
|
31
31
|
* Story function that represents a CSFv3 component example.
|
32
32
|
*
|
33
33
|
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
34
34
|
*/
|
35
|
-
|
35
|
+
type StoryObj<TArgs = Args> = StoryAnnotations<PreactRenderer, TArgs>;
|
36
36
|
/**
|
37
37
|
* @deprecated Use `StoryFn` instead.
|
38
38
|
* Use `StoryObj` if you want to migrate to CSF3, which uses objects instead of functions to represent stories.
|
@@ -42,9 +42,9 @@ declare type StoryObj<TArgs = Args> = StoryAnnotations<PreactRenderer, TArgs>;
|
|
42
42
|
*
|
43
43
|
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
44
44
|
*/
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
45
|
+
type Story<TArgs = Args> = StoryFn<TArgs>;
|
46
|
+
type Decorator<TArgs = StrictArgs> = DecoratorFunction<PreactRenderer, TArgs>;
|
47
|
+
type Loader<TArgs = StrictArgs> = LoaderFunction<PreactRenderer, TArgs>;
|
48
|
+
type StoryContext<TArgs = StrictArgs> = StoryContext$1<PreactRenderer, TArgs>;
|
49
49
|
|
50
50
|
export { ClientApi, Decorator, Loader, Meta, Story, StoryContext, StoryFn, StoryObj, configure, forceReRender, raw, storiesOf };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { WebRenderer } from '@storybook/types';
|
2
2
|
import { AnyComponent } from 'preact';
|
3
3
|
|
4
|
-
|
4
|
+
type StoryFnPreactReturnType = string | Node | preact.JSX.Element;
|
5
5
|
interface PreactRenderer extends WebRenderer {
|
6
6
|
component: AnyComponent<any, any>;
|
7
7
|
storyResult: StoryFnPreactReturnType;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/preact",
|
3
|
-
"version": "7.0.0-alpha.
|
3
|
+
"version": "7.0.0-alpha.52",
|
4
4
|
"description": "Storybook Preact renderer",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -51,10 +51,10 @@
|
|
51
51
|
"prep": "../../../scripts/prepare/bundle.ts"
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
|
-
"@storybook/addons": "7.0.0-alpha.
|
55
|
-
"@storybook/core-client": "7.0.0-alpha.
|
56
|
-
"@storybook/store": "7.0.0-alpha.
|
57
|
-
"@storybook/types": "7.0.0-alpha.
|
54
|
+
"@storybook/addons": "7.0.0-alpha.52",
|
55
|
+
"@storybook/core-client": "7.0.0-alpha.52",
|
56
|
+
"@storybook/store": "7.0.0-alpha.52",
|
57
|
+
"@storybook/types": "7.0.0-alpha.52",
|
58
58
|
"global": "^4.4.0",
|
59
59
|
"react": "16.14.0",
|
60
60
|
"react-dom": "16.14.0",
|
@@ -62,7 +62,7 @@
|
|
62
62
|
},
|
63
63
|
"devDependencies": {
|
64
64
|
"preact": "^10.5.13",
|
65
|
-
"typescript": "
|
65
|
+
"typescript": "^4.9.3"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"preact": "^8.0.0||^10.0.0"
|
@@ -80,5 +80,5 @@
|
|
80
80
|
],
|
81
81
|
"platform": "browser"
|
82
82
|
},
|
83
|
-
"gitHead": "
|
83
|
+
"gitHead": "d2494e3f51ce0f55bcb1ef693a6477c669fbe666"
|
84
84
|
}
|
@@ -1,19 +1,17 @@
|
|
1
1
|
import { Button } from './Button';
|
2
2
|
|
3
|
-
// More on
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
|
4
4
|
export default {
|
5
5
|
title: 'Example/Button',
|
6
6
|
component: Button,
|
7
|
-
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/preact/writing-docs/docs-page
|
8
7
|
tags: ['docsPage'],
|
9
|
-
// More on argTypes: https://storybook.js.org/docs/preact/api/argtypes
|
10
8
|
argTypes: {
|
11
9
|
backgroundColor: { control: 'color' },
|
12
10
|
onClick: { action: 'onClick' },
|
13
11
|
},
|
14
12
|
};
|
15
13
|
|
16
|
-
// More on
|
14
|
+
// More on writing stories with args: https://storybook.js.org/docs/7.0/preact/writing-stories/args
|
17
15
|
export const Primary = {
|
18
16
|
args: {
|
19
17
|
primary: true,
|
@@ -3,10 +3,10 @@ import { Header } from './Header';
|
|
3
3
|
export default {
|
4
4
|
title: 'Example/Header',
|
5
5
|
component: Header,
|
6
|
-
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/preact/writing-docs/docs-page
|
6
|
+
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/7.0/preact/writing-docs/docs-page
|
7
7
|
tags: ['docsPage'],
|
8
8
|
parameters: {
|
9
|
-
// More on
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/7.0/preact/configure/story-layout
|
10
10
|
layout: 'fullscreen',
|
11
11
|
},
|
12
12
|
argTypes: {
|
@@ -6,14 +6,14 @@ export default {
|
|
6
6
|
title: 'Example/Page',
|
7
7
|
component: Page,
|
8
8
|
parameters: {
|
9
|
-
// More on
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/7.0/preact/configure/story-layout
|
10
10
|
layout: 'fullscreen',
|
11
11
|
},
|
12
12
|
};
|
13
13
|
|
14
14
|
export const LoggedOut = {};
|
15
15
|
|
16
|
-
// More on interaction testing: https://storybook.js.org/docs/preact/writing-tests/interaction-testing
|
16
|
+
// More on interaction testing: https://storybook.js.org/docs/7.0/preact/writing-tests/interaction-testing
|
17
17
|
export const LoggedIn = {
|
18
18
|
play: async ({ canvasElement }) => {
|
19
19
|
const canvas = within(canvasElement);
|