storybook 10.2.0-alpha.1 → 10.2.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/{Color-TNPFN3FC.js → Color-XESOIGZP.js} +9 -568
- package/dist/_browser-chunks/{WithTooltip-IO6J4KBT.js → WithTooltip-65CFNBJE.js} +70 -70
- package/dist/_browser-chunks/{chunk-45UGUKRX.js → chunk-242VQQM5.js} +1 -1
- package/dist/_browser-chunks/{chunk-JP7NCOJX.js → chunk-3LY4VQVK.js} +1 -1
- package/dist/_browser-chunks/{chunk-VYJQ7RU5.js → chunk-G4M6MXF4.js} +31 -27
- package/dist/_browser-chunks/{chunk-BRX2HXH7.js → chunk-IH6QJILI.js} +1 -1
- package/dist/_browser-chunks/{chunk-AS2HQEYC.js → chunk-IWQGIXJS.js} +1 -1
- package/dist/_browser-chunks/{chunk-3IAH5M2U.js → chunk-IYCKG66Y.js} +5 -5
- package/dist/_browser-chunks/{chunk-UD6FQLAF.js → chunk-JK6U3MQW.js} +3 -3
- package/dist/_browser-chunks/{chunk-FQ7SLVLR.js → chunk-JVRDBUUP.js} +20 -1
- package/dist/_browser-chunks/{chunk-GFLS4VP3.js → chunk-LCHBOIHN.js} +6 -6
- package/dist/_browser-chunks/{chunk-CHUV5WSW.js → chunk-LE2LTDW3.js} +1 -1
- package/dist/_browser-chunks/{chunk-IPA5A322.js → chunk-MEXTPDJG.js} +1 -1
- package/dist/_browser-chunks/{chunk-XJNX76GA.js → chunk-NQJGOFZV.js} +4 -4
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/{chunk-2XZMBGTA.js → chunk-POMIZRJL.js} +3 -3
- package/dist/_browser-chunks/{chunk-RP5RXKFU.js → chunk-Q5RYDXT3.js} +38 -30
- package/dist/_browser-chunks/{chunk-SS2NHR7W.js → chunk-RBABWY22.js} +18 -18
- package/dist/_browser-chunks/{chunk-AXG2BOBL.js → chunk-S6TK43XQ.js} +10 -10
- package/dist/_browser-chunks/{chunk-AIOS4NGK.js → chunk-SWJP5COI.js} +11 -11
- package/dist/_browser-chunks/{chunk-H6XK3RSC.js → chunk-UAYGIC3L.js} +6 -6
- package/dist/_browser-chunks/{chunk-YKE5S47A.js → chunk-V2VKKSMQ.js} +18 -18
- package/dist/_browser-chunks/{chunk-GFY5R5EY.js → chunk-V5NV5R37.js} +1 -1
- package/dist/_browser-chunks/chunk-VIJ7SQRO.js +568 -0
- package/dist/_browser-chunks/{chunk-3OXGAGBE.js → chunk-XLJZ7AOP.js} +14 -14
- package/dist/_browser-chunks/{chunk-P4F4UVXX.js → chunk-YKABRMAI.js} +15 -15
- package/dist/_browser-chunks/{chunk-WJYERY3R.js → chunk-ZCFV7BZB.js} +2 -2
- package/dist/_browser-chunks/{formatter-QJ4M4OGQ.js → formatter-EIJCOSYU.js} +2 -2
- package/dist/_browser-chunks/{syntaxhighlighter-IQDEPFLK.js → syntaxhighlighter-ED5Y7EFY.js} +119 -119
- package/dist/_node-chunks/{builder-manager-LXL5N6M5.js → builder-manager-MNAUTRWW.js} +23 -22
- package/dist/_node-chunks/camelcase-6H4Z5R35.js +62 -0
- package/dist/_node-chunks/chunk-2CGMTALY.js +61 -0
- package/dist/_node-chunks/{chunk-ZI2RAI3I.js → chunk-2DZGIXSN.js} +26 -7
- package/dist/_node-chunks/{chunk-4BQMSZKI.js → chunk-5L22ATN3.js} +165 -191
- package/dist/_node-chunks/{chunk-77APSTTM.js → chunk-7FH4U6XC.js} +8 -9
- package/dist/_node-chunks/chunk-CMQYFTBQ.js +126 -0
- package/dist/_node-chunks/{chunk-GOOBGRAV.js → chunk-F3OHO2BC.js} +34 -24
- package/dist/_node-chunks/{chunk-5NWCBUGD.js → chunk-FWVZUHZX.js} +6 -6
- package/dist/_node-chunks/{chunk-KXDU466E.js → chunk-GRH5JFTX.js} +31 -31
- package/dist/_node-chunks/{chunk-CLNMK7MP.js → chunk-HXFHXVEW.js} +5434 -1625
- package/dist/_node-chunks/{chunk-VFTNRF5X.js → chunk-KAIK7772.js} +17 -17
- package/dist/_node-chunks/{chunk-FTR6MHOX.js → chunk-KU4SWNDM.js} +59 -147
- package/dist/_node-chunks/chunk-KX7OAVXY.js +18 -0
- package/dist/_node-chunks/{chunk-TP6ICLTL.js → chunk-L22DGLKT.js} +6 -6
- package/dist/_node-chunks/{chunk-5GNBLJKS.js → chunk-MAMDH2R3.js} +8 -8
- package/dist/_node-chunks/{chunk-PGFQADZC.js → chunk-MAQAZSXK.js} +7 -7
- package/dist/_node-chunks/{chunk-JYMZJCZ7.js → chunk-O7O53MP7.js} +62 -124
- package/dist/_node-chunks/chunk-P663SP7U.js +20 -0
- package/dist/_node-chunks/chunk-RI4IBKXZ.js +23 -0
- package/dist/_node-chunks/{chunk-SR5ZYD7K.js → chunk-RJY225Z5.js} +8 -8
- package/dist/_node-chunks/{chunk-KMTK5W6O.js → chunk-TFY6QV57.js} +48 -26
- package/dist/_node-chunks/{chunk-ET4VMMZG.js → chunk-TOMGRF4A.js} +77 -16
- package/dist/_node-chunks/{chunk-R3WYNAT5.js → chunk-UNUWAUGG.js} +6 -6
- package/dist/_node-chunks/{chunk-LEDV47V2.js → chunk-UOHDPKIW.js} +15 -15
- package/dist/_node-chunks/{chunk-AJUO2ZU3.js → chunk-URWJMVZI.js} +9 -9
- package/dist/_node-chunks/{chunk-TX77W2KY.js → chunk-UYMZAYR4.js} +597 -593
- package/dist/_node-chunks/{chunk-F7377GT2.js → chunk-WHIAK7AH.js} +111 -38
- package/dist/_node-chunks/{chunk-GYZQMMTN.js → chunk-WQ4WQYSZ.js} +9 -9
- package/dist/_node-chunks/{dist-HGQ5R6JU.js → dist-ZOBQQCBA.js} +10 -10
- package/dist/_node-chunks/{globby-5XJTXKUJ.js → globby-WNZSV3ZO.js} +155 -164
- package/dist/_node-chunks/{lib-XNLTS2RI.js → lib-YUWKNDR2.js} +16 -16
- package/dist/_node-chunks/{mdx-N42X6CFJ-7WF3QWVO.js → mdx-N42X6CFJ-K5BCUPEA.js} +11 -11
- package/dist/_node-chunks/{p-limit-RBKYTJKF.js → p-limit-ROJSQI7F.js} +19 -15
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +40 -34
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +14 -11
- package/dist/channels/index.js +3 -3
- package/dist/cli/index.d.ts +1330 -250
- package/dist/cli/index.js +18 -18
- package/dist/common/index.d.ts +1344 -289
- package/dist/common/index.js +22 -22
- package/dist/components/index.d.ts +9 -2
- package/dist/components/index.js +339 -317
- package/dist/core-events/index.d.ts +4 -2
- package/dist/core-events/index.js +4 -2
- package/dist/core-server/index.d.ts +71 -2
- package/dist/core-server/index.js +3381 -3529
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +93 -65
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +86 -118
- package/dist/csf/index.d.ts +41 -11
- package/dist/csf/index.js +46 -39
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +5 -5
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +9402 -7204
- package/dist/manager/runtime.js +195 -153
- package/dist/manager-api/index.js +34 -26
- package/dist/manager-errors.d.ts +24 -0
- package/dist/manager-errors.js +2 -2
- package/dist/mocking-utils/index.js +14 -14
- package/dist/node-logger/index.d.ts +1456 -111
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +4608 -2436
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/preview-api/index.js +12 -12
- package/dist/preview-errors.d.ts +24 -0
- package/dist/preview-errors.js +3 -3
- package/dist/router/index.js +11 -11
- package/dist/server-errors.d.ts +59 -3
- package/dist/server-errors.js +22 -11
- package/dist/telemetry/index.d.ts +10 -3
- package/dist/telemetry/index.js +27 -25
- package/dist/test/index.js +3237 -1653
- package/dist/theming/create.js +3 -3
- package/dist/theming/index.d.ts +5 -5
- package/dist/theming/index.js +38 -38
- package/dist/types/index.d.ts +12 -6
- package/dist/viewport/index.d.ts +3 -3
- package/package.json +27 -33
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +0 -18
- package/dist/_browser-chunks/chunk-QKODTO7K.js +0 -7
- package/dist/_node-chunks/camelcase-64II7H4U.js +0 -37
- package/dist/_node-chunks/chunk-4EZYJUAC.js +0 -70
- package/dist/_node-chunks/chunk-COQ27OZ3.js +0 -61
- package/dist/_node-chunks/chunk-MC2R4DSD.js +0 -20
- package/dist/_node-chunks/chunk-NEENMS4J.js +0 -18
- package/dist/_node-chunks/chunk-VR5LMO3F.js +0 -72
- package/dist/_node-chunks/chunk-XEPVDCRL.js +0 -23
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_2297kyafub.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// ../node_modules/empathic/resolve.mjs
|
|
14
|
-
import { createRequire } from "node:module";
|
|
15
|
-
import { isAbsolute, join, resolve } from "node:path";
|
|
16
|
-
import { fileURLToPath } from "node:url";
|
|
17
|
-
function absolute(input, root) {
|
|
18
|
-
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
19
|
-
}
|
|
20
|
-
function from(root, ident, silent) {
|
|
21
|
-
try {
|
|
22
|
-
let r = root instanceof URL || root.startsWith("file://") ? join(fileURLToPath(root), "noop.js") : join(absolute(root), "noop.js");
|
|
23
|
-
return createRequire(r).resolve(ident);
|
|
24
|
-
} catch (err) {
|
|
25
|
-
if (!silent) throw err;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// ../node_modules/empathic/walk.mjs
|
|
30
|
-
import { dirname } from "node:path";
|
|
31
|
-
function up(base, options) {
|
|
32
|
-
let { last, cwd } = options || {}, tmp = absolute(base, cwd), root = absolute(last || "/", cwd), prev, arr = [];
|
|
33
|
-
for (; prev !== root && (arr.push(tmp), tmp = dirname(prev = tmp), tmp !== prev); )
|
|
34
|
-
;
|
|
35
|
-
return arr;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// ../node_modules/empathic/find.mjs
|
|
39
|
-
import { join as join2 } from "node:path";
|
|
40
|
-
import { existsSync, statSync } from "node:fs";
|
|
41
|
-
function up2(name, options) {
|
|
42
|
-
let dir, tmp, start = options && options.cwd || "";
|
|
43
|
-
for (dir of up(start, options))
|
|
44
|
-
if (tmp = join2(dir, name), existsSync(tmp)) return tmp;
|
|
45
|
-
}
|
|
46
|
-
function any(names, options) {
|
|
47
|
-
let dir, start = options && options.cwd || "", j = 0, len = names.length, tmp;
|
|
48
|
-
for (dir of up(start, options))
|
|
49
|
-
for (j = 0; j < len; j++)
|
|
50
|
-
if (tmp = join2(dir, names[j]), existsSync(tmp)) return tmp;
|
|
51
|
-
}
|
|
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
|
-
|
|
64
|
-
export {
|
|
65
|
-
from,
|
|
66
|
-
up,
|
|
67
|
-
up2,
|
|
68
|
-
any,
|
|
69
|
-
invariant
|
|
70
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_2297kyafub.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.2.0-alpha.1",
|
|
16
|
-
"@storybook/addon-docs": "10.2.0-alpha.1",
|
|
17
|
-
"@storybook/addon-links": "10.2.0-alpha.1",
|
|
18
|
-
"@storybook/addon-onboarding": "10.2.0-alpha.1",
|
|
19
|
-
"storybook-addon-pseudo-states": "10.2.0-alpha.1",
|
|
20
|
-
"@storybook/addon-themes": "10.2.0-alpha.1",
|
|
21
|
-
"@storybook/addon-vitest": "10.2.0-alpha.1",
|
|
22
|
-
"@storybook/builder-vite": "10.2.0-alpha.1",
|
|
23
|
-
"@storybook/builder-webpack5": "10.2.0-alpha.1",
|
|
24
|
-
storybook: "10.2.0-alpha.1",
|
|
25
|
-
"@storybook/angular": "10.2.0-alpha.1",
|
|
26
|
-
"@storybook/ember": "10.2.0-alpha.1",
|
|
27
|
-
"@storybook/html-vite": "10.2.0-alpha.1",
|
|
28
|
-
"@storybook/nextjs": "10.2.0-alpha.1",
|
|
29
|
-
"@storybook/nextjs-vite": "10.2.0-alpha.1",
|
|
30
|
-
"@storybook/preact-vite": "10.2.0-alpha.1",
|
|
31
|
-
"@storybook/react-native-web-vite": "10.2.0-alpha.1",
|
|
32
|
-
"@storybook/react-vite": "10.2.0-alpha.1",
|
|
33
|
-
"@storybook/react-webpack5": "10.2.0-alpha.1",
|
|
34
|
-
"@storybook/server-webpack5": "10.2.0-alpha.1",
|
|
35
|
-
"@storybook/svelte-vite": "10.2.0-alpha.1",
|
|
36
|
-
"@storybook/sveltekit": "10.2.0-alpha.1",
|
|
37
|
-
"@storybook/vue3-vite": "10.2.0-alpha.1",
|
|
38
|
-
"@storybook/web-components-vite": "10.2.0-alpha.1",
|
|
39
|
-
sb: "10.2.0-alpha.1",
|
|
40
|
-
"@storybook/cli": "10.2.0-alpha.1",
|
|
41
|
-
"@storybook/codemod": "10.2.0-alpha.1",
|
|
42
|
-
"@storybook/core-webpack": "10.2.0-alpha.1",
|
|
43
|
-
"create-storybook": "10.2.0-alpha.1",
|
|
44
|
-
"@storybook/csf-plugin": "10.2.0-alpha.1",
|
|
45
|
-
"eslint-plugin-storybook": "10.2.0-alpha.1",
|
|
46
|
-
"@storybook/react-dom-shim": "10.2.0-alpha.1",
|
|
47
|
-
"@storybook/preset-create-react-app": "10.2.0-alpha.1",
|
|
48
|
-
"@storybook/preset-react-webpack": "10.2.0-alpha.1",
|
|
49
|
-
"@storybook/preset-server-webpack": "10.2.0-alpha.1",
|
|
50
|
-
"@storybook/html": "10.2.0-alpha.1",
|
|
51
|
-
"@storybook/preact": "10.2.0-alpha.1",
|
|
52
|
-
"@storybook/react": "10.2.0-alpha.1",
|
|
53
|
-
"@storybook/server": "10.2.0-alpha.1",
|
|
54
|
-
"@storybook/svelte": "10.2.0-alpha.1",
|
|
55
|
-
"@storybook/vue3": "10.2.0-alpha.1",
|
|
56
|
-
"@storybook/web-components": "10.2.0-alpha.1"
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
versions_default
|
|
61
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_2297kyafub.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// ../node_modules/slash/index.js
|
|
14
|
-
function slash(path) {
|
|
15
|
-
return path.startsWith("\\\\?\\") ? path : path.replace(/\\/g, "/");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
slash
|
|
20
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_2297kyafub.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.2.0-alpha.1";
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
version
|
|
18
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_2297kyafub.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/telemetry/event-cache.ts
|
|
14
|
-
import { cache } from "storybook/internal/common";
|
|
15
|
-
var operation = Promise.resolve(), setHelper = async (eventType, body) => {
|
|
16
|
-
let lastEvents = await cache.get("lastEvents") || {};
|
|
17
|
-
lastEvents[eventType] = { body, timestamp: Date.now() }, await cache.set("lastEvents", lastEvents);
|
|
18
|
-
}, set = async (eventType, body) => (await operation, operation = setHelper(eventType, body), operation);
|
|
19
|
-
var getLastEvents = async () => await cache.get("lastEvents") || {}, upgradeFields = (event) => {
|
|
20
|
-
let { body, timestamp } = event;
|
|
21
|
-
return {
|
|
22
|
-
timestamp,
|
|
23
|
-
eventType: body?.eventType,
|
|
24
|
-
eventId: body?.eventId,
|
|
25
|
-
sessionId: body?.sessionId
|
|
26
|
-
};
|
|
27
|
-
}, UPGRADE_EVENTS = ["init", "upgrade"], RUN_EVENTS = ["build", "dev", "error"], lastEvent = (lastEvents, eventTypes) => {
|
|
28
|
-
let descendingEvents = eventTypes.map((eventType) => lastEvents?.[eventType]).filter(Boolean).sort((a, b) => b.timestamp - a.timestamp);
|
|
29
|
-
return descendingEvents.length > 0 ? descendingEvents[0] : void 0;
|
|
30
|
-
}, getPrecedingUpgrade = async (events = void 0) => {
|
|
31
|
-
let lastEvents = events || await cache.get("lastEvents") || {}, lastUpgradeEvent = lastEvent(lastEvents, UPGRADE_EVENTS), lastRunEvent = lastEvent(lastEvents, RUN_EVENTS);
|
|
32
|
-
if (lastUpgradeEvent)
|
|
33
|
-
return !lastRunEvent?.timestamp || lastUpgradeEvent.timestamp > lastRunEvent.timestamp ? upgradeFields(lastUpgradeEvent) : void 0;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// ../node_modules/nanoid/index.js
|
|
37
|
-
import { randomFillSync } from "crypto";
|
|
38
|
-
|
|
39
|
-
// ../node_modules/nanoid/url-alphabet/index.js
|
|
40
|
-
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
41
|
-
|
|
42
|
-
// ../node_modules/nanoid/index.js
|
|
43
|
-
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, fillPool = (bytes) => {
|
|
44
|
-
!pool || pool.length < bytes ? (pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER), randomFillSync(pool), poolOffset = 0) : poolOffset + bytes > pool.length && (randomFillSync(pool), poolOffset = 0), poolOffset += bytes;
|
|
45
|
-
};
|
|
46
|
-
var nanoid = (size = 21) => {
|
|
47
|
-
fillPool(size -= 0);
|
|
48
|
-
let id = "";
|
|
49
|
-
for (let i = poolOffset - size; i < poolOffset; i++)
|
|
50
|
-
id += urlAlphabet[pool[i] & 63];
|
|
51
|
-
return id;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// src/telemetry/session-id.ts
|
|
55
|
-
import { cache as cache2 } from "storybook/internal/common";
|
|
56
|
-
var SESSION_TIMEOUT = 1e3 * 60 * 60 * 2, sessionId;
|
|
57
|
-
var getSessionId = async () => {
|
|
58
|
-
let now = Date.now();
|
|
59
|
-
if (!sessionId) {
|
|
60
|
-
let session = await cache2.get("session");
|
|
61
|
-
session && session.lastUsed >= now - SESSION_TIMEOUT ? sessionId = session.id : sessionId = nanoid();
|
|
62
|
-
}
|
|
63
|
-
return await cache2.set("session", { id: sessionId, lastUsed: now }), sessionId;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export {
|
|
67
|
-
nanoid,
|
|
68
|
-
set,
|
|
69
|
-
getLastEvents,
|
|
70
|
-
getPrecedingUpgrade,
|
|
71
|
-
getSessionId
|
|
72
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_2297kyafub.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-4EZYJUAC.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
|
-
};
|