storybook 10.0.0-beta.2 → 10.0.0-beta.4

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 (75) hide show
  1. package/dist/_node-chunks/{builder-manager-KCNW2J74.js → builder-manager-IKHPPPFE.js} +16 -16
  2. package/dist/_node-chunks/{camelcase-FH5EGUIB.js → camelcase-O2O7JODG.js} +7 -7
  3. package/dist/_node-chunks/{chunk-NTXIDMDM.js → chunk-3J7DQ6TI.js} +7 -7
  4. package/dist/_node-chunks/{chunk-XWJNZVOR.js → chunk-4FMOVB65.js} +8 -8
  5. package/dist/_node-chunks/{chunk-6A2WP6N7.js → chunk-4VGW2SQA.js} +7 -7
  6. package/dist/_node-chunks/chunk-5OILJTZE.js +1476 -0
  7. package/dist/_node-chunks/{chunk-6B3CXS7K.js → chunk-6COBULLV.js} +7 -7
  8. package/dist/_node-chunks/{chunk-HSI4BG2J.js → chunk-7IIAUEWB.js} +8 -8
  9. package/dist/_node-chunks/{chunk-MX77OTGN.js → chunk-AC3BNULF.js} +582 -736
  10. package/dist/_node-chunks/{chunk-CIIY3F53.js → chunk-AXFNB3AN.js} +7 -7
  11. package/dist/_node-chunks/chunk-CHJLO2LV.js +62 -0
  12. package/dist/_node-chunks/{chunk-JWFNAC5N.js → chunk-DCHFG5TX.js} +7 -7
  13. package/dist/_node-chunks/{chunk-7DWWXKIE.js → chunk-FWFQ2GU7.js} +6 -6
  14. package/dist/_node-chunks/{chunk-FXPYWCQE.js → chunk-HAVE6SGK.js} +7 -7
  15. package/dist/_node-chunks/{chunk-2E5IZBC2.js → chunk-IB5AEYPX.js} +7 -7
  16. package/dist/_node-chunks/{chunk-2VOEBWNF.js → chunk-JECCFKKM.js} +7 -7
  17. package/dist/_node-chunks/{chunk-ZF6AXYHM.js → chunk-JP4LEAXM.js} +7 -7
  18. package/dist/_node-chunks/chunk-JSSBBVU5.js +79 -0
  19. package/dist/_node-chunks/chunk-MNG223PY.js +18 -0
  20. package/dist/_node-chunks/{chunk-PTT3CRNJ.js → chunk-MOO2Y4GI.js} +6 -6
  21. package/dist/_node-chunks/{chunk-KDKM7KMS.js → chunk-N3GFXZDP.js} +7 -7
  22. package/dist/_node-chunks/{chunk-B7L5A4BQ.js → chunk-NF3GXIEK.js} +9 -9
  23. package/dist/_node-chunks/{chunk-JZ7ZEAK6.js → chunk-NOSGJ5PL.js} +7 -7
  24. package/dist/_node-chunks/{chunk-DPF2NDLD.js → chunk-OL2HWCBH.js} +7 -7
  25. package/dist/_node-chunks/{chunk-RSG3AEWL.js → chunk-SF2IETZ2.js} +29 -81
  26. package/dist/_node-chunks/{chunk-CGY2ITTD.js → chunk-TBAIXCHN.js} +8 -8
  27. package/dist/_node-chunks/{chunk-CMFB2H3U.js → chunk-TTQRDWDJ.js} +12 -12
  28. package/dist/_node-chunks/{chunk-63VGATS4.js → chunk-TYGVOW7L.js} +7 -7
  29. package/dist/_node-chunks/{chunk-HSS67Y6T.js → chunk-USDZSU5L.js} +7 -7
  30. package/dist/_node-chunks/chunk-XA4TAMUS.js +4966 -0
  31. package/dist/_node-chunks/{chunk-NUODGCJN.js → chunk-XT6O5CVI.js} +7 -7
  32. package/dist/_node-chunks/{chunk-WBRWBEAS.js → chunk-YJHXEN7U.js} +10 -10
  33. package/dist/_node-chunks/{chunk-NWTLWMJN.js → chunk-YRPXGWKW.js} +143 -15
  34. package/dist/_node-chunks/{default-browser-id-YRAH7IMC.js → default-browser-id-J4OIAAJ5.js} +7 -7
  35. package/dist/_node-chunks/{dist-G5THJIW5.js → dist-BMKSKYDI.js} +9 -9
  36. package/dist/_node-chunks/{globby-FGF2JG5Z.js → globby-DASPUXWI.js} +9 -9
  37. package/dist/_node-chunks/{lib-OPOVJQIO.js → lib-L6BIH4EV.js} +11 -11
  38. package/dist/_node-chunks/{mdx-N42X6CFJ-N5MJA4NM.js → mdx-N42X6CFJ-2COTUDSL.js} +8 -8
  39. package/dist/_node-chunks/{p-limit-JNDYEQZX.js → p-limit-HVR3I7TJ.js} +76 -10
  40. package/dist/_node-chunks/{plugin-ZL4ZLDWE.js → plugin-2XPSFYWZ.js} +10 -10
  41. package/dist/_node-chunks/{plugin-6GW4GYGS.js → plugin-FZOHPRK7.js} +10 -10
  42. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-F6BXWV4R.js → webpack-inject-mocker-runtime-plugin-FGQM2EPC.js} +10 -10
  43. package/dist/_node-chunks/{webpack-mock-plugin-5QNP4V3B.js → webpack-mock-plugin-4HOAIYSX.js} +9 -9
  44. package/dist/babel/index.js +11 -11
  45. package/dist/bin/core.js +11 -11
  46. package/dist/bin/dispatcher.js +11 -11
  47. package/dist/bin/loader.js +8 -8
  48. package/dist/cli/index.d.ts +1 -1
  49. package/dist/cli/index.js +29 -30
  50. package/dist/common/index.d.ts +3 -1
  51. package/dist/common/index.js +23 -22
  52. package/dist/core-server/index.js +38 -39
  53. package/dist/core-server/presets/common-override-preset.js +9 -9
  54. package/dist/core-server/presets/common-preset.js +22 -22
  55. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  56. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  57. package/dist/csf/index.js +7 -1
  58. package/dist/csf-tools/index.d.ts +34 -0
  59. package/dist/csf-tools/index.js +9 -9
  60. package/dist/manager/globals-runtime.js +3 -2
  61. package/dist/manager-api/index.d.ts +1 -1
  62. package/dist/manager-api/index.js +1 -1
  63. package/dist/node-logger/index.js +13 -14
  64. package/dist/preview/runtime.js +9 -2
  65. package/dist/preview-api/index.d.ts +67 -68
  66. package/dist/server-errors.js +10 -10
  67. package/dist/telemetry/index.js +24 -25
  68. package/dist/test/index.js +2 -1
  69. package/package.json +3 -7
  70. package/dist/_node-chunks/chunk-2VH25RMB.js +0 -9845
  71. package/dist/_node-chunks/chunk-6FPFMFFH.js +0 -266
  72. package/dist/_node-chunks/chunk-IAAPNJG4.js +0 -62
  73. package/dist/_node-chunks/chunk-IBC4BVDB.js +0 -87
  74. package/dist/_node-chunks/chunk-NNJMYLJM.js +0 -18
  75. package/dist/_node-chunks/chunk-TLM4ECJN.js +0 -2377
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.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
  __name
14
- } from "./chunk-PTT3CRNJ.js";
14
+ } from "./chunk-MOO2Y4GI.js";
15
15
 
16
16
  // ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
17
17
  var comma = ",".charCodeAt(0);
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,20 +12,20 @@ var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
12
12
  import {
13
13
  require_gen_mapping_umd,
14
14
  require_trace_mapping_umd
15
- } from "./chunk-6B3CXS7K.js";
15
+ } from "./chunk-6COBULLV.js";
16
16
  import {
17
17
  require_lib,
18
18
  require_src
19
- } from "./chunk-CIIY3F53.js";
19
+ } from "./chunk-AXFNB3AN.js";
20
20
  import {
21
21
  require_picocolors
22
- } from "./chunk-KDKM7KMS.js";
22
+ } from "./chunk-N3GFXZDP.js";
23
23
  import {
24
24
  __commonJS,
25
25
  __name,
26
26
  __require,
27
27
  __toESM
28
- } from "./chunk-PTT3CRNJ.js";
28
+ } from "./chunk-MOO2Y4GI.js";
29
29
 
30
30
  // ../node_modules/@babel/types/lib/utils/shallowEqual.js
31
31
  var require_shallowEqual = __commonJS({
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  require_dist
14
- } from "./chunk-JZ7ZEAK6.js";
14
+ } from "./chunk-NOSGJ5PL.js";
15
15
  import {
16
16
  __name,
17
17
  __toESM
18
- } from "./chunk-PTT3CRNJ.js";
18
+ } from "./chunk-MOO2Y4GI.js";
19
19
 
20
20
  // src/csf-tools/CsfFile.ts
21
21
  var import_ts_dedent = __toESM(require_dist(), 1);
@@ -165,7 +165,7 @@ var NoMetaError = class extends Error {
165
165
  super(import_ts_dedent.dedent`
166
166
  CSF: ${msg} ${formatLocation(ast, fileName)}
167
167
 
168
- More info: https://storybook.js.org/docs/writing-stories#default-export?ref=error
168
+ More info: https://storybook.js.org/docs/writing-stories?ref=error#default-export
169
169
  `);
170
170
  this.name = this.constructor.name;
171
171
  }
@@ -179,7 +179,7 @@ var MultipleMetaError = class extends Error {
179
179
  super(import_ts_dedent.dedent`
180
180
  CSF: ${message} ${formatLocation(ast, fileName)}
181
181
 
182
- More info: https://storybook.js.org/docs/writing-stories#default-export?ref=error
182
+ More info: https://storybook.js.org/docs/writing-stories?ref=error#default-export
183
183
  `);
184
184
  this.name = this.constructor.name;
185
185
  }
@@ -193,7 +193,7 @@ var MixedFactoryError = class extends Error {
193
193
  super(import_ts_dedent.dedent`
194
194
  CSF: ${message} ${formatLocation(ast, fileName)}
195
195
 
196
- More info: https://storybook.js.org/docs/writing-stories#default-export?ref=error
196
+ More info: https://storybook.js.org/docs/writing-stories?ref=error#default-export
197
197
  `);
198
198
  this.name = this.constructor.name;
199
199
  }
@@ -207,7 +207,7 @@ var BadMetaError = class extends Error {
207
207
  super(import_ts_dedent.dedent`
208
208
  CSF: ${message} ${formatLocation(ast, fileName)}
209
209
 
210
- More info: https://storybook.js.org/docs/writing-stories#default-export?ref=error
210
+ More info: https://storybook.js.org/docs/writing-stories?ref=error#default-export
211
211
  `);
212
212
  this.name = this.constructor.name;
213
213
  }
@@ -339,9 +339,15 @@ var CsfFile = class {
339
339
  metaNode = decl;
340
340
  } else if (
341
341
  // export default { ... } as Meta<...>
342
+ // export default { ... } satisfies Meta<...>
342
343
  (t2.isTSAsExpression(decl) || t2.isTSSatisfiesExpression(decl)) && t2.isObjectExpression(decl.expression)
343
344
  ) {
344
345
  metaNode = decl.expression;
346
+ } else if (
347
+ // export default { ... } satisfies Meta as Meta<...>
348
+ t2.isTSAsExpression(decl) && t2.isTSSatisfiesExpression(decl.expression) && t2.isObjectExpression(decl.expression.expression)
349
+ ) {
350
+ metaNode = decl.expression.expression;
345
351
  }
346
352
  if (metaNode && t2.isProgram(parent)) {
347
353
  self._parseMeta(metaNode, parent);
@@ -387,7 +393,13 @@ var CsfFile = class {
387
393
  }
388
394
  let storyNode;
389
395
  if (t2.isVariableDeclarator(decl)) {
390
- storyNode = t2.isTSAsExpression(decl.init) || t2.isTSSatisfiesExpression(decl.init) ? decl.init.expression : decl.init;
396
+ if (t2.isTSAsExpression(decl.init) && t2.isTSSatisfiesExpression(decl.init.expression)) {
397
+ storyNode = decl.init.expression.expression;
398
+ } else if (t2.isTSAsExpression(decl.init) || t2.isTSSatisfiesExpression(decl.init)) {
399
+ storyNode = decl.init.expression;
400
+ } else {
401
+ storyNode = decl.init;
402
+ }
391
403
  } else {
392
404
  storyNode = decl;
393
405
  }
@@ -469,9 +481,15 @@ var CsfFile = class {
469
481
  metaNode = decl;
470
482
  } else if (
471
483
  // export default { ... } as Meta<...>
472
- t2.isTSAsExpression(decl) && t2.isObjectExpression(decl.expression)
484
+ // export default { ... } satisfies Meta<...>
485
+ (t2.isTSAsExpression(decl) || t2.isTSSatisfiesExpression(decl)) && t2.isObjectExpression(decl.expression)
473
486
  ) {
474
487
  metaNode = decl.expression;
488
+ } else if (
489
+ // export default { ... } satisfies Meta as Meta<...>
490
+ t2.isTSAsExpression(decl) && t2.isTSSatisfiesExpression(decl.expression) && t2.isObjectExpression(decl.expression.expression)
491
+ ) {
492
+ metaNode = decl.expression.expression;
475
493
  }
476
494
  if (metaNode && t2.isProgram(parent)) {
477
495
  self._parseMeta(metaNode, parent);
@@ -539,7 +557,7 @@ var CsfFile = class {
539
557
  throw new Error(import_ts_dedent.dedent`
540
558
  Unexpected \`storiesOf\` usage: ${formatLocation(node, self._options.fileName)}.
541
559
 
542
- SB8 does not support \`storiesOf\`.
560
+ SB8 does not support \`storiesOf\`.
543
561
  `);
544
562
  }
545
563
  if (t2.isMemberExpression(callee) && t2.isIdentifier(callee.property) && callee.property.name === "meta" && t2.isIdentifier(callee.object) && node.arguments.length > 0) {
@@ -1425,6 +1443,116 @@ var ConfigFile = class {
1425
1443
  }
1426
1444
  }
1427
1445
  }
1446
+ _removeRequireImport(importSpecifier, fromImport) {
1447
+ const requireDeclarationIndex = this._ast.program.body.findIndex((node) => {
1448
+ const hasDeclaration = t3.isVariableDeclaration(node) && node.declarations.length === 1 && t3.isVariableDeclarator(node.declarations[0]) && t3.isCallExpression(node.declarations[0].init) && t3.isIdentifier(node.declarations[0].init.callee) && node.declarations[0].init.callee.name === "require" && t3.isStringLiteral(node.declarations[0].init.arguments[0]) && (node.declarations[0].init.arguments[0].value === fromImport || node.declarations[0].init.arguments[0].value === fromImport.split("node:")[1]);
1449
+ return hasDeclaration;
1450
+ });
1451
+ if (requireDeclarationIndex === -1) {
1452
+ return;
1453
+ }
1454
+ const requireDeclaration = this._ast.program.body[requireDeclarationIndex];
1455
+ const declarator = requireDeclaration.declarations[0];
1456
+ if (importSpecifier === null) {
1457
+ return;
1458
+ }
1459
+ if (typeof importSpecifier === "string") {
1460
+ if (t3.isIdentifier(declarator.id) && declarator.id.name === importSpecifier) {
1461
+ this._ast.program.body.splice(requireDeclarationIndex, 1);
1462
+ }
1463
+ return;
1464
+ }
1465
+ if (typeof importSpecifier === "object" && "namespace" in importSpecifier) {
1466
+ return;
1467
+ }
1468
+ if (Array.isArray(importSpecifier) && t3.isObjectPattern(declarator.id)) {
1469
+ const objectPattern = declarator.id;
1470
+ importSpecifier.forEach((specifier) => {
1471
+ const index = objectPattern.properties.findIndex(
1472
+ (prop) => t3.isObjectProperty(prop) && t3.isIdentifier(prop.key) && prop.key.name === specifier
1473
+ );
1474
+ if (index !== -1) {
1475
+ objectPattern.properties.splice(index, 1);
1476
+ }
1477
+ });
1478
+ if (objectPattern.properties.length === 0) {
1479
+ this._ast.program.body.splice(requireDeclarationIndex, 1);
1480
+ }
1481
+ }
1482
+ }
1483
+ _removeImport(importSpecifier, fromImport) {
1484
+ const importDeclarationIndex = this._ast.program.body.findIndex(
1485
+ (node) => t3.isImportDeclaration(node) && (node.source.value === fromImport || node.source.value === fromImport.split("node:")[1])
1486
+ );
1487
+ if (importDeclarationIndex === -1) {
1488
+ return;
1489
+ }
1490
+ const importDeclaration = this._ast.program.body[importDeclarationIndex];
1491
+ if (importSpecifier === null) {
1492
+ if (importDeclaration.specifiers.length === 0) {
1493
+ this._ast.program.body.splice(importDeclarationIndex, 1);
1494
+ }
1495
+ return;
1496
+ }
1497
+ if (typeof importSpecifier === "object" && "namespace" in importSpecifier) {
1498
+ const index = importDeclaration.specifiers.findIndex(
1499
+ (specifier) => t3.isImportNamespaceSpecifier(specifier) && t3.isIdentifier(specifier.local) && specifier.local.name === importSpecifier.namespace
1500
+ );
1501
+ if (index !== -1) {
1502
+ importDeclaration.specifiers.splice(index, 1);
1503
+ }
1504
+ }
1505
+ if (typeof importSpecifier === "string") {
1506
+ const index = importDeclaration.specifiers.findIndex(
1507
+ (specifier) => t3.isImportDefaultSpecifier(specifier) && t3.isIdentifier(specifier.local) && specifier.local.name === importSpecifier
1508
+ );
1509
+ if (index !== -1) {
1510
+ importDeclaration.specifiers.splice(index, 1);
1511
+ }
1512
+ }
1513
+ if (Array.isArray(importSpecifier)) {
1514
+ importSpecifier.forEach((specifier) => {
1515
+ const index = importDeclaration.specifiers.findIndex(
1516
+ (current) => t3.isImportSpecifier(current) && t3.isIdentifier(current.imported) && current.imported.name === specifier
1517
+ );
1518
+ if (index !== -1) {
1519
+ importDeclaration.specifiers.splice(index, 1);
1520
+ }
1521
+ });
1522
+ }
1523
+ if (importDeclaration.specifiers.length === 0) {
1524
+ this._ast.program.body.splice(importDeclarationIndex, 1);
1525
+ }
1526
+ }
1527
+ /**
1528
+ * Remove import specifiers for a given import statement.
1529
+ *
1530
+ * Does not support removing type imports (yet)
1531
+ *
1532
+ * @example
1533
+ *
1534
+ * ```ts
1535
+ * // import { foo } from 'bar';
1536
+ * setImport(['foo'], 'bar');
1537
+ *
1538
+ * // import foo from 'bar';
1539
+ * setImport('foo', 'bar');
1540
+ *
1541
+ * // import * as foo from 'bar';
1542
+ * setImport({ namespace: 'foo' }, 'bar');
1543
+ *
1544
+ * // import 'bar';
1545
+ * setImport(null, 'bar');
1546
+ * ```
1547
+ *
1548
+ * @param importSpecifiers - The import specifiers to remove. If a string is passed in, will only
1549
+ * remove the default import. Otherwise, named imports matching the array will be removed.
1550
+ * @param fromImport - The module to import from
1551
+ */
1552
+ removeImport(importSpecifier, fromImport) {
1553
+ this._removeRequireImport(importSpecifier, fromImport);
1554
+ this._removeImport(importSpecifier, fromImport);
1555
+ }
1428
1556
  };
1429
1557
  var loadConfig = /* @__PURE__ */ __name((code, fileName) => {
1430
1558
  const ast = babelParse2(code);
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -15,7 +15,7 @@ import {
15
15
  __name,
16
16
  __require,
17
17
  __toESM
18
- } from "./chunk-PTT3CRNJ.js";
18
+ } from "./chunk-MOO2Y4GI.js";
19
19
 
20
20
  // ../node_modules/big-integer/BigInteger.js
21
21
  var require_BigInteger = __commonJS({
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.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
  toEstree
14
- } from "./chunk-2E5IZBC2.js";
14
+ } from "./chunk-IB5AEYPX.js";
15
15
  import {
16
16
  __name
17
- } from "./chunk-PTT3CRNJ.js";
17
+ } from "./chunk-MOO2Y4GI.js";
18
18
 
19
19
  // ../node_modules/@storybook/docs-mdx/dist/index.js
20
20
  var getAttr = /* @__PURE__ */ __name((elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute" && n.name.name === what), "getAttr");
@@ -161,7 +161,7 @@ var analyze = /* @__PURE__ */ __name(async (code) => {
161
161
  metaTags: void 0,
162
162
  imports: void 0
163
163
  };
164
- const { compile } = await import("./mdx-N42X6CFJ-N5MJA4NM.js");
164
+ const { compile } = await import("./mdx-N42X6CFJ-2COTUDSL.js");
165
165
  await compile(code, {
166
166
  rehypePlugins: [[plugin, store]]
167
167
  });
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,16 +12,16 @@ var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
12
12
  import {
13
13
  require_picomatch,
14
14
  require_utils
15
- } from "./chunk-2VOEBWNF.js";
15
+ } from "./chunk-JECCFKKM.js";
16
16
  import {
17
17
  slash
18
- } from "./chunk-DPF2NDLD.js";
18
+ } from "./chunk-OL2HWCBH.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __name,
22
22
  __require,
23
23
  __toESM
24
- } from "./chunk-PTT3CRNJ.js";
24
+ } from "./chunk-MOO2Y4GI.js";
25
25
 
26
26
  // ../node_modules/fast-glob/out/utils/array.js
27
27
  var require_array = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,7 +14,7 @@ import {
14
14
  __name,
15
15
  __require,
16
16
  __toESM
17
- } from "./chunk-PTT3CRNJ.js";
17
+ } from "./chunk-MOO2Y4GI.js";
18
18
 
19
19
  // ../node_modules/app-root-dir/lib/index.js
20
20
  var require_lib = __commonJS({
@@ -53,9 +53,9 @@ var require_lib = __commonJS({
53
53
  }
54
54
  });
55
55
 
56
- // ../node_modules/lazy-universal-dotenv/node_modules/dotenv/package.json
56
+ // ../node_modules/dotenv/package.json
57
57
  var require_package = __commonJS({
58
- "../node_modules/lazy-universal-dotenv/node_modules/dotenv/package.json"(exports, module) {
58
+ "../node_modules/dotenv/package.json"(exports, module) {
59
59
  module.exports = {
60
60
  name: "dotenv",
61
61
  version: "16.5.0",
@@ -121,9 +121,9 @@ var require_package = __commonJS({
121
121
  }
122
122
  });
123
123
 
124
- // ../node_modules/lazy-universal-dotenv/node_modules/dotenv/lib/main.js
124
+ // ../node_modules/dotenv/lib/main.js
125
125
  var require_main = __commonJS({
126
- "../node_modules/lazy-universal-dotenv/node_modules/dotenv/lib/main.js"(exports, module) {
126
+ "../node_modules/dotenv/lib/main.js"(exports, module) {
127
127
  var fs2 = __require("fs");
128
128
  var path2 = __require("path");
129
129
  var os = __require("os");
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -23,10 +23,10 @@ import {
23
23
  start,
24
24
  toEstree,
25
25
  unreachable
26
- } from "./chunk-2E5IZBC2.js";
26
+ } from "./chunk-IB5AEYPX.js";
27
27
  import {
28
28
  __name
29
- } from "./chunk-PTT3CRNJ.js";
29
+ } from "./chunk-MOO2Y4GI.js";
30
30
 
31
31
  // ../node_modules/@storybook/docs-mdx/dist/mdx-N42X6CFJ.js
32
32
  import { default as default2 } from "path";
@@ -1,20 +1,86 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.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 {
13
- Queue
14
- } from "./chunk-IBC4BVDB.js";
15
12
  import {
16
13
  __name
17
- } from "./chunk-PTT3CRNJ.js";
14
+ } from "./chunk-MOO2Y4GI.js";
15
+
16
+ // ../node_modules/yocto-queue/index.js
17
+ var Node = class {
18
+ static {
19
+ __name(this, "Node");
20
+ }
21
+ value;
22
+ next;
23
+ constructor(value) {
24
+ this.value = value;
25
+ }
26
+ };
27
+ var Queue = class {
28
+ static {
29
+ __name(this, "Queue");
30
+ }
31
+ #head;
32
+ #tail;
33
+ #size;
34
+ constructor() {
35
+ this.clear();
36
+ }
37
+ enqueue(value) {
38
+ const node = new Node(value);
39
+ if (this.#head) {
40
+ this.#tail.next = node;
41
+ this.#tail = node;
42
+ } else {
43
+ this.#head = node;
44
+ this.#tail = node;
45
+ }
46
+ this.#size++;
47
+ }
48
+ dequeue() {
49
+ const current = this.#head;
50
+ if (!current) {
51
+ return;
52
+ }
53
+ this.#head = this.#head.next;
54
+ this.#size--;
55
+ return current.value;
56
+ }
57
+ peek() {
58
+ if (!this.#head) {
59
+ return;
60
+ }
61
+ return this.#head.value;
62
+ }
63
+ clear() {
64
+ this.#head = void 0;
65
+ this.#tail = void 0;
66
+ this.#size = 0;
67
+ }
68
+ get size() {
69
+ return this.#size;
70
+ }
71
+ *[Symbol.iterator]() {
72
+ let current = this.#head;
73
+ while (current) {
74
+ yield current.value;
75
+ current = current.next;
76
+ }
77
+ }
78
+ *drain() {
79
+ while (this.#head) {
80
+ yield this.dequeue();
81
+ }
82
+ }
83
+ };
18
84
 
19
85
  // ../node_modules/p-limit/index.js
20
86
  function pLimit(concurrency) {
@@ -1,25 +1,25 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.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
  resolvePackageDir
14
- } from "./chunk-CGY2ITTD.js";
15
- import "./chunk-6A2WP6N7.js";
14
+ } from "./chunk-TBAIXCHN.js";
15
+ import "./chunk-4VGW2SQA.js";
16
16
  import {
17
17
  require_dist
18
- } from "./chunk-JZ7ZEAK6.js";
18
+ } from "./chunk-NOSGJ5PL.js";
19
19
  import {
20
20
  __name,
21
21
  __toESM
22
- } from "./chunk-PTT3CRNJ.js";
22
+ } from "./chunk-MOO2Y4GI.js";
23
23
 
24
24
  // src/core-server/presets/vitePlugins/vite-inject-mocker/plugin.ts
25
25
  import { readFileSync } from "node:fs";
@@ -1,29 +1,29 @@
1
- import CJS_COMPAT_NODE_URL_qfbekemo7ri from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qfbekemo7ri from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qfbekemo7ri from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qfbekemo7ri.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qfbekemo7ri.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qfbekemo7ri.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.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
  getAutomockCode
14
- } from "./chunk-NUODGCJN.js";
14
+ } from "./chunk-XT6O5CVI.js";
15
15
  import {
16
16
  babelParser,
17
17
  extractMockCalls,
18
18
  getRealPath,
19
19
  rewriteSbMockImportCalls
20
- } from "./chunk-HSI4BG2J.js";
20
+ } from "./chunk-7IIAUEWB.js";
21
21
  import {
22
22
  normalize
23
- } from "./chunk-6A2WP6N7.js";
23
+ } from "./chunk-4VGW2SQA.js";
24
24
  import {
25
25
  __name
26
- } from "./chunk-PTT3CRNJ.js";
26
+ } from "./chunk-MOO2Y4GI.js";
27
27
 
28
28
  // src/core-server/presets/vitePlugins/vite-mock/plugin.ts
29
29
  import { readFileSync } from "node:fs";