@storybook/addon-docs 10.1.0-alpha.9 → 10.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/Color-S5NAVK5F.js +1096 -0
- package/dist/_browser-chunks/{DocsRenderer-HT7GNKAR.js → DocsRenderer-GHJI37HO.js} +2 -2
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-CYSK6WYR.js +7 -0
- package/dist/_browser-chunks/chunk-DDRHE7EB.js +949 -0
- package/dist/_browser-chunks/{chunk-74ZUTOZN.js → chunk-OATZR77O.js} +9 -22
- package/dist/_browser-chunks/chunk-UUESKCKV.js +31 -0
- package/dist/_node-chunks/chunk-2A5U5ANW.js +22630 -0
- package/dist/_node-chunks/{chunk-D527LDYX.js → chunk-3AUFNFUR.js} +13 -19
- package/dist/_node-chunks/chunk-EX6XKYQU.js +196 -0
- package/dist/_node-chunks/chunk-Q4AUMUWJ.js +168 -0
- package/dist/_node-chunks/mdx-plugin-6YABNLL4.js +1032 -0
- package/dist/_node-chunks/rehype-external-links-FLP6Q4I3.js +121 -0
- package/dist/_node-chunks/{rehype-slug-NIZ5EZAF.js → rehype-slug-PEZLUBRN.js} +24 -58
- package/dist/angular/index.js +3 -5
- package/dist/blocks.d.ts +5 -2
- package/dist/blocks.js +4658 -6651
- package/dist/ember/index.js +3 -5
- package/dist/index.js +4 -6
- package/dist/manager.js +11 -22
- package/dist/mdx-loader.js +13 -19
- package/dist/preset.js +160 -453
- package/dist/preview.js +2 -2
- package/package.json +6 -6
- package/dist/_browser-chunks/Color-64QXVMR3.js +0 -1675
- package/dist/_browser-chunks/chunk-DMNQCVA2.js +0 -12
- package/dist/_browser-chunks/chunk-UZFOWTVP.js +0 -974
- package/dist/_browser-chunks/chunk-YDZYZRYC.js +0 -39
- package/dist/_node-chunks/chunk-45YQE7PZ.js +0 -36332
- package/dist/_node-chunks/chunk-BBLOWQ3W.js +0 -231
- package/dist/_node-chunks/chunk-P7HMFQCU.js +0 -248
- package/dist/_node-chunks/mdx-plugin-36DJJXJE.js +0 -1654
- package/dist/_node-chunks/rehype-external-links-AGP76D2N.js +0 -168
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-MM7DTO55.js";
|
|
4
|
-
|
|
5
1
|
// src/DocsRenderer.tsx
|
|
6
2
|
import React, { Component } from "react";
|
|
7
3
|
import { renderElement, unmountElement } from "@storybook/react-dom-shim";
|
|
@@ -10,35 +6,29 @@ var defaultComponents = {
|
|
|
10
6
|
code: CodeOrSourceMdx,
|
|
11
7
|
a: AnchorMdx,
|
|
12
8
|
...HeadersMdx
|
|
13
|
-
}
|
|
14
|
-
var _ErrorBoundary = class _ErrorBoundary extends Component {
|
|
9
|
+
}, ErrorBoundary = class extends Component {
|
|
15
10
|
constructor() {
|
|
16
11
|
super(...arguments);
|
|
17
|
-
this.state = { hasError:
|
|
12
|
+
this.state = { hasError: !1 };
|
|
18
13
|
}
|
|
19
14
|
static getDerivedStateFromError() {
|
|
20
|
-
return { hasError:
|
|
15
|
+
return { hasError: !0 };
|
|
21
16
|
}
|
|
22
17
|
componentDidCatch(err) {
|
|
23
|
-
|
|
18
|
+
let { showException } = this.props;
|
|
24
19
|
showException(err);
|
|
25
20
|
}
|
|
26
21
|
render() {
|
|
27
|
-
|
|
28
|
-
const { children } = this.props;
|
|
22
|
+
let { hasError } = this.state, { children } = this.props;
|
|
29
23
|
return hasError ? null : React.createElement(React.Fragment, null, children);
|
|
30
24
|
}
|
|
31
|
-
}
|
|
32
|
-
__name(_ErrorBoundary, "ErrorBoundary");
|
|
33
|
-
var ErrorBoundary = _ErrorBoundary;
|
|
34
|
-
var _DocsRenderer = class _DocsRenderer {
|
|
25
|
+
}, DocsRenderer = class {
|
|
35
26
|
constructor() {
|
|
36
27
|
this.render = async (context, docsParameter, element) => {
|
|
37
|
-
|
|
28
|
+
let components = {
|
|
38
29
|
...defaultComponents,
|
|
39
30
|
...docsParameter?.components
|
|
40
|
-
};
|
|
41
|
-
const TDocs = Docs;
|
|
31
|
+
}, TDocs = Docs;
|
|
42
32
|
return new Promise((resolve, reject) => {
|
|
43
33
|
import("@mdx-js/react").then(
|
|
44
34
|
({ MDXProvider }) => (
|
|
@@ -50,14 +40,11 @@ var _DocsRenderer = class _DocsRenderer {
|
|
|
50
40
|
)
|
|
51
41
|
).then(() => resolve());
|
|
52
42
|
});
|
|
53
|
-
}
|
|
54
|
-
this.unmount = (element) => {
|
|
43
|
+
}, this.unmount = (element) => {
|
|
55
44
|
unmountElement(element);
|
|
56
45
|
};
|
|
57
46
|
}
|
|
58
47
|
};
|
|
59
|
-
__name(_DocsRenderer, "DocsRenderer");
|
|
60
|
-
var DocsRenderer = _DocsRenderer;
|
|
61
48
|
|
|
62
49
|
export {
|
|
63
50
|
defaultComponents,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-A242L54C.js";
|
|
4
|
+
|
|
5
|
+
// src/preview.ts
|
|
6
|
+
var preview_exports = {};
|
|
7
|
+
__export(preview_exports, {
|
|
8
|
+
parameters: () => parameters
|
|
9
|
+
});
|
|
10
|
+
var excludeTags = Object.entries(globalThis.TAGS_OPTIONS ?? {}).reduce(
|
|
11
|
+
(acc, entry) => {
|
|
12
|
+
let [tag, option] = entry;
|
|
13
|
+
return option.excludeFromDocsStories && (acc[tag] = !0), acc;
|
|
14
|
+
},
|
|
15
|
+
{}
|
|
16
|
+
), parameters = {
|
|
17
|
+
docs: {
|
|
18
|
+
renderer: async () => {
|
|
19
|
+
let { DocsRenderer } = await import("./DocsRenderer-GHJI37HO.js");
|
|
20
|
+
return new DocsRenderer();
|
|
21
|
+
},
|
|
22
|
+
stories: {
|
|
23
|
+
filter: (story) => (story.tags || []).filter((tag) => excludeTags[tag]).length === 0 && !story.parameters.docs?.disable
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
parameters,
|
|
30
|
+
preview_exports
|
|
31
|
+
};
|