@shivaedev/react 0.41.2 → 0.44.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.
Files changed (176) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +44 -5
  3. package/dist/{internal/NoticeContext.d.ts → NoticeContext.d.ts} +1 -1
  4. package/dist/NoticeContext.d.ts.map +1 -0
  5. package/dist/NoticeContext.js.map +1 -0
  6. package/dist/PermissionContext.d.ts.map +1 -0
  7. package/dist/PermissionContext.js.map +1 -0
  8. package/dist/RecheckContext.d.ts.map +1 -0
  9. package/dist/RecheckContext.js.map +1 -0
  10. package/dist/SignOutRegistryContext.d.ts.map +1 -0
  11. package/dist/SignOutRegistryContext.js.map +1 -0
  12. package/dist/adapters/loadQuery.js +1 -1
  13. package/dist/adapters/loadQuery.js.map +1 -1
  14. package/dist/adapters/permissionBoundary.js +1 -1
  15. package/dist/adapters/permissionBoundary.js.map +1 -1
  16. package/dist/adapters/useLatestCallback.d.ts.map +1 -0
  17. package/dist/adapters/useLatestCallback.js.map +1 -0
  18. package/dist/adapters/useNoticePublisher.d.ts.map +1 -0
  19. package/dist/{internal/adapters → adapters}/useNoticePublisher.js +2 -2
  20. package/dist/adapters/useNoticePublisher.js.map +1 -0
  21. package/dist/adapters/usePermissionFailure.d.ts.map +1 -0
  22. package/dist/{internal/adapters → adapters}/usePermissionFailure.js +1 -1
  23. package/dist/adapters/usePermissionFailure.js.map +1 -0
  24. package/dist/adapters/useQueryNotice.d.ts.map +1 -0
  25. package/dist/{internal/adapters → adapters}/useQueryNotice.js +2 -2
  26. package/dist/adapters/useQueryNotice.js.map +1 -0
  27. package/dist/adapters/useSubmissionCallbacks.d.ts.map +1 -0
  28. package/dist/adapters/useSubmissionCallbacks.js.map +1 -0
  29. package/dist/client/actionCompletion.js +2 -2
  30. package/dist/client/actionCompletion.js.map +1 -1
  31. package/dist/client/adapters/SessionGeneration.js +3 -3
  32. package/dist/client/adapters/SessionGeneration.js.map +1 -1
  33. package/dist/client/adapters/crypto.d.ts +3 -2
  34. package/dist/client/adapters/crypto.d.ts.map +1 -1
  35. package/dist/client/adapters/crypto.js +3 -8
  36. package/dist/client/adapters/crypto.js.map +1 -1
  37. package/dist/client/adapters/handlerRuntime.d.ts +1 -1
  38. package/dist/client/adapters/handlerRuntime.d.ts.map +1 -1
  39. package/dist/client/adapters/useLiveWindow.js +1 -1
  40. package/dist/client/adapters/useLiveWindow.js.map +1 -1
  41. package/dist/client/adapters/useNewId.d.ts +3 -2
  42. package/dist/client/adapters/useNewId.d.ts.map +1 -1
  43. package/dist/client/adapters/useNewId.js +4 -3
  44. package/dist/client/adapters/useNewId.js.map +1 -1
  45. package/dist/client/adapters/useSessionRetry.d.ts +1 -1
  46. package/dist/client/adapters/useSessionRetry.d.ts.map +1 -1
  47. package/dist/client/adapters/useSessionRetry.js +16 -21
  48. package/dist/client/adapters/useSessionRetry.js.map +1 -1
  49. package/dist/client/adapters/useSignOut.js +1 -1
  50. package/dist/client/adapters/useSignOut.js.map +1 -1
  51. package/dist/client/adapters/useUndoableChange.d.ts +16 -10
  52. package/dist/client/adapters/useUndoableChange.d.ts.map +1 -1
  53. package/dist/client/adapters/useUndoableChange.js +3 -2
  54. package/dist/client/adapters/useUndoableChange.js.map +1 -1
  55. package/dist/client/create.js +1 -1
  56. package/dist/client/create.js.map +1 -1
  57. package/dist/client/editor.js +2 -2
  58. package/dist/client/editor.js.map +1 -1
  59. package/dist/client/mountLive.js +2 -2
  60. package/dist/client/mountLive.js.map +1 -1
  61. package/dist/client/resultState.js +2 -2
  62. package/dist/client/resultState.js.map +1 -1
  63. package/dist/client/sessionBoundary.d.ts +2 -1
  64. package/dist/client/sessionBoundary.d.ts.map +1 -1
  65. package/dist/client/sessionBoundary.js +4 -4
  66. package/dist/client/sessionBoundary.js.map +1 -1
  67. package/dist/client/useDebouncedValue.d.ts +6 -0
  68. package/dist/client/useDebouncedValue.d.ts.map +1 -0
  69. package/dist/client/useDebouncedValue.js +33 -0
  70. package/dist/client/useDebouncedValue.js.map +1 -0
  71. package/dist/client/useDelay.d.ts +10 -0
  72. package/dist/client/useDelay.d.ts.map +1 -0
  73. package/dist/client/useDelay.js +16 -0
  74. package/dist/client/useDelay.js.map +1 -0
  75. package/dist/client/useLoaderQuery.js +1 -1
  76. package/dist/client/useLoaderQuery.js.map +1 -1
  77. package/dist/loadedQuery.d.ts.map +1 -0
  78. package/dist/loadedQuery.js.map +1 -0
  79. package/dist/noticeEntry.d.ts.map +1 -0
  80. package/dist/noticeEntry.js.map +1 -0
  81. package/dist/noticeStore.d.ts.map +1 -0
  82. package/dist/noticeStore.js.map +1 -0
  83. package/dist/notices.d.ts +1 -1
  84. package/dist/notices.d.ts.map +1 -1
  85. package/dist/notices.js +2 -2
  86. package/dist/notices.js.map +1 -1
  87. package/dist/registerLiveWindow.d.ts.map +1 -0
  88. package/dist/registerLiveWindow.js.map +1 -0
  89. package/dist/sessionRecheck.d.ts.map +1 -0
  90. package/dist/sessionRecheck.js.map +1 -0
  91. package/package.json +22 -22
  92. package/src/adapters/loadQuery.ts +1 -1
  93. package/src/adapters/permissionBoundary.ts +1 -1
  94. package/src/{internal/adapters → adapters}/useNoticePublisher.ts +2 -2
  95. package/src/{internal/adapters → adapters}/usePermissionFailure.ts +1 -1
  96. package/src/{internal/adapters → adapters}/useQueryNotice.ts +2 -2
  97. package/src/client/actionCompletion.ts +2 -2
  98. package/src/client/adapters/SessionGeneration.ts +3 -3
  99. package/src/client/adapters/crypto.ts +3 -13
  100. package/src/client/adapters/useLiveWindow.ts +1 -1
  101. package/src/client/adapters/useNewId.ts +7 -4
  102. package/src/client/adapters/useSessionRetry.ts +26 -26
  103. package/src/client/adapters/useSignOut.ts +1 -1
  104. package/src/client/adapters/useUndoableChange.ts +32 -5
  105. package/src/client/create.ts +1 -1
  106. package/src/client/editor.ts +2 -2
  107. package/src/client/mountLive.ts +2 -2
  108. package/src/client/resultState.ts +2 -2
  109. package/src/client/sessionBoundary.ts +5 -3
  110. package/src/client/useDebouncedValue.ts +39 -0
  111. package/src/client/useDelay.ts +21 -0
  112. package/src/client/useLoaderQuery.ts +1 -1
  113. package/src/notices.ts +3 -3
  114. package/dist/internal/NoticeContext.d.ts.map +0 -1
  115. package/dist/internal/NoticeContext.js.map +0 -1
  116. package/dist/internal/PermissionContext.d.ts.map +0 -1
  117. package/dist/internal/PermissionContext.js.map +0 -1
  118. package/dist/internal/RecheckContext.d.ts.map +0 -1
  119. package/dist/internal/RecheckContext.js.map +0 -1
  120. package/dist/internal/SignOutRegistryContext.d.ts.map +0 -1
  121. package/dist/internal/SignOutRegistryContext.js.map +0 -1
  122. package/dist/internal/adapters/useLatestCallback.d.ts.map +0 -1
  123. package/dist/internal/adapters/useLatestCallback.js.map +0 -1
  124. package/dist/internal/adapters/useNoticePublisher.d.ts.map +0 -1
  125. package/dist/internal/adapters/useNoticePublisher.js.map +0 -1
  126. package/dist/internal/adapters/usePermissionFailure.d.ts.map +0 -1
  127. package/dist/internal/adapters/usePermissionFailure.js.map +0 -1
  128. package/dist/internal/adapters/useQueryNotice.d.ts.map +0 -1
  129. package/dist/internal/adapters/useQueryNotice.js.map +0 -1
  130. package/dist/internal/adapters/useSubmissionCallbacks.d.ts.map +0 -1
  131. package/dist/internal/adapters/useSubmissionCallbacks.js.map +0 -1
  132. package/dist/internal/loadedQuery.d.ts.map +0 -1
  133. package/dist/internal/loadedQuery.js.map +0 -1
  134. package/dist/internal/noticeEntry.d.ts.map +0 -1
  135. package/dist/internal/noticeEntry.js.map +0 -1
  136. package/dist/internal/noticeStore.d.ts.map +0 -1
  137. package/dist/internal/noticeStore.js.map +0 -1
  138. package/dist/internal/registerLiveWindow.d.ts.map +0 -1
  139. package/dist/internal/registerLiveWindow.js.map +0 -1
  140. package/dist/internal/sessionRecheck.d.ts.map +0 -1
  141. package/dist/internal/sessionRecheck.js.map +0 -1
  142. /package/dist/{internal/NoticeContext.js → NoticeContext.js} +0 -0
  143. /package/dist/{internal/PermissionContext.d.ts → PermissionContext.d.ts} +0 -0
  144. /package/dist/{internal/PermissionContext.js → PermissionContext.js} +0 -0
  145. /package/dist/{internal/RecheckContext.d.ts → RecheckContext.d.ts} +0 -0
  146. /package/dist/{internal/RecheckContext.js → RecheckContext.js} +0 -0
  147. /package/dist/{internal/SignOutRegistryContext.d.ts → SignOutRegistryContext.d.ts} +0 -0
  148. /package/dist/{internal/SignOutRegistryContext.js → SignOutRegistryContext.js} +0 -0
  149. /package/dist/{internal/adapters → adapters}/useLatestCallback.d.ts +0 -0
  150. /package/dist/{internal/adapters → adapters}/useLatestCallback.js +0 -0
  151. /package/dist/{internal/adapters → adapters}/useNoticePublisher.d.ts +0 -0
  152. /package/dist/{internal/adapters → adapters}/usePermissionFailure.d.ts +0 -0
  153. /package/dist/{internal/adapters → adapters}/useQueryNotice.d.ts +0 -0
  154. /package/dist/{internal/adapters → adapters}/useSubmissionCallbacks.d.ts +0 -0
  155. /package/dist/{internal/adapters → adapters}/useSubmissionCallbacks.js +0 -0
  156. /package/dist/{internal/loadedQuery.d.ts → loadedQuery.d.ts} +0 -0
  157. /package/dist/{internal/loadedQuery.js → loadedQuery.js} +0 -0
  158. /package/dist/{internal/noticeEntry.d.ts → noticeEntry.d.ts} +0 -0
  159. /package/dist/{internal/noticeEntry.js → noticeEntry.js} +0 -0
  160. /package/dist/{internal/noticeStore.d.ts → noticeStore.d.ts} +0 -0
  161. /package/dist/{internal/noticeStore.js → noticeStore.js} +0 -0
  162. /package/dist/{internal/registerLiveWindow.d.ts → registerLiveWindow.d.ts} +0 -0
  163. /package/dist/{internal/registerLiveWindow.js → registerLiveWindow.js} +0 -0
  164. /package/dist/{internal/sessionRecheck.d.ts → sessionRecheck.d.ts} +0 -0
  165. /package/dist/{internal/sessionRecheck.js → sessionRecheck.js} +0 -0
  166. /package/src/{internal/NoticeContext.ts → NoticeContext.ts} +0 -0
  167. /package/src/{internal/PermissionContext.ts → PermissionContext.ts} +0 -0
  168. /package/src/{internal/RecheckContext.ts → RecheckContext.ts} +0 -0
  169. /package/src/{internal/SignOutRegistryContext.ts → SignOutRegistryContext.ts} +0 -0
  170. /package/src/{internal/adapters → adapters}/useLatestCallback.ts +0 -0
  171. /package/src/{internal/adapters → adapters}/useSubmissionCallbacks.ts +0 -0
  172. /package/src/{internal/loadedQuery.ts → loadedQuery.ts} +0 -0
  173. /package/src/{internal/noticeEntry.ts → noticeEntry.ts} +0 -0
  174. /package/src/{internal/noticeStore.ts → noticeStore.ts} +0 -0
  175. /package/src/{internal/registerLiveWindow.ts → registerLiveWindow.ts} +0 -0
  176. /package/src/{internal/sessionRecheck.ts → sessionRecheck.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.44.0 - 2026-11-05
4
+
5
+ ### Breaking
6
+
7
+ - Require Effect 4.1.0 and its matching companion packages. Move `effect`, `@effect/platform-node`, `@effect/platform-node-shared`, `@effect/sql-pg`, `@effect/sql-sqlite-node`, `@effect/atom-react` and `@effect/vitest` to exactly 4.1.0 together. `clientCrypto` provides `SecureRandom` and `Digest` from `effect/crypto` instead of `Crypto`, and `useNewId` needs an atom runtime with `SecureRandom`. Replace `Crypto.Crypto` in handler and runtime types with those services.
8
+
9
+ ## 0.43.0 - 2026-11-05
10
+
11
+ ### Added
12
+
13
+ - `SessionBoundary` accepts a native atom `runtime` for its session-recheck retry loop. Supply a runtime carrying the story Clock to drive recovery backoff without real waits.
14
+
15
+ ### Fixed
16
+
17
+ - Story examples use the controlled clock.
18
+
19
+ ### Breaking
20
+
21
+ - Remove `internal/` from module imports, including imports of its adapters.
22
+
23
+ ## 0.42.0 - 2026-11-05
24
+
25
+ ### Added
26
+
27
+ - Let `useUndoableChange` build an inverse command input from the successful result with `undoInput`, carrying per-row versions or an undo token for batch changes. Existing single-row versioned calls keep working unchanged.
28
+ - Expose the immediate `waiting-for-connection` status through `useConnectionStatus` while a bound command waits, keeping actions pending until delivery or the typed connection timeout.
29
+ - Provides `useDebouncedValue` and cancellable `useDelay` hooks on the atom runtime's Effect Clock. Pending timers count as observed atom work for screen settlement and cancel on unmount.
30
+
31
+ ### Fixed
32
+
33
+ - Editors preserve keys omitted during save normalization, and create forms preserve omissions through reset.
34
+
35
+ ### Breaking
36
+
37
+ - `useConnectionStatus` can return `waiting-for-connection`. Render it as a reconnect notice while the action remains pending.
38
+
3
39
  ## 0.41.2 - 2026-11-04
4
40
 
5
41
  ### Changed
package/README.md CHANGED
@@ -28,7 +28,7 @@ State belongs to an **atom in a registry**. A query hook reads that atom's nativ
28
28
 
29
29
  An **editor** joins a query atom, a form field schema and a save Effect. The query provides the row; `values(row)` converts it to input values; the schema decodes those values before the save runs. form owns the draft and the per-field merge. A **create form** uses the same submission rules without a query and starts a fresh form after success.
30
30
 
31
- Use `useConnectionStatus(client)` from `@shivaedev/react/client/adapters/useConnectionStatus.ts` with the client returned by contract's `makeClient`. It returns one `"live" | "reconnecting"` value across mounted queries from every binding on that client's `Client` service. Status changes debounce for 300 ms on the client runtime's Clock. A query refusal is separate from connectivity. Visible browser `online` and `visibilitychange` signals interrupt the live retry delay and reconnect immediately with a fresh backoff schedule.
31
+ Use `useConnectionStatus(client)` from `@shivaedev/react/client/adapters/useConnectionStatus.ts` with the client returned by contract's `makeClient`. It returns one `"live" | "reconnecting" | "waiting-for-connection"` value across mounted queries from every binding on that client's `Client` service. Live subscription status changes debounce for 300 ms on the client runtime's Clock. A bound command held for reconnection reports `"waiting-for-connection"` immediately, so the application can show Reconnecting while keeping the action pending. Contract holds unsent commands for up to 10 seconds and returns a typed `RpcClientError` on timeout; commands already sent are never replayed. The default socket probes Ping/Pong on browser or native resume and reconnects after 2.5 seconds without a Pong. A query refusal is separate from connectivity. Visible browser `online` and `visibilitychange` signals interrupt the live retry delay and reconnect immediately with a fresh backoff schedule.
32
32
 
33
33
  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.
34
34
 
@@ -84,7 +84,7 @@ export function App({ session, recheck }: { readonly session: Session | undefine
84
84
 
85
85
  Pass the signed-out router as `signedOut` and the requested continuation address as `redirectTo` (for example, the sign-in route's `returnTo` search value). On successful sign-in, the auth owner supplies the new `session`; the boundary unmounts the signed-out tree before replacing the URL, then mounts the signed-in tree at that address. The sign-in screen requests a session recheck after success; it leaves navigation to the boundary. Off-site, non-HTTP and malformed targets fall back to `/`. A same-origin destination keeps its path, query and fragment. The default replacement uses browser history. Supply `navigate={(href) => history.replace(href)}` for a router history such as TanStack's memory history; the callback receives only the checked local path. Navigation happens once when entering a generation, so a same-user session rotation does not navigate again.
86
86
 
87
- A query that fails with an `Unauthorized` from `@shivaedev/errors/taxonomy.ts` asks `recheck` to run and keeps its retained data. An action does the same once per failed result, retaining its last successful `data` and the typed failure in `cause`; rerendering that result does not repeat the recheck. A live reconnect requests a check only for a typed `Unauthorized` authentication refusal; dropped sockets and unreachable servers leave the session alone. Pass the auth owner’s session-refresh Effect as `recheck` (for example, `recheck={auth.session.refresh}`). The boundary shares an in-flight check, retries failures after 1, 2, 4 seconds and so on up to 30 seconds, and retries immediately on visible `online` or `visibilitychange` events while a check is pending, restarting an in-flight check too. Session replacement and unmount cancel retries. Existing void callbacks remain supported; they keep their own check and retry policy. Keep retained session data on screen when a refresh exposes a failure, and pass `session={undefined}` only after a definite signed-out answer. The auth owner decides whether the session ends. The boundary also handles React StrictMode's effect replay and preserves component state across hiding and revealing an `<Activity>` subtree, supplying a live registry when revealed.
87
+ A query that fails with an `Unauthorized` from `@shivaedev/errors/taxonomy.ts` asks `recheck` to run and keeps its retained data. An action does the same once per failed result, retaining its last successful `data` and the typed failure in `cause`; rerendering that result does not repeat the recheck. A live reconnect requests a check only for a typed `Unauthorized` authentication refusal; dropped sockets and unreachable servers leave the session alone. Pass the auth owner’s session-refresh Effect as `recheck` (for example, `recheck={auth.session.refresh}`). The boundary shares an in-flight check, retries failures after 1, 2, 4 seconds and so on up to 30 seconds, and retries immediately on visible `online` or `visibilitychange` events while a check is pending, restarting an in-flight check too. Session replacement and unmount cancel retries. Supply `runtime` on `SessionBoundary` to run these retries on a native atom runtime, including one carrying a story’s controlled Clock. Existing void callbacks remain supported; they keep their own check and retry policy. Keep retained session data on screen when a refresh exposes a failure, and pass `session={undefined}` only after a definite signed-out answer. The auth owner decides whether the session ends. The boundary also handles React StrictMode's effect replay and preserves component state across hiding and revealing an `<Activity>` subtree, supplying a live registry when revealed.
88
88
 
89
89
  #### Session-scoped bindings
90
90
 
@@ -598,6 +598,21 @@ function RemoveNote({ note }: { readonly note: { id: string; version: number } }
598
598
 
599
599
  `api`, `NotesClient`, the soft-removal payload and `update` belong to the application. `remove(input, inverse)` captures the inverse domain fields. `undo()` sends those fields through the same command with `expectedVersion` set to the successful removal's returned `version`. The server must enforce that version and declare its typed conflict; a later edit then refuses Undo without overwriting the row. `removeResult` and `undoResult` preserve the native `AsyncResult`, including typed failures. Successful Undo clears its notice; a failed Undo leaves it available.
600
600
 
601
+ For a batch command, supply `undoInput(value, input)` to build the complete inverse payload from its successful result and original input. This overload accepts any command payload and success shape and uses `remove(input)` with no second argument:
602
+
603
+ ```tsx
604
+ const change = useUndoableChange(
605
+ { ...api.editEntries, runtime: DiaryClient.runtime, update },
606
+ {
607
+ describe: () => "Changed diary entries",
608
+ undoInput: (saved) => ({ _tag: "undo" as const, token: saved.undo }),
609
+ },
610
+ );
611
+ change.remove({ _tag: "edit", rows: selectedVersions, scale: 0.5, copies: true });
612
+ ```
613
+
614
+ `api.editEntries`, `DiaryClient` and the payload shape belong to the application. The hook captures the inverse when the command succeeds and submits it unchanged through the same command on Undo. The result can carry a set of row versions with their previous values, or an opaque server-issued undo token; neither requires a top-level `expectedVersion` or `version`. The server owns the transaction: restore each changed row under its own returned version, remove rows the batch created under their own guards, and reject the whole inverse with a typed conflict if any guard is stale. React stories exercise portion scaling, copy removal and stale guards against PostgreSQL; the hook supplies no database undo engine.
615
+
601
616
  `notice` is a native `Option` containing `message`, the submitted `input` and returned `value`. Only the most recently dispatched removal can publish it, even when replies arrive in reverse order. An older Undo cannot clear a newer notice. `removing` and `undoing` describe the two writes, and `pending` includes either. Each invocation holds `update.block` for its whole Effect lifetime, so overlapping writes hold deployment activation until all finish. The hook keeps UI wording and inverse domain data in the app; no `NoticeHost` is needed.
602
617
 
603
618
  #### Commands with a pending display value
@@ -972,7 +987,7 @@ const resume = resumeSignal({ window });
972
987
  const query = Atom.makeRefreshOnSignal(resume)(Atom.make(Effect.succeed("ready")));
973
988
  ```
974
989
 
975
- `resumeSignal` changes on visible `visibilitychange` and visible `online` events. Hidden browser events do not refresh the query. An optional `native` source subscribes a callback and returns its unsubscribe function; its callback also changes the signal. Registry disposal removes the listeners. This module uses the shared [contract resume implementation](https://github.com/ShivaeDev/platform/blob/main/packages/contract/src/resume.ts).
990
+ `resumeSignal` changes on visible `visibilitychange`, `online` and `pageshow` events. Hidden browser events do not refresh the query. An optional `native` source subscribes a callback and returns its unsubscribe function; its callback also changes the signal. Registry disposal removes the listeners. This module uses the shared [contract resume implementation](https://github.com/ShivaeDev/platform/blob/main/packages/contract/src/resume.ts).
976
991
 
977
992
  Use native stale-while-revalidate policy when a resume should refresh only stale data:
978
993
 
@@ -999,6 +1014,31 @@ const minutesAgo = Math.floor((now - savedAt) / 60_000);
999
1014
 
1000
1015
  Without a runtime it uses a native empty atom runtime. Stories supply a runtime with their TestClock service so advancing that clock updates the rendered time.
1001
1016
 
1017
+ #### Debounce and delay on the runtime clock
1018
+
1019
+ `useDebouncedValue(value, duration, runtime?)` from `@shivaedev/react/client/useDebouncedValue.ts` returns the initial value immediately, then retains the previous value until input stops changing for the duration. A changed value or duration restarts the pending window. The timer runs on the atom runtime's Effect `Clock`, and its observed native `AsyncResult` stays waiting throughout that window, so `screenPending()` includes it when settling a story.
1020
+
1021
+ ```tsx
1022
+ import { useDebouncedValue } from "@shivaedev/react/client/useDebouncedValue.ts";
1023
+ import { useDelay } from "@shivaedev/react/client/useDelay.ts";
1024
+
1025
+ const query = useDebouncedValue(search, "300 millis", client.runtime);
1026
+ const press = useDelay("450 millis", client.runtime);
1027
+
1028
+ <button
1029
+ onPointerDown={() => press.start(() => selectRow(id))}
1030
+ onPointerUp={press.cancel}
1031
+ onPointerLeave={press.cancel}
1032
+ onPointerCancel={press.cancel}
1033
+ >
1034
+ Select row
1035
+ </button>;
1036
+ ```
1037
+
1038
+ `useDelay(duration, runtime?)` schedules one callback with `start(callback)` and exposes `pending` and `cancel()`. Starting again replaces the pending callback. Changing the duration cancels it. Unmounting cancels both hooks' timers. Without a runtime, each hook uses a native empty atom runtime with Effect's default Clock. Pass the application's runtime so stories can control the same clock, and cancel a long press on the pointer events appropriate for the application's interaction.
1039
+
1040
+ In a story kit, acquire `watchedClock` from `@shivaedev/test-story/server/watchedClock.ts` and pass it both to the atom runtime's Clock Layer and the screen driver's `clock` option. With `pending: screenPending()` for that registry and React's `act`, typing followed by `settle()` advances registered sleeps inside `act` until the debounce and resulting work finish. Kit verbs need no debounce duration. To check a long-press boundary explicitly, run that clock's `adjust(duration)` inside `act` in a verb that accepts the elapsed duration.
1041
+
1002
1042
  #### Ids, time and promises in callbacks
1003
1043
 
1004
1044
  `useNewId(runtime?)` from `@shivaedev/react/client/adapters/useNewId.ts` returns a UUIDv4 generator. `useClock(runtime?)` from `@shivaedev/react/client/adapters/useClock.ts` returns a `now()` callback that reads epoch milliseconds when called. Both read services from the supplied atom runtime in the current registry and can be used in state initializers and event handlers:
@@ -1015,7 +1055,7 @@ const [createdAt] = useState(now);
1015
1055
  const stamp = () => ({ id: newId(), at: now() });
1016
1056
  ```
1017
1057
 
1018
- These lines belong inside a component; `client` is the application's atom client. Stories pass a runtime containing their test Clock and seeded Crypto. The hooks use native atom suspense while the runtime builds. The supplied Crypto's UUID generation must be synchronous. Without a runtime, they use a shared native runtime with Effect's default Clock and `clientCrypto`, a Web Crypto Layer from `@shivaedev/react/client/adapters/crypto.ts`. Provide that Layer to an application's runtime when it needs browser Crypto; it uses `crypto.getRandomValues` and `crypto.subtle.digest`.
1058
+ These lines belong inside a component; `client` is the application's atom client. Stories pass a runtime containing their test Clock and seeded `SecureRandom`. The hooks use native atom suspense while the runtime builds. `useNewId` reads `SecureRandom` from `effect/crypto`, whose UUID generation must be synchronous. Without a runtime, they use a shared native runtime with Effect's default Clock and `clientCrypto` from `@shivaedev/react/client/adapters/crypto.ts`, which merges Effect's Web Crypto `SecureRandom` and `Digest` Layers. Provide that Layer to an application's runtime when it needs browser crypto.
1019
1059
 
1020
1060
  `usePromiseAction(() => promise, options?)` from `@shivaedev/react/client/adapters/usePromiseAction.ts` returns the same state as `useAction`, with `dispatch()` taking no input. It runs the callback on dispatch, keeps its atom across rerenders and calls the latest committed callback. A promise rejection or synchronous throw becomes `Cause.UnknownError` by default. Supply `catch` to map the unknown cause into an application's typed failure:
1021
1061
 
@@ -1066,7 +1106,6 @@ const Add = command("add", { invalidates: () => [notes.list], payload: { title:
1066
1106
  const Notes = contract("notes", { commands: [Add], queries: [List] });
1067
1107
 
1068
1108
  export const notesScreen = storyKit({
1069
- clock: "live",
1070
1109
  *create() {
1071
1110
  const handlers = Notes.toLayer(
1072
1111
  Effect.gen(function* () {
@@ -2,6 +2,6 @@ export declare const NoticeContext: import("react").Context<{
2
2
  active: boolean;
3
3
  close: () => void;
4
4
  entries: import("effect/reactivity/Atom").Writable<readonly import("./noticeEntry.ts").NoticeEntry[], readonly import("./noticeEntry.ts").NoticeEntry[]>;
5
- publish: (descriptor: Pick<import("../notices.ts").NoticeDescriptor, "message" | "expiresIn">, action?: import("./noticeEntry.ts").NoticeAction) => void;
5
+ publish: (descriptor: Pick<import("./notices.ts").NoticeDescriptor, "message" | "expiresIn">, action?: import("./noticeEntry.ts").NoticeAction) => void;
6
6
  } | undefined>;
7
7
  //# sourceMappingURL=NoticeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoticeContext.d.ts","sourceRoot":"","sources":["../src/NoticeContext.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;;;cAAuE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoticeContext.js","sourceRoot":"","sources":["../src/NoticeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAA6C,SAAS,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionContext.d.ts","sourceRoot":"","sources":["../src/PermissionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAElF,eAAO,MAAM,iBAAiB;uBAAsC,SAAS;sBAAoB,iBAAiB,GAAG,IAAI,GAAG,SAAS;cAEpI,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionContext.js","sourceRoot":"","sources":["../src/PermissionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAGtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC7C,SAAS,CACT,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecheckContext.d.ts","sourceRoot":"","sources":["../src/RecheckContext.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gCAAuB,IAAI,CAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecheckContext.js","sourceRoot":"","sources":["../src/RecheckContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAa,GAAS,EAAE,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignOutRegistryContext.d.ts","sourceRoot":"","sources":["../src/SignOutRegistryContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAGpE,eAAO,MAAM,sBAAsB,gEAAkE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignOutRegistryContext.js","sourceRoot":"","sources":["../src/SignOutRegistryContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAwC,SAAS,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
  import * as AtomRegistry from "effect/reactivity/AtomRegistry";
3
- import { recheckUnauthorized } from "#internal/sessionRecheck.ts";
3
+ import { recheckUnauthorized } from "#sessionRecheck.ts";
4
4
  import { keepLoaderQuery } from "./queryHandoff.js";
5
5
  export async function loadQuery(registry, atom, { abortController }) {
6
6
  const { signal } = abortController;
@@ -1 +1 @@
1
- {"version":3,"file":"loadQuery.js","sourceRoot":"","sources":["../../src/adapters/loadQuery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD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oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,KAAK,UAAU,SAAS,CAC9B,QAAmC,EACnC,IAA8C,EAC9C,EAAE,eAAe,EAA4C;IAE7D,MAAM,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC;IACnC,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACxD,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACtI,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;YACpD,MAAM,MAAM,CAAC,OAAO,CAAC;QACtB,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACvE,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC;YAC7B,MAAM,QAAQ,CAAC;QAChB,CAAC;QACD,MAAM,KAAK,CAAC;IACb,CAAC;YAAS,CAAC;QACV,OAAO,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;AACF,CAAC"}
@@ -2,7 +2,7 @@ import { CatchBoundary } from "@tanstack/react-router";
2
2
  import { createElement, useContext } from "react";
3
3
  import { isForbidden } from "@shivaedev/errors/taxonomy.ts";
4
4
  import { can } from "#can.ts";
5
- import { PermissionContext } from "#internal/PermissionContext.ts";
5
+ import { PermissionContext } from "#PermissionContext.ts";
6
6
  export function useCan() {
7
7
  const context = useContext(PermissionContext);
8
8
  return (permission) => can(context?.session, permission);
@@ -1 +1 @@
1
- {"version":3,"file":"permissionBoundary.js","sourceRoot":"","sources":["../../src/adapters/permissionBoundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAQnE,MAAM,UAAU,MAAM;IACrB,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAA+B;IAC7E,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC9C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,KAAK,CAAC;IACb,CAAC;IACD,OAAO,OAAO,EAAE,QAAQ,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAA2B;IAC1F,OAAO,aAAa,CACnB,iBAAiB,CAAC,QAAQ,EAC1B,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAChC,aAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,CACpH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"permissionBoundary.js","sourceRoot":"","sources":["../../src/adapters/permissionBoundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ1D,MAAM,UAAU,MAAM;IACrB,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAA+B;IAC7E,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC9C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,KAAK,CAAC;IACb,CAAC;IACD,OAAO,OAAO,EAAE,QAAQ,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAA2B;IAC1F,OAAO,aAAa,CACnB,iBAAiB,CAAC,QAAQ,EAC1B,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAChC,aAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,CACpH,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLatestCallback.d.ts","sourceRoot":"","sources":["../../src/adapters/useLatestCallback.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAM/D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLatestCallback.js","sourceRoot":"","sources":["../../src/adapters/useLatestCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,UAAU,iBAAiB,CAAI,QAAiB;IACrD,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnC,eAAe,CAAC,GAAG,EAAE;QACpB,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC9B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNoticePublisher.d.ts","sourceRoot":"","sources":["../../src/adapters/useNoticePublisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAIpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,IAAI,CAG/H"}
@@ -1,6 +1,6 @@
1
1
  import { useContext, useMemo } from "react";
2
- import { NoticeContext } from "#internal/NoticeContext.ts";
3
- import { publishNotice } from "#internal/noticeStore.ts";
2
+ import { NoticeContext } from "#NoticeContext.ts";
3
+ import { publishNotice } from "#noticeStore.ts";
4
4
  export function useNoticePublisher(runtime) {
5
5
  const store = useContext(NoticeContext);
6
6
  return useMemo(() => (descriptor) => publishNotice(store, runtime, descriptor), [store, runtime]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNoticePublisher.js","sourceRoot":"","sources":["../../src/adapters/useNoticePublisher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,UAAU,kBAAkB,CAAO,OAA+B;IACvE,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAA2C,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AACpI,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePermissionFailure.d.ts","sourceRoot":"","sources":["../../src/adapters/usePermissionFailure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKvC,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAQlF"}
@@ -1,7 +1,7 @@
1
1
  import { Cause, Option } from "effect";
2
2
  import { useContext } from "react";
3
3
  import { isForbidden } from "@shivaedev/errors/taxonomy.ts";
4
- import { PermissionContext } from "#internal/PermissionContext.ts";
4
+ import { PermissionContext } from "#PermissionContext.ts";
5
5
  export function usePermissionFailure(cause) {
6
6
  const context = useContext(PermissionContext);
7
7
  if (context !== undefined) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePermissionFailure.js","sourceRoot":"","sources":["../../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AgB,GAAG,SAAS,CAAC,GAAG,SAAS,QAkBjI"}
@@ -2,8 +2,8 @@ import { Layer } from "effect";
2
2
  import * as AsyncResult from "effect/reactivity/AsyncResult";
3
3
  import * as Atom from "effect/reactivity/Atom";
4
4
  import { useContext, useEffect, useInsertionEffect, useRef } from "react";
5
- import { NoticeContext } from "#internal/NoticeContext.ts";
6
- import { publishNotice } from "#internal/noticeStore.ts";
5
+ import { NoticeContext } from "#NoticeContext.ts";
6
+ import { publishNotice } from "#noticeStore.ts";
7
7
  const runtime = Atom.runtime(Layer.empty);
8
8
  export function useQueryNotice(result, refreshing, notice) {
9
9
  const store = useContext(NoticeContext);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQueryNotice.js","sourceRoot":"","sources":["../../src/adapters/useQueryNotice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAE1C,MAAM,UAAU,cAAc,CAC7B,MAAqC,EACrC,UAAmB,EACnB,MAAiI;IAEjI,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,kBAAkB,CAAC,GAAG,EAAE;QACvB,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;IAC5B,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,MAAM,OAAO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AE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAC7C,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;aAC9C,CAAC,CACF;SACF,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtB,kBAAkB,CAAC,GAAG,EAAE;QACvB,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC;QACxB,OAAO,GAAG,EAAE;YACX,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAChB,OAAO,SAAS,CAAC;AAClB,CAAC"}
@@ -2,8 +2,8 @@ import { RegistryContext } from "@effect/atom-react";
2
2
  import { Effect } from "effect";
3
3
  import { useContext, useInsertionEffect, useMemo, useRef } from "react";
4
4
  import { isUnauthorized } from "@shivaedev/errors/taxonomy.ts";
5
- import { NoticeContext } from "#internal/NoticeContext.ts";
6
- import { publishNotice } from "#internal/noticeStore.ts";
5
+ import { NoticeContext } from "#NoticeContext.ts";
6
+ import { publishNotice } from "#noticeStore.ts";
7
7
  import { useSessionRecheck } from "./sessionBoundary.js";
8
8
  export function useActionSource(source, run, options) {
9
9
  const registry = useContext(RegistryContext);
@@ -1 +1 @@
1
- {"version":3,"file":"actionCompletion.js","sourceRoot":"","sources":["../../src/client/actionCompletion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,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AM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC3B,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,kBAAkB,CAAC,GAAG,EAAE;QACvB,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;QAC7B,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC;QAC/B,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,OAAO,KAAK,CAAC,IAAI,CAAC;AACnB,CAAC"}
@@ -4,10 +4,10 @@ import * as AtomRegistry from "effect/reactivity/AtomRegistry";
4
4
  import { createElement, useEffect, useState } from "react";
5
5
  import { LiveConnection } from "@shivaedev/contract/automaticLive.ts";
6
6
  import { liveBindings } from "@shivaedev/contract/composeBindings.ts";
7
+ import { useLatestCallback } from "#adapters/useLatestCallback.ts";
7
8
  import { mountLive } from "#client/mountLive.ts";
8
- import { useLatestCallback } from "#internal/adapters/useLatestCallback.ts";
9
- import { RecheckContext } from "#internal/RecheckContext.ts";
10
- import { registerSessionRecheck } from "#internal/sessionRecheck.ts";
9
+ import { RecheckContext } from "#RecheckContext.ts";
10
+ import { registerSessionRecheck } from "#sessionRecheck.ts";
11
11
  function owning(connect, identity) {
12
12
  const registry = AtomRegistry.make({ "defaultIdleTTL": 400 });
13
13
  let client;
@@ -1 +1 @@
1
- {"version":3,"file":"SessionGeneration.js","sourceRoot":"","sources":["../../../src/client/adapters/SessionGeneration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAiB,MAAM,EAAE,MAAM,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C;YACnB,cAAc,CAAC,GAAG,EAAE;gBACnB,IAAI,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;oBACvB,OAAO;gBACR,CAAC;gBACD,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACzB,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC1E,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC,CAAC;IAChD,OAAO,aAAa,CACnB,cAAc,CAAC,QAAQ,EACvB,EAAE,KAAK,EAAE,aAAa,EAAE,EACxB,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAC1F,CAAC;AACH,CAAC"}
@@ -1,3 +1,4 @@
1
- import { Crypto, Layer } from "effect";
2
- export declare const clientCrypto: Layer.Layer<Crypto.Crypto, never, never>;
1
+ import { Layer } from "effect";
2
+ import { Digest, SecureRandom } from "effect/crypto";
3
+ export declare const clientCrypto: Layer.Layer<Digest.Digest | SecureRandom.SecureRandom, never, never>;
3
4
  //# sourceMappingURL=crypto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,KAAK,EAAiB,MAAM,QAAQ,CAAC;AAE9D,eAAO,MAAM,YAAY,0CAWxB,CAAC"}
1
+ {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,YAAY,sEAAkE,CAAC"}
@@ -1,9 +1,4 @@
1
- import { Crypto, Effect, Layer, PlatformError } from "effect";
2
- export const clientCrypto = Layer.succeed(Crypto.Crypto, Crypto.make({
3
- digest: (algorithm, data) => Effect.tryPromise({
4
- catch: (cause) => PlatformError.systemError({ _tag: "Unknown", cause, description: "Could not compute digest", method: "digest", module: "Crypto" }),
5
- try: () => globalThis.crypto.subtle.digest(algorithm, new Uint8Array(data)).then((buffer) => new Uint8Array(buffer)),
6
- }),
7
- randomBytes: (size) => globalThis.crypto.getRandomValues(new Uint8Array(size)),
8
- }));
1
+ import { Layer } from "effect";
2
+ import { Digest, SecureRandom } from "effect/crypto";
3
+ export const clientCrypto = Layer.merge(SecureRandom.layerWebCrypto, Digest.layerWebCrypto);
9
4
  //# sourceMappingURL=crypto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../src/client/adapters/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE9D,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CACxC,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,IAAI,CAAC;IACX,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAC3B,MAAM,CAAC,UAAU,CAAC;QACjB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAChB,aAAa,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QACnI,GAAG,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;KACpH,CAAC;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;CAC9E,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../src/client/adapters/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import * as Atom from "effect/reactivity/Atom";
2
- export declare const handlerRuntime: Atom.AtomRuntime<import("effect/Crypto").Crypto, never>;
2
+ export declare const handlerRuntime: Atom.AtomRuntime<import("effect/crypto/Digest").Digest | import("effect/crypto/SecureRandom").SecureRandom, never>;
3
3
  //# sourceMappingURL=handlerRuntime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handlerRuntime.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/handlerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAG/C,eAAO,MAAM,cAAc,yDAA6B,CAAC"}
1
+ {"version":3,"file":"handlerRuntime.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/handlerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAG/C,eAAO,MAAM,cAAc,oHAA6B,CAAC"}
@@ -3,7 +3,7 @@ import { Effect } from "effect";
3
3
  import * as AtomRegistry from "effect/reactivity/AtomRegistry";
4
4
  import { useContext, useEffect } from "react";
5
5
  import { queryCoalesceWindow } from "@shivaedev/contract/queryCoalesceWindow.ts";
6
- import { registerLiveWindow } from "#internal/registerLiveWindow.ts";
6
+ import { registerLiveWindow } from "#registerLiveWindow.ts";
7
7
  export function useLiveWindow(atom, window) {
8
8
  const registry = useContext(RegistryContext);
9
9
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useLiveWindow.js","sourceRoot":"","sources":["../../../src/client/adapters/useLiveWindow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,UAAU,aAAa,CAAC,IAAwB,EAAE,MAAkC;IACzF,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO;QACR,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC/I,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
1
+ {"version":3,"file":"useLiveWindow.js","sourceRoot":"","sources":["../../../src/client/adapters/useLiveWindow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,UAAU,aAAa,CAAC,IAAwB,EAAE,MAAkC;IACzF,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO;QACR,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC/I,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,5 +1,6 @@
1
- import { Context, Crypto } from "effect";
1
+ import { Context } from "effect";
2
+ import { SecureRandom } from "effect/crypto";
2
3
  import type * as AsyncResult from "effect/reactivity/AsyncResult";
3
4
  import type * as Atom from "effect/reactivity/Atom";
4
- export declare function useNewId(runtime?: Atom.Atom<AsyncResult.AsyncResult<Context.Context<Crypto.Crypto>, unknown>>): () => string;
5
+ export declare function useNewId(runtime?: Atom.Atom<AsyncResult.AsyncResult<Context.Context<SecureRandom.SecureRandom>, unknown>>): () => string;
5
6
  //# sourceMappingURL=useNewId.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNewId.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/useNewId.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAIpD,wBAAgB,QAAQ,CAAC,OAAO,GAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAkB,GAAG,MAAM,MAAM,CAG5I"}
1
+ {"version":3,"file":"useNewId.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/useNewId.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAU,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAIpD,wBAAgB,QAAQ,CACvB,OAAO,GAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAkB,GAC/G,MAAM,MAAM,CAGd"}
@@ -1,9 +1,10 @@
1
1
  import { useAtomSuspense } from "@effect/atom-react";
2
- import { Context, Crypto, Effect } from "effect";
2
+ import { Context, Effect } from "effect";
3
+ import { SecureRandom } from "effect/crypto";
3
4
  import { useCallback } from "react";
4
5
  import { handlerRuntime } from "#client/adapters/handlerRuntime.ts";
5
6
  export function useNewId(runtime = handlerRuntime) {
6
- const crypto = Context.get(useAtomSuspense(runtime).value, Crypto.Crypto);
7
- return useCallback(() => Effect.runSync(crypto.randomUUIDv4()), [crypto]);
7
+ const random = Context.get(useAtomSuspense(runtime).value, SecureRandom.SecureRandom);
8
+ return useCallback(() => Effect.runSync(random.uuidV4()), [random]);
8
9
  }
9
10
  //# sourceMappingURL=useNewId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNewId.js","sourceRoot":"","sources":["../../../src/client/adapters/useNewId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,MAAM,UAAU,QAAQ,CAAC,OAAO,GAAgF,cAAc;IAC7H,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1E,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3E,CAAC"}
1
+ {"version":3,"file":"useNewId.js","sourceRoot":"","sources":["../../../src/client/adapters/useNewId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,MAAM,UAAU,QAAQ,CACvB,OAAO,GAA4F,cAAc;IAEjH,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACtF,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { SessionBoundaryProps } from "#client/sessionBoundary.ts";
2
- export declare function useSessionRetry(recheck: SessionBoundaryProps<unknown, unknown>["recheck"], identity: string | undefined): () => void;
2
+ export declare function useSessionRetry(recheck: SessionBoundaryProps<unknown, unknown>["recheck"], identity: string | undefined, runtime?: NonNullable<SessionBoundaryProps<unknown, unknown>["runtime"]>): () => void;
3
3
  //# sourceMappingURL=useSessionRetry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionRetry.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/useSessionRetry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,wBAAgB,eAAe,CAAC,OAAO,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,IAAI,CA8CpI"}
1
+ {"version":3,"file":"useSessionRetry.d.ts","sourceRoot":"","sources":["../../../src/client/adapters/useSessionRetry.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,wBAAgB,eAAe,CAC9B,OAAO,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,EAC1D,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,GAAE,WAAW,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAkB,GACtF,MAAM,IAAI,CAuCZ"}
@@ -1,39 +1,34 @@
1
- import { RegistryContext } from "@effect/atom-react";
2
- import { Effect, Fiber, Schedule } from "effect";
1
+ import { RegistryContext, useAtomValue } from "@effect/atom-react";
2
+ import { Effect, Layer, Schedule } from "effect";
3
+ import * as Atom from "effect/reactivity/Atom";
3
4
  import * as AtomRegistry from "effect/reactivity/AtomRegistry";
4
5
  import { useContext, useEffect, useMemo } from "react";
5
- import { useLatestCallback } from "#internal/adapters/useLatestCallback.ts";
6
- export function useSessionRetry(recheck, identity) {
6
+ import { useLatestCallback } from "#adapters/useLatestCallback.ts";
7
+ const defaultRuntime = Atom.runtime(Layer.empty);
8
+ export function useSessionRetry(recheck, identity, runtime = defaultRuntime) {
7
9
  const registry = useContext(RegistryContext);
8
10
  const latest = useLatestCallback(() => (Effect.isEffect(recheck) ? recheck : Effect.sync(recheck)));
9
11
  const retry = useMemo(() => {
10
- let running;
12
+ const task = runtime
13
+ .fn(() => Effect.suspend(latest).pipe(Effect.retry(Schedule.min([Schedule.exponential("1 second"), Schedule.spaced("30 seconds")])), Effect.provideService(AtomRegistry.AtomRegistry, registry)))
14
+ .pipe(Atom.setIdleTTL(0));
11
15
  function stop() {
12
- if (running) {
13
- Effect.runFork(Fiber.interrupt(running));
14
- running = undefined;
15
- }
16
+ registry.set(task, Atom.Interrupt);
16
17
  }
17
18
  function start() {
18
- if (running || identity === undefined) {
19
- return;
19
+ if (!registry.get(task).waiting && identity !== undefined) {
20
+ registry.set(task, undefined);
20
21
  }
21
- const fiber = Effect.runFork(Effect.suspend(latest).pipe(Effect.retry(Schedule.min([Schedule.exponential("1 second"), Schedule.spaced("30 seconds")])), Effect.provideService(AtomRegistry.AtomRegistry, registry)));
22
- running = fiber;
23
- fiber.addObserver(() => {
24
- if (running === fiber) {
25
- running = undefined;
26
- }
27
- });
28
22
  }
29
23
  function resume() {
30
- if (running && window.document.visibilityState === "visible") {
24
+ if (registry.get(task).waiting && window.document.visibilityState === "visible") {
31
25
  stop();
32
26
  start();
33
27
  }
34
28
  }
35
- return { resume, start, stop };
36
- }, [latest, registry, identity]);
29
+ return { resume, start, stop, task };
30
+ }, [latest, registry, identity, runtime]);
31
+ useAtomValue(retry.task);
37
32
  useEffect(() => {
38
33
  window.addEventListener("online", retry.resume);
39
34
  window.addEventListener("visibilitychange", retry.resume);
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionRetry.js","sourceRoot":"","sources":["../../../src/client/adapters/useSessionRetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,MAAM,UAAU,eAAe,CAAC,OAA0D,EAAE,QAA4B;IACvH,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACpG,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,OAAkD,CAAC;QACvD,SAAS,IAAI;YACZ,IAAI,OAAO,EAAE,CAAC;gBACb,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;gBACzC,OAAO,GAAG,SAAS,CAAC;YACrB,CAAC;QACF,CAAC;QACD,SAAS,KAAK;YACb,IAAI,OAAO,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBACvC,OAAO;YACR,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,CAA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AAK,CAAC,MAAM,CAAC,CAAC;YAC7D,KAAK,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,OAAO,KAAK,CAAC,KAAK,CAAC;AACpB,CAAC"}
@@ -5,7 +5,7 @@ import * as Atom from "effect/reactivity/Atom";
5
5
  import * as AtomRegistry from "effect/reactivity/AtomRegistry";
6
6
  import { useContext, useEffect, useMemo } from "react";
7
7
  import { useAction } from "#client/resultState.ts";
8
- import { SignOutRegistryContext } from "#internal/SignOutRegistryContext.ts";
8
+ import { SignOutRegistryContext } from "#SignOutRegistryContext.ts";
9
9
  export function useSignOut(action, options) {
10
10
  const router = useRouter({ warn: false });
11
11
  const local = useContext(RegistryContext);