@storybook/addon-docs 10.1.0-alpha.0 → 10.1.0-alpha.10

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as storybook_internal_csf from 'storybook/internal/csf';
2
- import { ReactElement, ComponentType } from 'react';
2
+ import React$1, { ReactElement, ComponentType } from 'react';
3
3
  import { Renderer, DocsContextProps, ModuleExport, ModuleExports, DocsRenderFunction } from 'storybook/internal/types';
4
4
  import { ThemeVars } from 'storybook/theming';
5
5
 
@@ -260,6 +260,13 @@ declare class DocsRenderer<TRenderer extends Renderer> {
260
260
  constructor();
261
261
  }
262
262
 
263
+ declare module 'mdx/types' {
264
+ namespace JSX {
265
+ type Element = React$1.JSX.Element;
266
+ type ElementClass = React$1.JSX.ElementClass;
267
+ type IntrinsicElements = React$1.JSX.IntrinsicElements;
268
+ }
269
+ }
263
270
  declare const _default: () => storybook_internal_csf.PreviewAddon<DocsTypes>;
264
271
 
265
272
  export { DocsRenderer, type DocsTypes, _default as default };
@@ -1,22 +1,22 @@
1
- import CJS_COMPAT_NODE_URL_8sby45j795w from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sby45j795w from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sby45j795w from "node:module";
1
+ import CJS_COMPAT_NODE_URL_l24grcih83q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_l24grcih83q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_l24grcih83q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sby45j795w.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sby45j795w.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sby45j795w.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_l24grcih83q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_l24grcih83q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_l24grcih83q.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-XMVLLNR7.js";
15
- import "./_node-chunks/chunk-4LVHVX3D.js";
16
- import "./_node-chunks/chunk-E3J6JQCF.js";
14
+ } from "./_node-chunks/chunk-BHIBLL2L.js";
15
+ import "./_node-chunks/chunk-RAVRMRBT.js";
16
+ import "./_node-chunks/chunk-TSMODHW2.js";
17
17
  import {
18
18
  __name
19
- } from "./_node-chunks/chunk-BL66IPQI.js";
19
+ } from "./_node-chunks/chunk-AAP3IT42.js";
20
20
 
21
21
  // src/mdx-loader.ts
22
22
  var DEFAULT_RENDERER = `
package/dist/preset.js CHANGED
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_8sby45j795w from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sby45j795w from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sby45j795w from "node:module";
1
+ import CJS_COMPAT_NODE_URL_l24grcih83q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_l24grcih83q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_l24grcih83q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sby45j795w.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sby45j795w.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sby45j795w.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_l24grcih83q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_l24grcih83q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_l24grcih83q.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
  __name
14
- } from "./_node-chunks/chunk-BL66IPQI.js";
14
+ } from "./_node-chunks/chunk-AAP3IT42.js";
15
15
 
16
16
  // src/preset.ts
17
17
  import { isAbsolute as isAbsolute2 } from "node:path";
@@ -492,8 +492,9 @@ var getResolvedReact = /* @__PURE__ */ __name(async (options) => {
492
492
  async function webpack(webpackConfig = {}, options) {
493
493
  const { module = {} } = webpackConfig;
494
494
  const { csfPluginOptions = {}, mdxPluginOptions = {} } = options;
495
- const rehypeSlug = (await import("./_node-chunks/rehype-slug-RVUKNUY4.js")).default;
496
- const rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-YKLUDWIS.js")).default;
495
+ const enrichCsf = await options.presets.apply("experimental_enrichCsf");
496
+ const rehypeSlug = (await import("./_node-chunks/rehype-slug-NPV5OLTF.js")).default;
497
+ const rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-32F3YIMH.js")).default;
497
498
  const mdxLoaderOptions = await options.presets.apply("mdxLoaderOptions", {
498
499
  ...mdxPluginOptions,
499
500
  mdxCompileOptions: {
@@ -537,7 +538,12 @@ async function webpack(webpackConfig = {}, options) {
537
538
  ...webpackConfig,
538
539
  plugins: [
539
540
  ...webpackConfig.plugins || [],
540
- ...csfPluginOptions ? [(await import("@storybook/csf-plugin")).webpack(csfPluginOptions)] : []
541
+ ...csfPluginOptions ? [
542
+ (await import("@storybook/csf-plugin")).webpack({
543
+ ...csfPluginOptions,
544
+ enrichCsf
545
+ })
546
+ ] : []
541
547
  ],
542
548
  resolve: {
543
549
  ...webpackConfig.resolve,
@@ -582,7 +588,7 @@ var addons = [
582
588
  ];
583
589
  var viteFinal = /* @__PURE__ */ __name(async (config, options) => {
584
590
  const { plugins = [] } = config;
585
- const { mdxPlugin } = await import("./_node-chunks/mdx-plugin-WTPSU6YQ.js");
591
+ const { mdxPlugin } = await import("./_node-chunks/mdx-plugin-OGZHIA54.js");
586
592
  const { react, reactDom, mdx } = await getResolvedReact(options);
587
593
  const packageDeduplicationPlugin = {
588
594
  name: "storybook:package-deduplication",
@@ -614,10 +620,9 @@ var resolvedReact = /* @__PURE__ */ __name(async (existing) => ({
614
620
  mdx: existing?.mdx ?? fileURLToPath2(import.meta.resolve("@mdx-js/react"))
615
621
  }), "resolvedReact");
616
622
  var optimizeViteDeps = [
617
- "@mdx-js/react",
618
623
  "@storybook/addon-docs",
619
624
  "@storybook/addon-docs/blocks",
620
- "markdown-to-jsx"
625
+ "@storybook/addon-docs > @mdx-js/react"
621
626
  ];
622
627
  export {
623
628
  addons,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-docs",
3
- "version": "10.1.0-alpha.0",
3
+ "version": "10.1.0-alpha.10",
4
4
  "description": "Storybook Docs: Document UI components automatically with stories and MDX",
5
5
  "keywords": [
6
6
  "docs",
@@ -84,9 +84,9 @@
84
84
  },
85
85
  "dependencies": {
86
86
  "@mdx-js/react": "^3.0.0",
87
- "@storybook/csf-plugin": "10.1.0-alpha.0",
87
+ "@storybook/csf-plugin": "10.1.0-alpha.10",
88
88
  "@storybook/icons": "^1.6.0",
89
- "@storybook/react-dom-shim": "10.1.0-alpha.0",
89
+ "@storybook/react-dom-shim": "10.1.0-alpha.10",
90
90
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
91
91
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
92
92
  "ts-dedent": "^2.0.0"
@@ -113,12 +113,12 @@
113
113
  "vite": "^7.0.4"
114
114
  },
115
115
  "peerDependencies": {
116
- "storybook": "^10.1.0-alpha.0"
116
+ "storybook": "^10.1.0-alpha.10"
117
117
  },
118
118
  "publishConfig": {
119
119
  "access": "public"
120
120
  },
121
- "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae16",
121
+ "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae17",
122
122
  "storybook": {
123
123
  "displayName": "Docs",
124
124
  "icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",