@storybook/addon-docs 10.5.2 → 10.6.0-alpha.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/_node-chunks/{chunk-GSLJBUGU.js → chunk-2HOKDCFW.js} +6 -6
- package/dist/_node-chunks/{chunk-LC5Y67H7.js → chunk-KF72UGX3.js} +6 -6
- package/dist/_node-chunks/{chunk-V67HDMHN.js → chunk-QIWQCPZY.js} +6 -6
- package/dist/_node-chunks/{chunk-BT2I4O4A.js → chunk-QWMLGYFE.js} +9 -9
- package/dist/_node-chunks/{mdx-plugin-CWKMADKL.js → mdx-plugin-BJX4FC4K.js} +11 -11
- package/dist/_node-chunks/{rehype-external-links-ER63YZJI.js → rehype-external-links-NWP4TH2I.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-CTBINBGS.js → rehype-slug-TAZFWSNC.js} +8 -8
- package/dist/angular/index.d.ts +3 -2
- package/dist/blocks.d.ts +810 -845
- package/dist/chunk-CQxGUEmv.d.ts +65 -0
- package/dist/ember/index.d.ts +3 -2
- package/dist/index.d.ts +192 -249
- package/dist/mdx-loader.js +10 -10
- package/dist/mdx-react-shim.d.ts +1 -1
- package/dist/preset.js +9 -9
- package/dist/preview.d.ts +3 -2
- package/dist/web-components/index.d.ts +1 -2
- package/package.json +5 -5
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { Context, FC, PropsWithChildren, ReactElement } from "react";
|
|
2
|
+
import { DocsContextProps as DocsContextProps$1, Renderer } from "storybook/internal/types";
|
|
3
|
+
import { ThemeVars } from "storybook/theming";
|
|
4
|
+
import { Channel } from "storybook/internal/channels";
|
|
5
|
+
|
|
6
|
+
//#region code/addons/docs/.dts-emit/code/addons/docs/src/blocks/components/TableOfContents.d.ts
|
|
7
|
+
interface TocbotOptions {
|
|
8
|
+
tocSelector: string;
|
|
9
|
+
contentSelector: string;
|
|
10
|
+
headingSelector: string;
|
|
11
|
+
ignoreSelector?: string;
|
|
12
|
+
headingsOffset?: number;
|
|
13
|
+
scrollSmoothOffset?: number;
|
|
14
|
+
orderedList?: boolean;
|
|
15
|
+
onClick?: (e: MouseEvent) => void;
|
|
16
|
+
scrollEndCallback?: () => void;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
interface TocParameters {
|
|
20
|
+
/** CSS selector for the container to search for headings. */
|
|
21
|
+
contentsSelector?: string;
|
|
22
|
+
/**
|
|
23
|
+
* When true, hide the TOC. We still show the empty container (as opposed to showing nothing at
|
|
24
|
+
* all) because it affects the page layout and we want to preserve the layout across pages.
|
|
25
|
+
*/
|
|
26
|
+
disable?: boolean;
|
|
27
|
+
/** CSS selector to match headings to list in the TOC. */
|
|
28
|
+
headingSelector?: string;
|
|
29
|
+
/** Headings that match the ignoreSelector will be skipped. */
|
|
30
|
+
ignoreSelector?: string;
|
|
31
|
+
/** Custom title ReactElement or string to display above the TOC. */
|
|
32
|
+
title?: ReactElement | string | null;
|
|
33
|
+
/**
|
|
34
|
+
* TocBot options, not guaranteed to be available in future versions.
|
|
35
|
+
*
|
|
36
|
+
* @see tocbot docs {@link https://tscanlin.github.io/tocbot/#usage}
|
|
37
|
+
*/
|
|
38
|
+
unsafeTocbotOptions?: Omit<TocbotOptions, 'onClick' | 'scrollEndCallback'>;
|
|
39
|
+
}
|
|
40
|
+
type TableOfContentsProps = React.PropsWithChildren<TocParameters & {
|
|
41
|
+
className?: string;
|
|
42
|
+
channel: Channel;
|
|
43
|
+
}>;
|
|
44
|
+
declare const TableOfContents: ({
|
|
45
|
+
title,
|
|
46
|
+
disable,
|
|
47
|
+
headingSelector,
|
|
48
|
+
contentsSelector,
|
|
49
|
+
ignoreSelector,
|
|
50
|
+
unsafeTocbotOptions,
|
|
51
|
+
channel,
|
|
52
|
+
className
|
|
53
|
+
}: TableOfContentsProps) => React.JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region code/addons/docs/.dts-emit/code/addons/docs/src/blocks/blocks/DocsContext.d.ts
|
|
56
|
+
declare const DocsContext: Context<DocsContextProps$1<Renderer>>;
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region code/addons/docs/.dts-emit/code/addons/docs/src/blocks/blocks/DocsContainer.d.ts
|
|
59
|
+
interface DocsContainerProps<TFramework extends Renderer = Renderer> {
|
|
60
|
+
context: DocsContextProps$1<TFramework>;
|
|
61
|
+
theme?: ThemeVars;
|
|
62
|
+
}
|
|
63
|
+
declare const DocsContainer: FC<PropsWithChildren<DocsContainerProps>>;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { TableOfContents as a, DocsContextProps$1 as i, DocsContainerProps as n, TocParameters as o, DocsContext as r, DocsContainer as t };
|
package/dist/ember/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,293 +1,236 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React$1, {
|
|
3
|
-
import {
|
|
4
|
-
import { ThemeVars } from
|
|
1
|
+
import { n as DocsContainerProps, o as TocParameters } from "./chunk-CQxGUEmv.js";
|
|
2
|
+
import React$1, { ComponentType } from "react";
|
|
3
|
+
import { Args, DocsContextProps, DocsRenderFunction, ModuleExport, ModuleExports, PreparedStory, Renderer } from "storybook/internal/types";
|
|
4
|
+
import { ThemeVars } from "storybook/theming";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
//#region code/addons/docs/.dts-emit/code/addons/docs/src/types.d.ts
|
|
7
|
+
type StoryBlockParameters = {
|
|
8
|
+
/** Whether a story's play function runs when shown in docs page */autoplay?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Set a minimum height (note for an iframe this is the actual height) when rendering a story in
|
|
11
|
+
* an iframe or inline. This overrides `parameters.docs.story.iframeHeight` for iframes.
|
|
12
|
+
*/
|
|
13
|
+
height?: string; /** IFrame configuration */
|
|
14
|
+
iframeHeight?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the story is rendered inline (in the same browser frame as the other docs content) or
|
|
17
|
+
* in an iframe
|
|
18
|
+
*/
|
|
19
|
+
inline?: boolean; /** Specifies the CSF file to which the story is associated */
|
|
20
|
+
meta: ModuleExports;
|
|
21
|
+
/**
|
|
22
|
+
* Specifies which story is rendered by the Story block. If no `of` is defined and the MDX file is
|
|
23
|
+
* attached, the primary (first) story will be rendered.
|
|
24
|
+
*/
|
|
25
|
+
of: ModuleExport;
|
|
26
|
+
};
|
|
27
|
+
type StoriesBlockParameters = {
|
|
28
|
+
/**
|
|
29
|
+
* Custom filter function for determining which stories to include in a <Stories> block
|
|
30
|
+
*/
|
|
31
|
+
filter?: <TRenderer extends Renderer = Renderer, TArgs = Args>(Story: PreparedStory<TRenderer>, Context: ReturnType<DocsContextProps['getStoryContext']>) => boolean;
|
|
32
|
+
};
|
|
33
|
+
type ControlsBlockParameters = {
|
|
34
|
+
/** Exclude specific properties from the Controls panel */exclude?: string[] | RegExp; /** Exclude only specific properties in the Controls panel */
|
|
35
|
+
include?: string[] | RegExp; /** Controls sorting order */
|
|
36
|
+
sort?: 'none' | 'alpha' | 'requiredFirst';
|
|
37
|
+
};
|
|
38
|
+
type ArgTypesBlockParameters = {
|
|
39
|
+
/** Exclude specific arg types from the args table */exclude?: string[] | RegExp; /** Exclude only specific arg types from the args table */
|
|
40
|
+
include?: string[] | RegExp;
|
|
41
|
+
/**
|
|
42
|
+
* Specifies which story to get the arg types from. If a CSF file exports is provided, it will use
|
|
43
|
+
* the primary (first) story in the file.
|
|
44
|
+
*/
|
|
45
|
+
of: ModuleExport | ModuleExports;
|
|
46
|
+
/**
|
|
47
|
+
* Controls arg types order
|
|
48
|
+
*
|
|
49
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-argtypes#sort
|
|
50
|
+
*/
|
|
51
|
+
sort?: 'none' | 'alpha' | 'requiredFirst';
|
|
52
|
+
};
|
|
53
|
+
type CanvasBlockParameters = {
|
|
54
|
+
/**
|
|
55
|
+
* Provides any additional custom actions to show in the bottom right corner. These are simple
|
|
56
|
+
* buttons that do anything you specify in the onClick function.
|
|
57
|
+
*/
|
|
58
|
+
additionalActions?: {
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
className?: string;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
onClick: () => void;
|
|
63
|
+
title: string | React.JSX.Element;
|
|
64
|
+
}[]; /** Provide HTML class(es) to the preview element, for custom styling. */
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Specify how the canvas should layout the story.
|
|
68
|
+
*
|
|
69
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas#layout
|
|
70
|
+
*/
|
|
71
|
+
layout?: 'centered' | 'fullscreen' | 'padded'; /** Specifies which story is rendered */
|
|
72
|
+
of: ModuleExport; /** Show story source code */
|
|
73
|
+
sourceState?: 'hidden' | 'shown' | 'none';
|
|
74
|
+
/**
|
|
75
|
+
* Story configuration
|
|
76
|
+
*
|
|
77
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas#story
|
|
78
|
+
*/
|
|
79
|
+
story?: StoryBlockParameters; /** Disable story source code */
|
|
80
|
+
withSource?: 'open' | 'closed' | 'none'; /** Whether to render a toolbar containing tools to interact with the story. */
|
|
81
|
+
withToolbar?: 'open' | 'closed' | 'none';
|
|
82
|
+
};
|
|
83
|
+
type DescriptionBlockParameters = {
|
|
84
|
+
/** Component description */component?: string; /** Story description */
|
|
85
|
+
story?: string;
|
|
86
|
+
};
|
|
87
|
+
type SourceBlockParameters = {
|
|
88
|
+
/** The source code to be rendered. Will be inferred if not passed */code?: string; /** Whether to render the code in dark mode */
|
|
89
|
+
dark?: boolean; /** Determines if decorators are rendered in the source code snippet. */
|
|
90
|
+
excludeDecorators?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* The formatting used on source code. Both true and 'dedent' have the same effect of removing any
|
|
93
|
+
* extraneous indentation. Supports all valid prettier parser names.
|
|
94
|
+
*/
|
|
95
|
+
format?: boolean | 'dedent' | string; /** Source code language */
|
|
96
|
+
language?: 'bash' | 'css' | 'graphql' | 'html' | 'json' | 'jsextra' | 'jsx' | 'md' | 'text' | 'tsx' | 'typescript' | 'yml';
|
|
97
|
+
/**
|
|
98
|
+
* Specifies which story is rendered by the Source block. If no of is defined and the MDX file is
|
|
99
|
+
* attached, the primary (first) story will be rendered.
|
|
100
|
+
*/
|
|
101
|
+
of: ModuleExport; /** Source code transformations */
|
|
102
|
+
transform?: (code: string, storyContext: any) => string | Promise<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Specifies how the source code is rendered.
|
|
105
|
+
*
|
|
106
|
+
* @default 'auto'
|
|
107
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source#type
|
|
108
|
+
*/
|
|
109
|
+
type?: 'auto' | 'code' | 'dynamic';
|
|
110
|
+
};
|
|
111
|
+
interface DocsParameters {
|
|
112
|
+
/**
|
|
113
|
+
* Docs configuration
|
|
114
|
+
*
|
|
115
|
+
* @see https://storybook.js.org/docs/writing-docs
|
|
116
|
+
*/
|
|
117
|
+
docs?: {
|
|
21
118
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
119
|
+
* The subtitle displayed when shown in docs page
|
|
120
|
+
*
|
|
121
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-argtypes
|
|
24
122
|
*/
|
|
25
|
-
|
|
26
|
-
/** CSS selector to match headings to list in the TOC. */
|
|
27
|
-
headingSelector?: string;
|
|
28
|
-
/** Headings that match the ignoreSelector will be skipped. */
|
|
29
|
-
ignoreSelector?: string;
|
|
30
|
-
/** Custom title ReactElement or string to display above the TOC. */
|
|
31
|
-
title?: ReactElement | string | null;
|
|
123
|
+
argTypes?: ArgTypesBlockParameters;
|
|
32
124
|
/**
|
|
33
|
-
*
|
|
125
|
+
* Canvas configuration when shown in docs page
|
|
34
126
|
*
|
|
35
|
-
* @see
|
|
127
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas
|
|
36
128
|
*/
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface DocsContainerProps<TFramework extends Renderer = Renderer> {
|
|
41
|
-
context: DocsContextProps<TFramework>;
|
|
42
|
-
theme?: ThemeVars;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
type StoryBlockParameters = {
|
|
46
|
-
/** Whether a story's play function runs when shown in docs page */
|
|
47
|
-
autoplay?: boolean;
|
|
129
|
+
canvas?: Partial<CanvasBlockParameters>;
|
|
48
130
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
131
|
+
* Enable the Code panel.
|
|
132
|
+
*
|
|
133
|
+
* @see https://storybook.js.org/docs/writing-docs/code-panel
|
|
51
134
|
*/
|
|
52
|
-
|
|
53
|
-
/** IFrame configuration */
|
|
54
|
-
iframeHeight?: string;
|
|
135
|
+
codePanel?: boolean;
|
|
55
136
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
137
|
+
* Controls block configuration
|
|
138
|
+
*
|
|
139
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-controls
|
|
58
140
|
*/
|
|
59
|
-
|
|
60
|
-
/** Specifies the CSF file to which the story is associated */
|
|
61
|
-
meta: ModuleExports;
|
|
141
|
+
controls?: ControlsBlockParameters;
|
|
62
142
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
143
|
+
* Customize the Docs Container
|
|
144
|
+
*
|
|
145
|
+
* @see https://storybook.js.org/docs/writing-docs/autodocs#customize-the-docs-container
|
|
65
146
|
*/
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
type StoriesBlockParameters = {
|
|
147
|
+
container?: ComponentType<DocsContainerProps>;
|
|
69
148
|
/**
|
|
70
|
-
*
|
|
149
|
+
* Component/story description when shown in docs page
|
|
150
|
+
*
|
|
151
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-description#writing-descriptions
|
|
71
152
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
type ControlsBlockParameters = {
|
|
75
|
-
/** Exclude specific properties from the Controls panel */
|
|
76
|
-
exclude?: string[] | RegExp;
|
|
77
|
-
/** Exclude only specific properties in the Controls panel */
|
|
78
|
-
include?: string[] | RegExp;
|
|
79
|
-
/** Controls sorting order */
|
|
80
|
-
sort?: 'none' | 'alpha' | 'requiredFirst';
|
|
81
|
-
};
|
|
82
|
-
type ArgTypesBlockParameters = {
|
|
83
|
-
/** Exclude specific arg types from the args table */
|
|
84
|
-
exclude?: string[] | RegExp;
|
|
85
|
-
/** Exclude only specific arg types from the args table */
|
|
86
|
-
include?: string[] | RegExp;
|
|
153
|
+
description?: DescriptionBlockParameters; /** Remove the addon panel and disable the addon's behavior */
|
|
154
|
+
disable?: boolean;
|
|
87
155
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
156
|
+
* Replace the default documentation template used by Storybook with your own
|
|
157
|
+
*
|
|
158
|
+
* @see https://storybook.js.org/docs/writing-docs/autodocs#write-a-custom-template
|
|
90
159
|
*/
|
|
91
|
-
|
|
160
|
+
page?: ComponentType;
|
|
92
161
|
/**
|
|
93
|
-
*
|
|
162
|
+
* Source code configuration when shown in docs page
|
|
94
163
|
*
|
|
95
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-
|
|
164
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source
|
|
96
165
|
*/
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
type CanvasBlockParameters = {
|
|
166
|
+
source?: Partial<SourceBlockParameters>;
|
|
100
167
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
168
|
+
* Story block configuration
|
|
169
|
+
*
|
|
170
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-story
|
|
103
171
|
*/
|
|
104
|
-
|
|
105
|
-
ariaLabel?: string;
|
|
106
|
-
className?: string;
|
|
107
|
-
disabled?: boolean;
|
|
108
|
-
onClick: () => void;
|
|
109
|
-
title: string | React.JSX.Element;
|
|
110
|
-
}[];
|
|
111
|
-
/** Provide HTML class(es) to the preview element, for custom styling. */
|
|
112
|
-
className?: string;
|
|
172
|
+
story?: Partial<StoryBlockParameters>;
|
|
113
173
|
/**
|
|
114
|
-
*
|
|
174
|
+
* Stories block configuration
|
|
115
175
|
*
|
|
116
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-
|
|
176
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-stories
|
|
117
177
|
*/
|
|
118
|
-
|
|
119
|
-
/** Specifies which story is rendered */
|
|
120
|
-
of: ModuleExport;
|
|
121
|
-
/** Show story source code */
|
|
122
|
-
sourceState?: 'hidden' | 'shown' | 'none';
|
|
178
|
+
stories?: Partial<StoriesBlockParameters>;
|
|
123
179
|
/**
|
|
124
|
-
*
|
|
180
|
+
* The subtitle displayed when shown in docs page
|
|
125
181
|
*
|
|
126
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-
|
|
182
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-subtitle
|
|
127
183
|
*/
|
|
128
|
-
|
|
129
|
-
/** Disable story source code */
|
|
130
|
-
withSource?: 'open' | 'closed' | 'none';
|
|
131
|
-
/** Whether to render a toolbar containing tools to interact with the story. */
|
|
132
|
-
withToolbar?: 'open' | 'closed' | 'none';
|
|
133
|
-
};
|
|
134
|
-
type DescriptionBlockParameters = {
|
|
135
|
-
/** Component description */
|
|
136
|
-
component?: string;
|
|
137
|
-
/** Story description */
|
|
138
|
-
story?: string;
|
|
139
|
-
};
|
|
140
|
-
type SourceBlockParameters = {
|
|
141
|
-
/** The source code to be rendered. Will be inferred if not passed */
|
|
142
|
-
code?: string;
|
|
143
|
-
/** Whether to render the code in dark mode */
|
|
144
|
-
dark?: boolean;
|
|
145
|
-
/** Determines if decorators are rendered in the source code snippet. */
|
|
146
|
-
excludeDecorators?: boolean;
|
|
184
|
+
subtitle?: string;
|
|
147
185
|
/**
|
|
148
|
-
* The
|
|
149
|
-
*
|
|
186
|
+
* The BCP-47 language tag applied to Storybook-rendered docs prose (descriptions, titles,
|
|
187
|
+
* ArgTypes description cells, free MDX prose).
|
|
188
|
+
*
|
|
189
|
+
* Storybook's own chrome stays English regardless. Inherited project → meta (page-level) or
|
|
190
|
+
* project → meta → story (per-story prose).
|
|
191
|
+
*
|
|
192
|
+
* @default 'en'
|
|
150
193
|
*/
|
|
151
|
-
|
|
152
|
-
/** Source code language */
|
|
153
|
-
language?: 'bash' | 'css' | 'graphql' | 'html' | 'json' | 'jsextra' | 'jsx' | 'md' | 'text' | 'tsx' | 'typescript' | 'yml';
|
|
194
|
+
lang?: string;
|
|
154
195
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
196
|
+
* Override the default theme
|
|
197
|
+
*
|
|
198
|
+
* @see https://storybook.js.org/docs/writing-docs/autodocs#override-the-default-theme
|
|
157
199
|
*/
|
|
158
|
-
|
|
159
|
-
/** Source code transformations */
|
|
160
|
-
transform?: (code: string, storyContext: any) => string | Promise<string>;
|
|
200
|
+
theme?: ThemeVars;
|
|
161
201
|
/**
|
|
162
|
-
*
|
|
202
|
+
* The title displayed when shown in docs page
|
|
163
203
|
*
|
|
164
|
-
* @
|
|
165
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source#type
|
|
204
|
+
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-title
|
|
166
205
|
*/
|
|
167
|
-
|
|
168
|
-
};
|
|
169
|
-
interface DocsParameters {
|
|
206
|
+
title?: string;
|
|
170
207
|
/**
|
|
171
|
-
*
|
|
208
|
+
* Configure the table of contents
|
|
172
209
|
*
|
|
173
|
-
* @see https://storybook.js.org/docs/writing-docs
|
|
210
|
+
* @see https://storybook.js.org/docs/writing-docs/autodocs#configure-the-table-of-contents
|
|
174
211
|
*/
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
* The subtitle displayed when shown in docs page
|
|
178
|
-
*
|
|
179
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-argtypes
|
|
180
|
-
*/
|
|
181
|
-
argTypes?: ArgTypesBlockParameters;
|
|
182
|
-
/**
|
|
183
|
-
* Canvas configuration when shown in docs page
|
|
184
|
-
*
|
|
185
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas
|
|
186
|
-
*/
|
|
187
|
-
canvas?: Partial<CanvasBlockParameters>;
|
|
188
|
-
/**
|
|
189
|
-
* Enable the Code panel.
|
|
190
|
-
*
|
|
191
|
-
* @see https://storybook.js.org/docs/writing-docs/code-panel
|
|
192
|
-
*/
|
|
193
|
-
codePanel?: boolean;
|
|
194
|
-
/**
|
|
195
|
-
* Controls block configuration
|
|
196
|
-
*
|
|
197
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-controls
|
|
198
|
-
*/
|
|
199
|
-
controls?: ControlsBlockParameters;
|
|
200
|
-
/**
|
|
201
|
-
* Customize the Docs Container
|
|
202
|
-
*
|
|
203
|
-
* @see https://storybook.js.org/docs/writing-docs/autodocs#customize-the-docs-container
|
|
204
|
-
*/
|
|
205
|
-
container?: ComponentType<DocsContainerProps>;
|
|
206
|
-
/**
|
|
207
|
-
* Component/story description when shown in docs page
|
|
208
|
-
*
|
|
209
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-description#writing-descriptions
|
|
210
|
-
*/
|
|
211
|
-
description?: DescriptionBlockParameters;
|
|
212
|
-
/** Remove the addon panel and disable the addon's behavior */
|
|
213
|
-
disable?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* Replace the default documentation template used by Storybook with your own
|
|
216
|
-
*
|
|
217
|
-
* @see https://storybook.js.org/docs/writing-docs/autodocs#write-a-custom-template
|
|
218
|
-
*/
|
|
219
|
-
page?: ComponentType;
|
|
220
|
-
/**
|
|
221
|
-
* Source code configuration when shown in docs page
|
|
222
|
-
*
|
|
223
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source
|
|
224
|
-
*/
|
|
225
|
-
source?: Partial<SourceBlockParameters>;
|
|
226
|
-
/**
|
|
227
|
-
* Story block configuration
|
|
228
|
-
*
|
|
229
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-story
|
|
230
|
-
*/
|
|
231
|
-
story?: Partial<StoryBlockParameters>;
|
|
232
|
-
/**
|
|
233
|
-
* Stories block configuration
|
|
234
|
-
*
|
|
235
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-stories
|
|
236
|
-
*/
|
|
237
|
-
stories?: Partial<StoriesBlockParameters>;
|
|
238
|
-
/**
|
|
239
|
-
* The subtitle displayed when shown in docs page
|
|
240
|
-
*
|
|
241
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-subtitle
|
|
242
|
-
*/
|
|
243
|
-
subtitle?: string;
|
|
244
|
-
/**
|
|
245
|
-
* The BCP-47 language tag applied to Storybook-rendered docs prose (descriptions, titles,
|
|
246
|
-
* ArgTypes description cells, free MDX prose).
|
|
247
|
-
*
|
|
248
|
-
* Storybook's own chrome stays English regardless. Inherited project → meta (page-level) or
|
|
249
|
-
* project → meta → story (per-story prose).
|
|
250
|
-
*
|
|
251
|
-
* @default 'en'
|
|
252
|
-
*/
|
|
253
|
-
lang?: string;
|
|
254
|
-
/**
|
|
255
|
-
* Override the default theme
|
|
256
|
-
*
|
|
257
|
-
* @see https://storybook.js.org/docs/writing-docs/autodocs#override-the-default-theme
|
|
258
|
-
*/
|
|
259
|
-
theme?: ThemeVars;
|
|
260
|
-
/**
|
|
261
|
-
* The title displayed when shown in docs page
|
|
262
|
-
*
|
|
263
|
-
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-title
|
|
264
|
-
*/
|
|
265
|
-
title?: string;
|
|
266
|
-
/**
|
|
267
|
-
* Configure the table of contents
|
|
268
|
-
*
|
|
269
|
-
* @see https://storybook.js.org/docs/writing-docs/autodocs#configure-the-table-of-contents
|
|
270
|
-
*/
|
|
271
|
-
toc?: true | TocParameters;
|
|
272
|
-
};
|
|
212
|
+
toc?: true | TocParameters;
|
|
213
|
+
};
|
|
273
214
|
}
|
|
274
215
|
interface DocsTypes {
|
|
275
|
-
|
|
216
|
+
parameters: DocsParameters;
|
|
276
217
|
}
|
|
277
|
-
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region code/addons/docs/.dts-emit/code/addons/docs/src/DocsRenderer.d.ts
|
|
278
220
|
declare class DocsRenderer<TRenderer extends Renderer> {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
221
|
+
render: DocsRenderFunction<TRenderer>;
|
|
222
|
+
unmount: (element: HTMLElement) => void;
|
|
223
|
+
constructor();
|
|
282
224
|
}
|
|
283
|
-
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region code/addons/docs/.dts-emit/code/addons/docs/src/index.d.ts
|
|
284
227
|
declare module 'mdx/types' {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
228
|
+
namespace JSX {
|
|
229
|
+
type Element = React$1.JSX.Element;
|
|
230
|
+
type ElementClass = React$1.JSX.ElementClass;
|
|
231
|
+
type IntrinsicElements = React$1.JSX.IntrinsicElements;
|
|
232
|
+
}
|
|
290
233
|
}
|
|
291
|
-
declare
|
|
292
|
-
|
|
293
|
-
export { DocsRenderer, type DocsTypes, _default as default };
|
|
234
|
+
declare function _default(): import("storybook/internal/csf").PreviewAddon<DocsTypes>;
|
|
235
|
+
//#endregion
|
|
236
|
+
export { DocsRenderer, type DocsTypes, _default as default };
|
package/dist/mdx-loader.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_r0ek95wjg2g from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_r0ek95wjg2g from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_r0ek95wjg2g from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_r0ek95wjg2g.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_r0ek95wjg2g.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_r0ek95wjg2g.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-QWMLGYFE.js";
|
|
15
|
+
import "./_node-chunks/chunk-2HOKDCFW.js";
|
|
16
|
+
import "./_node-chunks/chunk-QIWQCPZY.js";
|
|
17
|
+
import "./_node-chunks/chunk-KF72UGX3.js";
|
|
18
18
|
|
|
19
19
|
// src/mdx-loader.ts
|
|
20
20
|
var DEFAULT_RENDERER = `
|
package/dist/mdx-react-shim.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "@mdx-js/react";
|
package/dist/preset.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_r0ek95wjg2g from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_r0ek95wjg2g from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_r0ek95wjg2g from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_r0ek95wjg2g.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_r0ek95wjg2g.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_r0ek95wjg2g.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-KF72UGX3.js";
|
|
13
13
|
|
|
14
14
|
// src/preset.ts
|
|
15
15
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
@@ -728,7 +728,7 @@ var getResolvedReact = async (options) => {
|
|
|
728
728
|
};
|
|
729
729
|
};
|
|
730
730
|
async function webpack(webpackConfig = {}, options) {
|
|
731
|
-
let { module = {} } = webpackConfig, { csfPluginOptions = {}, mdxPluginOptions = {} } = options, enrichCsf = await options.presets.apply("experimental_enrichCsf"), rehypeSlug = (await import("./_node-chunks/rehype-slug-
|
|
731
|
+
let { module = {} } = webpackConfig, { csfPluginOptions = {}, mdxPluginOptions = {} } = options, enrichCsf = await options.presets.apply("experimental_enrichCsf"), rehypeSlug = (await import("./_node-chunks/rehype-slug-TAZFWSNC.js")).default, rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-NWP4TH2I.js")).default, mdxLoaderOptions = await options.presets.apply("mdxLoaderOptions", {
|
|
732
732
|
...mdxPluginOptions,
|
|
733
733
|
mdxCompileOptions: {
|
|
734
734
|
providerImportSource: fileURLToPath2(
|
|
@@ -806,7 +806,7 @@ var docs = (input = {}, options) => {
|
|
|
806
806
|
}, addons = [
|
|
807
807
|
import.meta.resolve("@storybook/react-dom-shim/preset")
|
|
808
808
|
], viteFinal = async (config, options) => {
|
|
809
|
-
let { plugins = [] } = config, { mdxPlugin } = await import("./_node-chunks/mdx-plugin-
|
|
809
|
+
let { plugins = [] } = config, { mdxPlugin } = await import("./_node-chunks/mdx-plugin-BJX4FC4K.js"), { react, reactDom, mdx } = await getResolvedReact(options), packageDeduplicationPlugin = {
|
|
810
810
|
name: "storybook:package-deduplication",
|
|
811
811
|
enforce: "pre",
|
|
812
812
|
config: () => ({
|
package/dist/preview.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
export { };
|