storybook-react-rsbuild 3.6.1 → 4.0.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.
- package/dist/index.d.ts +2 -8
- package/dist/node/index.d.ts +2 -8
- package/dist/preset.d.ts +2 -8
- package/dist/preset.js +3 -1
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -16,14 +16,6 @@ declare type FrameworkName = CompatibleString<'storybook-react-rsbuild'>;
|
|
|
16
16
|
export declare type FrameworkOptions = {
|
|
17
17
|
builder?: BuilderOptions;
|
|
18
18
|
strictMode?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Use React's legacy root API to mount components
|
|
21
|
-
* @description
|
|
22
|
-
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
|
|
23
|
-
* If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
legacyRootApi?: boolean;
|
|
27
19
|
};
|
|
28
20
|
|
|
29
21
|
/**
|
|
@@ -58,6 +50,7 @@ declare type TypescriptOptionsReact = {
|
|
|
58
50
|
* Sets the type of Docgen when working with React and TypeScript
|
|
59
51
|
*
|
|
60
52
|
* @default `'react-docgen'`
|
|
53
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
61
54
|
*/
|
|
62
55
|
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
63
56
|
/**
|
|
@@ -65,6 +58,7 @@ declare type TypescriptOptionsReact = {
|
|
|
65
58
|
*
|
|
66
59
|
* @default
|
|
67
60
|
* @see https://github.com/storybookjs/storybook/blob/next/code/builders/builder-webpack5/src/config/defaults.js#L4-L6
|
|
61
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
68
62
|
*/
|
|
69
63
|
reactDocgenTypescriptOptions: PluginOptions;
|
|
70
64
|
};
|
package/dist/node/index.d.ts
CHANGED
|
@@ -15,14 +15,6 @@ declare type FrameworkName = CompatibleString<'storybook-react-rsbuild'>;
|
|
|
15
15
|
declare type FrameworkOptions = {
|
|
16
16
|
builder?: BuilderOptions;
|
|
17
17
|
strictMode?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Use React's legacy root API to mount components
|
|
20
|
-
* @description
|
|
21
|
-
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
|
|
22
|
-
* If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
legacyRootApi?: boolean;
|
|
26
18
|
};
|
|
27
19
|
|
|
28
20
|
/**
|
|
@@ -57,6 +49,7 @@ declare type TypescriptOptionsReact = {
|
|
|
57
49
|
* Sets the type of Docgen when working with React and TypeScript
|
|
58
50
|
*
|
|
59
51
|
* @default `'react-docgen'`
|
|
52
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
60
53
|
*/
|
|
61
54
|
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
62
55
|
/**
|
|
@@ -64,6 +57,7 @@ declare type TypescriptOptionsReact = {
|
|
|
64
57
|
*
|
|
65
58
|
* @default
|
|
66
59
|
* @see https://github.com/storybookjs/storybook/blob/next/code/builders/builder-webpack5/src/config/defaults.js#L4-L6
|
|
60
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
67
61
|
*/
|
|
68
62
|
reactDocgenTypescriptOptions: PluginOptions;
|
|
69
63
|
};
|
package/dist/preset.d.ts
CHANGED
|
@@ -16,14 +16,6 @@ declare type FrameworkName = CompatibleString<'storybook-react-rsbuild'>;
|
|
|
16
16
|
declare type FrameworkOptions = {
|
|
17
17
|
builder?: BuilderOptions;
|
|
18
18
|
strictMode?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Use React's legacy root API to mount components
|
|
21
|
-
* @description
|
|
22
|
-
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
|
|
23
|
-
* If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
legacyRootApi?: boolean;
|
|
27
19
|
};
|
|
28
20
|
|
|
29
21
|
export declare const rsbuildFinal: NonNullable<StorybookConfig['rsbuildFinal']>;
|
|
@@ -60,6 +52,7 @@ declare type TypescriptOptionsReact = {
|
|
|
60
52
|
* Sets the type of Docgen when working with React and TypeScript
|
|
61
53
|
*
|
|
62
54
|
* @default `'react-docgen'`
|
|
55
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
63
56
|
*/
|
|
64
57
|
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
65
58
|
/**
|
|
@@ -67,6 +60,7 @@ declare type TypescriptOptionsReact = {
|
|
|
67
60
|
*
|
|
68
61
|
* @default
|
|
69
62
|
* @see https://github.com/storybookjs/storybook/blob/next/code/builders/builder-webpack5/src/config/defaults.js#L4-L6
|
|
63
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
70
64
|
*/
|
|
71
65
|
reactDocgenTypescriptOptions: PluginOptions;
|
|
72
66
|
};
|
package/dist/preset.js
CHANGED
|
@@ -3,16 +3,18 @@ const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/
|
|
|
3
3
|
import { mergeRsbuildConfig } from "@rsbuild/core";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { deprecate } from "storybook/internal/node-logger";
|
|
6
7
|
function requirer(resolver, path) {
|
|
7
8
|
return resolver(path);
|
|
8
9
|
}
|
|
9
10
|
const rsbuildFinalDocs = async (config, options)=>{
|
|
10
11
|
const features = await options.presets.apply('features', {});
|
|
11
|
-
if (features?.
|
|
12
|
+
if (features?.docgenServer) return config;
|
|
12
13
|
const typescriptOptions = await options.presets.apply("typescript", {});
|
|
13
14
|
const debug = 'debug' === options.loglevel;
|
|
14
15
|
const { reactDocgen, reactDocgenTypescriptOptions } = typescriptOptions || {};
|
|
15
16
|
if ('string' != typeof reactDocgen) return config;
|
|
17
|
+
deprecate(`Builder docgen (\`typescript.reactDocgen: '${reactDocgen}'\`) is deprecated and will be removed in Storybook 12. It runs because \`features.docgenServer\` is off. Server-side docgen needs the \`typescript\` package: install it and remove any \`docgenServer: false\` from your \`.storybook/main.ts\`.`);
|
|
16
18
|
const reactDocgenLoaderRule = (test)=>({
|
|
17
19
|
test,
|
|
18
20
|
enforce: 'pre',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-react-rsbuild",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "Storybook for React and Rsbuild: Develop React components in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -47,32 +47,32 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@rollup/pluginutils": "^5.4.0",
|
|
50
|
-
"@storybook/react": "^
|
|
50
|
+
"@storybook/react": "^11.0.0-alpha.9",
|
|
51
51
|
"@storybook/react-docgen-typescript-plugin": "^1.0.1",
|
|
52
|
-
"magic-string": "^1.4.
|
|
52
|
+
"magic-string": "^1.4.3",
|
|
53
53
|
"react-docgen": "^8.0.4",
|
|
54
54
|
"react-docgen-typescript": "^2.4.0",
|
|
55
|
-
"resolve": "^1.22.
|
|
55
|
+
"resolve": "^1.22.13",
|
|
56
56
|
"tsconfig-paths": "^4.2.0",
|
|
57
|
-
"storybook-builder-rsbuild": "
|
|
57
|
+
"storybook-builder-rsbuild": "4.0.0-beta.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@microsoft/api-extractor": "^7.59.
|
|
61
|
-
"@rsbuild/core": "^2.2.
|
|
62
|
-
"@types/node": "^22.
|
|
60
|
+
"@microsoft/api-extractor": "^7.59.4",
|
|
61
|
+
"@rsbuild/core": "^2.2.13",
|
|
62
|
+
"@types/node": "^22.12.0",
|
|
63
63
|
"@types/react": "^18.3.31",
|
|
64
64
|
"@types/resolve": "^1.20.6",
|
|
65
65
|
"react": "18.3.1",
|
|
66
66
|
"react-dom": "18.3.1",
|
|
67
|
-
"storybook": "
|
|
67
|
+
"storybook": "11.0.0-alpha.9",
|
|
68
68
|
"typescript": "^5.9.3"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@rsbuild/core": "^1.5.0 || ^2.0.0-0",
|
|
72
|
-
"react": "^
|
|
73
|
-
"react-dom": "^
|
|
74
|
-
"storybook": "^
|
|
75
|
-
"typescript": "
|
|
72
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
73
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
74
|
+
"storybook": "^11.0.0-alpha.9",
|
|
75
|
+
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependenciesMeta": {
|
|
78
78
|
"typescript": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
|
-
"node": ">=
|
|
83
|
+
"node": ">=22.12.0"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|