@pyreon/state-tree 0.11.5 → 0.11.7
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/README.md +63 -63
- package/lib/devtools.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +14 -14
- package/src/devtools.ts +1 -1
- package/src/index.ts +6 -6
- package/src/instance.ts +8 -8
- package/src/middleware.ts +3 -3
- package/src/model.ts +4 -4
- package/src/patch.ts +14 -14
- package/src/registry.ts +2 -2
- package/src/snapshot.ts +6 -6
- package/src/tests/comprehensive.test.ts +109 -109
- package/src/tests/devtools.test.ts +43 -43
- package/src/tests/edge-cases.test.ts +138 -138
- package/src/tests/model.test.ts +157 -157
- package/src/types.ts +3 -3
package/src/types.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Computed, Signal } from
|
|
1
|
+
import type { Computed, Signal } from '@pyreon/reactivity'
|
|
2
2
|
|
|
3
3
|
// ─── Model brand ──────────────────────────────────────────────────────────────
|
|
4
4
|
|
|
5
5
|
/** Property key stamped on every ModelDefinition to distinguish it from plain objects. */
|
|
6
|
-
export const MODEL_BRAND =
|
|
6
|
+
export const MODEL_BRAND = '__pyreonMod' as const
|
|
7
7
|
|
|
8
8
|
// ─── State type helpers ───────────────────────────────────────────────────────
|
|
9
9
|
|
|
@@ -64,7 +64,7 @@ export type Snapshot<TState extends StateShape> = {
|
|
|
64
64
|
// ─── Patch ────────────────────────────────────────────────────────────────────
|
|
65
65
|
|
|
66
66
|
export interface Patch {
|
|
67
|
-
op:
|
|
67
|
+
op: 'replace'
|
|
68
68
|
path: string
|
|
69
69
|
value: unknown
|
|
70
70
|
}
|