storybook 10.0.0-beta.3 → 10.0.0-beta.5

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 (100) hide show
  1. package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
  2. package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
  3. package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-AM4PZYVQ.js} +10 -63
  4. package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
  5. package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
  6. package/dist/_browser-chunks/chunk-GJ67EE65.js +67 -0
  7. package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
  8. package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
  9. package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
  10. package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
  11. package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
  12. package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
  13. package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-YQV3EGQ5.js} +5 -5
  14. package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-RJW7FE3A.js} +3 -2
  15. package/dist/_node-chunks/{builder-manager-DXAEQZJB.js → builder-manager-ZTS4EIKQ.js} +18 -13
  16. package/dist/_node-chunks/camelcase-K3BM7RII.js +18 -0
  17. package/dist/_node-chunks/{chunk-XRAB2RZN.js → chunk-2VMDKLSW.js} +6 -6
  18. package/dist/_node-chunks/{chunk-EI44VA3U.js → chunk-3VVGIILJ.js} +8 -8
  19. package/dist/_node-chunks/{chunk-KQXC7XVZ.js → chunk-4KRR46V2.js} +50 -89
  20. package/dist/_node-chunks/{chunk-EVY6P65U.js → chunk-4VDRH7SM.js} +7 -7
  21. package/dist/_node-chunks/chunk-7LG5CLCT.js +18 -0
  22. package/dist/_node-chunks/{chunk-DNOOZ2LS.js → chunk-ACUNHBEO.js} +552 -717
  23. package/dist/_node-chunks/{camelcase-CMMT6PHY.js → chunk-AK5PHLUA.js} +9 -8
  24. package/dist/_node-chunks/{chunk-RUCPXDO3.js → chunk-D7SDB4XE.js} +223 -243
  25. package/dist/_node-chunks/chunk-DWJ7TV2O.js +62 -0
  26. package/dist/_node-chunks/chunk-DZJNLBBL.js +79 -0
  27. package/dist/_node-chunks/{chunk-5XVEWBRA.js → chunk-EIHJ5J3O.js} +8 -8
  28. package/dist/_node-chunks/{chunk-3SUJKLRV.js → chunk-F3WE3456.js} +7 -7
  29. package/dist/_node-chunks/{chunk-QI3AVWUV.js → chunk-F7YW5W6B.js} +12 -12
  30. package/dist/_node-chunks/{chunk-6Z44ODDR.js → chunk-H52PBBSK.js} +7 -7
  31. package/dist/_node-chunks/{chunk-WRSYICUI.js → chunk-J3DQMIO4.js} +7 -7
  32. package/dist/_node-chunks/{chunk-PA26PSV2.js → chunk-K4YETNYJ.js} +30 -21
  33. package/dist/_node-chunks/{chunk-LRQFELIZ.js → chunk-KU3JBNPY.js} +8 -8
  34. package/dist/_node-chunks/{chunk-4TGAX5W7.js → chunk-KZB7ELL6.js} +162 -103
  35. package/dist/_node-chunks/{chunk-PAZJQ2GH.js → chunk-OC3TVLYU.js} +7 -7
  36. package/dist/_node-chunks/{chunk-7EGB7ALG.js → chunk-P3TWEOO5.js} +7 -7
  37. package/dist/_node-chunks/{chunk-BV4J7FF6.js → chunk-P7YMEOXF.js} +7 -7
  38. package/dist/_node-chunks/{chunk-CNKVQCQJ.js → chunk-PIKDGR3O.js} +7 -7
  39. package/dist/_node-chunks/{chunk-R6TLLF24.js → chunk-QHIU5I7C.js} +6 -6
  40. package/dist/_node-chunks/{chunk-AKW5OJ2T.js → chunk-SW3VZAH7.js} +9 -9
  41. package/dist/_node-chunks/chunk-TBWOUVTA.js +4967 -0
  42. package/dist/_node-chunks/{chunk-TL5RNPZW.js → chunk-TKN5TEZV.js} +583 -180
  43. package/dist/_node-chunks/{chunk-SHXAIHPO.js → chunk-TVKUJ3SE.js} +623 -750
  44. package/dist/_node-chunks/{chunk-MVPVYHBT.js → chunk-UTCFHTQH.js} +8 -8
  45. package/dist/_node-chunks/{chunk-PK6SVDYW.js → chunk-VQN4WAIA.js} +7 -7
  46. package/dist/_node-chunks/{chunk-IA7M33LK.js → chunk-VWSUFVUF.js} +7 -7
  47. package/dist/_node-chunks/{chunk-ICETGZAR.js → chunk-VX5P3IYA.js} +7 -7
  48. package/dist/_node-chunks/{chunk-ICFGNVW7.js → chunk-WCSHG2QT.js} +7 -7
  49. package/dist/_node-chunks/{default-browser-id-2X5XLPPS.js → default-browser-id-4RZZMHJE.js} +7 -7
  50. package/dist/_node-chunks/{dist-JSBOOVQK.js → dist-OGRBL76N.js} +9 -9
  51. package/dist/_node-chunks/{globby-YYTLHNUO.js → globby-65LOULA6.js} +9 -9
  52. package/dist/_node-chunks/{lib-DJHADRPZ.js → lib-TF7JCT3A.js} +36 -12
  53. package/dist/_node-chunks/{mdx-N42X6CFJ-WT6XCDU6.js → mdx-N42X6CFJ-6ZJEUZMZ.js} +8 -8
  54. package/dist/_node-chunks/{p-limit-HTXI4SGX.js → p-limit-PF7JSPDT.js} +76 -10
  55. package/dist/_node-chunks/{plugin-NNRMQ2YK.js → plugin-A6XAWMXN.js} +10 -10
  56. package/dist/_node-chunks/{plugin-W22F3FQV.js → plugin-LGHGAC6J.js} +10 -10
  57. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-VFNVWMAM.js → webpack-inject-mocker-runtime-plugin-HDSEOU3Z.js} +1307 -847
  58. package/dist/_node-chunks/{webpack-mock-plugin-Q4ED2M25.js → webpack-mock-plugin-ZJJVMJUS.js} +9 -9
  59. package/dist/babel/index.d.ts +1 -1
  60. package/dist/babel/index.js +11 -11
  61. package/dist/bin/core.js +638 -187
  62. package/dist/bin/dispatcher.js +11 -11
  63. package/dist/bin/loader.js +8 -8
  64. package/dist/cli/index.d.ts +62 -75
  65. package/dist/cli/index.js +60 -54
  66. package/dist/common/index.d.ts +3 -1
  67. package/dist/common/index.js +23 -22
  68. package/dist/components/index.js +24 -20
  69. package/dist/core-server/index.js +3544 -3220
  70. package/dist/core-server/presets/common-manager.js +440 -720
  71. package/dist/core-server/presets/common-override-preset.js +9 -9
  72. package/dist/core-server/presets/common-preset.js +22 -22
  73. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  74. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  75. package/dist/csf/index.js +6 -6
  76. package/dist/csf-tools/index.js +9 -9
  77. package/dist/docs-tools/index.js +4 -4
  78. package/dist/instrumenter/index.js +1 -1
  79. package/dist/manager/globals-runtime.js +8910 -18107
  80. package/dist/manager/runtime.js +3256 -2945
  81. package/dist/manager-api/index.js +23 -20
  82. package/dist/node-logger/index.d.ts +1 -1
  83. package/dist/node-logger/index.js +1136 -662
  84. package/dist/preview/runtime.js +12061 -21584
  85. package/dist/preview-api/index.js +6 -6
  86. package/dist/router/index.js +2 -2
  87. package/dist/server-errors.js +10 -10
  88. package/dist/telemetry/index.js +24 -25
  89. package/dist/test/index.js +1872 -4023
  90. package/dist/theming/index.d.ts +2 -2
  91. package/dist/theming/index.js +6 -6
  92. package/package.json +4 -8
  93. package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
  94. package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
  95. package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
  96. package/dist/_node-chunks/chunk-ALWVSNSK.js +0 -62
  97. package/dist/_node-chunks/chunk-MHNUEOON.js +0 -87
  98. package/dist/_node-chunks/chunk-VDFQYNPZ.js +0 -266
  99. package/dist/_node-chunks/chunk-WELIADWR.js +0 -2377
  100. package/dist/_node-chunks/chunk-YRXKNGPR.js +0 -18
package/dist/cli/index.js CHANGED
@@ -1,57 +1,57 @@
1
- import CJS_COMPAT_NODE_URL_6q9nmfaplv7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_6q9nmfaplv7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_6q9nmfaplv7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_6q9nmfaplv7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_6q9nmfaplv7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_6q9nmfaplv7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.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
  boxen
14
- } from "../_node-chunks/chunk-SHXAIHPO.js";
14
+ } from "../_node-chunks/chunk-TVKUJ3SE.js";
15
+ import "../_node-chunks/chunk-AK5PHLUA.js";
15
16
  import {
16
17
  Settings,
17
18
  _clearGlobalSettings,
18
19
  globalSettings
19
- } from "../_node-chunks/chunk-RUCPXDO3.js";
20
+ } from "../_node-chunks/chunk-D7SDB4XE.js";
20
21
  import {
21
- findUp,
22
- findUpSync
23
- } from "../_node-chunks/chunk-VDFQYNPZ.js";
24
- import "../_node-chunks/chunk-MHNUEOON.js";
22
+ any,
23
+ up2 as up
24
+ } from "../_node-chunks/chunk-DZJNLBBL.js";
25
25
  import {
26
26
  invariant
27
- } from "../_node-chunks/chunk-IA7M33LK.js";
27
+ } from "../_node-chunks/chunk-VWSUFVUF.js";
28
28
  import {
29
29
  resolvePackageDir
30
- } from "../_node-chunks/chunk-LRQFELIZ.js";
31
- import "../_node-chunks/chunk-EVY6P65U.js";
30
+ } from "../_node-chunks/chunk-KU3JBNPY.js";
31
+ import "../_node-chunks/chunk-4VDRH7SM.js";
32
32
  import {
33
33
  require_prompts
34
- } from "../_node-chunks/chunk-ICETGZAR.js";
34
+ } from "../_node-chunks/chunk-VX5P3IYA.js";
35
35
  import {
36
36
  require_dist
37
- } from "../_node-chunks/chunk-BV4J7FF6.js";
37
+ } from "../_node-chunks/chunk-P7YMEOXF.js";
38
38
  import {
39
39
  babelParse,
40
40
  recast,
41
41
  traverse,
42
42
  types
43
- } from "../_node-chunks/chunk-TL5RNPZW.js";
44
- import "../_node-chunks/chunk-4TGAX5W7.js";
45
- import "../_node-chunks/chunk-6Z44ODDR.js";
43
+ } from "../_node-chunks/chunk-TKN5TEZV.js";
44
+ import "../_node-chunks/chunk-KZB7ELL6.js";
45
+ import "../_node-chunks/chunk-H52PBBSK.js";
46
46
  import {
47
47
  require_picocolors
48
- } from "../_node-chunks/chunk-7EGB7ALG.js";
48
+ } from "../_node-chunks/chunk-P3TWEOO5.js";
49
49
  import {
50
50
  __commonJS,
51
51
  __name,
52
52
  __require,
53
53
  __toESM
54
- } from "../_node-chunks/chunk-XRAB2RZN.js";
54
+ } from "../_node-chunks/chunk-2VMDKLSW.js";
55
55
 
56
56
  // ../node_modules/wrappy/wrappy.js
57
57
  var require_wrappy = __commonJS({
@@ -137,6 +137,7 @@ var require_end_of_stream = __commonJS({
137
137
  var once = require_once();
138
138
  var noop = /* @__PURE__ */ __name(function() {
139
139
  }, "noop");
140
+ var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
140
141
  var isRequest = /* @__PURE__ */ __name(function(stream) {
141
142
  return stream.setHeader && typeof stream.abort === "function";
142
143
  }, "isRequest");
@@ -170,7 +171,7 @@ var require_end_of_stream = __commonJS({
170
171
  callback.call(stream, err);
171
172
  }, "onerror");
172
173
  var onclose = /* @__PURE__ */ __name(function() {
173
- process.nextTick(onclosenexttick);
174
+ qnt(onclosenexttick);
174
175
  }, "onclose");
175
176
  var onclosenexttick = /* @__PURE__ */ __name(function() {
176
177
  if (cancelled) return;
@@ -225,7 +226,7 @@ var require_pump = __commonJS({
225
226
  }
226
227
  var noop = /* @__PURE__ */ __name(function() {
227
228
  }, "noop");
228
- var ancient = /^v?\.0/.test(process.version);
229
+ var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
229
230
  var isFn = /* @__PURE__ */ __name(function(fn) {
230
231
  return typeof fn === "function";
231
232
  }, "isFn");
@@ -4652,12 +4653,15 @@ var require_tar_fs = __commonJS({
4652
4653
  if (win32) return next();
4653
4654
  xfs.unlink(name, function() {
4654
4655
  var srcpath = path.join(cwd, path.join("/", header.linkname));
4655
- xfs.link(srcpath, name, function(err) {
4656
- if (err && err.code === "EPERM" && opts.hardlinkAsFilesFallback) {
4657
- stream = xfs.createReadStream(srcpath);
4658
- return onfile();
4659
- }
4660
- stat(err);
4656
+ xfs.realpath(srcpath, function(err, dst) {
4657
+ if (err || !dst.startsWith(path.resolve(cwd))) return next(new Error(name + " is not a valid hardlink"));
4658
+ xfs.link(dst, name, function(err2) {
4659
+ if (err2 && err2.code === "EPERM" && opts.hardlinkAsFilesFallback) {
4660
+ stream = xfs.createReadStream(srcpath);
4661
+ return onfile();
4662
+ }
4663
+ stat(err2);
4664
+ });
4661
4665
  });
4662
4666
  });
4663
4667
  }, "onlink");
@@ -27462,7 +27466,7 @@ import { coerce, satisfies } from "semver";
27462
27466
  var singleComment = Symbol("singleComment");
27463
27467
  var multiComment = Symbol("multiComment");
27464
27468
  var stripWithoutWhitespace = /* @__PURE__ */ __name(() => "", "stripWithoutWhitespace");
27465
- var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/\S/g, " "), "stripWithWhitespace");
27469
+ var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, " "), "stripWithWhitespace");
27466
27470
  var isEscaped = /* @__PURE__ */ __name((jsonString, quotePosition) => {
27467
27471
  let index = quotePosition - 1;
27468
27472
  let backslashCount = 0;
@@ -27543,7 +27547,8 @@ function stripJsonComments(jsonString, { whitespace = true, trailingCommas = fal
27543
27547
  }
27544
27548
  }
27545
27549
  }
27546
- return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
27550
+ const remaining = isInsideComment === singleComment ? strip(jsonString, offset) : jsonString.slice(offset);
27551
+ return result + buffer + remaining;
27547
27552
  }
27548
27553
  __name(stripJsonComments, "stripJsonComments");
27549
27554
 
@@ -28010,7 +28015,7 @@ async function adjustTemplate(templatePath, templateData) {
28010
28015
  }
28011
28016
  __name(adjustTemplate, "adjustTemplate");
28012
28017
  async function isNxProject() {
28013
- return findUpSync("nx.json", { stopAt: getProjectRoot() });
28018
+ return up("nx.json", { last: getProjectRoot() });
28014
28019
  }
28015
28020
  __name(isNxProject, "isNxProject");
28016
28021
  function coerceSemver(version) {
@@ -28084,8 +28089,8 @@ function detectFrameworkPreset(packageJson = {}) {
28084
28089
  }
28085
28090
  __name(detectFrameworkPreset, "detectFrameworkPreset");
28086
28091
  async function detectBuilder(packageManager, projectType) {
28087
- const viteConfig = findUpSync(viteConfigFiles, { stopAt: getProjectRoot2() });
28088
- const webpackConfig = findUpSync(webpackConfigFiles, { stopAt: getProjectRoot2() });
28092
+ const viteConfig = any(viteConfigFiles, { last: getProjectRoot2() });
28093
+ const webpackConfig = any(webpackConfigFiles, { last: getProjectRoot2() });
28089
28094
  const dependencies = packageManager.getAllDependencies();
28090
28095
  if (viteConfig || dependencies.vite && dependencies.webpack === void 0) {
28091
28096
  commandLog("Detected Vite project. Setting builder to Vite")();
@@ -28133,7 +28138,7 @@ function isStorybookInstantiated(configDir = resolve2(process.cwd(), ".storybook
28133
28138
  }
28134
28139
  __name(isStorybookInstantiated, "isStorybookInstantiated");
28135
28140
  async function detectPnp() {
28136
- return !!findUpSync([".pnp.js", ".pnp.cjs"]);
28141
+ return !!any([".pnp.js", ".pnp.cjs"]);
28137
28142
  }
28138
28143
  __name(detectPnp, "detectPnp");
28139
28144
  async function detectLanguage(packageManager) {
@@ -28324,6 +28329,10 @@ import { logger as logger4, prompt } from "storybook/internal/node-logger";
28324
28329
  var INDENT_REGEX = /^(?:( )+|\t+)/;
28325
28330
  var INDENT_TYPE_SPACE = "space";
28326
28331
  var INDENT_TYPE_TAB = "tab";
28332
+ function shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, value) {
28333
+ return ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && value === 1;
28334
+ }
28335
+ __name(shouldIgnoreSingleSpace, "shouldIgnoreSingleSpace");
28327
28336
  function makeIndentsMap(string, ignoreSingleSpaces) {
28328
28337
  const indents = /* @__PURE__ */ new Map();
28329
28338
  let previousSize = 0;
@@ -28333,39 +28342,36 @@ function makeIndentsMap(string, ignoreSingleSpaces) {
28333
28342
  if (!line) {
28334
28343
  continue;
28335
28344
  }
28336
- let indent;
28337
- let indentType;
28338
- let use;
28339
- let weight;
28340
- let entry;
28341
28345
  const matches = line.match(INDENT_REGEX);
28342
28346
  if (matches === null) {
28343
28347
  previousSize = 0;
28344
28348
  previousIndentType = "";
28345
28349
  } else {
28346
- indent = matches[0].length;
28347
- indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
28348
- if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) {
28350
+ const indent = matches[0].length;
28351
+ const indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
28352
+ if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, indent)) {
28349
28353
  continue;
28350
28354
  }
28351
28355
  if (indentType !== previousIndentType) {
28352
28356
  previousSize = 0;
28353
28357
  }
28354
28358
  previousIndentType = indentType;
28355
- use = 1;
28356
- weight = 0;
28359
+ let use = 1;
28360
+ let weight = 0;
28357
28361
  const indentDifference = indent - previousSize;
28358
28362
  previousSize = indent;
28359
28363
  if (indentDifference === 0) {
28360
28364
  use = 0;
28361
28365
  weight = 1;
28362
28366
  } else {
28363
- const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference;
28367
+ const absoluteIndentDifference = Math.abs(indentDifference);
28368
+ if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, absoluteIndentDifference)) {
28369
+ continue;
28370
+ }
28364
28371
  key = encodeIndentsKey(indentType, absoluteIndentDifference);
28365
28372
  }
28366
- entry = indents.get(key);
28367
- entry = entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight];
28368
- indents.set(key, entry);
28373
+ const entry = indents.get(key);
28374
+ indents.set(key, entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight]);
28369
28375
  }
28370
28376
  }
28371
28377
  return indents;
@@ -28431,11 +28437,11 @@ var import_picocolors2 = __toESM(require_picocolors(), 1);
28431
28437
  var import_ts_dedent2 = __toESM(require_dist(), 1);
28432
28438
  var SUPPORTED_ESLINT_EXTENSIONS = ["ts", "mts", "cts", "mjs", "js", "cjs", "json"];
28433
28439
  var UNSUPPORTED_ESLINT_EXTENSIONS = ["yaml", "yml"];
28434
- var findEslintFile = /* @__PURE__ */ __name(async (instanceDir) => {
28440
+ var findEslintFile = /* @__PURE__ */ __name((instanceDir) => {
28435
28441
  const filePrefixes = ["eslint.config", ".eslintrc"];
28436
28442
  for (const prefix of filePrefixes) {
28437
28443
  for (const ext of UNSUPPORTED_ESLINT_EXTENSIONS) {
28438
- const file = await findUp(`${prefix}.${ext}`, { cwd: instanceDir, stopAt: getProjectRoot3() });
28444
+ const file = up(`${prefix}.${ext}`, { cwd: instanceDir, last: getProjectRoot3() });
28439
28445
  if (file) {
28440
28446
  throw new Error(`Unsupported ESLint config extension: .${ext}`);
28441
28447
  }
@@ -28443,7 +28449,7 @@ var findEslintFile = /* @__PURE__ */ __name(async (instanceDir) => {
28443
28449
  }
28444
28450
  for (const prefix of filePrefixes) {
28445
28451
  for (const ext of SUPPORTED_ESLINT_EXTENSIONS) {
28446
- const file = await findUp(`${prefix}.${ext}`, { cwd: instanceDir, stopAt: getProjectRoot3() });
28452
+ const file = up(`${prefix}.${ext}`, { cwd: instanceDir, last: getProjectRoot3() });
28447
28453
  if (file) {
28448
28454
  return file;
28449
28455
  }
@@ -28525,7 +28531,7 @@ async function extractEslintInfo(packageManager) {
28525
28531
  const { packageJson } = packageManager.primaryPackageJson;
28526
28532
  let eslintConfigFile = void 0;
28527
28533
  try {
28528
- eslintConfigFile = await findEslintFile(packageManager.instanceDir);
28534
+ eslintConfigFile = findEslintFile(packageManager.instanceDir);
28529
28535
  } catch (err) {
28530
28536
  if (err instanceof Error && err.message.includes("Unsupported ESLint")) {
28531
28537
  unsupportedExtension = String(err);
@@ -1140,6 +1140,8 @@ declare const normalizeStories: (entries: StoriesEntry[], options: NormalizeOpti
1140
1140
 
1141
1141
  declare const getProjectRoot: () => string;
1142
1142
  declare const invalidateProjectRootCache: () => void;
1143
+ /** Finds files in the directory tree up to the project root */
1144
+ declare const findFilesUp: (matchers: string[], baseDir?: string) => string[];
1143
1145
  declare const nodePathsToArray: (nodePath: string) => string[];
1144
1146
  /** Ensures that a path starts with `./` or `../`, or is entirely `.` or `..` */
1145
1147
  declare function normalizeStoryPath(filename: string): string;
@@ -1301,4 +1303,4 @@ declare const safeResolveModule: ({ specifier, parent, extensions, }: {
1301
1303
  extensions?: string[];
1302
1304
  }) => string | undefined;
1303
1305
 
1304
- export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
1306
+ export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, findFilesUp, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_6q9nmfaplv7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_6q9nmfaplv7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_6q9nmfaplv7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_6q9nmfaplv7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_6q9nmfaplv7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_6q9nmfaplv7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -83,13 +83,14 @@ import {
83
83
  transformImportFiles,
84
84
  validateConfigurationFiles,
85
85
  validateFrameworkName
86
- } from "../_node-chunks/chunk-DNOOZ2LS.js";
87
- import "../_node-chunks/chunk-PAZJQ2GH.js";
88
- import "../_node-chunks/chunk-ICFGNVW7.js";
86
+ } from "../_node-chunks/chunk-ACUNHBEO.js";
87
+ import "../_node-chunks/chunk-OC3TVLYU.js";
88
+ import "../_node-chunks/chunk-WCSHG2QT.js";
89
89
  import {
90
90
  versions_default
91
- } from "../_node-chunks/chunk-ALWVSNSK.js";
91
+ } from "../_node-chunks/chunk-DWJ7TV2O.js";
92
92
  import {
93
+ findFilesUp,
93
94
  getProjectRoot,
94
95
  invalidateProjectRootCache,
95
96
  isCI,
@@ -99,23 +100,22 @@ import {
99
100
  optionalEnvToBoolean,
100
101
  stringifyEnvs,
101
102
  stringifyProcessEnvs
102
- } from "../_node-chunks/chunk-WELIADWR.js";
103
- import "../_node-chunks/chunk-VDFQYNPZ.js";
104
- import "../_node-chunks/chunk-MHNUEOON.js";
105
- import "../_node-chunks/chunk-IA7M33LK.js";
103
+ } from "../_node-chunks/chunk-TBWOUVTA.js";
104
+ import "../_node-chunks/chunk-DZJNLBBL.js";
105
+ import "../_node-chunks/chunk-VWSUFVUF.js";
106
106
  import {
107
107
  importMetaResolve,
108
108
  importModule,
109
109
  resolvePackageDir,
110
110
  safeResolveModule
111
- } from "../_node-chunks/chunk-LRQFELIZ.js";
112
- import "../_node-chunks/chunk-EVY6P65U.js";
113
- import "../_node-chunks/chunk-ICETGZAR.js";
114
- import "../_node-chunks/chunk-MVPVYHBT.js";
115
- import "../_node-chunks/chunk-WRSYICUI.js";
116
- import "../_node-chunks/chunk-BV4J7FF6.js";
117
- import "../_node-chunks/chunk-7EGB7ALG.js";
118
- import "../_node-chunks/chunk-XRAB2RZN.js";
111
+ } from "../_node-chunks/chunk-KU3JBNPY.js";
112
+ import "../_node-chunks/chunk-4VDRH7SM.js";
113
+ import "../_node-chunks/chunk-VX5P3IYA.js";
114
+ import "../_node-chunks/chunk-UTCFHTQH.js";
115
+ import "../_node-chunks/chunk-J3DQMIO4.js";
116
+ import "../_node-chunks/chunk-P7YMEOXF.js";
117
+ import "../_node-chunks/chunk-P3TWEOO5.js";
118
+ import "../_node-chunks/chunk-2VMDKLSW.js";
119
119
  export {
120
120
  COMMON_ENV_VARS,
121
121
  DEFAULT_FILES_PATTERN,
@@ -135,6 +135,7 @@ export {
135
135
  extractProperRendererNameFromFramework,
136
136
  filterPresetsConfig,
137
137
  findConfigFile,
138
+ findFilesUp,
138
139
  formatFileContent,
139
140
  frameworkPackages,
140
141
  frameworkToRenderer,
@@ -6,10 +6,7 @@ import {
6
6
  ScrollArea,
7
7
  SyntaxHighlighter,
8
8
  createCopyToClipboardFunction
9
- } from "../_browser-chunks/chunk-MZNYTCNT.js";
10
- import {
11
- _objectWithoutPropertiesLoose
12
- } from "../_browser-chunks/chunk-VAMFPZY3.js";
9
+ } from "../_browser-chunks/chunk-AM4PZYVQ.js";
13
10
  import "../_browser-chunks/chunk-P2LUROS2.js";
14
11
  import "../_browser-chunks/chunk-WJWT2LN5.js";
15
12
  import "../_browser-chunks/chunk-VBZTU7DO.js";
@@ -481,6 +478,10 @@ import "../_browser-chunks/chunk-OGVSPJVI.js";
481
478
  import "../_browser-chunks/chunk-AQHB5MEL.js";
482
479
  import "../_browser-chunks/chunk-5B53MDLY.js";
483
480
  import "../_browser-chunks/chunk-VVVPU2RE.js";
481
+ import "../_browser-chunks/chunk-GJ67EE65.js";
482
+ import {
483
+ _objectWithoutPropertiesLoose
484
+ } from "../_browser-chunks/chunk-VAMFPZY3.js";
484
485
  import {
485
486
  curriedDarken$1,
486
487
  curriedLighten$1,
@@ -1521,7 +1522,7 @@ import React6, { Suspense, lazy } from "react";
1521
1522
  var languages = [];
1522
1523
  var Comp = null;
1523
1524
  var LazySyntaxHighlighter = lazy(async () => {
1524
- const { SyntaxHighlighter: SyntaxHighlighter3 } = await import("../_browser-chunks/syntaxhighlighter-YYAA4CS4.js");
1525
+ const { SyntaxHighlighter: SyntaxHighlighter3 } = await import("../_browser-chunks/syntaxhighlighter-RJW7FE3A.js");
1525
1526
  if (languages.length > 0) {
1526
1527
  languages.forEach((args) => {
1527
1528
  SyntaxHighlighter3.registerLanguage(...args);
@@ -1537,7 +1538,7 @@ var LazySyntaxHighlighter = lazy(async () => {
1537
1538
  });
1538
1539
  var LazySyntaxHighlighterWithFormatter = lazy(async () => {
1539
1540
  const [{ SyntaxHighlighter: SyntaxHighlighter3 }, { formatter }] = await Promise.all([
1540
- import("../_browser-chunks/syntaxhighlighter-YYAA4CS4.js"),
1541
+ import("../_browser-chunks/syntaxhighlighter-RJW7FE3A.js"),
1541
1542
  import("../_browser-chunks/formatter-OMEEQ6HG.js")
1542
1543
  ]);
1543
1544
  if (languages.length > 0) {
@@ -1590,6 +1591,7 @@ __export(dist_exports, {
1590
1591
  import * as React33 from "react";
1591
1592
 
1592
1593
  // ../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.mjs
1594
+ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
1593
1595
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1594
1596
  return /* @__PURE__ */ __name(function handleEvent(event) {
1595
1597
  originalEventHandler?.(event);
@@ -1826,6 +1828,7 @@ var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
1826
1828
  import * as React17 from "react";
1827
1829
 
1828
1830
  // ../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/primitive/dist/index.mjs
1831
+ var canUseDOM2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
1829
1832
  function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1830
1833
  return /* @__PURE__ */ __name(function handleEvent(event) {
1831
1834
  originalEventHandler?.(event);
@@ -1909,8 +1912,9 @@ function mergeProps(slotProps, childProps) {
1909
1912
  if (isHandler) {
1910
1913
  if (slotPropValue && childPropValue) {
1911
1914
  overrideProps[propName] = (...args) => {
1912
- childPropValue(...args);
1915
+ const result = childPropValue(...args);
1913
1916
  slotPropValue(...args);
1917
+ return result;
1914
1918
  };
1915
1919
  } else if (slotPropValue) {
1916
1920
  overrideProps[propName] = slotPropValue;
@@ -1962,7 +1966,7 @@ var NODES = [
1962
1966
  ];
1963
1967
  var Primitive = NODES.reduce((primitive, node) => {
1964
1968
  const Slot3 = createSlot(`Primitive.${node}`);
1965
- const Node = React14.forwardRef((props, forwardedRef) => {
1969
+ const Node2 = React14.forwardRef((props, forwardedRef) => {
1966
1970
  const { asChild, ...primitiveProps } = props;
1967
1971
  const Comp2 = asChild ? Slot3 : node;
1968
1972
  if (typeof window !== "undefined") {
@@ -1970,8 +1974,8 @@ var Primitive = NODES.reduce((primitive, node) => {
1970
1974
  }
1971
1975
  return jsx3(Comp2, { ...primitiveProps, ref: forwardedRef });
1972
1976
  });
1973
- Node.displayName = `Primitive.${node}`;
1974
- return { ...primitive, [node]: Node };
1977
+ Node2.displayName = `Primitive.${node}`;
1978
+ return { ...primitive, [node]: Node2 };
1975
1979
  }, {});
1976
1980
  function dispatchDiscreteCustomEvent(target, event) {
1977
1981
  if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
@@ -2512,7 +2516,7 @@ function usePresence(present) {
2512
2516
  const ownerWindow = node.ownerDocument.defaultView ?? window;
2513
2517
  const handleAnimationEnd = /* @__PURE__ */ __name((event) => {
2514
2518
  const currentAnimationName = getAnimationName(stylesRef.current);
2515
- const isCurrentAnimation = currentAnimationName.includes(event.animationName);
2519
+ const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
2516
2520
  if (event.target === node && isCurrentAnimation) {
2517
2521
  send("ANIMATION_END");
2518
2522
  if (!prevPresentRef.current) {
@@ -2854,14 +2858,14 @@ var RemoveScroll = React28.forwardRef(function(props, parentRef) {
2854
2858
  onWheelCapture: nothing,
2855
2859
  onTouchMoveCapture: nothing
2856
2860
  }), callbacks = _a[0], setCallbacks = _a[1];
2857
- var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container3 = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
2861
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container3 = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
2858
2862
  var SideCar2 = sideCar;
2859
2863
  var containerRef = useMergeRefs([ref, parentRef]);
2860
2864
  var containerProps = __assign(__assign({}, rest), callbacks);
2861
2865
  return React28.createElement(
2862
2866
  React28.Fragment,
2863
2867
  null,
2864
- enabled && React28.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
2868
+ enabled && React28.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
2865
2869
  forwardProps ? React28.cloneElement(React28.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React28.createElement(Container3, __assign({}, containerProps, { className, ref: containerRef }), children)
2866
2870
  );
2867
2871
  });
@@ -3137,6 +3141,9 @@ var handleScroll = /* @__PURE__ */ __name(function(axis, endTarget, event, sourc
3137
3141
  var availableScroll = 0;
3138
3142
  var availableScrollTop = 0;
3139
3143
  do {
3144
+ if (!target) {
3145
+ break;
3146
+ }
3140
3147
  var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
3141
3148
  var elementScroll = scroll_1 - capacity - directionFactor * position;
3142
3149
  if (position || elementScroll) {
@@ -3145,11 +3152,8 @@ var handleScroll = /* @__PURE__ */ __name(function(axis, endTarget, event, sourc
3145
3152
  availableScrollTop += position;
3146
3153
  }
3147
3154
  }
3148
- if (target instanceof ShadowRoot) {
3149
- target = target.host;
3150
- } else {
3151
- target = target.parentNode;
3152
- }
3155
+ var parent_1 = target.parentNode;
3156
+ target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
3153
3157
  } while (
3154
3158
  // portaled content
3155
3159
  !targetInLock && target !== document.body || // self content
@@ -3313,7 +3317,7 @@ function RemoveScrollSideCar(props) {
3313
3317
  React31.Fragment,
3314
3318
  null,
3315
3319
  inert ? React31.createElement(Style2, { styles: generateStyle(id) }) : null,
3316
- removeScrollBar ? React31.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null
3320
+ removeScrollBar ? React31.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
3317
3321
  );
3318
3322
  }
3319
3323
  __name(RemoveScrollSideCar, "RemoveScrollSideCar");
@@ -3457,7 +3461,7 @@ var hideOthers = /* @__PURE__ */ __name(function(originalTarget, parentNode, mar
3457
3461
  return null;
3458
3462
  };
3459
3463
  }
3460
- targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live]")));
3464
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
3461
3465
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
3462
3466
  }, "hideOthers");
3463
3467