storybook-web-components-rsbuild 3.4.2 → 3.6.1
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 +41 -29
- package/dist/index.js +1 -5
- package/dist/node/index.d.ts +37 -30
- package/dist/node/index.js +3 -17
- package/dist/preset.js +16 -29
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
type
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import type { BuilderOptions } from 'storybook-builder-rsbuild';
|
|
2
|
+
import type { CompatibleString } from 'storybook/internal/types';
|
|
3
|
+
import { __definePreview as definePreview } from '@storybook/web-components';
|
|
4
|
+
import type { StorybookConfig as StorybookConfig_2 } from 'storybook/internal/types';
|
|
5
|
+
import type { StorybookConfigRsbuild } from 'storybook-builder-rsbuild';
|
|
6
|
+
import type { TypescriptOptions } from 'storybook/internal/types';
|
|
7
|
+
import type { TypescriptOptions as TypescriptOptions_2 } from 'storybook-builder-rsbuild';
|
|
8
|
+
|
|
9
|
+
declare type BuilderName = CompatibleString<'storybook-builder-rsbuild'>;
|
|
10
|
+
|
|
11
|
+
export { definePreview }
|
|
12
|
+
|
|
13
|
+
declare type FrameworkName = CompatibleString<'storybook-web-components-rsbuild'>;
|
|
14
|
+
|
|
15
|
+
export declare type FrameworkOptions = {
|
|
16
|
+
builder?: BuilderOptions;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The interface for Storybook configuration in `main.ts` files.
|
|
21
|
+
*/
|
|
22
|
+
export declare type StorybookConfig = Omit<StorybookConfig_2, keyof StorybookConfigRsbuild | keyof StorybookConfigFramework> & StorybookConfigRsbuild & StorybookConfigFramework;
|
|
23
|
+
|
|
24
|
+
declare type StorybookConfigFramework = {
|
|
25
|
+
framework: FrameworkName | {
|
|
26
|
+
name: FrameworkName;
|
|
27
|
+
options: FrameworkOptions;
|
|
28
|
+
};
|
|
29
|
+
core?: StorybookConfig_2['core'] & {
|
|
30
|
+
builder?: BuilderName | {
|
|
31
|
+
name: BuilderName;
|
|
32
|
+
options: BuilderOptions;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
typescript?: Partial<TypescriptOptions & TypescriptOptions_2>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export * from "@storybook/web-components";
|
|
40
|
+
|
|
41
|
+
export { }
|
package/dist/index.js
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import type { BuilderOptions } from 'storybook-builder-rsbuild';
|
|
2
|
+
import type { CompatibleString } from 'storybook/internal/types';
|
|
3
|
+
import type { StorybookConfig as StorybookConfig_2 } from 'storybook/internal/types';
|
|
4
|
+
import type { StorybookConfigRsbuild } from 'storybook-builder-rsbuild';
|
|
5
|
+
import type { TypescriptOptions } from 'storybook/internal/types';
|
|
6
|
+
import type { TypescriptOptions as TypescriptOptions_2 } from 'storybook-builder-rsbuild';
|
|
7
|
+
|
|
8
|
+
declare type BuilderName = CompatibleString<'storybook-builder-rsbuild'>;
|
|
9
|
+
|
|
10
|
+
export declare function defineMain(config: StorybookConfig): StorybookConfig;
|
|
11
|
+
|
|
12
|
+
declare type FrameworkName = CompatibleString<'storybook-web-components-rsbuild'>;
|
|
13
|
+
|
|
14
|
+
declare type FrameworkOptions = {
|
|
15
|
+
builder?: BuilderOptions;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The interface for Storybook configuration in `main.ts` files.
|
|
20
|
+
*/
|
|
21
|
+
export declare type StorybookConfig = Omit<StorybookConfig_2, keyof StorybookConfigRsbuild | keyof StorybookConfigFramework> & StorybookConfigRsbuild & StorybookConfigFramework;
|
|
22
|
+
|
|
23
|
+
declare type StorybookConfigFramework = {
|
|
24
|
+
framework: FrameworkName | {
|
|
25
|
+
name: FrameworkName;
|
|
26
|
+
options: FrameworkOptions;
|
|
27
|
+
};
|
|
28
|
+
core?: StorybookConfig_2['core'] & {
|
|
29
|
+
builder?: BuilderName | {
|
|
30
|
+
name: BuilderName;
|
|
31
|
+
options: BuilderOptions;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
typescript?: Partial<TypescriptOptions & TypescriptOptions_2>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { }
|
package/dist/node/index.js
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_c147c033524cec14 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_c147c033524cec14 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_c147c033524cec14.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_c147c033524cec14.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_c147c033524cec14.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/node/index.ts
|
|
1
|
+
import "node:module";
|
|
14
2
|
function defineMain(config) {
|
|
15
|
-
|
|
3
|
+
return config;
|
|
16
4
|
}
|
|
17
|
-
export {
|
|
18
|
-
defineMain
|
|
19
|
-
};
|
|
5
|
+
export { defineMain };
|
package/dist/preset.js
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_c147c033524cec14 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_c147c033524cec14 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_c147c033524cec14.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_c147c033524cec14.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_c147c033524cec14.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/preset.ts
|
|
1
|
+
import "node:module";
|
|
14
2
|
import { fileURLToPath } from "node:url";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
};
|
|
27
|
-
}, rsbuildFinal = (config, _options) => (delete config.html, config);
|
|
28
|
-
export {
|
|
29
|
-
core,
|
|
30
|
-
rsbuildFinal
|
|
3
|
+
const core = async (config, options)=>{
|
|
4
|
+
const frameworkOptions = await options.presets.apply('frameworkOptions');
|
|
5
|
+
return {
|
|
6
|
+
...config,
|
|
7
|
+
builder: {
|
|
8
|
+
name: fileURLToPath(import.meta.resolve('storybook-builder-rsbuild')),
|
|
9
|
+
options: frameworkOptions?.builder || {}
|
|
10
|
+
},
|
|
11
|
+
renderer: fileURLToPath(import.meta.resolve('@storybook/web-components/preset'))
|
|
12
|
+
};
|
|
31
13
|
};
|
|
14
|
+
const rsbuildFinal = (config, _options)=>{
|
|
15
|
+
delete config.html;
|
|
16
|
+
return config;
|
|
17
|
+
};
|
|
18
|
+
export { core, rsbuildFinal };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-web-components-rsbuild",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Storybook for web component and Rsbuild: Develop React Component in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -42,20 +42,21 @@
|
|
|
42
42
|
"!src/**/*"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@storybook/web-components": "^10.
|
|
46
|
-
"storybook-builder-rsbuild": "3.
|
|
45
|
+
"@storybook/web-components": "^10.6.0",
|
|
46
|
+
"storybook-builder-rsbuild": "3.6.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@
|
|
49
|
+
"@microsoft/api-extractor": "^7.59.3",
|
|
50
|
+
"@rsbuild/core": "^2.2.11",
|
|
50
51
|
"@types/node": "^22.0.0",
|
|
51
52
|
"lit": "^3.3.3",
|
|
52
|
-
"storybook": "10.
|
|
53
|
+
"storybook": "10.6.0",
|
|
53
54
|
"typescript": "^5.9.3"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"@rsbuild/core": "^1.5.0 || ^2.0.0-0",
|
|
57
58
|
"lit": "^2.0.0 || ^3.0.0",
|
|
58
|
-
"storybook": "^10.
|
|
59
|
+
"storybook": "^10.6.0"
|
|
59
60
|
},
|
|
60
61
|
"engines": {
|
|
61
62
|
"node": ">=18.0.0"
|
|
@@ -72,8 +73,7 @@
|
|
|
72
73
|
"platform": "node"
|
|
73
74
|
},
|
|
74
75
|
"scripts": {
|
|
75
|
-
"build": "
|
|
76
|
-
"
|
|
77
|
-
"prep": "jiti ../../scripts/build/build-package.ts"
|
|
76
|
+
"build": "rstack lib",
|
|
77
|
+
"dev": "rstack lib --watch"
|
|
78
78
|
}
|
|
79
79
|
}
|