storybook 10.2.0-alpha.8 → 10.2.0-beta.0

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 (97) hide show
  1. package/dist/_browser-chunks/{Color-E5XDEOX4.js → Color-XESOIGZP.js} +57 -3
  2. package/dist/_browser-chunks/chunk-AFVOZMXQ.js +23 -0
  3. package/dist/_browser-chunks/{chunk-3PJE6VLG.js → chunk-ASKQZAOS.js} +1 -12
  4. package/dist/_browser-chunks/chunk-IYCKG66Y.js +171 -0
  5. package/dist/_browser-chunks/chunk-LCHBOIHN.js +64 -0
  6. package/dist/_browser-chunks/{chunk-IPA5A322.js → chunk-MEXTPDJG.js} +1 -1
  7. package/dist/_browser-chunks/{chunk-54PNNATT.js → chunk-NQJGOFZV.js} +18 -1
  8. package/dist/_browser-chunks/{chunk-VUZYLZ4B.js → chunk-QOXZ7W26.js} +31 -15
  9. package/dist/_browser-chunks/{chunk-LOTN4ZCW.js → chunk-SI6AKD4S.js} +2 -2
  10. package/dist/_browser-chunks/chunk-YK43Z22A.js +263 -0
  11. package/dist/_node-chunks/{builder-manager-2XASU3VS.js → builder-manager-JEJE63VV.js} +15 -12
  12. package/dist/_node-chunks/camelcase-HALRJETF.js +62 -0
  13. package/dist/_node-chunks/{chunk-5GRHJJHD.js → chunk-3SKE4CCB.js} +9 -9
  14. package/dist/_node-chunks/chunk-4UYAC7Y2.js +18 -0
  15. package/dist/_node-chunks/{chunk-S7FIFCTX.js → chunk-6UAQEBJX.js} +10 -10
  16. package/dist/_node-chunks/{chunk-ZKB7MQRR.js → chunk-72K4WVI5.js} +18 -14
  17. package/dist/_node-chunks/{chunk-6TJUL42C.js → chunk-7ZX5CX6B.js} +15 -69
  18. package/dist/_node-chunks/{chunk-LEZENLG7.js → chunk-ADTWC7QJ.js} +7 -7
  19. package/dist/_node-chunks/{chunk-2OC7H5MZ.js → chunk-APUXGW3Y.js} +7 -7
  20. package/dist/_node-chunks/{chunk-5WQXPM6D.js → chunk-AXDM43NU.js} +6 -6
  21. package/dist/_node-chunks/{chunk-LOXLI4XT.js → chunk-B422K4XV.js} +6 -6
  22. package/dist/_node-chunks/{chunk-3K6P75SS.js → chunk-BJOXVTWM.js} +12 -571
  23. package/dist/_node-chunks/{chunk-TTGXODEY.js → chunk-BLGRU6F5.js} +7 -7
  24. package/dist/_node-chunks/{chunk-2KSITKBI.js → chunk-CG47ALAV.js} +7 -7
  25. package/dist/_node-chunks/chunk-FH4FRUMP.js +23 -0
  26. package/dist/_node-chunks/{chunk-DTM4A3DJ.js → chunk-GBZ23FIZ.js} +125 -73
  27. package/dist/_node-chunks/{chunk-IJ34563N.js → chunk-IZ3ATSWZ.js} +5262 -1480
  28. package/dist/_node-chunks/{chunk-JWL5NLJU.js → chunk-IZFEBWVB.js} +6 -6
  29. package/dist/_node-chunks/{chunk-5BRYY6XB.js → chunk-KL5CKFPT.js} +9 -9
  30. package/dist/_node-chunks/{chunk-COGO4JMD.js → chunk-MLXCYULR.js} +7 -7
  31. package/dist/_node-chunks/{chunk-7B4JYHGV.js → chunk-MV2QM7P3.js} +6 -6
  32. package/dist/_node-chunks/chunk-PHX5XNP7.js +144 -0
  33. package/dist/_node-chunks/{chunk-VJFHZL2T.js → chunk-QL6L57W7.js} +533 -144
  34. package/dist/_node-chunks/{chunk-Q6WPGVIW.js → chunk-RPBXVPRB.js} +6 -6
  35. package/dist/_node-chunks/{chunk-DYQ6QR45.js → chunk-UH2GWMFP.js} +260 -162
  36. package/dist/_node-chunks/chunk-WNGL2VRJ.js +126 -0
  37. package/dist/_node-chunks/{chunk-WKC523P7.js → chunk-XAL452XB.js} +36 -14
  38. package/dist/_node-chunks/{chunk-UNHOAAXU.js → chunk-YVXXMWQO.js} +7 -7
  39. package/dist/_node-chunks/chunk-YYDL7JOC.js +61 -0
  40. package/dist/_node-chunks/{chunk-MLYPMYG5.js → chunk-Z7FLE2TR.js} +6 -6
  41. package/dist/_node-chunks/{globby-FWMT4OOQ.js → globby-4D4NBVG7.js} +11 -20
  42. package/dist/_node-chunks/{lib-YCGXIMW5.js → lib-RM2DWHZQ.js} +7 -7
  43. package/dist/_node-chunks/{mdx-N42X6CFJ-CRGM5LTU.js → mdx-N42X6CFJ-RAL72UTP.js} +8 -8
  44. package/dist/_node-chunks/{p-limit-UJIYI4QT.js → p-limit-6PUJQL5X.js} +18 -14
  45. package/dist/babel/index.js +10 -10
  46. package/dist/bin/core.js +12 -12
  47. package/dist/bin/dispatcher.js +11 -11
  48. package/dist/bin/loader.js +9 -9
  49. package/dist/cli/index.d.ts +1504 -424
  50. package/dist/cli/index.js +18 -18
  51. package/dist/common/index.d.ts +1319 -271
  52. package/dist/common/index.js +22 -22
  53. package/dist/components/index.d.ts +4 -1
  54. package/dist/components/index.js +228 -227
  55. package/dist/core-events/index.d.ts +23 -7
  56. package/dist/core-events/index.js +5 -1
  57. package/dist/core-server/index.d.ts +108 -4
  58. package/dist/core-server/index.js +3459 -3086
  59. package/dist/core-server/presets/common-manager.js +208 -160
  60. package/dist/core-server/presets/common-override-preset.js +11 -11
  61. package/dist/core-server/presets/common-preset.js +576 -4536
  62. package/dist/csf/index.d.ts +147 -15
  63. package/dist/csf/index.js +52 -23
  64. package/dist/csf-tools/index.d.ts +19 -1
  65. package/dist/csf-tools/index.js +11 -9
  66. package/dist/docs-tools/index.d.ts +2 -2
  67. package/dist/docs-tools/index.js +4 -5
  68. package/dist/manager/globals-runtime.js +2749 -6907
  69. package/dist/manager/runtime.js +2939 -2295
  70. package/dist/manager-api/index.d.ts +89 -21
  71. package/dist/manager-api/index.js +82 -23
  72. package/dist/mocking-utils/index.js +8 -8
  73. package/dist/node-logger/index.d.ts +1453 -108
  74. package/dist/node-logger/index.js +9 -9
  75. package/dist/preview/runtime.js +784 -5059
  76. package/dist/preview-api/index.d.ts +26 -1
  77. package/dist/preview-api/index.js +11 -8
  78. package/dist/router/index.js +5 -4
  79. package/dist/server-errors.js +11 -11
  80. package/dist/telemetry/index.d.ts +14 -2
  81. package/dist/telemetry/index.js +23 -22
  82. package/dist/theming/index.d.ts +5 -5
  83. package/dist/theming/index.js +21 -2
  84. package/dist/types/index.d.ts +24 -11
  85. package/dist/viewport/index.d.ts +5 -3
  86. package/dist/viewport/index.js +12 -3
  87. package/package.json +27 -26
  88. package/dist/_browser-chunks/chunk-2NDLAB5X.js +0 -363
  89. package/dist/_browser-chunks/chunk-CLSHX4VX.js +0 -4140
  90. package/dist/_browser-chunks/chunk-HPYUT3WS.js +0 -199
  91. package/dist/_browser-chunks/chunk-XCZK5QUJ.js +0 -0
  92. package/dist/_node-chunks/camelcase-KIWRHB2G.js +0 -37
  93. package/dist/_node-chunks/chunk-2ANLCK4Y.js +0 -18
  94. package/dist/_node-chunks/chunk-3TW66YXG.js +0 -70
  95. package/dist/_node-chunks/chunk-UFXCGC4W.js +0 -23
  96. package/dist/_node-chunks/chunk-X4YDIHYE.js +0 -61
  97. package/dist/_node-chunks/dist-GICI6ZHU.js +0 -121
@@ -1,39 +1,40 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.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
  any,
14
+ detectIndent,
14
15
  invariant,
15
16
  up2 as up
16
- } from "./chunk-3TW66YXG.js";
17
+ } from "./chunk-WNGL2VRJ.js";
17
18
  import {
18
19
  resolvePackageDir
19
- } from "./chunk-2OC7H5MZ.js";
20
+ } from "./chunk-APUXGW3Y.js";
20
21
  import {
21
22
  require_dist
22
- } from "./chunk-TTGXODEY.js";
23
+ } from "./chunk-BLGRU6F5.js";
23
24
  import {
24
25
  babelParse,
25
26
  recast,
26
27
  traverse,
27
28
  types
28
- } from "./chunk-5BRYY6XB.js";
29
+ } from "./chunk-KL5CKFPT.js";
29
30
  import {
30
31
  require_picocolors
31
- } from "./chunk-2KSITKBI.js";
32
+ } from "./chunk-CG47ALAV.js";
32
33
  import {
33
34
  __commonJS,
34
35
  __require,
35
36
  __toESM
36
- } from "./chunk-5WQXPM6D.js";
37
+ } from "./chunk-AXDM43NU.js";
37
38
 
38
39
  // ../../node_modules/esprima/dist/esprima.js
39
40
  var require_esprima = __commonJS({
@@ -5602,63 +5603,6 @@ import { readFile as readFile3, writeFile as writeFile2 } from "node:fs/promises
5602
5603
  import { getProjectRoot } from "storybook/internal/common";
5603
5604
  import { readConfig, writeConfig } from "storybook/internal/csf-tools";
5604
5605
  import { logger as logger2, prompt as prompt2 } from "storybook/internal/node-logger";
5605
-
5606
- // ../../node_modules/detect-indent/index.js
5607
- var INDENT_REGEX = /^(?:( )+|\t+)/, INDENT_TYPE_SPACE = "space";
5608
- function makeIndentsMap(string, ignoreSingleSpaces) {
5609
- let indents = /* @__PURE__ */ new Map(), previousSize = 0, previousIndentType, key;
5610
- for (let line of string.split(/\n/g)) {
5611
- if (!line)
5612
- continue;
5613
- let indent, indentType, use, weight, entry, matches = line.match(INDENT_REGEX);
5614
- if (matches === null)
5615
- previousSize = 0, previousIndentType = "";
5616
- else {
5617
- if (indent = matches[0].length, indentType = matches[1] ? INDENT_TYPE_SPACE : "tab", ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1)
5618
- continue;
5619
- indentType !== previousIndentType && (previousSize = 0), previousIndentType = indentType, use = 1, weight = 0;
5620
- let indentDifference = indent - previousSize;
5621
- if (previousSize = indent, indentDifference === 0)
5622
- use = 0, weight = 1;
5623
- else {
5624
- let absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference;
5625
- key = encodeIndentsKey(indentType, absoluteIndentDifference);
5626
- }
5627
- entry = indents.get(key), entry = entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight], indents.set(key, entry);
5628
- }
5629
- }
5630
- return indents;
5631
- }
5632
- function encodeIndentsKey(indentType, indentAmount) {
5633
- return (indentType === INDENT_TYPE_SPACE ? "s" : "t") + String(indentAmount);
5634
- }
5635
- function decodeIndentsKey(indentsKey) {
5636
- let type = indentsKey[0] === "s" ? INDENT_TYPE_SPACE : "tab", amount = Number(indentsKey.slice(1));
5637
- return { type, amount };
5638
- }
5639
- function getMostUsedKey(indents) {
5640
- let result, maxUsed = 0, maxWeight = 0;
5641
- for (let [key, [usedCount, weight]] of indents)
5642
- (usedCount > maxUsed || usedCount === maxUsed && weight > maxWeight) && (maxUsed = usedCount, maxWeight = weight, result = key);
5643
- return result;
5644
- }
5645
- function makeIndentString(type, amount) {
5646
- return (type === INDENT_TYPE_SPACE ? " " : " ").repeat(amount);
5647
- }
5648
- function detectIndent(string) {
5649
- if (typeof string != "string")
5650
- throw new TypeError("Expected a string");
5651
- let indents = makeIndentsMap(string, !0);
5652
- indents.size === 0 && (indents = makeIndentsMap(string, !1));
5653
- let keyOfMostUsedIndent = getMostUsedKey(indents), type, amount = 0, indent = "";
5654
- return keyOfMostUsedIndent !== void 0 && ({ type, amount } = decodeIndentsKey(keyOfMostUsedIndent), indent = makeIndentString(type, amount)), {
5655
- amount,
5656
- type,
5657
- indent
5658
- };
5659
- }
5660
-
5661
- // src/cli/eslintPlugin.ts
5662
5606
  var import_picocolors2 = __toESM(require_picocolors(), 1), import_ts_dedent = __toESM(require_dist(), 1);
5663
5607
  var SUPPORTED_ESLINT_EXTENSIONS = ["ts", "mts", "cts", "mjs", "js", "cjs", "json"], UNSUPPORTED_ESLINT_EXTENSIONS = ["yaml", "yml"], findEslintFile = (instanceDir) => {
5664
5608
  let filePrefixes = ["eslint.config", ".eslintrc"];
@@ -5865,6 +5809,8 @@ var AddonVitestService = class {
5865
5809
  */
5866
5810
  async installPlaywright(options = {}) {
5867
5811
  let errors = [], playwrightCommand = ["playwright", "install", "chromium", "--with-deps"], playwrightCommandString = this.packageManager.getPackageCommand(playwrightCommand), result;
5812
+ if (process.env.STORYBOOK_CLI_SKIP_PLAYWRIGHT_INSTALLATION)
5813
+ return result = "skipped", { errors, result };
5868
5814
  try {
5869
5815
  (options.yes ? !0 : await (async () => (logger3.log(import_ts_dedent2.dedent`
5870
5816
  Playwright browser binaries are necessary for @storybook/addon-vitest. The download can take some time. If you don't want to wait, you can skip the installation and run the following command manually later:
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __require
15
- } from "./chunk-5WQXPM6D.js";
15
+ } from "./chunk-AXDM43NU.js";
16
16
 
17
17
  // ../../node_modules/totalist/sync/index.js
18
18
  var require_sync = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
12
12
  import {
13
13
  dirname,
14
14
  join
15
- } from "./chunk-7B4JYHGV.js";
15
+ } from "./chunk-MV2QM7P3.js";
16
16
 
17
17
  // ../../node_modules/exsolve/dist/index.mjs
18
18
  import fs, { lstatSync, realpathSync, statSync } from "node:fs";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration