@storybook/html 7.0.0-alpha.50 → 7.0.0-alpha.51

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/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import 'lib/docs-tools/dist';
2
- export { a as argTypesEnhancers, d as decorators, p as parameters, b as render, r as renderToCanvas } from './types-becdd26a.js';
2
+ export { a as argTypesEnhancers, d as decorators, p as parameters, b as render, r as renderToCanvas } from './types-08f5f6f2.js';
3
3
  import '@storybook/types';
4
4
  import 'lib/types/dist';
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 { H as HtmlRenderer } from './types-becdd26a.js';
4
- export { H as HtmlRenderer } from './types-becdd26a.js';
3
+ import { H as HtmlRenderer } from './types-08f5f6f2.js';
4
+ export { H as HtmlRenderer } from './types-08f5f6f2.js';
5
5
  import 'lib/docs-tools/dist';
6
6
  import 'lib/types/dist';
7
7
 
@@ -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
- declare type Meta<TArgs = Args> = ComponentAnnotations<HtmlRenderer, TArgs>;
23
+ type Meta<TArgs = Args> = ComponentAnnotations<HtmlRenderer, 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
- declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<HtmlRenderer, TArgs>;
29
+ type StoryFn<TArgs = Args> = AnnotatedStoryFn<HtmlRenderer, 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
- declare type StoryObj<TArgs = Args> = StoryAnnotations<HtmlRenderer, TArgs>;
35
+ type StoryObj<TArgs = Args> = StoryAnnotations<HtmlRenderer, 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<HtmlRenderer, TArgs>;
42
42
  *
43
43
  * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
44
44
  */
45
- declare type Story<TArgs = Args> = StoryFn<TArgs>;
46
- declare type Decorator<TArgs = StrictArgs> = DecoratorFunction<HtmlRenderer, TArgs>;
47
- declare type Loader<TArgs = StrictArgs> = LoaderFunction<HtmlRenderer, TArgs>;
48
- declare type StoryContext<TArgs = StrictArgs> = StoryContext$1<HtmlRenderer, TArgs>;
45
+ type Story<TArgs = Args> = StoryFn<TArgs>;
46
+ type Decorator<TArgs = StrictArgs> = DecoratorFunction<HtmlRenderer, TArgs>;
47
+ type Loader<TArgs = StrictArgs> = LoaderFunction<HtmlRenderer, TArgs>;
48
+ type StoryContext<TArgs = StrictArgs> = StoryContext$1<HtmlRenderer, TArgs>;
49
49
 
50
50
  export { Decorator, Loader, Meta, Story, StoryContext, StoryFn, StoryObj, configure, forceReRender, raw, storiesOf };
@@ -24,12 +24,12 @@ declare const parameters: {
24
24
  framework: "html";
25
25
  };
26
26
 
27
- declare type StoryFnHtmlReturnType = string | Node;
27
+ type StoryFnHtmlReturnType = string | Node;
28
28
  interface HtmlRenderer extends WebRenderer {
29
29
  component: string | HTMLElement | ArgsStoryFn<HtmlRenderer>;
30
30
  storyResult: StoryFnHtmlReturnType;
31
31
  }
32
- declare type StoryContext = StoryContext$1<HtmlRenderer> & {
32
+ type StoryContext = StoryContext$1<HtmlRenderer> & {
33
33
  parameters: StoryContext$1<HtmlRenderer>['parameters'] & typeof parameters;
34
34
  };
35
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/html",
3
- "version": "7.0.0-alpha.50",
3
+ "version": "7.0.0-alpha.51",
4
4
  "description": "Storybook HTML renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -51,19 +51,19 @@
51
51
  "prep": "../../../scripts/prepare/bundle.ts"
52
52
  },
53
53
  "dependencies": {
54
- "@storybook/addons": "7.0.0-alpha.50",
55
- "@storybook/core-client": "7.0.0-alpha.50",
56
- "@storybook/docs-tools": "7.0.0-alpha.50",
57
- "@storybook/preview-web": "7.0.0-alpha.50",
58
- "@storybook/store": "7.0.0-alpha.50",
59
- "@storybook/types": "7.0.0-alpha.50",
54
+ "@storybook/addons": "7.0.0-alpha.51",
55
+ "@storybook/core-client": "7.0.0-alpha.51",
56
+ "@storybook/docs-tools": "7.0.0-alpha.51",
57
+ "@storybook/preview-web": "7.0.0-alpha.51",
58
+ "@storybook/store": "7.0.0-alpha.51",
59
+ "@storybook/types": "7.0.0-alpha.51",
60
60
  "global": "^4.4.0",
61
61
  "react": "16.14.0",
62
62
  "react-dom": "16.14.0",
63
63
  "ts-dedent": "^2.0.0"
64
64
  },
65
65
  "devDependencies": {
66
- "typescript": "~4.6.3"
66
+ "typescript": "^4.9.3"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@babel/core": "*"
@@ -81,5 +81,5 @@
81
81
  ],
82
82
  "platform": "browser"
83
83
  },
84
- "gitHead": "77184d039091f4782dc4540df6d271a24fb3e242"
84
+ "gitHead": "4fec76c3f5135854d9834ebc1cf2f1f325696ded"
85
85
  }
@@ -1,17 +1,14 @@
1
1
  import { createButton } from './Button';
2
2
 
3
- // More on default export: https://storybook.js.org/docs/html/writing-stories/introduction#default-export
3
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/html/writing-stories/introduction
4
4
  export default {
5
5
  title: 'Example/Button',
6
- // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/html/writing-docs/docs-page
7
6
  tags: ['docsPage'],
8
- // More on component templates: https://storybook.js.org/docs/html/writing-stories/introduction#using-args
9
7
  render: ({ label, ...args }) => {
10
8
  // You can either use a function to create DOM elements or use a plain html string!
11
9
  // return `<div>${label}</div>`;
12
10
  return createButton({ label, ...args });
13
11
  },
14
- // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
15
12
  argTypes: {
16
13
  backgroundColor: { control: 'color' },
17
14
  label: { control: 'text' },
@@ -24,6 +21,7 @@ export default {
24
21
  },
25
22
  };
26
23
 
24
+ // More on writing stories with args: https://storybook.js.org/docs/7.0/html/writing-stories/args
27
25
  export const Primary = {
28
26
  args: {
29
27
  primary: true,
@@ -2,14 +2,14 @@ import { createHeader } from './Header';
2
2
 
3
3
  export default {
4
4
  title: 'Example/Header',
5
- // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/html/writing-docs/docs-page
5
+ // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/7.0/html/writing-docs/docs-page
6
6
  tags: ['docsPage'],
7
7
  render: (args) => createHeader(args),
8
8
  parameters: {
9
- // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
9
+ // More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
10
10
  layout: 'fullscreen',
11
11
  },
12
- // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
12
+ // More on argTypes: https://storybook.js.org/docs/7.0/html/api/argtypes
13
13
  argTypes: {
14
14
  onLogin: { action: 'onLogin' },
15
15
  onLogout: { action: 'onLogout' },
@@ -5,14 +5,14 @@ export default {
5
5
  title: 'Example/Page',
6
6
  render: () => createPage(),
7
7
  parameters: {
8
- // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
8
+ // More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
9
9
  layout: 'fullscreen',
10
10
  },
11
11
  };
12
12
 
13
13
  export const LoggedOut = {};
14
14
 
15
- // More on interaction testing: https://storybook.js.org/docs/html/writing-tests/interaction-testing
15
+ // More on interaction testing: https://storybook.js.org/docs/7.0/html/writing-tests/interaction-testing
16
16
  export const LoggedIn = {
17
17
  play: async ({ canvasElement }) => {
18
18
  const canvas = within(canvasElement);
@@ -5,14 +5,12 @@ import { createButton } from './Button';
5
5
  // More on how to set up stories at: https://storybook.js.org/docs/html/writing-stories/introduction#default-export
6
6
  const meta: Meta<ButtonProps> = {
7
7
  title: 'Example/Button',
8
- // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/html/writing-docs/docs-page
9
8
  tags: ['docsPage'],
10
9
  render: (args) => {
11
10
  // You can either use a function to create DOM elements or use a plain html string!
12
11
  // return `<div>${label}</div>`;
13
12
  return createButton(args);
14
13
  },
15
- // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
16
14
  argTypes: {
17
15
  backgroundColor: { control: 'color' },
18
16
  label: { control: 'text' },
@@ -28,7 +26,7 @@ const meta: Meta<ButtonProps> = {
28
26
  export default meta;
29
27
  type Story = StoryObj<ButtonProps>;
30
28
 
31
- // More on component templates: https://storybook.js.org/docs/html/writing-stories/introduction#using-args
29
+ // More on writing stories with args: https://storybook.js.org/docs/7.0/html/writing-stories/args
32
30
  export const Primary: Story = {
33
31
  args: {
34
32
  primary: true,
@@ -4,14 +4,14 @@ import { createHeader } from './Header';
4
4
 
5
5
  const meta: Meta<HeaderProps> = {
6
6
  title: 'Example/Header',
7
- // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/html/writing-docs/docs-page
7
+ // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/7.0/html/writing-docs/docs-page
8
8
  tags: ['docsPage'],
9
9
  render: (args) => createHeader(args),
10
10
  parameters: {
11
- // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
11
+ // More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
12
12
  layout: 'fullscreen',
13
13
  },
14
- // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
14
+ // More on argTypes: https://storybook.js.org/docs/7.0/html/api/argtypes
15
15
  argTypes: {
16
16
  onLogin: { action: 'onLogin' },
17
17
  onLogout: { action: 'onLogout' },
@@ -6,7 +6,7 @@ const meta: Meta = {
6
6
  title: 'Example/Page',
7
7
  render: () => createPage(),
8
8
  parameters: {
9
- // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
9
+ // More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
10
10
  layout: 'fullscreen',
11
11
  },
12
12
  };
@@ -15,7 +15,7 @@ export default meta;
15
15
 
16
16
  export const LoggedOut: StoryObj = {};
17
17
 
18
- // More on interaction testing: https://storybook.js.org/docs/html/writing-tests/interaction-testing
18
+ // More on interaction testing: https://storybook.js.org/docs/7.0/html/writing-tests/interaction-testing
19
19
  export const LoggedIn: StoryObj = {
20
20
  play: async ({ canvasElement }) => {
21
21
  const canvas = within(canvasElement);