@storybook/vue3 6.4.0-beta.20 → 6.4.0-beta.24
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/package.json +6 -6
- package/types-7-0.d.ts +1 -0
- package/dist/cjs/client/index.js +0 -101
- package/dist/cjs/client/preview/config.js +0 -19
- package/dist/cjs/client/preview/globals.js +0 -9
- package/dist/cjs/client/preview/index.js +0 -126
- package/dist/cjs/client/preview/render.js +0 -68
- package/dist/cjs/client/preview/types-6-0.js +0 -1
- package/dist/cjs/client/preview/types-7-0.js +0 -1
- package/dist/cjs/client/preview/types.js +0 -1
- package/dist/cjs/server/build.js +0 -9
- package/dist/cjs/server/framework-preset-vue3.js +0 -56
- package/dist/cjs/server/index.js +0 -9
- package/dist/cjs/server/options.js +0 -17
- package/dist/cjs/typings.d.js +0 -1
- package/dist/esm/client/index.js +0 -6
- package/dist/esm/client/preview/config.js +0 -4
- package/dist/esm/client/preview/globals.js +0 -4
- package/dist/esm/client/preview/index.js +0 -100
- package/dist/esm/client/preview/render.js +0 -49
- package/dist/esm/client/preview/types-6-0.js +0 -0
- package/dist/esm/client/preview/types-7-0.js +0 -0
- package/dist/esm/client/preview/types.js +0 -0
- package/dist/esm/server/build.js +0 -3
- package/dist/esm/server/framework-preset-vue3.js +0 -42
- package/dist/esm/server/index.js +0 -3
- package/dist/esm/server/options.js +0 -8
- package/dist/esm/typings.d.js +0 -0
- package/dist/modern/client/index.js +0 -6
- package/dist/modern/client/preview/config.js +0 -4
- package/dist/modern/client/preview/globals.js +0 -6
- package/dist/modern/client/preview/index.js +0 -96
- package/dist/modern/client/preview/render.js +0 -47
- package/dist/modern/client/preview/types-6-0.js +0 -0
- package/dist/modern/client/preview/types-7-0.js +0 -0
- package/dist/modern/client/preview/types.js +0 -0
- package/dist/modern/server/build.js +0 -3
- package/dist/modern/server/framework-preset-vue3.js +0 -42
- package/dist/modern/server/index.js +0 -3
- package/dist/modern/server/options.js +0 -8
- package/dist/modern/typings.d.js +0 -0
- package/dist/ts3.4/client/index.d.ts +0 -2
- package/dist/ts3.4/client/preview/config.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 -32
- package/dist/ts3.4/client/preview/render.d.ts +0 -5
- 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/server/build.d.ts +0 -1
- package/dist/ts3.4/server/framework-preset-vue3.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.9/client/index.d.ts +0 -2
- package/dist/ts3.9/client/preview/config.d.ts +0 -4
- package/dist/ts3.9/client/preview/globals.d.ts +0 -1
- package/dist/ts3.9/client/preview/index.d.ts +0 -32
- package/dist/ts3.9/client/preview/render.d.ts +0 -5
- package/dist/ts3.9/client/preview/types-6-0.d.ts +0 -35
- package/dist/ts3.9/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.9/client/preview/types.d.ts +0 -15
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/framework-preset-vue3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3",
|
|
3
|
-
"version": "6.4.0-beta.
|
|
3
|
+
"version": "6.4.0-beta.24",
|
|
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.
|
|
49
|
-
"@storybook/core": "6.4.0-beta.
|
|
50
|
-
"@storybook/core-common": "6.4.0-beta.
|
|
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",
|
|
51
51
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
52
|
-
"@storybook/store": "6.4.0-beta.
|
|
52
|
+
"@storybook/store": "6.4.0-beta.24",
|
|
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": "
|
|
84
|
+
"gitHead": "f53ba4d7210b5c4809d57c74d7a42314172aa63e",
|
|
85
85
|
"sbmodern": "dist/modern/client/index.js"
|
|
86
86
|
}
|
package/types-7-0.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/ts3.9/client/preview/types-7-0.d';
|
package/dist/cjs/client/index.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.keys.js");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
var _exportNames = {
|
|
11
|
-
storiesOf: true,
|
|
12
|
-
setAddon: true,
|
|
13
|
-
addDecorator: true,
|
|
14
|
-
addParameters: true,
|
|
15
|
-
configure: true,
|
|
16
|
-
getStorybook: true,
|
|
17
|
-
forceReRender: true,
|
|
18
|
-
raw: true,
|
|
19
|
-
app: true,
|
|
20
|
-
activeStoryComponent: true
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "storiesOf", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _preview.storiesOf;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "setAddon", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function get() {
|
|
31
|
-
return _preview.setAddon;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(exports, "addDecorator", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function get() {
|
|
37
|
-
return _preview.addDecorator;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(exports, "addParameters", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get: function get() {
|
|
43
|
-
return _preview.addParameters;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
Object.defineProperty(exports, "configure", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
get: function get() {
|
|
49
|
-
return _preview.configure;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
Object.defineProperty(exports, "getStorybook", {
|
|
53
|
-
enumerable: true,
|
|
54
|
-
get: function get() {
|
|
55
|
-
return _preview.getStorybook;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
Object.defineProperty(exports, "forceReRender", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
get: function get() {
|
|
61
|
-
return _preview.forceReRender;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(exports, "raw", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function get() {
|
|
67
|
-
return _preview.raw;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(exports, "app", {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
get: function get() {
|
|
73
|
-
return _preview.app;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(exports, "activeStoryComponent", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function get() {
|
|
79
|
-
return _preview.activeStoryComponent;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
var _preview = require("./preview");
|
|
84
|
-
|
|
85
|
-
var _types = require("./preview/types-6-0");
|
|
86
|
-
|
|
87
|
-
Object.keys(_types).forEach(function (key) {
|
|
88
|
-
if (key === "default" || key === "__esModule") return;
|
|
89
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
90
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
91
|
-
Object.defineProperty(exports, key, {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
get: function get() {
|
|
94
|
-
return _types[key];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
if (module && module.hot && module.hot.decline) {
|
|
100
|
-
module.hot.decline();
|
|
101
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "renderToDOM", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _render.renderToDOM;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
exports.parameters = void 0;
|
|
13
|
-
|
|
14
|
-
var _render = require("./render");
|
|
15
|
-
|
|
16
|
-
var parameters = {
|
|
17
|
-
framework: 'vue3'
|
|
18
|
-
};
|
|
19
|
-
exports.parameters = parameters;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _global = _interopRequireDefault(require("global"));
|
|
4
|
-
|
|
5
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
|
-
|
|
7
|
-
var globalWindow = _global.default.window;
|
|
8
|
-
globalWindow.STORYBOOK_REACT_CLASSES = {};
|
|
9
|
-
globalWindow.STORYBOOK_ENV = 'vue3';
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "activeStoryComponent", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _render.activeStoryComponent;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
exports.app = exports.raw = exports.getStorybook = exports.forceReRender = exports.setAddon = exports.clearDecorators = exports.addParameters = exports.addDecorator = exports.configure = exports.storiesOf = void 0;
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.function.name.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/es.object.assign.js");
|
|
17
|
-
|
|
18
|
-
require("core-js/modules/es.array.concat.js");
|
|
19
|
-
|
|
20
|
-
var _vue = require("vue");
|
|
21
|
-
|
|
22
|
-
var _client = require("@storybook/core/client");
|
|
23
|
-
|
|
24
|
-
var _store = require("@storybook/store");
|
|
25
|
-
|
|
26
|
-
require("./globals");
|
|
27
|
-
|
|
28
|
-
var _render = require("./render");
|
|
29
|
-
|
|
30
|
-
/*
|
|
31
|
-
This normalizes a functional component into a render method in ComponentOptions.
|
|
32
|
-
|
|
33
|
-
The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
|
|
34
|
-
method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
|
|
35
|
-
*/
|
|
36
|
-
function normalizeFunctionalComponent(options) {
|
|
37
|
-
return typeof options === 'function' ? {
|
|
38
|
-
render: options,
|
|
39
|
-
name: options.name
|
|
40
|
-
} : options;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function prepare(rawStory, innerStory) {
|
|
44
|
-
var story = rawStory;
|
|
45
|
-
|
|
46
|
-
if (story == null) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (innerStory) {
|
|
51
|
-
return Object.assign({}, normalizeFunctionalComponent(story), {
|
|
52
|
-
components: Object.assign({}, story.components || {}, {
|
|
53
|
-
story: innerStory
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
render: function render() {
|
|
60
|
-
return (0, _vue.h)(story);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function decorateStory(storyFn, decorators) {
|
|
66
|
-
return decorators.reduce(function (decorated, decorator) {
|
|
67
|
-
return function (context) {
|
|
68
|
-
var story;
|
|
69
|
-
var decoratedStory = decorator(function (update) {
|
|
70
|
-
story = decorated(Object.assign({}, context, (0, _store.sanitizeStoryContextUpdate)(update)));
|
|
71
|
-
return story;
|
|
72
|
-
}, context);
|
|
73
|
-
|
|
74
|
-
if (!story) {
|
|
75
|
-
story = decorated(context);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (decoratedStory === story) {
|
|
79
|
-
return story;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return prepare(decoratedStory, story);
|
|
83
|
-
};
|
|
84
|
-
}, function (context) {
|
|
85
|
-
return prepare(storyFn(context));
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
var framework = 'vue3';
|
|
90
|
-
var api = (0, _client.start)(_render.renderToDOM, {
|
|
91
|
-
decorateStory: decorateStory
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
var storiesOf = function storiesOf(kind, m) {
|
|
95
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
96
|
-
framework: framework
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.storiesOf = storiesOf;
|
|
101
|
-
|
|
102
|
-
var configure = function configure() {
|
|
103
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
104
|
-
args[_key] = arguments[_key];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return api.configure.apply(api, [framework].concat(args));
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
exports.configure = configure;
|
|
111
|
-
var addDecorator = api.clientApi.addDecorator;
|
|
112
|
-
exports.addDecorator = addDecorator;
|
|
113
|
-
var addParameters = api.clientApi.addParameters;
|
|
114
|
-
exports.addParameters = addParameters;
|
|
115
|
-
var clearDecorators = api.clientApi.clearDecorators;
|
|
116
|
-
exports.clearDecorators = clearDecorators;
|
|
117
|
-
var setAddon = api.clientApi.setAddon;
|
|
118
|
-
exports.setAddon = setAddon;
|
|
119
|
-
var forceReRender = api.forceReRender;
|
|
120
|
-
exports.forceReRender = forceReRender;
|
|
121
|
-
var getStorybook = api.clientApi.getStorybook;
|
|
122
|
-
exports.getStorybook = getStorybook;
|
|
123
|
-
var raw = api.clientApi.raw;
|
|
124
|
-
exports.raw = raw;
|
|
125
|
-
var app = _render.storybookApp;
|
|
126
|
-
exports.app = app;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.slice.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.freeze.js");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.renderToDOM = renderToDOM;
|
|
11
|
-
exports.storybookApp = exports.activeStoryComponent = void 0;
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.function.name.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.array.concat.js");
|
|
16
|
-
|
|
17
|
-
var _tsDedent = _interopRequireDefault(require("ts-dedent"));
|
|
18
|
-
|
|
19
|
-
var _vue = require("vue");
|
|
20
|
-
|
|
21
|
-
var _templateObject;
|
|
22
|
-
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
-
|
|
25
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
26
|
-
|
|
27
|
-
var activeStoryComponent = (0, _vue.shallowRef)(null);
|
|
28
|
-
exports.activeStoryComponent = activeStoryComponent;
|
|
29
|
-
var root = null;
|
|
30
|
-
var storybookApp = (0, _vue.createApp)({
|
|
31
|
-
// If an end-user calls `unmount` on the app, we need to clear our root variable
|
|
32
|
-
unmounted: function unmounted() {
|
|
33
|
-
root = null;
|
|
34
|
-
},
|
|
35
|
-
setup: function setup() {
|
|
36
|
-
return function () {
|
|
37
|
-
if (!activeStoryComponent.value) throw new Error('No Vue 3 Story available. Was it set correctly?');
|
|
38
|
-
return (0, _vue.h)(activeStoryComponent.value);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
exports.storybookApp = storybookApp;
|
|
43
|
-
|
|
44
|
-
function renderToDOM(_ref, domElement) {
|
|
45
|
-
var title = _ref.title,
|
|
46
|
-
name = _ref.name,
|
|
47
|
-
storyFn = _ref.storyFn,
|
|
48
|
-
showMain = _ref.showMain,
|
|
49
|
-
showError = _ref.showError,
|
|
50
|
-
showException = _ref.showException;
|
|
51
|
-
storybookApp.config.errorHandler = showException;
|
|
52
|
-
var element = storyFn();
|
|
53
|
-
|
|
54
|
-
if (!element) {
|
|
55
|
-
showError({
|
|
56
|
-
title: "Expecting a Vue component from the story: \"".concat(name, "\" of \"").concat(title, "\"."),
|
|
57
|
-
description: (0, _tsDedent.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Did you forget to return the Vue component from the story?\n Use \"() => ({ template: '<my-comp></my-comp>' })\" or \"() => ({ components: MyComp, template: '<my-comp></my-comp>' })\" when defining the story.\n "])))
|
|
58
|
-
});
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
showMain();
|
|
63
|
-
activeStoryComponent.value = element;
|
|
64
|
-
|
|
65
|
-
if (!root) {
|
|
66
|
-
root = storybookApp.mount(domElement);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
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,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.webpack = webpack;
|
|
7
|
-
exports.config = void 0;
|
|
8
|
-
|
|
9
|
-
var _vueLoader = require("vue-loader");
|
|
10
|
-
|
|
11
|
-
var _webpack = require("webpack");
|
|
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); if (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 = 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; }
|
|
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
|
-
function webpack(config) {
|
|
22
|
-
return _objectSpread(_objectSpread({}, config), {}, {
|
|
23
|
-
plugins: [...config.plugins, new _vueLoader.VueLoaderPlugin(), new _webpack.DefinePlugin({
|
|
24
|
-
__VUE_OPTIONS_API__: JSON.stringify(true),
|
|
25
|
-
__VUE_PROD_DEVTOOLS__: JSON.stringify(true)
|
|
26
|
-
})],
|
|
27
|
-
module: _objectSpread(_objectSpread({}, config.module), {}, {
|
|
28
|
-
rules: [...config.module.rules, {
|
|
29
|
-
test: /\.vue$/,
|
|
30
|
-
loader: require.resolve('vue-loader'),
|
|
31
|
-
options: {}
|
|
32
|
-
}, {
|
|
33
|
-
test: /\.tsx?$/,
|
|
34
|
-
use: [{
|
|
35
|
-
loader: require.resolve('ts-loader'),
|
|
36
|
-
options: {
|
|
37
|
-
transpileOnly: true,
|
|
38
|
-
appendTsSuffixTo: [/\.vue$/]
|
|
39
|
-
}
|
|
40
|
-
}]
|
|
41
|
-
}]
|
|
42
|
-
}),
|
|
43
|
-
resolve: _objectSpread(_objectSpread({}, config.resolve), {}, {
|
|
44
|
-
extensions: [...config.resolve.extensions, '.vue'],
|
|
45
|
-
alias: _objectSpread(_objectSpread({}, config.resolve.alias), {}, {
|
|
46
|
-
vue$: require.resolve('vue/dist/vue.esm-bundler.js')
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
var config = function (entry = []) {
|
|
53
|
-
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/preview/config')];
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.config = config;
|
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);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _readPkgUp = require("read-pkg-up");
|
|
9
|
-
|
|
10
|
-
var _default = {
|
|
11
|
-
packageJson: (0, _readPkgUp.sync)({
|
|
12
|
-
cwd: __dirname
|
|
13
|
-
}).packageJson,
|
|
14
|
-
framework: 'vue3',
|
|
15
|
-
frameworkPresets: [require.resolve('./framework-preset-vue3')]
|
|
16
|
-
};
|
|
17
|
-
exports.default = _default;
|
package/dist/cjs/typings.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/esm/client/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import "core-js/modules/es.function.name.js";
|
|
2
|
-
import "core-js/modules/es.object.assign.js";
|
|
3
|
-
import "core-js/modules/es.array.concat.js";
|
|
4
|
-
import { h } from 'vue';
|
|
5
|
-
import { start } from '@storybook/core/client';
|
|
6
|
-
import { sanitizeStoryContextUpdate } from '@storybook/store';
|
|
7
|
-
import './globals';
|
|
8
|
-
import { renderToDOM, storybookApp } from './render';
|
|
9
|
-
/*
|
|
10
|
-
This normalizes a functional component into a render method in ComponentOptions.
|
|
11
|
-
|
|
12
|
-
The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
|
|
13
|
-
method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
function normalizeFunctionalComponent(options) {
|
|
17
|
-
return typeof options === 'function' ? {
|
|
18
|
-
render: options,
|
|
19
|
-
name: options.name
|
|
20
|
-
} : options;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function prepare(rawStory, innerStory) {
|
|
24
|
-
var story = rawStory;
|
|
25
|
-
|
|
26
|
-
if (story == null) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (innerStory) {
|
|
31
|
-
return Object.assign({}, normalizeFunctionalComponent(story), {
|
|
32
|
-
components: Object.assign({}, story.components || {}, {
|
|
33
|
-
story: innerStory
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
render: function render() {
|
|
40
|
-
return h(story);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function decorateStory(storyFn, decorators) {
|
|
46
|
-
return decorators.reduce(function (decorated, decorator) {
|
|
47
|
-
return function (context) {
|
|
48
|
-
var story;
|
|
49
|
-
var decoratedStory = decorator(function (update) {
|
|
50
|
-
story = decorated(Object.assign({}, context, sanitizeStoryContextUpdate(update)));
|
|
51
|
-
return story;
|
|
52
|
-
}, context);
|
|
53
|
-
|
|
54
|
-
if (!story) {
|
|
55
|
-
story = decorated(context);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (decoratedStory === story) {
|
|
59
|
-
return story;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return prepare(decoratedStory, story);
|
|
63
|
-
};
|
|
64
|
-
}, function (context) {
|
|
65
|
-
return prepare(storyFn(context));
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
var framework = 'vue3';
|
|
70
|
-
var api = start(renderToDOM, {
|
|
71
|
-
decorateStory: decorateStory
|
|
72
|
-
});
|
|
73
|
-
export var storiesOf = function storiesOf(kind, m) {
|
|
74
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
75
|
-
framework: framework
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
export var configure = function configure() {
|
|
79
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
80
|
-
args[_key] = arguments[_key];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return api.configure.apply(api, [framework].concat(args));
|
|
84
|
-
};
|
|
85
|
-
var addDecorator = api.clientApi.addDecorator;
|
|
86
|
-
export { addDecorator };
|
|
87
|
-
var addParameters = api.clientApi.addParameters;
|
|
88
|
-
export { addParameters };
|
|
89
|
-
var clearDecorators = api.clientApi.clearDecorators;
|
|
90
|
-
export { clearDecorators };
|
|
91
|
-
var setAddon = api.clientApi.setAddon;
|
|
92
|
-
export { setAddon };
|
|
93
|
-
var forceReRender = api.forceReRender;
|
|
94
|
-
export { forceReRender };
|
|
95
|
-
var getStorybook = api.clientApi.getStorybook;
|
|
96
|
-
export { getStorybook };
|
|
97
|
-
var raw = api.clientApi.raw;
|
|
98
|
-
export { raw };
|
|
99
|
-
export var app = storybookApp;
|
|
100
|
-
export { activeStoryComponent } from './render';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
|
-
import "core-js/modules/es.function.name.js";
|
|
6
|
-
import "core-js/modules/es.array.concat.js";
|
|
7
|
-
import "core-js/modules/es.array.slice.js";
|
|
8
|
-
import "core-js/modules/es.object.freeze.js";
|
|
9
|
-
import dedent from 'ts-dedent';
|
|
10
|
-
import { createApp, h, shallowRef } from 'vue';
|
|
11
|
-
export var activeStoryComponent = shallowRef(null);
|
|
12
|
-
var root = null;
|
|
13
|
-
export var storybookApp = createApp({
|
|
14
|
-
// If an end-user calls `unmount` on the app, we need to clear our root variable
|
|
15
|
-
unmounted: function unmounted() {
|
|
16
|
-
root = null;
|
|
17
|
-
},
|
|
18
|
-
setup: function setup() {
|
|
19
|
-
return function () {
|
|
20
|
-
if (!activeStoryComponent.value) throw new Error('No Vue 3 Story available. Was it set correctly?');
|
|
21
|
-
return h(activeStoryComponent.value);
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
export function renderToDOM(_ref, domElement) {
|
|
26
|
-
var title = _ref.title,
|
|
27
|
-
name = _ref.name,
|
|
28
|
-
storyFn = _ref.storyFn,
|
|
29
|
-
showMain = _ref.showMain,
|
|
30
|
-
showError = _ref.showError,
|
|
31
|
-
showException = _ref.showException;
|
|
32
|
-
storybookApp.config.errorHandler = showException;
|
|
33
|
-
var element = storyFn();
|
|
34
|
-
|
|
35
|
-
if (!element) {
|
|
36
|
-
showError({
|
|
37
|
-
title: "Expecting a Vue component from the story: \"".concat(name, "\" of \"").concat(title, "\"."),
|
|
38
|
-
description: dedent(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Did you forget to return the Vue component from the story?\n Use \"() => ({ template: '<my-comp></my-comp>' })\" or \"() => ({ components: MyComp, template: '<my-comp></my-comp>' })\" when defining the story.\n "])))
|
|
39
|
-
});
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
showMain();
|
|
44
|
-
activeStoryComponent.value = element;
|
|
45
|
-
|
|
46
|
-
if (!root) {
|
|
47
|
-
root = storybookApp.mount(domElement);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/esm/server/build.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/esm/server/index.js
DELETED
package/dist/esm/typings.d.js
DELETED
|
File without changes
|
|
@@ -1,6 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import "core-js/modules/es.array.reduce.js";
|
|
2
|
-
import { h } from 'vue';
|
|
3
|
-
import { start } from '@storybook/core/client';
|
|
4
|
-
import { sanitizeStoryContextUpdate } from '@storybook/store';
|
|
5
|
-
import './globals';
|
|
6
|
-
import { renderToDOM, storybookApp } from './render';
|
|
7
|
-
/*
|
|
8
|
-
This normalizes a functional component into a render method in ComponentOptions.
|
|
9
|
-
|
|
10
|
-
The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
|
|
11
|
-
method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
function normalizeFunctionalComponent(options) {
|
|
15
|
-
return typeof options === 'function' ? {
|
|
16
|
-
render: options,
|
|
17
|
-
name: options.name
|
|
18
|
-
} : options;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function prepare(rawStory, innerStory) {
|
|
22
|
-
const story = rawStory;
|
|
23
|
-
|
|
24
|
-
if (story == null) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (innerStory) {
|
|
29
|
-
return Object.assign({}, normalizeFunctionalComponent(story), {
|
|
30
|
-
components: Object.assign({}, story.components || {}, {
|
|
31
|
-
story: innerStory
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
render() {
|
|
38
|
-
return h(story);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function decorateStory(storyFn, decorators) {
|
|
45
|
-
return decorators.reduce((decorated, decorator) => context => {
|
|
46
|
-
let story;
|
|
47
|
-
const decoratedStory = decorator(update => {
|
|
48
|
-
story = decorated(Object.assign({}, context, sanitizeStoryContextUpdate(update)));
|
|
49
|
-
return story;
|
|
50
|
-
}, context);
|
|
51
|
-
|
|
52
|
-
if (!story) {
|
|
53
|
-
story = decorated(context);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (decoratedStory === story) {
|
|
57
|
-
return story;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return prepare(decoratedStory, story);
|
|
61
|
-
}, context => prepare(storyFn(context)));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const framework = 'vue3';
|
|
65
|
-
const api = start(renderToDOM, {
|
|
66
|
-
decorateStory
|
|
67
|
-
});
|
|
68
|
-
export const storiesOf = (kind, m) => {
|
|
69
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
70
|
-
framework
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
export const configure = (...args) => api.configure(framework, ...args);
|
|
74
|
-
export const {
|
|
75
|
-
addDecorator
|
|
76
|
-
} = api.clientApi;
|
|
77
|
-
export const {
|
|
78
|
-
addParameters
|
|
79
|
-
} = api.clientApi;
|
|
80
|
-
export const {
|
|
81
|
-
clearDecorators
|
|
82
|
-
} = api.clientApi;
|
|
83
|
-
export const {
|
|
84
|
-
setAddon
|
|
85
|
-
} = api.clientApi;
|
|
86
|
-
export const {
|
|
87
|
-
forceReRender
|
|
88
|
-
} = api;
|
|
89
|
-
export const {
|
|
90
|
-
getStorybook
|
|
91
|
-
} = api.clientApi;
|
|
92
|
-
export const {
|
|
93
|
-
raw
|
|
94
|
-
} = api.clientApi;
|
|
95
|
-
export const app = storybookApp;
|
|
96
|
-
export { activeStoryComponent } from './render';
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/modern/typings.d.js
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { App } from 'vue';
|
|
4
|
-
import { DecoratorFunction } from '@storybook/csf';
|
|
5
|
-
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
6
|
-
import './globals';
|
|
7
|
-
import { IStorybookSection } from './types';
|
|
8
|
-
import { VueFramework } from './types-6-0';
|
|
9
|
-
interface ClientApi extends ClientStoryApi<VueFramework['storyResult']> {
|
|
10
|
-
setAddon(addon: any): void;
|
|
11
|
-
configure(loader: Loadable, module: NodeModule): void;
|
|
12
|
-
getStorybook(): IStorybookSection[];
|
|
13
|
-
clearDecorators(): void;
|
|
14
|
-
forceReRender(): void;
|
|
15
|
-
raw: () => any;
|
|
16
|
-
load: (...args: any[]) => void;
|
|
17
|
-
app: App;
|
|
18
|
-
}
|
|
19
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
|
20
|
-
export declare const configure: ClientApi['configure'];
|
|
21
|
-
export declare const addDecorator: (decorator: DecoratorFunction<VueFramework, import("@storybook/csf").Args>) => void;
|
|
22
|
-
export declare const addParameters: ({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
23
|
-
globals?: import("@storybook/csf").Globals;
|
|
24
|
-
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
25
|
-
}) => void;
|
|
26
|
-
export declare const clearDecorators: () => void;
|
|
27
|
-
export declare const setAddon: (addon: any) => void;
|
|
28
|
-
export declare const forceReRender: () => void;
|
|
29
|
-
export declare const getStorybook: () => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<VueFramework>[];
|
|
30
|
-
export declare const raw: () => import("@storybook/store").BoundStory<VueFramework>[];
|
|
31
|
-
export declare const app: ClientApi['app'];
|
|
32
|
-
export { activeStoryComponent } from './render';
|
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1,35 +0,0 @@
|
|
|
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>;
|
|
@@ -1,9 +0,0 @@
|
|
|
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>;
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { App } from 'vue';
|
|
4
|
-
import { DecoratorFunction } from '@storybook/csf';
|
|
5
|
-
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
6
|
-
import './globals';
|
|
7
|
-
import { IStorybookSection } from './types';
|
|
8
|
-
import { VueFramework } from './types-6-0';
|
|
9
|
-
interface ClientApi extends ClientStoryApi<VueFramework['storyResult']> {
|
|
10
|
-
setAddon(addon: any): void;
|
|
11
|
-
configure(loader: Loadable, module: NodeModule): void;
|
|
12
|
-
getStorybook(): IStorybookSection[];
|
|
13
|
-
clearDecorators(): void;
|
|
14
|
-
forceReRender(): void;
|
|
15
|
-
raw: () => any;
|
|
16
|
-
load: (...args: any[]) => void;
|
|
17
|
-
app: App;
|
|
18
|
-
}
|
|
19
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
|
20
|
-
export declare const configure: ClientApi['configure'];
|
|
21
|
-
export declare const addDecorator: (decorator: DecoratorFunction<VueFramework, import("@storybook/csf").Args>) => void;
|
|
22
|
-
export declare const addParameters: ({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
23
|
-
globals?: import("@storybook/csf").Globals;
|
|
24
|
-
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
25
|
-
}) => void;
|
|
26
|
-
export declare const clearDecorators: () => void;
|
|
27
|
-
export declare const setAddon: (addon: any) => void;
|
|
28
|
-
export declare const forceReRender: () => void;
|
|
29
|
-
export declare const getStorybook: () => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<VueFramework>[];
|
|
30
|
-
export declare const raw: () => import("@storybook/store").BoundStory<VueFramework>[];
|
|
31
|
-
export declare const app: ClientApi['app'];
|
|
32
|
-
export { activeStoryComponent } from './render';
|
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1,35 +0,0 @@
|
|
|
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>;
|
|
@@ -1,9 +0,0 @@
|
|
|
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>;
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|