storybook 10.2.0-alpha.6 → 10.2.0-alpha.8
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-UXVP56J6.js → chunk-POMIZRJL.js} +1 -1
- package/dist/_browser-chunks/{chunk-KTOLYKZY.js → chunk-VUZYLZ4B.js} +6 -6
- package/dist/_node-chunks/{builder-manager-SRWOH6O7.js → builder-manager-2XASU3VS.js} +12 -12
- package/dist/_node-chunks/{camelcase-IPCCDY4U.js → camelcase-KIWRHB2G.js} +7 -7
- package/dist/_node-chunks/chunk-2ANLCK4Y.js +18 -0
- package/dist/_node-chunks/{chunk-T53OKK5L.js → chunk-2KSITKBI.js} +7 -7
- package/dist/_node-chunks/{chunk-RMPSZ2MA.js → chunk-2OC7H5MZ.js} +7 -7
- package/dist/_node-chunks/{chunk-5UF6URLY.js → chunk-3K6P75SS.js} +7 -7
- package/dist/_node-chunks/{chunk-YH2VABDS.js → chunk-3TW66YXG.js} +6 -6
- package/dist/_node-chunks/{chunk-QNHQNNV2.js → chunk-5BRYY6XB.js} +9 -9
- package/dist/_node-chunks/{chunk-IFCVXOGP.js → chunk-5GRHJJHD.js} +9 -9
- package/dist/_node-chunks/{chunk-62HH4XOF.js → chunk-5WQXPM6D.js} +6 -6
- package/dist/_node-chunks/{chunk-ZFBKUCCD.js → chunk-6TJUL42C.js} +14 -14
- package/dist/_node-chunks/{chunk-PI4OGMRN.js → chunk-7B4JYHGV.js} +6 -6
- package/dist/_node-chunks/{chunk-YSCJXVR2.js → chunk-COGO4JMD.js} +7 -7
- package/dist/_node-chunks/{chunk-5U7Q4G4A.js → chunk-DTM4A3DJ.js} +76 -19
- package/dist/_node-chunks/{chunk-VUL47RCU.js → chunk-DYQ6QR45.js} +15 -15
- package/dist/_node-chunks/{chunk-J4ASSZ5N.js → chunk-IJ34563N.js} +32 -32
- package/dist/_node-chunks/{chunk-HQCIQ33W.js → chunk-JWL5NLJU.js} +6 -6
- package/dist/_node-chunks/{chunk-GJU4KX6X.js → chunk-LEZENLG7.js} +7 -7
- package/dist/_node-chunks/chunk-LOXLI4XT.js +20 -0
- package/dist/_node-chunks/{chunk-2BHMURQI.js → chunk-MLYPMYG5.js} +6 -6
- package/dist/_node-chunks/{chunk-TNAUD72T.js → chunk-Q6WPGVIW.js} +6 -6
- package/dist/_node-chunks/{chunk-XKPOBYPY.js → chunk-S7FIFCTX.js} +18 -18
- package/dist/_node-chunks/{chunk-AQ5XNGJR.js → chunk-TTGXODEY.js} +7 -7
- package/dist/_node-chunks/chunk-UFXCGC4W.js +23 -0
- package/dist/_node-chunks/{chunk-YIC767NR.js → chunk-UNHOAAXU.js} +7 -7
- package/dist/_node-chunks/{chunk-OKIXNWVU.js → chunk-VJFHZL2T.js} +8 -8
- package/dist/_node-chunks/{chunk-IBLK5VBI.js → chunk-WKC523P7.js} +7 -7
- package/dist/_node-chunks/chunk-X4YDIHYE.js +61 -0
- package/dist/_node-chunks/{chunk-JCHPJOPI.js → chunk-ZKB7MQRR.js} +8 -8
- package/dist/_node-chunks/{dist-JJEWCMVH.js → dist-GICI6ZHU.js} +9 -9
- package/dist/_node-chunks/{globby-VLMVNFI7.js → globby-FWMT4OOQ.js} +9 -9
- package/dist/_node-chunks/{lib-FXIHPQYY.js → lib-YCGXIMW5.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-MYO6PQF5.js → mdx-N42X6CFJ-CRGM5LTU.js} +8 -8
- package/dist/_node-chunks/{p-limit-OTUUNSPQ.js → p-limit-UJIYI4QT.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/core-server/index.js +259 -633
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +27 -29
- package/dist/csf/index.d.ts +41 -11
- package/dist/csf/index.js +8 -4
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +6 -6
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.js +7 -7
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +7 -7
- package/dist/preview-api/index.js +1 -1
- package/dist/preview-errors.js +1 -1
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.d.ts +9 -2
- package/dist/telemetry/index.js +27 -25
- package/dist/viewport/index.d.ts +3 -3
- package/package.json +2 -2
- package/dist/_node-chunks/chunk-2WJTWJRY.js +0 -20
- package/dist/_node-chunks/chunk-3SDF3TBW.js +0 -18
- package/dist/_node-chunks/chunk-6COWUVY6.js +0 -23
- package/dist/_node-chunks/chunk-7YD5E5Y5.js +0 -72
- package/dist/_node-chunks/chunk-GE3TP4E7.js +0 -61
|
@@ -262,7 +262,7 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
262
262
|
name: "NextJsSharpError",
|
|
263
263
|
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
264
264
|
code: 1,
|
|
265
|
-
documentation: "https://storybook.js.org/docs/get-started/nextjs#
|
|
265
|
+
documentation: "https://storybook.js.org/docs/get-started/frameworks/nextjs#error-you-are-importing-avif-images-but-you-dont-have-sharp-installed-you-have-to-install-sharp-in-order-to-use-image-optimization-features-in-nextjs",
|
|
266
266
|
message: dedent`
|
|
267
267
|
You are importing avif images, but you don't have sharp installed.
|
|
268
268
|
|
|
@@ -616,20 +616,20 @@ var checkGlobals = (parameters) => {
|
|
|
616
616
|
parameters && (checkGlobals(parameters), checkStorySort(parameters));
|
|
617
617
|
};
|
|
618
618
|
function processCSFFile(moduleExports, importPath, title) {
|
|
619
|
-
let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports,
|
|
620
|
-
if (
|
|
621
|
-
let meta2 = normalizeComponentAnnotations(
|
|
619
|
+
let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports, factoryStory = Object.values(namedExports).find((it) => isStory(it));
|
|
620
|
+
if (factoryStory) {
|
|
621
|
+
let meta2 = normalizeComponentAnnotations(factoryStory.meta.input, title, importPath);
|
|
622
622
|
checkDisallowedParameters(meta2.parameters);
|
|
623
623
|
let csfFile2 = { meta: meta2, stories: {}, moduleExports };
|
|
624
624
|
return Object.keys(namedExports).forEach((key) => {
|
|
625
|
-
if (isExportStory(key, meta2)) {
|
|
625
|
+
if (isExportStory(key, meta2) && isStory(namedExports[key])) {
|
|
626
626
|
let story = namedExports[key], storyMeta = normalizeStory(key, story.input, meta2);
|
|
627
627
|
checkDisallowedParameters(storyMeta.parameters), csfFile2.stories[storyMeta.id] = storyMeta, getStoryChildren(story).forEach((child) => {
|
|
628
628
|
let name = child.input.name, childId = toTestId(storyMeta.id, name);
|
|
629
629
|
child.input.parameters ??= {}, child.input.parameters.__id = childId, csfFile2.stories[childId] = normalizeStory(name, child.input, meta2);
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
|
-
}), csfFile2.projectAnnotations =
|
|
632
|
+
}), csfFile2.projectAnnotations = factoryStory.meta.preview.composed, csfFile2;
|
|
633
633
|
}
|
|
634
634
|
let meta = normalizeComponentAnnotations(
|
|
635
635
|
defaultExport,
|
|
@@ -2680,7 +2680,7 @@ var VALIDATION_REGEXP = /^[a-zA-Z0-9 _-]*$/, NUMBER_REGEXP = /^-?[0-9]+(\.[0-9]+
|
|
|
2680
2680
|
return Object.entries((0, import_picoquery.parse)(parts.join(";"), QUERY_OPTIONS)).reduce((acc, [key, value]) => validateArgs(key, value) ? Object.assign(acc, { [key]: value }) : (once3.warn(dedent`
|
|
2681
2681
|
Omitted potentially unsafe URL args.
|
|
2682
2682
|
|
|
2683
|
-
More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
|
|
2683
|
+
More info: https://storybook.js.org/docs/writing-stories/args?ref=error#setting-args-through-the-url
|
|
2684
2684
|
`), acc), {});
|
|
2685
2685
|
};
|
|
2686
2686
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-
|
|
16
|
+
} from "./chunk-JWL5NLJU.js";
|
|
17
17
|
import {
|
|
18
18
|
require_build
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LEZENLG7.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveModulePath,
|
|
22
22
|
resolvePackageDir
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2OC7H5MZ.js";
|
|
24
24
|
import {
|
|
25
25
|
join,
|
|
26
26
|
parse
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7B4JYHGV.js";
|
|
28
28
|
import {
|
|
29
29
|
slash
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LOXLI4XT.js";
|
|
31
31
|
import {
|
|
32
32
|
__commonJS,
|
|
33
33
|
__require,
|
|
34
34
|
__toESM
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-5WQXPM6D.js";
|
|
36
36
|
|
|
37
37
|
// ../../node_modules/ejs/lib/utils.js
|
|
38
38
|
var require_utils = __commonJS({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-5WQXPM6D.js";
|
|
13
13
|
|
|
14
14
|
// ../../node_modules/camelcase/index.js
|
|
15
15
|
var UPPERCASE = /[\p{Lu}]/u, LOWERCASE = /[\p{Ll}]/u, LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu, IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u, SEPARATORS = /[_.\- ]+/, LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source), SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"), NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu"), preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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.8";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
version
|
|
18
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-5WQXPM6D.js";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/picocolors/picocolors.js
|
|
17
17
|
var require_picocolors = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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_teykolgptq.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
dirname,
|
|
14
14
|
join
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7B4JYHGV.js";
|
|
16
16
|
|
|
17
17
|
// ../../node_modules/exsolve/dist/index.mjs
|
|
18
18
|
import fs, { lstatSync, realpathSync, statSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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_teykolgptq.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__toESM
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5WQXPM6D.js";
|
|
16
16
|
|
|
17
17
|
// ../../node_modules/balanced-match/index.js
|
|
18
18
|
var require_balanced_match = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,15 +12,15 @@ var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
require_lib,
|
|
14
14
|
require_src
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-COGO4JMD.js";
|
|
16
16
|
import {
|
|
17
17
|
require_picocolors
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2KSITKBI.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__require,
|
|
22
22
|
__toESM
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5WQXPM6D.js";
|
|
24
24
|
|
|
25
25
|
// ../../node_modules/@babel/types/lib/utils/shallowEqual.js
|
|
26
26
|
var require_shallowEqual = __commonJS({
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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
|
invariant
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MLYPMYG5.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TTGXODEY.js";
|
|
18
18
|
import {
|
|
19
19
|
__export,
|
|
20
20
|
__toESM
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5WQXPM6D.js";
|
|
22
22
|
|
|
23
23
|
// src/cli/globalSettings.ts
|
|
24
24
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
any,
|
|
14
14
|
invariant,
|
|
15
15
|
up2 as up
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3TW66YXG.js";
|
|
17
17
|
import {
|
|
18
18
|
resolvePackageDir
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2OC7H5MZ.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TTGXODEY.js";
|
|
23
23
|
import {
|
|
24
24
|
babelParse,
|
|
25
25
|
recast,
|
|
26
26
|
traverse,
|
|
27
27
|
types
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-5BRYY6XB.js";
|
|
29
29
|
import {
|
|
30
30
|
require_picocolors
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2KSITKBI.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__require,
|
|
35
35
|
__toESM
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5WQXPM6D.js";
|
|
37
37
|
|
|
38
38
|
// ../../node_modules/esprima/dist/esprima.js
|
|
39
39
|
var require_esprima = __commonJS({
|
|
@@ -5594,7 +5594,7 @@ var ANGULAR_JSON_PATH = "angular.json", AngularJSON = class {
|
|
|
5594
5594
|
};
|
|
5595
5595
|
|
|
5596
5596
|
// src/cli/projectTypes.ts
|
|
5597
|
-
var ProjectType = /* @__PURE__ */ ((ProjectType2) => (ProjectType2.ANGULAR = "angular", ProjectType2.EMBER = "ember", ProjectType2.HTML = "html", ProjectType2.NEXTJS = "nextjs", ProjectType2.NUXT = "nuxt", ProjectType2.NX = "nx", ProjectType2.PREACT = "preact", ProjectType2.QWIK = "qwik", ProjectType2.REACT = "react", ProjectType2.REACT_NATIVE = "react_native", ProjectType2.REACT_NATIVE_AND_RNW = "react_native_and_rnw", ProjectType2.REACT_NATIVE_WEB = "react_native_web", ProjectType2.
|
|
5597
|
+
var ProjectType = /* @__PURE__ */ ((ProjectType2) => (ProjectType2.ANGULAR = "angular", ProjectType2.EMBER = "ember", ProjectType2.HTML = "html", ProjectType2.NEXTJS = "nextjs", ProjectType2.NUXT = "nuxt", ProjectType2.NX = "nx", ProjectType2.PREACT = "preact", ProjectType2.QWIK = "qwik", ProjectType2.REACT = "react", ProjectType2.REACT_NATIVE = "react_native", ProjectType2.REACT_NATIVE_AND_RNW = "react_native_and_rnw", ProjectType2.REACT_NATIVE_WEB = "react_native_web", ProjectType2.REACT_SCRIPTS = "react_scripts", ProjectType2.SERVER = "server", ProjectType2.SOLID = "solid", ProjectType2.SVELTE = "svelte", ProjectType2.SVELTEKIT = "sveltekit", ProjectType2.UNDETECTED = "undetected", ProjectType2.UNSUPPORTED = "unsupported", ProjectType2.VUE3 = "vue3", ProjectType2.WEB_COMPONENTS = "web_components", ProjectType2))(ProjectType || {});
|
|
5598
5598
|
|
|
5599
5599
|
// src/cli/eslintPlugin.ts
|
|
5600
5600
|
var import_comment_json = __toESM(require_src2(), 1);
|
|
@@ -5786,7 +5786,7 @@ async function configureEslintPlugin({
|
|
|
5786
5786
|
var suggestESLintPlugin = async () => await prompt2.confirm({
|
|
5787
5787
|
message: import_ts_dedent.dedent`
|
|
5788
5788
|
We have detected that you're using ESLint. Storybook provides a plugin that gives the best experience with Storybook and helps follow best practices: ${import_picocolors2.default.yellow(
|
|
5789
|
-
"https://storybook.js.org/docs/
|
|
5789
|
+
"https://storybook.js.org/docs/configure/integration/eslint-plugin"
|
|
5790
5790
|
)}
|
|
5791
5791
|
|
|
5792
5792
|
Would you like to install it?
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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_teykolgptq.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5WQXPM6D.js";
|
|
16
16
|
|
|
17
17
|
// ../../node_modules/ms/index.js
|
|
18
18
|
var require_ms = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-2ANLCK4Y.js";
|
|
15
15
|
import {
|
|
16
16
|
createFileSystemCache,
|
|
17
17
|
execa,
|
|
@@ -19,25 +19,20 @@ import {
|
|
|
19
19
|
getProjectRoot,
|
|
20
20
|
resolvePathInStorybookCache,
|
|
21
21
|
up
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
getSessionId,
|
|
25
|
-
nanoid,
|
|
26
|
-
set
|
|
27
|
-
} from "./chunk-7YD5E5Y5.js";
|
|
22
|
+
} from "./chunk-IJ34563N.js";
|
|
28
23
|
import {
|
|
29
24
|
globalSettings
|
|
30
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5GRHJJHD.js";
|
|
31
26
|
import {
|
|
32
27
|
resolvePackageDir
|
|
33
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2OC7H5MZ.js";
|
|
34
29
|
import {
|
|
35
30
|
slash
|
|
36
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-LOXLI4XT.js";
|
|
37
32
|
import {
|
|
38
33
|
__commonJS,
|
|
39
34
|
__toESM
|
|
40
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-5WQXPM6D.js";
|
|
41
36
|
|
|
42
37
|
// ../../node_modules/fetch-retry/index.js
|
|
43
38
|
var require_fetch_retry = __commonJS({
|
|
@@ -793,6 +788,24 @@ import * as os from "node:os";
|
|
|
793
788
|
import { join as join2 } from "node:path";
|
|
794
789
|
import { isCI as isCI2 } from "storybook/internal/common";
|
|
795
790
|
|
|
791
|
+
// ../../node_modules/nanoid/index.js
|
|
792
|
+
import { randomFillSync } from "crypto";
|
|
793
|
+
|
|
794
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
795
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
796
|
+
|
|
797
|
+
// ../../node_modules/nanoid/index.js
|
|
798
|
+
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, fillPool = (bytes) => {
|
|
799
|
+
!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;
|
|
800
|
+
};
|
|
801
|
+
var nanoid = (size = 21) => {
|
|
802
|
+
fillPool(size -= 0);
|
|
803
|
+
let id = "";
|
|
804
|
+
for (let i = poolOffset - size; i < poolOffset; i++)
|
|
805
|
+
id += urlAlphabet[pool[i] & 63];
|
|
806
|
+
return id;
|
|
807
|
+
};
|
|
808
|
+
|
|
796
809
|
// src/telemetry/anonymous-id.ts
|
|
797
810
|
import { relative } from "node:path";
|
|
798
811
|
import { getProjectRoot as getProjectRoot3 } from "storybook/internal/common";
|
|
@@ -827,9 +840,50 @@ var anonymousProjectId, getAnonymousProjectId = () => {
|
|
|
827
840
|
return anonymousProjectId;
|
|
828
841
|
};
|
|
829
842
|
|
|
843
|
+
// src/telemetry/event-cache.ts
|
|
844
|
+
import { cache as cache3 } from "storybook/internal/common";
|
|
845
|
+
var processingPromise = Promise.resolve(), setHelper = async (eventType, body) => {
|
|
846
|
+
let lastEvents = await cache3.get("lastEvents") || {};
|
|
847
|
+
lastEvents[eventType] = { body, timestamp: Date.now() }, await cache3.set("lastEvents", lastEvents);
|
|
848
|
+
}, set = (eventType, body) => {
|
|
849
|
+
let run = processingPromise.then(async () => {
|
|
850
|
+
await setHelper(eventType, body);
|
|
851
|
+
});
|
|
852
|
+
return processingPromise = run.catch(() => {
|
|
853
|
+
}), run;
|
|
854
|
+
};
|
|
855
|
+
var getLastEvents = async () => (await processingPromise, await cache3.get("lastEvents") || {}), upgradeFields = (event) => {
|
|
856
|
+
let { body, timestamp } = event;
|
|
857
|
+
return {
|
|
858
|
+
timestamp,
|
|
859
|
+
eventType: body?.eventType,
|
|
860
|
+
eventId: body?.eventId,
|
|
861
|
+
sessionId: body?.sessionId
|
|
862
|
+
};
|
|
863
|
+
}, UPGRADE_EVENTS = ["init", "upgrade"], RUN_EVENTS = ["build", "dev", "error"], lastEvent = (lastEvents, eventTypes) => {
|
|
864
|
+
let descendingEvents = eventTypes.map((eventType) => lastEvents?.[eventType]).filter((event) => !!event).sort((a, b) => b.timestamp - a.timestamp);
|
|
865
|
+
return descendingEvents.length > 0 ? descendingEvents[0] : void 0;
|
|
866
|
+
}, getPrecedingUpgrade = async (events = void 0) => {
|
|
867
|
+
let lastEvents = events || await cache3.get("lastEvents") || {}, lastUpgradeEvent = lastEvent(lastEvents, UPGRADE_EVENTS), lastRunEvent = lastEvent(lastEvents, RUN_EVENTS);
|
|
868
|
+
if (lastUpgradeEvent)
|
|
869
|
+
return !lastRunEvent?.timestamp || lastUpgradeEvent.timestamp > lastRunEvent.timestamp ? upgradeFields(lastUpgradeEvent) : void 0;
|
|
870
|
+
};
|
|
871
|
+
|
|
830
872
|
// src/telemetry/fetch.ts
|
|
831
873
|
var fetch = global.fetch;
|
|
832
874
|
|
|
875
|
+
// src/telemetry/session-id.ts
|
|
876
|
+
import { cache as cache4 } from "storybook/internal/common";
|
|
877
|
+
var SESSION_TIMEOUT = 1e3 * 60 * 60 * 2, sessionId;
|
|
878
|
+
var getSessionId = async () => {
|
|
879
|
+
let now = Date.now();
|
|
880
|
+
if (!sessionId) {
|
|
881
|
+
let session = await cache4.get("session");
|
|
882
|
+
session && session.lastUsed >= now - SESSION_TIMEOUT ? sessionId = session.id : sessionId = nanoid();
|
|
883
|
+
}
|
|
884
|
+
return await cache4.set("session", { id: sessionId, lastUsed: now }), sessionId;
|
|
885
|
+
};
|
|
886
|
+
|
|
833
887
|
// src/telemetry/telemetry.ts
|
|
834
888
|
var retryingFetch = (0, import_fetch_retry.default)(fetch), URL = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", tasks = [], addToGlobalContext = (key, value) => {
|
|
835
889
|
globalContext[key] = value;
|
|
@@ -847,7 +901,7 @@ var retryingFetch = (0, import_fetch_retry.default)(fetch), URL = process.env.ST
|
|
|
847
901
|
nodeVersion: process.versions.node,
|
|
848
902
|
storybookVersion: getVersionNumber()
|
|
849
903
|
}, prepareRequest = async (data, context, options) => {
|
|
850
|
-
let { eventType, payload, metadata, ...rest } = data,
|
|
904
|
+
let { eventType, payload, metadata, ...rest } = data, sessionId2 = await getSessionId(), eventId = nanoid(), body = { ...rest, eventType, eventId, sessionId: sessionId2, metadata, payload, context };
|
|
851
905
|
return retryingFetch(URL, {
|
|
852
906
|
method: "post",
|
|
853
907
|
body: JSON.stringify(body),
|
|
@@ -871,7 +925,7 @@ async function sendTelemetry(data, options = { retryDelay: 1e3, immediate: !1 })
|
|
|
871
925
|
}, request;
|
|
872
926
|
try {
|
|
873
927
|
request = prepareRequest(data, context, options), tasks.push(request);
|
|
874
|
-
let
|
|
928
|
+
let sessionId2 = await getSessionId(), eventId = nanoid(), body = { ...rest, eventType, eventId, sessionId: sessionId2, metadata, payload, context }, waitFor = options.immediate ? tasks : [request];
|
|
875
929
|
await Promise.all([...waitFor, set(eventType, body)]);
|
|
876
930
|
} catch {
|
|
877
931
|
} finally {
|
|
@@ -921,6 +975,9 @@ export {
|
|
|
921
975
|
computeStorybookMetadata,
|
|
922
976
|
getStorybookMetadata,
|
|
923
977
|
oneWayHash,
|
|
978
|
+
getLastEvents,
|
|
979
|
+
getPrecedingUpgrade,
|
|
980
|
+
getSessionId,
|
|
924
981
|
addToGlobalContext,
|
|
925
982
|
ErrorCollector,
|
|
926
983
|
isExampleStoryId,
|