storybook 10.1.0-alpha.13 → 10.1.0-alpha.14
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/{chunk-WXP2XJ3O.js → chunk-P4F4UVXX.js} +1 -0
- package/dist/_browser-chunks/{chunk-BE2DAXKJ.js → chunk-SS2NHR7W.js} +4 -1
- package/dist/_browser-chunks/{syntaxhighlighter-WKBQ5RC7.js → syntaxhighlighter-IQDEPFLK.js} +1 -1
- package/dist/_node-chunks/{builder-manager-DWDUVXZM.js → builder-manager-FQ5J6V3U.js} +17 -12
- package/dist/_node-chunks/{camelcase-EETCRTJX.js → camelcase-VGUYV77Z.js} +7 -7
- package/dist/_node-chunks/{chunk-FCVNHU2F.js → chunk-2JR3QBT2.js} +7 -7
- package/dist/_node-chunks/chunk-3EBH66BB.js +23 -0
- package/dist/_node-chunks/{chunk-447655DM.js → chunk-4ZFHN3ZY.js} +6 -6
- package/dist/_node-chunks/{chunk-RUUNVQ6W.js → chunk-63PL4NNE.js} +9 -9
- package/dist/_node-chunks/{chunk-OVVZIUHS.js → chunk-A4KENTXT.js} +7 -7
- package/dist/_node-chunks/{chunk-XKRVQL2G.js → chunk-ALIA3J6S.js} +44 -10
- package/dist/_node-chunks/{chunk-4EJUC2SD.js → chunk-C2HKH2XQ.js} +31 -48
- package/dist/_node-chunks/{chunk-LPKSBF62.js → chunk-DQNBAQYT.js} +6 -6
- package/dist/_node-chunks/{chunk-MIA5324I.js → chunk-F74UHHR6.js} +7 -7
- package/dist/_node-chunks/{chunk-B76FDKVB.js → chunk-H5XWXVWR.js} +6 -6
- package/dist/_node-chunks/{chunk-WC2YEQHJ.js → chunk-JMP7YFX2.js} +6 -6
- package/dist/_node-chunks/{chunk-DPFYWXEA.js → chunk-JZR4DHG2.js} +19 -7
- package/dist/_node-chunks/{chunk-DIPKXLEP.js → chunk-KEA7CVMZ.js} +80 -13
- package/dist/_node-chunks/{chunk-CMYD2JNN.js → chunk-KF3WTAEP.js} +7 -7
- package/dist/_node-chunks/{chunk-URLNGLC2.js → chunk-LPPM7L5D.js} +10 -10
- package/dist/_node-chunks/{chunk-7IAVT2FU.js → chunk-MJUDR7HQ.js} +7 -7
- package/dist/_node-chunks/chunk-NPB4THZQ.js +18 -0
- package/dist/_node-chunks/chunk-NZBK3DSJ.js +29 -0
- package/dist/_node-chunks/{chunk-7KFHRNOT.js → chunk-Q2QUNQK6.js} +7 -7
- package/dist/_node-chunks/{chunk-CLUBH2LP.js → chunk-TMCKISJR.js} +65 -101
- package/dist/_node-chunks/chunk-TWK7AR3U.js +6024 -0
- package/dist/_node-chunks/{chunk-2W4GZCLE.js → chunk-V7CXWJXC.js} +7 -7
- package/dist/_node-chunks/{chunk-B7PGKETD.js → chunk-W4F3T6CY.js} +8 -8
- package/dist/_node-chunks/{chunk-Z2OWEMX3.js → chunk-WACDSFMO.js} +9 -9
- package/dist/_node-chunks/{chunk-MJM4TEMP.js → chunk-WVXZFQQU.js} +7 -7
- package/dist/_node-chunks/{chunk-LYEZOJ43.js → chunk-XBPE4PT7.js} +6 -6
- package/dist/_node-chunks/chunk-YMM6BYF2.js +61 -0
- package/dist/_node-chunks/{chunk-AZIPBEBK.js → chunk-ZGZKNZ5S.js} +6 -6
- package/dist/_node-chunks/{dist-22CLJ4BC.js → dist-DR3AP3RJ.js} +9 -9
- package/dist/_node-chunks/{globby-GR24TGSK.js → globby-D4FPSHY2.js} +9 -9
- package/dist/_node-chunks/{lib-G2LGVRPC.js → lib-ZEFOVNTK.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-W6P6IDDW.js → mdx-N42X6CFJ-PJF3ICCG.js} +8 -8
- package/dist/_node-chunks/{p-limit-K4FZHG2F.js → p-limit-CYQOFYPV.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -11
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.d.ts +788 -1
- package/dist/cli/index.js +42 -5999
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.js +22 -21
- package/dist/components/index.d.ts +136 -26
- package/dist/components/index.js +3163 -2859
- package/dist/core-server/index.js +51 -108
- package/dist/core-server/presets/common-manager.js +5 -5
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +266 -35
- package/dist/csf/index.js +2 -2
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +21553 -21158
- package/dist/manager/manager-stores.d.ts +1 -0
- package/dist/manager/manager-stores.js +23 -0
- package/dist/manager/runtime.js +6694 -719
- package/dist/manager-api/index.d.ts +1803 -2
- package/dist/manager-api/index.js +102 -8
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +4 -1
- package/dist/preview-api/index.js +2 -2
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +23 -23
- package/package.json +5 -1
- package/dist/_node-chunks/chunk-4ZJOH2UN.js +0 -61
- package/dist/_node-chunks/chunk-654SJIMS.js +0 -23
- package/dist/_node-chunks/chunk-JQ7RQS5Q.js +0 -26
- package/dist/_node-chunks/chunk-LEL5OSY3.js +0 -18
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -50,9 +50,21 @@ function any(names, options) {
|
|
|
50
50
|
if (tmp = join2(dir, names[j]), existsSync(tmp)) return tmp;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
54
|
+
var isProduction = process.env.NODE_ENV === "production", prefix = "Invariant failed";
|
|
55
|
+
function invariant(condition, message) {
|
|
56
|
+
if (!condition) {
|
|
57
|
+
if (isProduction)
|
|
58
|
+
throw new Error(prefix);
|
|
59
|
+
var provided = typeof message == "function" ? message() : message, value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
60
|
+
throw new Error(value);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
export {
|
|
54
65
|
from,
|
|
55
66
|
up,
|
|
56
67
|
up2,
|
|
57
|
-
any
|
|
68
|
+
any,
|
|
69
|
+
invariant
|
|
58
70
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_build
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-V7CXWJXC.js";
|
|
15
15
|
import {
|
|
16
16
|
StorybookError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XBPE4PT7.js";
|
|
18
18
|
import {
|
|
19
19
|
resolvePackageDir
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WVXZFQQU.js";
|
|
21
21
|
import {
|
|
22
22
|
relative
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DQNBAQYT.js";
|
|
24
24
|
import {
|
|
25
25
|
require_dist
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KF3WTAEP.js";
|
|
27
27
|
import {
|
|
28
28
|
require_picocolors
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-A4KENTXT.js";
|
|
30
30
|
import {
|
|
31
31
|
__toESM
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JMP7YFX2.js";
|
|
33
33
|
|
|
34
34
|
// src/core-server/utils/server-statics.ts
|
|
35
35
|
import { existsSync, statSync } from "node:fs";
|
|
@@ -221,10 +221,77 @@ async function withTelemetry(eventType, options, run) {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
// ../node_modules/es-toolkit/dist/function/debounce.mjs
|
|
225
|
+
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
226
|
+
let pendingThis, pendingArgs = null, leading = edges != null && edges.includes("leading"), trailing = edges == null || edges.includes("trailing"), invoke = () => {
|
|
227
|
+
pendingArgs !== null && (func.apply(pendingThis, pendingArgs), pendingThis = void 0, pendingArgs = null);
|
|
228
|
+
}, onTimerEnd = () => {
|
|
229
|
+
trailing && invoke(), cancel();
|
|
230
|
+
}, timeoutId = null, schedule = () => {
|
|
231
|
+
timeoutId != null && clearTimeout(timeoutId), timeoutId = setTimeout(() => {
|
|
232
|
+
timeoutId = null, onTimerEnd();
|
|
233
|
+
}, debounceMs);
|
|
234
|
+
}, cancelTimer = () => {
|
|
235
|
+
timeoutId !== null && (clearTimeout(timeoutId), timeoutId = null);
|
|
236
|
+
}, cancel = () => {
|
|
237
|
+
cancelTimer(), pendingThis = void 0, pendingArgs = null;
|
|
238
|
+
}, flush = () => {
|
|
239
|
+
invoke();
|
|
240
|
+
}, debounced = function(...args) {
|
|
241
|
+
if (signal?.aborted)
|
|
242
|
+
return;
|
|
243
|
+
pendingThis = this, pendingArgs = args;
|
|
244
|
+
let isFirstCall = timeoutId == null;
|
|
245
|
+
schedule(), leading && isFirstCall && invoke();
|
|
246
|
+
};
|
|
247
|
+
return debounced.schedule = schedule, debounced.cancel = cancel, debounced.flush = flush, signal?.addEventListener("abort", cancel, { once: !0 }), debounced;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// ../node_modules/es-toolkit/dist/function/throttle.mjs
|
|
251
|
+
function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] } = {}) {
|
|
252
|
+
let pendingAt = null, debounced = debounce(func, throttleMs, { signal, edges }), throttled = function(...args) {
|
|
253
|
+
pendingAt == null ? pendingAt = Date.now() : Date.now() - pendingAt >= throttleMs && (pendingAt = Date.now(), debounced.cancel()), debounced.apply(this, args);
|
|
254
|
+
};
|
|
255
|
+
return throttled.cancel = debounced.cancel, throttled.flush = debounced.flush, throttled;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// ../node_modules/es-toolkit/dist/function/partial.mjs
|
|
259
|
+
function partial(func, ...partialArgs) {
|
|
260
|
+
return partialImpl(func, placeholderSymbol, ...partialArgs);
|
|
261
|
+
}
|
|
262
|
+
function partialImpl(func, placeholder, ...partialArgs) {
|
|
263
|
+
let partialed = function(...providedArgs) {
|
|
264
|
+
let providedArgsIndex = 0, substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg), remainingArgs = providedArgs.slice(providedArgsIndex);
|
|
265
|
+
return func.apply(this, substitutedArgs.concat(remainingArgs));
|
|
266
|
+
};
|
|
267
|
+
return func.prototype && (partialed.prototype = Object.create(func.prototype)), partialed;
|
|
268
|
+
}
|
|
269
|
+
var placeholderSymbol = Symbol("partial.placeholder");
|
|
270
|
+
partial.placeholder = placeholderSymbol;
|
|
271
|
+
|
|
272
|
+
// ../node_modules/es-toolkit/dist/function/partialRight.mjs
|
|
273
|
+
function partialRight(func, ...partialArgs) {
|
|
274
|
+
return partialRightImpl(func, placeholderSymbol2, ...partialArgs);
|
|
275
|
+
}
|
|
276
|
+
function partialRightImpl(func, placeholder, ...partialArgs) {
|
|
277
|
+
let partialedRight = function(...providedArgs) {
|
|
278
|
+
let placeholderLength = partialArgs.filter((arg) => arg === placeholder).length, rangeLength = Math.max(providedArgs.length - placeholderLength, 0), remainingArgs = providedArgs.slice(0, rangeLength), providedArgsIndex = rangeLength, substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
|
|
279
|
+
return func.apply(this, remainingArgs.concat(substitutedArgs));
|
|
280
|
+
};
|
|
281
|
+
return func.prototype && (partialedRight.prototype = Object.create(func.prototype)), partialedRight;
|
|
282
|
+
}
|
|
283
|
+
var placeholderSymbol2 = Symbol("partialRight.placeholder");
|
|
284
|
+
partialRight.placeholder = placeholderSymbol2;
|
|
285
|
+
|
|
286
|
+
// ../node_modules/es-toolkit/dist/function/retry.mjs
|
|
287
|
+
var DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
|
|
288
|
+
|
|
224
289
|
export {
|
|
225
290
|
useStatics,
|
|
226
291
|
parseStaticDir,
|
|
227
292
|
mapStaticDir,
|
|
293
|
+
debounce,
|
|
294
|
+
throttle,
|
|
228
295
|
getErrorLevel,
|
|
229
296
|
sendTelemetryError,
|
|
230
297
|
isTelemetryEnabled,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.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
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JMP7YFX2.js";
|
|
15
15
|
|
|
16
16
|
// ../node_modules/ts-dedent/dist/index.js
|
|
17
17
|
var require_dist = __commonJS({
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.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
|
StorybookError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XBPE4PT7.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KF3WTAEP.js";
|
|
18
18
|
import {
|
|
19
19
|
require_picocolors
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-A4KENTXT.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JMP7YFX2.js";
|
|
24
24
|
|
|
25
25
|
// src/server-errors.ts
|
|
26
26
|
var import_picocolors = __toESM(require_picocolors(), 1), import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_h0pwn2pcb57.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JMP7YFX2.js";
|
|
16
16
|
|
|
17
17
|
// ../node_modules/picomatch/lib/constants.js
|
|
18
18
|
var require_constants = __commonJS({
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// package.json
|
|
14
|
+
var version = "10.1.0-alpha.14";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
version
|
|
18
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/common/utils/utils.ts
|
|
14
|
+
var groupBy = (items, keySelector) => items.reduce(
|
|
15
|
+
(acc, item, index) => {
|
|
16
|
+
let key = keySelector(item, index);
|
|
17
|
+
return acc[key] ??= [], acc[key].push(item), acc;
|
|
18
|
+
},
|
|
19
|
+
{}
|
|
20
|
+
);
|
|
21
|
+
function invariant(condition, message) {
|
|
22
|
+
if (!condition)
|
|
23
|
+
throw new Error((typeof message == "function" ? message() : message) ?? "Invariant failed");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
groupBy,
|
|
28
|
+
invariant
|
|
29
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JMP7YFX2.js";
|
|
15
15
|
|
|
16
16
|
// ../node_modules/@storybook/docs-mdx/dist/chunk-H6DQNFQR.js
|
|
17
17
|
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __require2 = ((x) => typeof __require < "u" ? __require : typeof Proxy < "u" ? new Proxy(x, {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.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-
|
|
14
|
+
} from "./chunk-NPB4THZQ.js";
|
|
15
15
|
import {
|
|
16
16
|
createFileSystemCache,
|
|
17
17
|
execa,
|
|
@@ -19,28 +19,28 @@ import {
|
|
|
19
19
|
getProjectRoot,
|
|
20
20
|
resolvePathInStorybookCache,
|
|
21
21
|
up
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
globalSettings
|
|
25
|
-
} from "./chunk-XKRVQL2G.js";
|
|
22
|
+
} from "./chunk-C2HKH2XQ.js";
|
|
26
23
|
import {
|
|
27
24
|
getSessionId,
|
|
28
25
|
nanoid,
|
|
29
26
|
set
|
|
30
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-H5XWXVWR.js";
|
|
28
|
+
import {
|
|
29
|
+
globalSettings
|
|
30
|
+
} from "./chunk-ALIA3J6S.js";
|
|
31
31
|
import {
|
|
32
32
|
resolvePackageDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-WVXZFQQU.js";
|
|
34
34
|
import {
|
|
35
35
|
slash
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-4ZFHN3ZY.js";
|
|
37
37
|
import {
|
|
38
38
|
require_dist
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KF3WTAEP.js";
|
|
40
40
|
import {
|
|
41
41
|
__commonJS,
|
|
42
42
|
__toESM
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-JMP7YFX2.js";
|
|
44
44
|
|
|
45
45
|
// ../node_modules/fetch-retry/index.js
|
|
46
46
|
var require_fetch_retry = __commonJS({
|
|
@@ -135,13 +135,13 @@ import { logger as logger2 } from "storybook/internal/node-logger";
|
|
|
135
135
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
136
136
|
import { cache } from "storybook/internal/common";
|
|
137
137
|
import { logger } from "storybook/internal/node-logger";
|
|
138
|
-
var TELEMETRY_KEY_NOTIFY_DATE = "telemetry-notification-date", notify = async () => {
|
|
139
|
-
await cache.get(TELEMETRY_KEY_NOTIFY_DATE, null) || (cache.set(TELEMETRY_KEY_NOTIFY_DATE, Date.now()), logger.info(
|
|
138
|
+
var TELEMETRY_KEY_NOTIFY_DATE = "telemetry-notification-date", called = !1, notify = async () => {
|
|
139
|
+
called || (called = !0, await cache.get(TELEMETRY_KEY_NOTIFY_DATE, null) || (cache.set(TELEMETRY_KEY_NOTIFY_DATE, Date.now()), logger.info(
|
|
140
140
|
import_ts_dedent.dedent`
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
));
|
|
141
|
+
Attention: Storybook collects completely anonymous telemetry regarding usage. This information is used to shape Storybook's roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
|
|
142
|
+
https://storybook.js.org/telemetry
|
|
143
|
+
`
|
|
144
|
+
)));
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
// src/telemetry/sanitize.ts
|
|
@@ -185,7 +185,7 @@ import { readFile } from "node:fs/promises";
|
|
|
185
185
|
import { dirname } from "node:path";
|
|
186
186
|
import {
|
|
187
187
|
getStorybookConfiguration,
|
|
188
|
-
getStorybookInfo,
|
|
188
|
+
getStorybookInfo as getStorybookInfo2,
|
|
189
189
|
isCI,
|
|
190
190
|
loadMainConfig,
|
|
191
191
|
versions
|
|
@@ -243,86 +243,17 @@ function getChromaticVersionSpecifier(packageJson) {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
// src/telemetry/get-framework-info.ts
|
|
246
|
-
import {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
251
|
-
var getActualPackageVersions = async (packages) => {
|
|
252
|
-
let packageNames = Object.keys(packages);
|
|
253
|
-
return Promise.all(packageNames.map(getActualPackageVersion));
|
|
254
|
-
}, getActualPackageVersion = async (packageName) => {
|
|
255
|
-
try {
|
|
256
|
-
let packageJson = await getActualPackageJson(packageName);
|
|
257
|
-
return {
|
|
258
|
-
name: packageJson?.name || packageName,
|
|
259
|
-
version: packageJson?.version || null
|
|
260
|
-
};
|
|
261
|
-
} catch {
|
|
262
|
-
return {
|
|
263
|
-
name: packageName,
|
|
264
|
-
version: null
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}, getActualPackageJson = async (packageName) => {
|
|
268
|
-
try {
|
|
269
|
-
let resolvedPackageJsonPath = up({
|
|
270
|
-
cwd: fileURLToPath(import.meta.resolve(packageName, process.cwd()))
|
|
271
|
-
});
|
|
272
|
-
resolvedPackageJsonPath || (resolvedPackageJsonPath = import.meta.resolve(`${packageName}/package.json`, process.cwd()));
|
|
273
|
-
let { default: packageJson } = await import(pathToFileURL(resolvedPackageJsonPath).href, {
|
|
274
|
-
with: { type: "json" }
|
|
275
|
-
});
|
|
276
|
-
return packageJson;
|
|
277
|
-
} catch {
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
// src/telemetry/get-framework-info.ts
|
|
283
|
-
var knownRenderers = [
|
|
284
|
-
"html",
|
|
285
|
-
"react",
|
|
286
|
-
"svelte",
|
|
287
|
-
"vue3",
|
|
288
|
-
"preact",
|
|
289
|
-
"server",
|
|
290
|
-
"vue",
|
|
291
|
-
"web-components",
|
|
292
|
-
"angular",
|
|
293
|
-
"ember"
|
|
294
|
-
], knownBuilders = ["builder-webpack5", "builder-vite"];
|
|
295
|
-
function findMatchingPackage(packageJson, suffixes) {
|
|
296
|
-
let { name = "", version: version2, dependencies, devDependencies, peerDependencies } = packageJson, allDependencies = {
|
|
297
|
-
// We include the framework itself because it may be a renderer too (e.g. angular)
|
|
298
|
-
[name]: version2,
|
|
299
|
-
...dependencies,
|
|
300
|
-
...devDependencies,
|
|
301
|
-
...peerDependencies
|
|
302
|
-
};
|
|
303
|
-
return suffixes.map((suffix) => `@storybook/${suffix}`).find((pkg) => allDependencies[pkg]);
|
|
304
|
-
}
|
|
305
|
-
var getFrameworkPackageName = (packageNameOrPath) => {
|
|
306
|
-
let normalizedPath = normalize(packageNameOrPath).replace(new RegExp(/\\/, "g"), "/");
|
|
307
|
-
return Object.keys(frameworkPackages).find((pkg) => normalizedPath.endsWith(pkg)) || cleanPaths(packageNameOrPath).replace(/.*node_modules[\\/]/, "");
|
|
308
|
-
};
|
|
309
|
-
async function getFrameworkInfo(mainConfig) {
|
|
310
|
-
if (!mainConfig?.framework)
|
|
311
|
-
return {};
|
|
312
|
-
let rawName = typeof mainConfig.framework == "string" ? mainConfig.framework : mainConfig.framework?.name;
|
|
313
|
-
if (!rawName)
|
|
314
|
-
return {};
|
|
315
|
-
let frameworkPackageJson = await getActualPackageJson(rawName);
|
|
316
|
-
if (!frameworkPackageJson)
|
|
317
|
-
return {};
|
|
318
|
-
let builder = findMatchingPackage(frameworkPackageJson, knownBuilders), renderer = findMatchingPackage(frameworkPackageJson, knownRenderers), sanitizedFrameworkName = getFrameworkPackageName(rawName), frameworkOptions = typeof mainConfig.framework == "object" ? mainConfig.framework.options : {};
|
|
246
|
+
import { getStorybookInfo } from "storybook/internal/common";
|
|
247
|
+
var cleanAndSanitizePath = (path3) => cleanPaths(path3).replace(/.*node_modules[\\/]/, "");
|
|
248
|
+
async function getFrameworkInfo(mainConfig, configDir) {
|
|
249
|
+
let { frameworkPackage, rendererPackage, builderPackage } = await getStorybookInfo(configDir), frameworkOptions = typeof mainConfig.framework == "object" ? mainConfig.framework.options : {};
|
|
319
250
|
return {
|
|
320
251
|
framework: {
|
|
321
|
-
name:
|
|
252
|
+
name: frameworkPackage ? cleanAndSanitizePath(frameworkPackage) : void 0,
|
|
322
253
|
options: frameworkOptions
|
|
323
254
|
},
|
|
324
|
-
builder,
|
|
325
|
-
renderer
|
|
255
|
+
builder: builderPackage ? cleanAndSanitizePath(builderPackage) : void 0,
|
|
256
|
+
renderer: rendererPackage ? cleanAndSanitizePath(rendererPackage) : void 0
|
|
326
257
|
};
|
|
327
258
|
}
|
|
328
259
|
|
|
@@ -656,6 +587,39 @@ var getPortableStoriesFileCountUncached = async (path3) => {
|
|
|
656
587
|
async () => getPortableStoriesFileCountUncached(path3)
|
|
657
588
|
);
|
|
658
589
|
|
|
590
|
+
// src/telemetry/package-json.ts
|
|
591
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
592
|
+
var getActualPackageVersions = async (packages) => {
|
|
593
|
+
let packageNames = Object.keys(packages);
|
|
594
|
+
return Promise.all(packageNames.map(getActualPackageVersion));
|
|
595
|
+
}, getActualPackageVersion = async (packageName) => {
|
|
596
|
+
try {
|
|
597
|
+
let packageJson = await getActualPackageJson(packageName);
|
|
598
|
+
return {
|
|
599
|
+
name: packageJson?.name || packageName,
|
|
600
|
+
version: packageJson?.version || null
|
|
601
|
+
};
|
|
602
|
+
} catch {
|
|
603
|
+
return {
|
|
604
|
+
name: packageName,
|
|
605
|
+
version: null
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
}, getActualPackageJson = async (packageName) => {
|
|
609
|
+
try {
|
|
610
|
+
let resolvedPackageJsonPath = up({
|
|
611
|
+
cwd: fileURLToPath(import.meta.resolve(packageName, process.cwd()))
|
|
612
|
+
});
|
|
613
|
+
resolvedPackageJsonPath || (resolvedPackageJsonPath = import.meta.resolve(`${packageName}/package.json`, process.cwd()));
|
|
614
|
+
let { default: packageJson } = await import(pathToFileURL(resolvedPackageJsonPath).href, {
|
|
615
|
+
with: { type: "json" }
|
|
616
|
+
});
|
|
617
|
+
return packageJson;
|
|
618
|
+
} catch {
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
|
|
659
623
|
// src/telemetry/storybook-metadata.ts
|
|
660
624
|
var metaFrameworks = {
|
|
661
625
|
next: "Next",
|
|
@@ -732,7 +696,7 @@ var metaFrameworks = {
|
|
|
732
696
|
language
|
|
733
697
|
};
|
|
734
698
|
metadata.hasCustomBabel = !!mainConfig.babel, metadata.hasCustomWebpack = !!mainConfig.webpackFinal, metadata.hasStaticDirs = !!mainConfig.staticDirs, typeof mainConfig.typescript == "object" && (metadata.typescriptOptions = mainConfig.typescript);
|
|
735
|
-
let frameworkInfo = await getFrameworkInfo(mainConfig);
|
|
699
|
+
let frameworkInfo = await getFrameworkInfo(mainConfig, configDir);
|
|
736
700
|
typeof mainConfig.refs == "object" && (metadata.refCount = Object.keys(mainConfig.refs).length), typeof mainConfig.features == "object" && (metadata.features = mainConfig.features);
|
|
737
701
|
let addons = {};
|
|
738
702
|
mainConfig.addons && mainConfig.addons.forEach((addon) => {
|
|
@@ -763,7 +727,7 @@ var metaFrameworks = {
|
|
|
763
727
|
version: version2
|
|
764
728
|
}, storybookPackages[name].version = version2 || void 0;
|
|
765
729
|
});
|
|
766
|
-
let hasStorybookEslint = !!allDependencies["eslint-plugin-storybook"], storybookInfo = await
|
|
730
|
+
let hasStorybookEslint = !!allDependencies["eslint-plugin-storybook"], storybookInfo = await getStorybookInfo2(configDir);
|
|
767
731
|
try {
|
|
768
732
|
let { previewConfigPath: previewConfig } = storybookInfo;
|
|
769
733
|
if (previewConfig) {
|