@shivaedev/react 0.36.0 → 0.37.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/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.37.0 - 2026-11-03
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Editors and create forms attach observed draft storage to the form atoms' lifetime.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Completing an older submission preserves newer shared draft input and local edits in progress.
|
|
12
|
+
|
|
3
13
|
## 0.36.0 - 2026-11-03
|
|
4
14
|
|
|
5
15
|
### Breaking
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ An **editor** joins a query atom, a form field schema and a save Effect. The que
|
|
|
30
30
|
|
|
31
31
|
A **session generation** is the string returned by `identify(session)`. `SessionBoundary` owns its client, registry and React subtree. Your auth owner supplies the session and decides when to replace or end it. The boundary automatically mounts live connections on bound contract APIs returned by `connect`, directly or as client properties such as `api`. Use a Platform database host and the default shared WebSocket client; the application needs no subscribe handler or `live()` call. Live changed hints coalesce over 20 ms by default. Set `liveCoalesceWindow` on `SessionBoundary` to a native Duration to choose the window for that session, or `0` for immediate per-hint refreshes. A bound query can override that default with `useQuery(atom, { coalesceWindow: "2 seconds" })`. Changing this option applies to subsequent windows without reconnecting or refetching any query; a window already started keeps its deadline. A refetch in flight runs once more after settling when further hints arrive. Cache policy, RPC declarations and transport stay with native Effect and the application; this package supplies their React state and lifecycle boundary.
|
|
32
32
|
|
|
33
|
-
`useEditor` and `useCreate` opt into persisted input with `persistedDraft: { key, ...persistence }`. Choose a stable key for the record or create request, independent of its server revision. Acquire `persistence` with `draftPersistence` from `@shivaedev/form/adapters/draftPersistence.ts`, provided with `browserDraftStorage` from `@shivaedev/form/adapters/browserDraftStorage.ts`. The setup reads the storage provider and Clock from the Effect environment; timestamps and expiry use that captured clock. The hooks inherit ownership from `SessionBoundary`: reload and query refresh preserve edits, successful submission clears accepted input, and a committed session replacement drops tracked drafts. A suspended replacement that is canceled keeps the visible session's draft and future writes. Later edits made during a save remain persisted. Supply `DraftStorageProvider` for custom storage; optional `maxBytes` and `maxAgeMs` customize the bounds, which default to 256 KiB of UTF-8 JSON and seven days. See [form's persisted input API](https://github.com/ShivaeDev/platform/tree/main/packages/form#persist-input-across-reloads) for direct form hooks and limits.
|
|
33
|
+
`useEditor` and `useCreate` opt into persisted input with `persistedDraft: { key, ...persistence }`. Choose a stable key for the record or create request, independent of its server revision. Acquire `persistence` with `draftPersistence` from `@shivaedev/form/adapters/draftPersistence.ts`, provided with `browserDraftStorage` from `@shivaedev/form/adapters/browserDraftStorage.ts`. The setup reads the storage provider and Clock from the Effect environment; timestamps and expiry use that captured clock. The hooks inherit ownership from `SessionBoundary`: reload and query refresh preserve edits, successful submission clears accepted input, and a committed session replacement drops tracked drafts. A suspended replacement that is canceled keeps the visible session's draft and future writes. Later edits made during a save remain persisted. Observed draft storage shares changes across editors while preserving locally edited fields; a completed older save cannot clear a newer stored draft. Supply `DraftStorageProvider` for custom storage; optional `maxBytes` and `maxAgeMs` customize the bounds, which default to 256 KiB of UTF-8 JSON and seven days. See [form's persisted input API](https://github.com/ShivaeDev/platform/tree/main/packages/form#persist-input-across-reloads) for direct form hooks and limits.
|
|
34
34
|
|
|
35
35
|
### 1. Once per application
|
|
36
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "React query, action, editor and session hooks for native Effect atoms",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@shivaedev/access": "0.4.1",
|
|
49
49
|
"@shivaedev/contract": "0.33.0",
|
|
50
50
|
"@shivaedev/errors": "0.7.0",
|
|
51
|
-
"@shivaedev/form": "0.
|
|
52
|
-
"@shivaedev/identity": "0.
|
|
51
|
+
"@shivaedev/form": "0.14.0",
|
|
52
|
+
"@shivaedev/identity": "0.22.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@effect/atom-react": "4.0.6",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"@shivaedev/changes": "0.9.0",
|
|
60
60
|
"@shivaedev/jobs": "0.32.0",
|
|
61
61
|
"@shivaedev/quality": "0.57.1",
|
|
62
|
-
"@shivaedev/server": "0.20.
|
|
62
|
+
"@shivaedev/server": "0.20.2",
|
|
63
63
|
"@shivaedev/service": "0.6.1",
|
|
64
64
|
"@shivaedev/sql": "0.35.0",
|
|
65
|
-
"@shivaedev/test-kits": "0.1.
|
|
65
|
+
"@shivaedev/test-kits": "0.1.1",
|
|
66
66
|
"@shivaedev/test-sql": "0.18.0",
|
|
67
67
|
"@shivaedev/test-story": "0.36.0",
|
|
68
68
|
"@tanstack/react-router": "1.170.46",
|