@gost-kit/svelte 0.1.0 → 0.1.1
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/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { createDispatch } from '@gost-kit/common';
|
|
1
|
+
import { createDispatch, } from '@gost-kit/common';
|
|
2
2
|
export const createStore = ({ initState, reducer, effector, onError, }) => {
|
|
3
3
|
// Reducers replace complete immutable state; deep proxies are unnecessary.
|
|
4
4
|
let state = $state.raw(initState);
|
|
5
5
|
const dispatch = createDispatch({
|
|
6
|
-
readState: () =>
|
|
6
|
+
readState: () => {
|
|
7
|
+
return state;
|
|
8
|
+
},
|
|
7
9
|
writeState: (next) => {
|
|
8
10
|
state = next;
|
|
9
11
|
},
|
|
@@ -12,7 +14,9 @@ export const createStore = ({ initState, reducer, effector, onError, }) => {
|
|
|
12
14
|
onError,
|
|
13
15
|
});
|
|
14
16
|
return {
|
|
15
|
-
get state() {
|
|
17
|
+
get state() {
|
|
18
|
+
return state;
|
|
19
|
+
},
|
|
16
20
|
dispatch,
|
|
17
21
|
};
|
|
18
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gost-kit/svelte",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Svelte bindings for GOST functional core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prepack": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@gost-kit/common": "^0.
|
|
28
|
+
"@gost-kit/common": "^0.2.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"svelte": "^5.57.2"
|