storybook-vue3-rsbuild 0.0.1-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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 fi3ework
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Storybook for React & Webpack
2
+
3
+ See [documentation](https://storybook.js.org/docs/8.0/get-started/react-webpack5?renderer=react) for installation instructions, usage examples, APIs, and more.
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ // dev-mode
2
+ export * from '../src/index';
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/index.ts
17
+ var src_exports = {};
18
+ module.exports = __toCommonJS(src_exports);
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -0,0 +1,2 @@
1
+ // dev-mode
2
+ export * from '../src/preset';
package/dist/preset.js ADDED
@@ -0,0 +1,95 @@
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 __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
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);
19
+
20
+ // src/preset.ts
21
+ var preset_exports = {};
22
+ __export(preset_exports, {
23
+ core: () => core,
24
+ rsbuildFinal: () => rsbuildFinal,
25
+ typescript: () => typescript
26
+ });
27
+ module.exports = __toCommonJS(preset_exports);
28
+ var import_path = require("path");
29
+
30
+ // src/framework-preset-vue3-docs.ts
31
+ var import_docs_tools = require("@storybook/docs-tools");
32
+ var import_core = require("@rsbuild/core");
33
+ var rsbuildFinal = (config, options) => {
34
+ if (!(0, import_docs_tools.hasDocsOrControls)(options))
35
+ return config;
36
+ let vueDocgenOptions = {};
37
+ options.presetsList?.forEach((preset) => {
38
+ if (preset.name.includes("addon-docs") && preset.options.vueDocgenOptions) {
39
+ const appendableOptions = preset.options.vueDocgenOptions;
40
+ vueDocgenOptions = {
41
+ ...vueDocgenOptions,
42
+ ...appendableOptions
43
+ };
44
+ }
45
+ });
46
+ const finalConfig = (0, import_core.mergeRsbuildConfig)(config, {
47
+ tools: {
48
+ rspack: (config2, { mergeConfig }) => {
49
+ return mergeConfig(config2, {
50
+ module: {
51
+ rules: [
52
+ {
53
+ test: /\.vue$/,
54
+ loader: require.resolve("vue-docgen-loader", {
55
+ // paths: [require.resolve('@storybook/preset-vue3-webpack')],
56
+ }),
57
+ enforce: "post",
58
+ options: {
59
+ docgenOptions: {
60
+ alias: config2.resolve?.alias,
61
+ ...vueDocgenOptions
62
+ }
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ });
68
+ }
69
+ }
70
+ });
71
+ return finalConfig;
72
+ };
73
+
74
+ // src/preset.ts
75
+ var getAbsolutePath = (input) => (0, import_path.dirname)(require.resolve((0, import_path.join)(input, "package.json")));
76
+ var core = async (config, options) => {
77
+ const framework = await options.presets.apply("framework");
78
+ return {
79
+ builder: {
80
+ name: getAbsolutePath("storybook-builder-rsbuild"),
81
+ options: typeof framework === "string" ? {} : framework.options.builder || {}
82
+ },
83
+ renderer: getAbsolutePath("@storybook/vue3")
84
+ };
85
+ };
86
+ var typescript = async (config) => ({
87
+ ...config,
88
+ skipCompiler: true
89
+ });
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ core,
93
+ rsbuildFinal,
94
+ typescript
95
+ });
@@ -0,0 +1,24 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined")
5
+ return require.apply(this, arguments);
6
+ throw Error('Dynamic require of "' + x + '" is not supported');
7
+ });
8
+
9
+ // src/preset.ts
10
+ import { dirname, join } from "path";
11
+ var getAbsolutePath = (input) => dirname(__require.resolve(join(input, "package.json")));
12
+ var core = async (config, options) => {
13
+ const framework = await options.presets.apply("framework");
14
+ return {
15
+ builder: {
16
+ name: getAbsolutePath("@storybook/builder-rsbuild"),
17
+ options: typeof framework === "string" ? {} : framework.options.builder || {}
18
+ },
19
+ renderer: getAbsolutePath("@storybook/vue3")
20
+ };
21
+ };
22
+ export {
23
+ core
24
+ };
package/dist/types.js ADDED
@@ -0,0 +1,18 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
package/dist/types.mjs ADDED
@@ -0,0 +1 @@
1
+ import "./chunk-WAXGOBY2.mjs";
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "storybook-vue3-rsbuild",
3
+ "version": "0.0.1-beta.0",
4
+ "description": "Storybook for Vue3: Develop React Component in isolation with Hot Reloading.",
5
+ "keywords": [
6
+ "storybook"
7
+ ],
8
+ "license": "MIT",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "node": "./dist/index.js",
13
+ "require": "./dist/index.js",
14
+ "import": "./dist/index.mjs"
15
+ },
16
+ "./preset": {
17
+ "types": "./dist/preset.d.ts",
18
+ "require": "./dist/preset.js"
19
+ },
20
+ "./react-docs": {
21
+ "types": "./dist/react-docs.d.ts",
22
+ "require": "./dist/react-docs.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "main": "dist/index.js",
27
+ "module": "dist/index.mjs",
28
+ "types": "dist/index.d.ts",
29
+ "files": [
30
+ "dist/**/*",
31
+ "README.md",
32
+ "*.js",
33
+ "*.d.ts",
34
+ "!src/**/*"
35
+ ],
36
+ "dependencies": {
37
+ "@rsbuild/core": "0.6.15",
38
+ "@storybook/vue3": "8.0.10",
39
+ "@storybook/docs-tools": "8.0.10",
40
+ "@storybook/types": "8.0.10",
41
+ "vue-docgen-loader": "^1.5.1",
42
+ "storybook-builder-rsbuild": "0.0.1-beta.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^18.0.0",
46
+ "typescript": "^5.3.2"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "typescript": {
50
+ "optional": true
51
+ }
52
+ },
53
+ "engines": {
54
+ "node": ">=18.0.0"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "bundler": {
60
+ "entries": [
61
+ "./src/index.ts",
62
+ "./src/preset.ts"
63
+ ],
64
+ "platform": "node"
65
+ },
66
+ "scripts": {
67
+ "check": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/check.ts",
68
+ "prep": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/bundle.ts"
69
+ }
70
+ }
package/preset.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/preset');