@storybook/angular-vite 11.0.0-beta.0 → 11.0.0-beta.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/_browser-chunks/{chunk-IEOSIOYC.js → chunk-FDLKT4EQ.js} +39 -5
- package/dist/_browser-chunks/{chunk-GCT6OYDT.js → chunk-JSKZYOEY.js} +1 -1
- package/dist/_browser-chunks/{chunk-VFDWJHES.js → chunk-OAG3JRJQ.js} +3 -3
- package/dist/_browser-chunks/{chunk-RMTRNQGG.js → chunk-VA3FEKPB.js} +39 -3
- package/dist/_node-chunks/{chunk-E664BXNN.js → chunk-2F3CYJX5.js} +6 -6
- package/dist/_node-chunks/{chunk-ATBUCPE5.js → chunk-ETGWD5QX.js} +6 -6
- package/dist/_node-chunks/{story-docs-template-analysis-TF3YWXBE.js → chunk-VQ2WVY73.js} +52 -23
- package/dist/_node-chunks/{chunk-I67O6S5U.js → chunk-WCYA5VMZ.js} +9 -9
- package/dist/_node-chunks/story-docs-template-analysis-65HGKMRZ.js +19 -0
- package/dist/builders/build-storybook/index.js +8 -8
- package/dist/builders/start-storybook/index.js +8 -8
- package/dist/client/config.js +2 -2
- package/dist/client/docs/config.js +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/vitest-compiler-setup.js +2 -0
- package/dist/docgen/docgen-worker.js +1651 -196
- package/dist/index.js +4 -4
- package/dist/node/index.js +6 -6
- package/dist/node/vitest.js +8 -8
- package/dist/preset.js +254 -137
- package/package.json +7 -5
- package/start-schema.json +1 -1
- package/template/cli/button.stories.ts +11 -14
- package/template/cli/header.stories.ts +6 -9
- package/template/cli/page.stories.ts +6 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular-vite",
|
|
3
|
-
"version": "11.0.0-beta.
|
|
3
|
+
"version": "11.0.0-beta.2",
|
|
4
4
|
"description": "Storybook for Angular: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"./client/docs/config": "./dist/client/docs/config.js",
|
|
38
38
|
"./client/preview-prod": "./dist/client/preview-prod.js",
|
|
39
39
|
"./internal/docgen-worker": "./dist/docgen/docgen-worker.js",
|
|
40
|
+
"./internal/vitest-compiler-setup": "./dist/client/vitest-compiler-setup.js",
|
|
40
41
|
"./node": {
|
|
41
42
|
"types": "./dist/node/index.d.ts",
|
|
42
43
|
"code": "./src/node/index.ts",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"!src/**/*"
|
|
64
65
|
],
|
|
65
66
|
"dependencies": {
|
|
66
|
-
"@storybook/builder-vite": "11.0.0-beta.
|
|
67
|
+
"@storybook/builder-vite": "11.0.0-beta.2",
|
|
67
68
|
"@storybook/global": "^5.0.0",
|
|
68
69
|
"telejson": "8.0.0",
|
|
69
70
|
"ts-dedent": "^2.2.0",
|
|
@@ -81,8 +82,9 @@
|
|
|
81
82
|
"@angular/forms": "^21.2.14",
|
|
82
83
|
"@angular/platform-browser": "^21.2.14",
|
|
83
84
|
"@angular/platform-browser-dynamic": "^21.2.14",
|
|
84
|
-
"@storybook/angular-cm": "11.0.0-beta.
|
|
85
|
-
"@storybook/angular-compodoc": "11.0.0-beta.
|
|
85
|
+
"@storybook/angular-cm": "11.0.0-beta.2",
|
|
86
|
+
"@storybook/angular-compodoc": "11.0.0-beta.2",
|
|
87
|
+
"@storybook/component-meta-typescript": "11.0.0-beta.2",
|
|
86
88
|
"@types/node": "^22.19.1",
|
|
87
89
|
"empathic": "^2.0.0",
|
|
88
90
|
"memfs": "^4.11.1",
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
"rxjs": "^7.4.0",
|
|
106
108
|
"sass": "^1.0.0",
|
|
107
109
|
"sass-embedded": "^1.0.0",
|
|
108
|
-
"storybook": "^11.0.0-beta.
|
|
110
|
+
"storybook": "^11.0.0-beta.2",
|
|
109
111
|
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
|
|
110
112
|
"vite": ">=8.0.0",
|
|
111
113
|
"zone.js": ">=0.14.0"
|
package/start-schema.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import preview from '../../.storybook/preview';
|
|
2
2
|
import { fn } from 'storybook/test';
|
|
3
3
|
|
|
4
4
|
import { ButtonComponent } from './button.component';
|
|
5
5
|
|
|
6
6
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
|
-
const meta
|
|
7
|
+
const meta = preview.meta({
|
|
8
8
|
title: 'Example/Button',
|
|
9
9
|
component: ButtonComponent,
|
|
10
10
|
tags: ['autodocs'],
|
|
@@ -15,35 +15,32 @@ const meta: Meta<ButtonComponent> = {
|
|
|
15
15
|
},
|
|
16
16
|
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
|
|
17
17
|
args: { onClick: fn() },
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default meta;
|
|
21
|
-
type Story = StoryObj<ButtonComponent>;
|
|
18
|
+
});
|
|
22
19
|
|
|
23
20
|
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
24
|
-
export const Primary
|
|
21
|
+
export const Primary = meta.story({
|
|
25
22
|
args: {
|
|
26
23
|
primary: true,
|
|
27
24
|
label: 'Button',
|
|
28
25
|
},
|
|
29
|
-
};
|
|
26
|
+
});
|
|
30
27
|
|
|
31
|
-
export const Secondary
|
|
28
|
+
export const Secondary = meta.story({
|
|
32
29
|
args: {
|
|
33
30
|
label: 'Button',
|
|
34
31
|
},
|
|
35
|
-
};
|
|
32
|
+
});
|
|
36
33
|
|
|
37
|
-
export const Large
|
|
34
|
+
export const Large = meta.story({
|
|
38
35
|
args: {
|
|
39
36
|
size: 'large',
|
|
40
37
|
label: 'Button',
|
|
41
38
|
},
|
|
42
|
-
};
|
|
39
|
+
});
|
|
43
40
|
|
|
44
|
-
export const Small
|
|
41
|
+
export const Small = meta.story({
|
|
45
42
|
args: {
|
|
46
43
|
size: 'small',
|
|
47
44
|
label: 'Button',
|
|
48
45
|
},
|
|
49
|
-
};
|
|
46
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import preview from '../../.storybook/preview';
|
|
2
2
|
import { fn } from 'storybook/test';
|
|
3
3
|
|
|
4
4
|
import { HeaderComponent } from './header.component';
|
|
5
5
|
|
|
6
|
-
const meta
|
|
6
|
+
const meta = preview.meta({
|
|
7
7
|
title: 'Example/Header',
|
|
8
8
|
component: HeaderComponent,
|
|
9
9
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
@@ -17,17 +17,14 @@ const meta: Meta<HeaderComponent> = {
|
|
|
17
17
|
onLogout: fn(),
|
|
18
18
|
onCreateAccount: fn(),
|
|
19
19
|
},
|
|
20
|
-
};
|
|
20
|
+
});
|
|
21
21
|
|
|
22
|
-
export
|
|
23
|
-
type Story = StoryObj<HeaderComponent>;
|
|
24
|
-
|
|
25
|
-
export const LoggedIn: Story = {
|
|
22
|
+
export const LoggedIn = meta.story({
|
|
26
23
|
args: {
|
|
27
24
|
user: {
|
|
28
25
|
name: 'Jane Doe',
|
|
29
26
|
},
|
|
30
27
|
},
|
|
31
|
-
};
|
|
28
|
+
});
|
|
32
29
|
|
|
33
|
-
export const LoggedOut
|
|
30
|
+
export const LoggedOut = meta.story();
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import preview from '../../.storybook/preview';
|
|
2
2
|
import { expect, userEvent, within } from 'storybook/test';
|
|
3
3
|
|
|
4
4
|
import { PageComponent } from './page.component';
|
|
5
5
|
|
|
6
|
-
const meta
|
|
6
|
+
const meta = preview.meta({
|
|
7
7
|
title: 'Example/Page',
|
|
8
8
|
component: PageComponent,
|
|
9
9
|
parameters: {
|
|
10
10
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
11
11
|
layout: 'fullscreen',
|
|
12
12
|
},
|
|
13
|
-
};
|
|
13
|
+
});
|
|
14
14
|
|
|
15
|
-
export
|
|
16
|
-
type Story = StoryObj<PageComponent>;
|
|
17
|
-
|
|
18
|
-
export const LoggedOut: Story = {};
|
|
15
|
+
export const LoggedOut = meta.story();
|
|
19
16
|
|
|
20
17
|
// More on component testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
21
|
-
export const LoggedIn
|
|
18
|
+
export const LoggedIn = meta.story({
|
|
22
19
|
play: async ({ canvasElement }) => {
|
|
23
20
|
const canvas = within(canvasElement);
|
|
24
21
|
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
@@ -29,4 +26,4 @@ export const LoggedIn: Story = {
|
|
|
29
26
|
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
30
27
|
await expect(logoutButton).toBeInTheDocument();
|
|
31
28
|
},
|
|
32
|
-
};
|
|
29
|
+
});
|