storybook 10.1.0-alpha.1 → 10.1.0-alpha.11
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-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/chunk-L4RMQ7D7.js +223 -0
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
- package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-WKBQ5RC7.js} +707 -1851
- package/dist/_node-chunks/{builder-manager-6UBDPV7P.js → builder-manager-PMPHOSM2.js} +495 -1013
- package/dist/_node-chunks/camelcase-K3IOOFQW.js +18 -0
- package/dist/_node-chunks/{chunk-QNUGJO6L.js → chunk-32NE3UE3.js} +15 -24
- package/dist/_node-chunks/chunk-4GZCFQFG.js +58 -0
- package/dist/_node-chunks/chunk-5QK5MSOI.js +943 -0
- package/dist/_node-chunks/{chunk-3FPF5Y2F.js → chunk-6ZOLETQK.js} +8 -10
- package/dist/_node-chunks/chunk-7I22Y76Z.js +1047 -0
- package/dist/_node-chunks/chunk-AKTRSR3O.js +72 -0
- package/dist/_node-chunks/chunk-BBOP3XCK.js +119 -0
- package/dist/_node-chunks/chunk-C2GQVDWI.js +34 -0
- package/dist/_node-chunks/{chunk-SCTKVDWR.js → chunk-GG2WQZSG.js} +4619 -7350
- package/dist/_node-chunks/chunk-GQJOWVVR.js +3214 -0
- package/dist/_node-chunks/chunk-JCRM2YVK.js +3009 -0
- package/dist/_node-chunks/chunk-KK4AT5F3.js +1029 -0
- package/dist/_node-chunks/chunk-L7MYXJUM.js +1114 -0
- package/dist/_node-chunks/{chunk-LAU7VVPC.js → chunk-LCZO45L7.js} +469 -983
- package/dist/_node-chunks/chunk-LR3QITDI.js +209 -0
- package/dist/_node-chunks/chunk-LXG4DK35.js +3171 -0
- package/dist/_node-chunks/chunk-MJ3WOS6F.js +37 -0
- package/dist/_node-chunks/chunk-PHOZWZZO.js +61 -0
- package/dist/_node-chunks/chunk-QECOQWRJ.js +936 -0
- package/dist/_node-chunks/chunk-QH4V5YDB.js +20 -0
- package/dist/_node-chunks/chunk-R6HWGZWD.js +26 -0
- package/dist/_node-chunks/chunk-SPQXMU2Q.js +759 -0
- package/dist/_node-chunks/chunk-TXZY6V6O.js +1564 -0
- package/dist/_node-chunks/chunk-UGDPX5LE.js +756 -0
- package/dist/_node-chunks/chunk-UY26MQLT.js +603 -0
- package/dist/_node-chunks/chunk-WK3EMYK6.js +61 -0
- package/dist/_node-chunks/{chunk-CJHAP7SE.js → chunk-WLHMN7AP.js} +292 -688
- package/dist/_node-chunks/chunk-XGVLB4UJ.js +54 -0
- package/dist/_node-chunks/{chunk-J7N7PD5Q.js → chunk-YHRFI6BE.js} +87 -227
- package/dist/_node-chunks/chunk-YK4KVMFW.js +18 -0
- package/dist/_node-chunks/chunk-ZZALGOA6.js +4523 -0
- package/dist/_node-chunks/chunk-ZZPBSYA5.js +301 -0
- package/dist/_node-chunks/chunk-ZZSRFAC6.js +45571 -0
- package/dist/_node-chunks/dist-4DWOCZUD.js +121 -0
- package/dist/_node-chunks/globby-AAARUKEU.js +3452 -0
- package/dist/_node-chunks/lib-HEUKGL62.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-DCVRPS6N.js +14329 -0
- package/dist/_node-chunks/p-limit-F5ZKJ6WZ.js +116 -0
- package/dist/_node-chunks/plugin-7YY7JXCH.js +123 -0
- package/dist/_node-chunks/{plugin-HJLCLGNT.js → plugin-SZP3CW6W.js} +36 -56
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-TGKNDPO6.js +46623 -0
- package/dist/_node-chunks/webpack-mock-plugin-LNTZZFBE.js +92 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +592 -1546
- package/dist/bin/dispatcher.js +26 -37
- package/dist/bin/loader.js +23 -34
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.js +1966 -5347
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.d.ts +210 -3
- package/dist/common/index.js +28 -20
- package/dist/components/index.d.ts +472 -280
- package/dist/components/index.js +15992 -75
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.js +3837 -7191
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +2511 -5219
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +434 -924
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
- package/dist/csf/index.js +534 -1172
- package/dist/csf-tools/index.d.ts +15 -4
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +47968 -56484
- package/dist/manager/globals.js +2 -3
- package/dist/manager/runtime.js +4901 -10318
- package/dist/manager-api/index.d.ts +11 -3
- package/dist/manager-api/index.js +1250 -2397
- package/dist/manager-errors.d.ts +3 -0
- package/dist/manager-errors.js +3 -3
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1270 -2593
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10767 -22386
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/preview-api/index.js +15 -15
- package/dist/preview-errors.d.ts +3 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +3 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +6129 -11914
- package/dist/theming/create.d.ts +4 -2
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3397 -2628
- package/dist/theming/index.js +502 -1091
- package/dist/types/index.d.ts +50 -5
- package/dist/types/index.js +2 -11
- package/dist/viewport/index.js +3 -3
- package/package.json +17 -9
- package/dist/_browser-chunks/Color-7ZNS6F6B.js +0 -1676
- package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-BOOOPFZF.js +0 -2335
- package/dist/_browser-chunks/chunk-C4XOKMDU.js +0 -270
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-I74EUU5O.js +0 -5809
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RNE2IUTB.js +0 -1300
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-W4QKLQSC.js +0 -4182
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-WKJOVNPM.js +0 -18
- package/dist/_node-chunks/chunk-2RIKHYCS.js +0 -304
- package/dist/_node-chunks/chunk-3JCSHYSU.js +0 -1657
- package/dist/_node-chunks/chunk-4GE6Q4MX.js +0 -1531
- package/dist/_node-chunks/chunk-5SEHHENC.js +0 -64656
- package/dist/_node-chunks/chunk-6GD23U64.js +0 -420
- package/dist/_node-chunks/chunk-6OAXYS5T.js +0 -1544
- package/dist/_node-chunks/chunk-7TNUMFKR.js +0 -4741
- package/dist/_node-chunks/chunk-BCDHUXAJ.js +0 -4272
- package/dist/_node-chunks/chunk-BYVQZ2HU.js +0 -220
- package/dist/_node-chunks/chunk-DAMVKHAC.js +0 -101
- package/dist/_node-chunks/chunk-FEOC7OX2.js +0 -1586
- package/dist/_node-chunks/chunk-FY7XZPLY.js +0 -2248
- package/dist/_node-chunks/chunk-GD2FXWDF.js +0 -697
- package/dist/_node-chunks/chunk-HM6B7FE5.js +0 -18
- package/dist/_node-chunks/chunk-HORWITP7.js +0 -90
- package/dist/_node-chunks/chunk-II4AFH3V.js +0 -28
- package/dist/_node-chunks/chunk-MF2PUEWG.js +0 -5029
- package/dist/_node-chunks/chunk-RVE4UTVQ.js +0 -1518
- package/dist/_node-chunks/chunk-TUFWZUTO.js +0 -69
- package/dist/_node-chunks/chunk-TXHNWNH4.js +0 -79
- package/dist/_node-chunks/chunk-ULWNTI6M.js +0 -1198
- package/dist/_node-chunks/chunk-VYRFXLRO.js +0 -6712
- package/dist/_node-chunks/chunk-WNOSTIYP.js +0 -34
- package/dist/_node-chunks/chunk-X67VGZN4.js +0 -1250
- package/dist/_node-chunks/chunk-XCEBYOA4.js +0 -61
- package/dist/_node-chunks/chunk-XW7YMR7I.js +0 -111
- package/dist/_node-chunks/chunk-ZRFYQ46H.js +0 -61
- package/dist/_node-chunks/dist-APCKHSY3.js +0 -175
- package/dist/_node-chunks/globby-TSGXGDA2.js +0 -5222
- package/dist/_node-chunks/lib-DZ5TVIU5.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-Z6BYQCPN.js +0 -22017
- package/dist/_node-chunks/p-limit-MLJNGG2K.js +0 -168
- package/dist/_node-chunks/plugin-J3JI3ZKJ.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-3QHNTM5B.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-4Y3MWPJ6.js +0 -124
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_in4hyfgp7kn from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_in4hyfgp7kn from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_in4hyfgp7kn from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_in4hyfgp7kn.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_in4hyfgp7kn.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_in4hyfgp7kn.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-XCEBYOA4.js";
|
|
15
|
-
|
|
16
|
-
// ../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
17
|
-
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
18
|
-
function normalizeWindowsPath(input = "") {
|
|
19
|
-
if (!input) {
|
|
20
|
-
return input;
|
|
21
|
-
}
|
|
22
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
23
|
-
}
|
|
24
|
-
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
25
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
26
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
27
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
28
|
-
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
29
|
-
var normalize = /* @__PURE__ */ __name(function(path2) {
|
|
30
|
-
if (path2.length === 0) {
|
|
31
|
-
return ".";
|
|
32
|
-
}
|
|
33
|
-
path2 = normalizeWindowsPath(path2);
|
|
34
|
-
const isUNCPath = path2.match(_UNC_REGEX);
|
|
35
|
-
const isPathAbsolute = isAbsolute(path2);
|
|
36
|
-
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
37
|
-
path2 = normalizeString(path2, !isPathAbsolute);
|
|
38
|
-
if (path2.length === 0) {
|
|
39
|
-
if (isPathAbsolute) {
|
|
40
|
-
return "/";
|
|
41
|
-
}
|
|
42
|
-
return trailingSeparator ? "./" : ".";
|
|
43
|
-
}
|
|
44
|
-
if (trailingSeparator) {
|
|
45
|
-
path2 += "/";
|
|
46
|
-
}
|
|
47
|
-
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
48
|
-
path2 += "/";
|
|
49
|
-
}
|
|
50
|
-
if (isUNCPath) {
|
|
51
|
-
if (!isPathAbsolute) {
|
|
52
|
-
return `//./${path2}`;
|
|
53
|
-
}
|
|
54
|
-
return `//${path2}`;
|
|
55
|
-
}
|
|
56
|
-
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
57
|
-
}, "normalize");
|
|
58
|
-
var join = /* @__PURE__ */ __name(function(...arguments_) {
|
|
59
|
-
if (arguments_.length === 0) {
|
|
60
|
-
return ".";
|
|
61
|
-
}
|
|
62
|
-
let joined;
|
|
63
|
-
for (const argument of arguments_) {
|
|
64
|
-
if (argument && argument.length > 0) {
|
|
65
|
-
if (joined === void 0) {
|
|
66
|
-
joined = argument;
|
|
67
|
-
} else {
|
|
68
|
-
joined += `/${argument}`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (joined === void 0) {
|
|
73
|
-
return ".";
|
|
74
|
-
}
|
|
75
|
-
return normalize(joined.replace(/\/\/+/g, "/"));
|
|
76
|
-
}, "join");
|
|
77
|
-
function cwd() {
|
|
78
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
79
|
-
return process.cwd().replace(/\\/g, "/");
|
|
80
|
-
}
|
|
81
|
-
return "/";
|
|
82
|
-
}
|
|
83
|
-
__name(cwd, "cwd");
|
|
84
|
-
var resolve = /* @__PURE__ */ __name(function(...arguments_) {
|
|
85
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
86
|
-
let resolvedPath = "";
|
|
87
|
-
let resolvedAbsolute = false;
|
|
88
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
89
|
-
const path2 = index >= 0 ? arguments_[index] : cwd();
|
|
90
|
-
if (!path2 || path2.length === 0) {
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
resolvedPath = `${path2}/${resolvedPath}`;
|
|
94
|
-
resolvedAbsolute = isAbsolute(path2);
|
|
95
|
-
}
|
|
96
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
97
|
-
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
98
|
-
return `/${resolvedPath}`;
|
|
99
|
-
}
|
|
100
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
101
|
-
}, "resolve");
|
|
102
|
-
function normalizeString(path2, allowAboveRoot) {
|
|
103
|
-
let res = "";
|
|
104
|
-
let lastSegmentLength = 0;
|
|
105
|
-
let lastSlash = -1;
|
|
106
|
-
let dots = 0;
|
|
107
|
-
let char = null;
|
|
108
|
-
for (let index = 0; index <= path2.length; ++index) {
|
|
109
|
-
if (index < path2.length) {
|
|
110
|
-
char = path2[index];
|
|
111
|
-
} else if (char === "/") {
|
|
112
|
-
break;
|
|
113
|
-
} else {
|
|
114
|
-
char = "/";
|
|
115
|
-
}
|
|
116
|
-
if (char === "/") {
|
|
117
|
-
if (lastSlash === index - 1 || dots === 1) ;
|
|
118
|
-
else if (dots === 2) {
|
|
119
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
120
|
-
if (res.length > 2) {
|
|
121
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
122
|
-
if (lastSlashIndex === -1) {
|
|
123
|
-
res = "";
|
|
124
|
-
lastSegmentLength = 0;
|
|
125
|
-
} else {
|
|
126
|
-
res = res.slice(0, lastSlashIndex);
|
|
127
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
128
|
-
}
|
|
129
|
-
lastSlash = index;
|
|
130
|
-
dots = 0;
|
|
131
|
-
continue;
|
|
132
|
-
} else if (res.length > 0) {
|
|
133
|
-
res = "";
|
|
134
|
-
lastSegmentLength = 0;
|
|
135
|
-
lastSlash = index;
|
|
136
|
-
dots = 0;
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (allowAboveRoot) {
|
|
141
|
-
res += res.length > 0 ? "/.." : "..";
|
|
142
|
-
lastSegmentLength = 2;
|
|
143
|
-
}
|
|
144
|
-
} else {
|
|
145
|
-
if (res.length > 0) {
|
|
146
|
-
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
147
|
-
} else {
|
|
148
|
-
res = path2.slice(lastSlash + 1, index);
|
|
149
|
-
}
|
|
150
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
151
|
-
}
|
|
152
|
-
lastSlash = index;
|
|
153
|
-
dots = 0;
|
|
154
|
-
} else if (char === "." && dots !== -1) {
|
|
155
|
-
++dots;
|
|
156
|
-
} else {
|
|
157
|
-
dots = -1;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return res;
|
|
161
|
-
}
|
|
162
|
-
__name(normalizeString, "normalizeString");
|
|
163
|
-
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
164
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
165
|
-
}, "isAbsolute");
|
|
166
|
-
var _EXTNAME_RE = /.(\.[^./]+)$/;
|
|
167
|
-
var extname = /* @__PURE__ */ __name(function(p) {
|
|
168
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
169
|
-
return match && match[1] || "";
|
|
170
|
-
}, "extname");
|
|
171
|
-
var relative = /* @__PURE__ */ __name(function(from, to) {
|
|
172
|
-
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
173
|
-
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
174
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
175
|
-
return _to.join("/");
|
|
176
|
-
}
|
|
177
|
-
const _fromCopy = [..._from];
|
|
178
|
-
for (const segment of _fromCopy) {
|
|
179
|
-
if (_to[0] !== segment) {
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
_from.shift();
|
|
183
|
-
_to.shift();
|
|
184
|
-
}
|
|
185
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
186
|
-
}, "relative");
|
|
187
|
-
var dirname = /* @__PURE__ */ __name(function(p) {
|
|
188
|
-
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
189
|
-
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
|
190
|
-
segments[0] += "/";
|
|
191
|
-
}
|
|
192
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
193
|
-
}, "dirname");
|
|
194
|
-
var basename = /* @__PURE__ */ __name(function(p, extension) {
|
|
195
|
-
const lastSegment = normalizeWindowsPath(p).split("/").pop();
|
|
196
|
-
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
197
|
-
}, "basename");
|
|
198
|
-
var parse = /* @__PURE__ */ __name(function(p) {
|
|
199
|
-
const root = normalizeWindowsPath(p).split("/").shift() || "/";
|
|
200
|
-
const base = basename(p);
|
|
201
|
-
const extension = extname(base);
|
|
202
|
-
return {
|
|
203
|
-
root,
|
|
204
|
-
dir: dirname(p),
|
|
205
|
-
base,
|
|
206
|
-
ext: extension,
|
|
207
|
-
name: base.slice(0, base.length - extension.length)
|
|
208
|
-
};
|
|
209
|
-
}, "parse");
|
|
210
|
-
|
|
211
|
-
export {
|
|
212
|
-
normalize,
|
|
213
|
-
join,
|
|
214
|
-
resolve,
|
|
215
|
-
isAbsolute,
|
|
216
|
-
relative,
|
|
217
|
-
dirname,
|
|
218
|
-
basename,
|
|
219
|
-
parse
|
|
220
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_in4hyfgp7kn from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_in4hyfgp7kn from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_in4hyfgp7kn from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_in4hyfgp7kn.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_in4hyfgp7kn.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_in4hyfgp7kn.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-XCEBYOA4.js";
|
|
15
|
-
|
|
16
|
-
// ../node_modules/camelcase/index.js
|
|
17
|
-
var UPPERCASE = /[\p{Lu}]/u;
|
|
18
|
-
var LOWERCASE = /[\p{Ll}]/u;
|
|
19
|
-
var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
|
20
|
-
var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
|
21
|
-
var SEPARATORS = /[_.\- ]+/;
|
|
22
|
-
var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
|
23
|
-
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
|
24
|
-
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
|
25
|
-
var preserveCamelCase = /* @__PURE__ */ __name((string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
|
26
|
-
let isLastCharLower = false;
|
|
27
|
-
let isLastCharUpper = false;
|
|
28
|
-
let isLastLastCharUpper = false;
|
|
29
|
-
let isLastLastCharPreserved = false;
|
|
30
|
-
for (let index = 0; index < string.length; index++) {
|
|
31
|
-
const character = string[index];
|
|
32
|
-
isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
|
|
33
|
-
if (isLastCharLower && UPPERCASE.test(character)) {
|
|
34
|
-
string = string.slice(0, index) + "-" + string.slice(index);
|
|
35
|
-
isLastCharLower = false;
|
|
36
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
37
|
-
isLastCharUpper = true;
|
|
38
|
-
index++;
|
|
39
|
-
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
|
|
40
|
-
string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
|
|
41
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
42
|
-
isLastCharUpper = false;
|
|
43
|
-
isLastCharLower = true;
|
|
44
|
-
} else {
|
|
45
|
-
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
|
46
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
47
|
-
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return string;
|
|
51
|
-
}, "preserveCamelCase");
|
|
52
|
-
var preserveConsecutiveUppercase = /* @__PURE__ */ __name((input, toLowerCase) => {
|
|
53
|
-
LEADING_CAPITAL.lastIndex = 0;
|
|
54
|
-
return input.replaceAll(LEADING_CAPITAL, (match) => toLowerCase(match));
|
|
55
|
-
}, "preserveConsecutiveUppercase");
|
|
56
|
-
var postProcess = /* @__PURE__ */ __name((input, toUpperCase) => {
|
|
57
|
-
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
|
58
|
-
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
|
59
|
-
return input.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match)).replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));
|
|
60
|
-
}, "postProcess");
|
|
61
|
-
function camelCase(input, options) {
|
|
62
|
-
if (!(typeof input === "string" || Array.isArray(input))) {
|
|
63
|
-
throw new TypeError("Expected the input to be `string | string[]`");
|
|
64
|
-
}
|
|
65
|
-
options = {
|
|
66
|
-
pascalCase: false,
|
|
67
|
-
preserveConsecutiveUppercase: false,
|
|
68
|
-
...options
|
|
69
|
-
};
|
|
70
|
-
if (Array.isArray(input)) {
|
|
71
|
-
input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
|
|
72
|
-
} else {
|
|
73
|
-
input = input.trim();
|
|
74
|
-
}
|
|
75
|
-
if (input.length === 0) {
|
|
76
|
-
return "";
|
|
77
|
-
}
|
|
78
|
-
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
|
79
|
-
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
|
80
|
-
if (input.length === 1) {
|
|
81
|
-
if (SEPARATORS.test(input)) {
|
|
82
|
-
return "";
|
|
83
|
-
}
|
|
84
|
-
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
|
85
|
-
}
|
|
86
|
-
const hasUpperCase = input !== toLowerCase(input);
|
|
87
|
-
if (hasUpperCase) {
|
|
88
|
-
input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
|
89
|
-
}
|
|
90
|
-
input = input.replace(LEADING_SEPARATORS, "");
|
|
91
|
-
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
|
92
|
-
if (options.pascalCase) {
|
|
93
|
-
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
|
94
|
-
}
|
|
95
|
-
return postProcess(input, toUpperCase);
|
|
96
|
-
}
|
|
97
|
-
__name(camelCase, "camelCase");
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
camelCase
|
|
101
|
-
};
|