@storybook/vue3 6.4.0-beta.24 → 6.4.0-beta.25

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.
Files changed (69) hide show
  1. package/dist/cjs/client/index.js +101 -0
  2. package/dist/cjs/client/preview/config.js +27 -0
  3. package/dist/cjs/client/preview/decorateStory.js +73 -0
  4. package/dist/cjs/client/preview/globals.js +9 -0
  5. package/dist/cjs/client/preview/index.js +61 -0
  6. package/dist/cjs/client/preview/render.js +68 -0
  7. package/dist/cjs/client/preview/types-6-0.js +1 -0
  8. package/dist/cjs/client/preview/types-7-0.js +1 -0
  9. package/dist/cjs/client/preview/types.js +1 -0
  10. package/dist/cjs/server/build.js +9 -0
  11. package/dist/cjs/server/framework-preset-vue3.js +56 -0
  12. package/dist/cjs/server/index.js +9 -0
  13. package/dist/cjs/server/options.js +17 -0
  14. package/dist/cjs/typings.d.js +1 -0
  15. package/dist/esm/client/index.js +6 -0
  16. package/dist/esm/client/preview/config.js +5 -0
  17. package/dist/esm/client/preview/decorateStory.js +63 -0
  18. package/dist/esm/client/preview/globals.js +4 -0
  19. package/dist/esm/client/preview/index.js +37 -0
  20. package/dist/esm/client/preview/render.js +49 -0
  21. package/dist/esm/client/preview/types-6-0.js +0 -0
  22. package/dist/esm/client/preview/types-7-0.js +0 -0
  23. package/dist/esm/client/preview/types.js +0 -0
  24. package/dist/esm/server/build.js +3 -0
  25. package/dist/esm/server/framework-preset-vue3.js +42 -0
  26. package/dist/esm/server/index.js +3 -0
  27. package/dist/esm/server/options.js +8 -0
  28. package/dist/esm/typings.d.js +0 -0
  29. package/dist/modern/client/index.js +6 -0
  30. package/dist/modern/client/preview/config.js +5 -0
  31. package/dist/modern/client/preview/decorateStory.js +59 -0
  32. package/dist/modern/client/preview/globals.js +6 -0
  33. package/dist/modern/client/preview/index.js +37 -0
  34. package/dist/modern/client/preview/render.js +47 -0
  35. package/dist/modern/client/preview/types-6-0.js +0 -0
  36. package/dist/modern/client/preview/types-7-0.js +0 -0
  37. package/dist/modern/client/preview/types.js +0 -0
  38. package/dist/modern/server/build.js +3 -0
  39. package/dist/modern/server/framework-preset-vue3.js +42 -0
  40. package/dist/modern/server/index.js +3 -0
  41. package/dist/modern/server/options.js +8 -0
  42. package/dist/modern/typings.d.js +0 -0
  43. package/dist/ts3.4/client/index.d.ts +2 -0
  44. package/dist/ts3.4/client/preview/config.d.ts +5 -0
  45. package/dist/ts3.4/client/preview/decorateStory.d.ts +3 -0
  46. package/dist/ts3.4/client/preview/globals.d.ts +1 -0
  47. package/dist/ts3.4/client/preview/index.d.ts +31 -0
  48. package/dist/ts3.4/client/preview/render.d.ts +5 -0
  49. package/dist/ts3.4/client/preview/types-6-0.d.ts +35 -0
  50. package/dist/ts3.4/client/preview/types-7-0.d.ts +9 -0
  51. package/dist/ts3.4/client/preview/types.d.ts +15 -0
  52. package/dist/ts3.4/server/build.d.ts +1 -0
  53. package/dist/ts3.4/server/framework-preset-vue3.d.ts +4 -0
  54. package/dist/ts3.4/server/index.d.ts +1 -0
  55. package/dist/ts3.4/server/options.d.ts +3 -0
  56. package/dist/ts3.9/client/index.d.ts +2 -0
  57. package/dist/ts3.9/client/preview/config.d.ts +5 -0
  58. package/dist/ts3.9/client/preview/decorateStory.d.ts +3 -0
  59. package/dist/ts3.9/client/preview/globals.d.ts +1 -0
  60. package/dist/ts3.9/client/preview/index.d.ts +31 -0
  61. package/dist/ts3.9/client/preview/render.d.ts +5 -0
  62. package/dist/ts3.9/client/preview/types-6-0.d.ts +35 -0
  63. package/dist/ts3.9/client/preview/types-7-0.d.ts +9 -0
  64. package/dist/ts3.9/client/preview/types.d.ts +15 -0
  65. package/dist/ts3.9/server/build.d.ts +1 -0
  66. package/dist/ts3.9/server/framework-preset-vue3.d.ts +4 -0
  67. package/dist/ts3.9/server/index.d.ts +1 -0
  68. package/dist/ts3.9/server/options.d.ts +3 -0
  69. package/package.json +6 -6
@@ -0,0 +1,3 @@
1
+ import { buildDev } from '@storybook/core/server';
2
+ import options from './options';
3
+ buildDev(options);
@@ -0,0 +1,8 @@
1
+ import { sync } from 'read-pkg-up';
2
+ export default {
3
+ packageJson: sync({
4
+ cwd: __dirname
5
+ }).packageJson,
6
+ framework: 'vue3',
7
+ frameworkPresets: [require.resolve('./framework-preset-vue3')]
8
+ };
File without changes
@@ -0,0 +1,6 @@
1
+ export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, app, activeStoryComponent } from './preview';
2
+ export * from './preview/types-6-0';
3
+
4
+ if (module && module.hot && module.hot.decline) {
5
+ module.hot.decline();
6
+ }
@@ -0,0 +1,5 @@
1
+ export { renderToDOM } from './render';
2
+ export { decorateStory } from './decorateStory';
3
+ export const parameters = {
4
+ framework: 'vue3'
5
+ };
@@ -0,0 +1,59 @@
1
+ import "core-js/modules/es.array.reduce.js";
2
+ import { h } from 'vue';
3
+ import { sanitizeStoryContextUpdate } from '@storybook/store';
4
+
5
+ /*
6
+ This normalizes a functional component into a render method in ComponentOptions.
7
+
8
+ The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
9
+ method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
10
+ */
11
+ function normalizeFunctionalComponent(options) {
12
+ return typeof options === 'function' ? {
13
+ render: options,
14
+ name: options.name
15
+ } : options;
16
+ }
17
+
18
+ function prepare(rawStory, innerStory) {
19
+ const story = rawStory;
20
+
21
+ if (story == null) {
22
+ return null;
23
+ }
24
+
25
+ if (innerStory) {
26
+ return Object.assign({}, normalizeFunctionalComponent(story), {
27
+ components: Object.assign({}, story.components || {}, {
28
+ story: innerStory
29
+ })
30
+ });
31
+ }
32
+
33
+ return {
34
+ render() {
35
+ return h(story);
36
+ }
37
+
38
+ };
39
+ }
40
+
41
+ export function decorateStory(storyFn, decorators) {
42
+ return decorators.reduce((decorated, decorator) => context => {
43
+ let story;
44
+ const decoratedStory = decorator(update => {
45
+ story = decorated(Object.assign({}, context, sanitizeStoryContextUpdate(update)));
46
+ return story;
47
+ }, context);
48
+
49
+ if (!story) {
50
+ story = decorated(context);
51
+ }
52
+
53
+ if (decoratedStory === story) {
54
+ return story;
55
+ }
56
+
57
+ return prepare(decoratedStory, story);
58
+ }, context => prepare(storyFn(context)));
59
+ }
@@ -0,0 +1,6 @@
1
+ import global from 'global';
2
+ const {
3
+ window: globalWindow
4
+ } = global;
5
+ globalWindow.STORYBOOK_REACT_CLASSES = {};
6
+ globalWindow.STORYBOOK_ENV = 'vue3';
@@ -0,0 +1,37 @@
1
+ import { start } from '@storybook/core/client';
2
+ import './globals';
3
+ import { decorateStory } from './decorateStory';
4
+ import { renderToDOM, storybookApp } from './render';
5
+ const framework = 'vue3';
6
+ const api = start(renderToDOM, {
7
+ decorateStory
8
+ });
9
+ export const storiesOf = (kind, m) => {
10
+ return api.clientApi.storiesOf(kind, m).addParameters({
11
+ framework
12
+ });
13
+ };
14
+ export const configure = (...args) => api.configure(framework, ...args);
15
+ export const {
16
+ addDecorator
17
+ } = api.clientApi;
18
+ export const {
19
+ addParameters
20
+ } = api.clientApi;
21
+ export const {
22
+ clearDecorators
23
+ } = api.clientApi;
24
+ export const {
25
+ setAddon
26
+ } = api.clientApi;
27
+ export const {
28
+ forceReRender
29
+ } = api;
30
+ export const {
31
+ getStorybook
32
+ } = api.clientApi;
33
+ export const {
34
+ raw
35
+ } = api.clientApi;
36
+ export const app = storybookApp;
37
+ export { activeStoryComponent } from './render';
@@ -0,0 +1,47 @@
1
+ import dedent from 'ts-dedent';
2
+ import { createApp, h, shallowRef } from 'vue';
3
+ export const activeStoryComponent = shallowRef(null);
4
+ let root = null;
5
+ export const storybookApp = createApp({
6
+ // If an end-user calls `unmount` on the app, we need to clear our root variable
7
+ unmounted() {
8
+ root = null;
9
+ },
10
+
11
+ setup() {
12
+ return () => {
13
+ if (!activeStoryComponent.value) throw new Error('No Vue 3 Story available. Was it set correctly?');
14
+ return h(activeStoryComponent.value);
15
+ };
16
+ }
17
+
18
+ });
19
+ export function renderToDOM({
20
+ title,
21
+ name,
22
+ storyFn,
23
+ showMain,
24
+ showError,
25
+ showException
26
+ }, domElement) {
27
+ storybookApp.config.errorHandler = showException;
28
+ const element = storyFn();
29
+
30
+ if (!element) {
31
+ showError({
32
+ title: `Expecting a Vue component from the story: "${name}" of "${title}".`,
33
+ description: dedent`
34
+ Did you forget to return the Vue component from the story?
35
+ Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
36
+ `
37
+ });
38
+ return;
39
+ }
40
+
41
+ showMain();
42
+ activeStoryComponent.value = element;
43
+
44
+ if (!root) {
45
+ root = storybookApp.mount(domElement);
46
+ }
47
+ }
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ import { buildStatic } from '@storybook/core/server';
2
+ import options from './options';
3
+ buildStatic(options);
@@ -0,0 +1,42 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
7
+ import { VueLoaderPlugin } from 'vue-loader';
8
+ import { DefinePlugin } from 'webpack';
9
+ import { findDistEsm } from '@storybook/core-common';
10
+ export function webpack(config) {
11
+ return _objectSpread(_objectSpread({}, config), {}, {
12
+ plugins: [...config.plugins, new VueLoaderPlugin(), new DefinePlugin({
13
+ __VUE_OPTIONS_API__: JSON.stringify(true),
14
+ __VUE_PROD_DEVTOOLS__: JSON.stringify(true)
15
+ })],
16
+ module: _objectSpread(_objectSpread({}, config.module), {}, {
17
+ rules: [...config.module.rules, {
18
+ test: /\.vue$/,
19
+ loader: require.resolve('vue-loader'),
20
+ options: {}
21
+ }, {
22
+ test: /\.tsx?$/,
23
+ use: [{
24
+ loader: require.resolve('ts-loader'),
25
+ options: {
26
+ transpileOnly: true,
27
+ appendTsSuffixTo: [/\.vue$/]
28
+ }
29
+ }]
30
+ }]
31
+ }),
32
+ resolve: _objectSpread(_objectSpread({}, config.resolve), {}, {
33
+ extensions: [...config.resolve.extensions, '.vue'],
34
+ alias: _objectSpread(_objectSpread({}, config.resolve.alias), {}, {
35
+ vue$: require.resolve('vue/dist/vue.esm-bundler.js')
36
+ })
37
+ })
38
+ });
39
+ }
40
+ export var config = function (entry = []) {
41
+ return [...entry, findDistEsm(__dirname, 'client/preview/config')];
42
+ };
@@ -0,0 +1,3 @@
1
+ import { buildDev } from '@storybook/core/server';
2
+ import options from './options';
3
+ buildDev(options);
@@ -0,0 +1,8 @@
1
+ import { sync } from 'read-pkg-up';
2
+ export default {
3
+ packageJson: sync({
4
+ cwd: __dirname
5
+ }).packageJson,
6
+ framework: 'vue3',
7
+ frameworkPresets: [require.resolve('./framework-preset-vue3')]
8
+ };
File without changes
@@ -0,0 +1,2 @@
1
+ export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, app, activeStoryComponent, } from './preview';
2
+ export * from './preview/types-6-0';
@@ -0,0 +1,5 @@
1
+ export { renderToDOM } from './render';
2
+ export { decorateStory } from './decorateStory';
3
+ export declare const parameters: {
4
+ framework: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
2
+ import { VueFramework } from './types-6-0';
3
+ export declare function decorateStory(storyFn: LegacyStoryFn<VueFramework>, decorators: DecoratorFunction<VueFramework>[]): LegacyStoryFn<VueFramework>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ /// <reference types="webpack-env" />
2
+ /// <reference types="node" />
3
+ import { App } from 'vue';
4
+ import { ClientStoryApi, Loadable } from '@storybook/addons';
5
+ import './globals';
6
+ import { IStorybookSection } from './types';
7
+ import { VueFramework } from './types-6-0';
8
+ interface ClientApi extends ClientStoryApi<VueFramework['storyResult']> {
9
+ setAddon(addon: any): void;
10
+ configure(loader: Loadable, module: NodeModule): void;
11
+ getStorybook(): IStorybookSection[];
12
+ clearDecorators(): void;
13
+ forceReRender(): void;
14
+ raw: () => any;
15
+ load: (...args: any[]) => void;
16
+ app: App;
17
+ }
18
+ export declare const storiesOf: ClientApi['storiesOf'];
19
+ export declare const configure: ClientApi['configure'];
20
+ export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<VueFramework, import("@storybook/addons").Args>) => void);
21
+ export declare const addParameters: (() => never) | (({ globals, globalTypes, ...parameters }: import("@storybook/csf/dist/story").Parameters & {
22
+ globals?: import("@storybook/csf").Globals;
23
+ globalTypes?: import("@storybook/csf").GlobalTypes;
24
+ }) => void);
25
+ export declare const clearDecorators: (() => never) | (() => void);
26
+ export declare const setAddon: (() => never) | ((addon: any) => void);
27
+ export declare const forceReRender: (() => never) | (() => void);
28
+ export declare const getStorybook: (() => never) | (() => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<VueFramework>[]);
29
+ export declare const raw: (() => never) | (() => import("@storybook/store").BoundStory<VueFramework>[]);
30
+ export declare const app: ClientApi['app'];
31
+ export { activeStoryComponent } from './render';
@@ -0,0 +1,5 @@
1
+ import { RenderContext } from '@storybook/store';
2
+ import { VueFramework } from './types-6-0';
3
+ export declare const activeStoryComponent: import("vue").Ref<import("vue").ComponentOptions<any, any, any, Record<string, import("@vue/reactivity").ComputedGetter<any> | import("vue").WritableComputedOptions<any>>, import("vue").MethodOptions, any, any, any>> | import("vue").Ref<import("vue").FunctionalComponent<any, any>>;
4
+ export declare const storybookApp: import("vue").App<Element>;
5
+ export declare function renderToDOM({ title, name, storyFn, showMain, showError, showException }: RenderContext<VueFramework>, domElement: HTMLElement): void;
@@ -0,0 +1,35 @@
1
+ import { ConcreteComponent } from 'vue';
2
+ import { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
3
+ import { StoryFnVueReturnType } from './types';
4
+ export { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
5
+ export declare type VueFramework = {
6
+ component: ConcreteComponent<any>;
7
+ storyResult: StoryFnVueReturnType;
8
+ };
9
+ /**
10
+ * Metadata to configure the stories for a component.
11
+ *
12
+ * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
13
+ */
14
+ export declare type Meta<TArgs = Args> = ComponentAnnotations<VueFramework, TArgs>;
15
+ /**
16
+ * Story function that represents a CSFv2 component example.
17
+ *
18
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
19
+ */
20
+ export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<VueFramework, TArgs>;
21
+ /**
22
+ * Story function that represents a CSFv3 component example.
23
+ *
24
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
25
+ */
26
+ export declare type StoryObj<TArgs = Args> = StoryAnnotations<VueFramework, TArgs>;
27
+ /**
28
+ * Story function that represents a CSFv2 component example.
29
+ *
30
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
31
+ *
32
+ * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
33
+ *
34
+ */
35
+ export declare type Story<TArgs = Args> = StoryFn<TArgs>;
@@ -0,0 +1,9 @@
1
+ import { Args } from '@storybook/csf';
2
+ import { StoryObj } from './types-6-0';
3
+ export { StoryFn, StoryObj, Meta } from './types-6-0';
4
+ /**
5
+ * Story function that represents a CSFv3 component example.
6
+ *
7
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
8
+ */
9
+ export declare type Story<TArgs = Args> = StoryObj<TArgs>;
@@ -0,0 +1,15 @@
1
+ import { ConcreteComponent } from 'vue';
2
+ export { RenderContext } from '@storybook/core';
3
+ export interface ShowErrorArgs {
4
+ title: string;
5
+ description: string;
6
+ }
7
+ export declare type StoryFnVueReturnType = ConcreteComponent<any>;
8
+ export interface IStorybookStory {
9
+ name: string;
10
+ render: (context: any) => any;
11
+ }
12
+ export interface IStorybookSection {
13
+ kind: string;
14
+ stories: IStorybookStory[];
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Configuration } from 'webpack';
2
+ import { StorybookConfig } from '@storybook/core-common';
3
+ export declare function webpack(config: Configuration): Configuration;
4
+ export declare const config: StorybookConfig['config'];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { LoadOptions } from '@storybook/core-common';
2
+ declare const _default: LoadOptions;
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, app, activeStoryComponent, } from './preview';
2
+ export * from './preview/types-6-0';
@@ -0,0 +1,5 @@
1
+ export { renderToDOM } from './render';
2
+ export { decorateStory } from './decorateStory';
3
+ export declare const parameters: {
4
+ framework: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
2
+ import { VueFramework } from './types-6-0';
3
+ export declare function decorateStory(storyFn: LegacyStoryFn<VueFramework>, decorators: DecoratorFunction<VueFramework>[]): LegacyStoryFn<VueFramework>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ /// <reference types="webpack-env" />
2
+ /// <reference types="node" />
3
+ import type { App } from 'vue';
4
+ import { ClientStoryApi, Loadable } from '@storybook/addons';
5
+ import './globals';
6
+ import { IStorybookSection } from './types';
7
+ import { VueFramework } from './types-6-0';
8
+ interface ClientApi extends ClientStoryApi<VueFramework['storyResult']> {
9
+ setAddon(addon: any): void;
10
+ configure(loader: Loadable, module: NodeModule): void;
11
+ getStorybook(): IStorybookSection[];
12
+ clearDecorators(): void;
13
+ forceReRender(): void;
14
+ raw: () => any;
15
+ load: (...args: any[]) => void;
16
+ app: App;
17
+ }
18
+ export declare const storiesOf: ClientApi['storiesOf'];
19
+ export declare const configure: ClientApi['configure'];
20
+ export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<VueFramework, import("@storybook/addons").Args>) => void);
21
+ export declare const addParameters: (() => never) | (({ globals, globalTypes, ...parameters }: import("@storybook/csf/dist/story").Parameters & {
22
+ globals?: import("@storybook/csf").Globals;
23
+ globalTypes?: import("@storybook/csf").GlobalTypes;
24
+ }) => void);
25
+ export declare const clearDecorators: (() => never) | (() => void);
26
+ export declare const setAddon: (() => never) | ((addon: any) => void);
27
+ export declare const forceReRender: (() => never) | (() => void);
28
+ export declare const getStorybook: (() => never) | (() => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<VueFramework>[]);
29
+ export declare const raw: (() => never) | (() => import("@storybook/store").BoundStory<VueFramework>[]);
30
+ export declare const app: ClientApi['app'];
31
+ export { activeStoryComponent } from './render';
@@ -0,0 +1,5 @@
1
+ import { RenderContext } from '@storybook/store';
2
+ import { VueFramework } from './types-6-0';
3
+ export declare const activeStoryComponent: import("vue").Ref<import("vue").ComponentOptions<any, any, any, Record<string, import("@vue/reactivity").ComputedGetter<any> | import("vue").WritableComputedOptions<any>>, import("vue").MethodOptions, any, any, any>> | import("vue").Ref<import("vue").FunctionalComponent<any, any>>;
4
+ export declare const storybookApp: import("vue").App<Element>;
5
+ export declare function renderToDOM({ title, name, storyFn, showMain, showError, showException }: RenderContext<VueFramework>, domElement: HTMLElement): void;
@@ -0,0 +1,35 @@
1
+ import { ConcreteComponent } from 'vue';
2
+ import { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
3
+ import { StoryFnVueReturnType } from './types';
4
+ export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
5
+ export declare type VueFramework = {
6
+ component: ConcreteComponent<any>;
7
+ storyResult: StoryFnVueReturnType;
8
+ };
9
+ /**
10
+ * Metadata to configure the stories for a component.
11
+ *
12
+ * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
13
+ */
14
+ export declare type Meta<TArgs = Args> = ComponentAnnotations<VueFramework, TArgs>;
15
+ /**
16
+ * Story function that represents a CSFv2 component example.
17
+ *
18
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
19
+ */
20
+ export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<VueFramework, TArgs>;
21
+ /**
22
+ * Story function that represents a CSFv3 component example.
23
+ *
24
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
25
+ */
26
+ export declare type StoryObj<TArgs = Args> = StoryAnnotations<VueFramework, TArgs>;
27
+ /**
28
+ * Story function that represents a CSFv2 component example.
29
+ *
30
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
31
+ *
32
+ * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
33
+ *
34
+ */
35
+ export declare type Story<TArgs = Args> = StoryFn<TArgs>;
@@ -0,0 +1,9 @@
1
+ import { Args } from '@storybook/csf';
2
+ import type { StoryObj } from './types-6-0';
3
+ export type { StoryFn, StoryObj, Meta } from './types-6-0';
4
+ /**
5
+ * Story function that represents a CSFv3 component example.
6
+ *
7
+ * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
8
+ */
9
+ export declare type Story<TArgs = Args> = StoryObj<TArgs>;
@@ -0,0 +1,15 @@
1
+ import { ConcreteComponent } from 'vue';
2
+ export type { RenderContext } from '@storybook/core';
3
+ export interface ShowErrorArgs {
4
+ title: string;
5
+ description: string;
6
+ }
7
+ export declare type StoryFnVueReturnType = ConcreteComponent<any>;
8
+ export interface IStorybookStory {
9
+ name: string;
10
+ render: (context: any) => any;
11
+ }
12
+ export interface IStorybookSection {
13
+ kind: string;
14
+ stories: IStorybookStory[];
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Configuration } from 'webpack';
2
+ import { StorybookConfig } from '@storybook/core-common';
3
+ export declare function webpack(config: Configuration): Configuration;
4
+ export declare const config: StorybookConfig['config'];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { LoadOptions } from '@storybook/core-common';
2
+ declare const _default: LoadOptions;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/vue3",
3
- "version": "6.4.0-beta.24",
3
+ "version": "6.4.0-beta.25",
4
4
  "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -45,11 +45,11 @@
45
45
  "prepare": "node ../../scripts/prepare.js"
46
46
  },
47
47
  "dependencies": {
48
- "@storybook/addons": "6.4.0-beta.24",
49
- "@storybook/core": "6.4.0-beta.24",
50
- "@storybook/core-common": "6.4.0-beta.24",
48
+ "@storybook/addons": "6.4.0-beta.25",
49
+ "@storybook/core": "6.4.0-beta.25",
50
+ "@storybook/core-common": "6.4.0-beta.25",
51
51
  "@storybook/csf": "0.0.2--canary.87bc651.0",
52
- "@storybook/store": "6.4.0-beta.24",
52
+ "@storybook/store": "6.4.0-beta.25",
53
53
  "@types/webpack-env": "^1.16.0",
54
54
  "core-js": "^3.8.2",
55
55
  "global": "^4.4.0",
@@ -81,6 +81,6 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "f53ba4d7210b5c4809d57c74d7a42314172aa63e",
84
+ "gitHead": "5bf101067e5b9387ce092301bea6ab4ee432f777",
85
85
  "sbmodern": "dist/modern/client/index.js"
86
86
  }