@storybook/react 10.2.0-alpha.0 → 10.2.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/_browser-chunks/{chunk-M77NQZM3.js → chunk-BMWJYMA6.js} +3 -3
- package/dist/_browser-chunks/{chunk-OCTWNRZO.js → chunk-CMP5DLKH.js} +1 -1
- package/dist/_browser-chunks/{chunk-FMVW4CIJ.js → chunk-DX2KEMQY.js} +52 -52
- package/dist/_browser-chunks/{chunk-7SRU6CYS.js → chunk-E4YOXNOQ.js} +10 -10
- package/dist/_browser-chunks/{chunk-34HS64JJ.js → chunk-GLRRNWDU.js} +1 -1
- package/dist/entry-preview-argtypes.js +2 -2
- package/dist/entry-preview-docs.js +2 -2
- package/dist/entry-preview.js +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +5 -5
- package/dist/preset.js +184 -158
- package/dist/preview.d.ts +8 -4
- package/dist/preview.js +5 -5
- package/package.json +5 -9
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
entry_preview_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GLRRNWDU.js";
|
|
4
4
|
import {
|
|
5
5
|
entry_preview_argtypes_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DX2KEMQY.js";
|
|
7
7
|
import {
|
|
8
8
|
entry_preview_docs_exports
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CMP5DLKH.js";
|
|
10
10
|
|
|
11
11
|
// src/preview.tsx
|
|
12
12
|
import { definePreview as definePreviewBase } from "storybook/internal/csf";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isMemo,
|
|
3
3
|
reactElementToJsxString
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E4YOXNOQ.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__export,
|
|
8
8
|
__toESM
|
|
9
9
|
} from "./chunk-SL3VIQZ3.js";
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// ../../../node_modules/estraverse/estraverse.js
|
|
12
12
|
var require_estraverse = __commonJS({
|
|
13
|
-
"
|
|
13
|
+
"../../../node_modules/estraverse/estraverse.js"(exports) {
|
|
14
14
|
(function clone(exports2) {
|
|
15
15
|
"use strict";
|
|
16
16
|
var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE;
|
|
@@ -395,9 +395,9 @@ var require_estraverse = __commonJS({
|
|
|
395
395
|
}
|
|
396
396
|
});
|
|
397
397
|
|
|
398
|
-
//
|
|
398
|
+
// ../../../node_modules/esutils/lib/ast.js
|
|
399
399
|
var require_ast = __commonJS({
|
|
400
|
-
"
|
|
400
|
+
"../../../node_modules/esutils/lib/ast.js"(exports, module) {
|
|
401
401
|
(function() {
|
|
402
402
|
"use strict";
|
|
403
403
|
function isExpression(node) {
|
|
@@ -502,9 +502,9 @@ var require_ast = __commonJS({
|
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
|
|
505
|
-
//
|
|
505
|
+
// ../../../node_modules/esutils/lib/code.js
|
|
506
506
|
var require_code = __commonJS({
|
|
507
|
-
"
|
|
507
|
+
"../../../node_modules/esutils/lib/code.js"(exports, module) {
|
|
508
508
|
(function() {
|
|
509
509
|
"use strict";
|
|
510
510
|
var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
|
|
@@ -596,9 +596,9 @@ var require_code = __commonJS({
|
|
|
596
596
|
}
|
|
597
597
|
});
|
|
598
598
|
|
|
599
|
-
//
|
|
599
|
+
// ../../../node_modules/esutils/lib/keyword.js
|
|
600
600
|
var require_keyword = __commonJS({
|
|
601
|
-
"
|
|
601
|
+
"../../../node_modules/esutils/lib/keyword.js"(exports, module) {
|
|
602
602
|
(function() {
|
|
603
603
|
"use strict";
|
|
604
604
|
var code = require_code();
|
|
@@ -702,9 +702,9 @@ var require_keyword = __commonJS({
|
|
|
702
702
|
}
|
|
703
703
|
});
|
|
704
704
|
|
|
705
|
-
//
|
|
705
|
+
// ../../../node_modules/esutils/lib/utils.js
|
|
706
706
|
var require_utils = __commonJS({
|
|
707
|
-
"
|
|
707
|
+
"../../../node_modules/esutils/lib/utils.js"(exports) {
|
|
708
708
|
(function() {
|
|
709
709
|
"use strict";
|
|
710
710
|
exports.ast = require_ast(), exports.code = require_code(), exports.keyword = require_keyword();
|
|
@@ -712,9 +712,9 @@ var require_utils = __commonJS({
|
|
|
712
712
|
}
|
|
713
713
|
});
|
|
714
714
|
|
|
715
|
-
//
|
|
715
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/base64.js
|
|
716
716
|
var require_base64 = __commonJS({
|
|
717
|
-
"
|
|
717
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/base64.js"(exports) {
|
|
718
718
|
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
719
719
|
exports.encode = function(number) {
|
|
720
720
|
if (0 <= number && number < intToCharMap.length)
|
|
@@ -728,9 +728,9 @@ var require_base64 = __commonJS({
|
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
730
|
|
|
731
|
-
//
|
|
731
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/base64-vlq.js
|
|
732
732
|
var require_base64_vlq = __commonJS({
|
|
733
|
-
"
|
|
733
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/base64-vlq.js"(exports) {
|
|
734
734
|
var base64 = require_base64(), VLQ_BASE_SHIFT = 5, VLQ_BASE = 1 << VLQ_BASE_SHIFT, VLQ_BASE_MASK = VLQ_BASE - 1, VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
735
735
|
function toVLQSigned(aValue) {
|
|
736
736
|
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
@@ -760,9 +760,9 @@ var require_base64_vlq = __commonJS({
|
|
|
760
760
|
}
|
|
761
761
|
});
|
|
762
762
|
|
|
763
|
-
//
|
|
763
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/util.js
|
|
764
764
|
var require_util = __commonJS({
|
|
765
|
-
"
|
|
765
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/util.js"(exports) {
|
|
766
766
|
function getArg(aArgs, aName, aDefaultValue) {
|
|
767
767
|
if (aName in aArgs)
|
|
768
768
|
return aArgs[aName];
|
|
@@ -892,9 +892,9 @@ var require_util = __commonJS({
|
|
|
892
892
|
}
|
|
893
893
|
});
|
|
894
894
|
|
|
895
|
-
//
|
|
895
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/array-set.js
|
|
896
896
|
var require_array_set = __commonJS({
|
|
897
|
-
"
|
|
897
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/array-set.js"(exports) {
|
|
898
898
|
var util = require_util(), has = Object.prototype.hasOwnProperty, hasNativeMap = typeof Map < "u";
|
|
899
899
|
function ArraySet() {
|
|
900
900
|
this._array = [], this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -941,9 +941,9 @@ var require_array_set = __commonJS({
|
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
943
|
|
|
944
|
-
//
|
|
944
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/mapping-list.js
|
|
945
945
|
var require_mapping_list = __commonJS({
|
|
946
|
-
"
|
|
946
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/mapping-list.js"(exports) {
|
|
947
947
|
var util = require_util();
|
|
948
948
|
function generatedPositionAfter(mappingA, mappingB) {
|
|
949
949
|
var lineA = mappingA.generatedLine, lineB = mappingB.generatedLine, columnA = mappingA.generatedColumn, columnB = mappingB.generatedColumn;
|
|
@@ -965,9 +965,9 @@ var require_mapping_list = __commonJS({
|
|
|
965
965
|
}
|
|
966
966
|
});
|
|
967
967
|
|
|
968
|
-
//
|
|
968
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/source-map-generator.js
|
|
969
969
|
var require_source_map_generator = __commonJS({
|
|
970
|
-
"
|
|
970
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/source-map-generator.js"(exports) {
|
|
971
971
|
var base64VLQ = require_base64_vlq(), util = require_util(), ArraySet = require_array_set().ArraySet, MappingList = require_mapping_list().MappingList;
|
|
972
972
|
function SourceMapGenerator(aArgs) {
|
|
973
973
|
aArgs || (aArgs = {}), this._file = util.getArg(aArgs, "file", null), this._sourceRoot = util.getArg(aArgs, "sourceRoot", null), this._skipValidation = util.getArg(aArgs, "skipValidation", !1), this._sources = new ArraySet(), this._names = new ArraySet(), this._mappings = new MappingList(), this._sourcesContents = null;
|
|
@@ -1095,9 +1095,9 @@ var require_source_map_generator = __commonJS({
|
|
|
1095
1095
|
}
|
|
1096
1096
|
});
|
|
1097
1097
|
|
|
1098
|
-
//
|
|
1098
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/binary-search.js
|
|
1099
1099
|
var require_binary_search = __commonJS({
|
|
1100
|
-
"
|
|
1100
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/binary-search.js"(exports) {
|
|
1101
1101
|
exports.GREATEST_LOWER_BOUND = 1;
|
|
1102
1102
|
exports.LEAST_UPPER_BOUND = 2;
|
|
1103
1103
|
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
@@ -1124,9 +1124,9 @@ var require_binary_search = __commonJS({
|
|
|
1124
1124
|
}
|
|
1125
1125
|
});
|
|
1126
1126
|
|
|
1127
|
-
//
|
|
1127
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/quick-sort.js
|
|
1128
1128
|
var require_quick_sort = __commonJS({
|
|
1129
|
-
"
|
|
1129
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/quick-sort.js"(exports) {
|
|
1130
1130
|
function swap(ary, x, y) {
|
|
1131
1131
|
var temp = ary[x];
|
|
1132
1132
|
ary[x] = ary[y], ary[y] = temp;
|
|
@@ -1151,9 +1151,9 @@ var require_quick_sort = __commonJS({
|
|
|
1151
1151
|
}
|
|
1152
1152
|
});
|
|
1153
1153
|
|
|
1154
|
-
//
|
|
1154
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/source-map-consumer.js
|
|
1155
1155
|
var require_source_map_consumer = __commonJS({
|
|
1156
|
-
"
|
|
1156
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/source-map-consumer.js"(exports) {
|
|
1157
1157
|
var util = require_util(), binarySearch = require_binary_search(), ArraySet = require_array_set().ArraySet, base64VLQ = require_base64_vlq(), quickSort = require_quick_sort().quickSort;
|
|
1158
1158
|
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
1159
1159
|
var sourceMap = aSourceMap;
|
|
@@ -1556,9 +1556,9 @@ var require_source_map_consumer = __commonJS({
|
|
|
1556
1556
|
}
|
|
1557
1557
|
});
|
|
1558
1558
|
|
|
1559
|
-
//
|
|
1559
|
+
// ../../../node_modules/escodegen/node_modules/source-map/lib/source-node.js
|
|
1560
1560
|
var require_source_node = __commonJS({
|
|
1561
|
-
"
|
|
1561
|
+
"../../../node_modules/escodegen/node_modules/source-map/lib/source-node.js"(exports) {
|
|
1562
1562
|
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator, util = require_util(), REGEX_NEWLINE = /(\r?\n)/, NEWLINE_CODE = 10, isSourceNode = "$$$isSourceNode$$$";
|
|
1563
1563
|
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
1564
1564
|
this.children = [], this.sourceContents = {}, this.line = aLine ?? null, this.column = aColumn ?? null, this.source = aSource ?? null, this.name = aName ?? null, this[isSourceNode] = !0, aChunks != null && this.add(aChunks);
|
|
@@ -1713,18 +1713,18 @@ var require_source_node = __commonJS({
|
|
|
1713
1713
|
}
|
|
1714
1714
|
});
|
|
1715
1715
|
|
|
1716
|
-
//
|
|
1716
|
+
// ../../../node_modules/escodegen/node_modules/source-map/source-map.js
|
|
1717
1717
|
var require_source_map = __commonJS({
|
|
1718
|
-
"
|
|
1718
|
+
"../../../node_modules/escodegen/node_modules/source-map/source-map.js"(exports) {
|
|
1719
1719
|
exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
1720
1720
|
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
1721
1721
|
exports.SourceNode = require_source_node().SourceNode;
|
|
1722
1722
|
}
|
|
1723
1723
|
});
|
|
1724
1724
|
|
|
1725
|
-
//
|
|
1725
|
+
// ../../../node_modules/escodegen/package.json
|
|
1726
1726
|
var require_package = __commonJS({
|
|
1727
|
-
"
|
|
1727
|
+
"../../../node_modules/escodegen/package.json"(exports, module) {
|
|
1728
1728
|
module.exports = {
|
|
1729
1729
|
name: "escodegen",
|
|
1730
1730
|
description: "ECMAScript code generator",
|
|
@@ -1791,9 +1791,9 @@ var require_package = __commonJS({
|
|
|
1791
1791
|
}
|
|
1792
1792
|
});
|
|
1793
1793
|
|
|
1794
|
-
//
|
|
1794
|
+
// ../../../node_modules/escodegen/escodegen.js
|
|
1795
1795
|
var require_escodegen = __commonJS({
|
|
1796
|
-
"
|
|
1796
|
+
"../../../node_modules/escodegen/escodegen.js"(exports) {
|
|
1797
1797
|
(function() {
|
|
1798
1798
|
"use strict";
|
|
1799
1799
|
var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse, esutils, base2, indent, json, renumber, hexadecimal, quotes, escapeless, newline, space, parentheses, semicolons, safeConcatenation, directive, extra, parse2, sourceMap, sourceCode, preserveBlankLines, FORMAT_MINIFY, FORMAT_DEFAULTS;
|
|
@@ -2761,9 +2761,9 @@ var require_escodegen = __commonJS({
|
|
|
2761
2761
|
}
|
|
2762
2762
|
});
|
|
2763
2763
|
|
|
2764
|
-
//
|
|
2764
|
+
// ../../../node_modules/acorn/dist/acorn.js
|
|
2765
2765
|
var require_acorn = __commonJS({
|
|
2766
|
-
"
|
|
2766
|
+
"../../../node_modules/acorn/dist/acorn.js"(exports, module) {
|
|
2767
2767
|
(function(global2, factory) {
|
|
2768
2768
|
typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global2 = global2 || self, factory(global2.acorn = {}));
|
|
2769
2769
|
})(exports, (function(exports2) {
|
|
@@ -5208,9 +5208,9 @@ var require_acorn = __commonJS({
|
|
|
5208
5208
|
}
|
|
5209
5209
|
});
|
|
5210
5210
|
|
|
5211
|
-
//
|
|
5211
|
+
// ../../../node_modules/acorn-jsx/xhtml.js
|
|
5212
5212
|
var require_xhtml = __commonJS({
|
|
5213
|
-
"
|
|
5213
|
+
"../../../node_modules/acorn-jsx/xhtml.js"(exports, module) {
|
|
5214
5214
|
module.exports = {
|
|
5215
5215
|
quot: '"',
|
|
5216
5216
|
amp: "&",
|
|
@@ -5469,9 +5469,9 @@ var require_xhtml = __commonJS({
|
|
|
5469
5469
|
}
|
|
5470
5470
|
});
|
|
5471
5471
|
|
|
5472
|
-
//
|
|
5472
|
+
// ../../../node_modules/acorn-jsx/index.js
|
|
5473
5473
|
var require_acorn_jsx = __commonJS({
|
|
5474
|
-
"
|
|
5474
|
+
"../../../node_modules/acorn-jsx/index.js"(exports, module) {
|
|
5475
5475
|
"use strict";
|
|
5476
5476
|
var XHTMLEntities = require_xhtml(), hexNumber = /^[\da-fA-F]+$/, decimalNumber = /^\d+$/, acornJsxMap = /* @__PURE__ */ new WeakMap();
|
|
5477
5477
|
function getJsxTokens(acorn) {
|
|
@@ -5734,9 +5734,9 @@ var require_acorn_jsx = __commonJS({
|
|
|
5734
5734
|
}
|
|
5735
5735
|
});
|
|
5736
5736
|
|
|
5737
|
-
//
|
|
5737
|
+
// ../../../node_modules/html-tags/html-tags.json
|
|
5738
5738
|
var require_html_tags = __commonJS({
|
|
5739
|
-
"
|
|
5739
|
+
"../../../node_modules/html-tags/html-tags.json"(exports, module) {
|
|
5740
5740
|
module.exports = [
|
|
5741
5741
|
"a",
|
|
5742
5742
|
"abbr",
|
|
@@ -5860,9 +5860,9 @@ var require_html_tags = __commonJS({
|
|
|
5860
5860
|
}
|
|
5861
5861
|
});
|
|
5862
5862
|
|
|
5863
|
-
//
|
|
5863
|
+
// ../../../node_modules/html-tags/index.js
|
|
5864
5864
|
var require_html_tags2 = __commonJS({
|
|
5865
|
-
"
|
|
5865
|
+
"../../../node_modules/html-tags/index.js"(exports, module) {
|
|
5866
5866
|
"use strict";
|
|
5867
5867
|
module.exports = require_html_tags();
|
|
5868
5868
|
}
|
|
@@ -5895,7 +5895,7 @@ var CUSTOM_CAPTION = "custom", OBJECT_CAPTION = "object", ARRAY_CAPTION = "array
|
|
|
5895
5895
|
// src/docs/lib/generateCode.ts
|
|
5896
5896
|
var import_escodegen = __toESM(require_escodegen(), 1);
|
|
5897
5897
|
|
|
5898
|
-
//
|
|
5898
|
+
// ../../../node_modules/ts-dedent/esm/index.js
|
|
5899
5899
|
function dedent(templ) {
|
|
5900
5900
|
for (var values = [], _i = 1; _i < arguments.length; _i++)
|
|
5901
5901
|
values[_i - 1] = arguments[_i];
|
|
@@ -5970,7 +5970,7 @@ function generateCompactArrayCode(ast) {
|
|
|
5970
5970
|
// src/docs/lib/inspection/acornParser.ts
|
|
5971
5971
|
var import_acorn = __toESM(require_acorn(), 1), import_acorn_jsx = __toESM(require_acorn_jsx(), 1);
|
|
5972
5972
|
|
|
5973
|
-
//
|
|
5973
|
+
// ../../../node_modules/acorn-walk/dist/walk.mjs
|
|
5974
5974
|
function simple(node, visitors, baseVisitor, state, override) {
|
|
5975
5975
|
baseVisitor || (baseVisitor = base), (function c(node2, st, override2) {
|
|
5976
5976
|
var type = override2 || node2.type, found = visitors[type];
|
|
@@ -6449,7 +6449,7 @@ import {
|
|
|
6449
6449
|
isTooLongForDefaultValueSummary as isTooLongForDefaultValueSummary4
|
|
6450
6450
|
} from "storybook/internal/docs-tools";
|
|
6451
6451
|
|
|
6452
|
-
//
|
|
6452
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
6453
6453
|
function isPlainObject(value) {
|
|
6454
6454
|
if (!value || typeof value != "object")
|
|
6455
6455
|
return !1;
|
|
@@ -6457,12 +6457,12 @@ function isPlainObject(value) {
|
|
|
6457
6457
|
return proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null ? Object.prototype.toString.call(value) === "[object Object]" : !1;
|
|
6458
6458
|
}
|
|
6459
6459
|
|
|
6460
|
-
//
|
|
6460
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isFunction.mjs
|
|
6461
6461
|
function isFunction(value) {
|
|
6462
6462
|
return typeof value == "function";
|
|
6463
6463
|
}
|
|
6464
6464
|
|
|
6465
|
-
//
|
|
6465
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isString.mjs
|
|
6466
6466
|
function isString(value) {
|
|
6467
6467
|
return typeof value == "string";
|
|
6468
6468
|
}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
__toESM
|
|
4
4
|
} from "./chunk-SL3VIQZ3.js";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// ../../../node_modules/@base2/pretty-print-object/dist/index.js
|
|
7
7
|
var require_dist = __commonJS({
|
|
8
|
-
"
|
|
8
|
+
"../../../node_modules/@base2/pretty-print-object/dist/index.js"(exports) {
|
|
9
9
|
"use strict";
|
|
10
10
|
var __assign = exports && exports.__assign || function() {
|
|
11
11
|
return __assign = Object.assign || function(t) {
|
|
@@ -100,9 +100,9 @@ var require_dist = __commonJS({
|
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
-
//
|
|
103
|
+
// ../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js
|
|
104
104
|
var require_react_is_production_min = __commonJS({
|
|
105
|
-
"
|
|
105
|
+
"../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
106
106
|
"use strict";
|
|
107
107
|
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
|
|
108
108
|
u = Symbol.for("react.module.reference");
|
|
@@ -197,9 +197,9 @@ var require_react_is_production_min = __commonJS({
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
|
|
200
|
-
//
|
|
200
|
+
// ../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.development.js
|
|
201
201
|
var require_react_is_development = __commonJS({
|
|
202
|
-
"
|
|
202
|
+
"../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
203
203
|
"use strict";
|
|
204
204
|
process.env.NODE_ENV !== "production" && (function() {
|
|
205
205
|
"use strict";
|
|
@@ -292,9 +292,9 @@ var require_react_is_development = __commonJS({
|
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
294
|
|
|
295
|
-
//
|
|
295
|
+
// ../../../node_modules/react-element-to-jsx-string/node_modules/react-is/index.js
|
|
296
296
|
var require_react_is = __commonJS({
|
|
297
|
-
"
|
|
297
|
+
"../../../node_modules/react-element-to-jsx-string/node_modules/react-is/index.js"(exports, module) {
|
|
298
298
|
"use strict";
|
|
299
299
|
process.env.NODE_ENV === "production" ? module.exports = require_react_is_production_min() : module.exports = require_react_is_development();
|
|
300
300
|
}
|
|
@@ -303,7 +303,7 @@ var require_react_is = __commonJS({
|
|
|
303
303
|
// src/docs/lib/componentTypes.ts
|
|
304
304
|
var isMemo = (component) => component.$$typeof === Symbol.for("react.memo"), isForwardRef = (component) => component.$$typeof === Symbol.for("react.forward_ref");
|
|
305
305
|
|
|
306
|
-
//
|
|
306
|
+
// ../../../node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
307
307
|
function isObject(o) {
|
|
308
308
|
return Object.prototype.toString.call(o) === "[object Object]";
|
|
309
309
|
}
|
|
@@ -312,7 +312,7 @@ function isPlainObject(o) {
|
|
|
312
312
|
return isObject(o) === !1 ? !1 : (ctor = o.constructor, ctor === void 0 ? !0 : (prot = ctor.prototype, !(isObject(prot) === !1 || prot.hasOwnProperty("isPrototypeOf") === !1)));
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
//
|
|
315
|
+
// ../../../node_modules/react-element-to-jsx-string/dist/esm/index.js
|
|
316
316
|
var import_pretty_print_object = __toESM(require_dist()), import_react_is = __toESM(require_react_is());
|
|
317
317
|
import * as React from "react";
|
|
318
318
|
import React__default, { Fragment, isValidElement as isValidElement2 } from "react";
|
|
@@ -158,7 +158,7 @@ var decorators = [
|
|
|
158
158
|
(story, context) => {
|
|
159
159
|
if (context.tags?.includes("test-fn") && !global2.FEATURES?.experimentalTestSyntax)
|
|
160
160
|
throw new Error(
|
|
161
|
-
"To use the experimental test function, you must enable the experimentalTestSyntax feature flag. See https://storybook.js.org/docs/
|
|
161
|
+
"To use the experimental test function, you must enable the experimentalTestSyntax feature flag. See https://storybook.js.org/docs/api/main-config/main-config-features#experimentaltestsyntax"
|
|
162
162
|
);
|
|
163
163
|
return story();
|
|
164
164
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
argTypesEnhancers,
|
|
3
3
|
parameters
|
|
4
|
-
} from "./_browser-chunks/chunk-
|
|
5
|
-
import "./_browser-chunks/chunk-
|
|
4
|
+
} from "./_browser-chunks/chunk-DX2KEMQY.js";
|
|
5
|
+
import "./_browser-chunks/chunk-E4YOXNOQ.js";
|
|
6
6
|
import "./_browser-chunks/chunk-SL3VIQZ3.js";
|
|
7
7
|
export {
|
|
8
8
|
argTypesEnhancers,
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
applyDecorators,
|
|
3
3
|
decorators,
|
|
4
4
|
parameters
|
|
5
|
-
} from "./_browser-chunks/chunk-
|
|
5
|
+
} from "./_browser-chunks/chunk-CMP5DLKH.js";
|
|
6
6
|
import "./_browser-chunks/chunk-DDIRQRCA.js";
|
|
7
|
-
import "./_browser-chunks/chunk-
|
|
7
|
+
import "./_browser-chunks/chunk-E4YOXNOQ.js";
|
|
8
8
|
import "./_browser-chunks/chunk-SL3VIQZ3.js";
|
|
9
9
|
export {
|
|
10
10
|
applyDecorators,
|
package/dist/entry-preview.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -501,6 +501,7 @@ declare function composeStories<TModule extends Store_CSFExports<ReactRenderer,
|
|
|
501
501
|
declare function __definePreview<Addons extends PreviewAddon<never>[]>(input: {
|
|
502
502
|
addons: Addons;
|
|
503
503
|
} & ProjectAnnotations<ReactTypes & InferTypes<Addons>>): ReactPreview<ReactTypes & InferTypes<Addons>>;
|
|
504
|
+
type InferArgs<TArgs extends Args, T extends AddonTypes, Decorators extends DecoratorFunction<ReactTypes & T, any>> = Simplify<TArgs & Simplify<RemoveIndexSignature<DecoratorsArgs<ReactTypes & T, Decorators>>>>;
|
|
504
505
|
/** @ts-expect-error We cannot implement the meta faithfully here, but that is okay. */
|
|
505
506
|
interface ReactPreview<T extends AddonTypes> extends Preview$1<ReactTypes & T> {
|
|
506
507
|
meta<TArgs extends Args, Decorators extends DecoratorFunction<ReactTypes & T, any>, TMetaArgs extends Partial<TArgs>>(meta: {
|
|
@@ -509,8 +510,10 @@ interface ReactPreview<T extends AddonTypes> extends Preview$1<ReactTypes & T> {
|
|
|
509
510
|
decorators?: Decorators | Decorators[];
|
|
510
511
|
args?: TMetaArgs;
|
|
511
512
|
} & Omit<ComponentAnnotations<ReactTypes & T, TArgs>, 'decorators' | 'component' | 'args' | 'render'>): ReactMeta<ReactTypes & T & {
|
|
512
|
-
args:
|
|
513
|
-
}, {
|
|
513
|
+
args: InferArgs<TArgs, T, Decorators>;
|
|
514
|
+
}, Omit<ComponentAnnotations<ReactTypes & T & {
|
|
515
|
+
args: InferArgs<TArgs, T, Decorators>;
|
|
516
|
+
}>, 'args'> & {
|
|
514
517
|
args: Partial<TArgs> extends TMetaArgs ? {} : TMetaArgs;
|
|
515
518
|
}>;
|
|
516
519
|
}
|
|
@@ -520,12 +523,13 @@ interface ReactMeta<T extends ReactTypes, MetaInput extends ComponentAnnotations
|
|
|
520
523
|
extends Meta$1<T, MetaInput> {
|
|
521
524
|
story<TInput extends (() => ReactTypes['storyResult']) | (StoryAnnotations<T, T['args']> & {
|
|
522
525
|
render: () => ReactTypes['storyResult'];
|
|
523
|
-
})>(story
|
|
526
|
+
})>(story: TInput): ReactStory<T, TInput extends () => ReactTypes['storyResult'] ? {
|
|
524
527
|
render: TInput;
|
|
525
528
|
} : TInput>;
|
|
526
|
-
story<TInput extends Simplify<StoryAnnotations<T, AddMocks<T['args'], MetaInput['args']>, SetOptional<T['args'], keyof T['args'] & keyof MetaInput['args']>>>>(story
|
|
529
|
+
story<TInput extends Simplify<StoryAnnotations<T, AddMocks<T['args'], MetaInput['args']>, SetOptional<T['args'], keyof T['args'] & keyof MetaInput['args']>>>>(story: TInput
|
|
527
530
|
/** @ts-expect-error hard */
|
|
528
531
|
): ReactStory<T, TInput>;
|
|
532
|
+
story(..._args: Partial<T['args']> extends SetOptional<T['args'], keyof T['args'] & keyof MetaInput['args']> ? [] : [never]): ReactStory<T, {}>;
|
|
529
533
|
}
|
|
530
534
|
interface ReactStory<T extends ReactTypes, TInput extends StoryAnnotations<T, T['args']>> extends Story<T, TInput> {
|
|
531
535
|
Component: ComponentType<Partial<T['args']>>;
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__definePreview
|
|
3
|
-
} from "./_browser-chunks/chunk-
|
|
3
|
+
} from "./_browser-chunks/chunk-BMWJYMA6.js";
|
|
4
4
|
import {
|
|
5
5
|
entry_preview_exports,
|
|
6
6
|
renderToCanvas
|
|
7
|
-
} from "./_browser-chunks/chunk-
|
|
7
|
+
} from "./_browser-chunks/chunk-GLRRNWDU.js";
|
|
8
8
|
import {
|
|
9
9
|
entry_preview_argtypes_exports
|
|
10
|
-
} from "./_browser-chunks/chunk-
|
|
11
|
-
import "./_browser-chunks/chunk-
|
|
10
|
+
} from "./_browser-chunks/chunk-DX2KEMQY.js";
|
|
11
|
+
import "./_browser-chunks/chunk-CMP5DLKH.js";
|
|
12
12
|
import "./_browser-chunks/chunk-DDIRQRCA.js";
|
|
13
|
-
import "./_browser-chunks/chunk-
|
|
13
|
+
import "./_browser-chunks/chunk-E4YOXNOQ.js";
|
|
14
14
|
import "./_browser-chunks/chunk-SL3VIQZ3.js";
|
|
15
15
|
|
|
16
16
|
// src/globals.ts
|