@storybook/vue 6.5.7 → 7.0.0-alpha.0
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/README.md +1 -48
- package/dist/cjs/config.js +51 -0
- package/dist/cjs/{client/docs → docs}/config.js +0 -0
- package/dist/cjs/{client/docs → docs}/extractArgTypes.js +0 -0
- package/dist/cjs/{client/docs → docs}/prepareForInline.js +0 -0
- package/dist/cjs/{client/docs → docs}/sourceDecorator.js +0 -0
- package/dist/cjs/{client/index.js → index.js} +4 -3
- package/dist/cjs/{client/preview → preview}/config.js +0 -0
- package/dist/cjs/{client/preview → preview}/decorateStory.js +0 -0
- package/dist/cjs/{client/preview → preview}/globals.js +0 -0
- package/dist/cjs/{client/preview → preview}/index.js +2 -2
- package/dist/cjs/{client/preview → preview}/render.js +0 -0
- package/dist/cjs/{client/preview → preview}/types-6-0.js +0 -0
- package/dist/cjs/{client/preview → preview}/types-7-0.js +0 -0
- package/dist/cjs/{client/preview → preview}/types.js +0 -0
- package/dist/cjs/{client/preview → preview}/util.js +1 -0
- package/dist/esm/config.js +6 -0
- package/dist/{modern/client → esm}/docs/config.js +0 -0
- package/dist/{modern/client → esm}/docs/extractArgTypes.js +0 -0
- package/dist/{modern/client → esm}/docs/prepareForInline.js +0 -0
- package/dist/{modern/client → esm}/docs/sourceDecorator.js +7 -13
- package/dist/esm/{client/index.js → index.js} +2 -4
- package/dist/{modern/client → esm}/preview/config.js +0 -0
- package/dist/{modern/client → esm}/preview/decorateStory.js +0 -1
- package/dist/{modern/client → esm}/preview/globals.js +0 -0
- package/dist/{modern/client → esm}/preview/index.js +1 -1
- package/dist/{modern/client → esm}/preview/render.js +2 -6
- package/dist/esm/{client/preview → preview}/types-6-0.js +0 -0
- package/dist/esm/{client/preview → preview}/types-7-0.js +0 -0
- package/dist/esm/{client/preview → preview}/types.js +0 -0
- package/dist/{modern/client → esm}/preview/util.js +1 -2
- package/dist/types/config.d.ts +12 -0
- package/dist/{ts3.9/client → types}/docs/config.d.ts +1 -1
- package/dist/{ts3.9/client → types}/docs/extractArgTypes.d.ts +0 -0
- package/dist/{ts3.9/client → types}/docs/prepareForInline.d.ts +0 -0
- package/dist/{ts3.9/client → types}/docs/sourceDecorator.d.ts +0 -0
- package/dist/{ts3.9/client → types}/index.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/config.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/decorateStory.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/globals.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/index.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/render.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/types-6-0.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/types-7-0.d.ts +0 -0
- package/dist/{ts3.9/client → types}/preview/types.d.ts +1 -1
- package/dist/{ts3.9/client → types}/preview/util.d.ts +0 -0
- package/package.json +16 -43
- package/preview.js +1 -0
- package/bin/build.js +0 -4
- package/bin/index.js +0 -3
- package/dist/cjs/server/build.js +0 -9
- package/dist/cjs/server/framework-preset-vue-docs.js +0 -50
- package/dist/cjs/server/framework-preset-vue.js +0 -62
- package/dist/cjs/server/index.js +0 -9
- package/dist/cjs/server/options.js +0 -17
- package/dist/cjs/server/preset.js +0 -8
- package/dist/esm/client/docs/config.js +0 -15
- package/dist/esm/client/docs/extractArgTypes.js +0 -128
- package/dist/esm/client/docs/prepareForInline.js +0 -39
- package/dist/esm/client/docs/sourceDecorator.js +0 -247
- package/dist/esm/client/preview/config.js +0 -5
- package/dist/esm/client/preview/decorateStory.js +0 -73
- package/dist/esm/client/preview/globals.js +0 -4
- package/dist/esm/client/preview/index.js +0 -31
- package/dist/esm/client/preview/render.js +0 -102
- package/dist/esm/client/preview/util.js +0 -61
- package/dist/esm/server/build.js +0 -3
- package/dist/esm/server/framework-preset-vue-docs.js +0 -37
- package/dist/esm/server/framework-preset-vue.js +0 -50
- package/dist/esm/server/index.js +0 -3
- package/dist/esm/server/options.js +0 -8
- package/dist/esm/server/preset.js +0 -1
- package/dist/modern/client/index.js +0 -6
- package/dist/modern/client/preview/types-6-0.js +0 -1
- package/dist/modern/client/preview/types-7-0.js +0 -1
- package/dist/modern/client/preview/types.js +0 -1
- package/dist/modern/server/build.js +0 -3
- package/dist/modern/server/framework-preset-vue-docs.js +0 -37
- package/dist/modern/server/framework-preset-vue.js +0 -50
- package/dist/modern/server/index.js +0 -3
- package/dist/modern/server/options.js +0 -8
- package/dist/modern/server/preset.js +0 -1
- package/dist/ts3.4/client/docs/config.d.ts +0 -12
- package/dist/ts3.4/client/docs/extractArgTypes.d.ts +0 -2
- package/dist/ts3.4/client/docs/prepareForInline.d.ts +0 -4
- package/dist/ts3.4/client/docs/sourceDecorator.d.ts +0 -5
- package/dist/ts3.4/client/index.d.ts +0 -2
- package/dist/ts3.4/client/preview/config.d.ts +0 -5
- package/dist/ts3.4/client/preview/decorateStory.d.ts +0 -4
- package/dist/ts3.4/client/preview/globals.d.ts +0 -1
- package/dist/ts3.4/client/preview/index.d.ts +0 -25
- package/dist/ts3.4/client/preview/render.d.ts +0 -7
- package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -35
- package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.4/client/preview/types.d.ts +0 -15
- package/dist/ts3.4/client/preview/util.d.ts +0 -4
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/framework-preset-vue-docs.d.ts +0 -3
- package/dist/ts3.4/server/framework-preset-vue.d.ts +0 -4
- package/dist/ts3.4/server/index.d.ts +0 -1
- package/dist/ts3.4/server/options.d.ts +0 -3
- package/dist/ts3.4/server/preset.d.ts +0 -2
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/framework-preset-vue-docs.d.ts +0 -3
- package/dist/ts3.9/server/framework-preset-vue.d.ts +0 -4
- package/dist/ts3.9/server/index.d.ts +0 -1
- package/dist/ts3.9/server/options.d.ts +0 -3
- package/dist/ts3.9/server/preset.d.ts +0 -2
- package/preset.js +0 -1
- package/standalone.js +0 -8
- package/types-6-0.d.ts +0 -1
- package/types-7-0.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,48 +1 @@
|
|
|
1
|
-
# Storybook
|
|
2
|
-
|
|
3
|
-
Storybook for Vue is a UI development environment for your Vue components.
|
|
4
|
-
With it, you can visualize different states of your UI components and develop them interactively.
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
Storybook runs outside of your app.
|
|
9
|
-
So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
|
|
10
|
-
|
|
11
|
-
## Getting Started
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
cd my-vue-app
|
|
15
|
-
npx sb init
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
For more information visit: [storybook.js.org](https://storybook.js.org)
|
|
19
|
-
|
|
20
|
-
## Starter Storybook-for-Vue Boilerplate project with [Vuetify](https://github.com/vuetifyjs/vuetify) Material Component Framework
|
|
21
|
-
|
|
22
|
-
<https://github.com/white-rabbit-japan/vue-vuetify-storybook>
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
|
|
27
|
-
You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.
|
|
28
|
-
|
|
29
|
-
## Vue Notes
|
|
30
|
-
|
|
31
|
-
- When using global custom components or extensions (e.g., `Vue.use`). You will need to declare those in the `./storybook/preview.js`.
|
|
32
|
-
|
|
33
|
-
## Known Limitations
|
|
34
|
-
|
|
35
|
-
In Storybook story and decorator components, you can not access the Vue instance
|
|
36
|
-
in factory functions for default prop values:
|
|
37
|
-
|
|
38
|
-
```js
|
|
39
|
-
{
|
|
40
|
-
props: {
|
|
41
|
-
foo: {
|
|
42
|
-
default() {
|
|
43
|
-
return this.bar; // does not work!
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
```
|
|
1
|
+
# Storybook Vue renderer
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.to-string.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.keys.js");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
var _exportNames = {
|
|
13
|
+
parameters: true,
|
|
14
|
+
decorators: true,
|
|
15
|
+
argTypesEnhancers: true
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "argTypesEnhancers", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function get() {
|
|
20
|
+
return _config.argTypesEnhancers;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "decorators", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function get() {
|
|
26
|
+
return _config.decorators;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
exports.parameters = void 0;
|
|
30
|
+
|
|
31
|
+
require("core-js/modules/es.object.assign.js");
|
|
32
|
+
|
|
33
|
+
var _config = require("./docs/config");
|
|
34
|
+
|
|
35
|
+
var _config2 = require("./preview/config");
|
|
36
|
+
|
|
37
|
+
Object.keys(_config2).forEach(function (key) {
|
|
38
|
+
if (key === "default" || key === "__esModule") return;
|
|
39
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
40
|
+
if (key in exports && exports[key] === _config2[key]) return;
|
|
41
|
+
Object.defineProperty(exports, key, {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function get() {
|
|
44
|
+
return _config2[key];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var parameters = Object.assign({
|
|
49
|
+
framework: 'vue'
|
|
50
|
+
}, _config.parameters);
|
|
51
|
+
exports.parameters = parameters;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -84,6 +84,7 @@ Object.keys(_types).forEach(function (key) {
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
var _module, _module$hot;
|
|
88
|
+
|
|
89
|
+
// optimization: stop HMR propagation in webpack
|
|
90
|
+
(_module = module) === null || _module === void 0 ? void 0 : (_module$hot = _module.hot) === null || _module$hot === void 0 ? void 0 : _module$hot.decline();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,7 @@ exports.storiesOf = exports.setAddon = exports.raw = exports.getStorybook = expo
|
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/es.array.concat.js");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _coreClient = require("@storybook/core-client");
|
|
11
11
|
|
|
12
12
|
require("./globals");
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ var _decorateStory = require("./decorateStory");
|
|
|
17
17
|
|
|
18
18
|
/* eslint-disable prefer-destructuring */
|
|
19
19
|
var framework = 'vue';
|
|
20
|
-
var api = (0,
|
|
20
|
+
var api = (0, _coreClient.start)(_render.renderToDOM, {
|
|
21
21
|
decorateStory: _decorateStory.decorateStory,
|
|
22
22
|
render: _render.render
|
|
23
23
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -51,6 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
51
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
|
|
54
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
54
55
|
function getType(fn) {
|
|
55
56
|
var match = fn && fn.toString().match(/^\s*function (\w+)/);
|
|
56
57
|
return match ? match[1] : '';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
|
2
2
|
|
|
3
3
|
/* eslint no-underscore-dangle: ["error", { "allow": ["_vnode"] }] */
|
|
4
4
|
import { addons } from '@storybook/addons';
|
|
5
5
|
import { logger } from '@storybook/client-logger';
|
|
6
6
|
import { SourceType, SNIPPET_RENDERED } from '@storybook/docs-tools';
|
|
7
7
|
export const skipSourceRender = context => {
|
|
8
|
-
|
|
8
|
+
const sourceParams = context?.parameters.docs?.source;
|
|
9
|
+
const isArgsStory = context?.parameters.__isArgsStory; // always render if the user forces it
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
const isArgsStory = context === null || context === void 0 ? void 0 : context.parameters.__isArgsStory; // always render if the user forces it
|
|
12
|
-
|
|
13
|
-
if ((sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === SourceType.DYNAMIC) {
|
|
11
|
+
if (sourceParams?.type === SourceType.DYNAMIC) {
|
|
14
12
|
return false;
|
|
15
13
|
} // never render if the user is forcing the block to render code, or
|
|
16
14
|
// if the user provides code, or if it's not an args story.
|
|
17
15
|
|
|
18
16
|
|
|
19
|
-
return !isArgsStory ||
|
|
17
|
+
return !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE;
|
|
20
18
|
};
|
|
21
19
|
export const sourceDecorator = (storyFn, context) => {
|
|
22
20
|
const story = storyFn(); // See ../react/jsxDecorator.tsx
|
|
@@ -54,9 +52,7 @@ export const sourceDecorator = (storyFn, context) => {
|
|
|
54
52
|
};
|
|
55
53
|
};
|
|
56
54
|
export function vnodeToString(vnode) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const attrString = [...((_vnode$data = vnode.data) !== null && _vnode$data !== void 0 && _vnode$data.slot ? [['slot', vnode.data.slot]] : []), ['class', stringifyClassAttribute(vnode)], ...((_vnode$componentOptio = vnode.componentOptions) !== null && _vnode$componentOptio !== void 0 && _vnode$componentOptio.propsData ? Object.entries(vnode.componentOptions.propsData) : []), ...((_vnode$data2 = vnode.data) !== null && _vnode$data2 !== void 0 && _vnode$data2.attrs ? Object.entries(vnode.data.attrs) : [])].filter(([name], index, list) => list.findIndex(item => item[0] === name) === index).map(([name, value]) => stringifyAttr(name, value)).filter(Boolean).join(' ');
|
|
55
|
+
const attrString = [...(vnode.data?.slot ? [['slot', vnode.data.slot]] : []), ['class', stringifyClassAttribute(vnode)], ...(vnode.componentOptions?.propsData ? Object.entries(vnode.componentOptions.propsData) : []), ...(vnode.data?.attrs ? Object.entries(vnode.data.attrs) : [])].filter(([name], index, list) => list.findIndex(item => item[0] === name) === index).map(([name, value]) => stringifyAttr(name, value)).filter(Boolean).join(' ');
|
|
60
56
|
|
|
61
57
|
if (!vnode.componentOptions) {
|
|
62
58
|
// Non-component elements (div, span, etc...)
|
|
@@ -93,13 +89,11 @@ export function vnodeToString(vnode) {
|
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
function stringifyClassAttribute(vnode) {
|
|
96
|
-
var _vnode$data$staticCla, _vnode$data$staticCla2;
|
|
97
|
-
|
|
98
92
|
if (!vnode.data || !vnode.data.staticClass && !vnode.data.class) {
|
|
99
93
|
return undefined;
|
|
100
94
|
}
|
|
101
95
|
|
|
102
|
-
return [...(
|
|
96
|
+
return [...(vnode.data.staticClass?.split(' ') ?? []), ...normalizeClassBinding(vnode.data.class)].filter(Boolean).join(' ') || undefined;
|
|
103
97
|
} // https://vuejs.org/v2/guide/class-and-style.html#Binding-HTML-Classes
|
|
104
98
|
|
|
105
99
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw } from './preview';
|
|
2
|
-
export * from './preview/types-6-0';
|
|
2
|
+
export * from './preview/types-6-0'; // optimization: stop HMR propagation in webpack
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
module.hot.decline();
|
|
6
|
-
}
|
|
4
|
+
module?.hot?.decline();
|
|
File without changes
|
|
File without changes
|
|
@@ -22,8 +22,6 @@ const root = new Vue({
|
|
|
22
22
|
|
|
23
23
|
});
|
|
24
24
|
export const render = (props, context) => {
|
|
25
|
-
var _component$__docgenIn;
|
|
26
|
-
|
|
27
25
|
const {
|
|
28
26
|
id,
|
|
29
27
|
component: Component,
|
|
@@ -42,11 +40,9 @@ export const render = (props, context) => {
|
|
|
42
40
|
// @ts-ignore isReservedTag is an internal function from Vue, might be changed in future releases
|
|
43
41
|
const isReservedTag = Vue.config.isReservedTag && Vue.config.isReservedTag(component.name);
|
|
44
42
|
componentName = isReservedTag ? `sb-${component.name}` : component.name;
|
|
45
|
-
} else if (
|
|
46
|
-
var _component$__docgenIn2;
|
|
47
|
-
|
|
43
|
+
} else if (component.__docgenInfo?.displayName) {
|
|
48
44
|
// otherwise, we use the displayName from docgen, if present
|
|
49
|
-
componentName =
|
|
45
|
+
componentName = component.__docgenInfo?.displayName;
|
|
50
46
|
}
|
|
51
47
|
|
|
52
48
|
return {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const parameters: {
|
|
2
|
+
docs: {
|
|
3
|
+
inlineStories: boolean;
|
|
4
|
+
iframeHeight: number;
|
|
5
|
+
prepareForInline: (storyFn: import("@storybook/csf").PartialStoryFn<import(".").VueFramework, import("@storybook/csf").Args>, { args }: import("@storybook/csf").StoryContext<import(".").VueFramework, import("@storybook/csf").Args>) => import("react").DetailedReactHTMLElement<null, HTMLElement>;
|
|
6
|
+
extractArgTypes: import("lib/docs-tools/dist/types").ArgTypesExtractor;
|
|
7
|
+
extractComponentDescription: typeof import("lib/docs-tools/dist/types").extractComponentDescription;
|
|
8
|
+
};
|
|
9
|
+
framework: string;
|
|
10
|
+
};
|
|
11
|
+
export { decorators, argTypesEnhancers } from './docs/config';
|
|
12
|
+
export * from './preview/config';
|
|
@@ -9,4 +9,4 @@ export declare const parameters: {
|
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export declare const decorators: ((storyFn: any, context: import("@storybook/csf").StoryContext<import("..").VueFramework, import("@storybook/csf").Args>) => any)[];
|
|
12
|
-
export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/
|
|
12
|
+
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)[];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,41 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Storybook
|
|
3
|
+
"version": "7.0.0-alpha.0",
|
|
4
|
+
"description": "Storybook Vue renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
7
7
|
],
|
|
8
|
-
"homepage": "https://github.com/storybookjs/storybook/tree/main/
|
|
8
|
+
"homepage": "https://github.com/storybookjs/storybook/tree/main/renderers/vue",
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/storybookjs/storybook/issues"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "https://github.com/storybookjs/storybook.git",
|
|
15
|
-
"directory": "
|
|
15
|
+
"directory": "renderers/vue"
|
|
16
16
|
},
|
|
17
17
|
"funding": {
|
|
18
18
|
"type": "opencollective",
|
|
19
19
|
"url": "https://opencollective.com/storybook"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"main": "dist/cjs/
|
|
23
|
-
"module": "dist/esm/
|
|
24
|
-
"types": "dist/
|
|
25
|
-
"typesVersions": {
|
|
26
|
-
"<3.8": {
|
|
27
|
-
"dist/ts3.9/*": [
|
|
28
|
-
"dist/ts3.4/*"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"bin": {
|
|
33
|
-
"build-storybook": "./bin/build.js",
|
|
34
|
-
"start-storybook": "./bin/index.js",
|
|
35
|
-
"storybook-server": "./bin/index.js"
|
|
36
|
-
},
|
|
22
|
+
"main": "dist/cjs/index.js",
|
|
23
|
+
"module": "dist/esm/index.js",
|
|
24
|
+
"types": "dist/types/index.d.ts",
|
|
37
25
|
"files": [
|
|
38
|
-
"bin/**/*",
|
|
39
26
|
"dist/**/*",
|
|
40
27
|
"README.md",
|
|
41
28
|
"*.js",
|
|
@@ -45,40 +32,27 @@
|
|
|
45
32
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
33
|
},
|
|
47
34
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "
|
|
49
|
-
"@storybook/client-logger": "
|
|
50
|
-
"@storybook/core": "
|
|
51
|
-
"@storybook/core-common": "6.5.7",
|
|
35
|
+
"@storybook/addons": "7.0.0-alpha.0",
|
|
36
|
+
"@storybook/client-logger": "7.0.0-alpha.0",
|
|
37
|
+
"@storybook/core-client": "7.0.0-alpha.0",
|
|
52
38
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
53
|
-
"@storybook/docs-tools": "
|
|
54
|
-
"@storybook/store": "
|
|
55
|
-
"@types/node": "^14.14.20 || ^16.0.0",
|
|
56
|
-
"@types/webpack-env": "^1.16.0",
|
|
39
|
+
"@storybook/docs-tools": "7.0.0-alpha.0",
|
|
40
|
+
"@storybook/store": "7.0.0-alpha.0",
|
|
57
41
|
"core-js": "^3.8.2",
|
|
58
42
|
"global": "^4.4.0",
|
|
59
43
|
"react": "16.14.0",
|
|
60
44
|
"react-dom": "16.14.0",
|
|
61
|
-
"read-pkg-up": "^7.0.1",
|
|
62
45
|
"regenerator-runtime": "^0.13.7",
|
|
63
|
-
"ts-dedent": "^2.0.0"
|
|
64
|
-
"ts-loader": "^8.0.14",
|
|
65
|
-
"vue-docgen-api": "^4.44.15",
|
|
66
|
-
"vue-docgen-loader": "^1.5.0",
|
|
67
|
-
"webpack": ">=4.0.0 <6.0.0"
|
|
46
|
+
"ts-dedent": "^2.0.0"
|
|
68
47
|
},
|
|
69
48
|
"devDependencies": {
|
|
70
|
-
"vue": "^2.6.12"
|
|
71
|
-
"vue-loader": "^15.9.6",
|
|
72
|
-
"vue-template-compiler": "^2.6.12",
|
|
73
|
-
"webpack": "4"
|
|
49
|
+
"vue": "^2.6.12"
|
|
74
50
|
},
|
|
75
51
|
"peerDependencies": {
|
|
76
52
|
"@babel/core": "*",
|
|
77
53
|
"babel-loader": "^7.0.0 || ^8.0.0",
|
|
78
54
|
"css-loader": "*",
|
|
79
|
-
"vue": "^2.6.8"
|
|
80
|
-
"vue-loader": "^15.7.0",
|
|
81
|
-
"vue-template-compiler": "^2.6.8"
|
|
55
|
+
"vue": "^2.6.8"
|
|
82
56
|
},
|
|
83
57
|
"engines": {
|
|
84
58
|
"node": ">=10.13.0"
|
|
@@ -86,6 +60,5 @@
|
|
|
86
60
|
"publishConfig": {
|
|
87
61
|
"access": "public"
|
|
88
62
|
},
|
|
89
|
-
"gitHead": "
|
|
90
|
-
"sbmodern": "dist/modern/client/index.js"
|
|
63
|
+
"gitHead": "c82d897ea765da8cf4fbbcc2af1f28c808a93e23"
|
|
91
64
|
}
|
package/preview.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/esm/config';
|
package/bin/build.js
DELETED
package/bin/index.js
DELETED
package/dist/cjs/server/build.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _server = require("@storybook/core/server");
|
|
4
|
-
|
|
5
|
-
var _options = _interopRequireDefault(require("./options"));
|
|
6
|
-
|
|
7
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
-
|
|
9
|
-
(0, _server.buildStatic)(_options.default);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.previewAnnotations = void 0;
|
|
7
|
-
exports.webpackFinal = webpackFinal;
|
|
8
|
-
|
|
9
|
-
var _coreCommon = require("@storybook/core-common");
|
|
10
|
-
|
|
11
|
-
var _docsTools = require("@storybook/docs-tools");
|
|
12
|
-
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
-
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
function webpackFinal(webpackConfig = {}, options) {
|
|
20
|
-
var _options$presetsList;
|
|
21
|
-
|
|
22
|
-
if (!(0, _docsTools.hasDocsOrControls)(options)) return webpackConfig;
|
|
23
|
-
var vueDocgenOptions = {};
|
|
24
|
-
(_options$presetsList = options.presetsList) === null || _options$presetsList === void 0 ? void 0 : _options$presetsList.forEach(function (preset) {
|
|
25
|
-
if (preset.name.includes('addon-docs') && preset.options.vueDocgenOptions) {
|
|
26
|
-
var appendableOptions = preset.options.vueDocgenOptions;
|
|
27
|
-
vueDocgenOptions = _objectSpread(_objectSpread({}, vueDocgenOptions), appendableOptions);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
webpackConfig.module.rules.push({
|
|
31
|
-
test: /\.vue$/,
|
|
32
|
-
loader: require.resolve('vue-docgen-loader', {
|
|
33
|
-
paths: [require.resolve('@storybook/vue')]
|
|
34
|
-
}),
|
|
35
|
-
enforce: 'post',
|
|
36
|
-
options: {
|
|
37
|
-
docgenOptions: _objectSpread({
|
|
38
|
-
alias: webpackConfig.resolve.alias
|
|
39
|
-
}, vueDocgenOptions)
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
return webpackConfig;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var previewAnnotations = function (entry = [], options) {
|
|
46
|
-
if (!(0, _docsTools.hasDocsOrControls)(options)) return entry;
|
|
47
|
-
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/docs/config')];
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
exports.previewAnnotations = previewAnnotations;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.previewAnnotations = void 0;
|
|
7
|
-
exports.webpack = webpack;
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.promise.js");
|
|
10
|
-
|
|
11
|
-
var _vueLoader = require("vue-loader");
|
|
12
|
-
|
|
13
|
-
var _coreCommon = require("@storybook/core-common");
|
|
14
|
-
|
|
15
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
-
|
|
17
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
async function webpack(config, {
|
|
22
|
-
presets: presets
|
|
23
|
-
}) {
|
|
24
|
-
var typescriptOptions = await presets.apply('typescript', {});
|
|
25
|
-
config.plugins.push(new _vueLoader.VueLoaderPlugin());
|
|
26
|
-
config.module.rules.push({
|
|
27
|
-
test: /\.vue$/,
|
|
28
|
-
loader: require.resolve('vue-loader'),
|
|
29
|
-
options: {}
|
|
30
|
-
});
|
|
31
|
-
config.module.rules.push({
|
|
32
|
-
test: /\.ts$/,
|
|
33
|
-
use: [{
|
|
34
|
-
loader: require.resolve('ts-loader'),
|
|
35
|
-
options: {
|
|
36
|
-
transpileOnly: !typescriptOptions.check,
|
|
37
|
-
appendTsSuffixTo: [/\.vue$/]
|
|
38
|
-
}
|
|
39
|
-
}]
|
|
40
|
-
});
|
|
41
|
-
config.module.rules.push({
|
|
42
|
-
test: /\.tsx$/,
|
|
43
|
-
use: [{
|
|
44
|
-
loader: require.resolve('ts-loader'),
|
|
45
|
-
options: {
|
|
46
|
-
transpileOnly: true,
|
|
47
|
-
appendTsxSuffixTo: [/\.vue$/]
|
|
48
|
-
}
|
|
49
|
-
}]
|
|
50
|
-
});
|
|
51
|
-
config.resolve.extensions.push('.vue');
|
|
52
|
-
config.resolve.alias = _objectSpread(_objectSpread({}, config.resolve.alias), {}, {
|
|
53
|
-
vue$: require.resolve('vue/dist/vue.esm.js')
|
|
54
|
-
});
|
|
55
|
-
return config;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var previewAnnotations = function (entry = []) {
|
|
59
|
-
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/preview/config')];
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
exports.previewAnnotations = previewAnnotations;
|
package/dist/cjs/server/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _server = require("@storybook/core/server");
|
|
4
|
-
|
|
5
|
-
var _options = _interopRequireDefault(require("./options"));
|
|
6
|
-
|
|
7
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
-
|
|
9
|
-
(0, _server.buildDev)(_options.default);
|