@storybook/addon-docs 10.0.0-rc.1 → 10.0.0-rc.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-4NTW6CRW.js → Color-64QXVMR3.js} +111 -2
- package/dist/_browser-chunks/chunk-DMNQCVA2.js +12 -0
- package/dist/_node-chunks/{chunk-BVX2KL6R.js → chunk-FLXWAWII.js} +7 -7
- package/dist/_node-chunks/{chunk-S746ELIE.js → chunk-GRKVYL46.js} +9 -9
- package/dist/_node-chunks/{chunk-QYDY2WKR.js → chunk-M5WZYDMC.js} +7 -7
- package/dist/_node-chunks/{chunk-CUR33QKS.js → chunk-WTNNUR4G.js} +6 -6
- package/dist/_node-chunks/{mdx-plugin-7RQ3CZCW.js → mdx-plugin-MZRAFGXC.js} +12 -12
- package/dist/_node-chunks/{rehype-external-links-SEOOBU2U.js → rehype-external-links-3XXZ5LIF.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-VOMHUXN2.js → rehype-slug-ZP342PB5.js} +8 -8
- package/dist/blocks.js +257 -28
- package/dist/mdx-loader.js +10 -10
- package/dist/preset.js +16 -11
- package/package.json +4 -4
- package/dist/_browser-chunks/chunk-ZK6NW3SW.js +0 -7132
package/dist/blocks.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
cloneDeep,
|
|
3
2
|
getControlId,
|
|
4
|
-
getControlSetterButtonId
|
|
5
|
-
|
|
6
|
-
uniq
|
|
7
|
-
} from "./_browser-chunks/chunk-ZK6NW3SW.js";
|
|
3
|
+
getControlSetterButtonId
|
|
4
|
+
} from "./_browser-chunks/chunk-DMNQCVA2.js";
|
|
8
5
|
import {
|
|
9
6
|
EmptyBlock,
|
|
10
7
|
Source,
|
|
@@ -261,6 +258,230 @@ import { once } from "storybook/internal/client-logger";
|
|
|
261
258
|
import { IconButton as IconButton3, Link as Link3, ResetWrapper as ResetWrapper3 } from "storybook/internal/components";
|
|
262
259
|
import { includeConditionalArg } from "storybook/internal/csf";
|
|
263
260
|
import { DocumentIcon as DocumentIcon2, UndoIcon } from "@storybook/icons";
|
|
261
|
+
|
|
262
|
+
// ../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
263
|
+
function isPrimitive(value2) {
|
|
264
|
+
return value2 == null || typeof value2 !== "object" && typeof value2 !== "function";
|
|
265
|
+
}
|
|
266
|
+
__name(isPrimitive, "isPrimitive");
|
|
267
|
+
|
|
268
|
+
// ../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
269
|
+
function isTypedArray(x2) {
|
|
270
|
+
return ArrayBuffer.isView(x2) && !(x2 instanceof DataView);
|
|
271
|
+
}
|
|
272
|
+
__name(isTypedArray, "isTypedArray");
|
|
273
|
+
|
|
274
|
+
// ../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
275
|
+
function getSymbols(object2) {
|
|
276
|
+
return Object.getOwnPropertySymbols(object2).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object2, symbol));
|
|
277
|
+
}
|
|
278
|
+
__name(getSymbols, "getSymbols");
|
|
279
|
+
|
|
280
|
+
// ../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
281
|
+
function getTag(value2) {
|
|
282
|
+
if (value2 == null) {
|
|
283
|
+
return value2 === void 0 ? "[object Undefined]" : "[object Null]";
|
|
284
|
+
}
|
|
285
|
+
return Object.prototype.toString.call(value2);
|
|
286
|
+
}
|
|
287
|
+
__name(getTag, "getTag");
|
|
288
|
+
|
|
289
|
+
// ../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
290
|
+
var regexpTag = "[object RegExp]";
|
|
291
|
+
var stringTag = "[object String]";
|
|
292
|
+
var numberTag = "[object Number]";
|
|
293
|
+
var booleanTag = "[object Boolean]";
|
|
294
|
+
var argumentsTag = "[object Arguments]";
|
|
295
|
+
var symbolTag = "[object Symbol]";
|
|
296
|
+
var dateTag = "[object Date]";
|
|
297
|
+
var mapTag = "[object Map]";
|
|
298
|
+
var setTag = "[object Set]";
|
|
299
|
+
var arrayTag = "[object Array]";
|
|
300
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
301
|
+
var objectTag = "[object Object]";
|
|
302
|
+
var dataViewTag = "[object DataView]";
|
|
303
|
+
var uint8ArrayTag = "[object Uint8Array]";
|
|
304
|
+
var uint8ClampedArrayTag = "[object Uint8ClampedArray]";
|
|
305
|
+
var uint16ArrayTag = "[object Uint16Array]";
|
|
306
|
+
var uint32ArrayTag = "[object Uint32Array]";
|
|
307
|
+
var int8ArrayTag = "[object Int8Array]";
|
|
308
|
+
var int16ArrayTag = "[object Int16Array]";
|
|
309
|
+
var int32ArrayTag = "[object Int32Array]";
|
|
310
|
+
var float32ArrayTag = "[object Float32Array]";
|
|
311
|
+
var float64ArrayTag = "[object Float64Array]";
|
|
312
|
+
|
|
313
|
+
// ../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
314
|
+
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
315
|
+
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
316
|
+
if (cloned !== void 0) {
|
|
317
|
+
return cloned;
|
|
318
|
+
}
|
|
319
|
+
if (isPrimitive(valueToClone)) {
|
|
320
|
+
return valueToClone;
|
|
321
|
+
}
|
|
322
|
+
if (stack.has(valueToClone)) {
|
|
323
|
+
return stack.get(valueToClone);
|
|
324
|
+
}
|
|
325
|
+
if (Array.isArray(valueToClone)) {
|
|
326
|
+
const result = new Array(valueToClone.length);
|
|
327
|
+
stack.set(valueToClone, result);
|
|
328
|
+
for (let i2 = 0; i2 < valueToClone.length; i2++) {
|
|
329
|
+
result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
|
|
330
|
+
}
|
|
331
|
+
if (Object.hasOwn(valueToClone, "index")) {
|
|
332
|
+
result.index = valueToClone.index;
|
|
333
|
+
}
|
|
334
|
+
if (Object.hasOwn(valueToClone, "input")) {
|
|
335
|
+
result.input = valueToClone.input;
|
|
336
|
+
}
|
|
337
|
+
return result;
|
|
338
|
+
}
|
|
339
|
+
if (valueToClone instanceof Date) {
|
|
340
|
+
return new Date(valueToClone.getTime());
|
|
341
|
+
}
|
|
342
|
+
if (valueToClone instanceof RegExp) {
|
|
343
|
+
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
344
|
+
result.lastIndex = valueToClone.lastIndex;
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
if (valueToClone instanceof Map) {
|
|
348
|
+
const result = /* @__PURE__ */ new Map();
|
|
349
|
+
stack.set(valueToClone, result);
|
|
350
|
+
for (const [key, value2] of valueToClone) {
|
|
351
|
+
result.set(key, cloneDeepWithImpl(value2, key, objectToClone, stack, cloneValue));
|
|
352
|
+
}
|
|
353
|
+
return result;
|
|
354
|
+
}
|
|
355
|
+
if (valueToClone instanceof Set) {
|
|
356
|
+
const result = /* @__PURE__ */ new Set();
|
|
357
|
+
stack.set(valueToClone, result);
|
|
358
|
+
for (const value2 of valueToClone) {
|
|
359
|
+
result.add(cloneDeepWithImpl(value2, void 0, objectToClone, stack, cloneValue));
|
|
360
|
+
}
|
|
361
|
+
return result;
|
|
362
|
+
}
|
|
363
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) {
|
|
364
|
+
return valueToClone.subarray();
|
|
365
|
+
}
|
|
366
|
+
if (isTypedArray(valueToClone)) {
|
|
367
|
+
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
368
|
+
stack.set(valueToClone, result);
|
|
369
|
+
for (let i2 = 0; i2 < valueToClone.length; i2++) {
|
|
370
|
+
result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
|
|
371
|
+
}
|
|
372
|
+
return result;
|
|
373
|
+
}
|
|
374
|
+
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) {
|
|
375
|
+
return valueToClone.slice(0);
|
|
376
|
+
}
|
|
377
|
+
if (valueToClone instanceof DataView) {
|
|
378
|
+
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
379
|
+
stack.set(valueToClone, result);
|
|
380
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
381
|
+
return result;
|
|
382
|
+
}
|
|
383
|
+
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
384
|
+
const result = new File([valueToClone], valueToClone.name, {
|
|
385
|
+
type: valueToClone.type
|
|
386
|
+
});
|
|
387
|
+
stack.set(valueToClone, result);
|
|
388
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
389
|
+
return result;
|
|
390
|
+
}
|
|
391
|
+
if (valueToClone instanceof Blob) {
|
|
392
|
+
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
393
|
+
stack.set(valueToClone, result);
|
|
394
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
395
|
+
return result;
|
|
396
|
+
}
|
|
397
|
+
if (valueToClone instanceof Error) {
|
|
398
|
+
const result = new valueToClone.constructor();
|
|
399
|
+
stack.set(valueToClone, result);
|
|
400
|
+
result.message = valueToClone.message;
|
|
401
|
+
result.name = valueToClone.name;
|
|
402
|
+
result.stack = valueToClone.stack;
|
|
403
|
+
result.cause = valueToClone.cause;
|
|
404
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
405
|
+
return result;
|
|
406
|
+
}
|
|
407
|
+
if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
|
|
408
|
+
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
409
|
+
stack.set(valueToClone, result);
|
|
410
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
411
|
+
return result;
|
|
412
|
+
}
|
|
413
|
+
return valueToClone;
|
|
414
|
+
}
|
|
415
|
+
__name(cloneDeepWithImpl, "cloneDeepWithImpl");
|
|
416
|
+
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
417
|
+
const keys = [...Object.keys(source), ...getSymbols(source)];
|
|
418
|
+
for (let i2 = 0; i2 < keys.length; i2++) {
|
|
419
|
+
const key = keys[i2];
|
|
420
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
421
|
+
if (descriptor == null || descriptor.writable) {
|
|
422
|
+
target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
__name(copyProperties, "copyProperties");
|
|
427
|
+
function isCloneableObject(object2) {
|
|
428
|
+
switch (getTag(object2)) {
|
|
429
|
+
case argumentsTag:
|
|
430
|
+
case arrayTag:
|
|
431
|
+
case arrayBufferTag:
|
|
432
|
+
case dataViewTag:
|
|
433
|
+
case booleanTag:
|
|
434
|
+
case dateTag:
|
|
435
|
+
case float32ArrayTag:
|
|
436
|
+
case float64ArrayTag:
|
|
437
|
+
case int8ArrayTag:
|
|
438
|
+
case int16ArrayTag:
|
|
439
|
+
case int32ArrayTag:
|
|
440
|
+
case mapTag:
|
|
441
|
+
case numberTag:
|
|
442
|
+
case objectTag:
|
|
443
|
+
case regexpTag:
|
|
444
|
+
case setTag:
|
|
445
|
+
case stringTag:
|
|
446
|
+
case symbolTag:
|
|
447
|
+
case uint8ArrayTag:
|
|
448
|
+
case uint8ClampedArrayTag:
|
|
449
|
+
case uint16ArrayTag:
|
|
450
|
+
case uint32ArrayTag: {
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
default: {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
__name(isCloneableObject, "isCloneableObject");
|
|
459
|
+
|
|
460
|
+
// ../../node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
461
|
+
function cloneDeep(obj) {
|
|
462
|
+
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
|
|
463
|
+
}
|
|
464
|
+
__name(cloneDeep, "cloneDeep");
|
|
465
|
+
|
|
466
|
+
// ../../node_modules/es-toolkit/dist/object/pickBy.mjs
|
|
467
|
+
function pickBy(obj, shouldPick) {
|
|
468
|
+
const result = {};
|
|
469
|
+
const keys = Object.keys(obj);
|
|
470
|
+
for (let i2 = 0; i2 < keys.length; i2++) {
|
|
471
|
+
const key = keys[i2];
|
|
472
|
+
const value2 = obj[key];
|
|
473
|
+
if (shouldPick(value2, key)) {
|
|
474
|
+
result[key] = value2;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return result;
|
|
478
|
+
}
|
|
479
|
+
__name(pickBy, "pickBy");
|
|
480
|
+
|
|
481
|
+
// ../../node_modules/es-toolkit/dist/string/words.mjs
|
|
482
|
+
var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
|
|
483
|
+
|
|
484
|
+
// src/blocks/components/ArgsTable/ArgsTable.tsx
|
|
264
485
|
import { styled as styled26 } from "storybook/theming";
|
|
265
486
|
|
|
266
487
|
// src/blocks/components/DocsPage.tsx
|
|
@@ -2182,19 +2403,19 @@ function extend(...args) {
|
|
|
2182
2403
|
__name(extend, "extend");
|
|
2183
2404
|
function throttle(fn, threshold, scope) {
|
|
2184
2405
|
threshold || (threshold = 250);
|
|
2185
|
-
let
|
|
2406
|
+
let last2;
|
|
2186
2407
|
let deferTimer;
|
|
2187
2408
|
return function(...args) {
|
|
2188
2409
|
const context = scope || this;
|
|
2189
2410
|
const now = +/* @__PURE__ */ new Date();
|
|
2190
|
-
if (
|
|
2411
|
+
if (last2 && now < last2 + threshold) {
|
|
2191
2412
|
clearTimeout(deferTimer);
|
|
2192
2413
|
deferTimer = setTimeout(() => {
|
|
2193
|
-
|
|
2414
|
+
last2 = now;
|
|
2194
2415
|
fn.apply(context, args);
|
|
2195
2416
|
}, threshold);
|
|
2196
2417
|
} else {
|
|
2197
|
-
|
|
2418
|
+
last2 = now;
|
|
2198
2419
|
fn.apply(context, args);
|
|
2199
2420
|
}
|
|
2200
2421
|
};
|
|
@@ -3244,8 +3465,8 @@ var CheckboxControl = /* @__PURE__ */ __name(({
|
|
|
3244
3465
|
logger.warn(`Checkbox with no options: ${name}`);
|
|
3245
3466
|
return React15.createElement(React15.Fragment, null, "-");
|
|
3246
3467
|
}
|
|
3247
|
-
const
|
|
3248
|
-
const [selected, setSelected] = useState6(
|
|
3468
|
+
const initial2 = selectedKeys(value2 || [], options);
|
|
3469
|
+
const [selected, setSelected] = useState6(initial2);
|
|
3249
3470
|
const readonly = !!argType?.table?.readonly;
|
|
3250
3471
|
const handleChange = /* @__PURE__ */ __name((e2) => {
|
|
3251
3472
|
const option = e2.target.value;
|
|
@@ -5531,7 +5752,7 @@ var FilesControl = /* @__PURE__ */ __name(({
|
|
|
5531
5752
|
}, "FilesControl");
|
|
5532
5753
|
|
|
5533
5754
|
// src/blocks/controls/index.tsx
|
|
5534
|
-
var LazyColorControl = lazy(() => import("./_browser-chunks/Color-
|
|
5755
|
+
var LazyColorControl = lazy(() => import("./_browser-chunks/Color-64QXVMR3.js"));
|
|
5535
5756
|
var ColorControl = /* @__PURE__ */ __name((props) => React26.createElement(Suspense, { fallback: React26.createElement("div", null) }, React26.createElement(LazyColorControl, { ...props })), "ColorControl");
|
|
5536
5757
|
|
|
5537
5758
|
// src/blocks/components/ArgsTable/ArgControl.tsx
|
|
@@ -5659,6 +5880,14 @@ var ArgJsDoc = /* @__PURE__ */ __name(({ tags }) => {
|
|
|
5659
5880
|
import React29, { useState as useState10 } from "react";
|
|
5660
5881
|
import { SyntaxHighlighter, WithTooltipPure, codeCommon as codeCommon2 } from "storybook/internal/components";
|
|
5661
5882
|
import { ChevronSmallDownIcon as ChevronSmallDownIcon2, ChevronSmallUpIcon } from "@storybook/icons";
|
|
5883
|
+
|
|
5884
|
+
// ../../node_modules/es-toolkit/dist/array/uniq.mjs
|
|
5885
|
+
function uniq(arr) {
|
|
5886
|
+
return Array.from(new Set(arr));
|
|
5887
|
+
}
|
|
5888
|
+
__name(uniq, "uniq");
|
|
5889
|
+
|
|
5890
|
+
// src/blocks/components/ArgsTable/ArgValue.tsx
|
|
5662
5891
|
var import_memoizerific = __toESM(require_memoizerific(), 1);
|
|
5663
5892
|
import { styled as styled21 } from "storybook/theming";
|
|
5664
5893
|
var ITEMS_BEFORE_EXPANSION = 8;
|
|
@@ -5837,14 +6066,14 @@ var toSummary = /* @__PURE__ */ __name((value2) => {
|
|
|
5837
6066
|
}, "toSummary");
|
|
5838
6067
|
var ArgRow = /* @__PURE__ */ __name((props) => {
|
|
5839
6068
|
const [isHovered, setIsHovered] = useState11(false);
|
|
5840
|
-
const { row, updateArgs, compact, expandable, initialExpandedArgs } = props;
|
|
6069
|
+
const { row, updateArgs, compact: compact2, expandable, initialExpandedArgs } = props;
|
|
5841
6070
|
const { name, description } = row;
|
|
5842
6071
|
const table = row.table || {};
|
|
5843
6072
|
const type = table.type || toSummary(row.type);
|
|
5844
6073
|
const defaultValue = table.defaultValue || row.defaultValue;
|
|
5845
6074
|
const required = row.type?.required;
|
|
5846
6075
|
const hasDescription = description != null && description !== "";
|
|
5847
|
-
return React30.createElement("tr", { onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false) }, React30.createElement(StyledTd, { expandable: expandable ?? false }, React30.createElement(Name, null, name), required ? React30.createElement(Required, { title: "Required" }, "*") : null),
|
|
6076
|
+
return React30.createElement("tr", { onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false) }, React30.createElement(StyledTd, { expandable: expandable ?? false }, React30.createElement(Name, null, name), required ? React30.createElement(Required, { title: "Required" }, "*") : null), compact2 ? null : React30.createElement("td", null, hasDescription && React30.createElement(Description, null, React30.createElement(index_modern_default, null, description)), table.jsDocTags != null ? React30.createElement(React30.Fragment, null, React30.createElement(TypeWithJsDoc, { hasDescription }, React30.createElement(ArgValue, { value: type, initialExpandedArgs })), React30.createElement(ArgJsDoc, { tags: table.jsDocTags })) : React30.createElement(Type, { hasDescription }, React30.createElement(ArgValue, { value: type, initialExpandedArgs }))), compact2 ? null : React30.createElement("td", null, React30.createElement(ArgValue, { value: defaultValue, initialExpandedArgs })), updateArgs ? React30.createElement("td", null, React30.createElement(ArgControl, { ...props, isHovered })) : null);
|
|
5848
6077
|
}, "ArgRow");
|
|
5849
6078
|
|
|
5850
6079
|
// src/blocks/components/ArgsTable/Empty.tsx
|
|
@@ -6069,7 +6298,7 @@ var SkeletonText = styled25.div(
|
|
|
6069
6298
|
var Skeleton = /* @__PURE__ */ __name(() => React33.createElement(TableWrapper, null, React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" }))), React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "80%" }), React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" }))), React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "80%" }), React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" }))), React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "80%" }), React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" })))), "Skeleton");
|
|
6070
6299
|
|
|
6071
6300
|
// src/blocks/components/ArgsTable/ArgsTable.tsx
|
|
6072
|
-
var TableWrapper2 = styled26.table(({ theme, compact, inAddonPanel }) => ({
|
|
6301
|
+
var TableWrapper2 = styled26.table(({ theme, compact: compact2, inAddonPanel }) => ({
|
|
6073
6302
|
"&&": {
|
|
6074
6303
|
// Resets for cascading/system styles
|
|
6075
6304
|
borderSpacing: 0,
|
|
@@ -6096,20 +6325,20 @@ var TableWrapper2 = styled26.table(({ theme, compact, inAddonPanel }) => ({
|
|
|
6096
6325
|
paddingLeft: 20
|
|
6097
6326
|
},
|
|
6098
6327
|
"th:nth-of-type(2), td:nth-of-type(2)": {
|
|
6099
|
-
...
|
|
6328
|
+
...compact2 ? null : {
|
|
6100
6329
|
// Description column
|
|
6101
6330
|
width: "35%"
|
|
6102
6331
|
}
|
|
6103
6332
|
},
|
|
6104
6333
|
"td:nth-of-type(3)": {
|
|
6105
|
-
...
|
|
6334
|
+
...compact2 ? null : {
|
|
6106
6335
|
// Defaults column
|
|
6107
6336
|
width: "15%"
|
|
6108
6337
|
}
|
|
6109
6338
|
},
|
|
6110
6339
|
"th:last-of-type, td:last-of-type": {
|
|
6111
6340
|
paddingRight: 20,
|
|
6112
|
-
...
|
|
6341
|
+
...compact2 ? null : {
|
|
6113
6342
|
// Controls column
|
|
6114
6343
|
width: "25%"
|
|
6115
6344
|
}
|
|
@@ -6259,7 +6488,7 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
|
|
|
6259
6488
|
const {
|
|
6260
6489
|
updateArgs,
|
|
6261
6490
|
resetArgs,
|
|
6262
|
-
compact,
|
|
6491
|
+
compact: compact2,
|
|
6263
6492
|
inAddonPanel,
|
|
6264
6493
|
initialExpandedArgs,
|
|
6265
6494
|
sort = "none",
|
|
@@ -6290,11 +6519,11 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
|
|
|
6290
6519
|
if (updateArgs) {
|
|
6291
6520
|
colSpan += 1;
|
|
6292
6521
|
}
|
|
6293
|
-
if (!
|
|
6522
|
+
if (!compact2) {
|
|
6294
6523
|
colSpan += 2;
|
|
6295
6524
|
}
|
|
6296
6525
|
const expandable = Object.keys(groups.sections).length > 0;
|
|
6297
|
-
const common = { updateArgs, compact, inAddonPanel, initialExpandedArgs };
|
|
6526
|
+
const common = { updateArgs, compact: compact2, inAddonPanel, initialExpandedArgs };
|
|
6298
6527
|
return React34.createElement(ResetWrapper3, null, React34.createElement(TablePositionWrapper, null, updateArgs && !isLoading && resetArgs && React34.createElement(ButtonPositionWrapper, null, React34.createElement(
|
|
6299
6528
|
IconButton3,
|
|
6300
6529
|
{
|
|
@@ -6303,7 +6532,7 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
|
|
|
6303
6532
|
title: "Reset controls"
|
|
6304
6533
|
},
|
|
6305
6534
|
React34.createElement(UndoIcon, null)
|
|
6306
|
-
)), React34.createElement(TableWrapper2, { ...{ compact, inAddonPanel }, className: "docblock-argstable sb-unstyled" }, React34.createElement("thead", { className: "docblock-argstable-head" }, React34.createElement("tr", null, React34.createElement("th", null, React34.createElement("span", null, "Name")),
|
|
6535
|
+
)), React34.createElement(TableWrapper2, { ...{ compact: compact2, inAddonPanel }, className: "docblock-argstable sb-unstyled" }, React34.createElement("thead", { className: "docblock-argstable-head" }, React34.createElement("tr", null, React34.createElement("th", null, React34.createElement("span", null, "Name")), compact2 ? null : React34.createElement("th", null, React34.createElement("span", null, "Description")), compact2 ? null : React34.createElement("th", null, React34.createElement("span", null, "Default")), updateArgs ? React34.createElement("th", null, React34.createElement("span", null, "Control")) : null)), React34.createElement("tbody", { className: "docblock-argstable-body" }, groups.ungrouped.map((row) => React34.createElement(ArgRow, { key: row.key, row, arg: args && args[row.key], ...common })), Object.entries(groups.ungroupedSubsections).map(([subcategory, subsection]) => React34.createElement(
|
|
6307
6536
|
SectionRow,
|
|
6308
6537
|
{
|
|
6309
6538
|
key: subcategory,
|
|
@@ -7161,10 +7390,10 @@ var require_get_intrinsic = __commonJS2({
|
|
|
7161
7390
|
var reEscapeChar2 = /\\(\\)?/g;
|
|
7162
7391
|
var stringToPath2 = /* @__PURE__ */ __name(function stringToPath3(string) {
|
|
7163
7392
|
var first = $strSlice(string, 0, 1);
|
|
7164
|
-
var
|
|
7165
|
-
if (first === "%" &&
|
|
7393
|
+
var last2 = $strSlice(string, -1);
|
|
7394
|
+
if (first === "%" && last2 !== "%") {
|
|
7166
7395
|
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
7167
|
-
} else if (
|
|
7396
|
+
} else if (last2 === "%" && first !== "%") {
|
|
7168
7397
|
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
7169
7398
|
}
|
|
7170
7399
|
var result = [];
|
|
@@ -7220,8 +7449,8 @@ var require_get_intrinsic = __commonJS2({
|
|
|
7220
7449
|
for (var i2 = 1, isOwn = true; i2 < parts.length; i2 += 1) {
|
|
7221
7450
|
var part = parts[i2];
|
|
7222
7451
|
var first = $strSlice(part, 0, 1);
|
|
7223
|
-
var
|
|
7224
|
-
if ((first === '"' || first === "'" || first === "`" || (
|
|
7452
|
+
var last2 = $strSlice(part, -1);
|
|
7453
|
+
if ((first === '"' || first === "'" || first === "`" || (last2 === '"' || last2 === "'" || last2 === "`")) && first !== last2) {
|
|
7225
7454
|
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
7226
7455
|
}
|
|
7227
7456
|
if (part === "constructor" || !isOwn) {
|
|
@@ -7482,7 +7711,7 @@ function baseGetTag(value2) {
|
|
|
7482
7711
|
}
|
|
7483
7712
|
__name(baseGetTag, "baseGetTag");
|
|
7484
7713
|
var baseGetTag_default = baseGetTag;
|
|
7485
|
-
var
|
|
7714
|
+
var isArray2 = Array.isArray;
|
|
7486
7715
|
var INFINITY = 1 / 0;
|
|
7487
7716
|
var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
|
|
7488
7717
|
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
package/dist/mdx-loader.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0s8sye56vu3e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0s8sye56vu3e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0s8sye56vu3e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0s8sye56vu3e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0s8sye56vu3e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0s8sye56vu3e.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-
|
|
14
|
+
} from "./_node-chunks/chunk-GRKVYL46.js";
|
|
15
|
+
import "./_node-chunks/chunk-M5WZYDMC.js";
|
|
16
|
+
import "./_node-chunks/chunk-FLXWAWII.js";
|
|
17
17
|
import {
|
|
18
18
|
__name
|
|
19
|
-
} from "./_node-chunks/chunk-
|
|
19
|
+
} from "./_node-chunks/chunk-WTNNUR4G.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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0s8sye56vu3e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0s8sye56vu3e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0s8sye56vu3e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0s8sye56vu3e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0s8sye56vu3e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0s8sye56vu3e.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-
|
|
14
|
+
} from "./_node-chunks/chunk-WTNNUR4G.js";
|
|
15
15
|
|
|
16
16
|
// src/preset.ts
|
|
17
17
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
@@ -492,8 +492,8 @@ 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-
|
|
496
|
-
const rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-
|
|
495
|
+
const rehypeSlug = (await import("./_node-chunks/rehype-slug-ZP342PB5.js")).default;
|
|
496
|
+
const rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-3XXZ5LIF.js")).default;
|
|
497
497
|
const mdxLoaderOptions = await options.presets.apply("mdxLoaderOptions", {
|
|
498
498
|
...mdxPluginOptions,
|
|
499
499
|
mdxCompileOptions: {
|
|
@@ -582,7 +582,7 @@ var addons = [
|
|
|
582
582
|
];
|
|
583
583
|
var viteFinal = /* @__PURE__ */ __name(async (config, options) => {
|
|
584
584
|
const { plugins = [] } = config;
|
|
585
|
-
const { mdxPlugin } = await import("./_node-chunks/mdx-plugin-
|
|
585
|
+
const { mdxPlugin } = await import("./_node-chunks/mdx-plugin-MZRAFGXC.js");
|
|
586
586
|
const { react, reactDom, mdx } = await getResolvedReact(options);
|
|
587
587
|
const packageDeduplicationPlugin = {
|
|
588
588
|
name: "storybook:package-deduplication",
|
|
@@ -613,7 +613,12 @@ var resolvedReact = /* @__PURE__ */ __name(async (existing) => ({
|
|
|
613
613
|
reactDom: existing?.reactDom ?? resolvePackageDir("react-dom"),
|
|
614
614
|
mdx: existing?.mdx ?? fileURLToPath2(import.meta.resolve("@mdx-js/react"))
|
|
615
615
|
}), "resolvedReact");
|
|
616
|
-
var optimizeViteDeps = [
|
|
616
|
+
var optimizeViteDeps = [
|
|
617
|
+
"@mdx-js/react",
|
|
618
|
+
"@storybook/addon-docs",
|
|
619
|
+
"@storybook/addon-docs/blocks",
|
|
620
|
+
"markdown-to-jsx"
|
|
621
|
+
];
|
|
617
622
|
export {
|
|
618
623
|
addons,
|
|
619
624
|
docsX as docs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-docs",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.2",
|
|
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.0.0-rc.
|
|
87
|
+
"@storybook/csf-plugin": "10.0.0-rc.2",
|
|
88
88
|
"@storybook/icons": "^1.6.0",
|
|
89
|
-
"@storybook/react-dom-shim": "10.0.0-rc.
|
|
89
|
+
"@storybook/react-dom-shim": "10.0.0-rc.2",
|
|
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,7 +113,7 @@
|
|
|
113
113
|
"vite": "^7.0.4"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"storybook": "^10.0.0-rc.
|
|
116
|
+
"storybook": "^10.0.0-rc.2"
|
|
117
117
|
},
|
|
118
118
|
"publishConfig": {
|
|
119
119
|
"access": "public"
|