storybook-react-rsbuild 2.0.0-alpha.1 → 2.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.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from '@storybook/react';
2
+ export { __definePreview as definePreview } from '@storybook/react';
1
3
  import { PluginOptions } from '@storybook/react-docgen-typescript-plugin';
2
4
  import { BuilderOptions, StorybookConfigRsbuild, TypescriptOptions as TypescriptOptions$1 } from 'storybook-builder-rsbuild';
3
5
  import { StorybookConfig as StorybookConfig$1, TypescriptOptions } from 'storybook/internal/types';
package/dist/index.js CHANGED
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -11,8 +15,19 @@ var __copyProps = (to, from, except, desc) => {
11
15
  }
12
16
  return to;
13
17
  };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
20
 
16
21
  // src/index.ts
17
22
  var src_exports = {};
23
+ __export(src_exports, {
24
+ definePreview: () => import_react.__definePreview
25
+ });
18
26
  module.exports = __toCommonJS(src_exports);
27
+ __reExport(src_exports, require("@storybook/react"), module.exports);
28
+ var import_react = require("@storybook/react");
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ definePreview,
32
+ ...require("@storybook/react")
33
+ });
package/dist/index.mjs CHANGED
@@ -1 +1,2 @@
1
-
1
+ export * from '@storybook/react';
2
+ export { __definePreview as definePreview } from '@storybook/react';
@@ -0,0 +1,9 @@
1
+ import { StorybookConfig } from '../index.js';
2
+ import '@storybook/react';
3
+ import '@storybook/react-docgen-typescript-plugin';
4
+ import 'storybook-builder-rsbuild';
5
+ import 'storybook/internal/types';
6
+
7
+ declare function defineMain(config: StorybookConfig): StorybookConfig;
8
+
9
+ export { defineMain };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/node/index.ts
21
+ var node_exports = {};
22
+ __export(node_exports, {
23
+ defineMain: () => defineMain
24
+ });
25
+ module.exports = __toCommonJS(node_exports);
26
+ function defineMain(config) {
27
+ return config;
28
+ }
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ defineMain
32
+ });
@@ -0,0 +1,6 @@
1
+ // src/node/index.ts
2
+ function defineMain(config) {
3
+ return config;
4
+ }
5
+
6
+ export { defineMain };
package/dist/preset.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { PresetProperty } from 'storybook/internal/types';
2
2
  import { StorybookConfig } from './index.js';
3
+ import '@storybook/react';
3
4
  import '@storybook/react-docgen-typescript-plugin';
4
5
  import 'storybook-builder-rsbuild';
5
6
 
package/dist/preset.js CHANGED
@@ -406,7 +406,6 @@ var import_node_path2 = require("path");
406
406
 
407
407
  // src/react-docs.ts
408
408
  var import_core = require("@rsbuild/core");
409
- var import_docs_tools = require("storybook/internal/docs-tools");
410
409
 
411
410
  // src/requirer.ts
412
411
  function requirer(resolver, path) {
@@ -415,8 +414,6 @@ function requirer(resolver, path) {
415
414
 
416
415
  // src/react-docs.ts
417
416
  var rsbuildFinalDocs = async (config, options) => {
418
- if (!(0, import_docs_tools.hasDocsOrControls)(options))
419
- return config;
420
417
  const typescriptOptions = await options.presets.apply("typescript", {});
421
418
  const debug = options.loglevel === "debug";
422
419
  const { reactDocgen, reactDocgenTypescriptOptions } = typescriptOptions || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-react-rsbuild",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.3",
4
4
  "description": "Storybook for React and Rsbuild: Develop React components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -8,7 +8,7 @@
8
8
  "rspack",
9
9
  "react"
10
10
  ],
11
- "homepage": "https://storybook-rsbuild.netlify.app",
11
+ "homepage": "https://storybook.rsbuild.dev",
12
12
  "bugs": {
13
13
  "url": "https://github.com/rspack-contrib/storybook-rsbuild/issues"
14
14
  },
@@ -37,6 +37,12 @@
37
37
  "types": "./dist/loaders/react-docgen-loader.d.ts",
38
38
  "require": "./dist/loaders/react-docgen-loader.js"
39
39
  },
40
+ "./node": {
41
+ "types": "./dist/node/index.d.ts",
42
+ "node": "./dist/node/index.js",
43
+ "import": "./dist/node/index.mjs",
44
+ "require": "./dist/node/index.js"
45
+ },
40
46
  "./package.json": "./package.json"
41
47
  },
42
48
  "main": "dist/index.js",
@@ -51,32 +57,32 @@
51
57
  ],
52
58
  "dependencies": {
53
59
  "@rollup/pluginutils": "^5.1.4",
54
- "@storybook/react": "^9.0.0-alpha.17",
60
+ "@storybook/react": "^9.0.4",
55
61
  "@storybook/react-docgen-typescript-plugin": "^1.0.1",
56
- "@types/node": "^18.0.0",
62
+ "@types/node": "^18.19.110",
57
63
  "find-up": "^5.0.0",
58
64
  "magic-string": "^0.30.17",
59
65
  "react-docgen": "^7.1.1",
60
66
  "react-docgen-typescript": "^2.2.2",
61
67
  "resolve": "^1.22.10",
62
68
  "tsconfig-paths": "^4.2.0",
63
- "storybook-builder-rsbuild": "2.0.0-alpha.1"
69
+ "storybook-builder-rsbuild": "2.0.0-alpha.3"
64
70
  },
65
71
  "devDependencies": {
66
- "@rsbuild/core": "^1.2.19",
72
+ "@rsbuild/core": "^1.3.22",
67
73
  "@storybook/types": "9.0.0-alpha.1",
68
- "@types/react": "^18.3.20",
74
+ "@types/react": "^18.3.23",
69
75
  "@types/resolve": "^1.20.6",
70
76
  "react": "18.3.1",
71
77
  "react-dom": "18.3.1",
72
- "storybook": "9.0.0-alpha.17",
73
- "typescript": "^5.7.3"
78
+ "storybook": "9.0.4",
79
+ "typescript": "^5.8.3"
74
80
  },
75
81
  "peerDependencies": {
76
82
  "@rsbuild/core": "^1.0.1",
77
83
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
78
84
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
79
- "storybook": "^9.0.0-alpha.17",
85
+ "storybook": "^9.0.0",
80
86
  "typescript": ">= 4.2.x"
81
87
  },
82
88
  "peerDependenciesMeta": {
@@ -92,6 +98,7 @@
92
98
  },
93
99
  "bundler": {
94
100
  "entries": [
101
+ "./src/node/index.ts",
95
102
  "./src/index.ts",
96
103
  "./src/preset.ts",
97
104
  "./src/loaders/react-docgen-loader.ts"