mobx-keystone 1.11.5 → 1.12.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +4 -0
  3. package/dist/mobx-keystone.esm.js +3291 -3003
  4. package/dist/mobx-keystone.esm.mjs +3291 -3003
  5. package/dist/mobx-keystone.umd.js +3290 -3002
  6. package/dist/types/deepChange/index.d.ts +1 -0
  7. package/dist/types/deepChange/onDeepChange.d.ts +94 -0
  8. package/dist/types/frozen/Frozen.d.ts +15 -0
  9. package/dist/types/globalConfig/globalConfig.d.ts +1 -1
  10. package/dist/types/index.d.ts +1 -0
  11. package/dist/types/model/getModelMetadata.d.ts +7 -0
  12. package/dist/types/model/utils.d.ts +81 -0
  13. package/dist/types/modelShared/index.d.ts +1 -0
  14. package/dist/types/modelShared/modelInfo.d.ts +17 -1
  15. package/dist/types/snapshot/SnapshotOf.d.ts +6 -6
  16. package/package.json +96 -98
  17. package/src/actionMiddlewares/undoMiddleware.ts +796 -797
  18. package/src/deepChange/index.ts +1 -0
  19. package/src/deepChange/onDeepChange.ts +244 -0
  20. package/src/frozen/Frozen.ts +146 -135
  21. package/src/globalConfig/globalConfig.ts +107 -107
  22. package/src/index.ts +24 -23
  23. package/src/model/getModelMetadata.ts +61 -58
  24. package/src/model/newModel.ts +283 -243
  25. package/src/model/utils.ts +154 -4
  26. package/src/modelShared/index.ts +4 -3
  27. package/src/modelShared/modelDecorator.ts +16 -8
  28. package/src/modelShared/modelInfo.ts +5 -2
  29. package/src/modelShared/newModel.ts +9 -1
  30. package/src/modelShared/sharedInternalModel.ts +4 -0
  31. package/src/snapshot/SnapshotOf.ts +104 -103
  32. package/src/snapshot/applySnapshot.ts +149 -150
  33. package/src/snapshot/fromModelSnapshot.ts +3 -3
  34. package/src/snapshot/fromSnapshot.ts +175 -174
  35. package/src/snapshot/internal.ts +50 -15
  36. package/src/snapshot/reconcileModelSnapshot.ts +134 -134
  37. package/src/tweaker/tweakArray.ts +25 -2
  38. package/src/tweaker/tweakFrozen.ts +42 -42
  39. package/src/tweaker/tweakPlainObject.ts +45 -5
  40. package/src/utils/ModelPool.ts +59 -59
  41. package/src/wrappers/ArraySet.ts +141 -141
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.12.1
4
+
5
+ - Fix: `toSnapshotProcessor` now correctly defers execution until the model instance is fully initialized, allowing access to model properties and computed values (#560).
6
+
7
+ ## 1.12.0
8
+
9
+ - Adds `getSnapshotModelType`, `getSnapshotModelId` and other utilities.
10
+ - Adds support for Loro CRDT via the new `mobx-keystone-loro` package.
11
+
3
12
  ## 1.11.5
4
13
 
5
14
  - Fix: Some retrocompatibility issues with MobX 4/5.
package/README.md CHANGED
@@ -34,6 +34,8 @@
34
34
 
35
35
  #### New! Y.js bindings for `mobx-keystone` are now available in the `mobx-keystone-yjs` package as well as a working example in the examples section of the online docs.
36
36
 
37
+ #### New! Loro CRDT bindings for `mobx-keystone` are now available in the `mobx-keystone-loro` package with native move operation support for arrays, as well as a working example in the examples section of the online docs.
38
+
37
39
  ## Introduction
38
40
 
39
41
  `mobx-keystone` is a state container that combines the _simplicity and ease of mutable data_ with the _traceability of immutable data_ and the _reactiveness and performance of observable data_, all with a fully compatible TypeScript syntax.
@@ -82,3 +84,5 @@ If you are using TypeScript, then version >= 4.2.0 is recommended, though it _mi
82
84
  > `npm install mobx-keystone`
83
85
 
84
86
  > `yarn add mobx-keystone`
87
+
88
+ > `pnpm add mobx-keystone`