storybook 10.1.0-alpha.10 → 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.
Files changed (192) hide show
  1. package/dist/_browser-chunks/Color-FTG7SQDA.js +1097 -0
  2. package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
  3. package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
  4. package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
  5. package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
  6. package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
  7. package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
  8. package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
  9. package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
  10. package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
  11. package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
  12. package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
  13. package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
  14. package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
  15. package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
  16. package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
  17. package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
  18. package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
  19. package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
  20. package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
  21. package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
  22. package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
  23. package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
  24. package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
  25. package/dist/_browser-chunks/{chunk-QMY4G4R2.js → chunk-L4RMQ7D7.js} +17 -64
  26. package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
  27. package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
  28. package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
  29. package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
  30. package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
  31. package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
  32. package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
  33. package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
  34. package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
  35. package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
  36. package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
  37. package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
  38. package/dist/_browser-chunks/{syntaxhighlighter-RJZASWHL.js → syntaxhighlighter-WKBQ5RC7.js} +704 -1848
  39. package/dist/_node-chunks/{builder-manager-HA7CYFCK.js → builder-manager-PMPHOSM2.js} +475 -1013
  40. package/dist/_node-chunks/camelcase-K3IOOFQW.js +18 -0
  41. package/dist/_node-chunks/{chunk-X4XU27M6.js → chunk-32NE3UE3.js} +15 -24
  42. package/dist/_node-chunks/chunk-4GZCFQFG.js +58 -0
  43. package/dist/_node-chunks/chunk-5QK5MSOI.js +943 -0
  44. package/dist/_node-chunks/{chunk-VPR5IBMG.js → chunk-6ZOLETQK.js} +8 -10
  45. package/dist/_node-chunks/chunk-7I22Y76Z.js +1047 -0
  46. package/dist/_node-chunks/chunk-AKTRSR3O.js +72 -0
  47. package/dist/_node-chunks/chunk-BBOP3XCK.js +119 -0
  48. package/dist/_node-chunks/chunk-C2GQVDWI.js +34 -0
  49. package/dist/_node-chunks/{chunk-ZHSCUGNP.js → chunk-GG2WQZSG.js} +3799 -7849
  50. package/dist/_node-chunks/chunk-GQJOWVVR.js +3214 -0
  51. package/dist/_node-chunks/chunk-JCRM2YVK.js +3009 -0
  52. package/dist/_node-chunks/chunk-KK4AT5F3.js +1029 -0
  53. package/dist/_node-chunks/chunk-L7MYXJUM.js +1114 -0
  54. package/dist/_node-chunks/{chunk-F3XOPI6H.js → chunk-LCZO45L7.js} +469 -983
  55. package/dist/_node-chunks/chunk-LR3QITDI.js +209 -0
  56. package/dist/_node-chunks/chunk-LXG4DK35.js +3171 -0
  57. package/dist/_node-chunks/chunk-MJ3WOS6F.js +37 -0
  58. package/dist/_node-chunks/chunk-PHOZWZZO.js +61 -0
  59. package/dist/_node-chunks/chunk-QECOQWRJ.js +936 -0
  60. package/dist/_node-chunks/chunk-QH4V5YDB.js +20 -0
  61. package/dist/_node-chunks/chunk-R6HWGZWD.js +26 -0
  62. package/dist/_node-chunks/chunk-SPQXMU2Q.js +759 -0
  63. package/dist/_node-chunks/chunk-TXZY6V6O.js +1564 -0
  64. package/dist/_node-chunks/chunk-UGDPX5LE.js +756 -0
  65. package/dist/_node-chunks/chunk-UY26MQLT.js +603 -0
  66. package/dist/_node-chunks/chunk-WK3EMYK6.js +61 -0
  67. package/dist/_node-chunks/{chunk-OVXB5GGT.js → chunk-WLHMN7AP.js} +292 -688
  68. package/dist/_node-chunks/chunk-XGVLB4UJ.js +54 -0
  69. package/dist/_node-chunks/{chunk-RMHAL25C.js → chunk-YHRFI6BE.js} +87 -227
  70. package/dist/_node-chunks/chunk-YK4KVMFW.js +18 -0
  71. package/dist/_node-chunks/chunk-ZZALGOA6.js +4523 -0
  72. package/dist/_node-chunks/chunk-ZZPBSYA5.js +301 -0
  73. package/dist/_node-chunks/chunk-ZZSRFAC6.js +45571 -0
  74. package/dist/_node-chunks/dist-4DWOCZUD.js +121 -0
  75. package/dist/_node-chunks/globby-AAARUKEU.js +3452 -0
  76. package/dist/_node-chunks/lib-HEUKGL62.js +366 -0
  77. package/dist/_node-chunks/mdx-N42X6CFJ-DCVRPS6N.js +14329 -0
  78. package/dist/_node-chunks/p-limit-F5ZKJ6WZ.js +116 -0
  79. package/dist/_node-chunks/plugin-7YY7JXCH.js +123 -0
  80. package/dist/_node-chunks/{plugin-6ZPCS4LI.js → plugin-SZP3CW6W.js} +36 -56
  81. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-TGKNDPO6.js +46623 -0
  82. package/dist/_node-chunks/webpack-mock-plugin-LNTZZFBE.js +92 -0
  83. package/dist/actions/decorator.js +21 -42
  84. package/dist/actions/index.js +3 -3
  85. package/dist/babel/index.d.ts +671 -335
  86. package/dist/babel/index.js +11 -11
  87. package/dist/bin/core.js +592 -1546
  88. package/dist/bin/dispatcher.js +26 -37
  89. package/dist/bin/loader.js +23 -34
  90. package/dist/channels/index.js +98 -234
  91. package/dist/cli/index.js +1951 -5308
  92. package/dist/client-logger/index.js +31 -61
  93. package/dist/common/index.js +20 -20
  94. package/dist/components/index.js +4211 -8586
  95. package/dist/core-events/index.js +2 -66
  96. package/dist/core-server/index.js +3054 -7290
  97. package/dist/core-server/presets/common-manager.css +2 -2
  98. package/dist/core-server/presets/common-manager.js +1806 -3427
  99. package/dist/core-server/presets/common-override-preset.js +31 -60
  100. package/dist/core-server/presets/common-preset.js +434 -924
  101. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
  102. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
  103. package/dist/csf/index.js +534 -1179
  104. package/dist/csf-tools/index.js +9 -9
  105. package/dist/docs-tools/index.js +6 -6
  106. package/dist/highlight/index.js +2 -2
  107. package/dist/instrumenter/index.js +199 -415
  108. package/dist/manager/globals-runtime.js +24150 -47364
  109. package/dist/manager/globals.js +2 -3
  110. package/dist/manager/runtime.js +3961 -8373
  111. package/dist/manager-api/index.js +1231 -2425
  112. package/dist/manager-errors.d.ts +3 -0
  113. package/dist/manager-errors.js +3 -3
  114. package/dist/node-logger/index.js +1253 -2601
  115. package/dist/preview/globals.js +2 -3
  116. package/dist/preview/runtime.js +10364 -21990
  117. package/dist/preview-api/index.d.ts +67 -68
  118. package/dist/preview-api/index.js +13 -13
  119. package/dist/preview-errors.d.ts +3 -0
  120. package/dist/preview-errors.js +4 -4
  121. package/dist/router/index.js +347 -899
  122. package/dist/server-errors.d.ts +3 -0
  123. package/dist/server-errors.js +10 -10
  124. package/dist/telemetry/index.js +24 -24
  125. package/dist/test/index.js +5860 -11645
  126. package/dist/theming/create.js +4 -4
  127. package/dist/theming/index.d.ts +3363 -2597
  128. package/dist/theming/index.js +490 -1086
  129. package/dist/types/index.js +2 -11
  130. package/dist/viewport/index.js +3 -3
  131. package/package.json +5 -5
  132. package/dist/_browser-chunks/Color-FQNEU7YS.js +0 -1695
  133. package/dist/_browser-chunks/WithTooltip-6NHN2GXF.js +0 -2343
  134. package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
  135. package/dist/_browser-chunks/chunk-AW46NMGV.js +0 -1308
  136. package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
  137. package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
  138. package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
  139. package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
  140. package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
  141. package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
  142. package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
  143. package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
  144. package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
  145. package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
  146. package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
  147. package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
  148. package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
  149. package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
  150. package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
  151. package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
  152. package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
  153. package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
  154. package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
  155. package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
  156. package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
  157. package/dist/_node-chunks/camelcase-QALD4XFE.js +0 -18
  158. package/dist/_node-chunks/chunk-2XY53ALL.js +0 -420
  159. package/dist/_node-chunks/chunk-3CBQMG2A.js +0 -6712
  160. package/dist/_node-chunks/chunk-3WDAPZYQ.js +0 -28
  161. package/dist/_node-chunks/chunk-4ZB555EJ.js +0 -697
  162. package/dist/_node-chunks/chunk-52DXKXY3.js +0 -4272
  163. package/dist/_node-chunks/chunk-5OVB4A6F.js +0 -69
  164. package/dist/_node-chunks/chunk-AGHGNXGH.js +0 -18
  165. package/dist/_node-chunks/chunk-B23X5ZCK.js +0 -1531
  166. package/dist/_node-chunks/chunk-B2DAHWJK.js +0 -220
  167. package/dist/_node-chunks/chunk-CC4PW5MJ.js +0 -34
  168. package/dist/_node-chunks/chunk-D7NIZELR.js +0 -2256
  169. package/dist/_node-chunks/chunk-DO5Q3H4L.js +0 -1250
  170. package/dist/_node-chunks/chunk-ECK7WVFX.js +0 -304
  171. package/dist/_node-chunks/chunk-EUH3NHXA.js +0 -79
  172. package/dist/_node-chunks/chunk-FOQHPHCV.js +0 -1657
  173. package/dist/_node-chunks/chunk-G6EL47NS.js +0 -111
  174. package/dist/_node-chunks/chunk-GFLS4TJB.js +0 -90
  175. package/dist/_node-chunks/chunk-J3XZKWHE.js +0 -1586
  176. package/dist/_node-chunks/chunk-LE63EHJ5.js +0 -1518
  177. package/dist/_node-chunks/chunk-M47XA42S.js +0 -4741
  178. package/dist/_node-chunks/chunk-OOI74AL3.js +0 -61
  179. package/dist/_node-chunks/chunk-PRJHT3GJ.js +0 -61
  180. package/dist/_node-chunks/chunk-Q52PVUSU.js +0 -101
  181. package/dist/_node-chunks/chunk-SDCF5RNN.js +0 -1198
  182. package/dist/_node-chunks/chunk-UJ5SJ23M.js +0 -5029
  183. package/dist/_node-chunks/chunk-UPHK4ETU.js +0 -64658
  184. package/dist/_node-chunks/chunk-V7VURIPB.js +0 -1544
  185. package/dist/_node-chunks/dist-6TXHNR5C.js +0 -175
  186. package/dist/_node-chunks/globby-PBTV6PX6.js +0 -5222
  187. package/dist/_node-chunks/lib-4RTDZVGX.js +0 -518
  188. package/dist/_node-chunks/mdx-N42X6CFJ-COWEH7KR.js +0 -22017
  189. package/dist/_node-chunks/p-limit-PBVZQOFY.js +0 -168
  190. package/dist/_node-chunks/plugin-EOZKYZAG.js +0 -159
  191. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-35HMSMR5.js +0 -69102
  192. package/dist/_node-chunks/webpack-mock-plugin-GT3MA5E2.js +0 -124
@@ -0,0 +1,72 @@
1
+ import CJS_COMPAT_NODE_URL_843v2rliy1 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_843v2rliy1 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_843v2rliy1 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_843v2rliy1.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_843v2rliy1.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_843v2rliy1.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // src/telemetry/event-cache.ts
14
+ import { cache } from "storybook/internal/common";
15
+ var operation = Promise.resolve(), setHelper = async (eventType, body) => {
16
+ let lastEvents = await cache.get("lastEvents") || {};
17
+ lastEvents[eventType] = { body, timestamp: Date.now() }, await cache.set("lastEvents", lastEvents);
18
+ }, set = async (eventType, body) => (await operation, operation = setHelper(eventType, body), operation);
19
+ var getLastEvents = async () => await cache.get("lastEvents") || {}, upgradeFields = (event) => {
20
+ let { body, timestamp } = event;
21
+ return {
22
+ timestamp,
23
+ eventType: body?.eventType,
24
+ eventId: body?.eventId,
25
+ sessionId: body?.sessionId
26
+ };
27
+ }, UPGRADE_EVENTS = ["init", "upgrade"], RUN_EVENTS = ["build", "dev", "error"], lastEvent = (lastEvents, eventTypes) => {
28
+ let descendingEvents = eventTypes.map((eventType) => lastEvents?.[eventType]).filter(Boolean).sort((a, b) => b.timestamp - a.timestamp);
29
+ return descendingEvents.length > 0 ? descendingEvents[0] : void 0;
30
+ }, getPrecedingUpgrade = async (events = void 0) => {
31
+ let lastEvents = events || await cache.get("lastEvents") || {}, lastUpgradeEvent = lastEvent(lastEvents, UPGRADE_EVENTS), lastRunEvent = lastEvent(lastEvents, RUN_EVENTS);
32
+ if (lastUpgradeEvent)
33
+ return !lastRunEvent?.timestamp || lastUpgradeEvent.timestamp > lastRunEvent.timestamp ? upgradeFields(lastUpgradeEvent) : void 0;
34
+ };
35
+
36
+ // ../node_modules/nanoid/index.js
37
+ import { randomFillSync } from "crypto";
38
+
39
+ // ../node_modules/nanoid/url-alphabet/index.js
40
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
41
+
42
+ // ../node_modules/nanoid/index.js
43
+ var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, fillPool = (bytes) => {
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
+ };
46
+ var nanoid = (size = 21) => {
47
+ fillPool(size -= 0);
48
+ let id = "";
49
+ for (let i = poolOffset - size; i < poolOffset; i++)
50
+ id += urlAlphabet[pool[i] & 63];
51
+ return id;
52
+ };
53
+
54
+ // src/telemetry/session-id.ts
55
+ import { cache as cache2 } from "storybook/internal/common";
56
+ var SESSION_TIMEOUT = 1e3 * 60 * 60 * 2, sessionId;
57
+ var getSessionId = async () => {
58
+ let now = Date.now();
59
+ if (!sessionId) {
60
+ let session = await cache2.get("session");
61
+ session && session.lastUsed >= now - SESSION_TIMEOUT ? sessionId = session.id : sessionId = nanoid();
62
+ }
63
+ return await cache2.set("session", { id: sessionId, lastUsed: now }), sessionId;
64
+ };
65
+
66
+ export {
67
+ nanoid,
68
+ set,
69
+ getLastEvents,
70
+ getPrecedingUpgrade,
71
+ getSessionId
72
+ };
@@ -0,0 +1,119 @@
1
+ import CJS_COMPAT_NODE_URL_843v2rliy1 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_843v2rliy1 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_843v2rliy1 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_843v2rliy1.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_843v2rliy1.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_843v2rliy1.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // ../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
14
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
15
+ function normalizeWindowsPath(input = "") {
16
+ return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
17
+ }
18
+ var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
19
+ var normalize = function(path2) {
20
+ if (path2.length === 0)
21
+ return ".";
22
+ path2 = normalizeWindowsPath(path2);
23
+ let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
24
+ return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
25
+ }, join = function(...arguments_) {
26
+ if (arguments_.length === 0)
27
+ return ".";
28
+ let joined;
29
+ for (let argument of arguments_)
30
+ argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
31
+ return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
32
+ };
33
+ function cwd() {
34
+ return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
35
+ }
36
+ var resolve = function(...arguments_) {
37
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
38
+ let resolvedPath = "", resolvedAbsolute = !1;
39
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
40
+ let path2 = index >= 0 ? arguments_[index] : cwd();
41
+ !path2 || path2.length === 0 || (resolvedPath = `${path2}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path2));
42
+ }
43
+ return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
44
+ };
45
+ function normalizeString(path2, allowAboveRoot) {
46
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
47
+ for (let index = 0; index <= path2.length; ++index) {
48
+ if (index < path2.length)
49
+ char = path2[index];
50
+ else {
51
+ if (char === "/")
52
+ break;
53
+ char = "/";
54
+ }
55
+ if (char === "/") {
56
+ if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
57
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
58
+ if (res.length > 2) {
59
+ let lastSlashIndex = res.lastIndexOf("/");
60
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
61
+ continue;
62
+ } else if (res.length > 0) {
63
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
64
+ continue;
65
+ }
66
+ }
67
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
68
+ } else
69
+ res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
70
+ lastSlash = index, dots = 0;
71
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
72
+ }
73
+ return res;
74
+ }
75
+ var isAbsolute = function(p) {
76
+ return _IS_ABSOLUTE_RE.test(p);
77
+ };
78
+ var _EXTNAME_RE = /.(\.[^./]+)$/, extname = function(p) {
79
+ let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
80
+ return match && match[1] || "";
81
+ }, relative = function(from, to) {
82
+ let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
83
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
84
+ return _to.join("/");
85
+ let _fromCopy = [..._from];
86
+ for (let segment of _fromCopy) {
87
+ if (_to[0] !== segment)
88
+ break;
89
+ _from.shift(), _to.shift();
90
+ }
91
+ return [..._from.map(() => ".."), ..._to].join("/");
92
+ }, dirname = function(p) {
93
+ let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
94
+ return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
95
+ };
96
+ var basename = function(p, extension) {
97
+ let lastSegment = normalizeWindowsPath(p).split("/").pop();
98
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
99
+ }, parse = function(p) {
100
+ let root = normalizeWindowsPath(p).split("/").shift() || "/", base = basename(p), extension = extname(base);
101
+ return {
102
+ root,
103
+ dir: dirname(p),
104
+ base,
105
+ ext: extension,
106
+ name: base.slice(0, base.length - extension.length)
107
+ };
108
+ };
109
+
110
+ export {
111
+ normalize,
112
+ join,
113
+ resolve,
114
+ isAbsolute,
115
+ relative,
116
+ dirname,
117
+ basename,
118
+ parse
119
+ };
@@ -0,0 +1,34 @@
1
+ import CJS_COMPAT_NODE_URL_843v2rliy1 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_843v2rliy1 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_843v2rliy1 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_843v2rliy1.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_843v2rliy1.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_843v2rliy1.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ __commonJS
14
+ } from "./chunk-XGVLB4UJ.js";
15
+
16
+ // ../node_modules/pretty-hrtime/index.js
17
+ var require_pretty_hrtime = __commonJS({
18
+ "../node_modules/pretty-hrtime/index.js"(exports, module) {
19
+ "use strict";
20
+ var minimalDesc = ["h", "min", "s", "ms", "\u03BCs", "ns"], verboseDesc = ["hour", "minute", "second", "millisecond", "microsecond", "nanosecond"], convert = [3600, 60, 1, 1e6, 1e3, 1];
21
+ module.exports = function(source, opts) {
22
+ var verbose, precise, i, spot, sourceAtStep, valAtStep, decimals, strAtStep, results, totalSeconds;
23
+ if (verbose = !1, precise = !1, opts && (verbose = opts.verbose || !1, precise = opts.precise || !1), !Array.isArray(source) || source.length !== 2 || typeof source[0] != "number" || typeof source[1] != "number")
24
+ return "";
25
+ for (source[1] < 0 && (totalSeconds = source[0] + source[1] / 1e9, source[0] = parseInt(totalSeconds), source[1] = parseFloat((totalSeconds % 1).toPrecision(9)) * 1e9), results = "", i = 0; i < 6 && (spot = i < 3 ? 0 : 1, sourceAtStep = source[spot], i !== 3 && i !== 0 && (sourceAtStep = sourceAtStep % convert[i - 1]), i === 2 && (sourceAtStep += source[1] / 1e9), valAtStep = sourceAtStep / convert[i], !(valAtStep >= 1 && (verbose && (valAtStep = Math.floor(valAtStep)), precise ? strAtStep = valAtStep.toString() : (decimals = valAtStep >= 10 ? 0 : 2, strAtStep = valAtStep.toFixed(decimals)), strAtStep.indexOf(".") > -1 && strAtStep[strAtStep.length - 1] === "0" && (strAtStep = strAtStep.replace(/\.?0+$/, "")), results && (results += " "), results += strAtStep, verbose ? (results += " " + verboseDesc[i], strAtStep !== "1" && (results += "s")) : results += " " + minimalDesc[i], !verbose))); i++)
26
+ ;
27
+ return results;
28
+ };
29
+ }
30
+ });
31
+
32
+ export {
33
+ require_pretty_hrtime
34
+ };