storybook 10.2.0-alpha.7 → 10.2.0-alpha.9

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 (60) hide show
  1. package/dist/_browser-chunks/{chunk-EUPBEOK3.js → chunk-VUZYLZ4B.js} +5 -5
  2. package/dist/_node-chunks/{builder-manager-CUNI3ZJ4.js → builder-manager-FTCODGJP.js} +12 -12
  3. package/dist/_node-chunks/{camelcase-4GVAWYWU.js → camelcase-5XDKQT3J.js} +7 -7
  4. package/dist/_node-chunks/{chunk-VCZD6QSG.js → chunk-33XC4R6P.js} +9 -9
  5. package/dist/_node-chunks/{chunk-P445LZJB.js → chunk-3DPKKQ6P.js} +6 -6
  6. package/dist/_node-chunks/{chunk-PGJHGLNH.js → chunk-3Y5VHKPI.js} +9 -9
  7. package/dist/_node-chunks/{chunk-ZNQQBZIL.js → chunk-6ABJZZWS.js} +7 -7
  8. package/dist/_node-chunks/{chunk-RCTV2GMQ.js → chunk-6SH5SI6S.js} +7 -7
  9. package/dist/_node-chunks/{chunk-TBPJCWU7.js → chunk-73GYSTNZ.js} +6 -6
  10. package/dist/_node-chunks/{chunk-PYUJOHPH.js → chunk-BQX766MA.js} +13 -13
  11. package/dist/_node-chunks/{chunk-FVVGYCVC.js → chunk-CO7N5AG7.js} +7 -7
  12. package/dist/_node-chunks/{chunk-PQM4RHC4.js → chunk-D4TCQXIF.js} +7 -7
  13. package/dist/_node-chunks/{chunk-JVSFH4RF.js → chunk-FGI35IGB.js} +12 -12
  14. package/dist/_node-chunks/chunk-GXQRT5M6.js +61 -0
  15. package/dist/_node-chunks/{chunk-BUUY73HB.js → chunk-IIBBQZLT.js} +6 -6
  16. package/dist/_node-chunks/{chunk-Y6L7H22H.js → chunk-LB74XOLW.js} +6 -6
  17. package/dist/_node-chunks/{chunk-56LVYN72.js → chunk-LRBEW57O.js} +7 -7
  18. package/dist/_node-chunks/{chunk-M5E3YC4T.js → chunk-MOQRBTWA.js} +6 -6
  19. package/dist/_node-chunks/{chunk-R3N2GWVX.js → chunk-MWWAQ5S4.js} +20 -20
  20. package/dist/_node-chunks/{chunk-Y53XRTM4.js → chunk-NYUFS6LX.js} +10 -10
  21. package/dist/_node-chunks/{chunk-2TPGTNH3.js → chunk-OUDQWDHY.js} +7 -7
  22. package/dist/_node-chunks/chunk-PRNP2HO6.js +23 -0
  23. package/dist/_node-chunks/{chunk-YPUOZX6Y.js → chunk-PZCWRKQE.js} +6 -6
  24. package/dist/_node-chunks/{chunk-LPSISNQS.js → chunk-RF3L36MK.js} +12 -12
  25. package/dist/_node-chunks/{chunk-NYGO6SRI.js → chunk-SBPB3VWI.js} +6 -6
  26. package/dist/_node-chunks/{chunk-BVT57OPU.js → chunk-SPOUBCPJ.js} +8 -8
  27. package/dist/_node-chunks/chunk-VKMYOVNS.js +18 -0
  28. package/dist/_node-chunks/{chunk-VRAZAZEV.js → chunk-WTQGSYRO.js} +7 -7
  29. package/dist/_node-chunks/{chunk-DF3MHTVA.js → chunk-XZ6V3G6J.js} +8 -9
  30. package/dist/_node-chunks/{chunk-QJ6C6Y4J.js → chunk-YN6FEZAF.js} +7 -7
  31. package/dist/_node-chunks/{dist-5DA7I4HZ.js → dist-YRSVYE5A.js} +9 -9
  32. package/dist/_node-chunks/{globby-UXUG5UXW.js → globby-AXGFF6I5.js} +9 -9
  33. package/dist/_node-chunks/{lib-JGWMRG56.js → lib-ESB7KQ6D.js} +7 -7
  34. package/dist/_node-chunks/{mdx-N42X6CFJ-SS3BBRSA.js → mdx-N42X6CFJ-XXQ6YIDF.js} +8 -8
  35. package/dist/_node-chunks/{p-limit-QEWD3I7K.js → p-limit-P6ND7SUA.js} +7 -7
  36. package/dist/babel/index.js +10 -10
  37. package/dist/bin/core.js +12 -12
  38. package/dist/bin/dispatcher.js +11 -11
  39. package/dist/bin/loader.js +9 -9
  40. package/dist/cli/index.js +18 -18
  41. package/dist/common/index.js +22 -22
  42. package/dist/core-server/index.d.ts +3 -1
  43. package/dist/core-server/index.js +3001 -3007
  44. package/dist/core-server/presets/common-override-preset.js +9 -9
  45. package/dist/core-server/presets/common-preset.js +42 -26
  46. package/dist/csf/index.js +8 -4
  47. package/dist/csf-tools/index.js +9 -9
  48. package/dist/manager/globals-runtime.js +1 -1
  49. package/dist/manager-api/index.js +1 -1
  50. package/dist/mocking-utils/index.js +8 -8
  51. package/dist/node-logger/index.js +9 -9
  52. package/dist/preview/runtime.js +5 -5
  53. package/dist/preview-api/index.js +1 -1
  54. package/dist/server-errors.js +11 -11
  55. package/dist/telemetry/index.js +22 -22
  56. package/dist/types/index.d.ts +3 -2
  57. package/package.json +1 -1
  58. package/dist/_node-chunks/chunk-AT23E4EQ.js +0 -61
  59. package/dist/_node-chunks/chunk-LZSDDOT4.js +0 -23
  60. package/dist/_node-chunks/chunk-TTG4OTIQ.js +0 -18
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  glob
14
- } from "../../_node-chunks/chunk-VRAZAZEV.js";
14
+ } from "../../_node-chunks/chunk-WTQGSYRO.js";
15
15
  import {
16
16
  slash
17
- } from "../../_node-chunks/chunk-TBPJCWU7.js";
18
- import "../../_node-chunks/chunk-YPUOZX6Y.js";
17
+ } from "../../_node-chunks/chunk-73GYSTNZ.js";
18
+ import "../../_node-chunks/chunk-PZCWRKQE.js";
19
19
 
20
20
  // src/core-server/utils/remove-mdx-entries.ts
21
21
  import { isAbsolute, join, relative } from "node:path";
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "../../_node-chunks/chunk-JVSFH4RF.js";
12
+ import "../../_node-chunks/chunk-FGI35IGB.js";
13
13
  import {
14
14
  AbortError,
15
15
  after,
@@ -32,41 +32,41 @@ import {
32
32
  sendTelemetryError,
33
33
  throttle,
34
34
  unary
35
- } from "../../_node-chunks/chunk-PYUJOHPH.js";
36
- import "../../_node-chunks/chunk-RCTV2GMQ.js";
37
- import "../../_node-chunks/chunk-LZSDDOT4.js";
38
- import "../../_node-chunks/chunk-BUUY73HB.js";
35
+ } from "../../_node-chunks/chunk-BQX766MA.js";
36
+ import "../../_node-chunks/chunk-PRNP2HO6.js";
37
+ import "../../_node-chunks/chunk-6SH5SI6S.js";
38
+ import "../../_node-chunks/chunk-IIBBQZLT.js";
39
39
  import {
40
40
  globalSettings
41
- } from "../../_node-chunks/chunk-PGJHGLNH.js";
41
+ } from "../../_node-chunks/chunk-3Y5VHKPI.js";
42
42
  import {
43
43
  invariant
44
- } from "../../_node-chunks/chunk-M5E3YC4T.js";
44
+ } from "../../_node-chunks/chunk-MOQRBTWA.js";
45
+ import "../../_node-chunks/chunk-3DPKKQ6P.js";
45
46
  import {
46
47
  resolvePackageDir
47
- } from "../../_node-chunks/chunk-2TPGTNH3.js";
48
- import "../../_node-chunks/chunk-P445LZJB.js";
48
+ } from "../../_node-chunks/chunk-OUDQWDHY.js";
49
49
  import {
50
50
  isAbsolute,
51
51
  join
52
- } from "../../_node-chunks/chunk-Y6L7H22H.js";
52
+ } from "../../_node-chunks/chunk-LB74XOLW.js";
53
53
  import {
54
54
  loadConfig
55
- } from "../../_node-chunks/chunk-DF3MHTVA.js";
55
+ } from "../../_node-chunks/chunk-XZ6V3G6J.js";
56
56
  import {
57
57
  require_dist
58
- } from "../../_node-chunks/chunk-56LVYN72.js";
59
- import "../../_node-chunks/chunk-VCZD6QSG.js";
60
- import "../../_node-chunks/chunk-PQM4RHC4.js";
58
+ } from "../../_node-chunks/chunk-LRBEW57O.js";
59
+ import "../../_node-chunks/chunk-33XC4R6P.js";
60
+ import "../../_node-chunks/chunk-D4TCQXIF.js";
61
61
  import {
62
62
  require_picocolors
63
- } from "../../_node-chunks/chunk-ZNQQBZIL.js";
63
+ } from "../../_node-chunks/chunk-6ABJZZWS.js";
64
64
  import {
65
65
  __commonJS,
66
66
  __export,
67
67
  __require,
68
68
  __toESM
69
- } from "../../_node-chunks/chunk-YPUOZX6Y.js";
69
+ } from "../../_node-chunks/chunk-PZCWRKQE.js";
70
70
 
71
71
  // ../../node_modules/shell-quote/quote.js
72
72
  var require_quote = __commonJS({
@@ -492,7 +492,7 @@ var require_launch_editor = __commonJS({
492
492
  // src/core-server/presets/common-preset.ts
493
493
  import { existsSync as existsSync3 } from "node:fs";
494
494
  import { readFile as readFile3 } from "node:fs/promises";
495
- import { optionalEnvToBoolean } from "storybook/internal/common";
495
+ import { normalizeStories, optionalEnvToBoolean } from "storybook/internal/common";
496
496
  import {
497
497
  JsPackageManagerFactory,
498
498
  getDirectoryFromWorkingDir,
@@ -501,6 +501,7 @@ import {
501
501
  loadEnvs,
502
502
  removeAddon as removeAddonBase
503
503
  } from "storybook/internal/common";
504
+ import { StoryIndexGenerator } from "storybook/internal/core-server";
504
505
  import { readCsf as readCsf2 } from "storybook/internal/csf-tools";
505
506
  import { logger as logger4 } from "storybook/internal/node-logger";
506
507
  import { telemetry as telemetry8 } from "storybook/internal/telemetry";
@@ -533,7 +534,7 @@ import { isCsfFactoryPreview } from "storybook/internal/csf-tools";
533
534
  var import_ts_dedent = __toESM(require_dist(), 1);
534
535
 
535
536
  // src/core-server/utils/get-component-variable-name.ts
536
- var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-4GVAWYWU.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
537
+ var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-5XDKQT3J.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
537
538
 
538
539
  // src/core-server/utils/new-story-templates/csf-factory-template.ts
539
540
  async function getCsfFactoryTemplateForNewStoryFile(data) {
@@ -798,7 +799,7 @@ async function searchFiles({
798
799
  ignoredFiles = IGNORED_FILES,
799
800
  fileExtensions = FILE_EXTENSIONS
800
801
  }) {
801
- let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-UXUG5UXW.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
802
+ let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-AXGFF6I5.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
802
803
  `**/*${searchQuery}*.${fileExtensionsPattern}`,
803
804
  `**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
804
805
  ];
@@ -5786,7 +5787,21 @@ var interpolate = (string, data = {}) => Object.entries(data).reduce((acc, [k, v
5786
5787
  }, managerEntries = async (existing) => [
5787
5788
  join(resolvePackageDir("storybook"), "dist/core-server/presets/common-manager.js"),
5788
5789
  ...existing || []
5789
- ];
5790
+ ], storyIndexGeneratorPromise, storyIndexGenerator = async (_, options) => storyIndexGeneratorPromise || (storyIndexGeneratorPromise = (async () => {
5791
+ let workingDir = process.cwd(), configDir = options.configDir, stories = await options.presets.apply("stories"), normalizedStories = normalizeStories(stories, {
5792
+ configDir,
5793
+ workingDir
5794
+ }), [indexers, docs] = await Promise.all([
5795
+ options.presets.apply("experimental_indexers", []),
5796
+ options.presets.apply("docs")
5797
+ ]), generator = new StoryIndexGenerator(normalizedStories, {
5798
+ workingDir,
5799
+ configDir,
5800
+ indexers,
5801
+ docs
5802
+ });
5803
+ return await generator.initialize(), generator;
5804
+ })(), storyIndexGeneratorPromise);
5790
5805
  export {
5791
5806
  babel,
5792
5807
  core,
@@ -5805,6 +5820,7 @@ export {
5805
5820
  previewHead,
5806
5821
  resolvedReact,
5807
5822
  staticDirs,
5823
+ storyIndexGenerator,
5808
5824
  title,
5809
5825
  typescript
5810
5826
  };
package/dist/csf/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  mountDestructured,
11
11
  normalizeArrays,
12
12
  normalizeProjectAnnotations
13
- } from "../_browser-chunks/chunk-EUPBEOK3.js";
13
+ } from "../_browser-chunks/chunk-VUZYLZ4B.js";
14
14
  import "../_browser-chunks/chunk-IPA5A322.js";
15
15
  import "../_browser-chunks/chunk-XLJZ7AOP.js";
16
16
  import {
@@ -1878,9 +1878,13 @@ function defineStory(input, meta) {
1878
1878
  await compose().run(context);
1879
1879
  },
1880
1880
  test(name, overridesOrTestFn, testFn) {
1881
- let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? async ({ context }) => {
1882
- await this.play?.(context), await testFunction(context);
1883
- } : async (context) => {
1881
+ let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? (
1882
+ // mount needs to be explicitly destructured
1883
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1884
+ async ({ mount, context }) => {
1885
+ await this.play?.(context), await testFunction(context);
1886
+ }
1887
+ ) : async (context) => {
1884
1888
  await this.play?.(context), await testFunction(context);
1885
1889
  }, test = this.extend({
1886
1890
  ...annotations,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -38,9 +38,9 @@ import {
38
38
  vitestTransform,
39
39
  writeConfig,
40
40
  writeCsf
41
- } from "../_node-chunks/chunk-DF3MHTVA.js";
42
- import "../_node-chunks/chunk-56LVYN72.js";
43
- import "../_node-chunks/chunk-YPUOZX6Y.js";
41
+ } from "../_node-chunks/chunk-XZ6V3G6J.js";
42
+ import "../_node-chunks/chunk-LRBEW57O.js";
43
+ import "../_node-chunks/chunk-PZCWRKQE.js";
44
44
  export {
45
45
  BadMetaError,
46
46
  ConfigFile,
@@ -66335,7 +66335,7 @@ init_dist();
66335
66335
  var import_memoizerific8 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
66336
66336
 
66337
66337
  // src/manager-api/version.ts
66338
- var version = "10.2.0-alpha.7";
66338
+ var version = "10.2.0-alpha.9";
66339
66339
 
66340
66340
  // src/manager-api/modules/versions.ts
66341
66341
  var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
@@ -2338,7 +2338,7 @@ import { global as global8 } from "@storybook/global";
2338
2338
  import semver from "semver";
2339
2339
 
2340
2340
  // src/manager-api/version.ts
2341
- var version = "10.2.0-alpha.7";
2341
+ var version = "10.2.0-alpha.9";
2342
2342
 
2343
2343
  // src/manager-api/modules/versions.ts
2344
2344
  var { VERSIONCHECK } = global8, getVersionCheckData = (0, import_memoizerific2.default)(1)(() => {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -16,8 +16,8 @@ import {
16
16
  join,
17
17
  normalize,
18
18
  resolve
19
- } from "../_node-chunks/chunk-Y6L7H22H.js";
20
- import "../_node-chunks/chunk-YPUOZX6Y.js";
19
+ } from "../_node-chunks/chunk-LB74XOLW.js";
20
+ import "../_node-chunks/chunk-PZCWRKQE.js";
21
21
 
22
22
  // ../../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
23
23
  var comma = 44, semicolon = 59, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -22,9 +22,9 @@ import {
22
22
  once,
23
23
  prompt,
24
24
  protectUrls
25
- } from "../_node-chunks/chunk-BVT57OPU.js";
26
- import "../_node-chunks/chunk-ZNQQBZIL.js";
27
- import "../_node-chunks/chunk-YPUOZX6Y.js";
25
+ } from "../_node-chunks/chunk-SPOUBCPJ.js";
26
+ import "../_node-chunks/chunk-6ABJZZWS.js";
27
+ import "../_node-chunks/chunk-PZCWRKQE.js";
28
28
  var export_instance = import_npmlog.default;
29
29
  export {
30
30
  CLI_COLORS,
@@ -39150,20 +39150,20 @@ var checkGlobals = (parameters2) => {
39150
39150
  parameters2 && (checkGlobals(parameters2), checkStorySort(parameters2));
39151
39151
  };
39152
39152
  function processCSFFile(moduleExports, importPath, title) {
39153
- let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports, firstStory = Object.values(namedExports)[0];
39154
- if (isStory(firstStory)) {
39155
- let meta2 = normalizeComponentAnnotations(firstStory.meta.input, title, importPath);
39153
+ let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports, factoryStory = Object.values(namedExports).find((it) => isStory(it));
39154
+ if (factoryStory) {
39155
+ let meta2 = normalizeComponentAnnotations(factoryStory.meta.input, title, importPath);
39156
39156
  checkDisallowedParameters(meta2.parameters);
39157
39157
  let csfFile2 = { meta: meta2, stories: {}, moduleExports };
39158
39158
  return Object.keys(namedExports).forEach((key) => {
39159
- if (isExportStory(key, meta2)) {
39159
+ if (isExportStory(key, meta2) && isStory(namedExports[key])) {
39160
39160
  let story = namedExports[key], storyMeta = normalizeStory(key, story.input, meta2);
39161
39161
  checkDisallowedParameters(storyMeta.parameters), csfFile2.stories[storyMeta.id] = storyMeta, getStoryChildren(story).forEach((child) => {
39162
39162
  let name = child.input.name, childId = toTestId(storyMeta.id, name);
39163
39163
  child.input.parameters ??= {}, child.input.parameters.__id = childId, csfFile2.stories[childId] = normalizeStory(name, child.input, meta2);
39164
39164
  });
39165
39165
  }
39166
- }), csfFile2.projectAnnotations = firstStory.meta.preview.composed, csfFile2;
39166
+ }), csfFile2.projectAnnotations = factoryStory.meta.preview.composed, csfFile2;
39167
39167
  }
39168
39168
  let meta = normalizeComponentAnnotations(
39169
39169
  defaultExport,
@@ -48,7 +48,7 @@ import {
48
48
  useStoryContext,
49
49
  userOrAutoTitle,
50
50
  userOrAutoTitleFromSpecifier
51
- } from "../_browser-chunks/chunk-EUPBEOK3.js";
51
+ } from "../_browser-chunks/chunk-VUZYLZ4B.js";
52
52
  import {
53
53
  pauseAnimations,
54
54
  waitForAnimations
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -46,13 +46,13 @@ import {
46
46
  WebpackCompilationError,
47
47
  WebpackInvocationError,
48
48
  WebpackMissingStatsError
49
- } from "./_node-chunks/chunk-Y53XRTM4.js";
49
+ } from "./_node-chunks/chunk-NYUFS6LX.js";
50
50
  import {
51
51
  StorybookError
52
- } from "./_node-chunks/chunk-BUUY73HB.js";
53
- import "./_node-chunks/chunk-56LVYN72.js";
54
- import "./_node-chunks/chunk-ZNQQBZIL.js";
55
- import "./_node-chunks/chunk-YPUOZX6Y.js";
52
+ } from "./_node-chunks/chunk-IIBBQZLT.js";
53
+ import "./_node-chunks/chunk-LRBEW57O.js";
54
+ import "./_node-chunks/chunk-6ABJZZWS.js";
55
+ import "./_node-chunks/chunk-PZCWRKQE.js";
56
56
  export {
57
57
  AddonVitestPostinstallConfigUpdateError,
58
58
  AddonVitestPostinstallError,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
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";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.createRequire(import.meta.url);
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);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -25,22 +25,22 @@ import {
25
25
  sanitizeAddonName,
26
26
  sanitizeError,
27
27
  telemetry
28
- } from "../_node-chunks/chunk-LPSISNQS.js";
29
- import "../_node-chunks/chunk-TTG4OTIQ.js";
30
- import "../_node-chunks/chunk-R3N2GWVX.js";
31
- import "../_node-chunks/chunk-AT23E4EQ.js";
32
- import "../_node-chunks/chunk-FVVGYCVC.js";
33
- import "../_node-chunks/chunk-BVT57OPU.js";
34
- import "../_node-chunks/chunk-PGJHGLNH.js";
35
- import "../_node-chunks/chunk-M5E3YC4T.js";
36
- import "../_node-chunks/chunk-2TPGTNH3.js";
37
- import "../_node-chunks/chunk-P445LZJB.js";
38
- import "../_node-chunks/chunk-Y6L7H22H.js";
39
- import "../_node-chunks/chunk-VRAZAZEV.js";
40
- import "../_node-chunks/chunk-TBPJCWU7.js";
41
- import "../_node-chunks/chunk-56LVYN72.js";
42
- import "../_node-chunks/chunk-ZNQQBZIL.js";
43
- import "../_node-chunks/chunk-YPUOZX6Y.js";
28
+ } from "../_node-chunks/chunk-RF3L36MK.js";
29
+ import "../_node-chunks/chunk-VKMYOVNS.js";
30
+ import "../_node-chunks/chunk-MWWAQ5S4.js";
31
+ import "../_node-chunks/chunk-GXQRT5M6.js";
32
+ import "../_node-chunks/chunk-CO7N5AG7.js";
33
+ import "../_node-chunks/chunk-SPOUBCPJ.js";
34
+ import "../_node-chunks/chunk-3Y5VHKPI.js";
35
+ import "../_node-chunks/chunk-MOQRBTWA.js";
36
+ import "../_node-chunks/chunk-3DPKKQ6P.js";
37
+ import "../_node-chunks/chunk-OUDQWDHY.js";
38
+ import "../_node-chunks/chunk-LB74XOLW.js";
39
+ import "../_node-chunks/chunk-WTQGSYRO.js";
40
+ import "../_node-chunks/chunk-73GYSTNZ.js";
41
+ import "../_node-chunks/chunk-LRBEW57O.js";
42
+ import "../_node-chunks/chunk-6ABJZZWS.js";
43
+ import "../_node-chunks/chunk-PZCWRKQE.js";
44
44
  export {
45
45
  ErrorCollector,
46
46
  addToGlobalContext,
@@ -2124,8 +2124,8 @@ interface IndexInputStats {
2124
2124
  }
2125
2125
  /** The base input for indexing a story or docs entry. */
2126
2126
  type BaseIndexInput = {
2127
- /** The file to import from e.g. the story file. */
2128
- importPath: Path;
2127
+ /** The file to import from e.g. the story file. Defaults to the fileName arg passed to createIndex */
2128
+ importPath?: Path;
2129
2129
  /** The raw path/package of the file that provides meta.component, if one exists */
2130
2130
  rawComponentPath?: Path;
2131
2131
  /** The name of the export to import. */
@@ -2617,6 +2617,7 @@ interface StorybookConfigRaw {
2617
2617
  babelDefault?: any;
2618
2618
  previewAnnotations?: Entry[];
2619
2619
  experimental_indexers?: Indexer[];
2620
+ storyIndexGenerator?: StoryIndexGenerator;
2620
2621
  experimental_devServer?: ServerApp;
2621
2622
  docs?: DocsOptions;
2622
2623
  previewHead?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook",
3
- "version": "10.2.0-alpha.7",
3
+ "version": "10.2.0-alpha.9",
4
4
  "description": "Storybook: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -1,61 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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.7",
16
- "@storybook/addon-docs": "10.2.0-alpha.7",
17
- "@storybook/addon-links": "10.2.0-alpha.7",
18
- "@storybook/addon-onboarding": "10.2.0-alpha.7",
19
- "storybook-addon-pseudo-states": "10.2.0-alpha.7",
20
- "@storybook/addon-themes": "10.2.0-alpha.7",
21
- "@storybook/addon-vitest": "10.2.0-alpha.7",
22
- "@storybook/builder-vite": "10.2.0-alpha.7",
23
- "@storybook/builder-webpack5": "10.2.0-alpha.7",
24
- storybook: "10.2.0-alpha.7",
25
- "@storybook/angular": "10.2.0-alpha.7",
26
- "@storybook/ember": "10.2.0-alpha.7",
27
- "@storybook/html-vite": "10.2.0-alpha.7",
28
- "@storybook/nextjs": "10.2.0-alpha.7",
29
- "@storybook/nextjs-vite": "10.2.0-alpha.7",
30
- "@storybook/preact-vite": "10.2.0-alpha.7",
31
- "@storybook/react-native-web-vite": "10.2.0-alpha.7",
32
- "@storybook/react-vite": "10.2.0-alpha.7",
33
- "@storybook/react-webpack5": "10.2.0-alpha.7",
34
- "@storybook/server-webpack5": "10.2.0-alpha.7",
35
- "@storybook/svelte-vite": "10.2.0-alpha.7",
36
- "@storybook/sveltekit": "10.2.0-alpha.7",
37
- "@storybook/vue3-vite": "10.2.0-alpha.7",
38
- "@storybook/web-components-vite": "10.2.0-alpha.7",
39
- sb: "10.2.0-alpha.7",
40
- "@storybook/cli": "10.2.0-alpha.7",
41
- "@storybook/codemod": "10.2.0-alpha.7",
42
- "@storybook/core-webpack": "10.2.0-alpha.7",
43
- "create-storybook": "10.2.0-alpha.7",
44
- "@storybook/csf-plugin": "10.2.0-alpha.7",
45
- "eslint-plugin-storybook": "10.2.0-alpha.7",
46
- "@storybook/react-dom-shim": "10.2.0-alpha.7",
47
- "@storybook/preset-create-react-app": "10.2.0-alpha.7",
48
- "@storybook/preset-react-webpack": "10.2.0-alpha.7",
49
- "@storybook/preset-server-webpack": "10.2.0-alpha.7",
50
- "@storybook/html": "10.2.0-alpha.7",
51
- "@storybook/preact": "10.2.0-alpha.7",
52
- "@storybook/react": "10.2.0-alpha.7",
53
- "@storybook/server": "10.2.0-alpha.7",
54
- "@storybook/svelte": "10.2.0-alpha.7",
55
- "@storybook/vue3": "10.2.0-alpha.7",
56
- "@storybook/web-components": "10.2.0-alpha.7"
57
- };
58
-
59
- export {
60
- versions_default
61
- };
@@ -1,23 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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-M5E3YC4T.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
- };
@@ -1,18 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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.7";
15
-
16
- export {
17
- version
18
- };