@storybook/addon-docs 11.0.0-alpha.0 → 11.0.0-alpha.2
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-6AOWCN3U.js → Color-A4XNZHQV.js} +7 -4
- package/dist/_browser-chunks/{DocsRenderer-JROSPFPF.js → DocsRenderer-VNB4F7I7.js} +1 -1
- package/dist/_browser-chunks/{chunk-QQBDHPVZ.js → chunk-B2IUWPZU.js} +6 -0
- package/dist/_browser-chunks/chunk-RVCCNNTU.js +89 -0
- package/dist/_browser-chunks/{chunk-6Z2O5XYJ.js → chunk-ZZLJPRGX.js} +2 -5
- package/dist/_node-chunks/{chunk-UXVLH5AH.js → chunk-2Q45WLPZ.js} +9 -9
- package/dist/_node-chunks/{chunk-VG3YIRNF.js → chunk-2YPEJ6EQ.js} +6 -6
- package/dist/_node-chunks/{chunk-ZGTW6W5S.js → chunk-6VP3EV2G.js} +6 -6
- package/dist/_node-chunks/{chunk-UCV7E4ZH.js → chunk-UE7X3WJM.js} +6 -6
- package/dist/_node-chunks/{mdx-plugin-KQRQVSRB.js → mdx-plugin-MTO7TWGY.js} +62 -45
- package/dist/_node-chunks/{rehype-external-links-PYECXO2P.js → rehype-external-links-EQSZIJFI.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-HVM5V4P3.js → rehype-slug-GWIK5YYT.js} +8 -8
- package/dist/blocks.d.ts +0 -1
- package/dist/blocks.js +85 -321
- package/dist/csf-plugin/webpack-loader.js +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/manager.js +1 -14
- package/dist/mdx-loader.js +10 -10
- package/dist/preset.js +1205 -16
- package/dist/preview.js +1 -1
- package/package.json +7 -7
- package/dist/_browser-chunks/chunk-OATZR77O.js +0 -52
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9a2nz3w9v1n from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9a2nz3w9v1n from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9a2nz3w9v1n from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9a2nz3w9v1n.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9a2nz3w9v1n.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9a2nz3w9v1n.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-UE7X3WJM.js";
|
|
13
13
|
|
|
14
14
|
// src/csf-plugin/webpack-loader.ts
|
|
15
15
|
import { readFile } from "node:fs/promises";
|
|
16
16
|
import { enrichCsf, formatCsf, loadCsf } from "storybook/internal/csf-tools";
|
|
17
17
|
import { logger } from "storybook/internal/node-logger";
|
|
18
18
|
async function loader(content, map) {
|
|
19
|
-
let callback = this.async(), options = this.getOptions(), id = this.resourcePath
|
|
19
|
+
let callback = this.async(), options = this.getOptions(), id = this.resourcePath;
|
|
20
20
|
try {
|
|
21
|
-
let makeTitle = (userTitle) => userTitle || "default", csf = loadCsf(content, { makeTitle }).parse(), csfSource = loadCsf(sourceCode, { makeTitle }).parse();
|
|
21
|
+
let sourceCode = await readFile(id, "utf-8"), makeTitle = (userTitle) => userTitle || "default", csf = loadCsf(content, { makeTitle }).parse(), csfSource = loadCsf(sourceCode, { makeTitle }).parse();
|
|
22
22
|
await enrichCsf(csf, csfSource, options);
|
|
23
23
|
let formattedCsf = formatCsf(
|
|
24
24
|
csf,
|
package/dist/index.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ interface DocsParameters {
|
|
|
128
128
|
*/
|
|
129
129
|
canvas?: Partial<CanvasBlockParameters>;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Show the Code panel by default. Set to `false` to hide it.
|
|
132
132
|
*
|
|
133
133
|
* @see https://storybook.js.org/docs/writing-docs/code-panel
|
|
134
134
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DocsRenderer
|
|
3
|
-
} from "./_browser-chunks/chunk-
|
|
3
|
+
} from "./_browser-chunks/chunk-RVCCNNTU.js";
|
|
4
4
|
import {
|
|
5
5
|
preview_exports
|
|
6
|
-
} from "./_browser-chunks/chunk-
|
|
6
|
+
} from "./_browser-chunks/chunk-ZZLJPRGX.js";
|
|
7
7
|
import "./_browser-chunks/chunk-UAWMPV5J.js";
|
|
8
8
|
|
|
9
9
|
// src/index.ts
|
package/dist/manager.js
CHANGED
|
@@ -53,20 +53,7 @@ addons.register(ADDON_ID, (api) => {
|
|
|
53
53
|
title: "Code",
|
|
54
54
|
type: types.PANEL,
|
|
55
55
|
paramKey: PARAM_KEY,
|
|
56
|
-
|
|
57
|
-
* This code panel can be enabled by adding this parameter:
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
*
|
|
61
|
-
* ```ts
|
|
62
|
-
* parameters: {
|
|
63
|
-
* docs: {
|
|
64
|
-
* codePanel: true,
|
|
65
|
-
* },
|
|
66
|
-
* },
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
disabled: (parameters) => !parameters?.docs?.codePanel,
|
|
56
|
+
disabled: (parameters) => parameters?.docs?.codePanel === !1,
|
|
70
57
|
match: ({ viewMode }) => viewMode === "story",
|
|
71
58
|
render: ({ active }) => {
|
|
72
59
|
let channel = api.getChannel(), currentStory = api.getCurrentStoryData(), lastEvent = channel?.last(SNIPPET_RENDERED)?.[0];
|
package/dist/mdx-loader.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9a2nz3w9v1n from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9a2nz3w9v1n from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9a2nz3w9v1n from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9a2nz3w9v1n.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9a2nz3w9v1n.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9a2nz3w9v1n.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
compile
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
16
|
-
import "./_node-chunks/chunk-
|
|
17
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-2Q45WLPZ.js";
|
|
15
|
+
import "./_node-chunks/chunk-6VP3EV2G.js";
|
|
16
|
+
import "./_node-chunks/chunk-2YPEJ6EQ.js";
|
|
17
|
+
import "./_node-chunks/chunk-UE7X3WJM.js";
|
|
18
18
|
|
|
19
19
|
// src/mdx-loader.ts
|
|
20
20
|
var DEFAULT_RENDERER = `
|