@storybook/react 10.6.0-alpha.3 → 10.6.0-alpha.4
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_iituge5wv3 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_iituge5wv3 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_iituge5wv3 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_iituge5wv3.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_iituge5wv3.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_iituge5wv3.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -4187,7 +4187,7 @@ var require_util = __commonJS({
|
|
|
4187
4187
|
return path4 = parts.join("/"), path4 === "" && (path4 = isAbsolute4 ? "/" : "."), url ? (url.path = path4, urlGenerate(url)) : path4;
|
|
4188
4188
|
}
|
|
4189
4189
|
exports.normalize = normalize2;
|
|
4190
|
-
function
|
|
4190
|
+
function join5(aRoot, aPath) {
|
|
4191
4191
|
aRoot === "" && (aRoot = "."), aPath === "" && (aPath = ".");
|
|
4192
4192
|
var aPathUrl = urlParse(aPath), aRootUrl = urlParse(aRoot);
|
|
4193
4193
|
if (aRootUrl && (aRoot = aRootUrl.path || "/"), aPathUrl && !aPathUrl.scheme)
|
|
@@ -4199,7 +4199,7 @@ var require_util = __commonJS({
|
|
|
4199
4199
|
var joined = aPath.charAt(0) === "/" ? aPath : normalize2(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
|
4200
4200
|
return aRootUrl ? (aRootUrl.path = joined, urlGenerate(aRootUrl)) : joined;
|
|
4201
4201
|
}
|
|
4202
|
-
exports.join =
|
|
4202
|
+
exports.join = join5;
|
|
4203
4203
|
exports.isAbsolute = function(aPath) {
|
|
4204
4204
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
4205
4205
|
};
|
|
@@ -4271,7 +4271,7 @@ var require_util = __commonJS({
|
|
|
4271
4271
|
var index = parsed.path.lastIndexOf("/");
|
|
4272
4272
|
index >= 0 && (parsed.path = parsed.path.substring(0, index + 1));
|
|
4273
4273
|
}
|
|
4274
|
-
sourceURL =
|
|
4274
|
+
sourceURL = join5(urlGenerate(parsed), sourceURL);
|
|
4275
4275
|
}
|
|
4276
4276
|
return normalize2(sourceURL);
|
|
4277
4277
|
}
|
|
@@ -5183,7 +5183,7 @@ var require_escodegen = __commonJS({
|
|
|
5183
5183
|
"../../../node_modules/escodegen/escodegen.js"(exports) {
|
|
5184
5184
|
(function() {
|
|
5185
5185
|
"use strict";
|
|
5186
|
-
var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse, esutils, base2,
|
|
5186
|
+
var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse, esutils, base2, indent, json, renumber, hexadecimal, quotes, escapeless, newline, space, parentheses, semicolons, safeConcatenation, directive, extra, parse7, sourceMap, sourceCode, preserveBlankLines, FORMAT_MINIFY, FORMAT_DEFAULTS;
|
|
5187
5187
|
estraverse = require_estraverse(), esutils = require_utils3(), Syntax = estraverse.Syntax;
|
|
5188
5188
|
function isExpression(node) {
|
|
5189
5189
|
return CodeGenerator.Expression.hasOwnProperty(node.type);
|
|
@@ -5415,7 +5415,7 @@ var require_escodegen = __commonJS({
|
|
|
5415
5415
|
function noEmptySpace() {
|
|
5416
5416
|
return space || " ";
|
|
5417
5417
|
}
|
|
5418
|
-
function
|
|
5418
|
+
function join5(left, right) {
|
|
5419
5419
|
var leftSource, rightSource, leftCharCode, rightCharCode;
|
|
5420
5420
|
return leftSource = toSourceNodeWhenNeeded(left).toString(), leftSource.length === 0 ? [right] : (rightSource = toSourceNodeWhenNeeded(right).toString(), rightSource.length === 0 ? [left] : (leftCharCode = leftSource.charCodeAt(leftSource.length - 1), rightCharCode = rightSource.charCodeAt(0), (leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || leftCharCode === 47 && rightCharCode === 105 ? [left, noEmptySpace(), right] : esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode) ? [left, right] : [left, space, right]));
|
|
5421
5421
|
}
|
|
@@ -5424,7 +5424,7 @@ var require_escodegen = __commonJS({
|
|
|
5424
5424
|
}
|
|
5425
5425
|
function withIndent(fn) {
|
|
5426
5426
|
var previousBase;
|
|
5427
|
-
previousBase = base2, base2 +=
|
|
5427
|
+
previousBase = base2, base2 += indent, fn(base2), base2 = previousBase;
|
|
5428
5428
|
}
|
|
5429
5429
|
function calculateSpaces(str) {
|
|
5430
5430
|
var i2;
|
|
@@ -5477,8 +5477,8 @@ var require_escodegen = __commonJS({
|
|
|
5477
5477
|
comment = stmt.trailingComments[0], extRange = comment.extendedRange, range = comment.range, prefix = sourceCode.substring(extRange[0], range[0]), count = (prefix.match(/\n/g) || []).length, count > 0 ? (result.push(stringRepeat(`
|
|
5478
5478
|
`, count)), result.push(addIndent(generateComment(comment)))) : (result.push(prefix), result.push(generateComment(comment)));
|
|
5479
5479
|
else
|
|
5480
|
-
for (tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()), specialBase = stringRepeat(" ", calculateSpaces(toSourceNodeWhenNeeded([base2, result,
|
|
5481
|
-
comment = stmt.trailingComments[i2], tailingToStatement ? (i2 === 0 ? result = [result,
|
|
5480
|
+
for (tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()), specialBase = stringRepeat(" ", calculateSpaces(toSourceNodeWhenNeeded([base2, result, indent]).toString())), i2 = 0, len = stmt.trailingComments.length; i2 < len; ++i2)
|
|
5481
|
+
comment = stmt.trailingComments[i2], tailingToStatement ? (i2 === 0 ? result = [result, indent] : result = [result, specialBase], result.push(generateComment(comment, specialBase))) : result = [result, addIndent(generateComment(comment))], i2 !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && (result = [result, `
|
|
5482
5482
|
`]);
|
|
5483
5483
|
return result;
|
|
5484
5484
|
}
|
|
@@ -5551,7 +5551,7 @@ var require_escodegen = __commonJS({
|
|
|
5551
5551
|
return withIndent(function() {
|
|
5552
5552
|
stmt.left.type === Syntax.VariableDeclaration ? withIndent(function() {
|
|
5553
5553
|
result.push(stmt.left.kind + noEmptySpace()), result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF));
|
|
5554
|
-
}) : result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT)), result =
|
|
5554
|
+
}) : result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT)), result = join5(result, operator), result = [join5(
|
|
5555
5555
|
result,
|
|
5556
5556
|
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
|
|
5557
5557
|
), ")"];
|
|
@@ -5591,22 +5591,22 @@ var require_escodegen = __commonJS({
|
|
|
5591
5591
|
},
|
|
5592
5592
|
ClassBody: function(stmt, flags) {
|
|
5593
5593
|
var result = ["{", newline], that = this;
|
|
5594
|
-
return withIndent(function(
|
|
5594
|
+
return withIndent(function(indent2) {
|
|
5595
5595
|
var i2, iz;
|
|
5596
5596
|
for (i2 = 0, iz = stmt.body.length; i2 < iz; ++i2)
|
|
5597
|
-
result.push(
|
|
5597
|
+
result.push(indent2), result.push(that.generateExpression(stmt.body[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push(newline);
|
|
5598
5598
|
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2), result.push("}"), result;
|
|
5599
5599
|
},
|
|
5600
5600
|
ClassDeclaration: function(stmt, flags) {
|
|
5601
5601
|
var result, fragment;
|
|
5602
|
-
return result = ["class"], stmt.id && (result =
|
|
5602
|
+
return result = ["class"], stmt.id && (result = join5(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT))), stmt.superClass && (fragment = join5("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT)), result = join5(result, fragment)), result.push(space), result.push(this.generateStatement(stmt.body, S_TFFT)), result;
|
|
5603
5603
|
},
|
|
5604
5604
|
DirectiveStatement: function(stmt, flags) {
|
|
5605
5605
|
return extra.raw && stmt.raw ? stmt.raw + this.semicolon(flags) : escapeDirective(stmt.directive) + this.semicolon(flags);
|
|
5606
5606
|
},
|
|
5607
5607
|
DoWhileStatement: function(stmt, flags) {
|
|
5608
|
-
var result =
|
|
5609
|
-
return result = this.maybeBlockSuffix(stmt.body, result),
|
|
5608
|
+
var result = join5("do", this.maybeBlock(stmt.body, S_TFFF));
|
|
5609
|
+
return result = this.maybeBlockSuffix(stmt.body, result), join5(result, [
|
|
5610
5610
|
"while" + space + "(",
|
|
5611
5611
|
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
5612
5612
|
")" + this.semicolon(flags)
|
|
@@ -5631,15 +5631,15 @@ var require_escodegen = __commonJS({
|
|
|
5631
5631
|
},
|
|
5632
5632
|
ExportDefaultDeclaration: function(stmt, flags) {
|
|
5633
5633
|
var result = ["export"], bodyFlags;
|
|
5634
|
-
return bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF, result =
|
|
5634
|
+
return bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF, result = join5(result, "default"), isStatement(stmt.declaration) ? result = join5(result, this.generateStatement(stmt.declaration, bodyFlags)) : result = join5(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags)), result;
|
|
5635
5635
|
},
|
|
5636
5636
|
ExportNamedDeclaration: function(stmt, flags) {
|
|
5637
5637
|
var result = ["export"], bodyFlags, that = this;
|
|
5638
|
-
return bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF, stmt.declaration ?
|
|
5638
|
+
return bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF, stmt.declaration ? join5(result, this.generateStatement(stmt.declaration, bodyFlags)) : (stmt.specifiers && (stmt.specifiers.length === 0 ? result = join5(result, "{" + space + "}") : stmt.specifiers[0].type === Syntax.ExportBatchSpecifier ? result = join5(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)) : (result = join5(result, "{"), withIndent(function(indent2) {
|
|
5639
5639
|
var i2, iz;
|
|
5640
5640
|
for (result.push(newline), i2 = 0, iz = stmt.specifiers.length; i2 < iz; ++i2)
|
|
5641
|
-
result.push(
|
|
5642
|
-
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2 + "}")), stmt.source ? result =
|
|
5641
|
+
result.push(indent2), result.push(that.generateExpression(stmt.specifiers[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push("," + newline);
|
|
5642
|
+
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2 + "}")), stmt.source ? result = join5(result, [
|
|
5643
5643
|
"from" + space,
|
|
5644
5644
|
// ModuleSpecifier
|
|
5645
5645
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -5687,16 +5687,16 @@ var require_escodegen = __commonJS({
|
|
|
5687
5687
|
this.semicolon(flags)
|
|
5688
5688
|
] : (result = [
|
|
5689
5689
|
"import"
|
|
5690
|
-
], cursor = 0, stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier && (result =
|
|
5690
|
+
], cursor = 0, stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier && (result = join5(result, [
|
|
5691
5691
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
5692
|
-
]), ++cursor), stmt.specifiers[cursor] && (cursor !== 0 && result.push(","), stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier ? result =
|
|
5692
|
+
]), ++cursor), stmt.specifiers[cursor] && (cursor !== 0 && result.push(","), stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier ? result = join5(result, [
|
|
5693
5693
|
space,
|
|
5694
5694
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
5695
|
-
]) : (result.push(space + "{"), stmt.specifiers.length - cursor === 1 ? (result.push(space), result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)), result.push(space + "}" + space)) : (withIndent(function(
|
|
5695
|
+
]) : (result.push(space + "{"), stmt.specifiers.length - cursor === 1 ? (result.push(space), result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)), result.push(space + "}" + space)) : (withIndent(function(indent2) {
|
|
5696
5696
|
var i2, iz;
|
|
5697
5697
|
for (result.push(newline), i2 = cursor, iz = stmt.specifiers.length; i2 < iz; ++i2)
|
|
5698
|
-
result.push(
|
|
5699
|
-
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2 + "}" + space)))), result =
|
|
5698
|
+
result.push(indent2), result.push(that.generateExpression(stmt.specifiers[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push("," + newline);
|
|
5699
|
+
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2 + "}" + space)))), result = join5(result, [
|
|
5700
5700
|
"from" + space,
|
|
5701
5701
|
// ModuleSpecifier
|
|
5702
5702
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -5724,7 +5724,7 @@ var require_escodegen = __commonJS({
|
|
|
5724
5724
|
return stmt.declarations.length > 1 ? withIndent(block) : block(), result.push(this.semicolon(flags)), result;
|
|
5725
5725
|
},
|
|
5726
5726
|
ThrowStatement: function(stmt, flags) {
|
|
5727
|
-
return [
|
|
5727
|
+
return [join5(
|
|
5728
5728
|
"throw",
|
|
5729
5729
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
5730
5730
|
), this.semicolon(flags)];
|
|
@@ -5733,18 +5733,18 @@ var require_escodegen = __commonJS({
|
|
|
5733
5733
|
var result, i2, iz, guardedHandlers;
|
|
5734
5734
|
if (result = ["try", this.maybeBlock(stmt.block, S_TFFF)], result = this.maybeBlockSuffix(stmt.block, result), stmt.handlers)
|
|
5735
5735
|
for (i2 = 0, iz = stmt.handlers.length; i2 < iz; ++i2)
|
|
5736
|
-
result =
|
|
5736
|
+
result = join5(result, this.generateStatement(stmt.handlers[i2], S_TFFF)), (stmt.finalizer || i2 + 1 !== iz) && (result = this.maybeBlockSuffix(stmt.handlers[i2].body, result));
|
|
5737
5737
|
else {
|
|
5738
5738
|
for (guardedHandlers = stmt.guardedHandlers || [], i2 = 0, iz = guardedHandlers.length; i2 < iz; ++i2)
|
|
5739
|
-
result =
|
|
5739
|
+
result = join5(result, this.generateStatement(guardedHandlers[i2], S_TFFF)), (stmt.finalizer || i2 + 1 !== iz) && (result = this.maybeBlockSuffix(guardedHandlers[i2].body, result));
|
|
5740
5740
|
if (stmt.handler)
|
|
5741
5741
|
if (Array.isArray(stmt.handler))
|
|
5742
5742
|
for (i2 = 0, iz = stmt.handler.length; i2 < iz; ++i2)
|
|
5743
|
-
result =
|
|
5743
|
+
result = join5(result, this.generateStatement(stmt.handler[i2], S_TFFF)), (stmt.finalizer || i2 + 1 !== iz) && (result = this.maybeBlockSuffix(stmt.handler[i2].body, result));
|
|
5744
5744
|
else
|
|
5745
|
-
result =
|
|
5745
|
+
result = join5(result, this.generateStatement(stmt.handler, S_TFFF)), stmt.finalizer && (result = this.maybeBlockSuffix(stmt.handler.body, result));
|
|
5746
5746
|
}
|
|
5747
|
-
return stmt.finalizer && (result =
|
|
5747
|
+
return stmt.finalizer && (result = join5(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)])), result;
|
|
5748
5748
|
},
|
|
5749
5749
|
SwitchStatement: function(stmt, flags) {
|
|
5750
5750
|
var result, fragment, i2, iz, bodyFlags, that = this;
|
|
@@ -5763,7 +5763,7 @@ var require_escodegen = __commonJS({
|
|
|
5763
5763
|
var result, fragment, i2, iz, bodyFlags, that = this;
|
|
5764
5764
|
return withIndent(function() {
|
|
5765
5765
|
for (stmt.test ? result = [
|
|
5766
|
-
|
|
5766
|
+
join5("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
5767
5767
|
":"
|
|
5768
5768
|
] : result = ["default:"], i2 = 0, iz = stmt.consequent.length, iz && stmt.consequent[0].type === Syntax.BlockStatement && (fragment = that.maybeBlock(stmt.consequent[0], S_TFFF), result.push(fragment), i2 = 1), i2 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && result.push(newline), bodyFlags = S_TFFF; i2 < iz; ++i2)
|
|
5769
5769
|
i2 === iz - 1 && flags & F_SEMICOLON_OPT && (bodyFlags |= F_SEMICOLON_OPT), fragment = addIndent(that.generateStatement(stmt.consequent[i2], bodyFlags)), result.push(fragment), i2 + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) && result.push(newline);
|
|
@@ -5777,7 +5777,7 @@ var require_escodegen = __commonJS({
|
|
|
5777
5777
|
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
5778
5778
|
")"
|
|
5779
5779
|
];
|
|
5780
|
-
}), semicolonOptional = flags & F_SEMICOLON_OPT, bodyFlags = S_TFFF, semicolonOptional && (bodyFlags |= F_SEMICOLON_OPT), stmt.alternate ? (result.push(this.maybeBlock(stmt.consequent, S_TFFF)), result = this.maybeBlockSuffix(stmt.consequent, result), stmt.alternate.type === Syntax.IfStatement ? result =
|
|
5780
|
+
}), semicolonOptional = flags & F_SEMICOLON_OPT, bodyFlags = S_TFFF, semicolonOptional && (bodyFlags |= F_SEMICOLON_OPT), stmt.alternate ? (result.push(this.maybeBlock(stmt.consequent, S_TFFF)), result = this.maybeBlockSuffix(stmt.consequent, result), stmt.alternate.type === Syntax.IfStatement ? result = join5(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]) : result = join5(result, join5("else", this.maybeBlock(stmt.alternate, bodyFlags)))) : result.push(this.maybeBlock(stmt.consequent, bodyFlags)), result;
|
|
5781
5781
|
},
|
|
5782
5782
|
ForStatement: function(stmt, flags) {
|
|
5783
5783
|
var result, that = this;
|
|
@@ -5811,7 +5811,7 @@ var require_escodegen = __commonJS({
|
|
|
5811
5811
|
];
|
|
5812
5812
|
},
|
|
5813
5813
|
ReturnStatement: function(stmt, flags) {
|
|
5814
|
-
return stmt.argument ? [
|
|
5814
|
+
return stmt.argument ? [join5(
|
|
5815
5815
|
"return",
|
|
5816
5816
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
5817
5817
|
), this.semicolon(flags)] : ["return" + this.semicolon(flags)];
|
|
@@ -5867,7 +5867,7 @@ var require_escodegen = __commonJS({
|
|
|
5867
5867
|
},
|
|
5868
5868
|
BinaryExpression: function(expr, precedence, flags) {
|
|
5869
5869
|
var result, leftPrecedence, rightPrecedence, currentPrecedence, fragment, leftSource;
|
|
5870
|
-
return currentPrecedence = BinaryPrecedence[expr.operator], leftPrecedence = expr.operator === "**" ? Precedence.Postfix : currentPrecedence, rightPrecedence = expr.operator === "**" ? currentPrecedence : currentPrecedence + 1, currentPrecedence < precedence && (flags |= F_ALLOW_IN), fragment = this.generateExpression(expr.left, leftPrecedence, flags), leftSource = fragment.toString(), leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0)) ? result = [fragment, noEmptySpace(), expr.operator] : result =
|
|
5870
|
+
return currentPrecedence = BinaryPrecedence[expr.operator], leftPrecedence = expr.operator === "**" ? Precedence.Postfix : currentPrecedence, rightPrecedence = expr.operator === "**" ? currentPrecedence : currentPrecedence + 1, currentPrecedence < precedence && (flags |= F_ALLOW_IN), fragment = this.generateExpression(expr.left, leftPrecedence, flags), leftSource = fragment.toString(), leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0)) ? result = [fragment, noEmptySpace(), expr.operator] : result = join5(fragment, expr.operator), fragment = this.generateExpression(expr.right, rightPrecedence, flags), expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--" ? (result.push(noEmptySpace()), result.push(fragment)) : result = join5(result, fragment), expr.operator === "in" && !(flags & F_ALLOW_IN) ? ["(", result, ")"] : (expr.operator === "||" || expr.operator === "&&") && flags & F_FOUND_COALESCE ? ["(", result, ")"] : parenthesize(result, currentPrecedence, precedence);
|
|
5871
5871
|
},
|
|
5872
5872
|
CallExpression: function(expr, precedence, flags) {
|
|
5873
5873
|
var result, i2, iz;
|
|
@@ -5882,7 +5882,7 @@ var require_escodegen = __commonJS({
|
|
|
5882
5882
|
},
|
|
5883
5883
|
NewExpression: function(expr, precedence, flags) {
|
|
5884
5884
|
var result, length, i2, iz, itemFlags;
|
|
5885
|
-
if (length = expr.arguments.length, itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF, result =
|
|
5885
|
+
if (length = expr.arguments.length, itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF, result = join5(
|
|
5886
5886
|
"new",
|
|
5887
5887
|
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
5888
5888
|
), !(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
|
|
@@ -5902,17 +5902,17 @@ var require_escodegen = __commonJS({
|
|
|
5902
5902
|
},
|
|
5903
5903
|
UnaryExpression: function(expr, precedence, flags) {
|
|
5904
5904
|
var result, fragment, rightCharCode, leftSource, leftCharCode;
|
|
5905
|
-
return fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT), space === "" ? result =
|
|
5905
|
+
return fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT), space === "" ? result = join5(expr.operator, fragment) : (result = [expr.operator], expr.operator.length > 2 ? result = join5(result, fragment) : (leftSource = toSourceNodeWhenNeeded(result).toString(), leftCharCode = leftSource.charCodeAt(leftSource.length - 1), rightCharCode = fragment.toString().charCodeAt(0), ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode)) && result.push(noEmptySpace()), result.push(fragment))), parenthesize(result, Precedence.Unary, precedence);
|
|
5906
5906
|
},
|
|
5907
5907
|
YieldExpression: function(expr, precedence, flags) {
|
|
5908
5908
|
var result;
|
|
5909
|
-
return expr.delegate ? result = "yield*" : result = "yield", expr.argument && (result =
|
|
5909
|
+
return expr.delegate ? result = "yield*" : result = "yield", expr.argument && (result = join5(
|
|
5910
5910
|
result,
|
|
5911
5911
|
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
|
5912
5912
|
)), parenthesize(result, Precedence.Yield, precedence);
|
|
5913
5913
|
},
|
|
5914
5914
|
AwaitExpression: function(expr, precedence, flags) {
|
|
5915
|
-
var result =
|
|
5915
|
+
var result = join5(
|
|
5916
5916
|
expr.all ? "await*" : "await",
|
|
5917
5917
|
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
|
5918
5918
|
);
|
|
@@ -5947,10 +5947,10 @@ var require_escodegen = __commonJS({
|
|
|
5947
5947
|
},
|
|
5948
5948
|
ArrayExpression: function(expr, precedence, flags, isPattern) {
|
|
5949
5949
|
var result, multiline, that = this;
|
|
5950
|
-
return expr.elements.length ? (multiline = isPattern ? !1 : expr.elements.length > 1, result = ["[", multiline ? newline : ""], withIndent(function(
|
|
5950
|
+
return expr.elements.length ? (multiline = isPattern ? !1 : expr.elements.length > 1, result = ["[", multiline ? newline : ""], withIndent(function(indent2) {
|
|
5951
5951
|
var i2, iz;
|
|
5952
5952
|
for (i2 = 0, iz = expr.elements.length; i2 < iz; ++i2)
|
|
5953
|
-
expr.elements[i2] ? (result.push(multiline ?
|
|
5953
|
+
expr.elements[i2] ? (result.push(multiline ? indent2 : ""), result.push(that.generateExpression(expr.elements[i2], Precedence.Assignment, E_TTT))) : (multiline && result.push(indent2), i2 + 1 === iz && result.push(",")), i2 + 1 < iz && result.push("," + (multiline ? newline : space));
|
|
5954
5954
|
}), multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && result.push(newline), result.push(multiline ? base2 : ""), result.push("]"), result) : "[]";
|
|
5955
5955
|
},
|
|
5956
5956
|
RestElement: function(expr, precedence, flags) {
|
|
@@ -5958,18 +5958,18 @@ var require_escodegen = __commonJS({
|
|
|
5958
5958
|
},
|
|
5959
5959
|
ClassExpression: function(expr, precedence, flags) {
|
|
5960
5960
|
var result, fragment;
|
|
5961
|
-
return result = ["class"], expr.id && (result =
|
|
5961
|
+
return result = ["class"], expr.id && (result = join5(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT))), expr.superClass && (fragment = join5("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT)), result = join5(result, fragment)), result.push(space), result.push(this.generateStatement(expr.body, S_TFFT)), result;
|
|
5962
5962
|
},
|
|
5963
5963
|
MethodDefinition: function(expr, precedence, flags) {
|
|
5964
5964
|
var result, fragment;
|
|
5965
5965
|
return expr.static ? result = ["static" + space] : result = [], expr.kind === "get" || expr.kind === "set" ? fragment = [
|
|
5966
|
-
|
|
5966
|
+
join5(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
|
|
5967
5967
|
this.generateFunctionBody(expr.value)
|
|
5968
5968
|
] : fragment = [
|
|
5969
5969
|
generateMethodPrefix(expr),
|
|
5970
5970
|
this.generatePropertyKey(expr.key, expr.computed),
|
|
5971
5971
|
this.generateFunctionBody(expr.value)
|
|
5972
|
-
],
|
|
5972
|
+
], join5(result, fragment);
|
|
5973
5973
|
},
|
|
5974
5974
|
Property: function(expr, precedence, flags) {
|
|
5975
5975
|
return expr.kind === "get" || expr.kind === "set" ? [
|
|
@@ -5991,11 +5991,11 @@ var require_escodegen = __commonJS({
|
|
|
5991
5991
|
var multiline, result, fragment, that = this;
|
|
5992
5992
|
return expr.properties.length ? (multiline = expr.properties.length > 1, withIndent(function() {
|
|
5993
5993
|
fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
|
|
5994
|
-
}), !multiline && !hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ? ["{", space, fragment, space, "}"] : (withIndent(function(
|
|
5994
|
+
}), !multiline && !hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ? ["{", space, fragment, space, "}"] : (withIndent(function(indent2) {
|
|
5995
5995
|
var i2, iz;
|
|
5996
|
-
if (result = ["{", newline,
|
|
5996
|
+
if (result = ["{", newline, indent2, fragment], multiline)
|
|
5997
5997
|
for (result.push("," + newline), i2 = 1, iz = expr.properties.length; i2 < iz; ++i2)
|
|
5998
|
-
result.push(
|
|
5998
|
+
result.push(indent2), result.push(that.generateExpression(expr.properties[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push("," + newline);
|
|
5999
5999
|
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2), result.push("}"), result)) : "{}";
|
|
6000
6000
|
},
|
|
6001
6001
|
AssignmentPattern: function(expr, precedence, flags) {
|
|
@@ -6013,10 +6013,10 @@ var require_escodegen = __commonJS({
|
|
|
6013
6013
|
multiline = !0;
|
|
6014
6014
|
break;
|
|
6015
6015
|
}
|
|
6016
|
-
return result = ["{", multiline ? newline : ""], withIndent(function(
|
|
6016
|
+
return result = ["{", multiline ? newline : ""], withIndent(function(indent2) {
|
|
6017
6017
|
var i3, iz2;
|
|
6018
6018
|
for (i3 = 0, iz2 = expr.properties.length; i3 < iz2; ++i3)
|
|
6019
|
-
result.push(multiline ?
|
|
6019
|
+
result.push(multiline ? indent2 : ""), result.push(that.generateExpression(expr.properties[i3], Precedence.Sequence, E_TTT)), i3 + 1 < iz2 && result.push("," + (multiline ? newline : space));
|
|
6020
6020
|
}), multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && result.push(newline), result.push(multiline ? base2 : ""), result.push("}"), result;
|
|
6021
6021
|
},
|
|
6022
6022
|
ThisExpression: function(expr, precedence, flags) {
|
|
@@ -6045,9 +6045,9 @@ var require_escodegen = __commonJS({
|
|
|
6045
6045
|
},
|
|
6046
6046
|
Literal: function(expr, precedence, flags) {
|
|
6047
6047
|
var raw;
|
|
6048
|
-
if (expr.hasOwnProperty("raw") &&
|
|
6048
|
+
if (expr.hasOwnProperty("raw") && parse7 && extra.raw)
|
|
6049
6049
|
try {
|
|
6050
|
-
if (raw =
|
|
6050
|
+
if (raw = parse7(expr.raw).body[0].expression, raw.type === Syntax.Literal && raw.value === expr.value)
|
|
6051
6051
|
return expr.raw;
|
|
6052
6052
|
} catch {
|
|
6053
6053
|
}
|
|
@@ -6060,8 +6060,8 @@ var require_escodegen = __commonJS({
|
|
|
6060
6060
|
var result, i2, iz, fragment, that = this;
|
|
6061
6061
|
return result = expr.type === Syntax.GeneratorExpression ? ["("] : ["["], extra.moz.comprehensionExpressionStartsWithAssignment && (fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT), result.push(fragment)), expr.blocks && withIndent(function() {
|
|
6062
6062
|
for (i2 = 0, iz = expr.blocks.length; i2 < iz; ++i2)
|
|
6063
|
-
fragment = that.generateExpression(expr.blocks[i2], Precedence.Sequence, E_TTT), i2 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment ? result =
|
|
6064
|
-
}), expr.filter && (result =
|
|
6063
|
+
fragment = that.generateExpression(expr.blocks[i2], Precedence.Sequence, E_TTT), i2 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment ? result = join5(result, fragment) : result.push(fragment);
|
|
6064
|
+
}), expr.filter && (result = join5(result, "if" + space), fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT), result = join5(result, ["(", fragment, ")"])), extra.moz.comprehensionExpressionStartsWithAssignment || (fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT), result = join5(result, fragment)), result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]"), result;
|
|
6065
6065
|
},
|
|
6066
6066
|
ComprehensionBlock: function(expr, precedence, flags) {
|
|
6067
6067
|
var fragment;
|
|
@@ -6069,7 +6069,7 @@ var require_escodegen = __commonJS({
|
|
|
6069
6069
|
expr.left.kind,
|
|
6070
6070
|
noEmptySpace(),
|
|
6071
6071
|
this.generateStatement(expr.left.declarations[0], S_FFFF)
|
|
6072
|
-
] : fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT), fragment =
|
|
6072
|
+
] : fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT), fragment = join5(fragment, expr.of ? "of" : "in"), fragment = join5(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT)), ["for" + space + "(", fragment, ")"];
|
|
6073
6073
|
},
|
|
6074
6074
|
SpreadElement: function(expr, precedence, flags) {
|
|
6075
6075
|
return [
|
|
@@ -6123,7 +6123,7 @@ var require_escodegen = __commonJS({
|
|
|
6123
6123
|
}
|
|
6124
6124
|
function generate2(node, options) {
|
|
6125
6125
|
var defaultOptions2 = getDefaultOptions(), result, pair;
|
|
6126
|
-
return options != null ? (typeof options.indent == "string" && (defaultOptions2.format.indent.style = options.indent), typeof options.base == "number" && (defaultOptions2.format.indent.base = options.base), options = updateDeeply(defaultOptions2, options),
|
|
6126
|
+
return options != null ? (typeof options.indent == "string" && (defaultOptions2.format.indent.style = options.indent), typeof options.base == "number" && (defaultOptions2.format.indent.base = options.base), options = updateDeeply(defaultOptions2, options), indent = options.format.indent.style, typeof options.base == "string" ? base2 = options.base : base2 = stringRepeat(indent, options.format.indent.base)) : (options = defaultOptions2, indent = options.format.indent.style, base2 = stringRepeat(indent, options.format.indent.base)), json = options.format.json, renumber = options.format.renumber, hexadecimal = json ? !1 : options.format.hexadecimal, quotes = json ? "double" : options.format.quotes, escapeless = options.format.escapeless, newline = options.format.newline, space = options.format.space, options.format.compact && (newline = space = indent = base2 = ""), parentheses = options.format.parentheses, semicolons = options.format.semicolons, safeConcatenation = options.format.safeConcatenation, directive = options.directive, parse7 = json ? null : options.parse, sourceMap = options.sourceMap, sourceCode = options.sourceCode, preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null, extra = options, sourceMap && (exports.browser ? SourceNode = global.sourceMap.SourceNode : SourceNode = require_source_map2().SourceNode), result = generateInternal(node), sourceMap ? (pair = result.toStringWithSourceMap({
|
|
6127
6127
|
file: options.file,
|
|
6128
6128
|
sourceRoot: options.sourceMapRoot
|
|
6129
6129
|
}), options.sourceContent && pair.map.setSourceContent(
|
|
@@ -11483,7 +11483,7 @@ var require_stringify = __commonJS({
|
|
|
11483
11483
|
"../../../node_modules/json5/lib/stringify.js"(exports, module) {
|
|
11484
11484
|
var util = require_util2();
|
|
11485
11485
|
module.exports = function(value, replacer, space) {
|
|
11486
|
-
let stack = [],
|
|
11486
|
+
let stack = [], indent = "", propertyList, replacerFunc, gap = "", quote;
|
|
11487
11487
|
if (replacer != null && typeof replacer == "object" && !Array.isArray(replacer) && (space = replacer.space, quote = replacer.quote, replacer = replacer.replacer), typeof replacer == "function")
|
|
11488
11488
|
replacerFunc = replacer;
|
|
11489
11489
|
else if (Array.isArray(replacer)) {
|
|
@@ -11560,8 +11560,8 @@ var require_stringify = __commonJS({
|
|
|
11560
11560
|
if (stack.indexOf(value2) >= 0)
|
|
11561
11561
|
throw TypeError("Converting circular structure to JSON5");
|
|
11562
11562
|
stack.push(value2);
|
|
11563
|
-
let stepback =
|
|
11564
|
-
|
|
11563
|
+
let stepback = indent;
|
|
11564
|
+
indent = indent + gap;
|
|
11565
11565
|
let keys = propertyList || Object.keys(value2), partial = [];
|
|
11566
11566
|
for (let key of keys) {
|
|
11567
11567
|
let propertyString = serializeProperty(key, value2);
|
|
@@ -11579,13 +11579,13 @@ var require_stringify = __commonJS({
|
|
|
11579
11579
|
properties = partial.join(","), final = "{" + properties + "}";
|
|
11580
11580
|
else {
|
|
11581
11581
|
let separator = `,
|
|
11582
|
-
` +
|
|
11582
|
+
` + indent;
|
|
11583
11583
|
properties = partial.join(separator), final = `{
|
|
11584
|
-
` +
|
|
11584
|
+
` + indent + properties + `,
|
|
11585
11585
|
` + stepback + "}";
|
|
11586
11586
|
}
|
|
11587
11587
|
}
|
|
11588
|
-
return stack.pop(),
|
|
11588
|
+
return stack.pop(), indent = stepback, final;
|
|
11589
11589
|
}
|
|
11590
11590
|
function serializeKey(key) {
|
|
11591
11591
|
if (key.length === 0)
|
|
@@ -11602,8 +11602,8 @@ var require_stringify = __commonJS({
|
|
|
11602
11602
|
if (stack.indexOf(value2) >= 0)
|
|
11603
11603
|
throw TypeError("Converting circular structure to JSON5");
|
|
11604
11604
|
stack.push(value2);
|
|
11605
|
-
let stepback =
|
|
11606
|
-
|
|
11605
|
+
let stepback = indent;
|
|
11606
|
+
indent = indent + gap;
|
|
11607
11607
|
let partial = [];
|
|
11608
11608
|
for (let i2 = 0; i2 < value2.length; i2++) {
|
|
11609
11609
|
let propertyString = serializeProperty(String(i2), value2);
|
|
@@ -11616,12 +11616,12 @@ var require_stringify = __commonJS({
|
|
|
11616
11616
|
final = "[" + partial.join(",") + "]";
|
|
11617
11617
|
else {
|
|
11618
11618
|
let separator = `,
|
|
11619
|
-
` +
|
|
11619
|
+
` + indent, properties = partial.join(separator);
|
|
11620
11620
|
final = `[
|
|
11621
|
-
` +
|
|
11621
|
+
` + indent + properties + `,
|
|
11622
11622
|
` + stepback + "]";
|
|
11623
11623
|
}
|
|
11624
|
-
return stack.pop(),
|
|
11624
|
+
return stack.pop(), indent = stepback, final;
|
|
11625
11625
|
}
|
|
11626
11626
|
};
|
|
11627
11627
|
}
|
|
@@ -11630,9 +11630,9 @@ var require_stringify = __commonJS({
|
|
|
11630
11630
|
// ../../../node_modules/json5/lib/index.js
|
|
11631
11631
|
var require_lib = __commonJS({
|
|
11632
11632
|
"../../../node_modules/json5/lib/index.js"(exports, module) {
|
|
11633
|
-
var
|
|
11634
|
-
parse:
|
|
11635
|
-
stringify
|
|
11633
|
+
var parse7 = require_parse(), stringify = require_stringify(), JSON5 = {
|
|
11634
|
+
parse: parse7,
|
|
11635
|
+
stringify
|
|
11636
11636
|
};
|
|
11637
11637
|
module.exports = JSON5;
|
|
11638
11638
|
}
|
|
@@ -12122,12 +12122,12 @@ var require_path_parse = __commonJS({
|
|
|
12122
12122
|
// ../../../node_modules/resolve/lib/node-modules-paths.js
|
|
12123
12123
|
var require_node_modules_paths = __commonJS({
|
|
12124
12124
|
"../../../node_modules/resolve/lib/node-modules-paths.js"(exports, module) {
|
|
12125
|
-
var path4 = __require("path"),
|
|
12125
|
+
var path4 = __require("path"), parse7 = path4.parse || require_path_parse(), driveLetterRegex = /^([A-Za-z]:)/, uncPathRegex = /^\\\\/;
|
|
12126
12126
|
function getNodeModulesDirs(absoluteStart, modules) {
|
|
12127
12127
|
var prefix = "/";
|
|
12128
12128
|
driveLetterRegex.test(absoluteStart) ? prefix = "" : uncPathRegex.test(absoluteStart) && (prefix = "\\\\");
|
|
12129
|
-
for (var paths = [absoluteStart], parsed =
|
|
12130
|
-
paths.push(parsed.dir), parsed =
|
|
12129
|
+
for (var paths = [absoluteStart], parsed = parse7(absoluteStart); parsed.dir !== paths[paths.length - 1]; )
|
|
12130
|
+
paths.push(parsed.dir), parsed = parse7(parsed.dir);
|
|
12131
12131
|
return paths.reduce(function(dirs, aPath) {
|
|
12132
12132
|
return dirs.concat(modules.map(function(moduleDir) {
|
|
12133
12133
|
return path4.resolve(prefix, aPath, moduleDir);
|
|
@@ -15538,7 +15538,7 @@ function generateFunc2(extractedProp) {
|
|
|
15538
15538
|
});
|
|
15539
15539
|
}
|
|
15540
15540
|
function generateShape(type, extractedProp) {
|
|
15541
|
-
let
|
|
15541
|
+
let fields = Object.keys(type.value).map((key) => `${key}: ${generateType(type.value[key], extractedProp).full}`).join(", "), { inferredType, ast } = inspectValue(`{ ${fields} }`), { depth } = inferredType;
|
|
15542
15542
|
return createTypeDef({
|
|
15543
15543
|
name: "shape" /* SHAPE */,
|
|
15544
15544
|
short: OBJECT_CAPTION,
|
|
@@ -15802,285 +15802,15 @@ import { existsSync as existsSync3 } from "node:fs";
|
|
|
15802
15802
|
import { dirname as dirname5, sep as sep2 } from "node:path";
|
|
15803
15803
|
import { babelParse, types as t } from "storybook/internal/babel";
|
|
15804
15804
|
import { supportedExtensions as supportedExtensions2 } from "storybook/internal/common";
|
|
15805
|
+
import { extractJSDocInfo } from "storybook/internal/csf-tools";
|
|
15805
15806
|
import { logger as logger3 } from "storybook/internal/node-logger";
|
|
15806
15807
|
import {
|
|
15807
15808
|
builtinHandlers as docgenHandlers,
|
|
15808
15809
|
builtinResolvers as docgenResolver,
|
|
15809
15810
|
makeFsImporter,
|
|
15810
|
-
parse as
|
|
15811
|
+
parse as parse6
|
|
15811
15812
|
} from "react-docgen";
|
|
15812
15813
|
|
|
15813
|
-
// ../../../node_modules/comment-parser/es6/primitives.js
|
|
15814
|
-
var Markers;
|
|
15815
|
-
(function(Markers2) {
|
|
15816
|
-
Markers2.start = "/**", Markers2.nostart = "/***", Markers2.delim = "*", Markers2.end = "*/";
|
|
15817
|
-
})(Markers = Markers || (Markers = {}));
|
|
15818
|
-
|
|
15819
|
-
// ../../../node_modules/comment-parser/es6/util.js
|
|
15820
|
-
function isSpace(source) {
|
|
15821
|
-
return /^\s+$/.test(source);
|
|
15822
|
-
}
|
|
15823
|
-
function splitCR(source) {
|
|
15824
|
-
let matches = source.match(/\r+$/);
|
|
15825
|
-
return matches == null ? ["", source] : [source.slice(-matches[0].length), source.slice(0, -matches[0].length)];
|
|
15826
|
-
}
|
|
15827
|
-
function splitSpace(source) {
|
|
15828
|
-
let matches = source.match(/^\s+/);
|
|
15829
|
-
return matches == null ? ["", source] : [source.slice(0, matches[0].length), source.slice(matches[0].length)];
|
|
15830
|
-
}
|
|
15831
|
-
function splitLines(source) {
|
|
15832
|
-
return source.split(/\n/);
|
|
15833
|
-
}
|
|
15834
|
-
function seedSpec(spec = {}) {
|
|
15835
|
-
return Object.assign({ tag: "", name: "", type: "", optional: !1, description: "", problems: [], source: [] }, spec);
|
|
15836
|
-
}
|
|
15837
|
-
function seedTokens(tokens = {}) {
|
|
15838
|
-
return Object.assign({ start: "", delimiter: "", postDelimiter: "", tag: "", postTag: "", name: "", postName: "", type: "", postType: "", description: "", end: "", lineEnd: "" }, tokens);
|
|
15839
|
-
}
|
|
15840
|
-
|
|
15841
|
-
// ../../../node_modules/comment-parser/es6/parser/block-parser.js
|
|
15842
|
-
var reTag = /^@\S+/;
|
|
15843
|
-
function getParser({ fence = "```" } = {}) {
|
|
15844
|
-
let fencer = getFencer(fence), toggleFence = (source, isFenced) => fencer(source) ? !isFenced : isFenced;
|
|
15845
|
-
return function(source) {
|
|
15846
|
-
let sections = [[]], isFenced = !1;
|
|
15847
|
-
for (let line of source)
|
|
15848
|
-
reTag.test(line.tokens.description) && !isFenced ? sections.push([line]) : sections[sections.length - 1].push(line), isFenced = toggleFence(line.tokens.description, isFenced);
|
|
15849
|
-
return sections;
|
|
15850
|
-
};
|
|
15851
|
-
}
|
|
15852
|
-
function getFencer(fence) {
|
|
15853
|
-
return typeof fence == "string" ? (source) => source.split(fence).length % 2 === 0 : fence;
|
|
15854
|
-
}
|
|
15855
|
-
|
|
15856
|
-
// ../../../node_modules/comment-parser/es6/parser/source-parser.js
|
|
15857
|
-
function getParser2({ startLine = 0, markers = Markers } = {}) {
|
|
15858
|
-
let block = null, num = startLine;
|
|
15859
|
-
return function(source) {
|
|
15860
|
-
let rest = source, tokens = seedTokens();
|
|
15861
|
-
if ([tokens.lineEnd, rest] = splitCR(rest), [tokens.start, rest] = splitSpace(rest), block === null && rest.startsWith(markers.start) && !rest.startsWith(markers.nostart) && (block = [], tokens.delimiter = rest.slice(0, markers.start.length), rest = rest.slice(markers.start.length), [tokens.postDelimiter, rest] = splitSpace(rest)), block === null)
|
|
15862
|
-
return num++, null;
|
|
15863
|
-
let isClosed = rest.trimRight().endsWith(markers.end);
|
|
15864
|
-
if (tokens.delimiter === "" && rest.startsWith(markers.delim) && !rest.startsWith(markers.end) && (tokens.delimiter = markers.delim, rest = rest.slice(markers.delim.length), [tokens.postDelimiter, rest] = splitSpace(rest)), isClosed) {
|
|
15865
|
-
let trimmed = rest.trimRight();
|
|
15866
|
-
tokens.end = rest.slice(trimmed.length - markers.end.length), rest = trimmed.slice(0, -markers.end.length);
|
|
15867
|
-
}
|
|
15868
|
-
if (tokens.description = rest, block.push({ number: num, source, tokens }), num++, isClosed) {
|
|
15869
|
-
let result = block.slice();
|
|
15870
|
-
return block = null, result;
|
|
15871
|
-
}
|
|
15872
|
-
return null;
|
|
15873
|
-
};
|
|
15874
|
-
}
|
|
15875
|
-
|
|
15876
|
-
// ../../../node_modules/comment-parser/es6/parser/spec-parser.js
|
|
15877
|
-
function getParser3({ tokenizers }) {
|
|
15878
|
-
return function(source) {
|
|
15879
|
-
var _a;
|
|
15880
|
-
let spec = seedSpec({ source });
|
|
15881
|
-
for (let tokenize of tokenizers)
|
|
15882
|
-
if (spec = tokenize(spec), !((_a = spec.problems[spec.problems.length - 1]) === null || _a === void 0) && _a.critical)
|
|
15883
|
-
break;
|
|
15884
|
-
return spec;
|
|
15885
|
-
};
|
|
15886
|
-
}
|
|
15887
|
-
|
|
15888
|
-
// ../../../node_modules/comment-parser/es6/parser/tokenizers/tag.js
|
|
15889
|
-
function tagTokenizer() {
|
|
15890
|
-
return (spec) => {
|
|
15891
|
-
let { tokens } = spec.source[0], match = tokens.description.match(/\s*(@(\S+))(\s*)/);
|
|
15892
|
-
return match === null ? (spec.problems.push({
|
|
15893
|
-
code: "spec:tag:prefix",
|
|
15894
|
-
message: 'tag should start with "@" symbol',
|
|
15895
|
-
line: spec.source[0].number,
|
|
15896
|
-
critical: !0
|
|
15897
|
-
}), spec) : (tokens.tag = match[1], tokens.postTag = match[3], tokens.description = tokens.description.slice(match[0].length), spec.tag = match[2], spec);
|
|
15898
|
-
};
|
|
15899
|
-
}
|
|
15900
|
-
|
|
15901
|
-
// ../../../node_modules/comment-parser/es6/parser/tokenizers/type.js
|
|
15902
|
-
function typeTokenizer(spacing = "compact") {
|
|
15903
|
-
let join6 = getJoiner(spacing);
|
|
15904
|
-
return (spec) => {
|
|
15905
|
-
let curlies = 0, lines = [];
|
|
15906
|
-
for (let [i2, { tokens }] of spec.source.entries()) {
|
|
15907
|
-
let type = "";
|
|
15908
|
-
if (i2 === 0 && tokens.description[0] !== "{")
|
|
15909
|
-
return spec;
|
|
15910
|
-
for (let ch of tokens.description)
|
|
15911
|
-
if (ch === "{" && curlies++, ch === "}" && curlies--, type += ch, curlies === 0)
|
|
15912
|
-
break;
|
|
15913
|
-
if (lines.push([tokens, type]), curlies === 0)
|
|
15914
|
-
break;
|
|
15915
|
-
}
|
|
15916
|
-
if (curlies !== 0)
|
|
15917
|
-
return spec.problems.push({
|
|
15918
|
-
code: "spec:type:unpaired-curlies",
|
|
15919
|
-
message: "unpaired curlies",
|
|
15920
|
-
line: spec.source[0].number,
|
|
15921
|
-
critical: !0
|
|
15922
|
-
}), spec;
|
|
15923
|
-
let parts = [], offset2 = lines[0][0].postDelimiter.length;
|
|
15924
|
-
for (let [i2, [tokens, type]] of lines.entries())
|
|
15925
|
-
tokens.type = type, i2 > 0 && (tokens.type = tokens.postDelimiter.slice(offset2) + type, tokens.postDelimiter = tokens.postDelimiter.slice(0, offset2)), [tokens.postType, tokens.description] = splitSpace(tokens.description.slice(type.length)), parts.push(tokens.type);
|
|
15926
|
-
return parts[0] = parts[0].slice(1), parts[parts.length - 1] = parts[parts.length - 1].slice(0, -1), spec.type = join6(parts), spec;
|
|
15927
|
-
};
|
|
15928
|
-
}
|
|
15929
|
-
var trim = (x) => x.trim();
|
|
15930
|
-
function getJoiner(spacing) {
|
|
15931
|
-
return spacing === "compact" ? (t5) => t5.map(trim).join("") : spacing === "preserve" ? (t5) => t5.join(`
|
|
15932
|
-
`) : spacing;
|
|
15933
|
-
}
|
|
15934
|
-
|
|
15935
|
-
// ../../../node_modules/comment-parser/es6/parser/tokenizers/name.js
|
|
15936
|
-
var isQuoted = (s) => s && s.startsWith('"') && s.endsWith('"');
|
|
15937
|
-
function nameTokenizer() {
|
|
15938
|
-
let typeEnd = (num, { tokens }, i2) => tokens.type === "" ? num : i2;
|
|
15939
|
-
return (spec) => {
|
|
15940
|
-
let { tokens } = spec.source[spec.source.reduce(typeEnd, 0)], source = tokens.description.trimLeft(), quotedGroups = source.split('"');
|
|
15941
|
-
if (quotedGroups.length > 1 && quotedGroups[0] === "" && quotedGroups.length % 2 === 1)
|
|
15942
|
-
return spec.name = quotedGroups[1], tokens.name = `"${quotedGroups[1]}"`, [tokens.postName, tokens.description] = splitSpace(source.slice(tokens.name.length)), spec;
|
|
15943
|
-
let brackets = 0, name = "", optional = !1, defaultValue;
|
|
15944
|
-
for (let ch of source) {
|
|
15945
|
-
if (brackets === 0 && isSpace(ch))
|
|
15946
|
-
break;
|
|
15947
|
-
ch === "[" && brackets++, ch === "]" && brackets--, name += ch;
|
|
15948
|
-
}
|
|
15949
|
-
if (brackets !== 0)
|
|
15950
|
-
return spec.problems.push({
|
|
15951
|
-
code: "spec:name:unpaired-brackets",
|
|
15952
|
-
message: "unpaired brackets",
|
|
15953
|
-
line: spec.source[0].number,
|
|
15954
|
-
critical: !0
|
|
15955
|
-
}), spec;
|
|
15956
|
-
let nameToken = name;
|
|
15957
|
-
if (name[0] === "[" && name[name.length - 1] === "]") {
|
|
15958
|
-
optional = !0, name = name.slice(1, -1);
|
|
15959
|
-
let parts = name.split("=");
|
|
15960
|
-
if (name = parts[0].trim(), parts[1] !== void 0 && (defaultValue = parts.slice(1).join("=").trim()), name === "")
|
|
15961
|
-
return spec.problems.push({
|
|
15962
|
-
code: "spec:name:empty-name",
|
|
15963
|
-
message: "empty name",
|
|
15964
|
-
line: spec.source[0].number,
|
|
15965
|
-
critical: !0
|
|
15966
|
-
}), spec;
|
|
15967
|
-
if (defaultValue === "")
|
|
15968
|
-
return spec.problems.push({
|
|
15969
|
-
code: "spec:name:empty-default",
|
|
15970
|
-
message: "empty default value",
|
|
15971
|
-
line: spec.source[0].number,
|
|
15972
|
-
critical: !0
|
|
15973
|
-
}), spec;
|
|
15974
|
-
if (!isQuoted(defaultValue) && /=(?!>)/.test(defaultValue))
|
|
15975
|
-
return spec.problems.push({
|
|
15976
|
-
code: "spec:name:invalid-default",
|
|
15977
|
-
message: "invalid default value syntax",
|
|
15978
|
-
line: spec.source[0].number,
|
|
15979
|
-
critical: !0
|
|
15980
|
-
}), spec;
|
|
15981
|
-
}
|
|
15982
|
-
return spec.optional = optional, spec.name = name, tokens.name = nameToken, defaultValue !== void 0 && (spec.default = defaultValue), [tokens.postName, tokens.description] = splitSpace(source.slice(tokens.name.length)), spec;
|
|
15983
|
-
};
|
|
15984
|
-
}
|
|
15985
|
-
|
|
15986
|
-
// ../../../node_modules/comment-parser/es6/parser/tokenizers/description.js
|
|
15987
|
-
function descriptionTokenizer(spacing = "compact", markers = Markers) {
|
|
15988
|
-
let join6 = getJoiner2(spacing);
|
|
15989
|
-
return (spec) => (spec.description = join6(spec.source, markers), spec);
|
|
15990
|
-
}
|
|
15991
|
-
function getJoiner2(spacing) {
|
|
15992
|
-
return spacing === "compact" ? compactJoiner : spacing === "preserve" ? preserveJoiner : spacing;
|
|
15993
|
-
}
|
|
15994
|
-
function compactJoiner(lines, markers = Markers) {
|
|
15995
|
-
return lines.map(({ tokens: { description } }) => description.trim()).filter((description) => description !== "").join(" ");
|
|
15996
|
-
}
|
|
15997
|
-
var lineNo = (num, { tokens }, i2) => tokens.type === "" ? num : i2, getDescription = ({ tokens }) => (tokens.delimiter === "" ? tokens.start : tokens.postDelimiter.slice(1)) + tokens.description;
|
|
15998
|
-
function preserveJoiner(lines, markers = Markers) {
|
|
15999
|
-
if (lines.length === 0)
|
|
16000
|
-
return "";
|
|
16001
|
-
lines[0].tokens.description === "" && lines[0].tokens.delimiter === markers.start && (lines = lines.slice(1));
|
|
16002
|
-
let lastLine = lines[lines.length - 1];
|
|
16003
|
-
return lastLine !== void 0 && lastLine.tokens.description === "" && lastLine.tokens.end.endsWith(markers.end) && (lines = lines.slice(0, -1)), lines = lines.slice(lines.reduce(lineNo, 0)), lines.map(getDescription).join(`
|
|
16004
|
-
`);
|
|
16005
|
-
}
|
|
16006
|
-
|
|
16007
|
-
// ../../../node_modules/comment-parser/es6/parser/index.js
|
|
16008
|
-
function getParser4({ startLine = 0, fence = "```", spacing = "compact", markers = Markers, tokenizers = [
|
|
16009
|
-
tagTokenizer(),
|
|
16010
|
-
typeTokenizer(spacing),
|
|
16011
|
-
nameTokenizer(),
|
|
16012
|
-
descriptionTokenizer(spacing)
|
|
16013
|
-
] } = {}) {
|
|
16014
|
-
if (startLine < 0 || startLine % 1 > 0)
|
|
16015
|
-
throw new Error("Invalid startLine");
|
|
16016
|
-
let parseSource = getParser2({ startLine, markers }), parseBlock = getParser({ fence }), parseSpec = getParser3({ tokenizers }), joinDescription = getJoiner2(spacing);
|
|
16017
|
-
return function(source) {
|
|
16018
|
-
let blocks = [];
|
|
16019
|
-
for (let line of splitLines(source)) {
|
|
16020
|
-
let lines = parseSource(line);
|
|
16021
|
-
if (lines === null)
|
|
16022
|
-
continue;
|
|
16023
|
-
let sections = parseBlock(lines), specs = sections.slice(1).map(parseSpec);
|
|
16024
|
-
blocks.push({
|
|
16025
|
-
description: joinDescription(sections[0], markers),
|
|
16026
|
-
tags: specs,
|
|
16027
|
-
source: lines,
|
|
16028
|
-
problems: specs.reduce((acc, spec) => acc.concat(spec.problems), [])
|
|
16029
|
-
});
|
|
16030
|
-
}
|
|
16031
|
-
return blocks;
|
|
16032
|
-
};
|
|
16033
|
-
}
|
|
16034
|
-
|
|
16035
|
-
// ../../../node_modules/comment-parser/es6/stringifier/index.js
|
|
16036
|
-
function join5(tokens) {
|
|
16037
|
-
return tokens.start + tokens.delimiter + tokens.postDelimiter + tokens.tag + tokens.postTag + tokens.type + tokens.postType + tokens.name + tokens.postName + tokens.description + tokens.end + tokens.lineEnd;
|
|
16038
|
-
}
|
|
16039
|
-
function getStringifier() {
|
|
16040
|
-
return (block) => block.source.map(({ tokens }) => join5(tokens)).join(`
|
|
16041
|
-
`);
|
|
16042
|
-
}
|
|
16043
|
-
|
|
16044
|
-
// ../../../node_modules/comment-parser/es6/stringifier/inspect.js
|
|
16045
|
-
var zeroWidth = {
|
|
16046
|
-
line: 0,
|
|
16047
|
-
start: 0,
|
|
16048
|
-
delimiter: 0,
|
|
16049
|
-
postDelimiter: 0,
|
|
16050
|
-
tag: 0,
|
|
16051
|
-
postTag: 0,
|
|
16052
|
-
name: 0,
|
|
16053
|
-
postName: 0,
|
|
16054
|
-
type: 0,
|
|
16055
|
-
postType: 0,
|
|
16056
|
-
description: 0,
|
|
16057
|
-
end: 0,
|
|
16058
|
-
lineEnd: 0
|
|
16059
|
-
};
|
|
16060
|
-
var fields = Object.keys(zeroWidth);
|
|
16061
|
-
|
|
16062
|
-
// ../../../node_modules/comment-parser/es6/index.js
|
|
16063
|
-
function parse6(source, options = {}) {
|
|
16064
|
-
return getParser4(options)(source);
|
|
16065
|
-
}
|
|
16066
|
-
var stringify = getStringifier();
|
|
16067
|
-
|
|
16068
|
-
// src/componentManifest/jsdocTags.ts
|
|
16069
|
-
function extractJSDocInfo(jsdocComment) {
|
|
16070
|
-
let jsDoc = ["/**", ...jsdocComment.split(`
|
|
16071
|
-
`).map((line) => ` * ${line}`), " */"].join(`
|
|
16072
|
-
`), description = parse6(jsDoc, { spacing: "preserve" })[0].description, parsed = parse6(jsDoc, { spacing: "compact" });
|
|
16073
|
-
return {
|
|
16074
|
-
description,
|
|
16075
|
-
tags: Object.fromEntries(
|
|
16076
|
-
Object.entries(groupBy(parsed[0].tags, (it) => it.tag)).map(([key, tags]) => [
|
|
16077
|
-
key,
|
|
16078
|
-
tags?.map((tag) => (tag.type ? `{${tag.type}} ` : "") + `${tag.name} ${tag.description}`) ?? []
|
|
16079
|
-
])
|
|
16080
|
-
)
|
|
16081
|
-
};
|
|
16082
|
-
}
|
|
16083
|
-
|
|
16084
15814
|
// src/componentManifest/reactDocgen/actualNameHandler.ts
|
|
16085
15815
|
import { utils } from "react-docgen";
|
|
16086
15816
|
var { getNameOrValue, isReactForwardRefCall } = utils, actualNameHandler = function(documentation, componentDefinition) {
|
|
@@ -16254,7 +15984,7 @@ var getTsConfig = cached(
|
|
|
16254
15984
|
},
|
|
16255
15985
|
{ name: "getTsConfig" }
|
|
16256
15986
|
), parseWithReactDocgen = cached(
|
|
16257
|
-
(code, path4) =>
|
|
15987
|
+
(code, path4) => parse6(code, {
|
|
16258
15988
|
resolver: defaultResolver2,
|
|
16259
15989
|
handlers,
|
|
16260
15990
|
importer: getReactDocgenImporter(),
|
|
@@ -16466,7 +16196,7 @@ var cachedCompilerOptions, cachedFileNames, previousProgram, parser, cachedParse
|
|
|
16466
16196
|
function invalidateParser() {
|
|
16467
16197
|
parser = void 0, cachedCompilerOptions = void 0, cachedFileNames = void 0, cachedParserOptionsKey = void 0;
|
|
16468
16198
|
}
|
|
16469
|
-
async function
|
|
16199
|
+
async function getParser(userOptions) {
|
|
16470
16200
|
let [typescript, reactDocgenTypescript] = await Promise.all([
|
|
16471
16201
|
loadTypeScript(),
|
|
16472
16202
|
loadReactDocgenTypescript()
|
|
@@ -16539,7 +16269,7 @@ function getReactDocgenTypescriptError(path4, {
|
|
|
16539
16269
|
}
|
|
16540
16270
|
var parseWithReactDocgenTypescript = asyncCache(
|
|
16541
16271
|
async (filePath, userOptions) => {
|
|
16542
|
-
let { program, fileParser, typescript } = await
|
|
16272
|
+
let { program, fileParser, typescript } = await getParser(userOptions), checker = program.getTypeChecker(), sourceFile = program.getSourceFile(filePath), docs = fileParser.parseWithProgramProvider(filePath, () => program), exportNameMap = sourceFile ? getExportNameMap(typescript, checker, sourceFile) : /* @__PURE__ */ new Map();
|
|
16543
16273
|
return docs.map((doc) => {
|
|
16544
16274
|
let largeNonUserSources = getLargeNonUserPropSources(doc.props);
|
|
16545
16275
|
return {
|
|
@@ -16854,7 +16584,7 @@ function pathForNode(program, target) {
|
|
|
16854
16584
|
// src/componentManifest/resolveComponents.ts
|
|
16855
16585
|
import { recast as recast2 } from "storybook/internal/babel";
|
|
16856
16586
|
import { storyNameFromExport } from "storybook/internal/csf";
|
|
16857
|
-
import { extractDescription, loadCsf } from "storybook/internal/csf-tools";
|
|
16587
|
+
import { extractDescription, extractJSDocInfo as extractJSDocInfo2, loadCsf } from "storybook/internal/csf-tools";
|
|
16858
16588
|
|
|
16859
16589
|
// src/componentManifest/getComponentImports.ts
|
|
16860
16590
|
import { dirname as dirname7 } from "node:path";
|
|
@@ -17247,7 +16977,7 @@ function extractStorySnippets(csf, componentName, filterStoryIds) {
|
|
|
17247
16977
|
return Object.entries(csf._stories).filter(([, story]) => !filterStoryIds || filterStoryIds.has(story.id)).map(([storyExport, story]) => {
|
|
17248
16978
|
let name = story.name ?? storyNameFromExport(storyExport);
|
|
17249
16979
|
try {
|
|
17250
|
-
let jsdocComment = extractDescription(csf._storyStatements[storyExport]), { tags = {}, description } = jsdocComment ?
|
|
16980
|
+
let jsdocComment = extractDescription(csf._storyStatements[storyExport]), { tags = {}, description } = jsdocComment ? extractJSDocInfo2(jsdocComment) : {}, finalDescription = (tags?.describe?.[0] || tags?.desc?.[0]) ?? description;
|
|
17251
16981
|
return {
|
|
17252
16982
|
id: story.id,
|
|
17253
16983
|
name,
|
|
@@ -17264,19 +16994,7 @@ function extractStorySnippets(csf, componentName, filterStoryIds) {
|
|
|
17264
16994
|
|
|
17265
16995
|
// src/componentManifest/buildReactComponentDocgen.ts
|
|
17266
16996
|
import { getComponentIdFromEntry } from "storybook/internal/common";
|
|
17267
|
-
import { extractDescription as extractDescription2 } from "storybook/internal/csf-tools";
|
|
17268
|
-
|
|
17269
|
-
// src/componentManifest/extractComponentDescription.ts
|
|
17270
|
-
function extractComponentDescription(metaJsDoc, docgenDescription, docgenJsDocTags) {
|
|
17271
|
-
let jsdocComment = metaJsDoc || docgenDescription, extracted = jsdocComment ? extractJSDocInfo(jsdocComment) : void 0, tags = docgenJsDocTags ?? extracted?.tags ?? {}, description = extracted?.description;
|
|
17272
|
-
return {
|
|
17273
|
-
description: ((tags?.describe?.[0] || tags?.desc?.[0]) ?? description)?.trim(),
|
|
17274
|
-
summary: tags.summary?.[0],
|
|
17275
|
-
jsDocTags: tags
|
|
17276
|
-
};
|
|
17277
|
-
}
|
|
17278
|
-
|
|
17279
|
-
// src/componentManifest/buildReactComponentDocgen.ts
|
|
16997
|
+
import { extractComponentDescription, extractDescription as extractDescription2 } from "storybook/internal/csf-tools";
|
|
17280
16998
|
function getPackageInfo(componentPath, fallbackPath) {
|
|
17281
16999
|
let nearestPkg = cachedFindUp("package.json", {
|
|
17282
17000
|
cwd: path3.dirname(componentPath ?? fallbackPath)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_iituge5wv3 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_iituge5wv3 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_iituge5wv3 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_iituge5wv3.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_iituge5wv3.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_iituge5wv3.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
extractArgTypes,
|
|
16
16
|
path,
|
|
17
17
|
resolveStoryFileComponents
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-V5DKJTFY.js";
|
|
19
19
|
|
|
20
20
|
// src/docgen/docgen-worker.ts
|
|
21
21
|
import { STORY_FILE_TEST_REGEXP, getStoryImportPathFromEntry as getStoryImportPathFromEntry2 } from "storybook/internal/common";
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_iituge5wv3 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_iituge5wv3 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_iituge5wv3 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_iituge5wv3.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_iituge5wv3.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_iituge5wv3.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
parseWithReactDocgen,
|
|
24
24
|
path,
|
|
25
25
|
resolveStoryFileComponents
|
|
26
|
-
} from "./_node-chunks/chunk-
|
|
26
|
+
} from "./_node-chunks/chunk-V5DKJTFY.js";
|
|
27
27
|
|
|
28
28
|
// src/preset.ts
|
|
29
29
|
import path2, { join as join2 } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "10.6.0-alpha.
|
|
3
|
+
"version": "10.6.0-alpha.4",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@storybook/global": "^5.0.0",
|
|
57
|
-
"@storybook/react-dom-shim": "10.6.0-alpha.
|
|
57
|
+
"@storybook/react-dom-shim": "10.6.0-alpha.4",
|
|
58
58
|
"react-docgen": "^8.0.2",
|
|
59
59
|
"react-docgen-typescript": "^2.2.2"
|
|
60
60
|
},
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@types/react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
88
88
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
89
89
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
90
|
-
"storybook": "^10.6.0-alpha.
|
|
90
|
+
"storybook": "^10.6.0-alpha.4",
|
|
91
91
|
"typescript": ">= 4.9.x"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|