storybook 10.1.0-beta.1 → 10.1.0-beta.3
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-L4RMQ7D7.js → chunk-BRX2HXH7.js} +75 -5
- package/dist/_node-chunks/{builder-manager-FTVC2JL7.js → builder-manager-OAF6SRKJ.js} +14 -579
- package/dist/_node-chunks/{camelcase-3SMT5WKC.js → camelcase-UG5ZJHCD.js} +7 -7
- package/dist/_node-chunks/{chunk-6L7FFBOW.js → chunk-473LXK7O.js} +6 -6
- package/dist/_node-chunks/chunk-5N3H43LE.js +23 -0
- package/dist/_node-chunks/{chunk-6DEMT5VX.js → chunk-6YYH64IJ.js} +13 -13
- package/dist/_node-chunks/{chunk-2OVULPK3.js → chunk-745GFLCZ.js} +6 -6
- package/dist/_node-chunks/{chunk-SQSFX47N.js → chunk-7WOMK33B.js} +7 -7
- package/dist/_node-chunks/{chunk-RURZIE3W.js → chunk-A5VW7257.js} +8 -8
- package/dist/_node-chunks/{chunk-Y4UYN72K.js → chunk-CRJ7M6EO.js} +22 -21
- package/dist/_node-chunks/chunk-DRN5YXX5.js +18 -0
- package/dist/_node-chunks/{chunk-AREL5IXS.js → chunk-H6HVK5J2.js} +7 -7
- package/dist/_node-chunks/{chunk-VRICJPXY.js → chunk-JOOO54RB.js} +6 -6
- package/dist/_node-chunks/chunk-LJRIVT23.js +61 -0
- package/dist/_node-chunks/{chunk-K673CX4Q.js → chunk-LZ2HPFRB.js} +7 -7
- package/dist/_node-chunks/{chunk-TURUTKVH.js → chunk-N5IE6WWR.js} +7 -7
- package/dist/_node-chunks/{chunk-IUYZQKSX.js → chunk-NKT3R6IH.js} +6 -6
- package/dist/_node-chunks/{chunk-N3BJOOY5.js → chunk-NOTIBODG.js} +6 -6
- package/dist/_node-chunks/{chunk-ZMCJS2GU.js → chunk-Q65ED3UK.js} +6 -6
- package/dist/_node-chunks/{chunk-3JJPSDXI.js → chunk-RABBUYPA.js} +9 -9
- package/dist/_node-chunks/{chunk-RVII4SK6.js → chunk-SKFAHEPX.js} +14 -14
- package/dist/_node-chunks/{chunk-O5FMCQHP.js → chunk-STYUJSG3.js} +10 -10
- package/dist/_node-chunks/{chunk-54NMJ4II.js → chunk-SUILKNPA.js} +8 -8
- package/dist/_node-chunks/{chunk-XGNRK7QB.js → chunk-TUQOGYET.js} +7 -7
- package/dist/_node-chunks/{chunk-5V4A6MSI.js → chunk-U24W5IIW.js} +7 -7
- package/dist/_node-chunks/{chunk-WIWWMCEU.js → chunk-UWK6Z4VL.js} +6 -6
- package/dist/_node-chunks/{chunk-S3PBHOVC.js → chunk-WBULWRM7.js} +34 -24
- package/dist/_node-chunks/{chunk-RIKQZHV3.js → chunk-WSIZMTN2.js} +6 -6
- package/dist/_node-chunks/{chunk-6ULDIDXV.js → chunk-WYLXFNIP.js} +9 -9
- package/dist/_node-chunks/{chunk-Y2FOTPAE.js → chunk-XS5QCZP7.js} +7 -7
- package/dist/_node-chunks/{chunk-FNYKBULZ.js → chunk-Y7VDA7NY.js} +7 -7
- package/dist/_node-chunks/{dist-TZLZ3T6L.js → dist-N33YQ3NH.js} +9 -9
- package/dist/_node-chunks/{globby-22GFCZQD.js → globby-5IBS67N3.js} +9 -9
- package/dist/_node-chunks/{lib-37NQ4ZIJ.js → lib-2XH6KQ2B.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-2TRB7OEH.js → mdx-N42X6CFJ-3GGSRLVV.js} +8 -8
- package/dist/_node-chunks/{p-limit-UD7TYFDW.js → p-limit-Z3A7N5MY.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.d.ts +5 -4
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/components/index.js +35 -29
- package/dist/core-server/index.js +33 -33
- package/dist/core-server/presets/common-manager.js +74 -108
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -25
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +148 -74
- package/dist/manager/runtime.js +70 -20
- package/dist/manager-api/index.js +7 -10
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.js +23 -23
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/create.js +1 -1
- package/dist/theming/index.d.ts +65 -2
- package/dist/theming/index.js +6 -3
- package/package.json +1 -2
- package/dist/_node-chunks/chunk-DWA53E73.js +0 -23
- package/dist/_node-chunks/chunk-KJAFCNZ3.js +0 -61
- package/dist/_node-chunks/chunk-Z4BMBA5L.js +0 -18
|
@@ -7493,7 +7493,7 @@ var import_react4, tags, styled, init_emotion_styled_browser_esm = __esm({
|
|
|
7493
7493
|
});
|
|
7494
7494
|
|
|
7495
7495
|
// src/theming/base.ts
|
|
7496
|
-
var color, background, typography, init_base = __esm({
|
|
7496
|
+
var color, background, typography, tokens, init_base = __esm({
|
|
7497
7497
|
"src/theming/base.ts"() {
|
|
7498
7498
|
"use strict";
|
|
7499
7499
|
color = {
|
|
@@ -7522,7 +7522,7 @@ var color, background, typography, init_base = __esm({
|
|
|
7522
7522
|
darker: "#454C54",
|
|
7523
7523
|
darkest: "#2E3338",
|
|
7524
7524
|
// For borders
|
|
7525
|
-
border: "
|
|
7525
|
+
border: "hsl(212 50% 30% / 0.15)",
|
|
7526
7526
|
// Status
|
|
7527
7527
|
positive: "#66BF3C",
|
|
7528
7528
|
warning: "#E69D00",
|
|
@@ -7589,6 +7589,69 @@ var color, background, typography, init_base = __esm({
|
|
|
7589
7589
|
l3: 48,
|
|
7590
7590
|
code: 90
|
|
7591
7591
|
}
|
|
7592
|
+
}, tokens = {
|
|
7593
|
+
light: {
|
|
7594
|
+
fgColor: {
|
|
7595
|
+
default: color.darkest,
|
|
7596
|
+
muted: color.dark,
|
|
7597
|
+
accent: color.secondary,
|
|
7598
|
+
inverse: color.lightest,
|
|
7599
|
+
// TODO: add 'disabled'
|
|
7600
|
+
positive: "#427C27",
|
|
7601
|
+
warning: "#7A4100",
|
|
7602
|
+
negative: "#C23400",
|
|
7603
|
+
critical: "#FFFFFF"
|
|
7604
|
+
},
|
|
7605
|
+
bgColor: {
|
|
7606
|
+
default: color.lightest,
|
|
7607
|
+
muted: background.app,
|
|
7608
|
+
// TODO: add 'accent'? white or blue?
|
|
7609
|
+
positive: "#F1FFEB",
|
|
7610
|
+
warning: "#FFF7EB",
|
|
7611
|
+
negative: "#FFF0EB",
|
|
7612
|
+
critical: "#D13800"
|
|
7613
|
+
},
|
|
7614
|
+
borderColor: {
|
|
7615
|
+
default: color.border,
|
|
7616
|
+
muted: "hsl(0 0% 0% / 0.1)",
|
|
7617
|
+
inverse: "hsl(0 0% 100% / 0.1)",
|
|
7618
|
+
positive: "#BFE7AC",
|
|
7619
|
+
warning: "#FFCE85",
|
|
7620
|
+
negative: "#FFC3AD",
|
|
7621
|
+
critical: "hsl(16 100% 100% / 0)"
|
|
7622
|
+
}
|
|
7623
|
+
},
|
|
7624
|
+
dark: {
|
|
7625
|
+
fgColor: {
|
|
7626
|
+
default: "#C9CCCF",
|
|
7627
|
+
muted: "#95999D",
|
|
7628
|
+
accent: "#479DFF",
|
|
7629
|
+
inverse: "#1B1C1D",
|
|
7630
|
+
// TODO: add 'disabled'
|
|
7631
|
+
positive: "#86CE64",
|
|
7632
|
+
warning: "#FFAD33",
|
|
7633
|
+
negative: "#FF6933",
|
|
7634
|
+
critical: "#FF6933"
|
|
7635
|
+
},
|
|
7636
|
+
bgColor: {
|
|
7637
|
+
default: "#222325",
|
|
7638
|
+
muted: "#1B1C1D",
|
|
7639
|
+
// TODO: add 'accent'? white or blue?
|
|
7640
|
+
positive: "hsl(101 100% 100% / 0)",
|
|
7641
|
+
warning: "hsl(101 100% 100% / 0)",
|
|
7642
|
+
negative: "hsl(101 100% 100% / 0)",
|
|
7643
|
+
critical: "hsl(101 100% 100% / 0)"
|
|
7644
|
+
},
|
|
7645
|
+
borderColor: {
|
|
7646
|
+
default: "hsl(0 0% 100% / 0.1)",
|
|
7647
|
+
muted: "hsl(0 0% 100% / 0.5)",
|
|
7648
|
+
inverse: "hsl(0 0% 0% / 0.1)",
|
|
7649
|
+
positive: "hsl(101 52% 64% / 0.15)",
|
|
7650
|
+
warning: "hsl(36 100% 64% / 0.15)",
|
|
7651
|
+
negative: "hsl(16 100% 64% / 0.15)",
|
|
7652
|
+
critical: "#FF6933"
|
|
7653
|
+
}
|
|
7654
|
+
}
|
|
7592
7655
|
};
|
|
7593
7656
|
}
|
|
7594
7657
|
});
|
|
@@ -7856,7 +7919,7 @@ var theme, dark_default, init_dark = __esm({
|
|
|
7856
7919
|
appContentBg: "#222325",
|
|
7857
7920
|
appHoverBg: "#233952",
|
|
7858
7921
|
appPreviewBg: color.lightest,
|
|
7859
|
-
appBorderColor: "
|
|
7922
|
+
appBorderColor: "hsl(0 0% 100% / 0.1)",
|
|
7860
7923
|
appBorderRadius: 4,
|
|
7861
7924
|
// Fonts
|
|
7862
7925
|
fontBase: typography.fonts.base,
|
|
@@ -7872,11 +7935,11 @@ var theme, dark_default, init_dark = __esm({
|
|
|
7872
7935
|
barBg: "#222325",
|
|
7873
7936
|
// Form colors
|
|
7874
7937
|
buttonBg: "#1B1C1D",
|
|
7875
|
-
buttonBorder: "hsl(0 0 100 / 0.1)",
|
|
7938
|
+
buttonBorder: "hsl(0 0% 100% / 0.1)",
|
|
7876
7939
|
booleanBg: "#1B1C1D",
|
|
7877
7940
|
booleanSelectedBg: "#292B2E",
|
|
7878
7941
|
inputBg: "#1B1C1D",
|
|
7879
|
-
inputBorder: "hsl(0 0 100 / 0.1)",
|
|
7942
|
+
inputBorder: "hsl(0 0% 100% / 0.1)",
|
|
7880
7943
|
inputTextColor: "#C9CCCF",
|
|
7881
7944
|
inputBorderRadius: 4
|
|
7882
7945
|
}, dark_default = theme;
|
|
@@ -8602,11 +8665,17 @@ var themesBase, preferredColorScheme, themes, create, init_create = __esm({
|
|
|
8602
8665
|
}, preferredColorScheme = getPreferredColorScheme(), themes = {
|
|
8603
8666
|
...themesBase,
|
|
8604
8667
|
normal: themesBase[preferredColorScheme]
|
|
8605
|
-
}, create = (vars = {
|
|
8668
|
+
}, create = (vars = {
|
|
8669
|
+
base: preferredColorScheme
|
|
8670
|
+
}, rest) => {
|
|
8606
8671
|
let inherit = {
|
|
8672
|
+
// We always inherit the preferred color scheme.
|
|
8607
8673
|
...themes[preferredColorScheme],
|
|
8674
|
+
// And then the declared theme base if it exists.
|
|
8608
8675
|
...themes[vars.base] || {},
|
|
8676
|
+
// And then the actual theme content.
|
|
8609
8677
|
...vars,
|
|
8678
|
+
// If no theme base was declared, we declare the preferred color scheme as the base.
|
|
8610
8679
|
base: themes[vars.base] ? vars.base : preferredColorScheme
|
|
8611
8680
|
};
|
|
8612
8681
|
return {
|
|
@@ -8913,6 +8982,7 @@ var lightSyntaxColors, darkSyntaxColors, createColors, convert, init_convert = _
|
|
|
8913
8982
|
return {
|
|
8914
8983
|
...rest,
|
|
8915
8984
|
base,
|
|
8985
|
+
...base === "dark" ? tokens.dark : tokens.light,
|
|
8916
8986
|
color: createColors(inherit),
|
|
8917
8987
|
background: {
|
|
8918
8988
|
app: appBg,
|
|
@@ -8967,13 +9037,13 @@ var lightSyntaxColors, darkSyntaxColors, createColors, convert, init_convert = _
|
|
|
8967
9037
|
target: brandTarget
|
|
8968
9038
|
},
|
|
8969
9039
|
code: create2({
|
|
8970
|
-
colors: base === "
|
|
9040
|
+
colors: base === "dark" ? darkSyntaxColors : lightSyntaxColors,
|
|
8971
9041
|
mono: fontCode
|
|
8972
9042
|
}),
|
|
8973
9043
|
// Addon actions theme
|
|
8974
9044
|
// API example https://github.com/storybookjs/react-inspector/blob/master/src/styles/themes/chromeLight.tsx
|
|
8975
9045
|
addonActionsTheme: {
|
|
8976
|
-
...base === "
|
|
9046
|
+
...base === "dark" ? chromeDark : chromeLight,
|
|
8977
9047
|
BASE_FONT_FAMILY: fontCode,
|
|
8978
9048
|
BASE_FONT_SIZE: typography.size.s2 - 1,
|
|
8979
9049
|
BASE_LINE_HEIGHT: "18px",
|
|
@@ -9104,6 +9174,7 @@ __export(theming_exports, {
|
|
|
9104
9174
|
lighten: () => lightenColor,
|
|
9105
9175
|
styled: () => styled,
|
|
9106
9176
|
themes: () => themes,
|
|
9177
|
+
tokens: () => tokens,
|
|
9107
9178
|
typography: () => typography,
|
|
9108
9179
|
useTheme: () => useTheme,
|
|
9109
9180
|
withTheme: () => withTheme
|
|
@@ -9964,15 +10035,15 @@ var require_jsx = __commonJS({
|
|
|
9964
10035
|
);
|
|
9965
10036
|
var stringifyToken = function(token2) {
|
|
9966
10037
|
return token2 ? typeof token2 == "string" ? token2 : typeof token2.content == "string" ? token2.content : token2.content.map(stringifyToken).join("") : "";
|
|
9967
|
-
}, walkTokens = function(
|
|
9968
|
-
for (var openedTags = [], i2 = 0; i2 <
|
|
9969
|
-
var token2 =
|
|
10038
|
+
}, walkTokens = function(tokens2) {
|
|
10039
|
+
for (var openedTags = [], i2 = 0; i2 < tokens2.length; i2++) {
|
|
10040
|
+
var token2 = tokens2[i2], notTagNorBrace = !1;
|
|
9970
10041
|
if (typeof token2 != "string" && (token2.type === "tag" && token2.content[0] && token2.content[0].type === "tag" ? token2.content[0].content[0].content === "</" ? openedTags.length > 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token2.content[0].content[1]) && openedTags.pop() : token2.content[token2.content.length - 1].content === "/>" || openedTags.push({
|
|
9971
10042
|
tagName: stringifyToken(token2.content[0].content[1]),
|
|
9972
10043
|
openedBraces: 0
|
|
9973
10044
|
}) : openedTags.length > 0 && token2.type === "punctuation" && token2.content === "{" ? openedTags[openedTags.length - 1].openedBraces++ : openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token2.type === "punctuation" && token2.content === "}" ? openedTags[openedTags.length - 1].openedBraces-- : notTagNorBrace = !0), (notTagNorBrace || typeof token2 == "string") && openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) {
|
|
9974
10045
|
var plainText = stringifyToken(token2);
|
|
9975
|
-
i2 <
|
|
10046
|
+
i2 < tokens2.length - 1 && (typeof tokens2[i2 + 1] == "string" || tokens2[i2 + 1].type === "plain-text") && (plainText += stringifyToken(tokens2[i2 + 1]), tokens2.splice(i2 + 1, 1)), i2 > 0 && (typeof tokens2[i2 - 1] == "string" || tokens2[i2 - 1].type === "plain-text") && (plainText = stringifyToken(tokens2[i2 - 1]) + plainText, tokens2.splice(i2 - 1, 1), i2--), tokens2[i2] = new Prism2.Token(
|
|
9976
10047
|
"plain-text",
|
|
9977
10048
|
plainText,
|
|
9978
10049
|
null,
|
|
@@ -10260,10 +10331,10 @@ var require_markdown = __commonJS({
|
|
|
10260
10331
|
}), Prism2.hooks.add("after-tokenize", function(env) {
|
|
10261
10332
|
if (env.language !== "markdown" && env.language !== "md")
|
|
10262
10333
|
return;
|
|
10263
|
-
function walkTokens(
|
|
10264
|
-
if (!(!
|
|
10265
|
-
for (var i2 = 0, l2 =
|
|
10266
|
-
var token2 =
|
|
10334
|
+
function walkTokens(tokens2) {
|
|
10335
|
+
if (!(!tokens2 || typeof tokens2 == "string"))
|
|
10336
|
+
for (var i2 = 0, l2 = tokens2.length; i2 < l2; i2++) {
|
|
10337
|
+
var token2 = tokens2[i2];
|
|
10267
10338
|
if (token2.type !== "code") {
|
|
10268
10339
|
walkTokens(token2.content);
|
|
10269
10340
|
continue;
|
|
@@ -12289,8 +12360,8 @@ var require_prism_core = __commonJS({
|
|
|
12289
12360
|
* @memberof Prism
|
|
12290
12361
|
*/
|
|
12291
12362
|
util: {
|
|
12292
|
-
encode: function encode2(
|
|
12293
|
-
return
|
|
12363
|
+
encode: function encode2(tokens2) {
|
|
12364
|
+
return tokens2 instanceof Token ? new Token(tokens2.type, encode2(tokens2.content), tokens2.alias) : Array.isArray(tokens2) ? tokens2.map(encode2) : tokens2.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
12294
12365
|
},
|
|
12295
12366
|
/**
|
|
12296
12367
|
* Returns the name of the type of the given value.
|
|
@@ -13190,8 +13261,8 @@ var require_core = __commonJS({
|
|
|
13190
13261
|
value = result[index4], result[index4] = refract.Token.stringify(value, language, result);
|
|
13191
13262
|
return result;
|
|
13192
13263
|
}
|
|
13193
|
-
function encode2(
|
|
13194
|
-
return
|
|
13264
|
+
function encode2(tokens2) {
|
|
13265
|
+
return tokens2;
|
|
13195
13266
|
}
|
|
13196
13267
|
function attributes(attrs) {
|
|
13197
13268
|
var key;
|
|
@@ -15757,7 +15828,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
15757
15828
|
function rgb2(m3) {
|
|
15758
15829
|
return callback("rgb", m3), "";
|
|
15759
15830
|
}
|
|
15760
|
-
var
|
|
15831
|
+
var tokens2 = [{
|
|
15761
15832
|
pattern: /^\x08+/,
|
|
15762
15833
|
sub: remove2
|
|
15763
15834
|
}, {
|
|
@@ -15822,8 +15893,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
15822
15893
|
}
|
|
15823
15894
|
var results1 = [], _text = text, length2 = _text.length;
|
|
15824
15895
|
outer: for (; length2 > 0; ) {
|
|
15825
|
-
for (var i2 = 0, o2 = 0, len =
|
|
15826
|
-
var handler =
|
|
15896
|
+
for (var i2 = 0, o2 = 0, len = tokens2.length; o2 < len; i2 = ++o2) {
|
|
15897
|
+
var handler = tokens2[i2];
|
|
15827
15898
|
if (process2(handler, i2), text.length !== length2) {
|
|
15828
15899
|
length2 = text.length;
|
|
15829
15900
|
continue outer;
|
|
@@ -31892,32 +31963,33 @@ var BadgeWrapper = styled.div(
|
|
|
31892
31963
|
switch (status) {
|
|
31893
31964
|
case "critical":
|
|
31894
31965
|
return {
|
|
31895
|
-
color: theme3.
|
|
31896
|
-
background: theme3.
|
|
31966
|
+
color: theme3.fgColor.critical,
|
|
31967
|
+
background: theme3.bgColor.critical,
|
|
31968
|
+
boxShadow: `inset 0 0 0 1px ${theme3.borderColor.critical}`
|
|
31897
31969
|
};
|
|
31898
31970
|
case "negative":
|
|
31899
31971
|
return {
|
|
31900
|
-
color: theme3.
|
|
31901
|
-
background: theme3.
|
|
31902
|
-
boxShadow:
|
|
31972
|
+
color: theme3.fgColor.negative,
|
|
31973
|
+
background: theme3.bgColor.negative,
|
|
31974
|
+
boxShadow: `inset 0 0 0 1px ${theme3.borderColor.negative}`
|
|
31903
31975
|
};
|
|
31904
31976
|
case "warning":
|
|
31905
31977
|
return {
|
|
31906
|
-
color: theme3.
|
|
31907
|
-
background: theme3.
|
|
31908
|
-
boxShadow:
|
|
31978
|
+
color: theme3.fgColor.warning,
|
|
31979
|
+
background: theme3.bgColor.warning,
|
|
31980
|
+
boxShadow: `inset 0 0 0 1px ${theme3.borderColor.warning}`
|
|
31909
31981
|
};
|
|
31910
31982
|
case "neutral":
|
|
31911
31983
|
return {
|
|
31912
|
-
color: theme3.
|
|
31913
|
-
background: theme3.base === "
|
|
31984
|
+
color: theme3.fgColor.muted,
|
|
31985
|
+
background: theme3.base === "dark" ? theme3.barBg : theme3.background.app,
|
|
31914
31986
|
boxShadow: `inset 0 0 0 1px ${curriedTransparentize$1(0.8, theme3.textMutedColor)}`
|
|
31915
31987
|
};
|
|
31916
31988
|
case "positive":
|
|
31917
31989
|
return {
|
|
31918
|
-
color: theme3.
|
|
31919
|
-
background: theme3.
|
|
31920
|
-
boxShadow:
|
|
31990
|
+
color: theme3.fgColor.positive,
|
|
31991
|
+
background: theme3.bgColor.positive,
|
|
31992
|
+
boxShadow: `inset 0 0 0 1px ${theme3.borderColor.positive}`
|
|
31921
31993
|
};
|
|
31922
31994
|
case "active":
|
|
31923
31995
|
return {
|
|
@@ -40618,11 +40690,11 @@ var Markers;
|
|
|
40618
40690
|
})(Markers = Markers || (Markers = {}));
|
|
40619
40691
|
|
|
40620
40692
|
// ../node_modules/comment-parser/es6/stringifier/index.js
|
|
40621
|
-
function join(
|
|
40622
|
-
return
|
|
40693
|
+
function join(tokens2) {
|
|
40694
|
+
return tokens2.start + tokens2.delimiter + tokens2.postDelimiter + tokens2.tag + tokens2.postTag + tokens2.type + tokens2.postType + tokens2.name + tokens2.postName + tokens2.description + tokens2.end + tokens2.lineEnd;
|
|
40623
40695
|
}
|
|
40624
40696
|
function getStringifier() {
|
|
40625
|
-
return (block) => block.source.map(({ tokens }) => join(
|
|
40697
|
+
return (block) => block.source.map(({ tokens: tokens2 }) => join(tokens2)).join(`
|
|
40626
40698
|
`);
|
|
40627
40699
|
}
|
|
40628
40700
|
|
|
@@ -61021,7 +61093,7 @@ init_dist();
|
|
|
61021
61093
|
var import_memoizerific8 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
|
|
61022
61094
|
|
|
61023
61095
|
// src/manager-api/version.ts
|
|
61024
|
-
var version = "10.1.0-beta.
|
|
61096
|
+
var version = "10.1.0-beta.3";
|
|
61025
61097
|
|
|
61026
61098
|
// src/manager-api/modules/versions.ts
|
|
61027
61099
|
var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
|
|
@@ -61054,15 +61126,12 @@ var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.def
|
|
|
61054
61126
|
},
|
|
61055
61127
|
// TODO: Move this to it's own "info" module later
|
|
61056
61128
|
getDocsUrl: ({ asset, subpath = asset, versioned, renderer, ref = "ui" }) => {
|
|
61057
|
-
let {
|
|
61058
|
-
|
|
61059
|
-
|
|
61060
|
-
if (
|
|
61061
|
-
|
|
61062
|
-
|
|
61063
|
-
let versionDiff = import_semver.default.diff(latest.version, current.version);
|
|
61064
|
-
versionDiff === "patch" || versionDiff === null || // assume latest version when current version is a 0.0.0 canary
|
|
61065
|
-
import_semver.default.satisfies(current.version, "0.0.0", { includePrerelease: !0 }) || (url += `${import_semver.default.major(current.version)}.${import_semver.default.minor(current.version)}/`);
|
|
61129
|
+
let { versions } = store2.getState(), latestVersion = versions.latest?.version, currentVersion = versions.current?.version, activeVersion = currentVersion?.startsWith("0.0.0") && latestVersion || currentVersion, url = `https://storybook.js.org/${asset ? "docs-assets" : "docs"}/`;
|
|
61130
|
+
if (asset && activeVersion)
|
|
61131
|
+
url += `${import_semver.default.major(activeVersion)}.${import_semver.default.minor(activeVersion)}/`;
|
|
61132
|
+
else if (versioned && activeVersion && latestVersion) {
|
|
61133
|
+
let versionDiff = import_semver.default.diff(latestVersion, activeVersion);
|
|
61134
|
+
versionDiff === "patch" || versionDiff === null || (url += `${import_semver.default.major(activeVersion)}.${import_semver.default.minor(activeVersion)}/`);
|
|
61066
61135
|
}
|
|
61067
61136
|
let [cleanedSubpath, hash4] = subpath?.split("#") || [];
|
|
61068
61137
|
if (cleanedSubpath && (url += asset ? cleanedSubpath : `${cleanedSubpath}/`), renderer && typeof scope.STORYBOOK_RENDERER < "u") {
|
|
@@ -63349,7 +63418,7 @@ function parseNumberSkeletonFromString(skeleton) {
|
|
|
63349
63418
|
throw new Error("Number skeleton cannot be empty");
|
|
63350
63419
|
for (var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function(x2) {
|
|
63351
63420
|
return x2.length > 0;
|
|
63352
|
-
}),
|
|
63421
|
+
}), tokens2 = [], _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
|
|
63353
63422
|
var stringToken = stringTokens_1[_i], stemAndOptions = stringToken.split("/");
|
|
63354
63423
|
if (stemAndOptions.length === 0)
|
|
63355
63424
|
throw new Error("Invalid number skeleton");
|
|
@@ -63358,9 +63427,9 @@ function parseNumberSkeletonFromString(skeleton) {
|
|
|
63358
63427
|
if (option.length === 0)
|
|
63359
63428
|
throw new Error("Invalid number skeleton");
|
|
63360
63429
|
}
|
|
63361
|
-
|
|
63430
|
+
tokens2.push({ stem, options });
|
|
63362
63431
|
}
|
|
63363
|
-
return
|
|
63432
|
+
return tokens2;
|
|
63364
63433
|
}
|
|
63365
63434
|
function icuUnitToEcma(unit) {
|
|
63366
63435
|
return unit.replace(/^(.*?)-/, "");
|
|
@@ -63430,8 +63499,8 @@ function parseNotationOptions(opt) {
|
|
|
63430
63499
|
var result = {}, signOpts = parseSign(opt);
|
|
63431
63500
|
return signOpts || result;
|
|
63432
63501
|
}
|
|
63433
|
-
function parseNumberSkeleton(
|
|
63434
|
-
for (var result = {}, _i = 0, tokens_1 =
|
|
63502
|
+
function parseNumberSkeleton(tokens2) {
|
|
63503
|
+
for (var result = {}, _i = 0, tokens_1 = tokens2; _i < tokens_1.length; _i++) {
|
|
63435
63504
|
var token2 = tokens_1[_i];
|
|
63436
63505
|
switch (token2.stem) {
|
|
63437
63506
|
case "percent":
|
|
@@ -65444,18 +65513,18 @@ var IDENTIFIER_PREFIX_RE_1, Parser = (
|
|
|
65444
65513
|
err: null
|
|
65445
65514
|
};
|
|
65446
65515
|
}, Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location4) {
|
|
65447
|
-
var
|
|
65516
|
+
var tokens2 = [];
|
|
65448
65517
|
try {
|
|
65449
|
-
|
|
65518
|
+
tokens2 = parseNumberSkeletonFromString(skeleton);
|
|
65450
65519
|
} catch {
|
|
65451
65520
|
return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location4);
|
|
65452
65521
|
}
|
|
65453
65522
|
return {
|
|
65454
65523
|
val: {
|
|
65455
65524
|
type: SKELETON_TYPE.number,
|
|
65456
|
-
tokens,
|
|
65525
|
+
tokens: tokens2,
|
|
65457
65526
|
location: location4,
|
|
65458
|
-
parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(
|
|
65527
|
+
parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens2) : {}
|
|
65459
65528
|
},
|
|
65460
65529
|
err: null
|
|
65461
65530
|
};
|
|
@@ -68837,26 +68906,28 @@ var import_react112 = __toESM(require_react(), 1);
|
|
|
68837
68906
|
init_theming();
|
|
68838
68907
|
var Input = styled.input(({ theme: theme3 }) => ({
|
|
68839
68908
|
appearance: "none",
|
|
68909
|
+
backgroundColor: theme3.input.background,
|
|
68910
|
+
border: `1px solid ${theme3.base === "dark" ? "hsl(0 0 100 / 0.4)" : "hsl(0 0 0 / 0.44)"}`,
|
|
68911
|
+
borderRadius: 2,
|
|
68840
68912
|
display: "grid",
|
|
68841
|
-
placeContent: "center",
|
|
68842
|
-
width: 14,
|
|
68843
|
-
height: 14,
|
|
68844
68913
|
flexShrink: 0,
|
|
68914
|
+
height: 14,
|
|
68845
68915
|
margin: 0,
|
|
68846
|
-
|
|
68847
|
-
borderRadius: 2,
|
|
68848
|
-
backgroundColor: theme3.input.background,
|
|
68916
|
+
placeContent: "center",
|
|
68849
68917
|
transition: "background-color 0.1s",
|
|
68918
|
+
width: 14,
|
|
68850
68919
|
"&:enabled": {
|
|
68851
68920
|
cursor: "pointer"
|
|
68852
68921
|
},
|
|
68853
68922
|
"&:disabled": {
|
|
68854
|
-
backgroundColor:
|
|
68923
|
+
backgroundColor: "transparent",
|
|
68924
|
+
borderColor: theme3.input.border
|
|
68855
68925
|
},
|
|
68856
68926
|
"&:disabled:checked, &:disabled:indeterminate": {
|
|
68857
|
-
backgroundColor: theme3.base === "
|
|
68927
|
+
backgroundColor: theme3.base === "dark" ? color.dark : theme3.color.mediumdark
|
|
68858
68928
|
},
|
|
68859
68929
|
"&:checked, &:indeterminate": {
|
|
68930
|
+
border: "none",
|
|
68860
68931
|
backgroundColor: color.secondary
|
|
68861
68932
|
},
|
|
68862
68933
|
"&:checked::before": {
|
|
@@ -69006,27 +69077,30 @@ var import_react116 = __toESM(require_react(), 1);
|
|
|
69006
69077
|
init_theming();
|
|
69007
69078
|
var Input4 = styled.input(({ theme: theme3 }) => ({
|
|
69008
69079
|
appearance: "none",
|
|
69080
|
+
backgroundColor: theme3.input.background,
|
|
69081
|
+
border: `1px solid ${theme3.base === "dark" ? "hsl(0 0 100 / 0.4)" : "hsl(0 0 0 / 0.44)"}`,
|
|
69082
|
+
borderRadius: 8,
|
|
69009
69083
|
display: "grid",
|
|
69010
|
-
placeContent: "center",
|
|
69011
|
-
width: 16,
|
|
69012
|
-
height: 16,
|
|
69013
69084
|
flexShrink: 0,
|
|
69085
|
+
height: 16,
|
|
69014
69086
|
margin: -1,
|
|
69015
|
-
|
|
69016
|
-
borderRadius: 8,
|
|
69017
|
-
backgroundColor: theme3.input.background,
|
|
69087
|
+
placeContent: "center",
|
|
69018
69088
|
transition: "background-color 0.1s",
|
|
69089
|
+
width: 16,
|
|
69019
69090
|
"&:enabled": {
|
|
69020
69091
|
cursor: "pointer"
|
|
69021
69092
|
},
|
|
69022
69093
|
"&:disabled": {
|
|
69023
|
-
backgroundColor:
|
|
69094
|
+
backgroundColor: "transparent",
|
|
69095
|
+
borderColor: theme3.input.border
|
|
69024
69096
|
},
|
|
69025
69097
|
"&:disabled:checked": {
|
|
69026
|
-
backgroundColor: theme3.base === "
|
|
69098
|
+
backgroundColor: theme3.base === "dark" ? color.dark : theme3.color.mediumdark,
|
|
69099
|
+
borderColor: theme3.base === "dark" ? color.dark : theme3.color.mediumdark
|
|
69027
69100
|
},
|
|
69028
69101
|
"&:checked": {
|
|
69029
69102
|
backgroundColor: color.secondary,
|
|
69103
|
+
borderColor: color.secondary,
|
|
69030
69104
|
boxShadow: `inset 0 0 0 2px ${theme3.input.background}`
|
|
69031
69105
|
},
|
|
69032
69106
|
"&:enabled:focus-visible": {
|