storybook 10.2.0-alpha.9 → 10.2.0-beta.1

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 (97) hide show
  1. package/dist/_browser-chunks/{Color-E5XDEOX4.js → Color-XESOIGZP.js} +57 -3
  2. package/dist/_browser-chunks/chunk-AFVOZMXQ.js +23 -0
  3. package/dist/_browser-chunks/{chunk-3PJE6VLG.js → chunk-ASKQZAOS.js} +1 -12
  4. package/dist/_browser-chunks/chunk-IYCKG66Y.js +171 -0
  5. package/dist/_browser-chunks/chunk-LCHBOIHN.js +64 -0
  6. package/dist/_browser-chunks/{chunk-IPA5A322.js → chunk-MEXTPDJG.js} +1 -1
  7. package/dist/_browser-chunks/{chunk-54PNNATT.js → chunk-NQJGOFZV.js} +18 -1
  8. package/dist/_browser-chunks/{chunk-VUZYLZ4B.js → chunk-QOXZ7W26.js} +31 -15
  9. package/dist/_browser-chunks/{chunk-LOTN4ZCW.js → chunk-SI6AKD4S.js} +2 -2
  10. package/dist/_browser-chunks/chunk-YK43Z22A.js +263 -0
  11. package/dist/_node-chunks/{builder-manager-FTCODGJP.js → builder-manager-IRBMORML.js} +15 -12
  12. package/dist/_node-chunks/camelcase-JM3BJBI7.js +62 -0
  13. package/dist/_node-chunks/{chunk-RF3L36MK.js → chunk-2SAOTVFT.js} +125 -73
  14. package/dist/_node-chunks/chunk-34APMFOU.js +23 -0
  15. package/dist/_node-chunks/chunk-5IZBWBDT.js +144 -0
  16. package/dist/_node-chunks/chunk-5M5YVBOE.js +18 -0
  17. package/dist/_node-chunks/{chunk-6ABJZZWS.js → chunk-6T5JWO53.js} +7 -7
  18. package/dist/_node-chunks/{chunk-D4TCQXIF.js → chunk-7WSC72DT.js} +7 -7
  19. package/dist/_node-chunks/{chunk-YN6FEZAF.js → chunk-AEAT43LP.js} +7 -7
  20. package/dist/_node-chunks/{chunk-3Y5VHKPI.js → chunk-B3ABITJT.js} +9 -9
  21. package/dist/_node-chunks/chunk-E4NS75V2.js +126 -0
  22. package/dist/_node-chunks/{chunk-LRBEW57O.js → chunk-EXJYKVMZ.js} +7 -7
  23. package/dist/_node-chunks/{chunk-NYUFS6LX.js → chunk-FK46E6BJ.js} +10 -10
  24. package/dist/_node-chunks/{chunk-CO7N5AG7.js → chunk-FLAGIDCN.js} +36 -14
  25. package/dist/_node-chunks/{chunk-FGI35IGB.js → chunk-FOSOWVVY.js} +15 -69
  26. package/dist/_node-chunks/{chunk-33XC4R6P.js → chunk-FWBRRVW6.js} +9 -9
  27. package/dist/_node-chunks/{chunk-73GYSTNZ.js → chunk-GKB6BXCD.js} +6 -6
  28. package/dist/_node-chunks/{chunk-SBPB3VWI.js → chunk-H444EFIP.js} +6 -6
  29. package/dist/_node-chunks/{chunk-6SH5SI6S.js → chunk-KRXWB32F.js} +7 -7
  30. package/dist/_node-chunks/{chunk-3DPKKQ6P.js → chunk-L5NAVTEK.js} +6 -6
  31. package/dist/_node-chunks/{chunk-MWWAQ5S4.js → chunk-M5BK3KV6.js} +5262 -1480
  32. package/dist/_node-chunks/{chunk-OUDQWDHY.js → chunk-MTJISVX7.js} +7 -7
  33. package/dist/_node-chunks/{chunk-IIBBQZLT.js → chunk-NFE2FV3C.js} +6 -6
  34. package/dist/_node-chunks/{chunk-PZCWRKQE.js → chunk-PZT42DUC.js} +6 -6
  35. package/dist/_node-chunks/{chunk-XZ6V3G6J.js → chunk-QO37JOCL.js} +533 -143
  36. package/dist/_node-chunks/{chunk-LB74XOLW.js → chunk-RP5L2ZGT.js} +6 -6
  37. package/dist/_node-chunks/chunk-RVYIMZDI.js +61 -0
  38. package/dist/_node-chunks/{chunk-BQX766MA.js → chunk-WLBZMVKZ.js} +260 -162
  39. package/dist/_node-chunks/{chunk-WTQGSYRO.js → chunk-WRGLNCF7.js} +12 -571
  40. package/dist/_node-chunks/{chunk-SPOUBCPJ.js → chunk-YR6V5CGX.js} +18 -14
  41. package/dist/_node-chunks/{globby-AXGFF6I5.js → globby-EHB62LWZ.js} +11 -20
  42. package/dist/_node-chunks/{lib-ESB7KQ6D.js → lib-F2QE2E3S.js} +7 -7
  43. package/dist/_node-chunks/{mdx-N42X6CFJ-XXQ6YIDF.js → mdx-N42X6CFJ-SV23TYXC.js} +8 -8
  44. package/dist/_node-chunks/{p-limit-P6ND7SUA.js → p-limit-T7DGUJ4I.js} +18 -14
  45. package/dist/babel/index.js +10 -10
  46. package/dist/bin/core.js +12 -12
  47. package/dist/bin/dispatcher.js +11 -11
  48. package/dist/bin/loader.js +9 -9
  49. package/dist/cli/index.d.ts +1504 -424
  50. package/dist/cli/index.js +18 -18
  51. package/dist/common/index.d.ts +1319 -271
  52. package/dist/common/index.js +19 -19
  53. package/dist/components/index.d.ts +4 -1
  54. package/dist/components/index.js +228 -227
  55. package/dist/core-events/index.d.ts +23 -7
  56. package/dist/core-events/index.js +5 -1
  57. package/dist/core-server/index.d.ts +105 -3
  58. package/dist/core-server/index.js +992 -613
  59. package/dist/core-server/presets/common-manager.js +208 -160
  60. package/dist/core-server/presets/common-override-preset.js +11 -11
  61. package/dist/core-server/presets/common-preset.js +558 -4534
  62. package/dist/csf/index.d.ts +147 -15
  63. package/dist/csf/index.js +52 -23
  64. package/dist/csf-tools/index.d.ts +19 -1
  65. package/dist/csf-tools/index.js +11 -9
  66. package/dist/docs-tools/index.d.ts +2 -2
  67. package/dist/docs-tools/index.js +4 -5
  68. package/dist/manager/globals-runtime.js +2749 -6907
  69. package/dist/manager/runtime.js +2939 -2295
  70. package/dist/manager-api/index.d.ts +89 -21
  71. package/dist/manager-api/index.js +82 -23
  72. package/dist/mocking-utils/index.js +8 -8
  73. package/dist/node-logger/index.d.ts +1453 -108
  74. package/dist/node-logger/index.js +9 -9
  75. package/dist/preview/runtime.js +784 -5059
  76. package/dist/preview-api/index.d.ts +93 -69
  77. package/dist/preview-api/index.js +11 -8
  78. package/dist/router/index.js +5 -4
  79. package/dist/server-errors.js +11 -11
  80. package/dist/telemetry/index.d.ts +14 -2
  81. package/dist/telemetry/index.js +23 -22
  82. package/dist/theming/index.d.ts +5 -5
  83. package/dist/theming/index.js +21 -2
  84. package/dist/types/index.d.ts +21 -9
  85. package/dist/viewport/index.d.ts +5 -3
  86. package/dist/viewport/index.js +12 -3
  87. package/package.json +27 -26
  88. package/dist/_browser-chunks/chunk-2NDLAB5X.js +0 -363
  89. package/dist/_browser-chunks/chunk-CLSHX4VX.js +0 -4140
  90. package/dist/_browser-chunks/chunk-HPYUT3WS.js +0 -199
  91. package/dist/_browser-chunks/chunk-XCZK5QUJ.js +0 -0
  92. package/dist/_node-chunks/camelcase-5XDKQT3J.js +0 -37
  93. package/dist/_node-chunks/chunk-GXQRT5M6.js +0 -61
  94. package/dist/_node-chunks/chunk-MOQRBTWA.js +0 -70
  95. package/dist/_node-chunks/chunk-PRNP2HO6.js +0 -23
  96. package/dist/_node-chunks/chunk-VKMYOVNS.js +0 -18
  97. package/dist/_node-chunks/dist-YRSVYE5A.js +0 -121
@@ -0,0 +1,263 @@
1
+ import {
2
+ argumentsTag,
3
+ arrayBufferTag,
4
+ arrayTag,
5
+ booleanTag,
6
+ dataViewTag,
7
+ dateTag,
8
+ float32ArrayTag,
9
+ float64ArrayTag,
10
+ getSymbols,
11
+ getTag,
12
+ int16ArrayTag,
13
+ int32ArrayTag,
14
+ int8ArrayTag,
15
+ isPlainObject,
16
+ isPrimitive,
17
+ isTypedArray,
18
+ mapTag,
19
+ numberTag,
20
+ objectTag,
21
+ regexpTag,
22
+ setTag,
23
+ stringTag,
24
+ symbolTag,
25
+ uint16ArrayTag,
26
+ uint32ArrayTag,
27
+ uint8ArrayTag,
28
+ uint8ClampedArrayTag
29
+ } from "./chunk-LCHBOIHN.js";
30
+
31
+ // ../../node_modules/es-toolkit/dist/object/mapValues.mjs
32
+ function mapValues(object, getNewValue) {
33
+ let result = {}, keys = Object.keys(object);
34
+ for (let i = 0; i < keys.length; i++) {
35
+ let key = keys[i], value = object[key];
36
+ result[key] = getNewValue(value, key, object);
37
+ }
38
+ return result;
39
+ }
40
+
41
+ // ../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
42
+ function isUnsafeProperty(key) {
43
+ return key === "__proto__";
44
+ }
45
+
46
+ // ../../node_modules/es-toolkit/dist/object/mergeWith.mjs
47
+ function mergeWith(target, source, merge2) {
48
+ let sourceKeys = Object.keys(source);
49
+ for (let i = 0; i < sourceKeys.length; i++) {
50
+ let key = sourceKeys[i];
51
+ if (isUnsafeProperty(key))
52
+ continue;
53
+ let sourceValue = source[key], targetValue = target[key], merged = merge2(targetValue, sourceValue, key, target, source);
54
+ merged !== void 0 ? target[key] = merged : Array.isArray(sourceValue) ? Array.isArray(targetValue) ? target[key] = mergeWith(targetValue, sourceValue, merge2) : target[key] = mergeWith([], sourceValue, merge2) : isPlainObject(sourceValue) ? isPlainObject(targetValue) ? target[key] = mergeWith(targetValue, sourceValue, merge2) : target[key] = mergeWith({}, sourceValue, merge2) : (targetValue === void 0 || sourceValue !== void 0) && (target[key] = sourceValue);
55
+ }
56
+ return target;
57
+ }
58
+
59
+ // ../../node_modules/es-toolkit/dist/object/pick.mjs
60
+ function pick(obj, keys) {
61
+ let result = {};
62
+ for (let i = 0; i < keys.length; i++) {
63
+ let key = keys[i];
64
+ Object.hasOwn(obj, key) && (result[key] = obj[key]);
65
+ }
66
+ return result;
67
+ }
68
+
69
+ // ../../node_modules/es-toolkit/dist/object/pickBy.mjs
70
+ function pickBy(obj, shouldPick) {
71
+ let result = {}, keys = Object.keys(obj);
72
+ for (let i = 0; i < keys.length; i++) {
73
+ let key = keys[i], value = obj[key];
74
+ shouldPick(value, key) && (result[key] = value);
75
+ }
76
+ return result;
77
+ }
78
+
79
+ // ../../node_modules/es-toolkit/dist/object/clone.mjs
80
+ function clone(obj) {
81
+ if (isPrimitive(obj))
82
+ return obj;
83
+ if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && obj instanceof SharedArrayBuffer)
84
+ return obj.slice(0);
85
+ let prototype = Object.getPrototypeOf(obj), Constructor = prototype.constructor;
86
+ if (obj instanceof Date || obj instanceof Map || obj instanceof Set)
87
+ return new Constructor(obj);
88
+ if (obj instanceof RegExp) {
89
+ let newRegExp = new Constructor(obj);
90
+ return newRegExp.lastIndex = obj.lastIndex, newRegExp;
91
+ }
92
+ if (obj instanceof DataView)
93
+ return new Constructor(obj.buffer.slice(0));
94
+ if (obj instanceof Error) {
95
+ let newError = new Constructor(obj.message);
96
+ return newError.stack = obj.stack, newError.name = obj.name, newError.cause = obj.cause, newError;
97
+ }
98
+ if (typeof File < "u" && obj instanceof File)
99
+ return new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });
100
+ if (typeof obj == "object") {
101
+ let newObject = Object.create(prototype);
102
+ return Object.assign(newObject, obj);
103
+ }
104
+ return obj;
105
+ }
106
+
107
+ // ../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
108
+ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
109
+ let cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
110
+ if (cloned !== void 0)
111
+ return cloned;
112
+ if (isPrimitive(valueToClone))
113
+ return valueToClone;
114
+ if (stack.has(valueToClone))
115
+ return stack.get(valueToClone);
116
+ if (Array.isArray(valueToClone)) {
117
+ let result = new Array(valueToClone.length);
118
+ stack.set(valueToClone, result);
119
+ for (let i = 0; i < valueToClone.length; i++)
120
+ result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
121
+ return Object.hasOwn(valueToClone, "index") && (result.index = valueToClone.index), Object.hasOwn(valueToClone, "input") && (result.input = valueToClone.input), result;
122
+ }
123
+ if (valueToClone instanceof Date)
124
+ return new Date(valueToClone.getTime());
125
+ if (valueToClone instanceof RegExp) {
126
+ let result = new RegExp(valueToClone.source, valueToClone.flags);
127
+ return result.lastIndex = valueToClone.lastIndex, result;
128
+ }
129
+ if (valueToClone instanceof Map) {
130
+ let result = /* @__PURE__ */ new Map();
131
+ stack.set(valueToClone, result);
132
+ for (let [key, value] of valueToClone)
133
+ result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
134
+ return result;
135
+ }
136
+ if (valueToClone instanceof Set) {
137
+ let result = /* @__PURE__ */ new Set();
138
+ stack.set(valueToClone, result);
139
+ for (let value of valueToClone)
140
+ result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
141
+ return result;
142
+ }
143
+ if (typeof Buffer < "u" && Buffer.isBuffer(valueToClone))
144
+ return valueToClone.subarray();
145
+ if (isTypedArray(valueToClone)) {
146
+ let result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
147
+ stack.set(valueToClone, result);
148
+ for (let i = 0; i < valueToClone.length; i++)
149
+ result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
150
+ return result;
151
+ }
152
+ if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && valueToClone instanceof SharedArrayBuffer)
153
+ return valueToClone.slice(0);
154
+ if (valueToClone instanceof DataView) {
155
+ let result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
156
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
157
+ }
158
+ if (typeof File < "u" && valueToClone instanceof File) {
159
+ let result = new File([valueToClone], valueToClone.name, {
160
+ type: valueToClone.type
161
+ });
162
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
163
+ }
164
+ if (typeof Blob < "u" && valueToClone instanceof Blob) {
165
+ let result = new Blob([valueToClone], { type: valueToClone.type });
166
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
167
+ }
168
+ if (valueToClone instanceof Error) {
169
+ let result = new valueToClone.constructor();
170
+ return stack.set(valueToClone, result), result.message = valueToClone.message, result.name = valueToClone.name, result.stack = valueToClone.stack, result.cause = valueToClone.cause, copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
171
+ }
172
+ if (valueToClone instanceof Boolean) {
173
+ let result = new Boolean(valueToClone.valueOf());
174
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
175
+ }
176
+ if (valueToClone instanceof Number) {
177
+ let result = new Number(valueToClone.valueOf());
178
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
179
+ }
180
+ if (valueToClone instanceof String) {
181
+ let result = new String(valueToClone.valueOf());
182
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
183
+ }
184
+ if (typeof valueToClone == "object" && isCloneableObject(valueToClone)) {
185
+ let result = Object.create(Object.getPrototypeOf(valueToClone));
186
+ return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result;
187
+ }
188
+ return valueToClone;
189
+ }
190
+ function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
191
+ let keys = [...Object.keys(source), ...getSymbols(source)];
192
+ for (let i = 0; i < keys.length; i++) {
193
+ let key = keys[i], descriptor = Object.getOwnPropertyDescriptor(target, key);
194
+ (descriptor == null || descriptor.writable) && (target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue));
195
+ }
196
+ }
197
+ function isCloneableObject(object) {
198
+ switch (getTag(object)) {
199
+ case argumentsTag:
200
+ case arrayTag:
201
+ case arrayBufferTag:
202
+ case dataViewTag:
203
+ case booleanTag:
204
+ case dateTag:
205
+ case float32ArrayTag:
206
+ case float64ArrayTag:
207
+ case int8ArrayTag:
208
+ case int16ArrayTag:
209
+ case int32ArrayTag:
210
+ case mapTag:
211
+ case numberTag:
212
+ case objectTag:
213
+ case regexpTag:
214
+ case setTag:
215
+ case stringTag:
216
+ case symbolTag:
217
+ case uint8ArrayTag:
218
+ case uint8ClampedArrayTag:
219
+ case uint16ArrayTag:
220
+ case uint32ArrayTag:
221
+ return !0;
222
+ default:
223
+ return !1;
224
+ }
225
+ }
226
+
227
+ // ../../node_modules/es-toolkit/dist/object/cloneDeep.mjs
228
+ function cloneDeep(obj) {
229
+ return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
230
+ }
231
+
232
+ // ../../node_modules/es-toolkit/dist/object/omit.mjs
233
+ function omit(obj, keys) {
234
+ let result = { ...obj };
235
+ for (let i = 0; i < keys.length; i++) {
236
+ let key = keys[i];
237
+ delete result[key];
238
+ }
239
+ return result;
240
+ }
241
+
242
+ // ../../node_modules/es-toolkit/dist/string/words.mjs
243
+ var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
244
+
245
+ // ../../node_modules/es-toolkit/dist/object/toMerged.mjs
246
+ function toMerged(target, source) {
247
+ return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
248
+ if (Array.isArray(sourceValue))
249
+ return Array.isArray(targetValue) ? mergeWith(clone(targetValue), sourceValue, mergeRecursively) : mergeWith([], sourceValue, mergeRecursively);
250
+ if (isPlainObject(sourceValue))
251
+ return isPlainObject(targetValue) ? mergeWith(clone(targetValue), sourceValue, mergeRecursively) : mergeWith({}, sourceValue, mergeRecursively);
252
+ });
253
+ }
254
+
255
+ export {
256
+ cloneDeep,
257
+ mapValues,
258
+ mergeWith,
259
+ omit,
260
+ pick,
261
+ pickBy,
262
+ toMerged
263
+ };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_3h3bsnbtanf from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3h3bsnbtanf from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3h3bsnbtanf from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6oizoa9gi2s from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6oizoa9gi2s from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6oizoa9gi2s from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3h3bsnbtanf.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3h3bsnbtanf.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3h3bsnbtanf.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6oizoa9gi2s.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6oizoa9gi2s.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6oizoa9gi2s.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,26 +13,26 @@ import {
13
13
  BROWSER_TARGETS,
14
14
  NODE_TARGET,
15
15
  SUPPORTED_FEATURES
16
- } from "./chunk-SBPB3VWI.js";
16
+ } from "./chunk-H444EFIP.js";
17
17
  import {
18
18
  require_build
19
- } from "./chunk-6SH5SI6S.js";
19
+ } from "./chunk-KRXWB32F.js";
20
20
  import {
21
21
  resolveModulePath,
22
22
  resolvePackageDir
23
- } from "./chunk-OUDQWDHY.js";
23
+ } from "./chunk-MTJISVX7.js";
24
24
  import {
25
25
  join,
26
26
  parse
27
- } from "./chunk-LB74XOLW.js";
27
+ } from "./chunk-RP5L2ZGT.js";
28
28
  import {
29
29
  slash
30
- } from "./chunk-73GYSTNZ.js";
30
+ } from "./chunk-GKB6BXCD.js";
31
31
  import {
32
32
  __commonJS,
33
33
  __require,
34
34
  __toESM
35
- } from "./chunk-PZCWRKQE.js";
35
+ } from "./chunk-PZT42DUC.js";
36
36
 
37
37
  // ../../node_modules/ejs/lib/utils.js
38
38
  var require_utils = __commonJS({
@@ -882,6 +882,7 @@ var exports_default = {
882
882
  "ManagerContext",
883
883
  "Provider",
884
884
  "RequestResponseError",
885
+ "Tag",
885
886
  "addons",
886
887
  "combineParameters",
887
888
  "controlOrMetaKey",
@@ -1152,6 +1153,8 @@ var exports_default = {
1152
1153
  "FILE_COMPONENT_SEARCH_RESPONSE",
1153
1154
  "FORCE_REMOUNT",
1154
1155
  "FORCE_RE_RENDER",
1156
+ "GHOST_STORIES_REQUEST",
1157
+ "GHOST_STORIES_RESPONSE",
1155
1158
  "GLOBALS_UPDATED",
1156
1159
  "MANAGER_INERT_ATTRIBUTE_CHANGED",
1157
1160
  "NAVIGATE_URL",
@@ -0,0 +1,62 @@
1
+ import CJS_COMPAT_NODE_URL_6oizoa9gi2s from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6oizoa9gi2s from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6oizoa9gi2s from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_6oizoa9gi2s.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6oizoa9gi2s.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6oizoa9gi2s.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import "./chunk-PZT42DUC.js";
13
+
14
+ // ../../node_modules/camelcase/index.js
15
+ var UPPERCASE = /[\p{Lu}]/u, LOWERCASE = /[\p{Ll}]/u, LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/u, SEPARATORS = /[_.\- ]+/, IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u, LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source), SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"), NUMBERS_AND_IDENTIFIER = new RegExp(String.raw`\d+` + IDENTIFIER.source, "gu"), preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
16
+ let isLastCharLower = !1, isLastCharUpper = !1, isLastLastCharUpper = !1, isLastLastCharPreserved = !1;
17
+ for (let index = 0; index < string.length; index++) {
18
+ let character = string[index];
19
+ isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : !0, isLastCharLower && UPPERCASE.test(character) ? (string = string.slice(0, index) + "-" + string.slice(index), isLastCharLower = !1, isLastLastCharUpper = isLastCharUpper, isLastCharUpper = !0, index++) : isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2) ? (string = string.slice(0, index - 1) + "-" + string.slice(index - 1), isLastLastCharUpper = isLastCharUpper, isLastCharUpper = !1, isLastCharLower = !0) : (isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character, isLastLastCharUpper = isLastCharUpper, isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character);
20
+ }
21
+ return string;
22
+ }, preserveConsecutiveUppercase = (input, toLowerCase) => input.replace(LEADING_CAPITAL, (match) => toLowerCase(match)), processWithCasePreservation = (input, toLowerCase, preserveConsecutiveUppercase2) => {
23
+ let result = "", previousWasNumber = !1, previousWasUppercase = !1, characters = [...input];
24
+ for (let index = 0; index < characters.length; index++) {
25
+ let character = characters[index], isUpperCase = UPPERCASE.test(character), nextCharIsUpperCase = index + 1 < characters.length && UPPERCASE.test(characters[index + 1]);
26
+ previousWasNumber && /[\p{Alpha}]/u.test(character) ? (result += character, previousWasNumber = !1, previousWasUppercase = isUpperCase) : preserveConsecutiveUppercase2 && isUpperCase && (previousWasUppercase || nextCharIsUpperCase) ? (result += character, previousWasUppercase = !0) : /\d/.test(character) ? (result += character, previousWasNumber = !0, previousWasUppercase = !1) : SEPARATORS.test(character) ? (result += character, previousWasUppercase = !1) : (result += toLowerCase(character), previousWasNumber = !1, previousWasUppercase = !1);
27
+ }
28
+ return result;
29
+ }, postProcess = (input, toUpperCase, { capitalizeAfterNumber }) => {
30
+ let transformNumericIdentifier = capitalizeAfterNumber ? (match, identifier, offset, string) => {
31
+ let nextCharacter = string.charAt(offset + match.length);
32
+ return SEPARATORS.test(nextCharacter) ? match : identifier ? match.slice(0, -identifier.length) + toUpperCase(identifier) : match;
33
+ } : (match) => match;
34
+ return input.replaceAll(NUMBERS_AND_IDENTIFIER, transformNumericIdentifier).replaceAll(
35
+ SEPARATORS_AND_IDENTIFIER,
36
+ (_, identifier) => toUpperCase(identifier)
37
+ );
38
+ };
39
+ function camelCase(input, options) {
40
+ if (!(typeof input == "string" || Array.isArray(input)))
41
+ throw new TypeError("Expected the input to be `string | string[]`");
42
+ if (options = {
43
+ pascalCase: !1,
44
+ preserveConsecutiveUppercase: !1,
45
+ capitalizeAfterNumber: !0,
46
+ ...options
47
+ }, Array.isArray(input) ? input = input.map((element) => element.trim()).filter((element) => element.length > 0).join("-") : input = input.trim(), input.length === 0)
48
+ return "";
49
+ let leadingPrefix = input.match(/^[_$]*/)[0];
50
+ if (input = input.slice(leadingPrefix.length), input.length === 0)
51
+ return leadingPrefix;
52
+ let toLowerCase = options.locale === !1 ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale), toUpperCase = options.locale === !1 ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
53
+ return input.length === 1 ? SEPARATORS.test(input) ? leadingPrefix : leadingPrefix + (options.pascalCase ? toUpperCase(input) : toLowerCase(input)) : (input !== toLowerCase(input) && (input = preserveCamelCase(
54
+ input,
55
+ toLowerCase,
56
+ toUpperCase,
57
+ options.preserveConsecutiveUppercase
58
+ )), input = input.replace(LEADING_SEPARATORS, ""), options.capitalizeAfterNumber ? input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input) : input = processWithCasePreservation(input, toLowerCase, options.preserveConsecutiveUppercase), options.pascalCase && input.length > 0 && (input = toUpperCase(input[0]) + input.slice(1)), leadingPrefix + postProcess(input, toUpperCase, options));
59
+ }
60
+ export {
61
+ camelCase as default
62
+ };
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_3h3bsnbtanf from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3h3bsnbtanf from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3h3bsnbtanf from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6oizoa9gi2s from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6oizoa9gi2s from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6oizoa9gi2s from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3h3bsnbtanf.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3h3bsnbtanf.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3h3bsnbtanf.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6oizoa9gi2s.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6oizoa9gi2s.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6oizoa9gi2s.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
  version
14
- } from "./chunk-VKMYOVNS.js";
14
+ } from "./chunk-5M5YVBOE.js";
15
15
  import {
16
16
  createFileSystemCache,
17
17
  execa,
@@ -19,20 +19,30 @@ import {
19
19
  getProjectRoot,
20
20
  resolvePathInStorybookCache,
21
21
  up
22
- } from "./chunk-MWWAQ5S4.js";
22
+ } from "./chunk-M5BK3KV6.js";
23
+ import {
24
+ DATA_FETCHING_PACKAGES,
25
+ I18N_PACKAGES,
26
+ ROUTER_PACKAGES,
27
+ STATE_MANAGEMENT_PACKAGES,
28
+ STYLING_PACKAGES,
29
+ TEST_PACKAGES,
30
+ UI_LIBRARY_PACKAGES,
31
+ matchesPackagePattern
32
+ } from "./chunk-5IZBWBDT.js";
23
33
  import {
24
34
  globalSettings
25
- } from "./chunk-3Y5VHKPI.js";
35
+ } from "./chunk-B3ABITJT.js";
26
36
  import {
27
37
  resolvePackageDir
28
- } from "./chunk-OUDQWDHY.js";
38
+ } from "./chunk-MTJISVX7.js";
29
39
  import {
30
40
  slash
31
- } from "./chunk-73GYSTNZ.js";
41
+ } from "./chunk-GKB6BXCD.js";
32
42
  import {
33
43
  __commonJS,
34
44
  __toESM
35
- } from "./chunk-PZCWRKQE.js";
45
+ } from "./chunk-PZT42DUC.js";
36
46
 
37
47
  // ../../node_modules/fetch-retry/index.js
38
48
  var require_fetch_retry = __commonJS({
@@ -278,6 +288,106 @@ function getHasRouterPackage(packageJson) {
278
288
  );
279
289
  }
280
290
 
291
+ // src/telemetry/get-known-packages.ts
292
+ import semver from "semver";
293
+
294
+ // src/telemetry/package-json.ts
295
+ import { fileURLToPath, pathToFileURL } from "node:url";
296
+ var getActualPackageVersions = async (packages) => {
297
+ let packageNames = Object.keys(packages);
298
+ return Promise.all(packageNames.map(getActualPackageVersion));
299
+ }, getActualPackageVersion = async (packageName) => {
300
+ try {
301
+ let packageJson = await getActualPackageJson(packageName);
302
+ return {
303
+ name: packageJson?.name || packageName,
304
+ version: packageJson?.version || null
305
+ };
306
+ } catch {
307
+ return {
308
+ name: packageName,
309
+ version: null
310
+ };
311
+ }
312
+ }, getActualPackageJson = async (packageName) => {
313
+ try {
314
+ let resolvedPackageJsonPath = up({
315
+ cwd: fileURLToPath(import.meta.resolve(packageName, process.cwd()))
316
+ });
317
+ resolvedPackageJsonPath || (resolvedPackageJsonPath = import.meta.resolve(`${packageName}/package.json`, process.cwd()));
318
+ let { default: packageJson } = await import(pathToFileURL(resolvedPackageJsonPath).href, {
319
+ with: { type: "json" }
320
+ });
321
+ return packageJson;
322
+ } catch {
323
+ return;
324
+ }
325
+ };
326
+
327
+ // src/telemetry/get-known-packages.ts
328
+ function getSafeVersionSpecifier(version2) {
329
+ if (!version2)
330
+ return null;
331
+ if (version2 === "*")
332
+ return "latest";
333
+ if (version2.includes(":"))
334
+ return "custom-protocol";
335
+ if ([
336
+ "latest",
337
+ "next",
338
+ "canary",
339
+ "beta",
340
+ "alpha",
341
+ "rc",
342
+ "nightly",
343
+ "dev",
344
+ "stable",
345
+ "experimental",
346
+ "insiders",
347
+ "preview"
348
+ ].includes(version2))
349
+ return version2;
350
+ try {
351
+ let operator = version2.trim().match(/^[~^]/)?.[0] ?? "", coerced = semver.coerce(version2);
352
+ return coerced ? `${operator}${coerced.version}` : null;
353
+ } catch {
354
+ return "could-not-be-parsed-by-semver";
355
+ }
356
+ }
357
+ async function analyzeEcosystemPackages(packageJson) {
358
+ let allDependencies = {
359
+ ...packageJson?.dependencies,
360
+ ...packageJson?.devDependencies,
361
+ ...packageJson?.peerDependencies
362
+ }, depNames = Object.keys(allDependencies), pickMatches = (packages) => depNames.filter((dep) => matchesPackagePattern(dep, packages)), pickDepsObject = (packages) => {
363
+ let result = Object.fromEntries(
364
+ pickMatches(packages).map((dep) => {
365
+ let rawVersion = allDependencies[dep], version2 = getSafeVersionSpecifier(rawVersion);
366
+ return [dep, version2];
367
+ })
368
+ );
369
+ return Object.keys(result).length === 0 ? null : result;
370
+ }, testPackagesResult = Object.fromEntries(
371
+ await Promise.all(
372
+ depNames.filter((dep) => matchesPackagePattern(dep, TEST_PACKAGES)).map(async (dep) => {
373
+ let resolved = (await getActualPackageVersion(dep))?.version ?? allDependencies[dep], version2 = getSafeVersionSpecifier(resolved);
374
+ return [dep, version2];
375
+ })
376
+ )
377
+ ), testPackages = Object.keys(testPackagesResult).length === 0 ? null : testPackagesResult, stylingPackages = pickDepsObject(STYLING_PACKAGES), stateManagementPackages = pickDepsObject(STATE_MANAGEMENT_PACKAGES), dataFetchingPackages = pickDepsObject(DATA_FETCHING_PACKAGES), uiLibraryPackages = pickDepsObject(UI_LIBRARY_PACKAGES), i18nPackages = pickDepsObject(I18N_PACKAGES), routerPackages2 = pickDepsObject(ROUTER_PACKAGES);
378
+ return {
379
+ ...testPackages && { testPackages },
380
+ ...stylingPackages && { stylingPackages },
381
+ ...stateManagementPackages && {
382
+ stateManagementPackages
383
+ },
384
+ ...dataFetchingPackages && { dataFetchingPackages },
385
+ ...uiLibraryPackages && { uiLibraryPackages },
386
+ ...i18nPackages && { i18nPackages },
387
+ ...routerPackages2 && { routerPackages: routerPackages2 }
388
+ };
389
+ }
390
+
281
391
  // src/telemetry/get-monorepo-type.ts
282
392
  import { existsSync, readFileSync } from "node:fs";
283
393
  import { join } from "node:path";
@@ -578,39 +688,6 @@ var getPortableStoriesFileCountUncached = async (path3) => {
578
688
  async () => getPortableStoriesFileCountUncached(path3)
579
689
  );
580
690
 
581
- // src/telemetry/package-json.ts
582
- import { fileURLToPath, pathToFileURL } from "node:url";
583
- var getActualPackageVersions = async (packages) => {
584
- let packageNames = Object.keys(packages);
585
- return Promise.all(packageNames.map(getActualPackageVersion));
586
- }, getActualPackageVersion = async (packageName) => {
587
- try {
588
- let packageJson = await getActualPackageJson(packageName);
589
- return {
590
- name: packageJson?.name || packageName,
591
- version: packageJson?.version || null
592
- };
593
- } catch {
594
- return {
595
- name: packageName,
596
- version: null
597
- };
598
- }
599
- }, getActualPackageJson = async (packageName) => {
600
- try {
601
- let resolvedPackageJsonPath = up({
602
- cwd: fileURLToPath(import.meta.resolve(packageName, process.cwd()))
603
- });
604
- resolvedPackageJsonPath || (resolvedPackageJsonPath = import.meta.resolve(`${packageName}/package.json`, process.cwd()));
605
- let { default: packageJson } = await import(pathToFileURL(resolvedPackageJsonPath).href, {
606
- with: { type: "json" }
607
- });
608
- return packageJson;
609
- } catch {
610
- return;
611
- }
612
- };
613
-
614
691
  // src/telemetry/storybook-metadata.ts
615
692
  var metaFrameworks = {
616
693
  next: "Next",
@@ -650,33 +727,7 @@ var metaFrameworks = {
650
727
  version: version2 || "unknown"
651
728
  };
652
729
  }
653
- let testPackages = [
654
- "playwright",
655
- "vitest",
656
- "jest",
657
- "cypress",
658
- "nightwatch",
659
- "webdriver",
660
- "@web/test-runner",
661
- "puppeteer",
662
- "karma",
663
- "jasmine",
664
- "chai",
665
- "testing-library",
666
- "@ngneat/spectator",
667
- "wdio",
668
- "msw",
669
- "miragejs",
670
- "sinon",
671
- "chromatic"
672
- ], testPackageDeps = Object.keys(allDependencies).filter(
673
- (dep) => testPackages.find((pkg) => dep.includes(pkg))
674
- );
675
- metadata.testPackages = Object.fromEntries(
676
- await Promise.all(
677
- testPackageDeps.map(async (dep) => [dep, (await getActualPackageVersion(dep))?.version])
678
- )
679
- ), metadata.hasRouterPackage = getHasRouterPackage(packageJson);
730
+ metadata.knownPackages = await analyzeEcosystemPackages(packageJson), metadata.hasRouterPackage = getHasRouterPackage(packageJson);
680
731
  let monorepoType = getMonorepoType();
681
732
  monorepoType && (metadata.monorepo = monorepoType), metadata.packageManager = await getPackageManagerInfo();
682
733
  let language = allDependencies.typescript ? "typescript" : "javascript";
@@ -738,7 +789,8 @@ var metaFrameworks = {
738
789
  language,
739
790
  storybookPackages,
740
791
  addons,
741
- hasStorybookEslint
792
+ hasStorybookEslint,
793
+ packageJsonType: packageJson.type ?? "unknown"
742
794
  };
743
795
  };
744
796
  async function getPackageJsonDetails() {
@@ -0,0 +1,23 @@
1
+ import CJS_COMPAT_NODE_URL_6oizoa9gi2s from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6oizoa9gi2s from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6oizoa9gi2s from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_6oizoa9gi2s.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6oizoa9gi2s.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6oizoa9gi2s.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ any
14
+ } from "./chunk-E4NS75V2.js";
15
+
16
+ // src/cli/detect.ts
17
+ async function detectPnp() {
18
+ return !!any([".pnp.js", ".pnp.cjs"]);
19
+ }
20
+
21
+ export {
22
+ detectPnp
23
+ };