@modern-js/plugin-state 2.65.5-alpha.0 → 2.65.5-alpha.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.
|
@@ -19,7 +19,9 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
var plugin_exports = {};
|
|
21
21
|
__export(plugin_exports, {
|
|
22
|
+
Provider: () => import_react.Provider,
|
|
22
23
|
default: () => plugin_default,
|
|
24
|
+
getStoreConfig: () => getStoreConfig,
|
|
23
25
|
statePlugin: () => statePlugin
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(plugin_exports);
|
|
@@ -88,6 +90,8 @@ const statePlugin = (userConfig = {}) => ({
|
|
|
88
90
|
var plugin_default = statePlugin;
|
|
89
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
90
92
|
0 && (module.exports = {
|
|
93
|
+
Provider,
|
|
94
|
+
getStoreConfig,
|
|
91
95
|
statePlugin,
|
|
92
96
|
...require("../plugins")
|
|
93
97
|
});
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Provider } from '@modern-js-reduck/react';
|
|
2
|
+
import { type Model, type StoreConfig } from '@modern-js-reduck/store';
|
|
2
3
|
import type { Plugin } from '@modern-js/runtime';
|
|
4
|
+
export { Provider };
|
|
3
5
|
type StatePluginType = 'immer' | 'effects' | 'autoActions' | 'devtools';
|
|
4
6
|
type StateExtraType = {
|
|
5
7
|
initialState: any;
|
|
6
8
|
models: Array<Model>;
|
|
7
9
|
};
|
|
8
10
|
export type StateConfig = Partial<Record<StatePluginType, boolean> & StateExtraType>;
|
|
11
|
+
export declare const getStoreConfig: (config: StateConfig) => StoreConfig;
|
|
9
12
|
export declare const statePlugin: (userConfig?: StateConfig) => Plugin;
|
|
10
13
|
export default statePlugin;
|
|
11
14
|
export * from '../plugins';
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.65.5-alpha.
|
|
18
|
+
"version": "2.65.5-alpha.2",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@modern-js-reduck/store": "^1.1.10",
|
|
60
60
|
"@swc/helpers": "0.5.13",
|
|
61
61
|
"@modern-js/types": "2.65.4",
|
|
62
|
-
"@modern-js/
|
|
63
|
-
"@modern-js/utils": "2.65.4"
|
|
62
|
+
"@modern-js/utils": "2.65.4",
|
|
63
|
+
"@modern-js/runtime-utils": "2.65.4"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": ">=17",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"react-dom": "^18.3.1",
|
|
79
79
|
"ts-jest": "^29.1.0",
|
|
80
80
|
"typescript": "^5",
|
|
81
|
-
"@modern-js/runtime": "2.65.4",
|
|
82
81
|
"@modern-js/app-tools": "2.65.4",
|
|
83
82
|
"@scripts/build": "2.65.4",
|
|
83
|
+
"@modern-js/runtime": "2.65.4",
|
|
84
84
|
"@scripts/jest-config": "2.65.4"
|
|
85
85
|
},
|
|
86
86
|
"sideEffects": false,
|