storybook 10.1.0-alpha.3 → 10.1.0-alpha.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 (83) hide show
  1. package/dist/_browser-chunks/{chunk-C4XOKMDU.js → chunk-OWPZQM2D.js} +6 -3
  2. package/dist/_node-chunks/{builder-manager-GBWCUYRR.js → builder-manager-HXWPSC26.js} +13 -12
  3. package/dist/_node-chunks/camelcase-EPBTPRKM.js +18 -0
  4. package/dist/_node-chunks/chunk-5J4A3TMT.js +61 -0
  5. package/dist/_node-chunks/{chunk-YFBIEJ33.js → chunk-5N5IOGP5.js} +7 -7
  6. package/dist/_node-chunks/{chunk-JKWP2FKQ.js → chunk-6PMHAMVH.js} +7 -7
  7. package/dist/_node-chunks/{chunk-GMO24NTJ.js → chunk-AGAEDIW3.js} +7 -7
  8. package/dist/_node-chunks/{chunk-2JHIUWIN.js → chunk-ALUDPZO7.js} +7 -7
  9. package/dist/_node-chunks/{chunk-TZ7GUTJ4.js → chunk-B2ZH4DAZ.js} +7 -7
  10. package/dist/_node-chunks/{chunk-YJJWZPL7.js → chunk-BI2ELK6M.js} +36 -43
  11. package/dist/_node-chunks/{chunk-NYXHMPY4.js → chunk-BTM6MC3G.js} +7 -7
  12. package/dist/_node-chunks/{chunk-AX2PCJZ2.js → chunk-BXVT2NM5.js} +6 -6
  13. package/dist/_node-chunks/{chunk-NTX43F34.js → chunk-C7ZCWXID.js} +7 -7
  14. package/dist/_node-chunks/{chunk-5X7FGASE.js → chunk-CACFLAKV.js} +7 -7
  15. package/dist/_node-chunks/{chunk-5KDXQR2J.js → chunk-CPKCCBQ2.js} +7 -7
  16. package/dist/_node-chunks/{chunk-MDXYV4OF.js → chunk-E4M5YSPI.js} +15 -15
  17. package/dist/_node-chunks/{chunk-RLMJDF6S.js → chunk-ENL6NO7V.js} +8 -8
  18. package/dist/_node-chunks/{chunk-BNO5FB6B.js → chunk-F74NOPTY.js} +8 -8
  19. package/dist/_node-chunks/{chunk-HH57J4TX.js → chunk-GHP33MSW.js} +8 -8
  20. package/dist/_node-chunks/{chunk-TDLKTACT.js → chunk-H7C65LNN.js} +7 -7
  21. package/dist/_node-chunks/{chunk-C4UVY6FF.js → chunk-I7KSYHUC.js} +7 -7
  22. package/dist/_node-chunks/{chunk-SQAKXWVV.js → chunk-IQY7L7HV.js} +7 -7
  23. package/dist/_node-chunks/{chunk-ZQY3BNST.js → chunk-LNNX4NF3.js} +12 -12
  24. package/dist/_node-chunks/{chunk-N7XYNLCJ.js → chunk-MK7DAIA6.js} +7 -7
  25. package/dist/_node-chunks/{chunk-NCHBSJG3.js → chunk-MRNEYOX6.js} +21 -21
  26. package/dist/_node-chunks/{chunk-CKXP5RYA.js → chunk-N6PPZW7K.js} +9 -9
  27. package/dist/_node-chunks/{chunk-APKZWRTX.js → chunk-NAJMTFFS.js} +7 -7
  28. package/dist/_node-chunks/{chunk-TSKLBMF3.js → chunk-NBNSA2WK.js} +8 -8
  29. package/dist/_node-chunks/{chunk-B63HGQAB.js → chunk-PNFSTYNY.js} +9 -9
  30. package/dist/_node-chunks/{chunk-MPUDYIDW.js → chunk-R4SSZN6U.js} +7 -7
  31. package/dist/_node-chunks/{chunk-6U2QTN2E.js → chunk-TCQ4YEBJ.js} +7 -7
  32. package/dist/_node-chunks/{chunk-S32G4TCP.js → chunk-TKJXOGPC.js} +7 -7
  33. package/dist/_node-chunks/{chunk-FJWQKOXX.js → chunk-VGEK4ULN.js} +10 -10
  34. package/dist/_node-chunks/{chunk-NTH76OZA.js → chunk-Y3HWBQFU.js} +12 -12
  35. package/dist/_node-chunks/chunk-YEG4ZWC4.js +18 -0
  36. package/dist/_node-chunks/{chunk-T7KB265F.js → chunk-ZHTORJLU.js} +6 -6
  37. package/dist/_node-chunks/{dist-SQENNWFY.js → dist-5OMEVXWG.js} +9 -9
  38. package/dist/_node-chunks/{globby-CVPDLQ5Z.js → globby-JOCJRFYY.js} +9 -9
  39. package/dist/_node-chunks/{lib-4BTTMYE2.js → lib-DK7FCOVF.js} +7 -7
  40. package/dist/_node-chunks/{mdx-N42X6CFJ-ENVHI6CC.js → mdx-N42X6CFJ-2ORYN25H.js} +8 -8
  41. package/dist/_node-chunks/{p-limit-I2XW6GST.js → p-limit-ORC5I6UZ.js} +7 -7
  42. package/dist/_node-chunks/{plugin-O5PHZ367.js → plugin-CSHCSNVB.js} +10 -10
  43. package/dist/_node-chunks/{plugin-4NIE24IO.js → plugin-UGAK7KQM.js} +10 -10
  44. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-SVBN7WFH.js → webpack-inject-mocker-runtime-plugin-QALMSMBH.js} +10 -10
  45. package/dist/_node-chunks/{webpack-mock-plugin-XBV3VXVD.js → webpack-mock-plugin-OI4E4SOX.js} +9 -9
  46. package/dist/babel/index.js +11 -11
  47. package/dist/bin/core.js +11 -11
  48. package/dist/bin/dispatcher.js +11 -11
  49. package/dist/bin/loader.js +9 -9
  50. package/dist/cli/index.js +21 -21
  51. package/dist/common/index.js +20 -20
  52. package/dist/components/index.js +5744 -73
  53. package/dist/core-server/index.js +418 -251
  54. package/dist/core-server/presets/common-manager.js +14 -20
  55. package/dist/core-server/presets/common-override-preset.js +9 -9
  56. package/dist/core-server/presets/common-preset.js +23 -23
  57. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  58. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  59. package/dist/csf/index.js +2 -2
  60. package/dist/csf-tools/index.d.ts +7 -0
  61. package/dist/csf-tools/index.js +9 -9
  62. package/dist/manager/globals-runtime.js +9 -5
  63. package/dist/manager/runtime.js +1 -1
  64. package/dist/manager-api/index.d.ts +1 -1
  65. package/dist/manager-api/index.js +1 -1
  66. package/dist/node-logger/index.d.ts +1 -1
  67. package/dist/node-logger/index.js +19 -19
  68. package/dist/preview-api/index.d.ts +68 -67
  69. package/dist/preview-api/index.js +5 -5
  70. package/dist/server-errors.js +10 -10
  71. package/dist/telemetry/index.js +24 -24
  72. package/dist/theming/create.d.ts +3 -2
  73. package/dist/theming/create.js +1 -1
  74. package/dist/theming/index.d.ts +5 -3
  75. package/dist/theming/index.js +2 -1
  76. package/dist/types/index.d.ts +4 -2
  77. package/package.json +1 -1
  78. package/dist/_browser-chunks/chunk-B3S3ROIP.js +0 -5810
  79. package/dist/_node-chunks/camelcase-2N6MD2HZ.js +0 -18
  80. package/dist/_node-chunks/chunk-D3NGJQDZ.js +0 -18
  81. package/dist/_node-chunks/chunk-LPNJ7PJY.js +0 -61
  82. package/dist/_browser-chunks/{chunk-W4QKLQSC.js → chunk-RW5PKMWM.js} +5 -5
  83. package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-CAVLW7PM.js} +4 -4
@@ -2,12 +2,6 @@ import {
2
2
  _defineProperty,
3
3
  _objectWithoutProperties
4
4
  } from "../../_browser-chunks/chunk-L2D73C6Z.js";
5
- import {
6
- TooltipNote,
7
- WithTooltip
8
- } from "../../_browser-chunks/chunk-B3S3ROIP.js";
9
- import "../../_browser-chunks/chunk-RNE2IUTB.js";
10
- import "../../_browser-chunks/chunk-BOOOPFZF.js";
11
5
  import "../../_browser-chunks/chunk-VAMFPZY3.js";
12
6
  import {
13
7
  dequal,
@@ -42,7 +36,6 @@ import {
42
36
  import {
43
37
  require_ansi_to_html
44
38
  } from "../../_browser-chunks/chunk-F4Q6SGTB.js";
45
- import "../../_browser-chunks/chunk-LYCSRYYR.js";
46
39
  import {
47
40
  cloneDeep,
48
41
  pickBy
@@ -5189,8 +5182,8 @@ import {
5189
5182
  Form as Form6,
5190
5183
  IconButton as IconButton4,
5191
5184
  Modal,
5192
- TooltipNote as TooltipNote2,
5193
- WithTooltip as WithTooltip2
5185
+ TooltipNote,
5186
+ WithTooltip
5194
5187
  } from "storybook/internal/components";
5195
5188
  import { AddIcon as AddIcon2, CheckIcon, UndoIcon as UndoIcon2 } from "@storybook/icons";
5196
5189
  import { keyframes, styled as styled29 } from "storybook/theming";
@@ -5310,30 +5303,30 @@ var SaveStory = /* @__PURE__ */ __name(({
5310
5303
  }
5311
5304
  }, "onSubmitForm");
5312
5305
  return React37.createElement(Container2, { id: "save-from-controls" }, React37.createElement(Bar2, null, React37.createElement(Actions, null, React37.createElement(
5313
- WithTooltip2,
5306
+ WithTooltip,
5314
5307
  {
5315
5308
  as: "div",
5316
5309
  hasChrome: false,
5317
5310
  trigger: "hover",
5318
- tooltip: React37.createElement(TooltipNote2, { note: "Save changes to story" })
5311
+ tooltip: React37.createElement(TooltipNote, { note: "Save changes to story" })
5319
5312
  },
5320
5313
  React37.createElement(IconButton4, { "aria-label": "Save changes to story", disabled: saving, onClick: onSaveStory }, React37.createElement(CheckIcon, null), React37.createElement(Label5, { "data-short-label": "Save" }, "Update story"))
5321
5314
  ), React37.createElement(
5322
- WithTooltip2,
5315
+ WithTooltip,
5323
5316
  {
5324
5317
  as: "div",
5325
5318
  hasChrome: false,
5326
5319
  trigger: "hover",
5327
- tooltip: React37.createElement(TooltipNote2, { note: "Create new story with these settings" })
5320
+ tooltip: React37.createElement(TooltipNote, { note: "Create new story with these settings" })
5328
5321
  },
5329
5322
  React37.createElement(IconButton4, { "aria-label": "Create new story with these settings", onClick: onShowForm }, React37.createElement(AddIcon2, null), React37.createElement(Label5, { "data-short-label": "New" }, "Create new story"))
5330
5323
  ), React37.createElement(
5331
- WithTooltip2,
5324
+ WithTooltip,
5332
5325
  {
5333
5326
  as: "div",
5334
5327
  hasChrome: false,
5335
5328
  trigger: "hover",
5336
- tooltip: React37.createElement(TooltipNote2, { note: "Reset changes" })
5329
+ tooltip: React37.createElement(TooltipNote, { note: "Reset changes" })
5337
5330
  },
5338
5331
  React37.createElement(IconButton4, { "aria-label": "Reset changes", onClick: () => resetArgs() }, React37.createElement(UndoIcon2, null), React37.createElement("span", null, "Reset"))
5339
5332
  )), React37.createElement(Info, null, React37.createElement(Label5, { "data-short-label": "Unsaved changes" }, "You modified this story. Do you want to save your changes?")), React37.createElement(
@@ -7136,7 +7129,7 @@ var Empty2 = /* @__PURE__ */ __name(() => {
7136
7129
 
7137
7130
  // src/component-testing/components/Interaction.tsx
7138
7131
  import * as React61 from "react";
7139
- import { IconButton as IconButton5, TooltipNote as TooltipNote3, WithTooltip as WithTooltip3 } from "storybook/internal/components";
7132
+ import { IconButton as IconButton5, TooltipNote as TooltipNote2, WithTooltip as WithTooltip2 } from "storybook/internal/components";
7140
7133
  import { ChevronDownIcon as ChevronDownIcon3, ChevronUpIcon as ChevronUpIcon2 } from "@storybook/icons";
7141
7134
  import { styled as styled37, typography as typography2 } from "storybook/theming";
7142
7135
 
@@ -8482,7 +8475,7 @@ var StyledIconButton = styled37(IconButton5)(({ theme: theme3 }) => ({
8482
8475
  color: theme3.textMutedColor,
8483
8476
  margin: "0 3px"
8484
8477
  }));
8485
- var Note = styled37(TooltipNote3)(({ theme: theme3 }) => ({
8478
+ var Note = styled37(TooltipNote2)(({ theme: theme3 }) => ({
8486
8479
  fontFamily: theme3.typography.fonts.base
8487
8480
  }));
8488
8481
  var RowMessage = styled37("div")(({ theme: theme3 }) => ({
@@ -8564,7 +8557,7 @@ var Interaction = /* @__PURE__ */ __name(({
8564
8557
  React61.createElement(StatusIcon, { status: isHovered ? "active" /* ACTIVE */ : call.status }),
8565
8558
  React61.createElement(MethodCallWrapper, { style: { marginLeft: 6, marginBottom: 1 } }, React61.createElement(MethodCall, { call, callsById }))
8566
8559
  ), React61.createElement(RowActions, null, (childCallIds?.length ?? 0) > 0 && React61.createElement(
8567
- WithTooltip3,
8560
+ WithTooltip2,
8568
8561
  {
8569
8562
  hasChrome: false,
8570
8563
  tooltip: React61.createElement(Note, { note: `${isCollapsed ? "Show" : "Hide"} interactions` })
@@ -8602,6 +8595,7 @@ import { styled as styled39, useTheme as useTheme7 } from "storybook/theming";
8602
8595
 
8603
8596
  // src/component-testing/components/StatusBadge.tsx
8604
8597
  import React63 from "react";
8598
+ import { TooltipNote as TooltipNote3, WithTooltip as WithTooltip3 } from "storybook/internal/components";
8605
8599
  import { styled as styled38, typography as typography3 } from "storybook/theming";
8606
8600
  var StatusColorMapping = {
8607
8601
  rendering: "mediumdark",
@@ -8645,12 +8639,12 @@ var StatusBadge = /* @__PURE__ */ __name(({ status }) => {
8645
8639
  const badgeText = StatusTextMapping[status];
8646
8640
  const badgeNote = StatusNoteMapping[status];
8647
8641
  return React63.createElement(
8648
- WithTooltip,
8642
+ WithTooltip3,
8649
8643
  {
8650
8644
  hasChrome: false,
8651
8645
  placement: "top",
8652
8646
  trigger: "hover",
8653
- tooltip: React63.createElement(TooltipNote, { note: badgeNote })
8647
+ tooltip: React63.createElement(TooltipNote3, { note: badgeNote })
8654
8648
  },
8655
8649
  React63.createElement(StyledBadge, { "aria-label": "Story status", status }, badgeText)
8656
8650
  );
@@ -1,23 +1,23 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.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-JKWP2FKQ.js";
14
+ } from "../../_node-chunks/chunk-6PMHAMVH.js";
15
15
  import {
16
16
  slash
17
- } from "../../_node-chunks/chunk-MPUDYIDW.js";
17
+ } from "../../_node-chunks/chunk-R4SSZN6U.js";
18
18
  import {
19
19
  __name
20
- } from "../../_node-chunks/chunk-T7KB265F.js";
20
+ } from "../../_node-chunks/chunk-ZHTORJLU.js";
21
21
 
22
22
  // src/core-server/utils/remove-mdx-entries.ts
23
23
  import { isAbsolute, join, relative } from "node:path";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,38 +12,38 @@ var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
12
12
  import {
13
13
  parseStaticDir,
14
14
  sendTelemetryError
15
- } from "../../_node-chunks/chunk-ZQY3BNST.js";
16
- import "../../_node-chunks/chunk-N7XYNLCJ.js";
15
+ } from "../../_node-chunks/chunk-LNNX4NF3.js";
16
+ import "../../_node-chunks/chunk-MK7DAIA6.js";
17
17
  import {
18
18
  getLastEvents,
19
19
  getSessionId
20
- } from "../../_node-chunks/chunk-SQAKXWVV.js";
20
+ } from "../../_node-chunks/chunk-IQY7L7HV.js";
21
21
  import {
22
22
  invariant
23
- } from "../../_node-chunks/chunk-5X7FGASE.js";
23
+ } from "../../_node-chunks/chunk-CACFLAKV.js";
24
24
  import {
25
25
  resolvePackageDir
26
- } from "../../_node-chunks/chunk-TSKLBMF3.js";
26
+ } from "../../_node-chunks/chunk-NBNSA2WK.js";
27
27
  import {
28
28
  isAbsolute,
29
29
  join
30
- } from "../../_node-chunks/chunk-6U2QTN2E.js";
31
- import "../../_node-chunks/chunk-NYXHMPY4.js";
30
+ } from "../../_node-chunks/chunk-TCQ4YEBJ.js";
31
+ import "../../_node-chunks/chunk-BTM6MC3G.js";
32
32
  import {
33
33
  loadConfig
34
- } from "../../_node-chunks/chunk-YJJWZPL7.js";
34
+ } from "../../_node-chunks/chunk-BI2ELK6M.js";
35
35
  import {
36
36
  require_dist
37
- } from "../../_node-chunks/chunk-S32G4TCP.js";
37
+ } from "../../_node-chunks/chunk-TKJXOGPC.js";
38
38
  import {
39
39
  require_picocolors
40
- } from "../../_node-chunks/chunk-2JHIUWIN.js";
40
+ } from "../../_node-chunks/chunk-ALUDPZO7.js";
41
41
  import {
42
42
  __commonJS,
43
43
  __name,
44
44
  __require,
45
45
  __toESM
46
- } from "../../_node-chunks/chunk-T7KB265F.js";
46
+ } from "../../_node-chunks/chunk-ZHTORJLU.js";
47
47
 
48
48
  // ../node_modules/shell-quote/quote.js
49
49
  var require_quote = __commonJS({
@@ -703,7 +703,7 @@ var import_ts_dedent = __toESM(require_dist(), 1);
703
703
 
704
704
  // src/core-server/utils/get-component-variable-name.ts
705
705
  var getComponentVariableName = /* @__PURE__ */ __name(async (name) => {
706
- const camelCase = await import("../../_node-chunks/camelcase-2N6MD2HZ.js");
706
+ const camelCase = await import("../../_node-chunks/camelcase-EPBTPRKM.js");
707
707
  const camelCased = camelCase.default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: true });
708
708
  const sanitized = camelCased.replace(/[^a-zA-Z_$]+/, "");
709
709
  return sanitized;
@@ -1050,7 +1050,7 @@ async function searchFiles({
1050
1050
  ignoredFiles = IGNORED_FILES,
1051
1051
  fileExtensions = FILE_EXTENSIONS
1052
1052
  }) {
1053
- const { globby, isDynamicPattern } = await import("../../_node-chunks/globby-CVPDLQ5Z.js");
1053
+ const { globby, isDynamicPattern } = await import("../../_node-chunks/globby-JOCJRFYY.js");
1054
1054
  const hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd });
1055
1055
  const hasFileExtensionRegex = /(\.[a-z]+)$/i;
1056
1056
  const searchQueryHasExtension = hasFileExtensionRegex.test(searchQuery);
@@ -1833,8 +1833,8 @@ var viteFinal = /* @__PURE__ */ __name(async (existing, options) => {
1833
1833
  if (!previewConfigPath) {
1834
1834
  return existing;
1835
1835
  }
1836
- const { viteInjectMockerRuntime } = await import("../../_node-chunks/plugin-O5PHZ367.js");
1837
- const { viteMockPlugin } = await import("../../_node-chunks/plugin-4NIE24IO.js");
1836
+ const { viteInjectMockerRuntime } = await import("../../_node-chunks/plugin-CSHCSNVB.js");
1837
+ const { viteMockPlugin } = await import("../../_node-chunks/plugin-UGAK7KQM.js");
1838
1838
  const coreOptions = await options.presets.apply("core");
1839
1839
  return {
1840
1840
  ...existing,
@@ -1852,8 +1852,8 @@ var webpackFinal = /* @__PURE__ */ __name(async (config, options) => {
1852
1852
  if (!previewConfigPath) {
1853
1853
  return config;
1854
1854
  }
1855
- const { WebpackMockPlugin } = await import("../../_node-chunks/webpack-mock-plugin-XBV3VXVD.js");
1856
- const { WebpackInjectMockerRuntimePlugin } = await import("../../_node-chunks/webpack-inject-mocker-runtime-plugin-SVBN7WFH.js");
1855
+ const { WebpackMockPlugin } = await import("../../_node-chunks/webpack-mock-plugin-OI4E4SOX.js");
1856
+ const { WebpackInjectMockerRuntimePlugin } = await import("../../_node-chunks/webpack-inject-mocker-runtime-plugin-QALMSMBH.js");
1857
1857
  config.plugins = config.plugins || [];
1858
1858
  config.module.rules.push({
1859
1859
  test: /preview\.(t|j)sx?$/,
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.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
  rewriteSbMockImportCalls
14
- } from "../../../../_node-chunks/chunk-BNO5FB6B.js";
15
- import "../../../../_node-chunks/chunk-6U2QTN2E.js";
14
+ } from "../../../../_node-chunks/chunk-F74NOPTY.js";
15
+ import "../../../../_node-chunks/chunk-TCQ4YEBJ.js";
16
16
  import {
17
17
  __name
18
- } from "../../../../_node-chunks/chunk-T7KB265F.js";
18
+ } from "../../../../_node-chunks/chunk-ZHTORJLU.js";
19
19
 
20
20
  // src/core-server/presets/webpack/loaders/storybook-mock-transform-loader.ts
21
21
  import { logger } from "storybook/internal/node-logger";
@@ -1,24 +1,24 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.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 "../../../../_node-chunks/chunk-APKZWRTX.js";
14
+ } from "../../../../_node-chunks/chunk-NAJMTFFS.js";
15
15
  import {
16
16
  babelParser
17
- } from "../../../../_node-chunks/chunk-BNO5FB6B.js";
18
- import "../../../../_node-chunks/chunk-6U2QTN2E.js";
17
+ } from "../../../../_node-chunks/chunk-F74NOPTY.js";
18
+ import "../../../../_node-chunks/chunk-TCQ4YEBJ.js";
19
19
  import {
20
20
  __name
21
- } from "../../../../_node-chunks/chunk-T7KB265F.js";
21
+ } from "../../../../_node-chunks/chunk-ZHTORJLU.js";
22
22
 
23
23
  // src/core-server/presets/webpack/loaders/webpack-automock-loader.ts
24
24
  function webpackAutomockLoader(source) {
package/dist/csf/index.js CHANGED
@@ -10,7 +10,8 @@ import {
10
10
  mountDestructured,
11
11
  normalizeArrays,
12
12
  normalizeProjectAnnotations
13
- } from "../_browser-chunks/chunk-W4QKLQSC.js";
13
+ } from "../_browser-chunks/chunk-RW5PKMWM.js";
14
+ import "../_browser-chunks/chunk-LYCSRYYR.js";
14
15
  import "../_browser-chunks/chunk-Y3M7TW6K.js";
15
16
  import {
16
17
  combineParameters
@@ -21,7 +22,6 @@ import {
21
22
  } from "../_browser-chunks/chunk-FUOHXXZT.js";
22
23
  import "../_browser-chunks/chunk-AB7OOPUX.js";
23
24
  import "../_browser-chunks/chunk-F4Q6SGTB.js";
24
- import "../_browser-chunks/chunk-LYCSRYYR.js";
25
25
  import "../_browser-chunks/chunk-UTNZYD2N.js";
26
26
  import "../_browser-chunks/chunk-FSBVR7H5.js";
27
27
  import "../_browser-chunks/chunk-NVV6MIOE.js";
@@ -120,6 +120,13 @@ declare class ConfigFile {
120
120
  hasDefaultExport: boolean;
121
121
  constructor(ast: types.File, code: string, fileName?: string);
122
122
  _parseExportsObject(exportsObject: types.ObjectExpression): void;
123
+ /** Unwraps TS assertions/satisfies from a node, to get the underlying node. */
124
+ _unwrap: (node: types.Node | undefined | null) => any;
125
+ /**
126
+ * Resolve a declaration node by unwrapping TS assertions/satisfies and following identifiers to
127
+ * resolve the correct node in case it's an identifier.
128
+ */
129
+ _resolveDeclaration: (node: types.Node, parent?: types.Node) => any;
123
130
  parse(): this;
124
131
  getFieldNode(path: string[]): types.Node | undefined;
125
132
  getFieldProperties(path: string[]): ReturnType<typeof _getPathProperties>;
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.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-YJJWZPL7.js";
42
- import "../_node-chunks/chunk-S32G4TCP.js";
43
- import "../_node-chunks/chunk-T7KB265F.js";
41
+ } from "../_node-chunks/chunk-BI2ELK6M.js";
42
+ import "../_node-chunks/chunk-TKJXOGPC.js";
43
+ import "../_node-chunks/chunk-ZHTORJLU.js";
44
44
  export {
45
45
  BadMetaError,
46
46
  ConfigFile,
@@ -11376,19 +11376,22 @@ __export(create_exports, {
11376
11376
  create: () => create,
11377
11377
  themes: () => themes
11378
11378
  });
11379
- var themes, preferredColorScheme, create;
11379
+ var themesBase, preferredColorScheme, themes, create;
11380
11380
  var init_create = __esm({
11381
11381
  "src/theming/create.ts"() {
11382
11382
  "use strict";
11383
11383
  init_dark();
11384
11384
  init_light();
11385
11385
  init_utils();
11386
- themes = {
11386
+ themesBase = {
11387
11387
  light: light_default,
11388
- dark: dark_default,
11389
- normal: light_default
11388
+ dark: dark_default
11390
11389
  };
11391
11390
  preferredColorScheme = getPreferredColorScheme();
11391
+ themes = {
11392
+ ...themesBase,
11393
+ normal: themesBase[preferredColorScheme]
11394
+ };
11392
11395
  create = /* @__PURE__ */ __name((vars = { base: preferredColorScheme }, rest) => {
11393
11396
  const inherit = {
11394
11397
  ...themes[preferredColorScheme],
@@ -11915,6 +11918,7 @@ __export(theming_exports, {
11915
11918
  css: () => css,
11916
11919
  darken: () => darkenColor,
11917
11920
  ensure: () => ensure,
11921
+ getPreferredColorScheme: () => getPreferredColorScheme,
11918
11922
  ignoreSsrWarning: () => ignoreSsrWarning,
11919
11923
  isPropValid: () => isPropValid,
11920
11924
  jsx: () => jsx,
@@ -82703,7 +82707,7 @@ var import_memoizerific10 = __toESM(require_memoizerific(), 1);
82703
82707
  var import_semver = __toESM(require_semver2(), 1);
82704
82708
 
82705
82709
  // src/manager-api/version.ts
82706
- var version = "10.1.0-alpha.3";
82710
+ var version = "10.1.0-alpha.5";
82707
82711
 
82708
82712
  // src/manager-api/modules/versions.ts
82709
82713
  var { VERSIONCHECK } = scope;
@@ -2740,7 +2740,7 @@ var { ActiveTabs, Consumer, ManagerContext, Provider, RequestResponseError, addo
2740
2740
 
2741
2741
  // global-externals:storybook/theming
2742
2742
  var theming_default = __STORYBOOK_THEMING__;
2743
- var { CacheProvider, ClassNames, Global, ThemeProvider, background, color, convert, create, createCache, createGlobal, createReset, css, darken, ensure, ignoreSsrWarning, isPropValid, jsx, keyframes, lighten, styled, themes, typography, useTheme, withTheme } = __STORYBOOK_THEMING__;
2743
+ var { CacheProvider, ClassNames, Global, ThemeProvider, background, color, convert, create, createCache, createGlobal, createReset, css, darken, ensure, getPreferredColorScheme, ignoreSsrWarning, isPropValid, jsx, keyframes, lighten, styled, themes, typography, useTheme, withTheme } = __STORYBOOK_THEMING__;
2744
2744
 
2745
2745
  // global-externals:storybook/internal/components
2746
2746
  var components_default = __STORYBOOK_COMPONENTS__;
@@ -393,7 +393,7 @@ interface SubState$5 {
393
393
 
394
394
  declare const isMacLike: () => boolean;
395
395
  declare const controlOrMetaSymbol: () => "⌘" | "ctrl";
396
- declare const controlOrMetaKey: () => "control" | "meta";
396
+ declare const controlOrMetaKey: () => "meta" | "control";
397
397
  declare const optionOrAltSymbol: () => "⌥" | "alt";
398
398
  declare const isShortcutTaken: (arr1: string[], arr2: string[]) => boolean;
399
399
  type KeyboardEventLike = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'key' | 'code' | 'keyCode' | 'preventDefault'>;
@@ -3262,7 +3262,7 @@ import { global as global8 } from "@storybook/global";
3262
3262
  import semver from "semver";
3263
3263
 
3264
3264
  // src/manager-api/version.ts
3265
- var version = "10.1.0-alpha.3";
3265
+ var version = "10.1.0-alpha.5";
3266
3266
 
3267
3267
  // src/manager-api/modules/versions.ts
3268
3268
  var { VERSIONCHECK } = global8;
@@ -473,7 +473,7 @@ declare const logger: {
473
473
  time: [number, number];
474
474
  }) => void;
475
475
  setLevel: (level?: LogLevel) => void;
476
- error: (message: Error | string) => void;
476
+ error: (message: unknown) => void;
477
477
  setLogLevel: (level: LogLevel) => void;
478
478
  getLogLevel: () => LogLevel;
479
479
  shouldLog: (level: LogLevel) => boolean;
@@ -1,43 +1,43 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.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_pretty_hrtime
14
- } from "../_node-chunks/chunk-GMO24NTJ.js";
14
+ } from "../_node-chunks/chunk-AGAEDIW3.js";
15
15
  import {
16
16
  ansi_styles_default,
17
17
  boxen,
18
18
  require_string_width,
19
19
  stripAnsi
20
- } from "../_node-chunks/chunk-RLMJDF6S.js";
21
- import "../_node-chunks/chunk-NTX43F34.js";
20
+ } from "../_node-chunks/chunk-ENL6NO7V.js";
21
+ import "../_node-chunks/chunk-C7ZCWXID.js";
22
22
  import {
23
23
  execaSync,
24
24
  optionalEnvToBoolean
25
- } from "../_node-chunks/chunk-B63HGQAB.js";
26
- import "../_node-chunks/chunk-5KDXQR2J.js";
25
+ } from "../_node-chunks/chunk-PNFSTYNY.js";
26
+ import "../_node-chunks/chunk-CPKCCBQ2.js";
27
27
  import {
28
28
  require_prompts,
29
29
  require_src
30
- } from "../_node-chunks/chunk-NYXHMPY4.js";
30
+ } from "../_node-chunks/chunk-BTM6MC3G.js";
31
31
  import {
32
32
  require_picocolors
33
- } from "../_node-chunks/chunk-2JHIUWIN.js";
33
+ } from "../_node-chunks/chunk-ALUDPZO7.js";
34
34
  import {
35
35
  __commonJS,
36
36
  __export,
37
37
  __name,
38
38
  __require,
39
39
  __toESM
40
- } from "../_node-chunks/chunk-T7KB265F.js";
40
+ } from "../_node-chunks/chunk-ZHTORJLU.js";
41
41
 
42
42
  // ../node_modules/are-we-there-yet/lib/tracker-base.js
43
43
  var require_tracker_base = __commonJS({
@@ -4452,13 +4452,13 @@ var logger = {
4452
4452
  error: /* @__PURE__ */ __name((message) => {
4453
4453
  let msg;
4454
4454
  if (message instanceof Error && message.stack) {
4455
- msg = message.stack.toString();
4456
- } else {
4455
+ msg = message.stack.toString().replace(message.toString(), colors.red(message.toString()));
4456
+ } else if (typeof message === "string") {
4457
4457
  msg = message.toString();
4458
+ } else {
4459
+ msg = String(message);
4458
4460
  }
4459
- error(
4460
- msg.replace(message.toString(), colors.red(message.toString())).replaceAll(process.cwd(), ".")
4461
- );
4461
+ error(msg.replaceAll(process.cwd(), "."));
4462
4462
  }, "error")
4463
4463
  };
4464
4464
  var logged = /* @__PURE__ */ new Set();