@storybook/vue3 11.0.0-beta.0 → 11.0.0-beta.1

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.
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  indent
14
- } from "./chunk-OYGQEKHF.js";
14
+ } from "./chunk-Y735V2YT.js";
15
15
  import {
16
16
  collectComponentMetaSources
17
- } from "./chunk-NTR7OES7.js";
17
+ } from "./chunk-I4ZYXPEH.js";
18
18
 
19
19
  // src/docgen/component-docgen/arg-types/extractArgTypes.ts
20
20
  import { convert, extractComponentProps, hasDocgen } from "storybook/internal/docs-tools";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -31,7 +31,7 @@ import {
31
31
  renderPropLikeArg,
32
32
  renderSlotContent,
33
33
  wrapSlotContent
34
- } from "./chunk-OYGQEKHF.js";
34
+ } from "./chunk-Y735V2YT.js";
35
35
 
36
36
  // src/docgen/story-docs/build-story-docs.ts
37
37
  import { readFile } from "node:fs/promises";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,7 +14,7 @@ import {
14
14
  applyVueDocgenApiTempFixes,
15
15
  collectComponentMetaSources,
16
16
  createVueComponentMetaChecker
17
- } from "./chunk-NTR7OES7.js";
17
+ } from "./chunk-I4ZYXPEH.js";
18
18
  export {
19
19
  CHECKER_OPTIONS,
20
20
  applyVueDocgenApiTempFixes,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -0,0 +1,17 @@
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // src/docgen/vue-docgen-api.ts
14
+ import { parse } from "vue-docgen-api";
15
+ export {
16
+ parse
17
+ };
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  buildDocgenPayload
14
- } from "../_node-chunks/chunk-XX3DEJSJ.js";
15
- import "../_node-chunks/chunk-OYGQEKHF.js";
14
+ } from "../_node-chunks/chunk-GFNZQYCY.js";
15
+ import "../_node-chunks/chunk-Y735V2YT.js";
16
16
  import {
17
17
  CHECKER_OPTIONS
18
- } from "../_node-chunks/chunk-NTR7OES7.js";
18
+ } from "../_node-chunks/chunk-I4ZYXPEH.js";
19
19
 
20
20
  // src/docgen/docgen-worker.ts
21
21
  import { createLazyDocgenMiddleware, loadTypeScriptCompilerApi } from "storybook/internal/common";
@@ -1,29 +1,29 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  buildStoryDocsPayload
14
- } from "../_node-chunks/chunk-LXLV32GL.js";
14
+ } from "../_node-chunks/chunk-ZMD4HLGO.js";
15
15
  import {
16
16
  buildApiDescription,
17
17
  buildDocgenPayload,
18
18
  createNamedTypeDetailResolver,
19
19
  extractArgTypes
20
- } from "../_node-chunks/chunk-XX3DEJSJ.js";
21
- import "../_node-chunks/chunk-OYGQEKHF.js";
20
+ } from "../_node-chunks/chunk-GFNZQYCY.js";
21
+ import "../_node-chunks/chunk-Y735V2YT.js";
22
22
  import {
23
23
  CHECKER_OPTIONS,
24
24
  applyVueDocgenApiTempFixes,
25
25
  collectComponentMetaSources
26
- } from "../_node-chunks/chunk-NTR7OES7.js";
26
+ } from "../_node-chunks/chunk-I4ZYXPEH.js";
27
27
 
28
28
  // src/docgen/story-docs/source-decorator/sourceDecorator.ts
29
29
  import { SourceType } from "storybook/internal/docs-tools";
package/dist/preset.js CHANGED
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
1
+ import CJS_COMPAT_NODE_URL_41he75g788a from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_41he75g788a from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_41he75g788a from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_41he75g788a.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_41he75g788a.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_41he75g788a.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  buildStoryDocsPayload
14
- } from "./_node-chunks/chunk-LXLV32GL.js";
15
- import "./_node-chunks/chunk-OYGQEKHF.js";
14
+ } from "./_node-chunks/chunk-ZMD4HLGO.js";
15
+ import "./_node-chunks/chunk-Y735V2YT.js";
16
16
 
17
17
  // src/preset.ts
18
18
  import { fileURLToPath as fileURLToPath3 } from "node:url";
@@ -48,8 +48,8 @@ var experimental_storyDocsProvider = createWorkerGatedStoryDocsProvider({
48
48
 
49
49
  // src/docgen/engine.ts
50
50
  var experimental_vueDocgenEngine = async () => ({
51
- componentMeta: () => import("./_node-chunks/component-meta-6EEAMRZO.js"),
52
- vueDocgenApi: () => import("./_node-chunks/vue-docgen-api-S7UZPICT.js")
51
+ componentMeta: () => import("./_node-chunks/component-meta-RANPVN4N.js"),
52
+ vueDocgenApi: () => import("./_node-chunks/vue-docgen-api-AHMNYNGX.js")
53
53
  });
54
54
 
55
55
  // src/preset.ts
@@ -62,7 +62,7 @@ var isDocgenProviderEnabled = (_existing, options) => isTypeScriptReadyForDocgen
62
62
  docsEnabled ? [fileURLToPath3(import.meta.resolve("@storybook/vue3/entry-preview-docs"))] : []
63
63
  );
64
64
  }, experimental_importParsers = async (input = []) => {
65
- let { vueImportParser } = await import("./_node-chunks/parsers-LBXFRFRC.js");
65
+ let { vueImportParser } = await import("./_node-chunks/parsers-KQAJKRBM.js");
66
66
  return [...input, vueImportParser];
67
67
  };
68
68
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/vue3",
3
- "version": "11.0.0-beta.0",
3
+ "version": "11.0.0-beta.1",
4
4
  "description": "Storybook Vue 3 renderer: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -71,7 +71,7 @@
71
71
  "vue-tsc": "latest"
72
72
  },
73
73
  "peerDependencies": {
74
- "storybook": "^11.0.0-beta.0",
74
+ "storybook": "^11.0.0-beta.1",
75
75
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
76
76
  "vue": "^3.0.0"
77
77
  },
@@ -1,9 +1,10 @@
1
+ import preview from '../../.storybook/preview';
1
2
  import { fn } from 'storybook/test';
2
3
 
3
4
  import MyButton from './Button.vue';
4
5
 
5
6
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
6
- export default {
7
+ const meta = preview.meta({
7
8
  title: 'Example/Button',
8
9
  component: MyButton,
9
10
  tags: ['autodocs'],
@@ -13,32 +14,32 @@ export default {
13
14
  },
14
15
  // 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
15
16
  args: { onClick: fn() },
16
- };
17
+ });
17
18
 
18
19
  // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
19
- export const Primary = {
20
+ export const Primary = meta.story({
20
21
  args: {
21
22
  primary: true,
22
23
  label: 'Button',
23
24
  },
24
- };
25
+ });
25
26
 
26
- export const Secondary = {
27
+ export const Secondary = meta.story({
27
28
  args: {
28
29
  label: 'Button',
29
30
  },
30
- };
31
+ });
31
32
 
32
- export const Large = {
33
+ export const Large = meta.story({
33
34
  args: {
34
35
  size: 'large',
35
36
  label: 'Button',
36
37
  },
37
- };
38
+ });
38
39
 
39
- export const Small = {
40
+ export const Small = meta.story({
40
41
  args: {
41
42
  size: 'small',
42
43
  label: 'Button',
43
44
  },
44
- };
45
+ });
@@ -1,8 +1,9 @@
1
+ import preview from '../../.storybook/preview';
1
2
  import { fn } from 'storybook/test';
2
3
 
3
4
  import MyHeader from './Header.vue';
4
5
 
5
- export default {
6
+ const meta = preview.meta({
6
7
  title: 'Example/Header',
7
8
  component: MyHeader,
8
9
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
@@ -31,18 +32,18 @@ export default {
31
32
  onLogout: fn(),
32
33
  onCreateAccount: fn(),
33
34
  },
34
- };
35
+ });
35
36
 
36
- export const LoggedIn = {
37
+ export const LoggedIn = meta.story({
37
38
  args: {
38
39
  user: {
39
40
  name: 'Jane Doe',
40
41
  },
41
42
  },
42
- };
43
+ });
43
44
 
44
- export const LoggedOut = {
45
+ export const LoggedOut = meta.story({
45
46
  args: {
46
47
  user: null,
47
48
  },
48
- };
49
+ });
@@ -1,20 +1,21 @@
1
+ import preview from '../../.storybook/preview';
1
2
  import { expect, userEvent, within } from 'storybook/test';
2
3
 
3
4
  import MyPage from './Page.vue';
4
5
 
5
- export default {
6
+ const meta = preview.meta({
6
7
  title: 'Example/Page',
7
8
  component: MyPage,
8
9
  parameters: {
9
10
  // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
10
11
  layout: 'fullscreen',
11
12
  },
12
- };
13
+ });
13
14
 
14
- export const LoggedOut = {};
15
+ export const LoggedOut = meta.story();
15
16
 
16
17
  // More on component testing: https://storybook.js.org/docs/writing-tests/interaction-testing
17
- export const LoggedIn = {
18
+ export const LoggedIn = meta.story({
18
19
  render: () => ({
19
20
  components: {
20
21
  MyPage,
@@ -31,4 +32,4 @@ export const LoggedIn = {
31
32
  const logoutButton = canvas.getByRole('button', { name: /Log out/i });
32
33
  await expect(logoutButton).toBeInTheDocument();
33
34
  },
34
- };
35
+ });
@@ -1,11 +1,11 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
1
+ import preview from '../../.storybook/preview';
2
2
 
3
3
  import { fn } from 'storybook/test';
4
4
 
5
5
  import Button from './Button.vue';
6
6
 
7
7
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
8
- const meta = {
8
+ const meta = preview.meta({
9
9
  title: 'Example/Button',
10
10
  component: Button,
11
11
  // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/writing-docs/autodocs
@@ -19,35 +19,32 @@ const meta = {
19
19
  // 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
20
20
  onClick: fn(),
21
21
  },
22
- } satisfies Meta<typeof Button>;
22
+ });
23
23
 
24
- export default meta;
25
- type Story = StoryObj<typeof meta>;
26
-
27
- export const Primary: Story = {
24
+ export const Primary = meta.story({
28
25
  args: {
29
26
  primary: true,
30
27
  label: 'Button',
31
28
  },
32
- };
29
+ });
33
30
 
34
- export const Secondary: Story = {
31
+ export const Secondary = meta.story({
35
32
  args: {
36
33
  primary: false,
37
34
  label: 'Button',
38
35
  },
39
- };
36
+ });
40
37
 
41
- export const Large: Story = {
38
+ export const Large = meta.story({
42
39
  args: {
43
40
  label: 'Button',
44
41
  size: 'large',
45
42
  },
46
- };
43
+ });
47
44
 
48
- export const Small: Story = {
45
+ export const Small = meta.story({
49
46
  args: {
50
47
  label: 'Button',
51
48
  size: 'small',
52
49
  },
53
- };
50
+ });
@@ -1,10 +1,10 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
1
+ import preview from '../../.storybook/preview';
2
2
 
3
3
  import { fn } from 'storybook/test';
4
4
 
5
5
  import MyHeader from './Header.vue';
6
6
 
7
- const meta = {
7
+ const meta = preview.meta({
8
8
  /* 👇 The title prop is optional.
9
9
  * See https://storybook.js.org/docs/configure/#configure-story-loading
10
10
  * to learn how to generate automatic titles
@@ -29,21 +29,18 @@ const meta = {
29
29
  },
30
30
  // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/writing-docs/autodocs
31
31
  tags: ['autodocs'],
32
- } satisfies Meta<typeof MyHeader>;
32
+ });
33
33
 
34
- export default meta;
35
- type Story = StoryObj<typeof meta>;
36
-
37
- export const LoggedIn: Story = {
34
+ export const LoggedIn = meta.story({
38
35
  args: {
39
36
  user: {
40
37
  name: 'Jane Doe',
41
38
  },
42
39
  },
43
- };
40
+ });
44
41
 
45
- export const LoggedOut: Story = {
42
+ export const LoggedOut = meta.story({
46
43
  args: {
47
44
  user: null,
48
45
  },
49
- };
46
+ });
@@ -1,10 +1,10 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
1
+ import preview from '../../.storybook/preview';
2
2
 
3
3
  import { expect, userEvent, within } from 'storybook/test';
4
4
 
5
5
  import MyPage from './Page.vue';
6
6
 
7
- const meta = {
7
+ const meta = preview.meta({
8
8
  title: 'Example/Page',
9
9
  component: MyPage,
10
10
  render: () => ({
@@ -17,13 +17,10 @@ const meta = {
17
17
  },
18
18
  // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/writing-docs/autodocs
19
19
  tags: ['autodocs'],
20
- } satisfies Meta<typeof MyPage>;
21
-
22
- export default meta;
23
- type Story = StoryObj<typeof meta>;
20
+ });
24
21
 
25
22
  // More on component testing: https://storybook.js.org/docs/writing-tests/interaction-testing
26
- export const LoggedIn: Story = {
23
+ export const LoggedIn = meta.story({
27
24
  play: async ({ canvasElement }: any) => {
28
25
  const canvas = within(canvasElement);
29
26
  const loginButton = canvas.getByRole('button', { name: /Log in/i });
@@ -34,6 +31,6 @@ export const LoggedIn: Story = {
34
31
  const logoutButton = canvas.getByRole('button', { name: /Log out/i });
35
32
  await expect(logoutButton).toBeInTheDocument();
36
33
  },
37
- };
34
+ });
38
35
 
39
- export const LoggedOut: Story = {};
36
+ export const LoggedOut = meta.story();
@@ -1,17 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_runewszu19k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_runewszu19k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_runewszu19k from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_runewszu19k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_runewszu19k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_runewszu19k.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/docgen/vue-docgen-api.ts
14
- import { parse } from "vue-docgen-api";
15
- export {
16
- parse
17
- };