storybook 10.2.0-alpha.0 → 10.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/Color-E5XDEOX4.js +484 -0
- package/dist/_browser-chunks/{WithTooltip-IO6J4KBT.js → WithTooltip-65CFNBJE.js} +70 -70
- package/dist/_browser-chunks/{chunk-45UGUKRX.js → chunk-242VQQM5.js} +1 -1
- package/dist/_browser-chunks/chunk-2NDLAB5X.js +363 -0
- package/dist/_browser-chunks/{chunk-JP7NCOJX.js → chunk-3LY4VQVK.js} +1 -1
- package/dist/_browser-chunks/{chunk-XJNX76GA.js → chunk-54PNNATT.js} +3 -20
- package/dist/_browser-chunks/{chunk-VYJQ7RU5.js → chunk-6QKNWBQB.js} +17 -17
- package/dist/_browser-chunks/chunk-CLSHX4VX.js +4140 -0
- package/dist/_browser-chunks/{chunk-2XZMBGTA.js → chunk-DOSERVNW.js} +1 -1
- package/dist/_browser-chunks/chunk-HPYUT3WS.js +199 -0
- package/dist/_browser-chunks/{chunk-BRX2HXH7.js → chunk-IH6QJILI.js} +1 -1
- package/dist/_browser-chunks/{chunk-AS2HQEYC.js → chunk-IWQGIXJS.js} +1 -1
- package/dist/_browser-chunks/{chunk-UD6FQLAF.js → chunk-JK6U3MQW.js} +3 -3
- package/dist/_browser-chunks/{chunk-CHUV5WSW.js → chunk-LE2LTDW3.js} +1 -1
- package/dist/_browser-chunks/{chunk-RP5RXKFU.js → chunk-MOYJJEXA.js} +38 -29
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/{chunk-AXG2BOBL.js → chunk-S6TK43XQ.js} +10 -10
- package/dist/_browser-chunks/{chunk-H6XK3RSC.js → chunk-UAYGIC3L.js} +6 -6
- package/dist/_browser-chunks/{chunk-YKE5S47A.js → chunk-V2VKKSMQ.js} +18 -18
- package/dist/_browser-chunks/chunk-VIJ7SQRO.js +568 -0
- package/dist/_browser-chunks/chunk-XCZK5QUJ.js +0 -0
- package/dist/_browser-chunks/{chunk-3OXGAGBE.js → chunk-XLJZ7AOP.js} +14 -14
- package/dist/_browser-chunks/{chunk-SS2NHR7W.js → chunk-Y6HZAT53.js} +10 -12
- package/dist/_browser-chunks/{chunk-P4F4UVXX.js → chunk-YKABRMAI.js} +15 -15
- package/dist/_browser-chunks/{chunk-WJYERY3R.js → chunk-ZCFV7BZB.js} +2 -2
- package/dist/_browser-chunks/{formatter-QJ4M4OGQ.js → formatter-EIJCOSYU.js} +2 -2
- package/dist/_browser-chunks/{syntaxhighlighter-IQDEPFLK.js → syntaxhighlighter-ED5Y7EFY.js} +119 -119
- package/dist/_node-chunks/{builder-manager-7Y5SBM27.js → builder-manager-ZK4QXZNX.js} +22 -22
- package/dist/_node-chunks/{camelcase-VIOG5GUK.js → camelcase-QWQG7I72.js} +8 -8
- package/dist/_node-chunks/{chunk-G2SSRQRU.js → chunk-2AFVBCGF.js} +6 -6
- package/dist/_node-chunks/{chunk-YS4ZBVQ2.js → chunk-5VZMCPTH.js} +18 -18
- package/dist/_node-chunks/{chunk-RZYKYZNC.js → chunk-6OZRMRVO.js} +31 -31
- package/dist/_node-chunks/chunk-CLCLRZYL.js +61 -0
- package/dist/_node-chunks/{chunk-6I6BDAIH.js → chunk-CW7HJRCY.js} +9 -9
- package/dist/_node-chunks/chunk-DF3QP62W.js +18 -0
- package/dist/_node-chunks/{chunk-RQYJV7HO.js → chunk-DWVHBQGR.js} +165 -191
- package/dist/_node-chunks/chunk-EVBCPGQO.js +20 -0
- package/dist/_node-chunks/{chunk-NSWP6O57.js → chunk-EXZXVBZO.js} +8 -8
- package/dist/_node-chunks/{chunk-46UKK4ME.js → chunk-FZFZ5TOM.js} +9 -9
- package/dist/_node-chunks/{chunk-IIAWDLTX.js → chunk-GKEAARBQ.js} +10 -10
- package/dist/_node-chunks/{chunk-RFI7ULWH.js → chunk-HMFROKHU.js} +19 -19
- package/dist/_node-chunks/{chunk-KKTHRW4D.js → chunk-I5TOD3AY.js} +66 -72
- package/dist/_node-chunks/{chunk-MTAECA6H.js → chunk-KVNLJSAB.js} +619 -148
- package/dist/_node-chunks/{chunk-DGCZNDMZ.js → chunk-NKOHF7TQ.js} +10 -10
- package/dist/_node-chunks/{chunk-4APIDVTW.js → chunk-OV2CP4VV.js} +7 -7
- package/dist/_node-chunks/chunk-PCMFKXWQ.js +23 -0
- package/dist/_node-chunks/{chunk-T3T35CKM.js → chunk-Q5ZQH2OQ.js} +15 -15
- package/dist/_node-chunks/{chunk-VMPPKUVU.js → chunk-QFSK4B7R.js} +8 -8
- package/dist/_node-chunks/{chunk-WOPURGV3.js → chunk-R2J3OB3H.js} +6 -6
- package/dist/_node-chunks/{chunk-UCXU3VCO.js → chunk-RGQC4G3L.js} +165 -21
- package/dist/_node-chunks/{chunk-KX2RIBIP.js → chunk-TOXVUAH2.js} +6 -6
- package/dist/_node-chunks/{chunk-XE4QTYSE.js → chunk-URBB5EGY.js} +8 -8
- package/dist/_node-chunks/{chunk-XCRYZZCA.js → chunk-UWJ4BOOL.js} +597 -593
- package/dist/_node-chunks/{chunk-RTFXQIIL.js → chunk-VJPI73BB.js} +230 -236
- package/dist/_node-chunks/{chunk-I7HQSEQK.js → chunk-WOS3OQVT.js} +6 -6
- package/dist/_node-chunks/{chunk-UGZX6OPP.js → chunk-WUKWNPSQ.js} +17 -17
- package/dist/_node-chunks/{chunk-2265F7MI.js → chunk-XFU23B4C.js} +9 -9
- package/dist/_node-chunks/{dist-GV3REIPT.js → dist-UBFMIJZC.js} +10 -10
- package/dist/_node-chunks/{globby-QE4LR4PT.js → globby-VD3CGPVI.js} +154 -154
- package/dist/_node-chunks/{lib-NXQ5B2WJ.js → lib-MMJB47J3.js} +16 -16
- package/dist/_node-chunks/{mdx-N42X6CFJ-IGCQXXC5.js → mdx-N42X6CFJ-3J2G7NZZ.js} +11 -11
- package/dist/_node-chunks/{p-limit-S2V3UH5Q.js → p-limit-SOBWTEVH.js} +8 -8
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +28 -28
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +14 -11
- package/dist/channels/index.js +3 -3
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/components/index.d.ts +9 -2
- package/dist/components/index.js +327 -311
- package/dist/core-server/index.js +127 -127
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +43 -38
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +4390 -173
- package/dist/csf/index.js +39 -35
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -5
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +18956 -12602
- package/dist/manager/runtime.js +148 -132
- package/dist/manager-api/index.js +31 -22
- package/dist/mocking-utils/index.js +14 -14
- package/dist/node-logger/index.d.ts +2 -2
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +30784 -24388
- package/dist/preview-api/index.js +12 -11
- package/dist/preview-errors.js +2 -2
- package/dist/router/index.js +12 -13
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +23 -23
- package/dist/test/index.js +3104 -1604
- package/dist/theming/create.js +3 -3
- package/dist/theming/index.js +38 -38
- package/package.json +2 -8
- package/dist/_browser-chunks/Color-TNPFN3FC.js +0 -1097
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +0 -171
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +0 -252
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +0 -18
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +0 -64
- package/dist/_browser-chunks/chunk-QKODTO7K.js +0 -7
- package/dist/_node-chunks/chunk-5JSWIKE2.js +0 -18
- package/dist/_node-chunks/chunk-BJMYJWGF.js +0 -20
- package/dist/_node-chunks/chunk-BYYI4JA6.js +0 -61
- package/dist/_node-chunks/chunk-RQ4GZHOA.js +0 -23
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// ../../node_modules/slash/index.js
|
|
14
|
+
function slash(path) {
|
|
15
|
+
return path.startsWith("\\\\?\\") ? path : path.replace(/\\/g, "/");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
slash
|
|
20
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TOXVUAH2.js";
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// ../../node_modules/@storybook/docs-mdx/dist/chunk-H6DQNFQR.js
|
|
17
17
|
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __require2 = ((x) => typeof __require < "u" ? __require : typeof Proxy < "u" ? new Proxy(x, {
|
|
18
18
|
get: (a, b) => (typeof __require < "u" ? __require : a)[b]
|
|
19
19
|
}) : x)(function(x) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -33,13 +33,13 @@ var getLastEvents = async () => await cache.get("lastEvents") || {}, upgradeFiel
|
|
|
33
33
|
return !lastRunEvent?.timestamp || lastUpgradeEvent.timestamp > lastRunEvent.timestamp ? upgradeFields(lastUpgradeEvent) : void 0;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
//
|
|
36
|
+
// ../../node_modules/nanoid/index.js
|
|
37
37
|
import { randomFillSync } from "crypto";
|
|
38
38
|
|
|
39
|
-
//
|
|
39
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
40
40
|
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
41
41
|
|
|
42
|
-
//
|
|
42
|
+
// ../../node_modules/nanoid/index.js
|
|
43
43
|
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, fillPool = (bytes) => {
|
|
44
44
|
!pool || pool.length < bytes ? (pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER), randomFillSync(pool), poolOffset = 0) : poolOffset + bytes > pool.length && (randomFillSync(pool), poolOffset = 0), poolOffset += bytes;
|
|
45
45
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
|
|
13
|
-
//
|
|
13
|
+
// ../../node_modules/empathic/resolve.mjs
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
import { isAbsolute, join, resolve } from "node:path";
|
|
16
16
|
import { fileURLToPath } from "node:url";
|
|
@@ -26,7 +26,7 @@ function from(root, ident, silent) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// ../../node_modules/empathic/walk.mjs
|
|
30
30
|
import { dirname } from "node:path";
|
|
31
31
|
function up(base, options) {
|
|
32
32
|
let { last, cwd } = options || {}, tmp = absolute(base, cwd), root = absolute(last || "/", cwd), prev, arr = [];
|
|
@@ -35,7 +35,7 @@ function up(base, options) {
|
|
|
35
35
|
return arr;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// ../../node_modules/empathic/find.mjs
|
|
39
39
|
import { join as join2 } from "node:path";
|
|
40
40
|
import { existsSync, statSync } from "node:fs";
|
|
41
41
|
function up2(name, options) {
|
|
@@ -50,7 +50,7 @@ function any(names, options) {
|
|
|
50
50
|
if (tmp = join2(dir, names[j]), existsSync(tmp)) return tmp;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
//
|
|
53
|
+
// ../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
54
54
|
var isProduction = process.env.NODE_ENV === "production", prefix = "Invariant failed";
|
|
55
55
|
function invariant(condition, message) {
|
|
56
56
|
if (!condition) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,11 +12,11 @@ var require = CJS_COMPAT_NODE_MODULE_skf7bajczt8.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TOXVUAH2.js";
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// ../../node_modules/picomatch/lib/constants.js
|
|
18
18
|
var require_constants = __commonJS({
|
|
19
|
-
"
|
|
19
|
+
"../../node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
20
20
|
"use strict";
|
|
21
21
|
var path = __require("path"), WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
|
22
22
|
DOT_LITERAL,
|
|
@@ -191,9 +191,9 @@ var require_constants = __commonJS({
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
|
|
194
|
-
//
|
|
194
|
+
// ../../node_modules/picomatch/lib/utils.js
|
|
195
195
|
var require_utils = __commonJS({
|
|
196
|
-
"
|
|
196
|
+
"../../node_modules/picomatch/lib/utils.js"(exports) {
|
|
197
197
|
"use strict";
|
|
198
198
|
var path = __require("path"), win32 = process.platform === "win32", {
|
|
199
199
|
REGEX_BACKSLASH,
|
|
@@ -227,9 +227,9 @@ var require_utils = __commonJS({
|
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
//
|
|
230
|
+
// ../../node_modules/picomatch/lib/scan.js
|
|
231
231
|
var require_scan = __commonJS({
|
|
232
|
-
"
|
|
232
|
+
"../../node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
233
233
|
"use strict";
|
|
234
234
|
var utils = require_utils(), {
|
|
235
235
|
CHAR_ASTERISK,
|
|
@@ -413,9 +413,9 @@ var require_scan = __commonJS({
|
|
|
413
413
|
}
|
|
414
414
|
});
|
|
415
415
|
|
|
416
|
-
//
|
|
416
|
+
// ../../node_modules/picomatch/lib/parse.js
|
|
417
417
|
var require_parse = __commonJS({
|
|
418
|
-
"
|
|
418
|
+
"../../node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
419
419
|
"use strict";
|
|
420
420
|
var constants = require_constants(), utils = require_utils(), {
|
|
421
421
|
MAX_LENGTH,
|
|
@@ -858,9 +858,9 @@ var require_parse = __commonJS({
|
|
|
858
858
|
}
|
|
859
859
|
});
|
|
860
860
|
|
|
861
|
-
//
|
|
861
|
+
// ../../node_modules/picomatch/lib/picomatch.js
|
|
862
862
|
var require_picomatch = __commonJS({
|
|
863
|
-
"
|
|
863
|
+
"../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
864
864
|
"use strict";
|
|
865
865
|
var path = __require("path"), scan = require_scan(), parse = require_parse(), utils = require_utils(), constants = require_constants(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
|
|
866
866
|
if (Array.isArray(glob)) {
|
|
@@ -929,9 +929,9 @@ var require_picomatch = __commonJS({
|
|
|
929
929
|
}
|
|
930
930
|
});
|
|
931
931
|
|
|
932
|
-
//
|
|
932
|
+
// ../../node_modules/picomatch/index.js
|
|
933
933
|
var require_picomatch2 = __commonJS({
|
|
934
|
-
"
|
|
934
|
+
"../../node_modules/picomatch/index.js"(exports, module) {
|
|
935
935
|
"use strict";
|
|
936
936
|
module.exports = require_picomatch();
|
|
937
937
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,31 +13,31 @@ import {
|
|
|
13
13
|
any,
|
|
14
14
|
invariant,
|
|
15
15
|
up2 as up
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GKEAARBQ.js";
|
|
17
17
|
import {
|
|
18
18
|
resolvePackageDir
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-URBB5EGY.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CW7HJRCY.js";
|
|
23
23
|
import {
|
|
24
24
|
babelParse,
|
|
25
25
|
recast,
|
|
26
26
|
traverse,
|
|
27
27
|
types
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UWJ4BOOL.js";
|
|
29
29
|
import {
|
|
30
30
|
require_picocolors
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XFU23B4C.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__require,
|
|
35
35
|
__toESM
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TOXVUAH2.js";
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// ../../node_modules/esprima/dist/esprima.js
|
|
39
39
|
var require_esprima = __commonJS({
|
|
40
|
-
"
|
|
40
|
+
"../../node_modules/esprima/dist/esprima.js"(exports, module) {
|
|
41
41
|
(function(root, factory) {
|
|
42
42
|
typeof exports == "object" && typeof module == "object" ? module.exports = factory() : typeof define == "function" && define.amd ? define([], factory) : typeof exports == "object" ? exports.esprima = factory() : root.esprima = factory();
|
|
43
43
|
})(exports, function() {
|
|
@@ -3846,9 +3846,9 @@ var require_esprima = __commonJS({
|
|
|
3846
3846
|
}
|
|
3847
3847
|
});
|
|
3848
3848
|
|
|
3849
|
-
//
|
|
3849
|
+
// ../../node_modules/core-util-is/lib/util.js
|
|
3850
3850
|
var require_util = __commonJS({
|
|
3851
|
-
"
|
|
3851
|
+
"../../node_modules/core-util-is/lib/util.js"(exports) {
|
|
3852
3852
|
function isArray(arg) {
|
|
3853
3853
|
return Array.isArray ? Array.isArray(arg) : objectToString(arg) === "[object Array]";
|
|
3854
3854
|
}
|
|
@@ -3913,9 +3913,9 @@ var require_util = __commonJS({
|
|
|
3913
3913
|
}
|
|
3914
3914
|
});
|
|
3915
3915
|
|
|
3916
|
-
//
|
|
3916
|
+
// ../../node_modules/array-timsort/src/index.js
|
|
3917
3917
|
var require_src = __commonJS({
|
|
3918
|
-
"
|
|
3918
|
+
"../../node_modules/array-timsort/src/index.js"(exports, module) {
|
|
3919
3919
|
var POWERS_OF_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9], results, log10 = (x) => x < 1e5 ? x < 100 ? x < 10 ? 0 : 1 : x < 1e4 ? x < 1e3 ? 2 : 3 : 4 : x < 1e7 ? x < 1e6 ? 5 : 6 : x < 1e9 ? x < 1e8 ? 7 : 8 : 9;
|
|
3920
3920
|
function alphabeticalCompare(a, b) {
|
|
3921
3921
|
if (a === b)
|
|
@@ -4303,9 +4303,9 @@ var require_src = __commonJS({
|
|
|
4303
4303
|
}
|
|
4304
4304
|
});
|
|
4305
4305
|
|
|
4306
|
-
//
|
|
4306
|
+
// ../../node_modules/comment-json/src/common.js
|
|
4307
4307
|
var require_common = __commonJS({
|
|
4308
|
-
"
|
|
4308
|
+
"../../node_modules/comment-json/src/common.js"(exports, module) {
|
|
4309
4309
|
var {
|
|
4310
4310
|
isObject,
|
|
4311
4311
|
isArray,
|
|
@@ -4401,9 +4401,9 @@ var require_common = __commonJS({
|
|
|
4401
4401
|
}
|
|
4402
4402
|
});
|
|
4403
4403
|
|
|
4404
|
-
//
|
|
4404
|
+
// ../../node_modules/comment-json/src/array.js
|
|
4405
4405
|
var require_array = __commonJS({
|
|
4406
|
-
"
|
|
4406
|
+
"../../node_modules/comment-json/src/array.js"(exports, module) {
|
|
4407
4407
|
var { isArray } = require_util(), { sort } = require_src(), {
|
|
4408
4408
|
SYMBOL_PREFIXES,
|
|
4409
4409
|
UNDEFINED,
|
|
@@ -4502,9 +4502,9 @@ var require_array = __commonJS({
|
|
|
4502
4502
|
}
|
|
4503
4503
|
});
|
|
4504
4504
|
|
|
4505
|
-
//
|
|
4505
|
+
// ../../node_modules/comment-json/src/parse.js
|
|
4506
4506
|
var require_parse = __commonJS({
|
|
4507
|
-
"
|
|
4507
|
+
"../../node_modules/comment-json/src/parse.js"(exports, module) {
|
|
4508
4508
|
var esprima = require_esprima(), {
|
|
4509
4509
|
CommentArray
|
|
4510
4510
|
} = require_array(), {
|
|
@@ -4643,9 +4643,9 @@ var require_parse = __commonJS({
|
|
|
4643
4643
|
}
|
|
4644
4644
|
});
|
|
4645
4645
|
|
|
4646
|
-
//
|
|
4646
|
+
// ../../node_modules/comment-json/src/stringify.js
|
|
4647
4647
|
var require_stringify = __commonJS({
|
|
4648
|
-
"
|
|
4648
|
+
"../../node_modules/comment-json/src/stringify.js"(exports, module) {
|
|
4649
4649
|
var {
|
|
4650
4650
|
isArray,
|
|
4651
4651
|
isObject,
|
|
@@ -4775,9 +4775,9 @@ var require_stringify = __commonJS({
|
|
|
4775
4775
|
}
|
|
4776
4776
|
});
|
|
4777
4777
|
|
|
4778
|
-
//
|
|
4778
|
+
// ../../node_modules/comment-json/src/index.js
|
|
4779
4779
|
var require_src2 = __commonJS({
|
|
4780
|
-
"
|
|
4780
|
+
"../../node_modules/comment-json/src/index.js"(exports, module) {
|
|
4781
4781
|
var { parse, tokenize } = require_parse(), stringify = require_stringify(), { CommentArray } = require_array(), {
|
|
4782
4782
|
PREFIX_BEFORE,
|
|
4783
4783
|
PREFIX_AFTER_PROP,
|
|
@@ -4820,7 +4820,7 @@ import {
|
|
|
4820
4820
|
import { Feature } from "storybook/internal/types";
|
|
4821
4821
|
import { coerce, satisfies } from "semver";
|
|
4822
4822
|
|
|
4823
|
-
//
|
|
4823
|
+
// ../../node_modules/strip-json-comments/index.js
|
|
4824
4824
|
var singleComment = Symbol("singleComment"), multiComment = Symbol("multiComment"), stripWithoutWhitespace = () => "", stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, " "), isEscaped = (jsonString, quotePosition) => {
|
|
4825
4825
|
let index = quotePosition - 1, backslashCount = 0;
|
|
4826
4826
|
for (; jsonString[index] === "\\"; )
|
|
@@ -4861,10 +4861,14 @@ import { join as join2 } from "node:path";
|
|
|
4861
4861
|
import { Readable as Readable2 } from "node:stream";
|
|
4862
4862
|
import { pipeline as pipeline2 } from "node:stream/promises";
|
|
4863
4863
|
import { createGunzip } from "node:zlib";
|
|
4864
|
-
import {
|
|
4865
|
-
|
|
4864
|
+
import {
|
|
4865
|
+
frameworkPackages,
|
|
4866
|
+
rendererPackages,
|
|
4867
|
+
temporaryDirectory,
|
|
4868
|
+
versions
|
|
4869
|
+
} from "storybook/internal/common";
|
|
4866
4870
|
|
|
4867
|
-
//
|
|
4871
|
+
// ../../node_modules/get-npm-tarball-url/lib/index.mjs
|
|
4868
4872
|
function src_default(pkgName, pkgVersion, opts) {
|
|
4869
4873
|
let registry;
|
|
4870
4874
|
opts?.registry ? registry = opts.registry.endsWith("/") ? opts.registry : `${opts.registry}/` : registry = "https://registry.npmjs.org/";
|
|
@@ -4879,7 +4883,7 @@ function getScopelessName(name) {
|
|
|
4879
4883
|
return name[0] !== "@" ? name : name.split("/")[1];
|
|
4880
4884
|
}
|
|
4881
4885
|
|
|
4882
|
-
//
|
|
4886
|
+
// ../../node_modules/modern-tar/dist/unpacker-BKKRRs7i.js
|
|
4883
4887
|
var FLAGTYPE = {
|
|
4884
4888
|
0: "file",
|
|
4885
4889
|
1: "link",
|
|
@@ -5168,7 +5172,7 @@ function isZeroBlock(block) {
|
|
|
5168
5172
|
return !0;
|
|
5169
5173
|
}
|
|
5170
5174
|
|
|
5171
|
-
//
|
|
5175
|
+
// ../../node_modules/modern-tar/dist/fs/index.js
|
|
5172
5176
|
import * as fs from "node:fs/promises";
|
|
5173
5177
|
import { cpus } from "node:os";
|
|
5174
5178
|
import * as path from "node:path";
|
|
@@ -5373,21 +5377,7 @@ function createFSHandler(directoryPath, options) {
|
|
|
5373
5377
|
}
|
|
5374
5378
|
|
|
5375
5379
|
// src/cli/dirs.ts
|
|
5376
|
-
var
|
|
5377
|
-
{ name: SupportedFramework.QWIK, packageName: "storybook-framework-qwik" },
|
|
5378
|
-
{
|
|
5379
|
-
name: SupportedFramework.SOLID,
|
|
5380
|
-
packageName: "storybook-solidjs-vite",
|
|
5381
|
-
frameworks: ["storybook-solidjs-vite"],
|
|
5382
|
-
renderer: "storybook-solidjs-vite"
|
|
5383
|
-
},
|
|
5384
|
-
{
|
|
5385
|
-
name: SupportedFramework.NUXT,
|
|
5386
|
-
packageName: "@storybook-vue/nuxt",
|
|
5387
|
-
frameworks: ["@storybook-vue/nuxt"],
|
|
5388
|
-
renderer: "@storybook/vue3"
|
|
5389
|
-
}
|
|
5390
|
-
], resolveUsingBranchInstall = async (packageManager, request) => {
|
|
5380
|
+
var resolveUsingBranchInstall = async (packageManager, request) => {
|
|
5391
5381
|
let tempDirectory = await temporaryDirectory(), version = versions[request] || await packageManager.latestVersion(request), url = (src_default.default || src_default)(request, version, {
|
|
5392
5382
|
registry: await packageManager.getRegistryURL()
|
|
5393
5383
|
}), response = await fetch(url);
|
|
@@ -5400,14 +5390,19 @@ var externalFrameworks = [
|
|
|
5400
5390
|
), join2(tempDirectory, "package");
|
|
5401
5391
|
};
|
|
5402
5392
|
async function getRendererDir(packageManager, renderer) {
|
|
5403
|
-
let externalFramework =
|
|
5393
|
+
let [externalFramework] = Object.entries({ ...frameworkPackages, ...rendererPackages }).find(
|
|
5394
|
+
([key, value]) => value === renderer
|
|
5395
|
+
) ?? [];
|
|
5396
|
+
if (!externalFramework)
|
|
5397
|
+
return null;
|
|
5398
|
+
let packageJsonPath = join2(externalFramework, "package.json"), errors = [];
|
|
5404
5399
|
try {
|
|
5405
|
-
return resolvePackageDir(
|
|
5400
|
+
return resolvePackageDir(externalFramework, process.cwd());
|
|
5406
5401
|
} catch (e) {
|
|
5407
5402
|
invariant(e instanceof Error), errors.push(e);
|
|
5408
5403
|
}
|
|
5409
5404
|
try {
|
|
5410
|
-
return await resolveUsingBranchInstall(packageManager,
|
|
5405
|
+
return await resolveUsingBranchInstall(packageManager, externalFramework);
|
|
5411
5406
|
} catch (e) {
|
|
5412
5407
|
invariant(e instanceof Error), errors.push(e);
|
|
5413
5408
|
}
|
|
@@ -5485,7 +5480,10 @@ async function copyTemplateFiles({
|
|
|
5485
5480
|
[SupportedLanguage.JAVASCRIPT]: "js",
|
|
5486
5481
|
[SupportedLanguage.TYPESCRIPT]: "ts"
|
|
5487
5482
|
}, templatePath = async () => {
|
|
5488
|
-
let baseDir = await getRendererDir(packageManager, templateLocation)
|
|
5483
|
+
let baseDir = await getRendererDir(packageManager, templateLocation);
|
|
5484
|
+
if (!baseDir)
|
|
5485
|
+
return null;
|
|
5486
|
+
let assetsDir = join3(baseDir, "template", "cli"), assetsLanguage = join3(assetsDir, languageFolderMapping[language]), assetsJS = join3(assetsDir, languageFolderMapping[SupportedLanguage.JAVASCRIPT]), assetsTS = join3(assetsDir, languageFolderMapping.typescript);
|
|
5489
5487
|
if (existsSync(assetsLanguage))
|
|
5490
5488
|
return assetsLanguage;
|
|
5491
5489
|
if (existsSync(assetsTS))
|
|
@@ -5496,7 +5494,9 @@ async function copyTemplateFiles({
|
|
|
5496
5494
|
return assetsDir;
|
|
5497
5495
|
throw new Error(`Unsupported renderer: ${templateLocation} (${baseDir})`);
|
|
5498
5496
|
}, destinationPath = destination ?? await cliStoriesTargetPath(), filter = (file) => features.has(Feature.DOCS) || !file.endsWith(".mdx");
|
|
5499
|
-
|
|
5497
|
+
commonAssetsDir && await cp(commonAssetsDir, destinationPath, { recursive: !0, filter });
|
|
5498
|
+
let tmpPath = await templatePath();
|
|
5499
|
+
if (tmpPath && await cp(tmpPath, destinationPath, { recursive: !0, filter }), commonAssetsDir && features.has(Feature.DOCS)) {
|
|
5500
5500
|
let rendererType = frameworkToRenderer[templateLocation] || "react";
|
|
5501
5501
|
await adjustTemplate(join3(destinationPath, "Configure.mdx"), { renderer: rendererType });
|
|
5502
5502
|
}
|
|
@@ -5603,35 +5603,28 @@ import { getProjectRoot } from "storybook/internal/common";
|
|
|
5603
5603
|
import { readConfig, writeConfig } from "storybook/internal/csf-tools";
|
|
5604
5604
|
import { logger as logger2, prompt as prompt2 } from "storybook/internal/node-logger";
|
|
5605
5605
|
|
|
5606
|
-
//
|
|
5606
|
+
// ../../node_modules/detect-indent/index.js
|
|
5607
5607
|
var INDENT_REGEX = /^(?:( )+|\t+)/, INDENT_TYPE_SPACE = "space";
|
|
5608
|
-
function shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, value) {
|
|
5609
|
-
return ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && value === 1;
|
|
5610
|
-
}
|
|
5611
5608
|
function makeIndentsMap(string, ignoreSingleSpaces) {
|
|
5612
5609
|
let indents = /* @__PURE__ */ new Map(), previousSize = 0, previousIndentType, key;
|
|
5613
5610
|
for (let line of string.split(/\n/g)) {
|
|
5614
5611
|
if (!line)
|
|
5615
5612
|
continue;
|
|
5616
|
-
let matches = line.match(INDENT_REGEX);
|
|
5613
|
+
let indent, indentType, use, weight, entry, matches = line.match(INDENT_REGEX);
|
|
5617
5614
|
if (matches === null)
|
|
5618
5615
|
previousSize = 0, previousIndentType = "";
|
|
5619
5616
|
else {
|
|
5620
|
-
|
|
5621
|
-
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, indent))
|
|
5617
|
+
if (indent = matches[0].length, indentType = matches[1] ? INDENT_TYPE_SPACE : "tab", ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1)
|
|
5622
5618
|
continue;
|
|
5623
|
-
indentType !== previousIndentType && (previousSize = 0), previousIndentType = indentType;
|
|
5624
|
-
let
|
|
5619
|
+
indentType !== previousIndentType && (previousSize = 0), previousIndentType = indentType, use = 1, weight = 0;
|
|
5620
|
+
let indentDifference = indent - previousSize;
|
|
5625
5621
|
if (previousSize = indent, indentDifference === 0)
|
|
5626
5622
|
use = 0, weight = 1;
|
|
5627
5623
|
else {
|
|
5628
|
-
let absoluteIndentDifference =
|
|
5629
|
-
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, absoluteIndentDifference))
|
|
5630
|
-
continue;
|
|
5624
|
+
let absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference;
|
|
5631
5625
|
key = encodeIndentsKey(indentType, absoluteIndentDifference);
|
|
5632
5626
|
}
|
|
5633
|
-
|
|
5634
|
-
indents.set(key, entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight]);
|
|
5627
|
+
entry = indents.get(key), entry = entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight], indents.set(key, entry);
|
|
5635
5628
|
}
|
|
5636
5629
|
}
|
|
5637
5630
|
return indents;
|
|
@@ -5818,6 +5811,7 @@ var SUPPORTED_FRAMEWORKS = [
|
|
|
5818
5811
|
"preact-vite" /* PREACT_VITE */,
|
|
5819
5812
|
"react-native-web-vite" /* REACT_NATIVE_WEB_VITE */,
|
|
5820
5813
|
"react-vite" /* REACT_VITE */,
|
|
5814
|
+
"solid" /* SOLID */,
|
|
5821
5815
|
"svelte-vite" /* SVELTE_VITE */,
|
|
5822
5816
|
"sveltekit" /* SVELTEKIT */,
|
|
5823
5817
|
"vue3-vite" /* VUE3_VITE */,
|
|
@@ -5870,7 +5864,7 @@ var AddonVitestService = class {
|
|
|
5870
5864
|
* @returns Array of error messages if installation fails
|
|
5871
5865
|
*/
|
|
5872
5866
|
async installPlaywright(options = {}) {
|
|
5873
|
-
let errors = [], playwrightCommand = ["playwright", "install", "chromium", "--with-deps"], playwrightCommandString = this.packageManager.getPackageCommand(playwrightCommand);
|
|
5867
|
+
let errors = [], playwrightCommand = ["playwright", "install", "chromium", "--with-deps"], playwrightCommandString = this.packageManager.getPackageCommand(playwrightCommand), result;
|
|
5874
5868
|
try {
|
|
5875
5869
|
(options.yes ? !0 : await (async () => (logger3.log(import_ts_dedent2.dedent`
|
|
5876
5870
|
Playwright browser binaries are necessary for @storybook/addon-vitest. The download can take some time. If you don't want to wait, you can skip the installation and run the following command manually later:
|
|
@@ -5891,11 +5885,11 @@ var AddonVitestService = class {
|
|
|
5891
5885
|
success: "Playwright browser binaries installed successfully",
|
|
5892
5886
|
abortable: !0
|
|
5893
5887
|
}
|
|
5894
|
-
) : logger3.warn("Playwright installation skipped");
|
|
5888
|
+
) ? result = "aborted" : result = "installed" : (logger3.warn("Playwright installation skipped"), result = "skipped");
|
|
5895
5889
|
} catch (e) {
|
|
5896
|
-
ErrorCollector.addError(e), e instanceof Error ? errors.push(e.stack ?? e.message) : errors.push(String(e));
|
|
5890
|
+
result = "failed", ErrorCollector.addError(e), e instanceof Error ? errors.push(e.stack ?? e.message) : errors.push(String(e));
|
|
5897
5891
|
}
|
|
5898
|
-
return { errors };
|
|
5892
|
+
return { errors, result };
|
|
5899
5893
|
}
|
|
5900
5894
|
/**
|
|
5901
5895
|
* Validate full compatibility for @storybook/addon-vitest
|