@storybook/vue3 7.0.0-alpha.5 → 7.0.0-alpha.51
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/chunk-YPCW34O2.mjs +4 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.js +4 -0
- package/dist/config.mjs +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +1 -0
- package/dist/render-913dae32.d.ts +14 -0
- package/jest.config.js +11 -0
- package/package.json +49 -15
- package/preview.js +1 -1
- package/template/cli/Button.stories.js +48 -0
- package/template/cli/Button.vue +52 -0
- package/template/cli/Header.stories.js +41 -0
- package/template/cli/Header.vue +41 -0
- package/template/cli/Page.stories.js +30 -0
- package/template/cli/Page.vue +88 -0
- package/template/components/Button.vue +52 -0
- package/template/components/Form.vue +44 -0
- package/template/components/Html.vue +20 -0
- package/template/components/Pre.vue +34 -0
- package/template/components/button.css +30 -0
- package/template/components/index.js +9 -0
- package/template/stories/GlobalUsage.stories.js +29 -0
- package/template/stories/GlobalUsage.vue +3 -0
- package/template/stories/OverrideArgs.stories.js +43 -0
- package/template/stories/OverrideArgs.vue +40 -0
- package/template/stories/decorators.stories.js +66 -0
- package/template/stories/preview.js +13 -0
- package/template/stories/vue3-mdx.stories.mdx +46 -0
- package/LICENSE +0 -21
- package/dist/cjs/config.js +0 -36
- package/dist/cjs/docs/config.js +0 -21
- package/dist/cjs/docs/extractArgTypes.js +0 -53
- package/dist/cjs/index.js +0 -91
- package/dist/cjs/preview/config.js +0 -33
- package/dist/cjs/preview/decorateStory.js +0 -66
- package/dist/cjs/preview/globals.js +0 -11
- package/dist/cjs/preview/index.js +0 -67
- package/dist/cjs/preview/render.js +0 -84
- package/dist/cjs/preview/types-6-0.js +0 -5
- package/dist/cjs/preview/types-7-0.js +0 -5
- package/dist/cjs/preview/types.js +0 -5
- package/dist/esm/config.js +0 -6
- package/dist/esm/docs/config.js +0 -10
- package/dist/esm/docs/extractArgTypes.js +0 -42
- package/dist/esm/index.js +0 -4
- package/dist/esm/preview/config.js +0 -5
- package/dist/esm/preview/decorateStory.js +0 -58
- package/dist/esm/preview/globals.js +0 -6
- package/dist/esm/preview/index.js +0 -37
- package/dist/esm/preview/render.js +0 -66
- package/dist/esm/preview/types-6-0.js +0 -1
- package/dist/esm/preview/types-7-0.js +0 -1
- package/dist/esm/preview/types.js +0 -1
- package/dist/types/config.d.ts +0 -10
- package/dist/types/docs/config.d.ts +0 -9
- package/dist/types/docs/extractArgTypes.d.ts +0 -2
- package/dist/types/index.d.ts +0 -2
- package/dist/types/preview/config.d.ts +0 -5
- package/dist/types/preview/decorateStory.d.ts +0 -3
- package/dist/types/preview/globals.d.ts +0 -1
- package/dist/types/preview/index.d.ts +0 -30
- package/dist/types/preview/render.d.ts +0 -6
- package/dist/types/preview/types-6-0.d.ts +0 -35
- package/dist/types/preview/types-7-0.d.ts +0 -9
- package/dist/types/preview/types.d.ts +0 -15
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setAddon = exports.raw = exports.getStorybook = exports.forceReRender = exports.configure = exports.clearDecorators = exports.addParameters = exports.addDecorator = void 0;
|
|
7
|
-
Object.defineProperty(exports, "setup", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _render.setup;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
exports.storiesOf = void 0;
|
|
14
|
-
|
|
15
|
-
var _coreClient = require("@storybook/core-client");
|
|
16
|
-
|
|
17
|
-
require("./globals");
|
|
18
|
-
|
|
19
|
-
var _decorateStory = require("./decorateStory");
|
|
20
|
-
|
|
21
|
-
var _render = require("./render");
|
|
22
|
-
|
|
23
|
-
const framework = 'vue3';
|
|
24
|
-
const api = (0, _coreClient.start)(_render.renderToDOM, {
|
|
25
|
-
decorateStory: _decorateStory.decorateStory,
|
|
26
|
-
render: _render.render
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const storiesOf = (kind, m) => {
|
|
30
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
31
|
-
framework
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
exports.storiesOf = storiesOf;
|
|
36
|
-
|
|
37
|
-
const configure = (...args) => api.configure(framework, ...args);
|
|
38
|
-
|
|
39
|
-
exports.configure = configure;
|
|
40
|
-
const {
|
|
41
|
-
addDecorator
|
|
42
|
-
} = api.clientApi;
|
|
43
|
-
exports.addDecorator = addDecorator;
|
|
44
|
-
const {
|
|
45
|
-
addParameters
|
|
46
|
-
} = api.clientApi;
|
|
47
|
-
exports.addParameters = addParameters;
|
|
48
|
-
const {
|
|
49
|
-
clearDecorators
|
|
50
|
-
} = api.clientApi;
|
|
51
|
-
exports.clearDecorators = clearDecorators;
|
|
52
|
-
const {
|
|
53
|
-
setAddon
|
|
54
|
-
} = api.clientApi;
|
|
55
|
-
exports.setAddon = setAddon;
|
|
56
|
-
const {
|
|
57
|
-
forceReRender
|
|
58
|
-
} = api;
|
|
59
|
-
exports.forceReRender = forceReRender;
|
|
60
|
-
const {
|
|
61
|
-
getStorybook
|
|
62
|
-
} = api.clientApi;
|
|
63
|
-
exports.getStorybook = getStorybook;
|
|
64
|
-
const {
|
|
65
|
-
raw
|
|
66
|
-
} = api.clientApi;
|
|
67
|
-
exports.raw = raw;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.render = void 0;
|
|
7
|
-
exports.renderToDOM = renderToDOM;
|
|
8
|
-
exports.setup = void 0;
|
|
9
|
-
|
|
10
|
-
var _tsDedent = _interopRequireDefault(require("ts-dedent"));
|
|
11
|
-
|
|
12
|
-
var _vue = require("vue");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
const render = (props, context) => {
|
|
17
|
-
const {
|
|
18
|
-
id,
|
|
19
|
-
component: Component
|
|
20
|
-
} = context;
|
|
21
|
-
|
|
22
|
-
if (!Component) {
|
|
23
|
-
throw new Error(`Unable to render story ${id} as the component annotation is missing from the default export`);
|
|
24
|
-
} // TODO remove this hack
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return (0, _vue.h)(Component, props);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.render = render;
|
|
31
|
-
|
|
32
|
-
let setupFunction = app => {};
|
|
33
|
-
|
|
34
|
-
const setup = fn => {
|
|
35
|
-
setupFunction = fn;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports.setup = setup;
|
|
39
|
-
const map = new Map();
|
|
40
|
-
|
|
41
|
-
function renderToDOM({
|
|
42
|
-
title,
|
|
43
|
-
name,
|
|
44
|
-
storyFn,
|
|
45
|
-
showMain,
|
|
46
|
-
showError,
|
|
47
|
-
showException
|
|
48
|
-
}, domElement) {
|
|
49
|
-
// TODO: explain cyclical nature of these app => story => mount
|
|
50
|
-
let element;
|
|
51
|
-
const storybookApp = (0, _vue.createApp)({
|
|
52
|
-
unmounted() {
|
|
53
|
-
map.delete(domElement);
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
render() {
|
|
57
|
-
map.set(domElement, storybookApp);
|
|
58
|
-
setupFunction(storybookApp);
|
|
59
|
-
return (0, _vue.h)(element);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
storybookApp.config.errorHandler = showException;
|
|
64
|
-
element = storyFn();
|
|
65
|
-
|
|
66
|
-
if (!element) {
|
|
67
|
-
showError({
|
|
68
|
-
title: `Expecting a Vue component from the story: "${name}" of "${title}".`,
|
|
69
|
-
description: (0, _tsDedent.default)`
|
|
70
|
-
Did you forget to return the Vue component from the story?
|
|
71
|
-
Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
|
|
72
|
-
`
|
|
73
|
-
});
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
showMain();
|
|
78
|
-
|
|
79
|
-
if (map.has(domElement)) {
|
|
80
|
-
map.get(domElement).unmount(domElement);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
storybookApp.mount(domElement);
|
|
84
|
-
}
|
package/dist/esm/config.js
DELETED
package/dist/esm/docs/config.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { extractComponentDescription, enhanceArgTypes } from '@storybook/docs-tools';
|
|
2
|
-
import { extractArgTypes } from './extractArgTypes';
|
|
3
|
-
export const parameters = {
|
|
4
|
-
docs: {
|
|
5
|
-
inlineStories: true,
|
|
6
|
-
extractArgTypes,
|
|
7
|
-
extractComponentDescription
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
export const argTypesEnhancers = [enhanceArgTypes];
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { hasDocgen, extractComponentProps, convert } from '@storybook/docs-tools';
|
|
2
|
-
const SECTIONS = ['props', 'events', 'slots'];
|
|
3
|
-
export const extractArgTypes = component => {
|
|
4
|
-
if (!hasDocgen(component)) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const results = {};
|
|
9
|
-
SECTIONS.forEach(section => {
|
|
10
|
-
const props = extractComponentProps(component, section);
|
|
11
|
-
props.forEach(({
|
|
12
|
-
propDef,
|
|
13
|
-
docgenInfo,
|
|
14
|
-
jsDocTags
|
|
15
|
-
}) => {
|
|
16
|
-
const {
|
|
17
|
-
name,
|
|
18
|
-
type,
|
|
19
|
-
description,
|
|
20
|
-
defaultValue: defaultSummary,
|
|
21
|
-
required
|
|
22
|
-
} = propDef;
|
|
23
|
-
const sbType = section === 'props' ? convert(docgenInfo) : {
|
|
24
|
-
name: 'void'
|
|
25
|
-
};
|
|
26
|
-
results[name] = {
|
|
27
|
-
name,
|
|
28
|
-
description,
|
|
29
|
-
type: Object.assign({
|
|
30
|
-
required
|
|
31
|
-
}, sbType),
|
|
32
|
-
table: {
|
|
33
|
-
type,
|
|
34
|
-
jsDocTags,
|
|
35
|
-
defaultValue: defaultSummary,
|
|
36
|
-
category: section
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
return results;
|
|
42
|
-
};
|
package/dist/esm/index.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { h } from 'vue';
|
|
2
|
-
import { sanitizeStoryContextUpdate } from '@storybook/store';
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
This normalizes a functional component into a render method in ComponentOptions.
|
|
6
|
-
|
|
7
|
-
The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
|
|
8
|
-
method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
|
|
9
|
-
*/
|
|
10
|
-
function normalizeFunctionalComponent(options) {
|
|
11
|
-
return typeof options === 'function' ? {
|
|
12
|
-
render: options,
|
|
13
|
-
name: options.name
|
|
14
|
-
} : options;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function prepare(rawStory, innerStory) {
|
|
18
|
-
const story = rawStory;
|
|
19
|
-
|
|
20
|
-
if (story == null) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (innerStory) {
|
|
25
|
-
return Object.assign({}, normalizeFunctionalComponent(story), {
|
|
26
|
-
components: Object.assign({}, story.components || {}, {
|
|
27
|
-
story: innerStory
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
render() {
|
|
34
|
-
return h(story);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function decorateStory(storyFn, decorators) {
|
|
41
|
-
return decorators.reduce((decorated, decorator) => context => {
|
|
42
|
-
let story;
|
|
43
|
-
const decoratedStory = decorator(update => {
|
|
44
|
-
story = decorated(Object.assign({}, context, sanitizeStoryContextUpdate(update)));
|
|
45
|
-
return story;
|
|
46
|
-
}, context);
|
|
47
|
-
|
|
48
|
-
if (!story) {
|
|
49
|
-
story = decorated(context);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (decoratedStory === story) {
|
|
53
|
-
return story;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return prepare(decoratedStory, story);
|
|
57
|
-
}, context => prepare(storyFn(context)));
|
|
58
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { start } from '@storybook/core-client';
|
|
2
|
-
import './globals';
|
|
3
|
-
import { decorateStory } from './decorateStory';
|
|
4
|
-
import { render, renderToDOM } from './render';
|
|
5
|
-
const framework = 'vue3';
|
|
6
|
-
const api = start(renderToDOM, {
|
|
7
|
-
decorateStory,
|
|
8
|
-
render
|
|
9
|
-
});
|
|
10
|
-
export const storiesOf = (kind, m) => {
|
|
11
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
12
|
-
framework
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
export const configure = (...args) => api.configure(framework, ...args);
|
|
16
|
-
export const {
|
|
17
|
-
addDecorator
|
|
18
|
-
} = api.clientApi;
|
|
19
|
-
export const {
|
|
20
|
-
addParameters
|
|
21
|
-
} = api.clientApi;
|
|
22
|
-
export const {
|
|
23
|
-
clearDecorators
|
|
24
|
-
} = api.clientApi;
|
|
25
|
-
export const {
|
|
26
|
-
setAddon
|
|
27
|
-
} = api.clientApi;
|
|
28
|
-
export const {
|
|
29
|
-
forceReRender
|
|
30
|
-
} = api;
|
|
31
|
-
export const {
|
|
32
|
-
getStorybook
|
|
33
|
-
} = api.clientApi;
|
|
34
|
-
export const {
|
|
35
|
-
raw
|
|
36
|
-
} = api.clientApi;
|
|
37
|
-
export { setup } from './render';
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import dedent from 'ts-dedent';
|
|
2
|
-
import { createApp, h } from 'vue';
|
|
3
|
-
export const render = (props, context) => {
|
|
4
|
-
const {
|
|
5
|
-
id,
|
|
6
|
-
component: Component
|
|
7
|
-
} = context;
|
|
8
|
-
|
|
9
|
-
if (!Component) {
|
|
10
|
-
throw new Error(`Unable to render story ${id} as the component annotation is missing from the default export`);
|
|
11
|
-
} // TODO remove this hack
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return h(Component, props);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
let setupFunction = app => {};
|
|
18
|
-
|
|
19
|
-
export const setup = fn => {
|
|
20
|
-
setupFunction = fn;
|
|
21
|
-
};
|
|
22
|
-
const map = new Map();
|
|
23
|
-
export function renderToDOM({
|
|
24
|
-
title,
|
|
25
|
-
name,
|
|
26
|
-
storyFn,
|
|
27
|
-
showMain,
|
|
28
|
-
showError,
|
|
29
|
-
showException
|
|
30
|
-
}, domElement) {
|
|
31
|
-
// TODO: explain cyclical nature of these app => story => mount
|
|
32
|
-
let element;
|
|
33
|
-
const storybookApp = createApp({
|
|
34
|
-
unmounted() {
|
|
35
|
-
map.delete(domElement);
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
render() {
|
|
39
|
-
map.set(domElement, storybookApp);
|
|
40
|
-
setupFunction(storybookApp);
|
|
41
|
-
return h(element);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
storybookApp.config.errorHandler = showException;
|
|
46
|
-
element = storyFn();
|
|
47
|
-
|
|
48
|
-
if (!element) {
|
|
49
|
-
showError({
|
|
50
|
-
title: `Expecting a Vue component from the story: "${name}" of "${title}".`,
|
|
51
|
-
description: dedent`
|
|
52
|
-
Did you forget to return the Vue component from the story?
|
|
53
|
-
Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
|
|
54
|
-
`
|
|
55
|
-
});
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
showMain();
|
|
60
|
-
|
|
61
|
-
if (map.has(domElement)) {
|
|
62
|
-
map.get(domElement).unmount(domElement);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
storybookApp.mount(domElement);
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/config.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const parameters: {
|
|
2
|
-
docs: {
|
|
3
|
-
inlineStories: boolean;
|
|
4
|
-
extractArgTypes: import("lib/docs-tools/dist/types").ArgTypesExtractor;
|
|
5
|
-
extractComponentDescription: typeof import("lib/docs-tools/dist/types").extractComponentDescription;
|
|
6
|
-
};
|
|
7
|
-
framework: string;
|
|
8
|
-
};
|
|
9
|
-
export { argTypesEnhancers } from './docs/config';
|
|
10
|
-
export * from './preview/config';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { extractComponentDescription } from '@storybook/docs-tools';
|
|
2
|
-
export declare const parameters: {
|
|
3
|
-
docs: {
|
|
4
|
-
inlineStories: boolean;
|
|
5
|
-
extractArgTypes: import("@storybook/docs-tools").ArgTypesExtractor;
|
|
6
|
-
extractComponentDescription: typeof extractComponentDescription;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args> | import("lib/addons/dist/types").Parameters)[];
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
|
|
2
|
-
import type { VueFramework } from './types-6-0';
|
|
3
|
-
export declare function decorateStory(storyFn: LegacyStoryFn<VueFramework>, decorators: DecoratorFunction<VueFramework>[]): LegacyStoryFn<VueFramework>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { App } from 'vue';
|
|
4
|
-
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
5
|
-
import './globals';
|
|
6
|
-
import type { IStorybookSection } from './types';
|
|
7
|
-
import type { 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("lib/client-api/dist/types/ClientApi").GetStorybookKind<VueFramework>[]);
|
|
29
|
-
export declare const raw: (() => never) | (() => import("lib/store/dist/types").BoundStory<VueFramework>[]);
|
|
30
|
-
export { setup } from './render';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RenderContext } from '@storybook/store';
|
|
2
|
-
import type { ArgsStoryFn } from '@storybook/csf';
|
|
3
|
-
import { VueFramework } from './types-6-0';
|
|
4
|
-
export declare const render: ArgsStoryFn<VueFramework>;
|
|
5
|
-
export declare const setup: (fn: (app: any) => void) => void;
|
|
6
|
-
export declare function renderToDOM({ title, name, storyFn, showMain, showError, showException }: RenderContext<VueFramework>, domElement: Element): void;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ConcreteComponent } from 'vue';
|
|
2
|
-
import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
|
3
|
-
import type { 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>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { 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>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ConcreteComponent } from 'vue';
|
|
2
|
-
export type { RenderContext } from '@storybook/core-client';
|
|
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
|
-
}
|