@modern-js/storybook-builder 2.65.5 → 2.67.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.
@@ -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 = require("@modern-js/runtime");
|
37
|
-
var
|
36
|
+
var import_runtime = __toESM(require("@modern-js/plugin-state/runtime"));
|
37
|
+
var import_runtime2 = require("@modern-js/runtime");
|
38
38
|
var import_router = __toESM(require("@modern-js/runtime/router"));
|
39
39
|
const WrapProviders = (storyFn, config) => {
|
40
|
-
const App = (0,
|
40
|
+
const App = (0, import_runtime2.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_runtime.default)({}));
|
61
61
|
}
|
62
62
|
} else if (typeof runtime.state === "object") {
|
63
|
-
plugins.push((0,
|
63
|
+
plugins.push((0, import_runtime.default)(runtime.state));
|
64
64
|
}
|
65
65
|
} else if (api === allowedRuntimeAPI.router) {
|
66
66
|
plugins.push((0, import_router.default)({
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
2
|
+
import state from "@modern-js/plugin-state/runtime";
|
2
3
|
import { createApp } from "@modern-js/runtime";
|
3
|
-
import state from "@modern-js/runtime/model";
|
4
4
|
import router from "@modern-js/runtime/router";
|
5
5
|
const WrapProviders = (storyFn, config) => {
|
6
6
|
const App = createApp({
|
@@ -2,4 +2,4 @@ import type { Plugin, RuntimePluginFuture } from '@modern-js/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;
|
5
|
-
export declare const resolvePlugins: (runtime: IConfig[
|
5
|
+
export declare const resolvePlugins: (runtime: IConfig["modernConfigRuntime"]) => (Plugin | RuntimePluginFuture)[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@modern-js/storybook-builder",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.67.0",
|
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.2
|
54
|
+
"@rsbuild/core": "1.3.2",
|
55
55
|
"@storybook/components": "~7.6.12",
|
56
56
|
"@storybook/core-common": "~7.6.12",
|
57
57
|
"@storybook/csf-plugin": "~7.6.12",
|
@@ -70,18 +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": "2.
|
74
|
-
"@modern-js/runtime": "2.
|
75
|
-
"@modern-js/
|
76
|
-
"@modern-js/uni-builder": "2.
|
73
|
+
"@modern-js/core": "2.67.0",
|
74
|
+
"@modern-js/runtime": "2.67.0",
|
75
|
+
"@modern-js/plugin-state": "2.67.0",
|
76
|
+
"@modern-js/uni-builder": "2.67.0",
|
77
|
+
"@modern-js/utils": "2.67.0"
|
77
78
|
},
|
78
79
|
"devDependencies": {
|
79
80
|
"@storybook/types": "~7.6.12",
|
80
81
|
"@types/babel__core": "^7.20.5",
|
81
82
|
"@types/serve-static": "^1.13.10",
|
82
83
|
"typescript": "^5.2.2",
|
83
|
-
"@modern-js/core": "2.
|
84
|
-
"@scripts/build": "2.
|
84
|
+
"@modern-js/core": "2.67.0",
|
85
|
+
"@scripts/build": "2.66.0"
|
85
86
|
},
|
86
87
|
"publishConfig": {
|
87
88
|
"registry": "https://registry.npmjs.org/",
|