jotai-state-tree 1.9.0 → 1.10.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.
- package/dist/{chunk-37XARU7S.mjs → chunk-MLAEAO2W.mjs} +3 -0
- package/dist/index.js +3 -0
- package/dist/index.mjs +1 -1
- package/dist/react.js +3 -0
- package/dist/react.mjs +1 -1
- package/package.json +2 -1
- package/src/persistence.ts +3 -0
|
@@ -4248,6 +4248,9 @@ var PersistenceManager = class {
|
|
|
4248
4248
|
...prev,
|
|
4249
4249
|
pendingSyncCount: queue.length
|
|
4250
4250
|
}));
|
|
4251
|
+
if (this.patchDisposer) {
|
|
4252
|
+
this.patchDisposer();
|
|
4253
|
+
}
|
|
4251
4254
|
this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
|
|
4252
4255
|
this.handlePatch(patch, reversePatch);
|
|
4253
4256
|
});
|
package/dist/index.js
CHANGED
|
@@ -5061,6 +5061,9 @@ var PersistenceManager = class {
|
|
|
5061
5061
|
...prev,
|
|
5062
5062
|
pendingSyncCount: queue.length
|
|
5063
5063
|
}));
|
|
5064
|
+
if (this.patchDisposer) {
|
|
5065
|
+
this.patchDisposer();
|
|
5066
|
+
}
|
|
5064
5067
|
this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
|
|
5065
5068
|
this.handlePatch(patch, reversePatch);
|
|
5066
5069
|
});
|
package/dist/index.mjs
CHANGED
package/dist/react.js
CHANGED
|
@@ -1020,6 +1020,9 @@ var PersistenceManager = class {
|
|
|
1020
1020
|
...prev,
|
|
1021
1021
|
pendingSyncCount: queue.length
|
|
1022
1022
|
}));
|
|
1023
|
+
if (this.patchDisposer) {
|
|
1024
|
+
this.patchDisposer();
|
|
1025
|
+
}
|
|
1023
1026
|
this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
|
|
1024
1027
|
this.handlePatch(patch, reversePatch);
|
|
1025
1028
|
});
|
package/dist/react.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jotai-state-tree",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "MobX-State-Tree API compatible library powered by Jotai",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"example:notes": "npm --prefix examples/note-taking-ssr run dev",
|
|
39
39
|
"example:router": "npm --prefix examples/multipage-router run dev",
|
|
40
40
|
"example:persistence": "npm --prefix examples/offline-sync-persistence run dev",
|
|
41
|
+
"example:starter": "npm --prefix examples/project-starter run dev",
|
|
41
42
|
"examples:install": "for dir in examples/*; do [ -d \"$dir\" ] && npm install --prefix \"$dir\"; done"
|
|
42
43
|
},
|
|
43
44
|
"keywords": [
|
package/src/persistence.ts
CHANGED
|
@@ -490,6 +490,9 @@ export class PersistenceManager {
|
|
|
490
490
|
}));
|
|
491
491
|
|
|
492
492
|
// Start listening to patches for optimistic sync
|
|
493
|
+
if (this.patchDisposer) {
|
|
494
|
+
this.patchDisposer();
|
|
495
|
+
}
|
|
493
496
|
this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
|
|
494
497
|
this.handlePatch(patch, reversePatch);
|
|
495
498
|
});
|