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 CHANGED
@@ -1,28 +1,38 @@
1
- export * from '@storybook/html';
2
- import { StorybookConfig as StorybookConfig$1, CompatibleString, TypescriptOptions } from 'storybook/internal/types';
3
- import { BuilderOptions, StorybookConfigRsbuild, TypescriptOptions as TypescriptOptions$1 } from 'storybook-builder-rsbuild';
4
-
5
- type FrameworkName = CompatibleString<'storybook-html-rsbuild'>;
6
- type BuilderName = CompatibleString<'storybook-builder-rsbuild'>;
7
- type FrameworkOptions = {
8
- builder?: BuilderOptions;
9
- };
10
- type StorybookConfigFramework = {
11
- framework: FrameworkName | {
12
- name: FrameworkName;
13
- options: FrameworkOptions;
14
- };
15
- core?: StorybookConfig$1['core'] & {
16
- builder?: BuilderName | {
17
- name: BuilderName;
18
- options: BuilderOptions;
19
- };
20
- };
21
- typescript?: Partial<TypescriptOptions & TypescriptOptions$1>;
22
- };
23
- /**
24
- * The interface for Storybook configuration in `main.ts` files.
25
- */
26
- type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigRsbuild | keyof StorybookConfigFramework> & StorybookConfigRsbuild & StorybookConfigFramework;
27
-
28
- export type { FrameworkOptions, StorybookConfig };
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
@@ -1,2 +1 @@
1
- // src/index.ts
2
1
  export * from "@storybook/html";
@@ -1,30 +1,37 @@
1
- import { StorybookConfig as StorybookConfig$1, CompatibleString, TypescriptOptions } from 'storybook/internal/types';
2
- import { StorybookConfigRsbuild, BuilderOptions, TypescriptOptions as TypescriptOptions$1 } from 'storybook-builder-rsbuild';
3
-
4
- type FrameworkName = CompatibleString<'storybook-html-rsbuild'>;
5
- type BuilderName = CompatibleString<'storybook-builder-rsbuild'>;
6
- type FrameworkOptions = {
7
- builder?: BuilderOptions;
8
- };
9
- type StorybookConfigFramework = {
10
- framework: FrameworkName | {
11
- name: FrameworkName;
12
- options: FrameworkOptions;
13
- };
14
- core?: StorybookConfig$1['core'] & {
15
- builder?: BuilderName | {
16
- name: BuilderName;
17
- options: BuilderOptions;
18
- };
19
- };
20
- typescript?: Partial<TypescriptOptions & TypescriptOptions$1>;
21
- };
22
- /**
23
- * The interface for Storybook configuration in `main.ts` files.
24
- */
25
- type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigRsbuild | keyof StorybookConfigFramework> & StorybookConfigRsbuild & StorybookConfigFramework;
26
-
27
- declare function defineMain(config: StorybookConfig): StorybookConfig;
28
-
29
- export { defineMain };
30
- export type { StorybookConfig };
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 { }
@@ -1,19 +1,5 @@
1
- import CJS_COMPAT_NODE_URL_a4150d97859652c4 from 'node:url';
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
- return config;
3
+ return config;
16
4
  }
17
- export {
18
- defineMain
19
- };
5
+ export { defineMain };
package/dist/preset.js CHANGED
@@ -1,28 +1,14 @@
1
- import CJS_COMPAT_NODE_URL_a4150d97859652c4 from 'node:url';
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
- var core = async (config, options) => {
16
- let framework = await options.presets.apply("framework");
17
- return {
18
- ...config,
19
- builder: {
20
- name: fileURLToPath(import.meta.resolve("storybook-builder-rsbuild")),
21
- options: typeof framework == "string" ? {} : framework.options.builder || {}
22
- },
23
- renderer: fileURLToPath(import.meta.resolve("@storybook/html/preset"))
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.4.2",
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
- "@rollup/pluginutils": "^5.4.0",
44
- "@storybook/html": "^10.5.5",
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
- "@rsbuild/core": "^2.1.10",
47
+ "@microsoft/api-extractor": "^7.59.1",
48
+ "@rsbuild/core": "^2.2.6",
53
49
  "@types/node": "^22.0.0",
54
- "@types/resolve": "^1.20.6",
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.5.5",
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": "pnpm run prep --production",
84
- "check": "jiti ../../scripts/check/check-package.ts",
85
- "prep": "jiti ../../scripts/build/build-package.ts"
78
+ "build": "rstack lib",
79
+ "dev": "rstack lib --watch"
86
80
  }
87
81
  }