@storybook/react 11.0.0-alpha.1 → 11.0.0-alpha.3

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.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  __definePreview
3
- } from "./_browser-chunks/chunk-PZ4OU6H4.js";
3
+ } from "./_browser-chunks/chunk-A624C5GY.js";
4
4
  import {
5
5
  entry_preview_exports,
6
6
  renderToCanvas
7
- } from "./_browser-chunks/chunk-XACQAYAZ.js";
7
+ } from "./_browser-chunks/chunk-XD4PMI7Q.js";
8
8
  import {
9
9
  entry_preview_argtypes_exports
10
- } from "./_browser-chunks/chunk-5GZAZJC7.js";
10
+ } from "./_browser-chunks/chunk-LGSTPTL6.js";
11
11
  import "./_browser-chunks/chunk-CS62LUFX.js";
12
12
  import "./_browser-chunks/chunk-DDIRQRCA.js";
13
13
  import "./_browser-chunks/chunk-B3FR4PBN.js";
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_moh6ij0aoc from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_moh6ij0aoc from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_moh6ij0aoc from "node:module";
1
+ import CJS_COMPAT_NODE_URL_zh4h2xjvlz from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_zh4h2xjvlz from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_zh4h2xjvlz from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_moh6ij0aoc.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_moh6ij0aoc.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_moh6ij0aoc.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_zh4h2xjvlz.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_zh4h2xjvlz.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_zh4h2xjvlz.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -24,7 +24,7 @@ import {
24
24
  parseWithReactDocgen,
25
25
  posix,
26
26
  resolveStoryFileComponents
27
- } from "./_node-chunks/chunk-GFBGFJ4J.js";
27
+ } from "./_node-chunks/chunk-ZB4I7IE4.js";
28
28
 
29
29
  // ../../../node_modules/semver/internal/constants.js
30
30
  var require_constants = __commonJS({
@@ -1567,8 +1567,8 @@ function getSharedComponentMetaManager() {
1567
1567
 
1568
1568
  // src/componentManifest/generator.ts
1569
1569
  var manifests = async (existingManifests = {}, options) => {
1570
- let { manifestEntries, presets, watch } = options, typescriptOptions = await presets?.apply("typescript", {}) ?? {}, features = await presets?.apply("features", {});
1571
- if (features?.experimentalDocgenServer)
1570
+ let { manifestEntries, presets, watch } = options, typescriptOptions = await presets?.apply("typescript", {}) ?? {}, features2 = await presets?.apply("features", {});
1571
+ if (features2?.experimentalDocgenServer)
1572
1572
  return {
1573
1573
  ...existingManifests,
1574
1574
  components: {
@@ -1577,7 +1577,7 @@ var manifests = async (existingManifests = {}, options) => {
1577
1577
  meta: { docgen: "react-component-meta", durationMs: 0 }
1578
1578
  }
1579
1579
  };
1580
- let docgenEngine = features?.experimentalReactComponentMeta ? "react-component-meta" : typescriptOptions.reactDocgen || "react-docgen";
1580
+ let docgenEngine = features2?.experimentalReactComponentMeta ? "react-component-meta" : typescriptOptions.reactDocgen || "react-docgen";
1581
1581
  invalidateCache(), invalidateParser();
1582
1582
  let startTime = performance.now(), manager = docgenEngine === "react-component-meta" ? await getSharedComponentMetaManager() : void 0, entriesByUniqueComponent = [
1583
1583
  ...selectComponentEntriesByComponentId(manifestEntries).values()
@@ -1650,8 +1650,8 @@ var manifests = async (existingManifests = {}, options) => {
1650
1650
  import { recast, types as t } from "storybook/internal/babel";
1651
1651
  import { getPrettier } from "storybook/internal/common";
1652
1652
  var enrichCsf = async (input, options) => {
1653
- let features = await options.presets.apply("features");
1654
- if (!(!features.experimentalCodeExamples || features.experimentalDocgenServer))
1653
+ let features2 = await options.presets.apply("features");
1654
+ if (!(!features2.experimentalCodeExamples || features2.experimentalDocgenServer))
1655
1655
  return async (csf, csfSource) => {
1656
1656
  let promises = Object.keys(csf._stories).map(async (key) => {
1657
1657
  if (!csfSource._meta?.component)
@@ -1779,13 +1779,14 @@ var experimental_storyDocsProvider = async (nextStoryDocs, options) => {
1779
1779
  };
1780
1780
 
1781
1781
  // src/preset.ts
1782
- var addons = [
1783
- import.meta.resolve("@storybook/react-dom-shim/preset")
1784
- ], previewAnnotations = async (input = [], options) => {
1785
- let [docsConfig, features] = await Promise.all([
1782
+ var features = async (existing) => ({
1783
+ ...existing,
1784
+ componentsManifest: !0
1785
+ }), previewAnnotations = async (input = [], options) => {
1786
+ let [docsConfig, features2] = await Promise.all([
1786
1787
  options.presets.apply("docs", {}, options),
1787
1788
  options.presets.apply("features", {}, options)
1788
- ]), docsEnabled = Object.keys(docsConfig).length > 0, experimentalRSC = features?.experimentalRSC;
1789
+ ]), docsEnabled = Object.keys(docsConfig).length > 0, experimentalRSC = features2?.experimentalRSC;
1789
1790
  return [].concat(input).concat([
1790
1791
  fileURLToPath3(import.meta.resolve("@storybook/react/entry-preview")),
1791
1792
  fileURLToPath3(import.meta.resolve("@storybook/react/entry-preview-argtypes"))
@@ -1828,13 +1829,13 @@ async function internal_getArgTypesData(_input, options) {
1828
1829
  componentExportName
1829
1830
  }), argTypesData;
1830
1831
  }
1831
- var optimizeViteDeps = ["react-dom/test-utils"];
1832
+ var optimizeViteDeps = ["react-dom/client", "react-dom/test-utils"];
1832
1833
  export {
1833
- addons,
1834
1834
  experimental_docgenProvider,
1835
1835
  enrichCsf as experimental_enrichCsf,
1836
1836
  manifests as experimental_manifests,
1837
1837
  experimental_storyDocsProvider,
1838
+ features,
1838
1839
  internal_getArgTypesData,
1839
1840
  optimizeViteDeps,
1840
1841
  previewAnnotations,
package/dist/preview.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as __definePreview, n as ReactPreview, r as ReactStory, t as ReactMeta } from "./chunk-ojHmM-yX.js";
1
+ import { i as __definePreview, n as ReactPreview, r as ReactStory, t as ReactMeta } from "./chunk-DT7W2slC.js";
2
2
  export { ReactMeta, ReactPreview, ReactStory, __definePreview };
package/dist/preview.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  __definePreview
3
- } from "./_browser-chunks/chunk-PZ4OU6H4.js";
4
- import "./_browser-chunks/chunk-XACQAYAZ.js";
5
- import "./_browser-chunks/chunk-5GZAZJC7.js";
3
+ } from "./_browser-chunks/chunk-A624C5GY.js";
4
+ import "./_browser-chunks/chunk-XD4PMI7Q.js";
5
+ import "./_browser-chunks/chunk-LGSTPTL6.js";
6
6
  import "./_browser-chunks/chunk-CS62LUFX.js";
7
7
  import "./_browser-chunks/chunk-DDIRQRCA.js";
8
8
  import "./_browser-chunks/chunk-B3FR4PBN.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react",
3
- "version": "11.0.0-alpha.1",
3
+ "version": "11.0.0-alpha.3",
4
4
  "description": "Storybook React renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -49,7 +49,6 @@
49
49
  ],
50
50
  "dependencies": {
51
51
  "@storybook/global": "^5.0.0",
52
- "@storybook/react-dom-shim": "11.0.0-alpha.1",
53
52
  "react-docgen": "^8.0.2",
54
53
  "react-docgen-typescript": "^2.2.2"
55
54
  },
@@ -78,12 +77,12 @@
78
77
  "type-fest": "^5.6.0"
79
78
  },
80
79
  "peerDependencies": {
81
- "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
82
- "@types/react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
83
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
84
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
85
- "storybook": "^11.0.0-alpha.1",
86
- "typescript": ">= 4.9.x"
80
+ "@types/react": "^18.0.0 || ^19.0.0",
81
+ "@types/react-dom": "^18.0.0 || ^19.0.0",
82
+ "react": "^18.0.0 || ^19.0.0",
83
+ "react-dom": "^18.0.0 || ^19.0.0",
84
+ "storybook": "^11.0.0-alpha.3",
85
+ "typescript": "^5.9.0 || ^6.0.0"
87
86
  },
88
87
  "peerDependenciesMeta": {
89
88
  "@types/react": {