@interop/was-react 0.1.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 (223) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +410 -0
  3. package/dist/auth/chapi.d.ts +43 -0
  4. package/dist/auth/chapi.d.ts.map +1 -0
  5. package/dist/auth/chapi.js +107 -0
  6. package/dist/auth/chapi.js.map +1 -0
  7. package/dist/auth/loginFlow.d.ts +93 -0
  8. package/dist/auth/loginFlow.d.ts.map +1 -0
  9. package/dist/auth/loginFlow.js +149 -0
  10. package/dist/auth/loginFlow.js.map +1 -0
  11. package/dist/auth/loginRequest.d.ts +66 -0
  12. package/dist/auth/loginRequest.d.ts.map +1 -0
  13. package/dist/auth/loginRequest.js +83 -0
  14. package/dist/auth/loginRequest.js.map +1 -0
  15. package/dist/auth/verifyResponse.d.ts +52 -0
  16. package/dist/auth/verifyResponse.d.ts.map +1 -0
  17. package/dist/auth/verifyResponse.js +138 -0
  18. package/dist/auth/verifyResponse.js.map +1 -0
  19. package/dist/auth/verifyResponse.test.d.ts +2 -0
  20. package/dist/auth/verifyResponse.test.d.ts.map +1 -0
  21. package/dist/auth/verifyResponse.test.js +282 -0
  22. package/dist/auth/verifyResponse.test.js.map +1 -0
  23. package/dist/auth/walletRequestTypes.d.ts +143 -0
  24. package/dist/auth/walletRequestTypes.d.ts.map +1 -0
  25. package/dist/auth/walletRequestTypes.js +2 -0
  26. package/dist/auth/walletRequestTypes.js.map +1 -0
  27. package/dist/config.d.ts +150 -0
  28. package/dist/config.d.ts.map +1 -0
  29. package/dist/config.js +27 -0
  30. package/dist/config.js.map +1 -0
  31. package/dist/dev/cli.d.ts +16 -0
  32. package/dist/dev/cli.d.ts.map +1 -0
  33. package/dist/dev/cli.js +122 -0
  34. package/dist/dev/cli.js.map +1 -0
  35. package/dist/dev/cli.test.d.ts +2 -0
  36. package/dist/dev/cli.test.d.ts.map +1 -0
  37. package/dist/dev/cli.test.js +39 -0
  38. package/dist/dev/cli.test.js.map +1 -0
  39. package/dist/dev/index.d.ts +10 -0
  40. package/dist/dev/index.d.ts.map +1 -0
  41. package/dist/dev/index.js +10 -0
  42. package/dist/dev/index.js.map +1 -0
  43. package/dist/dev/provisionDevGrants.d.ts +73 -0
  44. package/dist/dev/provisionDevGrants.d.ts.map +1 -0
  45. package/dist/dev/provisionDevGrants.js +176 -0
  46. package/dist/dev/provisionDevGrants.js.map +1 -0
  47. package/dist/grants.d.ts +59 -0
  48. package/dist/grants.d.ts.map +1 -0
  49. package/dist/grants.js +82 -0
  50. package/dist/grants.js.map +1 -0
  51. package/dist/grants.test.d.ts +2 -0
  52. package/dist/grants.test.d.ts.map +1 -0
  53. package/dist/grants.test.js +79 -0
  54. package/dist/grants.test.js.map +1 -0
  55. package/dist/identity/agents.d.ts +99 -0
  56. package/dist/identity/agents.d.ts.map +1 -0
  57. package/dist/identity/agents.js +132 -0
  58. package/dist/identity/agents.js.map +1 -0
  59. package/dist/identity/appSession.d.ts +78 -0
  60. package/dist/identity/appSession.d.ts.map +1 -0
  61. package/dist/identity/appSession.js +93 -0
  62. package/dist/identity/appSession.js.map +1 -0
  63. package/dist/identity/documentLoader.d.ts +20 -0
  64. package/dist/identity/documentLoader.d.ts.map +1 -0
  65. package/dist/identity/documentLoader.js +99 -0
  66. package/dist/identity/documentLoader.js.map +1 -0
  67. package/dist/identity/initAppSession.d.ts +27 -0
  68. package/dist/identity/initAppSession.d.ts.map +1 -0
  69. package/dist/identity/initAppSession.js +30 -0
  70. package/dist/identity/initAppSession.js.map +1 -0
  71. package/dist/identity/seedCredential.d.ts +74 -0
  72. package/dist/identity/seedCredential.d.ts.map +1 -0
  73. package/dist/identity/seedCredential.js +165 -0
  74. package/dist/identity/seedCredential.js.map +1 -0
  75. package/dist/identity/seedCredential.test.d.ts +2 -0
  76. package/dist/identity/seedCredential.test.d.ts.map +1 -0
  77. package/dist/identity/seedCredential.test.js +205 -0
  78. package/dist/identity/seedCredential.test.js.map +1 -0
  79. package/dist/identity/seedStore.d.ts +27 -0
  80. package/dist/identity/seedStore.d.ts.map +1 -0
  81. package/dist/identity/seedStore.js +74 -0
  82. package/dist/identity/seedStore.js.map +1 -0
  83. package/dist/index.d.ts +37 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +46 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/mui/ProtectedRoute.d.ts +10 -0
  88. package/dist/mui/ProtectedRoute.d.ts.map +1 -0
  89. package/dist/mui/ProtectedRoute.js +54 -0
  90. package/dist/mui/ProtectedRoute.js.map +1 -0
  91. package/dist/mui/ReconnectBanner.d.ts +2 -0
  92. package/dist/mui/ReconnectBanner.d.ts.map +1 -0
  93. package/dist/mui/ReconnectBanner.js +20 -0
  94. package/dist/mui/ReconnectBanner.js.map +1 -0
  95. package/dist/mui/SyncStatusChip.d.ts +2 -0
  96. package/dist/mui/SyncStatusChip.d.ts.map +1 -0
  97. package/dist/mui/SyncStatusChip.js +27 -0
  98. package/dist/mui/SyncStatusChip.js.map +1 -0
  99. package/dist/mui/index.d.ts +12 -0
  100. package/dist/mui/index.d.ts.map +1 -0
  101. package/dist/mui/index.js +12 -0
  102. package/dist/mui/index.js.map +1 -0
  103. package/dist/react/WasSessionProvider.d.ts +36 -0
  104. package/dist/react/WasSessionProvider.d.ts.map +1 -0
  105. package/dist/react/WasSessionProvider.js +35 -0
  106. package/dist/react/WasSessionProvider.js.map +1 -0
  107. package/dist/react/hooks.d.ts +66 -0
  108. package/dist/react/hooks.d.ts.map +1 -0
  109. package/dist/react/hooks.js +121 -0
  110. package/dist/react/hooks.js.map +1 -0
  111. package/dist/react/index.d.ts +11 -0
  112. package/dist/react/index.d.ts.map +1 -0
  113. package/dist/react/index.js +11 -0
  114. package/dist/react/index.js.map +1 -0
  115. package/dist/session/appReadyStore.d.ts +10 -0
  116. package/dist/session/appReadyStore.d.ts.map +1 -0
  117. package/dist/session/appReadyStore.js +22 -0
  118. package/dist/session/appReadyStore.js.map +1 -0
  119. package/dist/session/authStore.d.ts +71 -0
  120. package/dist/session/authStore.d.ts.map +1 -0
  121. package/dist/session/authStore.js +347 -0
  122. package/dist/session/authStore.js.map +1 -0
  123. package/dist/session/index.d.ts +10 -0
  124. package/dist/session/index.d.ts.map +1 -0
  125. package/dist/session/index.js +10 -0
  126. package/dist/session/index.js.map +1 -0
  127. package/dist/storage/entityStore.d.ts +51 -0
  128. package/dist/storage/entityStore.d.ts.map +1 -0
  129. package/dist/storage/entityStore.js +78 -0
  130. package/dist/storage/entityStore.js.map +1 -0
  131. package/dist/storage/localStore.d.ts +144 -0
  132. package/dist/storage/localStore.d.ts.map +1 -0
  133. package/dist/storage/localStore.js +289 -0
  134. package/dist/storage/localStore.js.map +1 -0
  135. package/dist/storage/rehydrate.d.ts +56 -0
  136. package/dist/storage/rehydrate.d.ts.map +1 -0
  137. package/dist/storage/rehydrate.js +87 -0
  138. package/dist/storage/rehydrate.js.map +1 -0
  139. package/dist/storage/rehydrate.test.d.ts +2 -0
  140. package/dist/storage/rehydrate.test.d.ts.map +1 -0
  141. package/dist/storage/rehydrate.test.js +172 -0
  142. package/dist/storage/rehydrate.test.js.map +1 -0
  143. package/dist/storage/storageManager.d.ts +39 -0
  144. package/dist/storage/storageManager.d.ts.map +1 -0
  145. package/dist/storage/storageManager.js +68 -0
  146. package/dist/storage/storageManager.js.map +1 -0
  147. package/dist/storage/syncController.d.ts +79 -0
  148. package/dist/storage/syncController.d.ts.map +1 -0
  149. package/dist/storage/syncController.js +189 -0
  150. package/dist/storage/syncController.js.map +1 -0
  151. package/dist/storage/syncStatusStore.d.ts +17 -0
  152. package/dist/storage/syncStatusStore.d.ts.map +1 -0
  153. package/dist/storage/syncStatusStore.js +19 -0
  154. package/dist/storage/syncStatusStore.js.map +1 -0
  155. package/dist/storage/wasRemoteStore.d.ts +73 -0
  156. package/dist/storage/wasRemoteStore.d.ts.map +1 -0
  157. package/dist/storage/wasRemoteStore.js +76 -0
  158. package/dist/storage/wasRemoteStore.js.map +1 -0
  159. package/dist/storage/wasSync.d.ts +42 -0
  160. package/dist/storage/wasSync.d.ts.map +1 -0
  161. package/dist/storage/wasSync.js +34 -0
  162. package/dist/storage/wasSync.js.map +1 -0
  163. package/dist/sync/changesQuery.d.ts +44 -0
  164. package/dist/sync/changesQuery.d.ts.map +1 -0
  165. package/dist/sync/changesQuery.js +61 -0
  166. package/dist/sync/changesQuery.js.map +1 -0
  167. package/dist/sync/changesQuery.test.d.ts +2 -0
  168. package/dist/sync/changesQuery.test.d.ts.map +1 -0
  169. package/dist/sync/changesQuery.test.js +145 -0
  170. package/dist/sync/changesQuery.test.js.map +1 -0
  171. package/dist/sync/docCipher.d.ts +68 -0
  172. package/dist/sync/docCipher.d.ts.map +1 -0
  173. package/dist/sync/docCipher.js +89 -0
  174. package/dist/sync/docCipher.js.map +1 -0
  175. package/dist/sync/feedMasterPort.d.ts +30 -0
  176. package/dist/sync/feedMasterPort.d.ts.map +1 -0
  177. package/dist/sync/feedMasterPort.js +58 -0
  178. package/dist/sync/feedMasterPort.js.map +1 -0
  179. package/dist/sync/index.d.ts +21 -0
  180. package/dist/sync/index.d.ts.map +1 -0
  181. package/dist/sync/index.js +21 -0
  182. package/dist/sync/index.js.map +1 -0
  183. package/dist/sync/lww.d.ts +29 -0
  184. package/dist/sync/lww.d.ts.map +1 -0
  185. package/dist/sync/lww.js +28 -0
  186. package/dist/sync/lww.js.map +1 -0
  187. package/dist/sync/lww.test.d.ts +2 -0
  188. package/dist/sync/lww.test.d.ts.map +1 -0
  189. package/dist/sync/lww.test.js +28 -0
  190. package/dist/sync/lww.test.js.map +1 -0
  191. package/dist/sync/lwwConflictHandler.d.ts +49 -0
  192. package/dist/sync/lwwConflictHandler.d.ts.map +1 -0
  193. package/dist/sync/lwwConflictHandler.js +65 -0
  194. package/dist/sync/lwwConflictHandler.js.map +1 -0
  195. package/dist/sync/lwwConflictHandler.test.d.ts +2 -0
  196. package/dist/sync/lwwConflictHandler.test.d.ts.map +1 -0
  197. package/dist/sync/lwwConflictHandler.test.js +78 -0
  198. package/dist/sync/lwwConflictHandler.test.js.map +1 -0
  199. package/dist/sync/pushWrites.d.ts +57 -0
  200. package/dist/sync/pushWrites.d.ts.map +1 -0
  201. package/dist/sync/pushWrites.js +159 -0
  202. package/dist/sync/pushWrites.js.map +1 -0
  203. package/dist/sync/pushWrites.test.d.ts +2 -0
  204. package/dist/sync/pushWrites.test.d.ts.map +1 -0
  205. package/dist/sync/pushWrites.test.js +287 -0
  206. package/dist/sync/pushWrites.test.js.map +1 -0
  207. package/dist/sync/syncedDocSchema.d.ts +22 -0
  208. package/dist/sync/syncedDocSchema.d.ts.map +1 -0
  209. package/dist/sync/syncedDocSchema.js +26 -0
  210. package/dist/sync/syncedDocSchema.js.map +1 -0
  211. package/dist/sync/types.d.ts +194 -0
  212. package/dist/sync/types.d.ts.map +1 -0
  213. package/dist/sync/types.js +36 -0
  214. package/dist/sync/types.js.map +1 -0
  215. package/dist/sync/wasReplication.d.ts +47 -0
  216. package/dist/sync/wasReplication.d.ts.map +1 -0
  217. package/dist/sync/wasReplication.js +55 -0
  218. package/dist/sync/wasReplication.js.map +1 -0
  219. package/dist/sync/wasSyncPort.d.ts +45 -0
  220. package/dist/sync/wasSyncPort.d.ts.map +1 -0
  221. package/dist/sync/wasSyncPort.js +170 -0
  222. package/dist/sync/wasSyncPort.js.map +1 -0
  223. package/package.json +142 -0
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * `@interop/was-react`: build "Bring Your Own Everything" (BYOE) apps on Wallet
6
+ * Attached Storage -- DID-Auth login via a CHAPI wallet, local-first encrypted
7
+ * storage, and background sync to a WAS server.
8
+ *
9
+ * This is the core entry. The optional MUI + react-router components live at
10
+ * `@interop/was-react/mui`; the Node-only dev-grant provisioner lives at
11
+ * `@interop/was-react/dev`. Neither is re-exported here.
12
+ */
13
+ export { DEFAULT_DB_NAME, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_SYNC_POLL_MS, DEFAULT_EXPIRY_WARNING_MS, DEFAULT_EXPIRY_WATCH_MS, collectionKeyForId, type WasCollectionConfig, type WasSyncConfig, type WasExpiryConfig, type WasAppConfig, type StoreRegistryEntry, type StoreRegistry } from './config.js';
14
+ export { parseInvocationTarget, parseGrants, type ParsedGrants } from './grants.js';
15
+ export { deriveIdentity, deriveCollectionKeys, DEFAULT_IDENTITY_HANDLE, DEFAULT_KAK_HANDLE, type IdentityAgents, type CollectionKeys } from './identity/agents.js';
16
+ export { createDocumentLoader, type DocumentLoader } from './identity/documentLoader.js';
17
+ export { createSeedStore, type SeedStore } from './identity/seedStore.js';
18
+ export { issueSeedCredential, parseSeedCredential, findSeedCredential, wrapCredentialForStore, bytesToBase64url, base64urlToBytes, type SeedCredentialConfig, type ParsedSeedCredential } from './identity/seedCredential.js';
19
+ export { initAppSession } from './identity/initAppSession.js';
20
+ export { persistAppSession, restoreAppSession, clearAppSession, isExpired, isNearExpiry, earliestExpiry, type AppSessionRecord, type RestoredAppSession } from './identity/appSession.js';
21
+ export { DEFAULT_MEDIATOR_BASE, loadChapi, chapiGet, chapiStore } from './auth/chapi.js';
22
+ export { RW_ACTIONS, SPACE_READ_REFERENCE_ID, newChallenge, buildSeedProbeVpr, buildGrantsVpr } from './auth/loginRequest.js';
23
+ export { verifyLoginPresentation, grantsOf, checkGrants, type CheckedGrants } from './auth/verifyResponse.js';
24
+ export { loginWithWallet, requestGrants, LoginCancelledError, type LoginConfig, type LoginPhase, type LoginOutcome } from './auth/loginFlow.js';
25
+ export type { WalletAPIMessage, IVPOffer, IVPRequest, IVPRDetails, IVPRQuery, IQueryByExample, IDIDAuthenticationQuery, IZcapQuery, ICapabilityQueryDetail, WalletResponse, WalletRequestProfile, IVerifiableCredential, IVerifiablePresentation, IZcap } from './auth/walletRequestTypes.js';
26
+ export * from './sync/index.js';
27
+ export { LocalStore } from './storage/localStore.js';
28
+ export { setLocalStore, requireStore, hasStore, clearLocalStore, getDeviceId } from './storage/storageManager.js';
29
+ export { createEntityStore, type EntityStore } from './storage/entityStore.js';
30
+ export { WasRemoteStore, type MarkerResult } from './storage/wasRemoteStore.js';
31
+ export { useSyncStatusStore, type SyncStatus } from './storage/syncStatusStore.js';
32
+ export { hydrateAll, clearAllEntityStores, patchFromChange, scheduleRehydrate } from './storage/rehydrate.js';
33
+ export { isAuthError, SyncController, createSyncController } from './storage/syncController.js';
34
+ export { startWasSync } from './storage/wasSync.js';
35
+ export { createAuthStore, useAppReady, type AuthStatus, type AuthState, type WasAuthStore } from './session/index.js';
36
+ export { WasSessionProvider, WasSessionContext, useAuthStore, useSession, useLogin, useLogout, useReconnect, useSyncStatus, type SyncRollup } from './react/index.js';
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
package/dist/index.js ADDED
@@ -0,0 +1,46 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * `@interop/was-react`: build "Bring Your Own Everything" (BYOE) apps on Wallet
6
+ * Attached Storage -- DID-Auth login via a CHAPI wallet, local-first encrypted
7
+ * storage, and background sync to a WAS server.
8
+ *
9
+ * This is the core entry. The optional MUI + react-router components live at
10
+ * `@interop/was-react/mui`; the Node-only dev-grant provisioner lives at
11
+ * `@interop/was-react/dev`. Neither is re-exported here.
12
+ */
13
+ // Configuration contract.
14
+ export { DEFAULT_DB_NAME, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_SYNC_POLL_MS, DEFAULT_EXPIRY_WARNING_MS, DEFAULT_EXPIRY_WATCH_MS, collectionKeyForId } from './config.js';
15
+ // Grant parsing / topology routing.
16
+ export { parseInvocationTarget, parseGrants } from './grants.js';
17
+ // Identity: seed-derived agents + per-collection vault keys.
18
+ export { deriveIdentity, deriveCollectionKeys, DEFAULT_IDENTITY_HANDLE, DEFAULT_KAK_HANDLE } from './identity/agents.js';
19
+ export { createDocumentLoader } from './identity/documentLoader.js';
20
+ export { createSeedStore } from './identity/seedStore.js';
21
+ export { issueSeedCredential, parseSeedCredential, findSeedCredential, wrapCredentialForStore, bytesToBase64url, base64urlToBytes } from './identity/seedCredential.js';
22
+ export { initAppSession } from './identity/initAppSession.js';
23
+ export { persistAppSession, restoreAppSession, clearAppSession, isExpired, isNearExpiry, earliestExpiry } from './identity/appSession.js';
24
+ // Auth: CHAPI bridge, VPR construction, response verification, login flow.
25
+ export { DEFAULT_MEDIATOR_BASE, loadChapi, chapiGet, chapiStore } from './auth/chapi.js';
26
+ export { RW_ACTIONS, SPACE_READ_REFERENCE_ID, newChallenge, buildSeedProbeVpr, buildGrantsVpr } from './auth/loginRequest.js';
27
+ export { verifyLoginPresentation, grantsOf, checkGrants } from './auth/verifyResponse.js';
28
+ export { loginWithWallet, requestGrants, LoginCancelledError } from './auth/loginFlow.js';
29
+ // The collection-agnostic RxDB-WAS replication core.
30
+ export * from './sync/index.js';
31
+ // Storage: local encrypted replica, the process-wide store holder, entity
32
+ // stores, the delegated remote store, sync status, rehydrate mechanism, and the
33
+ // replication controller.
34
+ export { LocalStore } from './storage/localStore.js';
35
+ export { setLocalStore, requireStore, hasStore, clearLocalStore, getDeviceId } from './storage/storageManager.js';
36
+ export { createEntityStore } from './storage/entityStore.js';
37
+ export { WasRemoteStore } from './storage/wasRemoteStore.js';
38
+ export { useSyncStatusStore } from './storage/syncStatusStore.js';
39
+ export { hydrateAll, clearAllEntityStores, patchFromChange, scheduleRehydrate } from './storage/rehydrate.js';
40
+ export { isAuthError, SyncController, createSyncController } from './storage/syncController.js';
41
+ export { startWasSync } from './storage/wasSync.js';
42
+ // Session lifecycle: the wallet-mode auth store factory + the app-ready gate.
43
+ export { createAuthStore, useAppReady } from './session/index.js';
44
+ // React: the session provider + hooks.
45
+ export { WasSessionProvider, WasSessionContext, useAuthStore, useSession, useLogin, useLogout, useReconnect, useSyncStatus } from './react/index.js';
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AAEH,0BAA0B;AAC1B,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAOnB,MAAM,aAAa,CAAA;AAEpB,oCAAoC;AACpC,OAAO,EACL,qBAAqB,EACrB,WAAW,EAEZ,MAAM,aAAa,CAAA;AAEpB,6DAA6D;AAC7D,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAGnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,oBAAoB,EAErB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAkB,MAAM,yBAAyB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAGjB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,cAAc,EAGf,MAAM,0BAA0B,CAAA;AAEjC,2EAA2E;AAC3E,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,UAAU,EACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,uBAAuB,EACvB,QAAQ,EACR,WAAW,EAEZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,eAAe,EACf,aAAa,EACb,mBAAmB,EAIpB,MAAM,qBAAqB,CAAA;AAkB5B,qDAAqD;AACrD,cAAc,iBAAiB,CAAA;AAE/B,0EAA0E;AAC1E,gFAAgF;AAChF,0BAA0B;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,WAAW,EACZ,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAoB,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAqB,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EACL,kBAAkB,EAEnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,WAAW,EACX,cAAc,EACd,oBAAoB,EACrB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,8EAA8E;AAC9E,OAAO,EACL,eAAe,EACf,WAAW,EAIZ,MAAM,oBAAoB,CAAA;AAE3B,uCAAuC;AACvC,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,EAEd,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @param props {object}
3
+ * @param [props.loginPath] {string} where to send an unauthenticated visitor
4
+ * (defaults to `/login`)
5
+ * @returns {ReactNode}
6
+ */
7
+ export declare function ProtectedRoute({ loginPath }?: {
8
+ loginPath?: string;
9
+ }): import("react").JSX.Element;
10
+ //# sourceMappingURL=ProtectedRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProtectedRoute.d.ts","sourceRoot":"","sources":["../../src/mui/ProtectedRoute.tsx"],"names":[],"mappings":"AAmCA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAoB,EACrB,GAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;CACd,+BA+BL"}
@@ -0,0 +1,54 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*!
3
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
4
+ */
5
+ /**
6
+ * The auth + hydration gate (wallet mode). Attempts the zero-popup session
7
+ * restore; an unauthenticated visitor is redirected to the login path, and the
8
+ * routed pages render only once the restored session has hydrated the stores.
9
+ *
10
+ * Apps with a local dev mode wrap their own gate; this component is wallet-mode
11
+ * only. Uses react-router's `Navigate` / `Outlet`.
12
+ */
13
+ import { useEffect } from 'react';
14
+ import { Navigate, Outlet } from 'react-router';
15
+ import { Alert, Box, CircularProgress, Typography } from '@mui/material';
16
+ import { useAppReady, useAuthStore, useSession } from '../react/hooks.js';
17
+ function CenteredSpinner({ label }) {
18
+ return (_jsxs(Box, { sx: {
19
+ display: 'flex',
20
+ flexDirection: 'column',
21
+ alignItems: 'center',
22
+ justifyContent: 'center',
23
+ gap: 2,
24
+ minHeight: '60vh'
25
+ }, "data-testid": "bootstrap-loading", children: [_jsx(CircularProgress, {}), _jsx(Typography, { color: "text.secondary", children: label })] }));
26
+ }
27
+ /**
28
+ * @param props {object}
29
+ * @param [props.loginPath] {string} where to send an unauthenticated visitor
30
+ * (defaults to `/login`)
31
+ * @returns {ReactNode}
32
+ */
33
+ export function ProtectedRoute({ loginPath = '/login' } = {}) {
34
+ const store = useAuthStore();
35
+ const { status } = useSession();
36
+ const { ready, error } = useAppReady();
37
+ useEffect(() => {
38
+ void store.getState().restore();
39
+ }, [store]);
40
+ if (error) {
41
+ return (_jsx(Box, { sx: { p: 4 }, children: _jsxs(Alert, { severity: "error", "data-testid": "bootstrap-error", children: ["Failed to open local storage: ", error] }) }));
42
+ }
43
+ if (status === 'idle' || status === 'restoring') {
44
+ return _jsx(CenteredSpinner, { label: "Restoring your session..." });
45
+ }
46
+ if (status !== 'authenticated') {
47
+ return _jsx(Navigate, { to: loginPath, replace: true });
48
+ }
49
+ if (!ready) {
50
+ return _jsx(CenteredSpinner, { label: "Opening your storage..." });
51
+ }
52
+ return _jsx(Outlet, {});
53
+ }
54
+ //# sourceMappingURL=ProtectedRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProtectedRoute.js","sourceRoot":"","sources":["../../src/mui/ProtectedRoute.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEzE,SAAS,eAAe,CAAC,EAAE,KAAK,EAAqB;IACnD,OAAO,CACL,MAAC,GAAG,IACF,EAAE,EAAE;YACF,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,GAAG,EAAE,CAAC;YACN,SAAS,EAAE,MAAM;SAClB,iBACW,mBAAmB,aAE/B,KAAC,gBAAgB,KAAG,EACpB,KAAC,UAAU,IAAC,KAAK,EAAC,gBAAgB,YAAE,KAAK,GAAc,IACnD,CACP,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,SAAS,GAAG,QAAQ,KAGlB,EAAE;IACJ,MAAM,KAAK,GAAG,YAAY,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAA;IAC/B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,CAAA;IAEtC,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAA;IACjC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,YACf,MAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,iBAAa,iBAAiB,+CACpB,KAAK,IAC9B,GACJ,CACP,CAAA;IACH,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;QAChD,OAAO,KAAC,eAAe,IAAC,KAAK,EAAC,2BAA2B,GAAG,CAAA;IAC9D,CAAC;IACD,IAAI,MAAM,KAAK,eAAe,EAAE,CAAC;QAC/B,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAE,SAAS,EAAE,OAAO,SAAG,CAAA;IAC5C,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAC,eAAe,IAAC,KAAK,EAAC,yBAAyB,GAAG,CAAA;IAC5D,CAAC;IAED,OAAO,KAAC,MAAM,KAAG,CAAA;AACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ReconnectBanner(): import("react").JSX.Element | null;
2
+ //# sourceMappingURL=ReconnectBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReconnectBanner.d.ts","sourceRoot":"","sources":["../../src/mui/ReconnectBanner.tsx"],"names":[],"mappings":"AAYA,wBAAgB,eAAe,uCA2B9B"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*!
3
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
4
+ */
5
+ /**
6
+ * The storage-access-expired banner (wallet mode). Shown when a live 401/403
7
+ * from the WAS server surfaces on the sync error stream (the granted zcaps
8
+ * expired or were revoked); the action relaunches the grants flow with the
9
+ * existing seed (one wallet popup, same identity, same data).
10
+ */
11
+ import { Alert, Button } from '@mui/material';
12
+ import { useReconnect } from '../react/hooks.js';
13
+ export function ReconnectBanner() {
14
+ const { accessExpired, reconnecting, reconnect } = useReconnect();
15
+ if (!accessExpired) {
16
+ return null;
17
+ }
18
+ return (_jsx(Alert, { severity: "warning", "data-testid": "reconnect-banner", sx: { mb: 2 }, action: _jsx(Button, { color: "inherit", size: "small", disabled: reconnecting, onClick: () => void reconnect(), "data-testid": "reconnect-wallet", children: reconnecting ? 'Reconnecting...' : 'Reconnect wallet' }), children: "Storage access expired -- reconnect your wallet to keep syncing." }));
19
+ }
20
+ //# sourceMappingURL=ReconnectBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReconnectBanner.js","sourceRoot":"","sources":["../../src/mui/ReconnectBanner.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,UAAU,eAAe;IAC7B,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,YAAY,EAAE,CAAA;IAEjE,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CACL,KAAC,KAAK,IACJ,QAAQ,EAAC,SAAS,iBACN,kBAAkB,EAC9B,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EACb,MAAM,EACJ,KAAC,MAAM,IACL,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,SAAS,EAAE,iBACnB,kBAAkB,YAE7B,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,GAC/C,iFAIL,CACT,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function SyncStatusChip(): import("react").JSX.Element;
2
+ //# sourceMappingURL=SyncStatusChip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SyncStatusChip.d.ts","sourceRoot":"","sources":["../../src/mui/SyncStatusChip.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,cAAc,gCAgB7B"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*!
3
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
4
+ */
5
+ /**
6
+ * The replication indicator: an aggregate over the per-collection statuses the
7
+ * sync controller writes into the sync-status store. With no replication running
8
+ * (offline / local-only) it advertises local-only mode; otherwise it rolls the
9
+ * collection states up to error > syncing > synced (see `useSyncStatus`).
10
+ */
11
+ import { Chip, Tooltip } from '@mui/material';
12
+ import CloudOffIcon from '@mui/icons-material/CloudOff';
13
+ import CloudDoneIcon from '@mui/icons-material/CloudDone';
14
+ import CloudSyncIcon from '@mui/icons-material/CloudSync';
15
+ import CloudAlertIcon from '@mui/icons-material/ErrorOutlined';
16
+ import { useSyncStatus } from '../react/hooks.js';
17
+ const ICON_BY_STATE = {
18
+ offline: _jsx(CloudOffIcon, {}),
19
+ error: _jsx(CloudAlertIcon, {}),
20
+ syncing: _jsx(CloudSyncIcon, {}),
21
+ synced: _jsx(CloudDoneIcon, {})
22
+ };
23
+ export function SyncStatusChip() {
24
+ const { state, label, title } = useSyncStatus();
25
+ return (_jsx(Tooltip, { title: title, children: _jsx(Chip, { icon: ICON_BY_STATE[state], label: label, size: "small", variant: "outlined", "data-testid": "sync-status-chip", "data-sync-state": label.toLowerCase().replace(/\s+/g, '-'), sx: { color: 'inherit', borderColor: 'currentColor' } }) }));
26
+ }
27
+ //# sourceMappingURL=SyncStatusChip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SyncStatusChip.js","sourceRoot":"","sources":["../../src/mui/SyncStatusChip.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,YAAY,MAAM,8BAA8B,CAAA;AACvD,OAAO,aAAa,MAAM,+BAA+B,CAAA;AACzD,OAAO,aAAa,MAAM,+BAA+B,CAAA;AACzD,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAE9D,OAAO,EAAE,aAAa,EAAmB,MAAM,mBAAmB,CAAA;AAElE,MAAM,aAAa,GAAqC;IACtD,OAAO,EAAE,KAAC,YAAY,KAAG;IACzB,KAAK,EAAE,KAAC,cAAc,KAAG;IACzB,OAAO,EAAE,KAAC,aAAa,KAAG;IAC1B,MAAM,EAAE,KAAC,aAAa,KAAG;CAC1B,CAAA;AAED,MAAM,UAAU,cAAc;IAC5B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,aAAa,EAAE,CAAA;IAE/C,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,YACnB,KAAC,IAAI,IACH,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,EAC1B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,UAAU,iBACN,kBAAkB,qBACb,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,EACzD,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,GACrD,GACM,CACX,CAAA;AACH,CAAC"}
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * Optional MUI + react-router components, exposed through the package `./mui`
6
+ * subpath. `@mui/material`, `@mui/icons-material`, and `react-router` are
7
+ * optional peers imported ONLY here; the core entry never pulls them in.
8
+ */
9
+ export { ProtectedRoute } from './ProtectedRoute.js';
10
+ export { ReconnectBanner } from './ReconnectBanner.js';
11
+ export { SyncStatusChip } from './SyncStatusChip.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * Optional MUI + react-router components, exposed through the package `./mui`
6
+ * subpath. `@mui/material`, `@mui/icons-material`, and `react-router` are
7
+ * optional peers imported ONLY here; the core entry never pulls them in.
8
+ */
9
+ export { ProtectedRoute } from './ProtectedRoute.js';
10
+ export { ReconnectBanner } from './ReconnectBanner.js';
11
+ export { SyncStatusChip } from './SyncStatusChip.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,36 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The session provider: instantiates the wallet-mode auth store once (from the
6
+ * app's config + store registry) and shares it through React context. The hooks
7
+ * (`useAuthStore`, `useSession`, ...) read the bound store from this context.
8
+ *
9
+ * One provider per app; wrap the router (or the whole tree) in it. The store is
10
+ * created lazily in a `useState` initializer so it survives re-renders and is
11
+ * never rebuilt.
12
+ */
13
+ import { type ReactNode } from 'react';
14
+ import type { StoreRegistry, WasAppConfig } from '../config.js';
15
+ import { type WasAuthStore } from '../session/authStore.js';
16
+ /**
17
+ * The bound auth store, or `null` outside a provider. The `useAuthStore` hook
18
+ * throws a helpful error on the `null` case.
19
+ */
20
+ export declare const WasSessionContext: import("react").Context<WasAuthStore | null>;
21
+ /**
22
+ * Provides the wallet-mode session store to the tree beneath it.
23
+ *
24
+ * @param props {object}
25
+ * @param props.config {WasAppConfig} the app-wide configuration
26
+ * @param props.registry {StoreRegistry} the per-collection hydrate/patch
27
+ * handlers
28
+ * @param props.children {ReactNode}
29
+ * @returns {ReactNode}
30
+ */
31
+ export declare function WasSessionProvider({ config, registry, children }: {
32
+ config: WasAppConfig;
33
+ registry: StoreRegistry;
34
+ children: ReactNode;
35
+ }): ReactNode;
36
+ //# sourceMappingURL=WasSessionProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WasSessionProvider.d.ts","sourceRoot":"","sources":["../../src/react/WasSessionProvider.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AACH,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8CAA2C,CAAA;AAEzE;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,QAAQ,EACT,EAAE;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,EAAE,aAAa,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB,GAAG,SAAS,CASZ"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*!
3
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
4
+ */
5
+ /**
6
+ * The session provider: instantiates the wallet-mode auth store once (from the
7
+ * app's config + store registry) and shares it through React context. The hooks
8
+ * (`useAuthStore`, `useSession`, ...) read the bound store from this context.
9
+ *
10
+ * One provider per app; wrap the router (or the whole tree) in it. The store is
11
+ * created lazily in a `useState` initializer so it survives re-renders and is
12
+ * never rebuilt.
13
+ */
14
+ import { createContext, useState } from 'react';
15
+ import { createAuthStore } from '../session/authStore.js';
16
+ /**
17
+ * The bound auth store, or `null` outside a provider. The `useAuthStore` hook
18
+ * throws a helpful error on the `null` case.
19
+ */
20
+ export const WasSessionContext = createContext(null);
21
+ /**
22
+ * Provides the wallet-mode session store to the tree beneath it.
23
+ *
24
+ * @param props {object}
25
+ * @param props.config {WasAppConfig} the app-wide configuration
26
+ * @param props.registry {StoreRegistry} the per-collection hydrate/patch
27
+ * handlers
28
+ * @param props.children {ReactNode}
29
+ * @returns {ReactNode}
30
+ */
31
+ export function WasSessionProvider({ config, registry, children }) {
32
+ const [store] = useState(() => createAuthStore({ config, registry }));
33
+ return (_jsx(WasSessionContext.Provider, { value: store, children: children }));
34
+ }
35
+ //# sourceMappingURL=WasSessionProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WasSessionProvider.js","sourceRoot":"","sources":["../../src/react/WasSessionProvider.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAqB,MAAM,yBAAyB,CAAA;AAE5E;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAsB,IAAI,CAAC,CAAA;AAEzE;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,QAAQ,EAKT;IACC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAe,GAAG,EAAE,CAC1C,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CACtC,CAAA;IACD,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACrC,QAAQ,GACkB,CAC9B,CAAA;AACH,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { WasAuthStore } from '../session/authStore.js';
2
+ export { useAppReady } from '../session/appReadyStore.js';
3
+ /**
4
+ * The bound auth store from the nearest {@link WasSessionProvider}. Throws a
5
+ * helpful error when used outside a provider.
6
+ *
7
+ * @returns {WasAuthStore}
8
+ */
9
+ export declare function useAuthStore(): WasAuthStore;
10
+ /**
11
+ * The current session state (status/phase/expiry/reconnect flags). Re-renders
12
+ * only when one of the selected fields changes.
13
+ *
14
+ * @returns {object}
15
+ */
16
+ export declare function useSession(): {
17
+ status: ReturnType<WasAuthStore['getState']>['status'];
18
+ phase: ReturnType<WasAuthStore['getState']>['phase'];
19
+ error: string | null;
20
+ controllerDid: string | null;
21
+ expires: string | null;
22
+ accessExpired: boolean;
23
+ reconnecting: boolean;
24
+ };
25
+ /**
26
+ * The login action plus the state the login page renders (status/phase/error).
27
+ *
28
+ * @returns {object}
29
+ */
30
+ export declare function useLogin(): {
31
+ login: () => Promise<void>;
32
+ status: ReturnType<WasAuthStore['getState']>['status'];
33
+ phase: ReturnType<WasAuthStore['getState']>['phase'];
34
+ error: string | null;
35
+ };
36
+ /**
37
+ * The logout action.
38
+ *
39
+ * @returns {() => Promise<void>}
40
+ */
41
+ export declare function useLogout(): () => Promise<void>;
42
+ /**
43
+ * The expired-access reconnect: the banner flags plus the reconnect action.
44
+ *
45
+ * @returns {object}
46
+ */
47
+ export declare function useReconnect(): {
48
+ accessExpired: boolean;
49
+ reconnecting: boolean;
50
+ reconnect: () => Promise<void>;
51
+ };
52
+ /** The aggregate replication rollup: no sync running, or error > syncing > synced. */
53
+ export type SyncRollup = 'offline' | 'error' | 'syncing' | 'synced';
54
+ /**
55
+ * The aggregate sync status over the per-collection replication statuses. With
56
+ * no replication running (offline / local-only) it reports `offline`; otherwise
57
+ * it rolls the collection states up to error > syncing > synced.
58
+ *
59
+ * @returns {{ state: SyncRollup, label: string, title: string }}
60
+ */
61
+ export declare function useSyncStatus(): {
62
+ state: SyncRollup;
63
+ label: string;
64
+ title: string;
65
+ };
66
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAS3C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI;IAC5B,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACtD,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IACpD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;CACtB,CAcA;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI;IAC1B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACtD,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IACpD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAYA;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,MAAM,OAAO,CAAC,IAAI,CAAC,CAG/C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI;IAC9B,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/B,CAWA;AAED,sFAAsF;AACtF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEnE;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI;IAC/B,KAAK,EAAE,UAAU,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CA+BA"}
@@ -0,0 +1,121 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The React hooks over the session store: thin selectors that read the bound
6
+ * store from context (the logic lives in the auth store and the sync-status
7
+ * store). Components consume these rather than reaching for a module singleton.
8
+ */
9
+ import { useContext } from 'react';
10
+ import { useStore } from 'zustand';
11
+ import { useShallow } from 'zustand/react/shallow';
12
+ import { WasSessionContext } from './WasSessionProvider.js';
13
+ import { useSyncStatusStore } from '../storage/syncStatusStore.js';
14
+ export { useAppReady } from '../session/appReadyStore.js';
15
+ /**
16
+ * The bound auth store from the nearest {@link WasSessionProvider}. Throws a
17
+ * helpful error when used outside a provider.
18
+ *
19
+ * @returns {WasAuthStore}
20
+ */
21
+ export function useAuthStore() {
22
+ const store = useContext(WasSessionContext);
23
+ if (!store) {
24
+ throw new Error('useAuthStore must be used within a <WasSessionProvider>. Wrap your app ' +
25
+ 'in <WasSessionProvider config={...} registry={...}>.');
26
+ }
27
+ return store;
28
+ }
29
+ /**
30
+ * The current session state (status/phase/expiry/reconnect flags). Re-renders
31
+ * only when one of the selected fields changes.
32
+ *
33
+ * @returns {object}
34
+ */
35
+ export function useSession() {
36
+ const store = useAuthStore();
37
+ return useStore(store, useShallow(state => ({
38
+ status: state.status,
39
+ phase: state.phase,
40
+ error: state.error,
41
+ controllerDid: state.controllerDid,
42
+ expires: state.expires,
43
+ accessExpired: state.accessExpired,
44
+ reconnecting: state.reconnecting
45
+ })));
46
+ }
47
+ /**
48
+ * The login action plus the state the login page renders (status/phase/error).
49
+ *
50
+ * @returns {object}
51
+ */
52
+ export function useLogin() {
53
+ const store = useAuthStore();
54
+ const login = useStore(store, state => state.login);
55
+ const { status, phase, error } = useStore(store, useShallow(state => ({
56
+ status: state.status,
57
+ phase: state.phase,
58
+ error: state.error
59
+ })));
60
+ return { login, status, phase, error };
61
+ }
62
+ /**
63
+ * The logout action.
64
+ *
65
+ * @returns {() => Promise<void>}
66
+ */
67
+ export function useLogout() {
68
+ const store = useAuthStore();
69
+ return useStore(store, state => state.logout);
70
+ }
71
+ /**
72
+ * The expired-access reconnect: the banner flags plus the reconnect action.
73
+ *
74
+ * @returns {object}
75
+ */
76
+ export function useReconnect() {
77
+ const store = useAuthStore();
78
+ const reconnect = useStore(store, state => state.reconnect);
79
+ const { accessExpired, reconnecting } = useStore(store, useShallow(state => ({
80
+ accessExpired: state.accessExpired,
81
+ reconnecting: state.reconnecting
82
+ })));
83
+ return { accessExpired, reconnecting, reconnect };
84
+ }
85
+ /**
86
+ * The aggregate sync status over the per-collection replication statuses. With
87
+ * no replication running (offline / local-only) it reports `offline`; otherwise
88
+ * it rolls the collection states up to error > syncing > synced.
89
+ *
90
+ * @returns {{ state: SyncRollup, label: string, title: string }}
91
+ */
92
+ export function useSyncStatus() {
93
+ const values = useSyncStatusStore(useShallow(state => Object.values(state.statuses)));
94
+ if (values.length === 0) {
95
+ return {
96
+ state: 'offline',
97
+ label: 'Offline',
98
+ title: 'Local-only mode -- no storage sync running'
99
+ };
100
+ }
101
+ if (values.includes('error')) {
102
+ return {
103
+ state: 'error',
104
+ label: 'Sync error',
105
+ title: 'A collection failed to sync; retrying'
106
+ };
107
+ }
108
+ if (values.includes('syncing') || values.includes('idle')) {
109
+ return {
110
+ state: 'syncing',
111
+ label: 'Syncing',
112
+ title: 'Replicating with your wallet storage'
113
+ };
114
+ }
115
+ return {
116
+ state: 'synced',
117
+ label: 'Synced',
118
+ title: 'All collections replicated'
119
+ };
120
+ }
121
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The React layer: the session provider plus the hooks over the bound store.
6
+ * Framework-only (no MUI / router); the optional MUI components live under the
7
+ * `./mui` subpath.
8
+ */
9
+ export { WasSessionProvider, WasSessionContext } from './WasSessionProvider.js';
10
+ export { useAuthStore, useSession, useLogin, useLogout, useReconnect, useSyncStatus, useAppReady, type SyncRollup } from './hooks.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,KAAK,UAAU,EAChB,MAAM,YAAY,CAAA"}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The React layer: the session provider plus the hooks over the bound store.
6
+ * Framework-only (no MUI / router); the optional MUI components live under the
7
+ * `./mui` subpath.
8
+ */
9
+ export { WasSessionProvider, WasSessionContext } from './WasSessionProvider.js';
10
+ export { useAuthStore, useSession, useLogin, useLogout, useReconnect, useSyncStatus, useAppReady } from './hooks.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EAEZ,MAAM,YAAY,CAAA"}
@@ -0,0 +1,10 @@
1
+ interface AppReadyState {
2
+ ready: boolean;
3
+ error: string | null;
4
+ setReady: () => void;
5
+ setError: (message: string) => void;
6
+ reset: () => void;
7
+ }
8
+ export declare const useAppReady: import("zustand").UseBoundStore<import("zustand").StoreApi<AppReadyState>>;
9
+ export {};
10
+ //# sourceMappingURL=appReadyStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appReadyStore.d.ts","sourceRoot":"","sources":["../../src/session/appReadyStore.ts"],"names":[],"mappings":"AAeA,UAAU,aAAa;IACrB,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,eAAO,MAAM,WAAW,4EAMrB,CAAA"}