storybook-html-rsbuild 3.4.2 → 3.6.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 +38 -28
- package/dist/index.js +0 -1
- package/dist/node/index.d.ts +37 -30
- package/dist/node/index.js +3 -17
- package/dist/preset.js +12 -26
- package/package.json +9 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
declare type FrameworkName = CompatibleString<'storybook-html-rsbuild'>;
|
|
11
|
+
|
|
12
|
+
export declare type FrameworkOptions = {
|
|
13
|
+
builder?: BuilderOptions;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The interface for Storybook configuration in `main.ts` files.
|
|
18
|
+
*/
|
|
19
|
+
export declare type StorybookConfig = Omit<StorybookConfig_2, keyof StorybookConfigRsbuild | keyof StorybookConfigFramework> & StorybookConfigRsbuild & StorybookConfigFramework;
|
|
20
|
+
|
|
21
|
+
declare type StorybookConfigFramework = {
|
|
22
|
+
framework: FrameworkName | {
|
|
23
|
+
name: FrameworkName;
|
|
24
|
+
options: FrameworkOptions;
|
|
25
|
+
};
|
|
26
|
+
core?: StorybookConfig_2['core'] & {
|
|
27
|
+
builder?: BuilderName | {
|
|
28
|
+
name: BuilderName;
|
|
29
|
+
options: BuilderOptions;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
typescript?: Partial<TypescriptOptions & TypescriptOptions_2>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export * from "@storybook/html";
|
|
37
|
+
|
|
38
|
+
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-html-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_a4150d97859652c4 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_a4150d97859652c4 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_a4150d97859652c4.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_a4150d97859652c4.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_a4150d97859652c4.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,28 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_a4150d97859652c4 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_a4150d97859652c4 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_a4150d97859652c4.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_a4150d97859652c4.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_a4150d97859652c4.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
|
-
export {
|
|
27
|
-
core
|
|
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/html/preset'))
|
|
12
|
+
};
|
|
28
13
|
};
|
|
14
|
+
export { core };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-html-rsbuild",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Storybook for HTML and Rsbuild: View HTML snippets in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -40,24 +40,19 @@
|
|
|
40
40
|
"!src/**/*"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"find-up": "^5.0.0",
|
|
46
|
-
"magic-string": "^0.30.21",
|
|
47
|
-
"resolve": "^1.22.12",
|
|
48
|
-
"tsconfig-paths": "^4.2.0",
|
|
49
|
-
"storybook-builder-rsbuild": "3.4.2"
|
|
43
|
+
"@storybook/html": "^10.6.0",
|
|
44
|
+
"storybook-builder-rsbuild": "3.6.0"
|
|
50
45
|
},
|
|
51
46
|
"devDependencies": {
|
|
52
|
-
"@
|
|
47
|
+
"@microsoft/api-extractor": "^7.59.1",
|
|
48
|
+
"@rsbuild/core": "^2.2.6",
|
|
53
49
|
"@types/node": "^22.0.0",
|
|
54
|
-
"
|
|
55
|
-
"storybook": "10.5.5",
|
|
50
|
+
"storybook": "10.6.0",
|
|
56
51
|
"typescript": "^5.9.3"
|
|
57
52
|
},
|
|
58
53
|
"peerDependencies": {
|
|
59
54
|
"@rsbuild/core": "^1.5.0 || ^2.0.0-0",
|
|
60
|
-
"storybook": "^10.
|
|
55
|
+
"storybook": "^10.6.0",
|
|
61
56
|
"typescript": ">= 4.2.x"
|
|
62
57
|
},
|
|
63
58
|
"peerDependenciesMeta": {
|
|
@@ -80,8 +75,7 @@
|
|
|
80
75
|
"platform": "node"
|
|
81
76
|
},
|
|
82
77
|
"scripts": {
|
|
83
|
-
"build": "
|
|
84
|
-
"
|
|
85
|
-
"prep": "jiti ../../scripts/build/build-package.ts"
|
|
78
|
+
"build": "rstack lib",
|
|
79
|
+
"dev": "rstack lib --watch"
|
|
86
80
|
}
|
|
87
81
|
}
|