storybook 9.0.13 → 9.0.14
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/bin/index.cjs +43 -43
- package/dist/bin/index.js +43 -43
- package/dist/cli/bin/index.cjs +2 -2
- package/dist/cli/bin/index.js +2 -2
- package/dist/common/index.cjs +60 -60
- package/dist/common/index.js +106 -106
- package/dist/components/index.cjs +9 -7
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +9 -6
- package/dist/core-server/presets/common-manager.js +229 -228
- package/dist/instrumenter/index.cjs +1125 -1098
- package/dist/instrumenter/index.js +751 -729
- package/dist/manager/globals-runtime.js +20775 -23454
- package/dist/manager/runtime.js +1178 -1177
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/preview/runtime.js +13255 -15981
- package/dist/telemetry/index.cjs +2 -2
- package/dist/telemetry/index.js +2 -2
- package/dist/test/index.cjs +9136 -9815
- package/dist/test/index.js +8339 -9025
- package/package.json +4 -4
package/dist/common/index.js
CHANGED
|
@@ -1105,7 +1105,7 @@ var gQ = m(($W, oQ) => {
|
|
|
1105
1105
|
});
|
|
1106
1106
|
|
|
1107
1107
|
// ../node_modules/picomatch/lib/constants.js
|
|
1108
|
-
var Ti = m((
|
|
1108
|
+
var Ti = m((_4, SQ) => {
|
|
1109
1109
|
"use strict";
|
|
1110
1110
|
var QR = v("path"), qe = "\\\\/", wQ = `[^${qe}]`, It = "\\.", fR = "\\+", dR = "\\?", Fn = "\\/", pR = "(?=.)", mQ = "[^/]", za = `(?:${Fn}\
|
|
1111
1111
|
|$)`, yQ = `(?:^|${Fn})`, Wa = `${It}{1,2}${za}`, wR = `(?!${It})`, mR = `(?!${yQ}${Wa})`, yR = `(?!${It}{0,1}${za})`, DR = `(?!${Wa})`, SR = `\
|
|
@@ -1316,7 +1316,7 @@ var Hi = m((se) => {
|
|
|
1316
1316
|
});
|
|
1317
1317
|
|
|
1318
1318
|
// ../node_modules/picomatch/lib/scan.js
|
|
1319
|
-
var vQ = m((
|
|
1319
|
+
var vQ = m((J4, RQ) => {
|
|
1320
1320
|
"use strict";
|
|
1321
1321
|
var KQ = Hi(), {
|
|
1322
1322
|
CHAR_ASTERISK: Va,
|
|
@@ -1506,7 +1506,7 @@ var vQ = m((J3, RQ) => {
|
|
|
1506
1506
|
});
|
|
1507
1507
|
|
|
1508
1508
|
// ../node_modules/picomatch/lib/parse.js
|
|
1509
|
-
var YQ = m((
|
|
1509
|
+
var YQ = m((T4, xQ) => {
|
|
1510
1510
|
"use strict";
|
|
1511
1511
|
var kn = Ti(), le = Hi(), {
|
|
1512
1512
|
MAX_LENGTH: bn,
|
|
@@ -1972,7 +1972,7 @@ slash", value: "/", output: "" });
|
|
|
1972
1972
|
});
|
|
1973
1973
|
|
|
1974
1974
|
// ../node_modules/picomatch/lib/picomatch.js
|
|
1975
|
-
var UQ = m((
|
|
1975
|
+
var UQ = m((j4, PQ) => {
|
|
1976
1976
|
"use strict";
|
|
1977
1977
|
var qR = v("path"), zR = vQ(), tC = YQ(), rC = Hi(), WR = Ti(), VR = /* @__PURE__ */ s((t) => t && typeof t == "object" && !Array.isArray(
|
|
1978
1978
|
t), "isObject"), bA = /* @__PURE__ */ s((t, A, e = !1) => {
|
|
@@ -2046,7 +2046,7 @@ ion" && i.onIgnore(D), D.isMatch = !1, Q ? D : !1) : (typeof i.onMatch == "funct
|
|
|
2046
2046
|
});
|
|
2047
2047
|
|
|
2048
2048
|
// ../node_modules/picomatch/index.js
|
|
2049
|
-
var Nn = m((
|
|
2049
|
+
var Nn = m((z4, _Q) => {
|
|
2050
2050
|
"use strict";
|
|
2051
2051
|
_Q.exports = UQ();
|
|
2052
2052
|
});
|
|
@@ -18599,49 +18599,49 @@ var CK = ue(() => {
|
|
|
18599
18599
|
|
|
18600
18600
|
// src/common/versions.ts
|
|
18601
18601
|
var nt = {
|
|
18602
|
-
"@storybook/addon-a11y": "9.0.
|
|
18603
|
-
"@storybook/addon-docs": "9.0.
|
|
18604
|
-
"@storybook/addon-jest": "9.0.
|
|
18605
|
-
"@storybook/addon-links": "9.0.
|
|
18606
|
-
"@storybook/addon-onboarding": "9.0.
|
|
18607
|
-
"storybook-addon-pseudo-states": "9.0.
|
|
18608
|
-
"@storybook/addon-themes": "9.0.
|
|
18609
|
-
"@storybook/addon-vitest": "9.0.
|
|
18610
|
-
"@storybook/builder-vite": "9.0.
|
|
18611
|
-
"@storybook/builder-webpack5": "9.0.
|
|
18612
|
-
storybook: "9.0.
|
|
18613
|
-
"@storybook/angular": "9.0.
|
|
18614
|
-
"@storybook/ember": "9.0.
|
|
18615
|
-
"@storybook/html-vite": "9.0.
|
|
18616
|
-
"@storybook/nextjs": "9.0.
|
|
18617
|
-
"@storybook/nextjs-vite": "9.0.
|
|
18618
|
-
"@storybook/preact-vite": "9.0.
|
|
18619
|
-
"@storybook/react-native-web-vite": "9.0.
|
|
18620
|
-
"@storybook/react-vite": "9.0.
|
|
18621
|
-
"@storybook/react-webpack5": "9.0.
|
|
18622
|
-
"@storybook/server-webpack5": "9.0.
|
|
18623
|
-
"@storybook/svelte-vite": "9.0.
|
|
18624
|
-
"@storybook/sveltekit": "9.0.
|
|
18625
|
-
"@storybook/vue3-vite": "9.0.
|
|
18626
|
-
"@storybook/web-components-vite": "9.0.
|
|
18627
|
-
sb: "9.0.
|
|
18628
|
-
"@storybook/cli": "9.0.
|
|
18629
|
-
"@storybook/codemod": "9.0.
|
|
18630
|
-
"@storybook/core-webpack": "9.0.
|
|
18631
|
-
"create-storybook": "9.0.
|
|
18632
|
-
"@storybook/csf-plugin": "9.0.
|
|
18633
|
-
"eslint-plugin-storybook": "9.0.
|
|
18634
|
-
"@storybook/react-dom-shim": "9.0.
|
|
18635
|
-
"@storybook/preset-create-react-app": "9.0.
|
|
18636
|
-
"@storybook/preset-react-webpack": "9.0.
|
|
18637
|
-
"@storybook/preset-server-webpack": "9.0.
|
|
18638
|
-
"@storybook/html": "9.0.
|
|
18639
|
-
"@storybook/preact": "9.0.
|
|
18640
|
-
"@storybook/react": "9.0.
|
|
18641
|
-
"@storybook/server": "9.0.
|
|
18642
|
-
"@storybook/svelte": "9.0.
|
|
18643
|
-
"@storybook/vue3": "9.0.
|
|
18644
|
-
"@storybook/web-components": "9.0.
|
|
18602
|
+
"@storybook/addon-a11y": "9.0.14",
|
|
18603
|
+
"@storybook/addon-docs": "9.0.14",
|
|
18604
|
+
"@storybook/addon-jest": "9.0.14",
|
|
18605
|
+
"@storybook/addon-links": "9.0.14",
|
|
18606
|
+
"@storybook/addon-onboarding": "9.0.14",
|
|
18607
|
+
"storybook-addon-pseudo-states": "9.0.14",
|
|
18608
|
+
"@storybook/addon-themes": "9.0.14",
|
|
18609
|
+
"@storybook/addon-vitest": "9.0.14",
|
|
18610
|
+
"@storybook/builder-vite": "9.0.14",
|
|
18611
|
+
"@storybook/builder-webpack5": "9.0.14",
|
|
18612
|
+
storybook: "9.0.14",
|
|
18613
|
+
"@storybook/angular": "9.0.14",
|
|
18614
|
+
"@storybook/ember": "9.0.14",
|
|
18615
|
+
"@storybook/html-vite": "9.0.14",
|
|
18616
|
+
"@storybook/nextjs": "9.0.14",
|
|
18617
|
+
"@storybook/nextjs-vite": "9.0.14",
|
|
18618
|
+
"@storybook/preact-vite": "9.0.14",
|
|
18619
|
+
"@storybook/react-native-web-vite": "9.0.14",
|
|
18620
|
+
"@storybook/react-vite": "9.0.14",
|
|
18621
|
+
"@storybook/react-webpack5": "9.0.14",
|
|
18622
|
+
"@storybook/server-webpack5": "9.0.14",
|
|
18623
|
+
"@storybook/svelte-vite": "9.0.14",
|
|
18624
|
+
"@storybook/sveltekit": "9.0.14",
|
|
18625
|
+
"@storybook/vue3-vite": "9.0.14",
|
|
18626
|
+
"@storybook/web-components-vite": "9.0.14",
|
|
18627
|
+
sb: "9.0.14",
|
|
18628
|
+
"@storybook/cli": "9.0.14",
|
|
18629
|
+
"@storybook/codemod": "9.0.14",
|
|
18630
|
+
"@storybook/core-webpack": "9.0.14",
|
|
18631
|
+
"create-storybook": "9.0.14",
|
|
18632
|
+
"@storybook/csf-plugin": "9.0.14",
|
|
18633
|
+
"eslint-plugin-storybook": "9.0.14",
|
|
18634
|
+
"@storybook/react-dom-shim": "9.0.14",
|
|
18635
|
+
"@storybook/preset-create-react-app": "9.0.14",
|
|
18636
|
+
"@storybook/preset-react-webpack": "9.0.14",
|
|
18637
|
+
"@storybook/preset-server-webpack": "9.0.14",
|
|
18638
|
+
"@storybook/html": "9.0.14",
|
|
18639
|
+
"@storybook/preact": "9.0.14",
|
|
18640
|
+
"@storybook/react": "9.0.14",
|
|
18641
|
+
"@storybook/server": "9.0.14",
|
|
18642
|
+
"@storybook/svelte": "9.0.14",
|
|
18643
|
+
"@storybook/vue3": "9.0.14",
|
|
18644
|
+
"@storybook/web-components": "9.0.14"
|
|
18645
18645
|
};
|
|
18646
18646
|
|
|
18647
18647
|
// src/common/presets.ts
|
|
@@ -23587,7 +23587,7 @@ var Vs = class {
|
|
|
23587
23587
|
s(this, "FileSystemCache");
|
|
23588
23588
|
}
|
|
23589
23589
|
constructor(A = {}) {
|
|
23590
|
-
this.prefix = (A.ns || A.prefix || "") + "-", this.hash_alg = A.hash_alg || "
|
|
23590
|
+
this.prefix = (A.ns || A.prefix || "") + "-", this.hash_alg = A.hash_alg || "sha256", this.cache_dir = A.basePath || Mi(Zk(), qk(15).toString(
|
|
23591
23591
|
"base64").replace(/\//g, "-")), this.ttl = A.ttl || 0, kE(this.hash_alg), Hg(this.cache_dir, { recursive: !0 });
|
|
23592
23592
|
}
|
|
23593
23593
|
generateHash(A) {
|
|
@@ -26014,7 +26014,7 @@ function IQ({ nodeEnv: t, buildTarget: A } = {}) {
|
|
|
26014
26014
|
s(IQ, "getEnvironment");
|
|
26015
26015
|
|
|
26016
26016
|
// src/common/utils/envs.ts
|
|
26017
|
-
function
|
|
26017
|
+
function o4(t = {}) {
|
|
26018
26018
|
let A = t.production ? "production" : "development", e = {
|
|
26019
26019
|
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
26020
26020
|
NODE_ENV: process.env.NODE_ENV || A,
|
|
@@ -26038,8 +26038,8 @@ function o3(t = {}) {
|
|
|
26038
26038
|
raw: o
|
|
26039
26039
|
};
|
|
26040
26040
|
}
|
|
26041
|
-
s(
|
|
26042
|
-
var
|
|
26041
|
+
s(o4, "loadEnvs");
|
|
26042
|
+
var g4 = /* @__PURE__ */ s((t) => Object.entries(t).reduce((A, [e, r]) => (A[e] = JSON.stringify(r), A), {}), "stringifyEnvs"), a4 = /* @__PURE__ */ s(
|
|
26043
26043
|
(t) => Object.entries(t).reduce((e, [r, i]) => (e[`process.env.${r}`] = JSON.stringify(i), e), {}), "stringifyProcessEnvs");
|
|
26044
26044
|
|
|
26045
26045
|
// src/common/utils/common-glob-options.ts
|
|
@@ -26079,14 +26079,14 @@ var lQ = {
|
|
|
26079
26079
|
};
|
|
26080
26080
|
|
|
26081
26081
|
// src/common/utils/get-builder-options.ts
|
|
26082
|
-
async function
|
|
26082
|
+
async function E4(t) {
|
|
26083
26083
|
let A = await t.presets.apply("framework", {}, t);
|
|
26084
26084
|
if (typeof A != "string" && A?.options?.builder)
|
|
26085
26085
|
return A.options.builder;
|
|
26086
26086
|
let { builder: e } = await t.presets.apply("core", {}, t);
|
|
26087
26087
|
return typeof e != "string" && e?.options ? e.options : {};
|
|
26088
26088
|
}
|
|
26089
|
-
s(
|
|
26089
|
+
s(E4, "getBuilderOptions");
|
|
26090
26090
|
|
|
26091
26091
|
// src/common/utils/get-framework-name.ts
|
|
26092
26092
|
var uQ = cA(ot(), 1);
|
|
@@ -26116,16 +26116,16 @@ var QQ = /* @__PURE__ */ s((t) => {
|
|
|
26116
26116
|
}, "extractProperFrameworkName");
|
|
26117
26117
|
|
|
26118
26118
|
// src/common/utils/get-renderer-name.ts
|
|
26119
|
-
async function
|
|
26119
|
+
async function F4(t) {
|
|
26120
26120
|
let A = await t.presets.apply("core", {}, t);
|
|
26121
26121
|
return !A || !A.renderer ? BQ(t) : A.renderer;
|
|
26122
26122
|
}
|
|
26123
|
-
s(
|
|
26124
|
-
async function
|
|
26123
|
+
s(F4, "getRendererName");
|
|
26124
|
+
async function k4(t) {
|
|
26125
26125
|
let A = QQ(t), e = xr[A];
|
|
26126
26126
|
return e ? lQ[e] : null;
|
|
26127
26127
|
}
|
|
26128
|
-
s(
|
|
26128
|
+
s(k4, "extractProperRendererNameFromFramework");
|
|
26129
26129
|
|
|
26130
26130
|
// src/common/utils/get-storybook-refs.ts
|
|
26131
26131
|
import { readFile as fQ } from "node:fs/promises";
|
|
@@ -26185,7 +26185,7 @@ var ER = /* @__PURE__ */ s(async (t) => {
|
|
|
26185
26185
|
let A = t.replace(/[A-Z]/g, (e) => ` ${e}`).replace(/[-_][A-Z]/gi, (e) => ` ${e.toUpperCase()}`).replace(/-/g, " ").replace(/_/g, " ");
|
|
26186
26186
|
return `${A.substring(0, 1).toUpperCase()}${A.substring(1)}`.trim();
|
|
26187
26187
|
}, "toTitle");
|
|
26188
|
-
async function
|
|
26188
|
+
async function Y4(t) {
|
|
26189
26189
|
if (t.test)
|
|
26190
26190
|
return {};
|
|
26191
26191
|
let A = await t.presets.apply("refs", await ER(t));
|
|
@@ -26207,7 +26207,7 @@ async function Y3(t) {
|
|
|
26207
26207
|
})
|
|
26208
26208
|
), A;
|
|
26209
26209
|
}
|
|
26210
|
-
s(
|
|
26210
|
+
s(Y4, "getRefs");
|
|
26211
26211
|
|
|
26212
26212
|
// src/common/utils/glob-to-regexp.ts
|
|
26213
26213
|
var GQ = cA(Nn(), 1);
|
|
@@ -26226,7 +26226,7 @@ function JQ(t) {
|
|
|
26226
26226
|
s(JQ, "globToRegexp");
|
|
26227
26227
|
|
|
26228
26228
|
// src/common/utils/interpolate.ts
|
|
26229
|
-
var
|
|
26229
|
+
var X4 = /* @__PURE__ */ s((t, A) => Object.entries(A).reduce((e, [r, i]) => {
|
|
26230
26230
|
let n = i.replace(/\\/g, "/").replace(/\$/g, "$$$");
|
|
26231
26231
|
return e.replace(new RegExp(`{{${r}}}`, "g"), n);
|
|
26232
26232
|
}, t), "interpolate");
|
|
@@ -26238,7 +26238,7 @@ import {
|
|
|
26238
26238
|
MainFileESMOnlyImportError as $R,
|
|
26239
26239
|
MainFileEvaluationError as A0
|
|
26240
26240
|
} from "storybook/internal/server-errors";
|
|
26241
|
-
async function
|
|
26241
|
+
async function s3({
|
|
26242
26242
|
configDir: t = ".storybook",
|
|
26243
26243
|
noCache: A = !1,
|
|
26244
26244
|
cwd: e
|
|
@@ -26271,13 +26271,13 @@ async function s4({
|
|
|
26271
26271
|
});
|
|
26272
26272
|
}
|
|
26273
26273
|
}
|
|
26274
|
-
s(
|
|
26274
|
+
s(s3, "loadMainConfig");
|
|
26275
26275
|
|
|
26276
26276
|
// src/common/utils/load-manager-or-addons-file.ts
|
|
26277
26277
|
var TQ = cA(ot(), 1);
|
|
26278
26278
|
import { resolve as iC } from "node:path";
|
|
26279
26279
|
import { logger as e0 } from "storybook/internal/node-logger";
|
|
26280
|
-
function
|
|
26280
|
+
function c3({ configDir: t }) {
|
|
26281
26281
|
let A = pr(iC(t, "addons")), e = pr(iC(t, "manager"));
|
|
26282
26282
|
if ((A || e) && e0.info("=> Loading custom manager config"), A && e)
|
|
26283
26283
|
throw new Error(TQ.dedent`
|
|
@@ -26287,12 +26287,12 @@ function c4({ configDir: t }) {
|
|
|
26287
26287
|
)})`);
|
|
26288
26288
|
return e || A;
|
|
26289
26289
|
}
|
|
26290
|
-
s(
|
|
26290
|
+
s(c3, "loadManagerOrAddonsFile");
|
|
26291
26291
|
|
|
26292
26292
|
// src/common/utils/load-preview-or-config-file.ts
|
|
26293
26293
|
var HQ = cA(ot(), 1);
|
|
26294
26294
|
import { resolve as sC } from "node:path";
|
|
26295
|
-
function
|
|
26295
|
+
function u3({ configDir: t }) {
|
|
26296
26296
|
let A = pr(sC(t, "config")), e = pr(sC(t, "preview"));
|
|
26297
26297
|
if (A && e)
|
|
26298
26298
|
throw new Error(HQ.dedent`
|
|
@@ -26302,12 +26302,12 @@ function u4({ configDir: t }) {
|
|
|
26302
26302
|
)})`);
|
|
26303
26303
|
return e || A;
|
|
26304
26304
|
}
|
|
26305
|
-
s(
|
|
26305
|
+
s(u3, "loadPreviewOrConfigFile");
|
|
26306
26306
|
|
|
26307
26307
|
// src/common/utils/log.ts
|
|
26308
26308
|
var nr = cA(Ui(), 1);
|
|
26309
26309
|
import { logger as Mn } from "storybook/internal/node-logger";
|
|
26310
|
-
var
|
|
26310
|
+
var d3 = /* @__PURE__ */ s((t) => (process.stdout.write(nr.default.cyan(" \u2022 ") + t), (A, e) => {
|
|
26311
26311
|
if (A) {
|
|
26312
26312
|
if (process.stdout.write(`. ${nr.default.red("\u2716")}
|
|
26313
26313
|
`), Mn.error(`
|
|
@@ -26323,13 +26323,13 @@ var d4 = /* @__PURE__ */ s((t) => (process.stdout.write(nr.default.cyan(" \u2022
|
|
|
26323
26323
|
process.stdout.write(`. ${nr.default.green("\u2713")}
|
|
26324
26324
|
`);
|
|
26325
26325
|
}), "commandLog");
|
|
26326
|
-
function
|
|
26326
|
+
function p3(t) {
|
|
26327
26327
|
let A = t.split(`
|
|
26328
26328
|
`).map((e) => ` ${e}`).join(`
|
|
26329
26329
|
`);
|
|
26330
26330
|
Mn.log(A);
|
|
26331
26331
|
}
|
|
26332
|
-
s(
|
|
26332
|
+
s(p3, "paddedLog");
|
|
26333
26333
|
function jQ(t, A) {
|
|
26334
26334
|
let e = "";
|
|
26335
26335
|
for (let r = 0; r < A; r += 1)
|
|
@@ -26337,7 +26337,7 @@ function jQ(t, A) {
|
|
|
26337
26337
|
return e;
|
|
26338
26338
|
}
|
|
26339
26339
|
s(jQ, "getChars");
|
|
26340
|
-
function
|
|
26340
|
+
function w3(t, A) {
|
|
26341
26341
|
let e = 0, i = t.map((n) => (e = n.length > e ? n.length : e, n)).map((n) => {
|
|
26342
26342
|
let o = e - n.length, g = n + jQ(" ", o);
|
|
26343
26343
|
return g = jQ(" ", A || 2) + nr.default.inverse(` ${g} `), g;
|
|
@@ -26345,14 +26345,14 @@ function w4(t, A) {
|
|
|
26345
26345
|
`);
|
|
26346
26346
|
Mn.log(i);
|
|
26347
26347
|
}
|
|
26348
|
-
s(
|
|
26348
|
+
s(w3, "codeLog");
|
|
26349
26349
|
|
|
26350
26350
|
// src/common/utils/log-config.ts
|
|
26351
26351
|
var qQ = cA(Ui(), 1);
|
|
26352
|
-
function
|
|
26352
|
+
function D3(t, A) {
|
|
26353
26353
|
console.log(qQ.default.cyan(String(t))), console.dir(A, { depth: null });
|
|
26354
26354
|
}
|
|
26355
|
-
s(
|
|
26355
|
+
s(D3, "logConfig");
|
|
26356
26356
|
|
|
26357
26357
|
// src/common/utils/normalize-stories.ts
|
|
26358
26358
|
var WQ = cA(Nn(), 1);
|
|
@@ -26411,7 +26411,7 @@ var Rn = "", o0 = "**/*.@(mdx|stories.@(js|jsx|mjs|ts|tsx))", g0 = /* @__PURE__
|
|
|
26411
26411
|
directory: g,
|
|
26412
26412
|
importPathMatcher: C
|
|
26413
26413
|
};
|
|
26414
|
-
}, "normalizeStoriesEntry"),
|
|
26414
|
+
}, "normalizeStoriesEntry"), v3 = /* @__PURE__ */ s((t, A) => {
|
|
26415
26415
|
if (!t || Array.isArray(t) && t.length === 0)
|
|
26416
26416
|
throw new n0();
|
|
26417
26417
|
return t.map((e) => C0(e, A));
|
|
@@ -26419,18 +26419,18 @@ var Rn = "", o0 = "**/*.@(mdx|stories.@(js|jsx|mjs|ts|tsx))", g0 = /* @__PURE__
|
|
|
26419
26419
|
|
|
26420
26420
|
// src/common/utils/readTemplate.ts
|
|
26421
26421
|
import { readFile as c0 } from "node:fs/promises";
|
|
26422
|
-
async function
|
|
26422
|
+
async function P3(t) {
|
|
26423
26423
|
return c0(t, {
|
|
26424
26424
|
encoding: "utf8"
|
|
26425
26425
|
});
|
|
26426
26426
|
}
|
|
26427
|
-
s(
|
|
26427
|
+
s(P3, "readTemplate");
|
|
26428
26428
|
|
|
26429
26429
|
// src/common/utils/remove.ts
|
|
26430
26430
|
var VQ = cA(ot(), 1);
|
|
26431
26431
|
import { readConfig as I0, writeConfig as h0 } from "storybook/internal/csf-tools";
|
|
26432
26432
|
import { logger as vn } from "storybook/internal/node-logger";
|
|
26433
|
-
async function
|
|
26433
|
+
async function T3(t, A) {
|
|
26434
26434
|
let { packageManager: e, skipInstall: r } = A, { mainConfigPath: i, configDir: n } = Ga(A.configDir);
|
|
26435
26435
|
if (typeof n > "u")
|
|
26436
26436
|
throw new Error(VQ.dedent`
|
|
@@ -26451,31 +26451,31 @@ async function T4(t, A) {
|
|
|
26451
26451
|
}
|
|
26452
26452
|
}
|
|
26453
26453
|
}
|
|
26454
|
-
s(
|
|
26454
|
+
s(T3, "removeAddon");
|
|
26455
26455
|
|
|
26456
26456
|
// src/common/utils/symlinks.ts
|
|
26457
|
-
function
|
|
26457
|
+
function q3() {
|
|
26458
26458
|
let { NODE_OPTIONS: t, NODE_PRESERVE_SYMLINKS: A } = process.env;
|
|
26459
26459
|
return !!A || t?.includes("--preserve-symlinks");
|
|
26460
26460
|
}
|
|
26461
|
-
s(
|
|
26461
|
+
s(q3, "isPreservingSymlinks");
|
|
26462
26462
|
|
|
26463
26463
|
// src/common/utils/template.ts
|
|
26464
26464
|
import { existsSync as XQ, readFileSync as Ln } from "node:fs";
|
|
26465
26465
|
import { dirname as ZQ, resolve as $Q } from "node:path";
|
|
26466
26466
|
var Af = /* @__PURE__ */ s((t, A = {}) => Object.entries(A).reduce((e, [r, i]) => e.replace(new RegExp(`%${r}%`, "g"), i), t), "interpolate");
|
|
26467
|
-
function
|
|
26467
|
+
function Z3(t, A) {
|
|
26468
26468
|
let e = ZQ(v.resolve("storybook/internal/package.json")), r = Ln(`${e}/assets/server/base-preview-body.html`, "utf8"), i = $Q(t, "preview-\
|
|
26469
26469
|
body.html"), n = r;
|
|
26470
26470
|
return XQ(i) && (n = Ln(i, "utf8") + n), Af(n, A);
|
|
26471
26471
|
}
|
|
26472
|
-
s(
|
|
26473
|
-
function $
|
|
26472
|
+
s(Z3, "getPreviewBodyTemplate");
|
|
26473
|
+
function $3(t, A) {
|
|
26474
26474
|
let e = ZQ(v.resolve("storybook/internal/package.json")), r = Ln(`${e}/assets/server/base-preview-head.html`, "utf8"), i = $Q(t, "preview-\
|
|
26475
26475
|
head.html"), n = r;
|
|
26476
26476
|
return XQ(i) && (n += Ln(i, "utf8")), Af(n, A);
|
|
26477
26477
|
}
|
|
26478
|
-
s($
|
|
26478
|
+
s($3, "getPreviewHeadTemplate");
|
|
26479
26479
|
|
|
26480
26480
|
// src/common/utils/validate-config.ts
|
|
26481
26481
|
import { join as l0 } from "node:path";
|
|
@@ -27845,13 +27845,13 @@ export {
|
|
|
27845
27845
|
SW as builderPackages,
|
|
27846
27846
|
Oj as cache,
|
|
27847
27847
|
jW as checkAddonOrder,
|
|
27848
|
-
|
|
27849
|
-
|
|
27848
|
+
w3 as codeLog,
|
|
27849
|
+
d3 as commandLog,
|
|
27850
27850
|
hQ as commonGlobOptions,
|
|
27851
27851
|
jg as createFileSystemCache,
|
|
27852
27852
|
GW as createLogStream,
|
|
27853
27853
|
QQ as extractProperFrameworkName,
|
|
27854
|
-
|
|
27854
|
+
k4 as extractProperRendererNameFromFramework,
|
|
27855
27855
|
Gk as filterPresetsConfig,
|
|
27856
27856
|
Ua as findConfigFile,
|
|
27857
27857
|
cV as formatFileContent,
|
|
@@ -27859,7 +27859,7 @@ export {
|
|
|
27859
27859
|
lQ as frameworkToRenderer,
|
|
27860
27860
|
af as getAddonNames,
|
|
27861
27861
|
ER as getAutoRefs,
|
|
27862
|
-
|
|
27862
|
+
E4 as getBuilderOptions,
|
|
27863
27863
|
jQ as getChars,
|
|
27864
27864
|
UW as getCoercedStorybookVersion,
|
|
27865
27865
|
Ga as getConfigInfo,
|
|
@@ -27870,11 +27870,11 @@ export {
|
|
|
27870
27870
|
Bl as getInterpretedFileWithExt,
|
|
27871
27871
|
jB as getPackageDetails,
|
|
27872
27872
|
jk as getPresets,
|
|
27873
|
-
|
|
27874
|
-
$
|
|
27873
|
+
Z3 as getPreviewBodyTemplate,
|
|
27874
|
+
$3 as getPreviewHeadTemplate,
|
|
27875
27875
|
pA as getProjectRoot,
|
|
27876
|
-
|
|
27877
|
-
|
|
27876
|
+
Y4 as getRefs,
|
|
27877
|
+
F4 as getRendererName,
|
|
27878
27878
|
SV as getStoryId,
|
|
27879
27879
|
b0 as getStoryTitle,
|
|
27880
27880
|
qB as getStorybookConfiguration,
|
|
@@ -27882,28 +27882,28 @@ export {
|
|
|
27882
27882
|
Y0 as getSyncedStorybookAddons,
|
|
27883
27883
|
JQ as globToRegexp,
|
|
27884
27884
|
dg as interopRequireDefault,
|
|
27885
|
-
|
|
27885
|
+
X4 as interpolate,
|
|
27886
27886
|
iW as invalidateProjectRootCache,
|
|
27887
27887
|
XB as isCorePackage,
|
|
27888
|
-
|
|
27888
|
+
q3 as isPreservingSymlinks,
|
|
27889
27889
|
JW as isSatelliteAddon,
|
|
27890
27890
|
_1 as loadAllPresets,
|
|
27891
27891
|
BE as loadCustomPresets,
|
|
27892
|
-
|
|
27893
|
-
|
|
27894
|
-
|
|
27892
|
+
o4 as loadEnvs,
|
|
27893
|
+
s3 as loadMainConfig,
|
|
27894
|
+
c3 as loadManagerOrAddonsFile,
|
|
27895
27895
|
Hk as loadPreset,
|
|
27896
|
-
|
|
27897
|
-
|
|
27896
|
+
u3 as loadPreviewOrConfigFile,
|
|
27897
|
+
D3 as logConfig,
|
|
27898
27898
|
GB as nodePathsToArray,
|
|
27899
|
-
|
|
27899
|
+
v3 as normalizeStories,
|
|
27900
27900
|
C0 as normalizeStoriesEntry,
|
|
27901
27901
|
JB as normalizeStoryPath,
|
|
27902
|
-
|
|
27902
|
+
p3 as paddedLog,
|
|
27903
27903
|
PW as parseList,
|
|
27904
27904
|
of as posix,
|
|
27905
|
-
|
|
27906
|
-
|
|
27905
|
+
P3 as readTemplate,
|
|
27906
|
+
T3 as removeAddon,
|
|
27907
27907
|
_a as rendererPackages,
|
|
27908
27908
|
Jk as resolveAddonName,
|
|
27909
27909
|
VE as resolvePathInStorybookCache,
|
|
@@ -27911,8 +27911,8 @@ export {
|
|
|
27911
27911
|
KAA as scanAndTransformFiles,
|
|
27912
27912
|
Ii as serverRequire,
|
|
27913
27913
|
hi as serverResolve,
|
|
27914
|
-
|
|
27915
|
-
|
|
27914
|
+
g4 as stringifyEnvs,
|
|
27915
|
+
a4 as stringifyProcessEnvs,
|
|
27916
27916
|
mE as stripAbsNodeModulesPath,
|
|
27917
27917
|
_V as syncStorybookAddons,
|
|
27918
27918
|
JM as temporaryDirectory,
|
|
@@ -22922,12 +22922,14 @@ var Ts = vi.styled.div(
|
|
|
22922
22922
|
Ts.displayName = "Side";
|
|
22923
22923
|
var UI = /* @__PURE__ */ o(({ children: e, className: t, scrollable: r }) => r ? /* @__PURE__ */ Bt.default.createElement(fr, { vertical: !1,
|
|
22924
22924
|
className: t }, e) : /* @__PURE__ */ Bt.default.createElement("div", { className: t }, e), "UnstyledBar"), wi = (0, vi.styled)(UI)(
|
|
22925
|
-
({
|
|
22926
|
-
color:
|
|
22925
|
+
({ backgroundColor: e, theme: t, scrollable: r = !0 }) => ({
|
|
22926
|
+
color: t.barTextColor,
|
|
22927
22927
|
width: "100%",
|
|
22928
|
-
|
|
22928
|
+
minHeight: 40,
|
|
22929
22929
|
flexShrink: 0,
|
|
22930
|
-
|
|
22930
|
+
scrollbarColor: `${t.barTextColor} ${e || t.barBg}`,
|
|
22931
|
+
scrollbarWidth: "thin",
|
|
22932
|
+
overflow: r ? "auto" : "hidden",
|
|
22931
22933
|
overflowY: "hidden"
|
|
22932
22934
|
}),
|
|
22933
22935
|
({ theme: e, border: t = !1 }) => t ? {
|
|
@@ -22946,9 +22948,9 @@ var GI = vi.styled.div(({ bgColor: e }) => ({
|
|
|
22946
22948
|
backgroundColor: e || ""
|
|
22947
22949
|
})), ao = /* @__PURE__ */ o(({ children: e, backgroundColor: t, className: r, ...n }) => {
|
|
22948
22950
|
let [a, l] = Bt.Children.toArray(e);
|
|
22949
|
-
return /* @__PURE__ */ Bt.default.createElement(wi, { className: `sb-bar ${r}`, ...n }, /* @__PURE__ */ Bt.default.createElement(
|
|
22950
|
-
/* @__PURE__ */ Bt.default.createElement(Ts, { scrollable: n.scrollable, left: !0 }, a), l ? /* @__PURE__ */ Bt.default.
|
|
22951
|
-
right: !0 }, l) : null));
|
|
22951
|
+
return /* @__PURE__ */ Bt.default.createElement(wi, { backgroundColor: t, className: `sb-bar ${r}`, ...n }, /* @__PURE__ */ Bt.default.createElement(
|
|
22952
|
+
GI, { bgColor: t }, /* @__PURE__ */ Bt.default.createElement(Ts, { scrollable: n.scrollable, left: !0 }, a), l ? /* @__PURE__ */ Bt.default.
|
|
22953
|
+
createElement(Ts, { right: !0 }, l) : null));
|
|
22952
22954
|
}, "FlexBar");
|
|
22953
22955
|
ao.displayName = "FlexBar";
|
|
22954
22956
|
|
|
@@ -1063,6 +1063,7 @@ interface UnstyledBarProps extends ScrollAreaProps {
|
|
|
1063
1063
|
scrollable?: boolean;
|
|
1064
1064
|
}
|
|
1065
1065
|
interface BarProps extends UnstyledBarProps {
|
|
1066
|
+
backgroundColor?: string;
|
|
1066
1067
|
border?: boolean;
|
|
1067
1068
|
}
|
|
1068
1069
|
declare const Bar: storybook_theming.StyledComponent<UnstyledBarProps & {
|
package/dist/components/index.js
CHANGED
|
@@ -12223,12 +12223,14 @@ var cl = sl.div(
|
|
|
12223
12223
|
cl.displayName = "Side";
|
|
12224
12224
|
var c6 = /* @__PURE__ */ o(({ children: e, className: t, scrollable: r }) => r ? /* @__PURE__ */ Wr.createElement(Rr, { vertical: !1, className: t },
|
|
12225
12225
|
e) : /* @__PURE__ */ Wr.createElement("div", { className: t }, e), "UnstyledBar"), ul = sl(c6)(
|
|
12226
|
-
({
|
|
12227
|
-
color:
|
|
12226
|
+
({ backgroundColor: e, theme: t, scrollable: r = !0 }) => ({
|
|
12227
|
+
color: t.barTextColor,
|
|
12228
12228
|
width: "100%",
|
|
12229
|
-
|
|
12229
|
+
minHeight: 40,
|
|
12230
12230
|
flexShrink: 0,
|
|
12231
|
-
|
|
12231
|
+
scrollbarColor: `${t.barTextColor} ${e || t.barBg}`,
|
|
12232
|
+
scrollbarWidth: "thin",
|
|
12233
|
+
overflow: r ? "auto" : "hidden",
|
|
12232
12234
|
overflowY: "hidden"
|
|
12233
12235
|
}),
|
|
12234
12236
|
({ theme: e, border: t = !1 }) => t ? {
|
|
@@ -12247,8 +12249,9 @@ var s6 = sl.div(({ bgColor: e }) => ({
|
|
|
12247
12249
|
backgroundColor: e || ""
|
|
12248
12250
|
})), No = /* @__PURE__ */ o(({ children: e, backgroundColor: t, className: r, ...n }) => {
|
|
12249
12251
|
let [a, i] = l6.toArray(e);
|
|
12250
|
-
return /* @__PURE__ */ Wr.createElement(ul, { className: `sb-bar ${r}`, ...n }, /* @__PURE__ */ Wr.createElement(s6, {
|
|
12251
|
-
createElement(cl, { scrollable: n.scrollable, left: !0 }, a), i ? /* @__PURE__ */ Wr.createElement(cl, { right: !0 },
|
|
12252
|
+
return /* @__PURE__ */ Wr.createElement(ul, { backgroundColor: t, className: `sb-bar ${r}`, ...n }, /* @__PURE__ */ Wr.createElement(s6, {
|
|
12253
|
+
bgColor: t }, /* @__PURE__ */ Wr.createElement(cl, { scrollable: n.scrollable, left: !0 }, a), i ? /* @__PURE__ */ Wr.createElement(cl, { right: !0 },
|
|
12254
|
+
i) : null));
|
|
12252
12255
|
}, "FlexBar");
|
|
12253
12256
|
No.displayName = "FlexBar";
|
|
12254
12257
|
|