@storybook/html 6.5.6 → 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 -25
- package/dist/cjs/config.js +44 -0
- package/dist/cjs/{client/docs → docs}/config.js +0 -0
- package/dist/cjs/{client/docs → docs}/prepareForInline.js +0 -0
- package/dist/cjs/{client/docs → docs}/sourceDecorator.js +3 -2
- package/dist/cjs/{client/index.js → index.js} +4 -3
- package/dist/cjs/{client/preview → preview}/config.js +1 -7
- 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/esm/config.js +6 -0
- package/dist/{modern/client → esm}/docs/config.js +0 -0
- package/dist/{modern/client → esm}/docs/prepareForInline.js +0 -0
- package/dist/esm/docs/sourceDecorator.js +51 -0
- package/dist/{modern/client → esm}/index.js +2 -4
- package/dist/esm/preview/config.js +1 -0
- 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 +0 -0
- 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/types/config.d.ts +13 -0
- package/dist/{ts3.9/client → types}/docs/config.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 +1 -1
- package/dist/{ts3.9/client → types}/index.d.ts +0 -0
- package/dist/types/preview/config.d.ts +1 -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/package.json +14 -37
- 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-html-docs.js +0 -17
- package/dist/cjs/server/framework-preset-html.js +0 -23
- 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 -14
- package/dist/esm/client/docs/prepareForInline.js +0 -19
- package/dist/esm/client/docs/sourceDecorator.js +0 -56
- 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 -3
- package/dist/esm/client/preview/index.js +0 -27
- package/dist/esm/client/preview/render.js +0 -42
- package/dist/esm/server/build.js +0 -3
- package/dist/esm/server/framework-preset-html-docs.js +0 -6
- package/dist/esm/server/framework-preset-html.js +0 -11
- 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/docs/sourceDecorator.js +0 -56
- package/dist/modern/client/preview/config.js +0 -4
- 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 -0
- package/dist/modern/server/build.js +0 -3
- package/dist/modern/server/framework-preset-html-docs.js +0 -6
- package/dist/modern/server/framework-preset-html.js +0 -11
- 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 -14
- package/dist/ts3.4/client/docs/prepareForInline.d.ts +0 -2
- package/dist/ts3.4/client/docs/sourceDecorator.d.ts +0 -3
- 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 -24
- package/dist/ts3.4/client/preview/render.d.ts +0 -3
- package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -34
- package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.4/client/preview/types.d.ts +0 -14
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/framework-preset-html-docs.d.ts +0 -2
- package/dist/ts3.4/server/framework-preset-html.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/client/preview/config.d.ts +0 -4
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/framework-preset-html-docs.d.ts +0 -2
- package/dist/ts3.9/server/framework-preset-html.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-7-0.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
# Storybook
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Storybook for HTML is a UI development environment for your plain HTML snippets.
|
|
6
|
-
With it, you can visualize different states of your UI components and develop them interactively.
|
|
7
|
-
|
|
8
|
-

|
|
9
|
-
|
|
10
|
-
Storybook runs outside of your app.
|
|
11
|
-
So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
|
|
12
|
-
|
|
13
|
-
## Getting Started
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
cd my-app
|
|
17
|
-
npx sb init -t html
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
For more information visit: [storybook.js.org](https://storybook.js.org)
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
|
|
25
|
-
You can also build a [static version](https://storybook.js.org/docs/html/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.
|
|
1
|
+
# Storybook HTML Renderer
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "decorators", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function get() {
|
|
19
|
+
return _config.decorators;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
exports.parameters = void 0;
|
|
23
|
+
|
|
24
|
+
require("core-js/modules/es.object.assign.js");
|
|
25
|
+
|
|
26
|
+
var _config = require("./docs/config");
|
|
27
|
+
|
|
28
|
+
var _config2 = require("./preview/config");
|
|
29
|
+
|
|
30
|
+
Object.keys(_config2).forEach(function (key) {
|
|
31
|
+
if (key === "default" || key === "__esModule") return;
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
33
|
+
if (key in exports && exports[key] === _config2[key]) return;
|
|
34
|
+
Object.defineProperty(exports, key, {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function get() {
|
|
37
|
+
return _config2[key];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
var parameters = Object.assign({
|
|
42
|
+
framework: 'html'
|
|
43
|
+
}, _config.parameters);
|
|
44
|
+
exports.parameters = parameters;
|
|
File without changes
|
|
File without changes
|
|
@@ -13,6 +13,8 @@ var _tsDedent = _interopRequireDefault(require("ts-dedent"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
/* eslint-disable no-underscore-dangle */
|
|
17
|
+
|
|
16
18
|
/* global window */
|
|
17
19
|
function skipSourceRender(context) {
|
|
18
20
|
var _context$parameters$d;
|
|
@@ -52,8 +54,7 @@ function sourceDecorator(storyFn, context) {
|
|
|
52
54
|
if (!skipSourceRender(context)) {
|
|
53
55
|
if (typeof story === 'string') {
|
|
54
56
|
source = story;
|
|
55
|
-
}
|
|
56
|
-
else if (story instanceof Element) {
|
|
57
|
+
} else if (story instanceof Element) {
|
|
57
58
|
source = story.outerHTML;
|
|
58
59
|
}
|
|
59
60
|
|
|
@@ -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();
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.parameters = void 0;
|
|
7
6
|
Object.defineProperty(exports, "renderToDOM", {
|
|
8
7
|
enumerable: true,
|
|
9
8
|
get: function get() {
|
|
@@ -11,9 +10,4 @@ Object.defineProperty(exports, "renderToDOM", {
|
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
var _render = require("./render");
|
|
15
|
-
|
|
16
|
-
var parameters = {
|
|
17
|
-
framework: 'html'
|
|
18
|
-
};
|
|
19
|
-
exports.parameters = parameters;
|
|
13
|
+
var _render = require("./render");
|
|
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
|
|
|
@@ -15,7 +15,7 @@ var _render = require("./render");
|
|
|
15
15
|
|
|
16
16
|
/* eslint-disable prefer-destructuring */
|
|
17
17
|
var framework = 'html';
|
|
18
|
-
var api = (0,
|
|
18
|
+
var api = (0, _coreClient.start)(_render.renderToDOM);
|
|
19
19
|
|
|
20
20
|
var storiesOf = function storiesOf(kind, m) {
|
|
21
21
|
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
|
2
|
+
|
|
3
|
+
/* global window */
|
|
4
|
+
import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools';
|
|
5
|
+
import { addons, useEffect } from '@storybook/addons';
|
|
6
|
+
import dedent from 'ts-dedent';
|
|
7
|
+
|
|
8
|
+
function skipSourceRender(context) {
|
|
9
|
+
const sourceParams = context?.parameters.docs?.source;
|
|
10
|
+
const isArgsStory = context?.parameters.__isArgsStory; // always render if the user forces it
|
|
11
|
+
|
|
12
|
+
if (sourceParams?.type === SourceType.DYNAMIC) {
|
|
13
|
+
return false;
|
|
14
|
+
} // never render if the user is forcing the block to render code, or
|
|
15
|
+
// if the user provides code, or if it's not an args story.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
return !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE;
|
|
19
|
+
} // By default, just remove indentation
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
function defaultTransformSource(source) {
|
|
23
|
+
// Have to wrap dedent so it doesn't serialize the context
|
|
24
|
+
return dedent(source);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function applyTransformSource(source, context) {
|
|
28
|
+
const docs = context.parameters.docs ?? {};
|
|
29
|
+
const transformSource = docs.transformSource ?? defaultTransformSource;
|
|
30
|
+
return transformSource(source, context);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function sourceDecorator(storyFn, context) {
|
|
34
|
+
const story = context?.parameters.docs?.source?.excludeDecorators ? context.originalStoryFn(context.args, context) : storyFn();
|
|
35
|
+
let source;
|
|
36
|
+
|
|
37
|
+
if (!skipSourceRender(context)) {
|
|
38
|
+
if (typeof story === 'string') {
|
|
39
|
+
source = story;
|
|
40
|
+
} else if (story instanceof Element) {
|
|
41
|
+
source = story.outerHTML;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (source) source = applyTransformSource(source, context);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (source) addons.getChannel().emit(SNIPPET_RENDERED, context.id, source);
|
|
49
|
+
});
|
|
50
|
+
return story;
|
|
51
|
+
}
|
|
@@ -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();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { renderToDOM } from './render';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const parameters: {
|
|
2
|
+
docs: {
|
|
3
|
+
inlineStories: boolean;
|
|
4
|
+
prepareForInline: typeof import("./docs/prepareForInline").prepareForInline;
|
|
5
|
+
source: {
|
|
6
|
+
type: import("lib/docs-tools/dist/types").SourceType;
|
|
7
|
+
language: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
framework: string;
|
|
11
|
+
};
|
|
12
|
+
export { decorators } from './docs/config';
|
|
13
|
+
export * from './preview/config';
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PartialStoryFn, StoryContext } from '@storybook/csf';
|
|
2
2
|
import type { HtmlFramework } from '..';
|
|
3
|
-
export declare function sourceDecorator(storyFn: PartialStoryFn<HtmlFramework>, context: StoryContext<HtmlFramework>):
|
|
3
|
+
export declare function sourceDecorator(storyFn: PartialStoryFn<HtmlFramework>, context: StoryContext<HtmlFramework>): import("../preview/types").StoryFnHtmlReturnType;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { renderToDOM } from './render';
|
|
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/html",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Storybook
|
|
3
|
+
"version": "7.0.0-alpha.0",
|
|
4
|
+
"description": "Storybook HTML 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/html",
|
|
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/html"
|
|
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,27 +32,18 @@
|
|
|
45
32
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
33
|
},
|
|
47
34
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "
|
|
49
|
-
"@storybook/core": "
|
|
50
|
-
"@storybook/core-common": "6.5.6",
|
|
35
|
+
"@storybook/addons": "7.0.0-alpha.0",
|
|
36
|
+
"@storybook/core-client": "7.0.0-alpha.0",
|
|
51
37
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
52
|
-
"@storybook/docs-tools": "
|
|
53
|
-
"@storybook/preview-web": "
|
|
54
|
-
"@storybook/store": "
|
|
55
|
-
"@types/node": "^14.14.20 || ^16.0.0",
|
|
56
|
-
"@types/webpack-env": "^1.16.0",
|
|
38
|
+
"@storybook/docs-tools": "7.0.0-alpha.0",
|
|
39
|
+
"@storybook/preview-web": "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
|
-
"html-loader": "^1.3.2",
|
|
60
43
|
"react": "16.14.0",
|
|
61
44
|
"react-dom": "16.14.0",
|
|
62
|
-
"read-pkg-up": "^7.0.1",
|
|
63
45
|
"regenerator-runtime": "^0.13.7",
|
|
64
|
-
"ts-dedent": "^2.0.0"
|
|
65
|
-
"webpack": ">=4.0.0 <6.0.0"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"webpack": "4"
|
|
46
|
+
"ts-dedent": "^2.0.0"
|
|
69
47
|
},
|
|
70
48
|
"peerDependencies": {
|
|
71
49
|
"@babel/core": "*"
|
|
@@ -76,6 +54,5 @@
|
|
|
76
54
|
"publishConfig": {
|
|
77
55
|
"access": "public"
|
|
78
56
|
},
|
|
79
|
-
"gitHead": "
|
|
80
|
-
"sbmodern": "dist/modern/client/index.js"
|
|
57
|
+
"gitHead": "c82d897ea765da8cf4fbbcc2af1f28c808a93e23"
|
|
81
58
|
}
|
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,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.previewAnnotations = void 0;
|
|
7
|
-
|
|
8
|
-
var _coreCommon = require("@storybook/core-common");
|
|
9
|
-
|
|
10
|
-
var _docsTools = require("@storybook/docs-tools");
|
|
11
|
-
|
|
12
|
-
var previewAnnotations = function (entry = [], options) {
|
|
13
|
-
if (!(0, _docsTools.hasDocsOrControls)(options)) return entry;
|
|
14
|
-
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/docs/config')];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
exports.previewAnnotations = previewAnnotations;
|
|
@@ -1,23 +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
|
-
var _coreCommon = require("@storybook/core-common");
|
|
10
|
-
|
|
11
|
-
function webpack(config) {
|
|
12
|
-
config.module.rules.push({
|
|
13
|
-
test: /\.html$/,
|
|
14
|
-
use: require.resolve('html-loader')
|
|
15
|
-
});
|
|
16
|
-
return config;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var previewAnnotations = function (entry = []) {
|
|
20
|
-
return [...entry, (0, _coreCommon.findDistEsm)(__dirname, 'client/preview/config')];
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
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);
|
|
@@ -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: 'html',
|
|
15
|
-
frameworkPresets: [require.resolve('./preset')]
|
|
16
|
-
};
|
|
17
|
-
exports.default = _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SourceType } from '@storybook/docs-tools';
|
|
2
|
-
import { sourceDecorator } from './sourceDecorator';
|
|
3
|
-
import { prepareForInline } from './prepareForInline';
|
|
4
|
-
export var decorators = [sourceDecorator];
|
|
5
|
-
export var parameters = {
|
|
6
|
-
docs: {
|
|
7
|
-
inlineStories: true,
|
|
8
|
-
prepareForInline: prepareForInline,
|
|
9
|
-
source: {
|
|
10
|
-
type: SourceType.DYNAMIC,
|
|
11
|
-
language: 'html'
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export function prepareForInline(storyFn) {
|
|
3
|
-
var html = storyFn();
|
|
4
|
-
|
|
5
|
-
if (typeof html === 'string') {
|
|
6
|
-
// eslint-disable-next-line react/no-danger
|
|
7
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
-
dangerouslySetInnerHTML: {
|
|
9
|
-
__html: html
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
-
ref: function ref(node) {
|
|
16
|
-
return node ? node.appendChild(html) : null;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/* global window */
|
|
2
|
-
import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools';
|
|
3
|
-
import { addons, useEffect } from '@storybook/addons';
|
|
4
|
-
import dedent from 'ts-dedent';
|
|
5
|
-
|
|
6
|
-
function skipSourceRender(context) {
|
|
7
|
-
var _context$parameters$d;
|
|
8
|
-
|
|
9
|
-
var sourceParams = context === null || context === void 0 ? void 0 : (_context$parameters$d = context.parameters.docs) === null || _context$parameters$d === void 0 ? void 0 : _context$parameters$d.source;
|
|
10
|
-
var isArgsStory = context === null || context === void 0 ? void 0 : context.parameters.__isArgsStory; // always render if the user forces it
|
|
11
|
-
|
|
12
|
-
if ((sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === SourceType.DYNAMIC) {
|
|
13
|
-
return false;
|
|
14
|
-
} // never render if the user is forcing the block to render code, or
|
|
15
|
-
// if the user provides code, or if it's not an args story.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return !isArgsStory || (sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.code) || (sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === SourceType.CODE;
|
|
19
|
-
} // By default, just remove indentation
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function defaultTransformSource(source) {
|
|
23
|
-
// Have to wrap dedent so it doesn't serialize the context
|
|
24
|
-
return dedent(source);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function applyTransformSource(source, context) {
|
|
28
|
-
var _context$parameters$d2, _docs$transformSource;
|
|
29
|
-
|
|
30
|
-
var docs = (_context$parameters$d2 = context.parameters.docs) !== null && _context$parameters$d2 !== void 0 ? _context$parameters$d2 : {};
|
|
31
|
-
var transformSource = (_docs$transformSource = docs.transformSource) !== null && _docs$transformSource !== void 0 ? _docs$transformSource : defaultTransformSource;
|
|
32
|
-
return transformSource(source, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function sourceDecorator(storyFn, context) {
|
|
36
|
-
var _context$parameters$d3, _context$parameters$d4;
|
|
37
|
-
|
|
38
|
-
var story = context !== null && context !== void 0 && (_context$parameters$d3 = context.parameters.docs) !== null && _context$parameters$d3 !== void 0 && (_context$parameters$d4 = _context$parameters$d3.source) !== null && _context$parameters$d4 !== void 0 && _context$parameters$d4.excludeDecorators ? context.originalStoryFn(context.args, context) : storyFn();
|
|
39
|
-
var source;
|
|
40
|
-
|
|
41
|
-
if (!skipSourceRender(context)) {
|
|
42
|
-
if (typeof story === 'string') {
|
|
43
|
-
source = story;
|
|
44
|
-
} // eslint-disable-next-line no-undef
|
|
45
|
-
else if (story instanceof Element) {
|
|
46
|
-
source = story.outerHTML;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (source) source = applyTransformSource(source, context);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
useEffect(function () {
|
|
53
|
-
if (source) addons.getChannel().emit(SNIPPET_RENDERED, context.id, source);
|
|
54
|
-
});
|
|
55
|
-
return story;
|
|
56
|
-
}
|
package/dist/esm/client/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat.js";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable prefer-destructuring */
|
|
4
|
-
import { start } from '@storybook/core';
|
|
5
|
-
import './globals';
|
|
6
|
-
import { renderToDOM } from './render';
|
|
7
|
-
var framework = 'html';
|
|
8
|
-
var api = start(renderToDOM);
|
|
9
|
-
export var storiesOf = function storiesOf(kind, m) {
|
|
10
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
11
|
-
framework: framework
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
export var configure = function configure() {
|
|
15
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
-
args[_key] = arguments[_key];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return api.configure.apply(api, [framework].concat(args));
|
|
20
|
-
};
|
|
21
|
-
export var addDecorator = api.clientApi.addDecorator;
|
|
22
|
-
export var addParameters = api.clientApi.addParameters;
|
|
23
|
-
export var clearDecorators = api.clientApi.clearDecorators;
|
|
24
|
-
export var setAddon = api.clientApi.setAddon;
|
|
25
|
-
export var forceReRender = api.forceReRender;
|
|
26
|
-
export var getStorybook = api.clientApi.getStorybook;
|
|
27
|
-
export var raw = api.clientApi.raw;
|
|
@@ -1,42 +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
|
-
|
|
10
|
-
/* eslint-disable no-param-reassign */
|
|
11
|
-
import global from 'global';
|
|
12
|
-
import dedent from 'ts-dedent';
|
|
13
|
-
import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-web';
|
|
14
|
-
var Node = global.Node;
|
|
15
|
-
export function renderToDOM(_ref, domElement) {
|
|
16
|
-
var storyFn = _ref.storyFn,
|
|
17
|
-
kind = _ref.kind,
|
|
18
|
-
name = _ref.name,
|
|
19
|
-
showMain = _ref.showMain,
|
|
20
|
-
showError = _ref.showError,
|
|
21
|
-
forceRemount = _ref.forceRemount;
|
|
22
|
-
var element = storyFn();
|
|
23
|
-
showMain();
|
|
24
|
-
|
|
25
|
-
if (typeof element === 'string') {
|
|
26
|
-
domElement.innerHTML = element;
|
|
27
|
-
simulatePageLoad(domElement);
|
|
28
|
-
} else if (element instanceof Node) {
|
|
29
|
-
if (domElement.firstChild === element && forceRemount === false) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
domElement.innerHTML = '';
|
|
34
|
-
domElement.appendChild(element);
|
|
35
|
-
simulateDOMContentLoaded();
|
|
36
|
-
} else {
|
|
37
|
-
showError({
|
|
38
|
-
title: "Expecting an HTML snippet or DOM node from the story: \"".concat(name, "\" of \"").concat(kind, "\"."),
|
|
39
|
-
description: dedent(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Did you forget to return the HTML snippet from the story?\n Use \"() => <your snippet or node>\" or when defining the story.\n "])))
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
package/dist/esm/server/build.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { findDistEsm } from '@storybook/core-common';
|
|
2
|
-
import { hasDocsOrControls } from '@storybook/docs-tools';
|
|
3
|
-
export var previewAnnotations = function (entry = [], options) {
|
|
4
|
-
if (!hasDocsOrControls(options)) return entry;
|
|
5
|
-
return [...entry, findDistEsm(__dirname, 'client/docs/config')];
|
|
6
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { findDistEsm } from '@storybook/core-common';
|
|
2
|
-
export function webpack(config) {
|
|
3
|
-
config.module.rules.push({
|
|
4
|
-
test: /\.html$/,
|
|
5
|
-
use: require.resolve('html-loader')
|
|
6
|
-
});
|
|
7
|
-
return config;
|
|
8
|
-
}
|
|
9
|
-
export var previewAnnotations = function (entry = []) {
|
|
10
|
-
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
|
11
|
-
};
|
package/dist/esm/server/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export var addons = [require.resolve('./framework-preset-html'), require.resolve('./framework-preset-html-docs')];
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/* global window */
|
|
2
|
-
import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools';
|
|
3
|
-
import { addons, useEffect } from '@storybook/addons';
|
|
4
|
-
import dedent from 'ts-dedent';
|
|
5
|
-
|
|
6
|
-
function skipSourceRender(context) {
|
|
7
|
-
var _context$parameters$d;
|
|
8
|
-
|
|
9
|
-
const sourceParams = context === null || context === void 0 ? void 0 : (_context$parameters$d = context.parameters.docs) === null || _context$parameters$d === void 0 ? void 0 : _context$parameters$d.source;
|
|
10
|
-
const isArgsStory = context === null || context === void 0 ? void 0 : context.parameters.__isArgsStory; // always render if the user forces it
|
|
11
|
-
|
|
12
|
-
if ((sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === SourceType.DYNAMIC) {
|
|
13
|
-
return false;
|
|
14
|
-
} // never render if the user is forcing the block to render code, or
|
|
15
|
-
// if the user provides code, or if it's not an args story.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return !isArgsStory || (sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.code) || (sourceParams === null || sourceParams === void 0 ? void 0 : sourceParams.type) === SourceType.CODE;
|
|
19
|
-
} // By default, just remove indentation
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function defaultTransformSource(source) {
|
|
23
|
-
// Have to wrap dedent so it doesn't serialize the context
|
|
24
|
-
return dedent(source);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function applyTransformSource(source, context) {
|
|
28
|
-
var _context$parameters$d2, _docs$transformSource;
|
|
29
|
-
|
|
30
|
-
const docs = (_context$parameters$d2 = context.parameters.docs) !== null && _context$parameters$d2 !== void 0 ? _context$parameters$d2 : {};
|
|
31
|
-
const transformSource = (_docs$transformSource = docs.transformSource) !== null && _docs$transformSource !== void 0 ? _docs$transformSource : defaultTransformSource;
|
|
32
|
-
return transformSource(source, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function sourceDecorator(storyFn, context) {
|
|
36
|
-
var _context$parameters$d3, _context$parameters$d4;
|
|
37
|
-
|
|
38
|
-
const story = context !== null && context !== void 0 && (_context$parameters$d3 = context.parameters.docs) !== null && _context$parameters$d3 !== void 0 && (_context$parameters$d4 = _context$parameters$d3.source) !== null && _context$parameters$d4 !== void 0 && _context$parameters$d4.excludeDecorators ? context.originalStoryFn(context.args, context) : storyFn();
|
|
39
|
-
let source;
|
|
40
|
-
|
|
41
|
-
if (!skipSourceRender(context)) {
|
|
42
|
-
if (typeof story === 'string') {
|
|
43
|
-
source = story;
|
|
44
|
-
} // eslint-disable-next-line no-undef
|
|
45
|
-
else if (story instanceof Element) {
|
|
46
|
-
source = story.outerHTML;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (source) source = applyTransformSource(source, context);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (source) addons.getChannel().emit(SNIPPET_RENDERED, context.id, source);
|
|
54
|
-
});
|
|
55
|
-
return story;
|
|
56
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { findDistEsm } from '@storybook/core-common';
|
|
2
|
-
import { hasDocsOrControls } from '@storybook/docs-tools';
|
|
3
|
-
export var previewAnnotations = function (entry = [], options) {
|
|
4
|
-
if (!hasDocsOrControls(options)) return entry;
|
|
5
|
-
return [...entry, findDistEsm(__dirname, 'client/docs/config')];
|
|
6
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { findDistEsm } from '@storybook/core-common';
|
|
2
|
-
export function webpack(config) {
|
|
3
|
-
config.module.rules.push({
|
|
4
|
-
test: /\.html$/,
|
|
5
|
-
use: require.resolve('html-loader')
|
|
6
|
-
});
|
|
7
|
-
return config;
|
|
8
|
-
}
|
|
9
|
-
export var previewAnnotations = function (entry = []) {
|
|
10
|
-
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export var addons = [require.resolve('./framework-preset-html'), require.resolve('./framework-preset-html-docs')];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SourceType } from '@storybook/docs-tools';
|
|
2
|
-
import { sourceDecorator } from './sourceDecorator';
|
|
3
|
-
import { prepareForInline } from './prepareForInline';
|
|
4
|
-
export declare const decorators: (typeof sourceDecorator)[];
|
|
5
|
-
export declare const parameters: {
|
|
6
|
-
docs: {
|
|
7
|
-
inlineStories: boolean;
|
|
8
|
-
prepareForInline: typeof prepareForInline;
|
|
9
|
-
source: {
|
|
10
|
-
type: SourceType;
|
|
11
|
-
language: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
|
-
import { HtmlFramework } from './types-6-0';
|
|
5
|
-
import './globals';
|
|
6
|
-
import { IStorybookSection } from './types';
|
|
7
|
-
interface ClientApi extends ClientStoryApi<HtmlFramework['storyResult']> {
|
|
8
|
-
setAddon(addon: any): void;
|
|
9
|
-
configure(loader: Loadable, module: NodeModule): void;
|
|
10
|
-
getStorybook(): IStorybookSection[];
|
|
11
|
-
clearDecorators(): void;
|
|
12
|
-
forceReRender(): void;
|
|
13
|
-
raw: () => any;
|
|
14
|
-
}
|
|
15
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
|
16
|
-
export declare const configure: ClientApi['configure'];
|
|
17
|
-
export declare const addDecorator: ClientApi['addDecorator'];
|
|
18
|
-
export declare const addParameters: ClientApi['addParameters'];
|
|
19
|
-
export declare const clearDecorators: ClientApi['clearDecorators'];
|
|
20
|
-
export declare const setAddon: ClientApi['setAddon'];
|
|
21
|
-
export declare const forceReRender: ClientApi['forceReRender'];
|
|
22
|
-
export declare const getStorybook: ClientApi['getStorybook'];
|
|
23
|
-
export declare const raw: ClientApi['raw'];
|
|
24
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
|
2
|
-
import { StoryFnHtmlReturnType } from './types';
|
|
3
|
-
export { Args, ArgTypes, Parameters, StoryContext } from '@storybook/addons';
|
|
4
|
-
export declare type HtmlFramework = {
|
|
5
|
-
component: HTMLElement;
|
|
6
|
-
storyResult: StoryFnHtmlReturnType;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Metadata to configure the stories for a component.
|
|
10
|
-
*
|
|
11
|
-
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
|
12
|
-
*/
|
|
13
|
-
export declare type Meta<TArgs = Args> = ComponentAnnotations<HtmlFramework, TArgs>;
|
|
14
|
-
/**
|
|
15
|
-
* Story function that represents a CSFv2 component example.
|
|
16
|
-
*
|
|
17
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
18
|
-
*/
|
|
19
|
-
export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<HtmlFramework, TArgs>;
|
|
20
|
-
/**
|
|
21
|
-
* Story function that represents a CSFv3 component example.
|
|
22
|
-
*
|
|
23
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
24
|
-
*/
|
|
25
|
-
export declare type StoryObj<TArgs = Args> = StoryAnnotations<HtmlFramework, TArgs>;
|
|
26
|
-
/**
|
|
27
|
-
* Story function that represents a CSFv2 component example.
|
|
28
|
-
*
|
|
29
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
30
|
-
*
|
|
31
|
-
* NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
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,14 +0,0 @@
|
|
|
1
|
-
export { RenderContext } from '@storybook/core';
|
|
2
|
-
export declare type StoryFnHtmlReturnType = string | Node;
|
|
3
|
-
export interface IStorybookStory {
|
|
4
|
-
name: string;
|
|
5
|
-
render: (context: any) => any;
|
|
6
|
-
}
|
|
7
|
-
export interface IStorybookSection {
|
|
8
|
-
kind: string;
|
|
9
|
-
stories: IStorybookStory[];
|
|
10
|
-
}
|
|
11
|
-
export interface ShowErrorArgs {
|
|
12
|
-
title: string;
|
|
13
|
-
description: string;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/preset.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/cjs/server/preset');
|
package/standalone.js
DELETED
package/types-7-0.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/ts3.9/client/preview/types-7-0.d';
|