@modern-js/storybook-builder 0.0.0-next-20250403083459 → 0.0.0-next-20250407073728
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.
@@ -33,11 +33,11 @@ __export(modern_exports, {
|
|
33
33
|
});
|
34
34
|
module.exports = __toCommonJS(modern_exports);
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
36
|
-
var import_runtime =
|
37
|
-
var
|
38
|
-
var
|
36
|
+
var import_runtime = require("@modern-js/app-tools/runtime");
|
37
|
+
var import_router = __toESM(require("@modern-js/app-tools/runtime/router"));
|
38
|
+
var import_runtime2 = __toESM(require("@modern-js/plugin-state/runtime"));
|
39
39
|
const WrapProviders = (storyFn, config) => {
|
40
|
-
const App = (0,
|
40
|
+
const App = (0, import_runtime.createApp)({
|
41
41
|
plugins: resolvePlugins(config.modernConfigRuntime)
|
42
42
|
})(storyFn);
|
43
43
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {});
|
@@ -57,10 +57,10 @@ const resolvePlugins = (runtime) => {
|
|
57
57
|
if (api === allowedRuntimeAPI.state) {
|
58
58
|
if (typeof runtime.state === "boolean") {
|
59
59
|
if (runtime.state) {
|
60
|
-
plugins.push((0,
|
60
|
+
plugins.push((0, import_runtime2.default)({}));
|
61
61
|
}
|
62
62
|
} else if (typeof runtime.state === "object") {
|
63
|
-
plugins.push((0,
|
63
|
+
plugins.push((0, import_runtime2.default)(runtime.state));
|
64
64
|
}
|
65
65
|
} else if (api === allowedRuntimeAPI.router) {
|
66
66
|
plugins.push((0, import_router.default)({
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
2
|
+
import { createApp } from "@modern-js/app-tools/runtime";
|
3
|
+
import router from "@modern-js/app-tools/runtime/router";
|
2
4
|
import state from "@modern-js/plugin-state/runtime";
|
3
|
-
import { createApp } from "@modern-js/runtime";
|
4
|
-
import router from "@modern-js/runtime/router";
|
5
5
|
const WrapProviders = (storyFn, config) => {
|
6
6
|
const App = createApp({
|
7
7
|
plugins: resolvePlugins(config.modernConfigRuntime)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Plugin, RuntimePluginFuture } from '@modern-js/runtime';
|
1
|
+
import type { Plugin, RuntimePluginFuture } from '@modern-js/app-tools/runtime';
|
2
2
|
import React from 'react';
|
3
3
|
import type { IConfig } from '../type';
|
4
4
|
export declare const WrapProviders: (storyFn: any, config: IConfig) => React.JSX.Element;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@modern-js/storybook-builder",
|
3
|
-
"version": "0.0.0-next-
|
3
|
+
"version": "0.0.0-next-20250407073728",
|
4
4
|
"description": "modern.js support for storybook",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
},
|
52
52
|
"license": "MIT",
|
53
53
|
"dependencies": {
|
54
|
-
"@rsbuild/core": "1.3.
|
54
|
+
"@rsbuild/core": "1.3.4",
|
55
55
|
"@storybook/components": "~7.6.12",
|
56
56
|
"@storybook/core-common": "~7.6.12",
|
57
57
|
"@storybook/csf-plugin": "~7.6.12",
|
@@ -70,19 +70,19 @@
|
|
70
70
|
"remark-slug": "^7.0.1",
|
71
71
|
"serve-static": "^1.14.1",
|
72
72
|
"tinypool": "^0.8.0",
|
73
|
-
"@modern-js/core": "0.0.0-next-
|
74
|
-
"@modern-js/
|
75
|
-
"@modern-js/plugin-state": "0.0.0-next-
|
76
|
-
"@modern-js/uni-builder": "0.0.0-next-
|
77
|
-
"@modern-js/utils": "0.0.0-next-
|
73
|
+
"@modern-js/core": "0.0.0-next-20250407073728",
|
74
|
+
"@modern-js/app-tools": "0.0.0-next-20250407073728",
|
75
|
+
"@modern-js/plugin-state": "0.0.0-next-20250407073728",
|
76
|
+
"@modern-js/uni-builder": "0.0.0-next-20250407073728",
|
77
|
+
"@modern-js/utils": "0.0.0-next-20250407073728"
|
78
78
|
},
|
79
79
|
"devDependencies": {
|
80
80
|
"@storybook/types": "~7.6.12",
|
81
81
|
"@types/babel__core": "^7.20.5",
|
82
82
|
"@types/serve-static": "^1.13.10",
|
83
83
|
"typescript": "^5.2.2",
|
84
|
-
"@modern-js/core": "0.0.0-next-
|
85
|
-
"@scripts/build": "0.0.0-next-
|
84
|
+
"@modern-js/core": "0.0.0-next-20250407073728",
|
85
|
+
"@scripts/build": "0.0.0-next-20250407073728"
|
86
86
|
},
|
87
87
|
"publishConfig": {
|
88
88
|
"registry": "https://registry.npmjs.org/",
|