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.
Files changed (202) 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-L4RMQ7D7.js +223 -0
  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-DK2ODWXH.js → syntaxhighlighter-WKBQ5RC7.js} +707 -1851
  39. package/dist/_node-chunks/{builder-manager-6UBDPV7P.js → builder-manager-PMPHOSM2.js} +495 -1013
  40. package/dist/_node-chunks/camelcase-K3IOOFQW.js +18 -0
  41. package/dist/_node-chunks/{chunk-QNUGJO6L.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-3FPF5Y2F.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-SCTKVDWR.js → chunk-GG2WQZSG.js} +4619 -7350
  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-LAU7VVPC.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-CJHAP7SE.js → chunk-WLHMN7AP.js} +292 -688
  68. package/dist/_node-chunks/chunk-XGVLB4UJ.js +54 -0
  69. package/dist/_node-chunks/{chunk-J7N7PD5Q.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-HJLCLGNT.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 +1966 -5347
  92. package/dist/client-logger/index.js +31 -61
  93. package/dist/common/index.d.ts +210 -3
  94. package/dist/common/index.js +28 -20
  95. package/dist/components/index.d.ts +472 -280
  96. package/dist/components/index.js +15992 -75
  97. package/dist/core-events/index.js +2 -66
  98. package/dist/core-server/index.js +3837 -7191
  99. package/dist/core-server/presets/common-manager.css +2 -2
  100. package/dist/core-server/presets/common-manager.js +2511 -5219
  101. package/dist/core-server/presets/common-override-preset.js +31 -60
  102. package/dist/core-server/presets/common-preset.js +434 -924
  103. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
  104. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
  105. package/dist/csf/index.js +534 -1172
  106. package/dist/csf-tools/index.d.ts +15 -4
  107. package/dist/csf-tools/index.js +9 -9
  108. package/dist/docs-tools/index.js +6 -6
  109. package/dist/highlight/index.js +2 -2
  110. package/dist/instrumenter/index.js +199 -415
  111. package/dist/manager/globals-runtime.js +47968 -56484
  112. package/dist/manager/globals.js +2 -3
  113. package/dist/manager/runtime.js +4901 -10318
  114. package/dist/manager-api/index.d.ts +11 -3
  115. package/dist/manager-api/index.js +1250 -2397
  116. package/dist/manager-errors.d.ts +3 -0
  117. package/dist/manager-errors.js +3 -3
  118. package/dist/node-logger/index.d.ts +1 -1
  119. package/dist/node-logger/index.js +1270 -2593
  120. package/dist/preview/globals.js +2 -3
  121. package/dist/preview/runtime.js +10767 -22386
  122. package/dist/preview-api/index.d.ts +67 -68
  123. package/dist/preview-api/index.js +15 -15
  124. package/dist/preview-errors.d.ts +3 -0
  125. package/dist/preview-errors.js +4 -4
  126. package/dist/router/index.js +347 -899
  127. package/dist/server-errors.d.ts +3 -0
  128. package/dist/server-errors.js +10 -10
  129. package/dist/telemetry/index.js +24 -24
  130. package/dist/test/index.js +6129 -11914
  131. package/dist/theming/create.d.ts +4 -2
  132. package/dist/theming/create.js +4 -4
  133. package/dist/theming/index.d.ts +3397 -2628
  134. package/dist/theming/index.js +502 -1091
  135. package/dist/types/index.d.ts +50 -5
  136. package/dist/types/index.js +2 -11
  137. package/dist/viewport/index.js +3 -3
  138. package/package.json +17 -9
  139. package/dist/_browser-chunks/Color-7ZNS6F6B.js +0 -1676
  140. package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
  141. package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
  142. package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
  143. package/dist/_browser-chunks/chunk-BOOOPFZF.js +0 -2335
  144. package/dist/_browser-chunks/chunk-C4XOKMDU.js +0 -270
  145. package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
  146. package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
  147. package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
  148. package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
  149. package/dist/_browser-chunks/chunk-I74EUU5O.js +0 -5809
  150. package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
  151. package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
  152. package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
  153. package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
  154. package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
  155. package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
  156. package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
  157. package/dist/_browser-chunks/chunk-RNE2IUTB.js +0 -1300
  158. package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
  159. package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
  160. package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
  161. package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
  162. package/dist/_browser-chunks/chunk-W4QKLQSC.js +0 -4182
  163. package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
  164. package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
  165. package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
  166. package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
  167. package/dist/_node-chunks/camelcase-WKJOVNPM.js +0 -18
  168. package/dist/_node-chunks/chunk-2RIKHYCS.js +0 -304
  169. package/dist/_node-chunks/chunk-3JCSHYSU.js +0 -1657
  170. package/dist/_node-chunks/chunk-4GE6Q4MX.js +0 -1531
  171. package/dist/_node-chunks/chunk-5SEHHENC.js +0 -64656
  172. package/dist/_node-chunks/chunk-6GD23U64.js +0 -420
  173. package/dist/_node-chunks/chunk-6OAXYS5T.js +0 -1544
  174. package/dist/_node-chunks/chunk-7TNUMFKR.js +0 -4741
  175. package/dist/_node-chunks/chunk-BCDHUXAJ.js +0 -4272
  176. package/dist/_node-chunks/chunk-BYVQZ2HU.js +0 -220
  177. package/dist/_node-chunks/chunk-DAMVKHAC.js +0 -101
  178. package/dist/_node-chunks/chunk-FEOC7OX2.js +0 -1586
  179. package/dist/_node-chunks/chunk-FY7XZPLY.js +0 -2248
  180. package/dist/_node-chunks/chunk-GD2FXWDF.js +0 -697
  181. package/dist/_node-chunks/chunk-HM6B7FE5.js +0 -18
  182. package/dist/_node-chunks/chunk-HORWITP7.js +0 -90
  183. package/dist/_node-chunks/chunk-II4AFH3V.js +0 -28
  184. package/dist/_node-chunks/chunk-MF2PUEWG.js +0 -5029
  185. package/dist/_node-chunks/chunk-RVE4UTVQ.js +0 -1518
  186. package/dist/_node-chunks/chunk-TUFWZUTO.js +0 -69
  187. package/dist/_node-chunks/chunk-TXHNWNH4.js +0 -79
  188. package/dist/_node-chunks/chunk-ULWNTI6M.js +0 -1198
  189. package/dist/_node-chunks/chunk-VYRFXLRO.js +0 -6712
  190. package/dist/_node-chunks/chunk-WNOSTIYP.js +0 -34
  191. package/dist/_node-chunks/chunk-X67VGZN4.js +0 -1250
  192. package/dist/_node-chunks/chunk-XCEBYOA4.js +0 -61
  193. package/dist/_node-chunks/chunk-XW7YMR7I.js +0 -111
  194. package/dist/_node-chunks/chunk-ZRFYQ46H.js +0 -61
  195. package/dist/_node-chunks/dist-APCKHSY3.js +0 -175
  196. package/dist/_node-chunks/globby-TSGXGDA2.js +0 -5222
  197. package/dist/_node-chunks/lib-DZ5TVIU5.js +0 -518
  198. package/dist/_node-chunks/mdx-N42X6CFJ-Z6BYQCPN.js +0 -22017
  199. package/dist/_node-chunks/p-limit-MLJNGG2K.js +0 -168
  200. package/dist/_node-chunks/plugin-J3JI3ZKJ.js +0 -159
  201. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-3QHNTM5B.js +0 -69102
  202. package/dist/_node-chunks/webpack-mock-plugin-4Y3MWPJ6.js +0 -124
@@ -1,61 +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
- var __create = Object.create;
13
- var __defProp = Object.defineProperty;
14
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
- var __getOwnPropNames = Object.getOwnPropertyNames;
16
- var __getProtoOf = Object.getPrototypeOf;
17
- var __hasOwnProp = Object.prototype.hasOwnProperty;
18
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
19
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
20
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
21
- }) : x)(function(x) {
22
- if (typeof require !== "undefined") return require.apply(this, arguments);
23
- throw Error('Dynamic require of "' + x + '" is not supported');
24
- });
25
- var __esm = (fn, res) => function __init() {
26
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
27
- };
28
- var __commonJS = (cb, mod) => function __require2() {
29
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
30
- };
31
- var __export = (target, all) => {
32
- for (var name in all)
33
- __defProp(target, name, { get: all[name], enumerable: true });
34
- };
35
- var __copyProps = (to, from, except, desc) => {
36
- if (from && typeof from === "object" || typeof from === "function") {
37
- for (let key of __getOwnPropNames(from))
38
- if (!__hasOwnProp.call(to, key) && key !== except)
39
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
40
- }
41
- return to;
42
- };
43
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
44
- // If the importer is in node compatibility mode or this is not an ESM
45
- // file that has been converted to a CommonJS file using a Babel-
46
- // compatible transform (i.e. "__esModule" has not been set), then set
47
- // "default" to the CommonJS "module.exports" for node compatibility.
48
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
49
- mod
50
- ));
51
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
52
-
53
- export {
54
- __name,
55
- __require,
56
- __esm,
57
- __commonJS,
58
- __export,
59
- __toESM,
60
- __toCommonJS
61
- };
@@ -1,111 +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
- // src/telemetry/event-cache.ts
17
- import { cache } from "storybook/internal/common";
18
- var operation = Promise.resolve();
19
- var setHelper = /* @__PURE__ */ __name(async (eventType, body) => {
20
- const lastEvents = await cache.get("lastEvents") || {};
21
- lastEvents[eventType] = { body, timestamp: Date.now() };
22
- await cache.set("lastEvents", lastEvents);
23
- }, "setHelper");
24
- var set = /* @__PURE__ */ __name(async (eventType, body) => {
25
- await operation;
26
- operation = setHelper(eventType, body);
27
- return operation;
28
- }, "set");
29
- var getLastEvents = /* @__PURE__ */ __name(async () => {
30
- return await cache.get("lastEvents") || {};
31
- }, "getLastEvents");
32
- var upgradeFields = /* @__PURE__ */ __name((event) => {
33
- const { body, timestamp } = event;
34
- return {
35
- timestamp,
36
- eventType: body?.eventType,
37
- eventId: body?.eventId,
38
- sessionId: body?.sessionId
39
- };
40
- }, "upgradeFields");
41
- var UPGRADE_EVENTS = ["init", "upgrade"];
42
- var RUN_EVENTS = ["build", "dev", "error"];
43
- var lastEvent = /* @__PURE__ */ __name((lastEvents, eventTypes) => {
44
- const descendingEvents = eventTypes.map((eventType) => lastEvents?.[eventType]).filter(Boolean).sort((a, b) => b.timestamp - a.timestamp);
45
- return descendingEvents.length > 0 ? descendingEvents[0] : void 0;
46
- }, "lastEvent");
47
- var getPrecedingUpgrade = /* @__PURE__ */ __name(async (events = void 0) => {
48
- const lastEvents = events || await cache.get("lastEvents") || {};
49
- const lastUpgradeEvent = lastEvent(lastEvents, UPGRADE_EVENTS);
50
- const lastRunEvent = lastEvent(lastEvents, RUN_EVENTS);
51
- if (!lastUpgradeEvent) {
52
- return void 0;
53
- }
54
- return !lastRunEvent?.timestamp || lastUpgradeEvent.timestamp > lastRunEvent.timestamp ? upgradeFields(lastUpgradeEvent) : void 0;
55
- }, "getPrecedingUpgrade");
56
-
57
- // ../node_modules/nanoid/index.js
58
- import { randomFillSync } from "crypto";
59
-
60
- // ../node_modules/nanoid/url-alphabet/index.js
61
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
62
-
63
- // ../node_modules/nanoid/index.js
64
- var POOL_SIZE_MULTIPLIER = 128;
65
- var pool;
66
- var poolOffset;
67
- var fillPool = /* @__PURE__ */ __name((bytes) => {
68
- if (!pool || pool.length < bytes) {
69
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
70
- randomFillSync(pool);
71
- poolOffset = 0;
72
- } else if (poolOffset + bytes > pool.length) {
73
- randomFillSync(pool);
74
- poolOffset = 0;
75
- }
76
- poolOffset += bytes;
77
- }, "fillPool");
78
- var nanoid = /* @__PURE__ */ __name((size = 21) => {
79
- fillPool(size -= 0);
80
- let id = "";
81
- for (let i = poolOffset - size; i < poolOffset; i++) {
82
- id += urlAlphabet[pool[i] & 63];
83
- }
84
- return id;
85
- }, "nanoid");
86
-
87
- // src/telemetry/session-id.ts
88
- import { cache as cache2 } from "storybook/internal/common";
89
- var SESSION_TIMEOUT = 1e3 * 60 * 60 * 2;
90
- var sessionId;
91
- var getSessionId = /* @__PURE__ */ __name(async () => {
92
- const now = Date.now();
93
- if (!sessionId) {
94
- const session = await cache2.get("session");
95
- if (session && session.lastUsed >= now - SESSION_TIMEOUT) {
96
- sessionId = session.id;
97
- } else {
98
- sessionId = nanoid();
99
- }
100
- }
101
- await cache2.set("session", { id: sessionId, lastUsed: now });
102
- return sessionId;
103
- }, "getSessionId");
104
-
105
- export {
106
- nanoid,
107
- set,
108
- getLastEvents,
109
- getPrecedingUpgrade,
110
- getSessionId
111
- };
@@ -1,61 +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
-
13
- // src/common/versions.ts
14
- var versions_default = {
15
- "@storybook/addon-a11y": "10.1.0-alpha.1",
16
- "@storybook/addon-docs": "10.1.0-alpha.1",
17
- "@storybook/addon-links": "10.1.0-alpha.1",
18
- "@storybook/addon-onboarding": "10.1.0-alpha.1",
19
- "storybook-addon-pseudo-states": "10.1.0-alpha.1",
20
- "@storybook/addon-themes": "10.1.0-alpha.1",
21
- "@storybook/addon-vitest": "10.1.0-alpha.1",
22
- "@storybook/builder-vite": "10.1.0-alpha.1",
23
- "@storybook/builder-webpack5": "10.1.0-alpha.1",
24
- storybook: "10.1.0-alpha.1",
25
- "@storybook/angular": "10.1.0-alpha.1",
26
- "@storybook/ember": "10.1.0-alpha.1",
27
- "@storybook/html-vite": "10.1.0-alpha.1",
28
- "@storybook/nextjs": "10.1.0-alpha.1",
29
- "@storybook/nextjs-vite": "10.1.0-alpha.1",
30
- "@storybook/preact-vite": "10.1.0-alpha.1",
31
- "@storybook/react-native-web-vite": "10.1.0-alpha.1",
32
- "@storybook/react-vite": "10.1.0-alpha.1",
33
- "@storybook/react-webpack5": "10.1.0-alpha.1",
34
- "@storybook/server-webpack5": "10.1.0-alpha.1",
35
- "@storybook/svelte-vite": "10.1.0-alpha.1",
36
- "@storybook/sveltekit": "10.1.0-alpha.1",
37
- "@storybook/vue3-vite": "10.1.0-alpha.1",
38
- "@storybook/web-components-vite": "10.1.0-alpha.1",
39
- sb: "10.1.0-alpha.1",
40
- "@storybook/cli": "10.1.0-alpha.1",
41
- "@storybook/codemod": "10.1.0-alpha.1",
42
- "@storybook/core-webpack": "10.1.0-alpha.1",
43
- "create-storybook": "10.1.0-alpha.1",
44
- "@storybook/csf-plugin": "10.1.0-alpha.1",
45
- "eslint-plugin-storybook": "10.1.0-alpha.1",
46
- "@storybook/react-dom-shim": "10.1.0-alpha.1",
47
- "@storybook/preset-create-react-app": "10.1.0-alpha.1",
48
- "@storybook/preset-react-webpack": "10.1.0-alpha.1",
49
- "@storybook/preset-server-webpack": "10.1.0-alpha.1",
50
- "@storybook/html": "10.1.0-alpha.1",
51
- "@storybook/preact": "10.1.0-alpha.1",
52
- "@storybook/react": "10.1.0-alpha.1",
53
- "@storybook/server": "10.1.0-alpha.1",
54
- "@storybook/svelte": "10.1.0-alpha.1",
55
- "@storybook/vue3": "10.1.0-alpha.1",
56
- "@storybook/web-components": "10.1.0-alpha.1"
57
- };
58
-
59
- export {
60
- versions_default
61
- };
@@ -1,175 +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
- toEstree
14
- } from "./chunk-CJHAP7SE.js";
15
- import {
16
- __name
17
- } from "./chunk-XCEBYOA4.js";
18
-
19
- // ../node_modules/@storybook/docs-mdx/dist/index.js
20
- var getAttr = /* @__PURE__ */ __name((elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute" && n.name.name === what), "getAttr");
21
- var getAttrValue = /* @__PURE__ */ __name((elt, what) => {
22
- const attr = getAttr(elt, what);
23
- return attr?.value;
24
- }, "getAttrValue");
25
- var getAttrLiteral = /* @__PURE__ */ __name((elt, what) => {
26
- const attrValue = getAttrValue(elt, what);
27
- if (!attrValue)
28
- return void 0;
29
- if (attrValue.type === "Literal") {
30
- return attrValue.value;
31
- } else {
32
- throw new Error(`Expected string literal ${what}, received ${attrValue.type}`);
33
- }
34
- }, "getAttrLiteral");
35
- var getOf = /* @__PURE__ */ __name((elt, varToImport) => {
36
- const ofAttrValue = getAttrValue(elt, "of");
37
- if (ofAttrValue) {
38
- if (ofAttrValue.type === "JSXExpressionContainer") {
39
- const of = ofAttrValue.expression;
40
- if (of?.type === "Identifier") {
41
- const importName = varToImport[of.name];
42
- if (importName) {
43
- return importName;
44
- } else {
45
- throw new Error(`Unknown identifier ${of.name}`);
46
- }
47
- } else {
48
- throw new Error(`Expected identifier, received ${of.type}`);
49
- }
50
- } else {
51
- throw new Error(`Expected JSX expression, received ${ofAttrValue.type}`);
52
- }
53
- }
54
- }, "getOf");
55
- var getTags = /* @__PURE__ */ __name((elt) => {
56
- const tagsAttr = getAttr(elt, "tags");
57
- if (!tagsAttr)
58
- return void 0;
59
- const tagsContainer = tagsAttr.value;
60
- if (tagsContainer.type === "JSXExpressionContainer") {
61
- const tagsArray = tagsContainer.expression;
62
- if (tagsArray.type === "ArrayExpression") {
63
- const metaTags = tagsArray.elements.map((tag) => {
64
- if (tag.type === "Literal" && typeof tag.value === "string") {
65
- return tag.value;
66
- } else {
67
- throw new Error(`Expected string literal tag, received ${tag.type}`);
68
- }
69
- });
70
- return metaTags;
71
- } else {
72
- throw new Error(`Expected tags array, received ${tagsArray.type}`);
73
- }
74
- } else {
75
- throw new Error(`Expected JSX expression tags, received ${tagsContainer.type}`);
76
- }
77
- }, "getTags");
78
- var getIsTemplate = /* @__PURE__ */ __name((elt) => {
79
- const isTemplateAttr = getAttr(elt, "isTemplate");
80
- if (!isTemplateAttr)
81
- return false;
82
- const isTemplate = isTemplateAttr.value;
83
- if (isTemplate == null) {
84
- return true;
85
- } else if (isTemplate.type === "JSXExpressionContainer") {
86
- const expression = isTemplate.expression;
87
- if (expression.type === "Literal" && typeof expression.value === "boolean") {
88
- return expression.value;
89
- } else {
90
- throw new Error(`Expected boolean isTemplate, received ${typeof expression.value}`);
91
- }
92
- } else {
93
- throw new Error(`Expected expression isTemplate, received ${isTemplate.type}`);
94
- }
95
- }, "getIsTemplate");
96
- var extractTitle = /* @__PURE__ */ __name((root, varToImport) => {
97
- const result = { title: void 0, of: void 0, name: void 0, isTemplate: false };
98
- let fragments = root.body.filter(
99
- (child) => child.type === "ExpressionStatement" && child.expression.type === "JSXFragment"
100
- );
101
- if (fragments.length > 1)
102
- throw new Error("duplicate contents");
103
- if (fragments.length === 0)
104
- return result;
105
- const fragment = fragments[0].expression;
106
- fragment.children.forEach((child) => {
107
- if (child.type === "JSXElement") {
108
- const { openingElement } = child;
109
- const name = openingElement.name.name;
110
- if (name === "Meta") {
111
- if (result.title || result.name || result.of) {
112
- throw new Error("Meta can only be declared once");
113
- }
114
- result.title = getAttrLiteral(openingElement, "title");
115
- result.name = getAttrLiteral(openingElement, "name");
116
- result.of = getOf(openingElement, varToImport);
117
- result.isTemplate = getIsTemplate(openingElement);
118
- result.metaTags = getTags(openingElement);
119
- }
120
- } else if (child.type === "JSXExpressionContainer") {
121
- } else {
122
- throw new Error(`Unexpected JSX child: ${child.type}`);
123
- }
124
- });
125
- return result;
126
- }, "extractTitle");
127
- var extractImports = /* @__PURE__ */ __name((root) => {
128
- const varToImport = {};
129
- root.body.forEach((child) => {
130
- if (child.type === "ImportDeclaration") {
131
- const { source, specifiers } = child;
132
- if (source.type === "Literal") {
133
- specifiers.forEach((s) => {
134
- varToImport[s.local.name] = source.value.toString();
135
- });
136
- } else {
137
- throw new Error("MDX: unexpected import source");
138
- }
139
- }
140
- });
141
- return varToImport;
142
- }, "extractImports");
143
- var plugin = /* @__PURE__ */ __name((store) => (root) => {
144
- const estree = toEstree(root);
145
- const varToImport = extractImports(estree);
146
- const { title, of, name, isTemplate, metaTags } = extractTitle(estree, varToImport);
147
- store.title = title;
148
- store.of = of;
149
- store.name = name;
150
- store.isTemplate = isTemplate;
151
- store.metaTags = metaTags;
152
- store.imports = Array.from(new Set(Object.values(varToImport)));
153
- return root;
154
- }, "plugin");
155
- var analyze = /* @__PURE__ */ __name(async (code) => {
156
- const store = {
157
- title: void 0,
158
- of: void 0,
159
- name: void 0,
160
- isTemplate: false,
161
- metaTags: void 0,
162
- imports: void 0
163
- };
164
- const { compile } = await import("./mdx-N42X6CFJ-Z6BYQCPN.js");
165
- await compile(code, {
166
- rehypePlugins: [[plugin, store]]
167
- });
168
- const { title, of, name, isTemplate, metaTags, imports = [] } = store;
169
- return { title, of, name, isTemplate, metaTags, imports };
170
- }, "analyze");
171
- export {
172
- analyze,
173
- extractImports,
174
- plugin
175
- };