@modern-js/plugin-state 2.65.5-alpha.1 → 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.
@@ -21,6 +21,7 @@ var plugin_exports = {};
21
21
  __export(plugin_exports, {
22
22
  Provider: () => import_react.Provider,
23
23
  default: () => plugin_default,
24
+ getStoreConfig: () => getStoreConfig,
24
25
  statePlugin: () => statePlugin
25
26
  });
26
27
  module.exports = __toCommonJS(plugin_exports);
@@ -90,6 +91,7 @@ var plugin_default = statePlugin;
90
91
  // Annotate the CommonJS export names for ESM import in node:
91
92
  0 && (module.exports = {
92
93
  Provider,
94
+ getStoreConfig,
93
95
  statePlugin,
94
96
  ...require("../plugins")
95
97
  });
@@ -88,5 +88,6 @@ export * from "../plugins";
88
88
  export {
89
89
  Provider,
90
90
  plugin_default as default,
91
+ getStoreConfig,
91
92
  statePlugin
92
93
  };
@@ -64,5 +64,6 @@ export * from "../plugins";
64
64
  export {
65
65
  Provider,
66
66
  plugin_default as default,
67
+ getStoreConfig,
67
68
  statePlugin
68
69
  };
@@ -1,5 +1,5 @@
1
1
  import { Provider } from '@modern-js-reduck/react';
2
- import { type Model } from '@modern-js-reduck/store';
2
+ import { type Model, type StoreConfig } from '@modern-js-reduck/store';
3
3
  import type { Plugin } from '@modern-js/runtime';
4
4
  export { Provider };
5
5
  type StatePluginType = 'immer' | 'effects' | 'autoActions' | 'devtools';
@@ -8,6 +8,7 @@ type StateExtraType = {
8
8
  models: Array<Model>;
9
9
  };
10
10
  export type StateConfig = Partial<Record<StatePluginType, boolean> & StateExtraType>;
11
+ export declare const getStoreConfig: (config: StateConfig) => StoreConfig;
11
12
  export declare const statePlugin: (userConfig?: StateConfig) => Plugin;
12
13
  export default statePlugin;
13
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.1",
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/runtime-utils": "2.65.4",
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
- "@scripts/build": "2.65.4",
83
81
  "@modern-js/app-tools": "2.65.4",
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,