storybook-web-components-rsbuild 2.1.6 → 3.0.0-beta.2
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/_node-chunks/chunk-MLRLK7ZO.js +21 -0
- package/dist/index.d.ts +3 -28
- package/dist/index.js +1 -23
- package/dist/node/index.d.ts +3 -8
- package/dist/node/index.js +14 -26
- package/dist/preset.js +21 -37
- package/package.json +15 -25
- package/preset.js +1 -1
- package/dist/index.mjs +0 -1
- package/dist/node/index.mjs +0 -6
- package/dist/preset.d.ts +0 -9
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_58f5184df4ee7d3d from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_58f5184df4ee7d3d from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_58f5184df4ee7d3d from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_58f5184df4ee7d3d.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_58f5184df4ee7d3d.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_58f5184df4ee7d3d.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {
|
|
13
|
+
get: (a, b) => (typeof require < "u" ? require : a)[b]
|
|
14
|
+
}) : x)(function(x) {
|
|
15
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
16
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
__require
|
|
21
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type FrameworkName = 'storybook-web-components-rsbuild';
|
|
6
|
-
type BuilderName = '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 { FrameworkOptions, StorybookConfig };
|
|
1
|
+
// auto generated file from file:///Users/bytedance/Projects/storybook-rsbuild/scripts/build/utils/generate-type-mappers.ts, do not edit
|
|
2
|
+
export * from '../src/index.ts';
|
|
3
|
+
export type * from '../src/index.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
1
|
// src/index.ts
|
|
18
|
-
|
|
19
|
-
module.exports = __toCommonJS(src_exports);
|
|
20
|
-
__reExport(src_exports, require("@storybook/web-components"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("@storybook/web-components")
|
|
24
|
-
});
|
|
2
|
+
export * from "@storybook/web-components";
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import 'storybook/internal/types';
|
|
5
|
-
|
|
6
|
-
declare function defineMain(config: StorybookConfig): StorybookConfig;
|
|
7
|
-
|
|
8
|
-
export { defineMain };
|
|
1
|
+
// auto generated file from file:///Users/bytedance/Projects/storybook-rsbuild/scripts/build/utils/generate-type-mappers.ts, do not edit
|
|
2
|
+
export * from '../../src/node/index.ts';
|
|
3
|
+
export type * from '../../src/node/index.ts';
|
package/dist/node/index.js
CHANGED
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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);
|
|
1
|
+
import CJS_COMPAT_NODE_URL_58f5184df4ee7d3d from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_58f5184df4ee7d3d from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_58f5184df4ee7d3d from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_58f5184df4ee7d3d.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_58f5184df4ee7d3d.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_58f5184df4ee7d3d.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import "../_node-chunks/chunk-MLRLK7ZO.js";
|
|
19
13
|
|
|
20
14
|
// src/node/index.ts
|
|
21
|
-
var node_exports = {};
|
|
22
|
-
__export(node_exports, {
|
|
23
|
-
defineMain: () => defineMain
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(node_exports);
|
|
26
15
|
function defineMain(config) {
|
|
27
16
|
return config;
|
|
28
17
|
}
|
|
29
|
-
|
|
30
|
-
0 && (module.exports = {
|
|
18
|
+
export {
|
|
31
19
|
defineMain
|
|
32
|
-
}
|
|
20
|
+
};
|
package/dist/preset.js
CHANGED
|
@@ -1,47 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
import CJS_COMPAT_NODE_URL_58f5184df4ee7d3d from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_58f5184df4ee7d3d from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_58f5184df4ee7d3d from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_58f5184df4ee7d3d.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_58f5184df4ee7d3d.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_58f5184df4ee7d3d.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
__require
|
|
14
|
+
} from "./_node-chunks/chunk-MLRLK7ZO.js";
|
|
19
15
|
|
|
20
16
|
// src/preset.ts
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
rsbuildFinal: () => rsbuildFinal
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(preset_exports);
|
|
27
|
-
var import_node_path = require("path");
|
|
28
|
-
var getAbsolutePath = (input) => (0, import_node_path.dirname)(require.resolve((0, import_node_path.join)(input, "package.json")));
|
|
29
|
-
var core = async (config, options) => {
|
|
30
|
-
const framework = await options.presets.apply("framework");
|
|
17
|
+
import { dirname, join } from "node:path";
|
|
18
|
+
var getAbsolutePath = (input) => dirname(__require.resolve(join(input, "package.json"))), core = async (config, options) => {
|
|
19
|
+
let framework = await options.presets.apply("framework");
|
|
31
20
|
return {
|
|
32
21
|
builder: {
|
|
33
22
|
name: getAbsolutePath("storybook-builder-rsbuild"),
|
|
34
|
-
options: typeof framework
|
|
23
|
+
options: typeof framework == "string" ? {} : framework.options.builder || {}
|
|
35
24
|
},
|
|
36
25
|
renderer: getAbsolutePath("@storybook/web-components")
|
|
37
26
|
};
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
delete config.html;
|
|
41
|
-
return config;
|
|
42
|
-
};
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
27
|
+
}, rsbuildFinal = (config, options) => (delete config.html, config);
|
|
28
|
+
export {
|
|
45
29
|
core,
|
|
46
30
|
rsbuildFinal
|
|
47
|
-
}
|
|
31
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-web-components-rsbuild",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "Storybook for web component and Rsbuild: Develop React Component in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -21,31 +21,21 @@
|
|
|
21
21
|
"directory": "packages/framework-web-components"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
|
+
"type": "module",
|
|
24
25
|
"exports": {
|
|
25
26
|
".": {
|
|
26
27
|
"types": "./dist/index.d.ts",
|
|
27
|
-
"
|
|
28
|
-
"require": "./dist/index.js",
|
|
29
|
-
"import": "./dist/index.mjs"
|
|
30
|
-
},
|
|
31
|
-
"./preset": {
|
|
32
|
-
"types": "./dist/preset.d.ts",
|
|
33
|
-
"require": "./dist/preset.js"
|
|
34
|
-
},
|
|
35
|
-
"./react-docs": {
|
|
36
|
-
"types": "./dist/react-docs.d.ts",
|
|
37
|
-
"require": "./dist/react-docs.js"
|
|
28
|
+
"default": "./dist/index.js"
|
|
38
29
|
},
|
|
39
30
|
"./node": {
|
|
40
31
|
"types": "./dist/node/index.d.ts",
|
|
41
|
-
"
|
|
42
|
-
"import": "./dist/node/index.mjs",
|
|
43
|
-
"require": "./dist/node/index.js"
|
|
32
|
+
"default": "./dist/node/index.js"
|
|
44
33
|
},
|
|
45
|
-
"./package.json": "./package.json"
|
|
34
|
+
"./package.json": "./package.json",
|
|
35
|
+
"./preset": "./dist/preset.js"
|
|
46
36
|
},
|
|
47
37
|
"main": "dist/index.js",
|
|
48
|
-
"module": "dist/index.
|
|
38
|
+
"module": "dist/index.js",
|
|
49
39
|
"types": "dist/index.d.ts",
|
|
50
40
|
"files": [
|
|
51
41
|
"dist/**/*",
|
|
@@ -55,20 +45,20 @@
|
|
|
55
45
|
"!src/**/*"
|
|
56
46
|
],
|
|
57
47
|
"dependencies": {
|
|
58
|
-
"@storybook/web-components": "^
|
|
59
|
-
"storybook-builder-rsbuild": "
|
|
48
|
+
"@storybook/web-components": "^10.0.0",
|
|
49
|
+
"storybook-builder-rsbuild": "3.0.0-beta.2"
|
|
60
50
|
},
|
|
61
51
|
"devDependencies": {
|
|
62
52
|
"@rsbuild/core": "^1.5.17",
|
|
63
|
-
"@types/node": "^
|
|
53
|
+
"@types/node": "^22.0.0",
|
|
64
54
|
"lit": "^3.3.1",
|
|
65
|
-
"storybook": "
|
|
55
|
+
"storybook": "10.0.7",
|
|
66
56
|
"typescript": "^5.9.3"
|
|
67
57
|
},
|
|
68
58
|
"peerDependencies": {
|
|
69
59
|
"@rsbuild/core": "^1.5.0",
|
|
70
60
|
"lit": "^2.0.0 || ^3.0.0",
|
|
71
|
-
"storybook": "^
|
|
61
|
+
"storybook": "^10.0.0"
|
|
72
62
|
},
|
|
73
63
|
"engines": {
|
|
74
64
|
"node": ">=18.0.0"
|
|
@@ -85,8 +75,8 @@
|
|
|
85
75
|
"platform": "node"
|
|
86
76
|
},
|
|
87
77
|
"scripts": {
|
|
88
|
-
"build": "pnpm run prep
|
|
89
|
-
"check": "jiti ../../scripts/
|
|
90
|
-
"prep": "jiti ../../scripts/
|
|
78
|
+
"build": "pnpm run prep",
|
|
79
|
+
"check": "jiti ../../scripts/check/check-package.ts",
|
|
80
|
+
"prep": "jiti ../../scripts/build/build-package.ts"
|
|
91
81
|
}
|
|
92
82
|
}
|
package/preset.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './dist/preset.js'
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@storybook/web-components';
|
package/dist/node/index.mjs
DELETED
package/dist/preset.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PresetProperty } from 'storybook/internal/types';
|
|
2
|
-
import { StorybookConfig } from './index.js';
|
|
3
|
-
import '@storybook/web-components';
|
|
4
|
-
import 'storybook-builder-rsbuild';
|
|
5
|
-
|
|
6
|
-
declare const core: PresetProperty<'core'>;
|
|
7
|
-
declare const rsbuildFinal: StorybookConfig['rsbuildFinal'];
|
|
8
|
-
|
|
9
|
-
export { core, rsbuildFinal };
|