@storybook/nextjs 7.1.0-alpha.32 → 7.1.0-alpha.34

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.
@@ -1035,6 +1035,7 @@ interface CLIOptions {
1035
1035
  disableTelemetry?: boolean;
1036
1036
  enableCrashReports?: boolean;
1037
1037
  host?: string;
1038
+ initialPath?: string;
1038
1039
  /**
1039
1040
  * @deprecated Use 'staticDirs' Storybook Configuration option instead
1040
1041
  */
package/dist/preset.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as PresetProperty, O as Options } from './index.d-78ba9067.js';
1
+ import { P as PresetProperty, O as Options } from './index.d-d4396bd0.js';
2
2
  import { TransformOptions } from '@babel/core';
3
3
  import { StorybookConfig } from './index.js';
4
4
  import 'file-system-cache';
package/dist/preview.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as Addon_DecoratorFunction } from './index.d-78ba9067.js';
1
+ import { A as Addon_DecoratorFunction } from './index.d-d4396bd0.js';
2
2
  import 'file-system-cache';
3
3
  import '@babel/core';
4
4
  import 'http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs",
3
- "version": "7.1.0-alpha.32",
3
+ "version": "7.1.0-alpha.34",
4
4
  "description": "Storybook for Next.js",
5
5
  "keywords": [
6
6
  "storybook",
@@ -70,13 +70,13 @@
70
70
  "@babel/preset-react": "^7.22.0",
71
71
  "@babel/preset-typescript": "^7.21.0",
72
72
  "@babel/runtime": "^7.22.0",
73
- "@storybook/addon-actions": "7.1.0-alpha.32",
74
- "@storybook/builder-webpack5": "7.1.0-alpha.32",
75
- "@storybook/core-common": "7.1.0-alpha.32",
76
- "@storybook/node-logger": "7.1.0-alpha.32",
77
- "@storybook/preset-react-webpack": "7.1.0-alpha.32",
78
- "@storybook/preview-api": "7.1.0-alpha.32",
79
- "@storybook/react": "7.1.0-alpha.32",
73
+ "@storybook/addon-actions": "7.1.0-alpha.34",
74
+ "@storybook/builder-webpack5": "7.1.0-alpha.34",
75
+ "@storybook/core-common": "7.1.0-alpha.34",
76
+ "@storybook/node-logger": "7.1.0-alpha.34",
77
+ "@storybook/preset-react-webpack": "7.1.0-alpha.34",
78
+ "@storybook/preview-api": "7.1.0-alpha.34",
79
+ "@storybook/react": "7.1.0-alpha.34",
80
80
  "@types/node": "^16.0.0",
81
81
  "css-loader": "^6.7.3",
82
82
  "find-up": "^5.0.0",
@@ -1,14 +1,18 @@
1
1
  import { Button } from './Button';
2
2
 
3
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
3
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
4
4
  export default {
5
5
  title: 'Example/Button',
6
6
  component: Button,
7
+ parameters: {
8
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
9
+ layout: 'centered',
10
+ },
11
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
7
12
  tags: ['autodocs'],
13
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
8
14
  argTypes: {
9
- backgroundColor: {
10
- control: 'color',
11
- },
15
+ backgroundColor: { control: 'color' },
12
16
  },
13
17
  };
14
18
 
@@ -2,15 +2,19 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
3
  import { Button } from './Button';
4
4
 
5
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
5
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
6
6
  const meta: Meta<typeof Button> = {
7
7
  title: 'Example/Button',
8
8
  component: Button,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
11
+ layout: 'centered',
12
+ },
13
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
9
14
  tags: ['autodocs'],
15
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
10
16
  argTypes: {
11
- backgroundColor: {
12
- control: 'color',
13
- },
17
+ backgroundColor: { control: 'color' },
14
18
  },
15
19
  };
16
20
 
@@ -16,7 +16,7 @@ import StackAlt from './assets/stackalt.svg';
16
16
  {`
17
17
  .subheading {
18
18
  --mediumdark: '#999999';
19
- font-weight: 700;
19
+ font-weight: 900;
20
20
  font-size: 13px;
21
21
  color: #999;
22
22
  letter-spacing: 6px;
@@ -2,20 +2,24 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
3
  import { Button } from './Button';
4
4
 
5
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
6
- const meta: Meta<typeof Button> = {
5
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
6
+ const meta = {
7
7
  title: 'Example/Button',
8
8
  component: Button,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
11
+ layout: 'centered',
12
+ },
13
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
9
14
  tags: ['autodocs'],
15
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
10
16
  argTypes: {
11
- backgroundColor: {
12
- control: 'color',
13
- },
17
+ backgroundColor: { control: 'color' },
14
18
  },
15
- };
19
+ } satisfies Meta<typeof Button>;
16
20
 
17
21
  export default meta;
18
- type Story = StoryObj<typeof Button>;
22
+ type Story = StoryObj<typeof meta>;
19
23
 
20
24
  // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
21
25
  export const Primary: Story = {
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Header } from './Header';
3
3
 
4
- const meta: Meta<typeof Header> = {
4
+ const meta = {
5
5
  title: 'Example/Header',
6
6
  component: Header,
7
7
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
@@ -10,10 +10,10 @@ const meta: Meta<typeof Header> = {
10
10
  // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
11
11
  layout: 'fullscreen',
12
12
  },
13
- };
13
+ } satisfies Meta<typeof Header>;
14
14
 
15
15
  export default meta;
16
- type Story = StoryObj<typeof Header>;
16
+ type Story = StoryObj<typeof meta>;
17
17
 
18
18
  export const LoggedIn: Story = {
19
19
  args: {
@@ -16,7 +16,7 @@ import StackAlt from './assets/stackalt.svg';
16
16
  {`
17
17
  .subheading {
18
18
  --mediumdark: '#999999';
19
- font-weight: 900;
19
+ font-weight: 700;
20
20
  font-size: 13px;
21
21
  color: #999;
22
22
  letter-spacing: 6px;
@@ -3,17 +3,17 @@ import { within, userEvent } from '@storybook/testing-library';
3
3
 
4
4
  import { Page } from './Page';
5
5
 
6
- const meta: Meta<typeof Page> = {
6
+ const meta = {
7
7
  title: 'Example/Page',
8
8
  component: Page,
9
9
  parameters: {
10
10
  // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
11
11
  layout: 'fullscreen',
12
12
  },
13
- };
13
+ } satisfies Meta<typeof Page>;
14
14
 
15
15
  export default meta;
16
- type Story = StoryObj<typeof Page>;
16
+ type Story = StoryObj<typeof meta>;
17
17
 
18
18
  export const LoggedOut: Story = {};
19
19
 
File without changes
File without changes
File without changes