@storybook/addon-docs 7.0.0-alpha.5 → 7.0.0-alpha.8
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/cjs/blocks/index.js +4 -352
- package/dist/cjs/preset.js +5 -13
- package/dist/cjs/preview.js +6 -2
- package/dist/esm/blocks/index.js +1 -24
- package/dist/esm/preview.js +6 -2
- package/dist/types/blocks/index.d.ts +1 -24
- package/dist/types/preview.d.ts +1 -6
- package/package.json +16 -15
- package/dist/cjs/blocks/Anchor.js +0 -23
- package/dist/cjs/blocks/ArgsTable.js +0 -329
- package/dist/cjs/blocks/Canvas.js +0 -109
- package/dist/cjs/blocks/Description.js +0 -126
- package/dist/cjs/blocks/DocsContainer.js +0 -127
- package/dist/cjs/blocks/DocsContext.js +0 -25
- package/dist/cjs/blocks/DocsPage.js +0 -30
- package/dist/cjs/blocks/DocsStory.js +0 -68
- package/dist/cjs/blocks/Heading.js +0 -31
- package/dist/cjs/blocks/Meta.js +0 -50
- package/dist/cjs/blocks/Preview.js +0 -23
- package/dist/cjs/blocks/Primary.js +0 -39
- package/dist/cjs/blocks/Props.js +0 -29
- package/dist/cjs/blocks/Source.js +0 -179
- package/dist/cjs/blocks/SourceContainer.js +0 -67
- package/dist/cjs/blocks/Stories.js +0 -51
- package/dist/cjs/blocks/Story.js +0 -143
- package/dist/cjs/blocks/Subheading.js +0 -31
- package/dist/cjs/blocks/Subtitle.js +0 -39
- package/dist/cjs/blocks/Title.js +0 -44
- package/dist/cjs/blocks/Wrapper.js +0 -20
- package/dist/cjs/blocks/enhanceSource.js +0 -92
- package/dist/cjs/blocks/mdx.js +0 -234
- package/dist/cjs/blocks/types.js +0 -10
- package/dist/cjs/blocks/useStory.js +0 -37
- package/dist/cjs/blocks/utils.js +0 -40
- package/dist/esm/blocks/Anchor.js +0 -8
- package/dist/esm/blocks/ArgsTable.js +0 -292
- package/dist/esm/blocks/Canvas.js +0 -83
- package/dist/esm/blocks/Description.js +0 -107
- package/dist/esm/blocks/DocsContainer.js +0 -98
- package/dist/esm/blocks/DocsContext.js +0 -16
- package/dist/esm/blocks/DocsPage.js +0 -11
- package/dist/esm/blocks/DocsStory.js +0 -46
- package/dist/esm/blocks/Heading.js +0 -17
- package/dist/esm/blocks/Meta.js +0 -31
- package/dist/esm/blocks/Preview.js +0 -9
- package/dist/esm/blocks/Primary.js +0 -23
- package/dist/esm/blocks/Props.js +0 -14
- package/dist/esm/blocks/Source.js +0 -144
- package/dist/esm/blocks/SourceContainer.js +0 -44
- package/dist/esm/blocks/Stories.js +0 -30
- package/dist/esm/blocks/Story.js +0 -114
- package/dist/esm/blocks/Subheading.js +0 -17
- package/dist/esm/blocks/Subtitle.js +0 -23
- package/dist/esm/blocks/Title.js +0 -24
- package/dist/esm/blocks/Wrapper.js +0 -8
- package/dist/esm/blocks/enhanceSource.js +0 -87
- package/dist/esm/blocks/mdx.js +0 -203
- package/dist/esm/blocks/types.js +0 -2
- package/dist/esm/blocks/useStory.js +0 -27
- package/dist/esm/blocks/utils.js +0 -29
- package/dist/types/blocks/Anchor.d.ts +0 -6
- package/dist/types/blocks/ArgsTable.d.ts +0 -33
- package/dist/types/blocks/Canvas.d.ts +0 -9
- package/dist/types/blocks/Description.d.ts +0 -20
- package/dist/types/blocks/DocsContainer.d.ts +0 -7
- package/dist/types/blocks/DocsContext.d.ts +0 -5
- package/dist/types/blocks/DocsPage.d.ts +0 -2
- package/dist/types/blocks/DocsStory.d.ts +0 -3
- package/dist/types/blocks/Heading.d.ts +0 -6
- package/dist/types/blocks/Meta.d.ts +0 -9
- package/dist/types/blocks/Preview.d.ts +0 -3
- package/dist/types/blocks/Primary.d.ts +0 -6
- package/dist/types/blocks/Props.d.ts +0 -3
- package/dist/types/blocks/Source.d.ts +0 -38
- package/dist/types/blocks/SourceContainer.d.ts +0 -14
- package/dist/types/blocks/Stories.d.ts +0 -7
- package/dist/types/blocks/Story.d.ts +0 -28
- package/dist/types/blocks/Subheading.d.ts +0 -3
- package/dist/types/blocks/Subtitle.d.ts +0 -6
- package/dist/types/blocks/Title.d.ts +0 -8
- package/dist/types/blocks/Wrapper.d.ts +0 -2
- package/dist/types/blocks/enhanceSource.d.ts +0 -3
- package/dist/types/blocks/mdx.d.ts +0 -20
- package/dist/types/blocks/types.d.ts +0 -13
- package/dist/types/blocks/useStory.d.ts +0 -5
- package/dist/types/blocks/utils.d.ts +0 -3
package/dist/cjs/blocks/index.js
CHANGED
|
@@ -3,364 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
ColorPalette: true,
|
|
8
|
-
ColorItem: true,
|
|
9
|
-
IconGallery: true,
|
|
10
|
-
IconItem: true,
|
|
11
|
-
Typeset: true
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "ColorItem", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _components.ColorItem;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "ColorPalette", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return _components.ColorPalette;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "IconGallery", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _components.IconGallery;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "IconItem", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _components.IconItem;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "Typeset", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return _components.Typeset;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
var _components = require("@storybook/components");
|
|
45
|
-
|
|
46
|
-
var _Anchor = require("./Anchor");
|
|
47
|
-
|
|
48
|
-
Object.keys(_Anchor).forEach(function (key) {
|
|
49
|
-
if (key === "default" || key === "__esModule") return;
|
|
50
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
51
|
-
if (key in exports && exports[key] === _Anchor[key]) return;
|
|
52
|
-
Object.defineProperty(exports, key, {
|
|
53
|
-
enumerable: true,
|
|
54
|
-
get: function () {
|
|
55
|
-
return _Anchor[key];
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
var _ArgsTable = require("./ArgsTable");
|
|
61
|
-
|
|
62
|
-
Object.keys(_ArgsTable).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
65
|
-
if (key in exports && exports[key] === _ArgsTable[key]) return;
|
|
66
|
-
Object.defineProperty(exports, key, {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _ArgsTable[key];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
var _Canvas = require("./Canvas");
|
|
75
|
-
|
|
76
|
-
Object.keys(_Canvas).forEach(function (key) {
|
|
77
|
-
if (key === "default" || key === "__esModule") return;
|
|
78
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
79
|
-
if (key in exports && exports[key] === _Canvas[key]) return;
|
|
80
|
-
Object.defineProperty(exports, key, {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return _Canvas[key];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
var _Description = require("./Description");
|
|
89
|
-
|
|
90
|
-
Object.keys(_Description).forEach(function (key) {
|
|
91
|
-
if (key === "default" || key === "__esModule") return;
|
|
92
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
93
|
-
if (key in exports && exports[key] === _Description[key]) return;
|
|
94
|
-
Object.defineProperty(exports, key, {
|
|
95
|
-
enumerable: true,
|
|
96
|
-
get: function () {
|
|
97
|
-
return _Description[key];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
var _DocsContext = require("./DocsContext");
|
|
103
|
-
|
|
104
|
-
Object.keys(_DocsContext).forEach(function (key) {
|
|
105
|
-
if (key === "default" || key === "__esModule") return;
|
|
106
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
107
|
-
if (key in exports && exports[key] === _DocsContext[key]) return;
|
|
108
|
-
Object.defineProperty(exports, key, {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _DocsContext[key];
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
var _DocsPage = require("./DocsPage");
|
|
117
|
-
|
|
118
|
-
Object.keys(_DocsPage).forEach(function (key) {
|
|
119
|
-
if (key === "default" || key === "__esModule") return;
|
|
120
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
121
|
-
if (key in exports && exports[key] === _DocsPage[key]) return;
|
|
122
|
-
Object.defineProperty(exports, key, {
|
|
123
|
-
enumerable: true,
|
|
124
|
-
get: function () {
|
|
125
|
-
return _DocsPage[key];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
var _DocsContainer = require("./DocsContainer");
|
|
131
|
-
|
|
132
|
-
Object.keys(_DocsContainer).forEach(function (key) {
|
|
133
|
-
if (key === "default" || key === "__esModule") return;
|
|
134
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
135
|
-
if (key in exports && exports[key] === _DocsContainer[key]) return;
|
|
136
|
-
Object.defineProperty(exports, key, {
|
|
137
|
-
enumerable: true,
|
|
138
|
-
get: function () {
|
|
139
|
-
return _DocsContainer[key];
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
var _DocsStory = require("./DocsStory");
|
|
145
|
-
|
|
146
|
-
Object.keys(_DocsStory).forEach(function (key) {
|
|
147
|
-
if (key === "default" || key === "__esModule") return;
|
|
148
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
149
|
-
if (key in exports && exports[key] === _DocsStory[key]) return;
|
|
150
|
-
Object.defineProperty(exports, key, {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return _DocsStory[key];
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
var _Heading = require("./Heading");
|
|
159
|
-
|
|
160
|
-
Object.keys(_Heading).forEach(function (key) {
|
|
161
|
-
if (key === "default" || key === "__esModule") return;
|
|
162
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
163
|
-
if (key in exports && exports[key] === _Heading[key]) return;
|
|
164
|
-
Object.defineProperty(exports, key, {
|
|
165
|
-
enumerable: true,
|
|
166
|
-
get: function () {
|
|
167
|
-
return _Heading[key];
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
var _Meta = require("./Meta");
|
|
173
|
-
|
|
174
|
-
Object.keys(_Meta).forEach(function (key) {
|
|
175
|
-
if (key === "default" || key === "__esModule") return;
|
|
176
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
177
|
-
if (key in exports && exports[key] === _Meta[key]) return;
|
|
178
|
-
Object.defineProperty(exports, key, {
|
|
179
|
-
enumerable: true,
|
|
180
|
-
get: function () {
|
|
181
|
-
return _Meta[key];
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
var _Preview = require("./Preview");
|
|
187
|
-
|
|
188
|
-
Object.keys(_Preview).forEach(function (key) {
|
|
189
|
-
if (key === "default" || key === "__esModule") return;
|
|
190
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
191
|
-
if (key in exports && exports[key] === _Preview[key]) return;
|
|
192
|
-
Object.defineProperty(exports, key, {
|
|
193
|
-
enumerable: true,
|
|
194
|
-
get: function () {
|
|
195
|
-
return _Preview[key];
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
var _Primary = require("./Primary");
|
|
201
|
-
|
|
202
|
-
Object.keys(_Primary).forEach(function (key) {
|
|
203
|
-
if (key === "default" || key === "__esModule") return;
|
|
204
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
205
|
-
if (key in exports && exports[key] === _Primary[key]) return;
|
|
206
|
-
Object.defineProperty(exports, key, {
|
|
207
|
-
enumerable: true,
|
|
208
|
-
get: function () {
|
|
209
|
-
return _Primary[key];
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
var _Props = require("./Props");
|
|
215
|
-
|
|
216
|
-
Object.keys(_Props).forEach(function (key) {
|
|
217
|
-
if (key === "default" || key === "__esModule") return;
|
|
218
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
219
|
-
if (key in exports && exports[key] === _Props[key]) return;
|
|
220
|
-
Object.defineProperty(exports, key, {
|
|
221
|
-
enumerable: true,
|
|
222
|
-
get: function () {
|
|
223
|
-
return _Props[key];
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
var _Source = require("./Source");
|
|
229
|
-
|
|
230
|
-
Object.keys(_Source).forEach(function (key) {
|
|
231
|
-
if (key === "default" || key === "__esModule") return;
|
|
232
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
233
|
-
if (key in exports && exports[key] === _Source[key]) return;
|
|
234
|
-
Object.defineProperty(exports, key, {
|
|
235
|
-
enumerable: true,
|
|
236
|
-
get: function () {
|
|
237
|
-
return _Source[key];
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
var _SourceContainer = require("./SourceContainer");
|
|
243
|
-
|
|
244
|
-
Object.keys(_SourceContainer).forEach(function (key) {
|
|
245
|
-
if (key === "default" || key === "__esModule") return;
|
|
246
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
247
|
-
if (key in exports && exports[key] === _SourceContainer[key]) return;
|
|
248
|
-
Object.defineProperty(exports, key, {
|
|
249
|
-
enumerable: true,
|
|
250
|
-
get: function () {
|
|
251
|
-
return _SourceContainer[key];
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
var _Stories = require("./Stories");
|
|
257
|
-
|
|
258
|
-
Object.keys(_Stories).forEach(function (key) {
|
|
259
|
-
if (key === "default" || key === "__esModule") return;
|
|
260
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
261
|
-
if (key in exports && exports[key] === _Stories[key]) return;
|
|
262
|
-
Object.defineProperty(exports, key, {
|
|
263
|
-
enumerable: true,
|
|
264
|
-
get: function () {
|
|
265
|
-
return _Stories[key];
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
var _Story = require("./Story");
|
|
271
|
-
|
|
272
|
-
Object.keys(_Story).forEach(function (key) {
|
|
273
|
-
if (key === "default" || key === "__esModule") return;
|
|
274
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
275
|
-
if (key in exports && exports[key] === _Story[key]) return;
|
|
276
|
-
Object.defineProperty(exports, key, {
|
|
277
|
-
enumerable: true,
|
|
278
|
-
get: function () {
|
|
279
|
-
return _Story[key];
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
var _Subheading = require("./Subheading");
|
|
285
|
-
|
|
286
|
-
Object.keys(_Subheading).forEach(function (key) {
|
|
287
|
-
if (key === "default" || key === "__esModule") return;
|
|
288
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
289
|
-
if (key in exports && exports[key] === _Subheading[key]) return;
|
|
290
|
-
Object.defineProperty(exports, key, {
|
|
291
|
-
enumerable: true,
|
|
292
|
-
get: function () {
|
|
293
|
-
return _Subheading[key];
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
var _Subtitle = require("./Subtitle");
|
|
299
|
-
|
|
300
|
-
Object.keys(_Subtitle).forEach(function (key) {
|
|
301
|
-
if (key === "default" || key === "__esModule") return;
|
|
302
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
303
|
-
if (key in exports && exports[key] === _Subtitle[key]) return;
|
|
304
|
-
Object.defineProperty(exports, key, {
|
|
305
|
-
enumerable: true,
|
|
306
|
-
get: function () {
|
|
307
|
-
return _Subtitle[key];
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
var _Title = require("./Title");
|
|
313
|
-
|
|
314
|
-
Object.keys(_Title).forEach(function (key) {
|
|
315
|
-
if (key === "default" || key === "__esModule") return;
|
|
316
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
317
|
-
if (key in exports && exports[key] === _Title[key]) return;
|
|
318
|
-
Object.defineProperty(exports, key, {
|
|
319
|
-
enumerable: true,
|
|
320
|
-
get: function () {
|
|
321
|
-
return _Title[key];
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
var _Wrapper = require("./Wrapper");
|
|
327
|
-
|
|
328
|
-
Object.keys(_Wrapper).forEach(function (key) {
|
|
329
|
-
if (key === "default" || key === "__esModule") return;
|
|
330
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
331
|
-
if (key in exports && exports[key] === _Wrapper[key]) return;
|
|
332
|
-
Object.defineProperty(exports, key, {
|
|
333
|
-
enumerable: true,
|
|
334
|
-
get: function () {
|
|
335
|
-
return _Wrapper[key];
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
var _types = require("./types");
|
|
341
|
-
|
|
342
|
-
Object.keys(_types).forEach(function (key) {
|
|
343
|
-
if (key === "default" || key === "__esModule") return;
|
|
344
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
345
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
346
|
-
Object.defineProperty(exports, key, {
|
|
347
|
-
enumerable: true,
|
|
348
|
-
get: function () {
|
|
349
|
-
return _types[key];
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
});
|
|
353
6
|
|
|
354
|
-
var
|
|
7
|
+
var _blocks = require("@storybook/blocks");
|
|
355
8
|
|
|
356
|
-
Object.keys(
|
|
9
|
+
Object.keys(_blocks).forEach(function (key) {
|
|
357
10
|
if (key === "default" || key === "__esModule") return;
|
|
358
|
-
if (
|
|
359
|
-
if (key in exports && exports[key] === _mdx[key]) return;
|
|
11
|
+
if (key in exports && exports[key] === _blocks[key]) return;
|
|
360
12
|
Object.defineProperty(exports, key, {
|
|
361
13
|
enumerable: true,
|
|
362
14
|
get: function () {
|
|
363
|
-
return
|
|
15
|
+
return _blocks[key];
|
|
364
16
|
}
|
|
365
17
|
});
|
|
366
18
|
});
|
package/dist/cjs/preset.js
CHANGED
|
@@ -29,7 +29,7 @@ function createBabelOptions({
|
|
|
29
29
|
mdxBabelOptions,
|
|
30
30
|
configureJSX
|
|
31
31
|
}) {
|
|
32
|
-
const babelPlugins =
|
|
32
|
+
const babelPlugins = mdxBabelOptions?.plugins || babelOptions?.plugins || [];
|
|
33
33
|
const jsxPlugin = [require.resolve('@babel/plugin-transform-react-jsx'), {
|
|
34
34
|
pragma: 'React.createElement',
|
|
35
35
|
pragmaFrag: 'React.Fragment'
|
|
@@ -45,8 +45,6 @@ function createBabelOptions({
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
async function webpack(webpackConfig = {}, options) {
|
|
48
|
-
var _global$FEATURES, _global$FEATURES2;
|
|
49
|
-
|
|
50
48
|
const resolvedBabelLoader = require.resolve('babel-loader');
|
|
51
49
|
|
|
52
50
|
const {
|
|
@@ -67,11 +65,11 @@ async function webpack(webpackConfig = {}, options) {
|
|
|
67
65
|
skipCsf: true,
|
|
68
66
|
remarkPlugins: [_remarkSlug.default, _remarkExternalLinks.default]
|
|
69
67
|
};
|
|
70
|
-
const mdxVersion =
|
|
68
|
+
const mdxVersion = _global.default.FEATURES?.previewMdx2 ? 'MDX2' : 'MDX1';
|
|
71
69
|
|
|
72
70
|
_nodeLogger.logger.info(`Addon-docs: using ${mdxVersion}`);
|
|
73
71
|
|
|
74
|
-
const mdxLoader =
|
|
72
|
+
const mdxLoader = _global.default.FEATURES?.previewMdx2 ? require.resolve('@storybook/mdx2-csf/loader') : require.resolve('@storybook/mdx1-csf/loader'); // set `sourceLoaderOptions` to `null` to disable for manual configuration
|
|
75
73
|
|
|
76
74
|
const sourceLoader = sourceLoaderOptions ? [{
|
|
77
75
|
test: /\.(stories|story)\.[tj]sx?$/,
|
|
@@ -84,11 +82,7 @@ async function webpack(webpackConfig = {}, options) {
|
|
|
84
82
|
let rules = module.rules || [];
|
|
85
83
|
|
|
86
84
|
if (transcludeMarkdown) {
|
|
87
|
-
rules = [...rules.filter(rule => {
|
|
88
|
-
var _rule$test;
|
|
89
|
-
|
|
90
|
-
return ((_rule$test = rule.test) === null || _rule$test === void 0 ? void 0 : _rule$test.toString()) !== '/\\.md$/';
|
|
91
|
-
}), {
|
|
85
|
+
rules = [...rules.filter(rule => rule.test?.toString() !== '/\\.md$/'), {
|
|
92
86
|
test: /\.md$/,
|
|
93
87
|
use: [{
|
|
94
88
|
loader: resolvedBabelLoader,
|
|
@@ -140,13 +134,11 @@ async function webpack(webpackConfig = {}, options) {
|
|
|
140
134
|
|
|
141
135
|
const storyIndexers = async indexers => {
|
|
142
136
|
const mdxIndexer = async (fileName, opts) => {
|
|
143
|
-
var _global$FEATURES3;
|
|
144
|
-
|
|
145
137
|
let code = (await _fsExtra.default.readFile(fileName, 'utf-8')).toString(); // @ts-ignore
|
|
146
138
|
|
|
147
139
|
const {
|
|
148
140
|
compile
|
|
149
|
-
} =
|
|
141
|
+
} = _global.default.FEATURES?.previewMdx2 ? await Promise.resolve().then(() => _interopRequireWildcard(require('@storybook/mdx2-csf'))) : await Promise.resolve().then(() => _interopRequireWildcard(require('@storybook/mdx1-csf')));
|
|
150
142
|
code = await compile(code, {});
|
|
151
143
|
return (0, _csfTools.loadCsf)(code, Object.assign({}, opts, {
|
|
152
144
|
fileName
|
package/dist/cjs/preview.js
CHANGED
|
@@ -11,8 +11,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
11
11
|
|
|
12
12
|
const parameters = {
|
|
13
13
|
docs: {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
renderer: async () => {
|
|
15
|
+
const {
|
|
16
|
+
DocsRenderer
|
|
17
|
+
} = await Promise.resolve().then(() => _interopRequireWildcard(require('./blocks')));
|
|
18
|
+
return new DocsRenderer();
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
21
|
};
|
|
18
22
|
exports.parameters = parameters;
|
package/dist/esm/blocks/index.js
CHANGED
|
@@ -1,24 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './Anchor';
|
|
3
|
-
export * from './ArgsTable';
|
|
4
|
-
export * from './Canvas';
|
|
5
|
-
export * from './Description';
|
|
6
|
-
export * from './DocsContext';
|
|
7
|
-
export * from './DocsPage';
|
|
8
|
-
export * from './DocsContainer';
|
|
9
|
-
export * from './DocsStory';
|
|
10
|
-
export * from './Heading';
|
|
11
|
-
export * from './Meta';
|
|
12
|
-
export * from './Preview';
|
|
13
|
-
export * from './Primary';
|
|
14
|
-
export * from './Props';
|
|
15
|
-
export * from './Source';
|
|
16
|
-
export * from './SourceContainer';
|
|
17
|
-
export * from './Stories';
|
|
18
|
-
export * from './Story';
|
|
19
|
-
export * from './Subheading';
|
|
20
|
-
export * from './Subtitle';
|
|
21
|
-
export * from './Title';
|
|
22
|
-
export * from './Wrapper';
|
|
23
|
-
export * from './types';
|
|
24
|
-
export * from './mdx';
|
|
1
|
+
export * from '@storybook/blocks';
|
package/dist/esm/preview.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export const parameters = {
|
|
2
2
|
docs: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
renderer: async () => {
|
|
4
|
+
const {
|
|
5
|
+
DocsRenderer
|
|
6
|
+
} = await import('./blocks');
|
|
7
|
+
return new DocsRenderer();
|
|
8
|
+
}
|
|
5
9
|
}
|
|
6
10
|
};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './Anchor';
|
|
3
|
-
export * from './ArgsTable';
|
|
4
|
-
export * from './Canvas';
|
|
5
|
-
export * from './Description';
|
|
6
|
-
export * from './DocsContext';
|
|
7
|
-
export * from './DocsPage';
|
|
8
|
-
export * from './DocsContainer';
|
|
9
|
-
export * from './DocsStory';
|
|
10
|
-
export * from './Heading';
|
|
11
|
-
export * from './Meta';
|
|
12
|
-
export * from './Preview';
|
|
13
|
-
export * from './Primary';
|
|
14
|
-
export * from './Props';
|
|
15
|
-
export * from './Source';
|
|
16
|
-
export * from './SourceContainer';
|
|
17
|
-
export * from './Stories';
|
|
18
|
-
export * from './Story';
|
|
19
|
-
export * from './Subheading';
|
|
20
|
-
export * from './Subtitle';
|
|
21
|
-
export * from './Title';
|
|
22
|
-
export * from './Wrapper';
|
|
23
|
-
export * from './types';
|
|
24
|
-
export * from './mdx';
|
|
1
|
+
export * from '@storybook/blocks';
|
package/dist/types/preview.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export declare const parameters:
|
|
2
|
-
docs: {
|
|
3
|
-
getContainer: () => Promise<import("react").FunctionComponent<import("./blocks").DocsContainerProps<import("@storybook/csf").AnyFramework>>>;
|
|
4
|
-
getPage: () => Promise<import("react").FC<{}>>;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
1
|
+
export declare const parameters: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-docs",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.8",
|
|
4
4
|
"description": "Document component usage and properties in Markdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -52,21 +52,22 @@
|
|
|
52
52
|
"@babel/preset-env": "^7.12.11",
|
|
53
53
|
"@jest/transform": "^26.6.2",
|
|
54
54
|
"@mdx-js/react": "^1.6.22",
|
|
55
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
56
|
-
"@storybook/api": "7.0.0-alpha.
|
|
57
|
-
"@storybook/
|
|
58
|
-
"@storybook/
|
|
59
|
-
"@storybook/core-
|
|
55
|
+
"@storybook/addons": "7.0.0-alpha.8",
|
|
56
|
+
"@storybook/api": "7.0.0-alpha.8",
|
|
57
|
+
"@storybook/blocks": "7.0.0-alpha.8",
|
|
58
|
+
"@storybook/components": "7.0.0-alpha.8",
|
|
59
|
+
"@storybook/core-common": "7.0.0-alpha.8",
|
|
60
|
+
"@storybook/core-events": "7.0.0-alpha.8",
|
|
60
61
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
61
|
-
"@storybook/csf-tools": "7.0.0-alpha.
|
|
62
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
62
|
+
"@storybook/csf-tools": "7.0.0-alpha.8",
|
|
63
|
+
"@storybook/docs-tools": "7.0.0-alpha.8",
|
|
63
64
|
"@storybook/mdx1-csf": "^0.0.1",
|
|
64
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
65
|
-
"@storybook/postinstall": "7.0.0-alpha.
|
|
66
|
-
"@storybook/preview-web": "7.0.0-alpha.
|
|
67
|
-
"@storybook/source-loader": "7.0.0-alpha.
|
|
68
|
-
"@storybook/store": "7.0.0-alpha.
|
|
69
|
-
"@storybook/theming": "7.0.0-alpha.
|
|
65
|
+
"@storybook/node-logger": "7.0.0-alpha.8",
|
|
66
|
+
"@storybook/postinstall": "7.0.0-alpha.8",
|
|
67
|
+
"@storybook/preview-web": "7.0.0-alpha.8",
|
|
68
|
+
"@storybook/source-loader": "7.0.0-alpha.8",
|
|
69
|
+
"@storybook/store": "7.0.0-alpha.8",
|
|
70
|
+
"@storybook/theming": "7.0.0-alpha.8",
|
|
70
71
|
"babel-loader": "^8.2.5",
|
|
71
72
|
"core-js": "^3.8.2",
|
|
72
73
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
"publishConfig": {
|
|
102
103
|
"access": "public"
|
|
103
104
|
},
|
|
104
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "24725501c32a073cebc6bf2674a47357136fbe3a",
|
|
105
106
|
"storybook": {
|
|
106
107
|
"displayName": "Docs",
|
|
107
108
|
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.anchorBlockIdFromId = exports.Anchor = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
const anchorBlockIdFromId = storyId => `anchor--${storyId}`;
|
|
13
|
-
|
|
14
|
-
exports.anchorBlockIdFromId = anchorBlockIdFromId;
|
|
15
|
-
|
|
16
|
-
const Anchor = ({
|
|
17
|
-
storyId,
|
|
18
|
-
children
|
|
19
|
-
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
-
id: anchorBlockIdFromId(storyId)
|
|
21
|
-
}, children);
|
|
22
|
-
|
|
23
|
-
exports.Anchor = Anchor;
|