@storybook/vue3-vite 10.5.2 → 10.6.0-alpha.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.
- package/dist/_node-chunks/{chunk-LQBTCYE6.js → chunk-4ERIAVLW.js} +6 -6
- package/dist/chunk-DLteNAYO.d.ts +70 -0
- package/dist/index.d.ts +4 -71
- package/dist/node/index.d.ts +4 -53
- package/dist/node/index.js +6 -6
- package/dist/preset.js +7 -7
- package/dist/vite-plugin.js +7 -7
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_eiflofnsbmc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_eiflofnsbmc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_eiflofnsbmc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_eiflofnsbmc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_eiflofnsbmc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_eiflofnsbmc.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CompatibleString, StorybookConfig } from "storybook/internal/types";
|
|
2
|
+
import { BuilderOptions, StorybookConfigVite } from "@storybook/builder-vite";
|
|
3
|
+
import { ComponentMeta } from "vue-component-meta";
|
|
4
|
+
import { ComponentDoc } from "vue-docgen-api";
|
|
5
|
+
|
|
6
|
+
//#region code/frameworks/vue3-vite/.dts-emit/code/frameworks/vue3-vite/src/types.d.ts
|
|
7
|
+
type FrameworkName = CompatibleString<'@storybook/vue3-vite'>;
|
|
8
|
+
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
9
|
+
/** Available docgen plugins for vue. */
|
|
10
|
+
type VueDocgenPlugin = 'vue-docgen-api' | 'vue-component-meta';
|
|
11
|
+
type FrameworkOptions = {
|
|
12
|
+
builder?: BuilderOptions;
|
|
13
|
+
/**
|
|
14
|
+
* Plugin to use for generation docs for component props, events, slots and exposes. Since
|
|
15
|
+
* Storybook 8, the official vue plugin "vue-component-meta" (Volar) can be used which supports
|
|
16
|
+
* more complex types, better type docs, support for js(x)/ts(x) components and more.
|
|
17
|
+
*
|
|
18
|
+
* "vue-component-meta" will become the new default in the future and "vue-docgen-api" will be
|
|
19
|
+
* removed.
|
|
20
|
+
*
|
|
21
|
+
* Set to `false` to disable docgen processing entirely for improved build performance.
|
|
22
|
+
*
|
|
23
|
+
* @default 'vue-docgen-api'
|
|
24
|
+
*/
|
|
25
|
+
docgen?: boolean | VueDocgenPlugin | {
|
|
26
|
+
plugin: 'vue-component-meta';
|
|
27
|
+
/**
|
|
28
|
+
* Tsconfig path to use. Should be set if your main `tsconfig.json` includes references to
|
|
29
|
+
* other tsconfig files like `tsconfig.app.json`. Otherwise docgen might not be generated
|
|
30
|
+
* correctly (e.g. import aliases are not resolved). The path is resolved relative to
|
|
31
|
+
* project root.
|
|
32
|
+
*
|
|
33
|
+
* For further information, see our
|
|
34
|
+
* [docs](https://storybook.js.org/docs/get-started/vue3-vite#override-the-default-configuration).
|
|
35
|
+
*
|
|
36
|
+
* @default 'tsconfig.json'
|
|
37
|
+
*/
|
|
38
|
+
tsconfig: `${string}/tsconfig${string}.json` | `tsconfig${string}.json`;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type StorybookConfigFramework = {
|
|
42
|
+
framework: FrameworkName | {
|
|
43
|
+
name: FrameworkName;
|
|
44
|
+
options: FrameworkOptions;
|
|
45
|
+
};
|
|
46
|
+
core?: StorybookConfig['core'] & {
|
|
47
|
+
builder?: BuilderName | {
|
|
48
|
+
name: BuilderName;
|
|
49
|
+
options: BuilderOptions;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/** The interface for Storybook configuration in `main.ts` files. */
|
|
54
|
+
type StorybookConfig$1 = Omit<StorybookConfig, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
|
|
55
|
+
/** Gets the type of a single array element. */
|
|
56
|
+
type ArrayElement<T> = T extends readonly (infer A)[] ? A : never;
|
|
57
|
+
/** Type of "__docgenInfo" depending on the used docgenPlugin. */
|
|
58
|
+
type VueDocgenInfo<T extends VueDocgenPlugin> = T extends 'vue-component-meta' ? ComponentMeta : ComponentDoc;
|
|
59
|
+
/**
|
|
60
|
+
* Single prop/event/slot/exposed entry of "__docgenInfo" depending on the used docgenPlugin.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
*
|
|
64
|
+
* ```ts
|
|
65
|
+
* type PropInfo = VueDocgenInfoEntry<'vue-component-meta', 'props'>;
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
type VueDocgenInfoEntry<T extends VueDocgenPlugin, TKey extends 'props' | 'events' | 'slots' | 'exposed' | 'expose' = 'props' | 'events' | 'slots' | 'exposed' | 'expose'> = ArrayElement<T extends 'vue-component-meta' ? VueDocgenInfo<'vue-component-meta'>[Exclude<TKey, 'expose'>] : VueDocgenInfo<'vue-docgen-api'>[Exclude<TKey, 'exposed'>]>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { VueDocgenPlugin as a, VueDocgenInfoEntry as i, StorybookConfig$1 as n, VueDocgenInfo as r, FrameworkOptions as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,71 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { ComponentMeta } from 'vue-component-meta';
|
|
6
|
-
import { ComponentDoc } from 'vue-docgen-api';
|
|
7
|
-
|
|
8
|
-
type FrameworkName = CompatibleString<'@storybook/vue3-vite'>;
|
|
9
|
-
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
10
|
-
/** Available docgen plugins for vue. */
|
|
11
|
-
type VueDocgenPlugin = 'vue-docgen-api' | 'vue-component-meta';
|
|
12
|
-
type FrameworkOptions = {
|
|
13
|
-
builder?: BuilderOptions;
|
|
14
|
-
/**
|
|
15
|
-
* Plugin to use for generation docs for component props, events, slots and exposes. Since
|
|
16
|
-
* Storybook 8, the official vue plugin "vue-component-meta" (Volar) can be used which supports
|
|
17
|
-
* more complex types, better type docs, support for js(x)/ts(x) components and more.
|
|
18
|
-
*
|
|
19
|
-
* "vue-component-meta" will become the new default in the future and "vue-docgen-api" will be
|
|
20
|
-
* removed.
|
|
21
|
-
*
|
|
22
|
-
* Set to `false` to disable docgen processing entirely for improved build performance.
|
|
23
|
-
*
|
|
24
|
-
* @default 'vue-docgen-api'
|
|
25
|
-
*/
|
|
26
|
-
docgen?: boolean | VueDocgenPlugin | {
|
|
27
|
-
plugin: 'vue-component-meta';
|
|
28
|
-
/**
|
|
29
|
-
* Tsconfig path to use. Should be set if your main `tsconfig.json` includes references to
|
|
30
|
-
* other tsconfig files like `tsconfig.app.json`. Otherwise docgen might not be generated
|
|
31
|
-
* correctly (e.g. import aliases are not resolved). The path is resolved relative to
|
|
32
|
-
* project root.
|
|
33
|
-
*
|
|
34
|
-
* For further information, see our
|
|
35
|
-
* [docs](https://storybook.js.org/docs/get-started/vue3-vite#override-the-default-configuration).
|
|
36
|
-
*
|
|
37
|
-
* @default 'tsconfig.json'
|
|
38
|
-
*/
|
|
39
|
-
tsconfig: `${string}/tsconfig${string}.json` | `tsconfig${string}.json`;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
type StorybookConfigFramework = {
|
|
43
|
-
framework: FrameworkName | {
|
|
44
|
-
name: FrameworkName;
|
|
45
|
-
options: FrameworkOptions;
|
|
46
|
-
};
|
|
47
|
-
core?: StorybookConfig$1['core'] & {
|
|
48
|
-
builder?: BuilderName | {
|
|
49
|
-
name: BuilderName;
|
|
50
|
-
options: BuilderOptions;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
/** The interface for Storybook configuration in `main.ts` files. */
|
|
55
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
|
|
56
|
-
/** Gets the type of a single array element. */
|
|
57
|
-
type ArrayElement<T> = T extends readonly (infer A)[] ? A : never;
|
|
58
|
-
/** Type of "__docgenInfo" depending on the used docgenPlugin. */
|
|
59
|
-
type VueDocgenInfo<T extends VueDocgenPlugin> = T extends 'vue-component-meta' ? ComponentMeta : ComponentDoc;
|
|
60
|
-
/**
|
|
61
|
-
* Single prop/event/slot/exposed entry of "__docgenInfo" depending on the used docgenPlugin.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
*
|
|
65
|
-
* ```ts
|
|
66
|
-
* type PropInfo = VueDocgenInfoEntry<'vue-component-meta', 'props'>;
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
type VueDocgenInfoEntry<T extends VueDocgenPlugin, TKey extends 'props' | 'events' | 'slots' | 'exposed' | 'expose' = 'props' | 'events' | 'slots' | 'exposed' | 'expose'> = ArrayElement<T extends 'vue-component-meta' ? VueDocgenInfo<'vue-component-meta'>[Exclude<TKey, 'expose'>] : VueDocgenInfo<'vue-docgen-api'>[Exclude<TKey, 'exposed'>]>;
|
|
70
|
-
|
|
71
|
-
export type { FrameworkOptions, StorybookConfig, VueDocgenInfo, VueDocgenInfoEntry, VueDocgenPlugin };
|
|
1
|
+
import { a as VueDocgenPlugin, i as VueDocgenInfoEntry, n as StorybookConfig, r as VueDocgenInfo, t as FrameworkOptions } from "./chunk-DLteNAYO.js";
|
|
2
|
+
import { __definePreview as definePreview } from "@storybook/vue3";
|
|
3
|
+
export * from "@storybook/vue3";
|
|
4
|
+
export { FrameworkOptions, StorybookConfig, VueDocgenInfo, VueDocgenInfoEntry, VueDocgenPlugin, definePreview };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,55 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
|
|
3
|
-
|
|
4
|
-
type FrameworkName = CompatibleString<'@storybook/vue3-vite'>;
|
|
5
|
-
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
6
|
-
/** Available docgen plugins for vue. */
|
|
7
|
-
type VueDocgenPlugin = 'vue-docgen-api' | 'vue-component-meta';
|
|
8
|
-
type FrameworkOptions = {
|
|
9
|
-
builder?: BuilderOptions;
|
|
10
|
-
/**
|
|
11
|
-
* Plugin to use for generation docs for component props, events, slots and exposes. Since
|
|
12
|
-
* Storybook 8, the official vue plugin "vue-component-meta" (Volar) can be used which supports
|
|
13
|
-
* more complex types, better type docs, support for js(x)/ts(x) components and more.
|
|
14
|
-
*
|
|
15
|
-
* "vue-component-meta" will become the new default in the future and "vue-docgen-api" will be
|
|
16
|
-
* removed.
|
|
17
|
-
*
|
|
18
|
-
* Set to `false` to disable docgen processing entirely for improved build performance.
|
|
19
|
-
*
|
|
20
|
-
* @default 'vue-docgen-api'
|
|
21
|
-
*/
|
|
22
|
-
docgen?: boolean | VueDocgenPlugin | {
|
|
23
|
-
plugin: 'vue-component-meta';
|
|
24
|
-
/**
|
|
25
|
-
* Tsconfig path to use. Should be set if your main `tsconfig.json` includes references to
|
|
26
|
-
* other tsconfig files like `tsconfig.app.json`. Otherwise docgen might not be generated
|
|
27
|
-
* correctly (e.g. import aliases are not resolved). The path is resolved relative to
|
|
28
|
-
* project root.
|
|
29
|
-
*
|
|
30
|
-
* For further information, see our
|
|
31
|
-
* [docs](https://storybook.js.org/docs/get-started/vue3-vite#override-the-default-configuration).
|
|
32
|
-
*
|
|
33
|
-
* @default 'tsconfig.json'
|
|
34
|
-
*/
|
|
35
|
-
tsconfig: `${string}/tsconfig${string}.json` | `tsconfig${string}.json`;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
type StorybookConfigFramework = {
|
|
39
|
-
framework: FrameworkName | {
|
|
40
|
-
name: FrameworkName;
|
|
41
|
-
options: FrameworkOptions;
|
|
42
|
-
};
|
|
43
|
-
core?: StorybookConfig$1['core'] & {
|
|
44
|
-
builder?: BuilderName | {
|
|
45
|
-
name: BuilderName;
|
|
46
|
-
options: BuilderOptions;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
/** The interface for Storybook configuration in `main.ts` files. */
|
|
51
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
|
|
1
|
+
import { n as StorybookConfig } from "../chunk-DLteNAYO.js";
|
|
52
2
|
|
|
3
|
+
//#region code/frameworks/vue3-vite/.dts-emit/code/frameworks/vue3-vite/src/node/index.d.ts
|
|
53
4
|
declare function defineMain(config: StorybookConfig): StorybookConfig;
|
|
54
|
-
|
|
55
|
-
export { type StorybookConfig, defineMain };
|
|
5
|
+
//#endregion
|
|
6
|
+
export { type StorybookConfig, defineMain };
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_eiflofnsbmc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_eiflofnsbmc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_eiflofnsbmc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_eiflofnsbmc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_eiflofnsbmc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_eiflofnsbmc.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_eiflofnsbmc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_eiflofnsbmc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_eiflofnsbmc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_eiflofnsbmc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_eiflofnsbmc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_eiflofnsbmc.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
|
templateCompilation
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-4ERIAVLW.js";
|
|
15
15
|
|
|
16
16
|
// src/plugins/vue-component-meta.ts
|
|
17
17
|
import { readFile, stat } from "node:fs/promises";
|
package/dist/vite-plugin.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_eiflofnsbmc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_eiflofnsbmc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_eiflofnsbmc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_eiflofnsbmc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_eiflofnsbmc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_eiflofnsbmc.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
|
templateCompilation
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-4ERIAVLW.js";
|
|
15
15
|
|
|
16
16
|
// src/vite-plugin.ts
|
|
17
17
|
var storybookVuePlugin = () => [templateCompilation()];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3-vite",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0-alpha.1",
|
|
4
4
|
"description": "Storybook for Vue3 and Vite: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"!src/**/*"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@storybook/builder-vite": "10.
|
|
53
|
-
"@storybook/vue3": "10.
|
|
52
|
+
"@storybook/builder-vite": "10.6.0-alpha.1",
|
|
53
|
+
"@storybook/vue3": "10.6.0-alpha.1",
|
|
54
54
|
"magic-string": "^0.30.0",
|
|
55
55
|
"typescript": "^5.9.3",
|
|
56
56
|
"vue-component-meta": "^3.2.7",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^22.19.1",
|
|
61
|
-
"typescript": "^
|
|
61
|
+
"typescript": "^6.0.3",
|
|
62
62
|
"vite": "^7.0.4"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"storybook": "^10.
|
|
65
|
+
"storybook": "^10.6.0-alpha.1",
|
|
66
66
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|