@dxos/react-client 0.8.3 → 0.8.4-main.2e9d522

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 (325) hide show
  1. package/.swc/plugins/v7_linux_x86_64_13.0.0/f45bdff002284d9e8f9ef3f0be909de12da36c049cbcf261ac78fc00abb09a2d +0 -0
  2. package/dist/lib/browser/{chunk-72QD3PXL.mjs → chunk-AAR7V3KL.mjs} +14 -14
  3. package/dist/lib/browser/{chunk-AL2CUQ46.mjs → chunk-O5SEVDJG.mjs} +4 -4
  4. package/dist/lib/browser/devtools/index.mjs +5 -5
  5. package/dist/lib/browser/echo/index.mjs +15 -15
  6. package/dist/lib/browser/echo/index.mjs.map +3 -3
  7. package/dist/lib/browser/halo/index.mjs +9 -9
  8. package/dist/lib/browser/index.mjs +2 -2
  9. package/dist/lib/browser/invitations/index.mjs +1 -1
  10. package/dist/lib/browser/mesh/index.mjs +3 -3
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/testing/index.mjs +6 -6
  13. package/dist/lib/browser/worker.mjs +1 -1
  14. package/dist/lib/node-esm/{chunk-UYJUBYMU.mjs → chunk-TU2JJLZK.mjs} +4 -4
  15. package/dist/lib/node-esm/{chunk-NBTZZNQ5.mjs → chunk-ZTD6HPV2.mjs} +14 -14
  16. package/dist/lib/node-esm/devtools/index.mjs +5 -5
  17. package/dist/lib/node-esm/echo/index.mjs +15 -15
  18. package/dist/lib/node-esm/echo/index.mjs.map +3 -3
  19. package/dist/lib/node-esm/halo/index.mjs +9 -9
  20. package/dist/lib/node-esm/index.mjs +2 -2
  21. package/dist/lib/node-esm/invitations/index.mjs +1 -1
  22. package/dist/lib/node-esm/mesh/index.mjs +3 -3
  23. package/dist/lib/node-esm/meta.json +1 -1
  24. package/dist/lib/node-esm/testing/index.mjs +6 -6
  25. package/dist/lib/node-esm/worker.mjs +1 -1
  26. package/dist/types/src/playwright/{playwright.config.d.cts → playwright.config.d.ts} +1 -1
  27. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
  28. package/dist/types/tsconfig.tsbuildinfo +1 -1
  29. package/moon.yml +19 -0
  30. package/package.json +25 -25
  31. package/src/echo/useSyncState.ts +2 -2
  32. package/src/playwright/playwright.config.ts +17 -0
  33. package/src/playwright/smoke.spec.ts +4 -6
  34. package/vitest.config.ts +1 -1
  35. package/.eslintrc.cjs +0 -12
  36. package/README.yml +0 -33
  37. package/dist/lib/node/chunk-5RUIFUEC.cjs +0 -334
  38. package/dist/lib/node/chunk-5RUIFUEC.cjs.map +0 -7
  39. package/dist/lib/node/chunk-FYOAVV65.cjs +0 -188
  40. package/dist/lib/node/chunk-FYOAVV65.cjs.map +0 -7
  41. package/dist/lib/node/devtools/index.cjs +0 -62
  42. package/dist/lib/node/devtools/index.cjs.map +0 -7
  43. package/dist/lib/node/echo/index.cjs +0 -302
  44. package/dist/lib/node/echo/index.cjs.map +0 -7
  45. package/dist/lib/node/halo/index.cjs +0 -123
  46. package/dist/lib/node/halo/index.cjs.map +0 -7
  47. package/dist/lib/node/index.cjs +0 -55
  48. package/dist/lib/node/index.cjs.map +0 -7
  49. package/dist/lib/node/invitations/index.cjs +0 -39
  50. package/dist/lib/node/invitations/index.cjs.map +0 -7
  51. package/dist/lib/node/mesh/index.cjs +0 -37
  52. package/dist/lib/node/mesh/index.cjs.map +0 -7
  53. package/dist/lib/node/meta.json +0 -1
  54. package/dist/lib/node/testing/index.cjs +0 -278
  55. package/dist/lib/node/testing/index.cjs.map +0 -7
  56. package/dist/lib/node/worker.cjs +0 -23
  57. package/dist/lib/node/worker.cjs.map +0 -7
  58. package/dist/types/src/playwright/playwright.config.d.cts.map +0 -1
  59. package/project.json +0 -40
  60. package/src/playwright/playwright.config.cts +0 -18
  61. package/typedoc/.nojekyll +0 -1
  62. package/typedoc/assets/hierarchy.js +0 -1
  63. package/typedoc/assets/highlight.css +0 -99
  64. package/typedoc/assets/icons.js +0 -18
  65. package/typedoc/assets/icons.svg +0 -1
  66. package/typedoc/assets/main.js +0 -60
  67. package/typedoc/assets/navigation.js +0 -1
  68. package/typedoc/assets/search.js +0 -1
  69. package/typedoc/assets/style.css +0 -1640
  70. package/typedoc/classes/echo.Hypergraph.html +0 -17
  71. package/typedoc/classes/echo.PropertiesType.html +0 -19
  72. package/typedoc/classes/echo.QueryResult.html +0 -18
  73. package/typedoc/classes/halo.KeyStore.html +0 -6
  74. package/typedoc/classes/index.AgentClientServiceProvider.html +0 -10
  75. package/typedoc/classes/index.AgentManagerClient.html +0 -22
  76. package/typedoc/classes/index.AlreadyJoinedError.html +0 -15
  77. package/typedoc/classes/index.ApiError.html +0 -16
  78. package/typedoc/classes/index.CancelledError.html +0 -16
  79. package/typedoc/classes/index.Client.html +0 -51
  80. package/typedoc/classes/index.ClientServicesProxy.html +0 -12
  81. package/typedoc/classes/index.Config.html +0 -17
  82. package/typedoc/classes/index.DataCorruptionError.html +0 -16
  83. package/typedoc/classes/index.DatabaseError.html +0 -15
  84. package/typedoc/classes/index.EntityNotFoundError.html +0 -15
  85. package/typedoc/classes/index.FakeAgentHostingProvider.html +0 -7
  86. package/typedoc/classes/index.IFrameManager.html +0 -6
  87. package/typedoc/classes/index.IdentityNotInitializedError.html +0 -15
  88. package/typedoc/classes/index.InvalidConfigError.html +0 -16
  89. package/typedoc/classes/index.InvalidInvitationError.html +0 -15
  90. package/typedoc/classes/index.InvalidInvitationExtensionRoleError.html +0 -16
  91. package/typedoc/classes/index.InvalidStorageVersionError.html +0 -15
  92. package/typedoc/classes/index.LocalClientServices.html +0 -12
  93. package/typedoc/classes/index.PublicKey.html +0 -55
  94. package/typedoc/classes/index.RemoteServiceConnectionError.html +0 -15
  95. package/typedoc/classes/index.RemoteServiceConnectionTimeout.html +0 -15
  96. package/typedoc/classes/index.RpcClosedError.html +0 -15
  97. package/typedoc/classes/index.RpcNotOpenError.html +0 -15
  98. package/typedoc/classes/index.SharedWorkerConnection.html +0 -5
  99. package/typedoc/classes/index.Shell.html +0 -35
  100. package/typedoc/classes/index.ShellManager.html +0 -9
  101. package/typedoc/classes/index.SystemError.html +0 -16
  102. package/typedoc/classes/index.UnknownModelError.html +0 -15
  103. package/typedoc/classes/index.WorkerClientServices.html +0 -12
  104. package/typedoc/classes/invitations.AuthenticatingInvitationObservable.html +0 -30
  105. package/typedoc/classes/invitations.CancellableInvitationObservable.html +0 -29
  106. package/typedoc/classes/invitations.InvitationEncoder.html +0 -5
  107. package/typedoc/classes/invitations.InvitationsProxy.html +0 -12
  108. package/typedoc/enums/devtools.KeyType.html +0 -9
  109. package/typedoc/enums/echo.HaloSpaceMember.Role.html +0 -9
  110. package/typedoc/enums/echo.IndexKind.Kind.html +0 -8
  111. package/typedoc/enums/echo.QueryOptions.DataLocation.html +0 -6
  112. package/typedoc/enums/echo.QueryOptions.ShowDeletedOption.html +0 -6
  113. package/typedoc/enums/echo.ResultFormat.html +0 -10
  114. package/typedoc/enums/echo.SpaceMember.PresenceState.html +0 -5
  115. package/typedoc/enums/echo.SpaceState.html +0 -13
  116. package/typedoc/enums/echo.TextKind.html +0 -5
  117. package/typedoc/enums/halo.Device.PresenceState.html +0 -6
  118. package/typedoc/enums/halo.DeviceKind.html +0 -5
  119. package/typedoc/enums/halo.DeviceType.html +0 -9
  120. package/typedoc/enums/index.ShellDisplay.html +0 -5
  121. package/typedoc/enums/index.ShellLayout.html +0 -13
  122. package/typedoc/enums/index.SystemStatus.html +0 -5
  123. package/typedoc/enums/invitations.Invitation.AuthMethod.html +0 -6
  124. package/typedoc/enums/invitations.Invitation.Kind.html +0 -5
  125. package/typedoc/enums/invitations.Invitation.State.html +0 -13
  126. package/typedoc/enums/invitations.Invitation.Type.html +0 -6
  127. package/typedoc/enums/mesh.ConnectionState.html +0 -5
  128. package/typedoc/functions/devtools.useDevtools.html +0 -1
  129. package/typedoc/functions/devtools.useStream.html +0 -2
  130. package/typedoc/functions/echo.useMembers.html +0 -1
  131. package/typedoc/functions/echo.useQueue.html +0 -2
  132. package/typedoc/functions/echo.useSchema.html +0 -2
  133. package/typedoc/functions/echo.useSpace.html +0 -6
  134. package/typedoc/functions/echo.useSpaceInvitation.html +0 -1
  135. package/typedoc/functions/echo.useSpaceInvitations.html +0 -1
  136. package/typedoc/functions/echo.useSpaceSyncState.html +0 -2
  137. package/typedoc/functions/echo.useSpaces.html +0 -5
  138. package/typedoc/functions/echo.useSubscription.html +0 -3
  139. package/typedoc/functions/echo.useSyncState.html +0 -2
  140. package/typedoc/functions/halo.useContacts.html +0 -4
  141. package/typedoc/functions/halo.useCredentials.html +0 -1
  142. package/typedoc/functions/halo.useDevices.html +0 -1
  143. package/typedoc/functions/halo.useHaloInvitation.html +0 -1
  144. package/typedoc/functions/halo.useHaloInvitations.html +0 -1
  145. package/typedoc/functions/halo.useIdentity.html +0 -3
  146. package/typedoc/functions/halo.useKeyStore.html +0 -3
  147. package/typedoc/functions/index.AgentHostingProvider.html +0 -2
  148. package/typedoc/functions/index.useAgentHostingClient.html +0 -1
  149. package/typedoc/functions/index.useClient.html +0 -3
  150. package/typedoc/functions/index.useClientStatus.html +0 -1
  151. package/typedoc/functions/index.useConfig.html +0 -3
  152. package/typedoc/functions/index.useShell.html +0 -2
  153. package/typedoc/functions/index.useShellDisplay.html +0 -2
  154. package/typedoc/functions/index.useStatus.html +0 -1
  155. package/typedoc/functions/invitations.useInvitationStatus.html +0 -1
  156. package/typedoc/functions/mesh.useNetworkStatus.html +0 -2
  157. package/typedoc/hierarchy.html +0 -1
  158. package/typedoc/index.html +0 -23
  159. package/typedoc/interfaces/devtools.DevtoolsHook.html +0 -22
  160. package/typedoc/interfaces/devtools.DevtoolsHost.html +0 -26
  161. package/typedoc/interfaces/echo.DocAccessor.html +0 -3
  162. package/typedoc/interfaces/echo.Echo.html +0 -39
  163. package/typedoc/interfaces/echo.EchoDatabase.html +0 -25
  164. package/typedoc/interfaces/echo.Expando.html +0 -3
  165. package/typedoc/interfaces/echo.Filter.html +0 -3
  166. package/typedoc/interfaces/echo.HaloSpaceMember.html +0 -18
  167. package/typedoc/interfaces/echo.IDocHandle.html +0 -6
  168. package/typedoc/interfaces/echo.IndexKind.html +0 -9
  169. package/typedoc/interfaces/echo.Query.html +0 -34
  170. package/typedoc/interfaces/echo.QueryOptions.html +0 -39
  171. package/typedoc/interfaces/echo.Queue.html +0 -17
  172. package/typedoc/interfaces/echo.Ref.html +0 -32
  173. package/typedoc/interfaces/echo.Space.html +0 -39
  174. package/typedoc/interfaces/echo.SpaceMember.html +0 -7
  175. package/typedoc/interfaces/echo.SpaceSyncState.PeerState.html +0 -14
  176. package/typedoc/interfaces/echo.SpaceSyncState.html +0 -4
  177. package/typedoc/interfaces/echo.SubscriptionHandle.html +0 -5
  178. package/typedoc/interfaces/echo.TypedObject.html +0 -16
  179. package/typedoc/interfaces/halo.Contact.html +0 -10
  180. package/typedoc/interfaces/halo.Credential.html +0 -27
  181. package/typedoc/interfaces/halo.Device.html +0 -11
  182. package/typedoc/interfaces/halo.Halo.html +0 -16
  183. package/typedoc/interfaces/halo.Identity.html +0 -15
  184. package/typedoc/interfaces/index.AgentHostingProviderClient.html +0 -6
  185. package/typedoc/interfaces/index.AppContextRequest.html +0 -33
  186. package/typedoc/interfaces/index.ClientServicesProvider.html +0 -9
  187. package/typedoc/interfaces/index.InvitationUrlRequest.html +0 -9
  188. package/typedoc/interfaces/index.LayoutRequest.html +0 -29
  189. package/typedoc/interfaces/index.ShellRuntime.html +0 -15
  190. package/typedoc/interfaces/invitations.Invitation.html +0 -92
  191. package/typedoc/interfaces/invitations.Invitations.html +0 -5
  192. package/typedoc/interfaces/mesh.GossipMessage.html +0 -10
  193. package/typedoc/interfaces/mesh.NetworkStatus.Signal.html +0 -5
  194. package/typedoc/interfaces/mesh.NetworkStatus.html +0 -6
  195. package/typedoc/media/LICENSE +0 -8
  196. package/typedoc/modules/devtools.html +0 -1
  197. package/typedoc/modules/echo.Filter.html +0 -1
  198. package/typedoc/modules/echo.HaloSpaceMember.html +0 -1
  199. package/typedoc/modules/echo.IndexKind.html +0 -1
  200. package/typedoc/modules/echo.Query.html +0 -1
  201. package/typedoc/modules/echo.QueryOptions.html +0 -1
  202. package/typedoc/modules/echo.Ref.html +0 -2
  203. package/typedoc/modules/echo.SpaceMember.html +0 -1
  204. package/typedoc/modules/echo.SpaceSyncState.html +0 -1
  205. package/typedoc/modules/echo.html +0 -1
  206. package/typedoc/modules/halo.Device.html +0 -1
  207. package/typedoc/modules/halo.html +0 -1
  208. package/typedoc/modules/index.html +0 -1
  209. package/typedoc/modules/invitations.Invitation.html +0 -1
  210. package/typedoc/modules/invitations.html +0 -1
  211. package/typedoc/modules/mesh.NetworkStatus.html +0 -1
  212. package/typedoc/modules/mesh.html +0 -1
  213. package/typedoc/modules/worker.html +0 -1
  214. package/typedoc/modules.html +0 -1
  215. package/typedoc/types/devtools.MountOptions.html +0 -3
  216. package/typedoc/types/echo.AnyLiveObject.html +0 -2
  217. package/typedoc/types/echo.Filter.And.html +0 -1
  218. package/typedoc/types/echo.Filter.Any.html +0 -1
  219. package/typedoc/types/echo.Filter.Or.html +0 -1
  220. package/typedoc/types/echo.Filter.Props.html +0 -1
  221. package/typedoc/types/echo.Filter.Type.html +0 -1
  222. package/typedoc/types/echo.Live.html +0 -5
  223. package/typedoc/types/echo.ObjectMeta.html +0 -1
  224. package/typedoc/types/echo.ObjectMigration.html +0 -7
  225. package/typedoc/types/echo.ObjectVersion.html +0 -2
  226. package/typedoc/types/echo.PeerSyncState.html +0 -1
  227. package/typedoc/types/echo.Progress.html +0 -3
  228. package/typedoc/types/echo.PropertiesTypeProps.html +0 -1
  229. package/typedoc/types/echo.Query.Any.html +0 -1
  230. package/typedoc/types/echo.Query.TextSearchOptions.html +0 -2
  231. package/typedoc/types/echo.Query.Type.html +0 -1
  232. package/typedoc/types/echo.Ref.Target.html +0 -2
  233. package/typedoc/types/echo.Selection.html +0 -1
  234. package/typedoc/types/echo.SpaceId.html +0 -6
  235. package/typedoc/types/echo.SpaceSyncStateMap.html +0 -1
  236. package/typedoc/types/echo.UseQueueOptions.html +0 -2
  237. package/typedoc/types/echo.UseSpacesParams.html +0 -3
  238. package/typedoc/types/index.AgentHostingProviderProps.html +0 -3
  239. package/typedoc/types/index.ClientContextProps.html +0 -3
  240. package/typedoc/types/index.ClientOptions.html +0 -12
  241. package/typedoc/types/index.ClientProviderProps.html +0 -2
  242. package/typedoc/types/index.ClientServices.html +0 -15
  243. package/typedoc/types/index.FromAgentOptions.html +0 -2
  244. package/typedoc/types/index.PublicKeyLike.html +0 -2
  245. package/typedoc/types/invitations.InvitationAction.html +0 -1
  246. package/typedoc/types/invitations.InvitationResult.html +0 -5
  247. package/typedoc/types/invitations.InvitationStatus.html +0 -15
  248. package/typedoc/variables/devtools.mountDevtoolsHooks.html +0 -1
  249. package/typedoc/variables/devtools.unmountDevtoolsHooks.html +0 -1
  250. package/typedoc/variables/echo.DocAccessor.html +0 -1
  251. package/typedoc/variables/echo.EchoObjectSchema.html +0 -1
  252. package/typedoc/variables/echo.Expando.html +0 -1
  253. package/typedoc/variables/echo.FQ_ID_LENGTH.html +0 -1
  254. package/typedoc/variables/echo.Filter.html +0 -1
  255. package/typedoc/variables/echo.OBJECT_ID_LENGTH.html +0 -1
  256. package/typedoc/variables/echo.ObjectVersion.html +0 -1
  257. package/typedoc/variables/echo.Query.html +0 -1
  258. package/typedoc/variables/echo.Queue.html +0 -1
  259. package/typedoc/variables/echo.ReactiveObjectSchema.html +0 -1
  260. package/typedoc/variables/echo.Ref.html +0 -2
  261. package/typedoc/variables/echo.RefArray.html +0 -2
  262. package/typedoc/variables/echo.SPACE_ID_LENGTH.html +0 -1
  263. package/typedoc/variables/echo.SpaceId.html +0 -1
  264. package/typedoc/variables/echo.SpaceSchema.html +0 -1
  265. package/typedoc/variables/echo.TypedObject.html +0 -3
  266. package/typedoc/variables/echo.compareForeignKeys.html +0 -1
  267. package/typedoc/variables/echo.createDocAccessor.html +0 -1
  268. package/typedoc/variables/echo.createEmptyEdgeSyncState.html +0 -1
  269. package/typedoc/variables/echo.createObject.html +0 -1
  270. package/typedoc/variables/echo.createQueueDXN.html +0 -2
  271. package/typedoc/variables/echo.createSubscription.html +0 -5
  272. package/typedoc/variables/echo.defineObjectMigration.html +0 -1
  273. package/typedoc/variables/echo.fromCursor.html +0 -1
  274. package/typedoc/variables/echo.fullyQualifiedId.html +0 -4
  275. package/typedoc/variables/echo.getMeta.html +0 -1
  276. package/typedoc/variables/echo.getObjectCore.html +0 -1
  277. package/typedoc/variables/echo.getRangeFromCursor.html +0 -1
  278. package/typedoc/variables/echo.getSchema.html +0 -2
  279. package/typedoc/variables/echo.getSource.html +0 -4
  280. package/typedoc/variables/echo.getSpace.html +0 -1
  281. package/typedoc/variables/echo.getSyncSummary.html +0 -1
  282. package/typedoc/variables/echo.getTarget.html +0 -4
  283. package/typedoc/variables/echo.getTextInRange.html +0 -2
  284. package/typedoc/variables/echo.getType.html +0 -5
  285. package/typedoc/variables/echo.getTypename.html +0 -6
  286. package/typedoc/variables/echo.getVersion.html +0 -3
  287. package/typedoc/variables/echo.importSpace.html +0 -1
  288. package/typedoc/variables/echo.internalDecodeReference.html +0 -1
  289. package/typedoc/variables/echo.isEchoObject.html +0 -2
  290. package/typedoc/variables/echo.isLiveObject.html +0 -2
  291. package/typedoc/variables/echo.isRelation.html +0 -2
  292. package/typedoc/variables/echo.isSpace.html +0 -1
  293. package/typedoc/variables/echo.live.html +0 -3
  294. package/typedoc/variables/echo.loadObjectReferences.html +0 -7
  295. package/typedoc/variables/echo.makeRef.html +0 -2
  296. package/typedoc/variables/echo.parseFullyQualifiedId.html +0 -2
  297. package/typedoc/variables/echo.parseId.html +0 -1
  298. package/typedoc/variables/echo.refFromDXN.html +0 -2
  299. package/typedoc/variables/echo.toCursor.html +0 -1
  300. package/typedoc/variables/echo.toCursorRange.html +0 -1
  301. package/typedoc/variables/echo.updateText.html +0 -6
  302. package/typedoc/variables/echo.useQuery.html +0 -2
  303. package/typedoc/variables/index.AgentHostingContext.html +0 -1
  304. package/typedoc/variables/index.ClientProvider.html +0 -3
  305. package/typedoc/variables/index.DXOS_VERSION.html +0 -1
  306. package/typedoc/variables/index.Defaults.html +0 -2
  307. package/typedoc/variables/index.Dynamics.html +0 -2
  308. package/typedoc/variables/index.Envs.html +0 -2
  309. package/typedoc/variables/index.Local.html +0 -2
  310. package/typedoc/variables/index.Remote.html +0 -1
  311. package/typedoc/variables/index.Storage.html +0 -2
  312. package/typedoc/variables/index.createClientServices.html +0 -4
  313. package/typedoc/variables/index.fromAgent.html +0 -2
  314. package/typedoc/variables/index.fromHost.html +0 -2
  315. package/typedoc/variables/index.fromSocket.html +0 -2
  316. package/typedoc/variables/index.fromWorker.html +0 -2
  317. package/typedoc/variables/index.getUnixSocket.html +0 -1
  318. package/typedoc/variables/index.resolveRef.html +0 -1
  319. package/typedoc/variables/index.useMulticastObservable.html +0 -3
  320. package/typedoc/variables/worker.getWorkerServiceHost.html +0 -1
  321. package/typedoc/variables/worker.onconnect.html +0 -1
  322. /package/dist/lib/browser/{chunk-72QD3PXL.mjs.map → chunk-AAR7V3KL.mjs.map} +0 -0
  323. /package/dist/lib/browser/{chunk-AL2CUQ46.mjs.map → chunk-O5SEVDJG.mjs.map} +0 -0
  324. /package/dist/lib/node-esm/{chunk-UYJUBYMU.mjs.map → chunk-TU2JJLZK.mjs.map} +0 -0
  325. /package/dist/lib/node-esm/{chunk-NBTZZNQ5.mjs.map → chunk-ZTD6HPV2.mjs.map} +0 -0
@@ -1,9 +1,9 @@
1
- // packages/sdk/react-client/src/client/AgentHostingProvider.tsx
1
+ // src/client/AgentHostingProvider.tsx
2
2
  import React2, { createContext as createContext2, useContext as useContext4, useState as useState4 } from "react";
3
3
  import { AgentManagerClient, FakeAgentHostingProvider } from "@dxos/client";
4
4
  import { log as log2 } from "@dxos/log";
5
5
 
6
- // packages/sdk/react-client/src/client/ClientProvider.tsx
6
+ // src/client/ClientProvider.tsx
7
7
  import React, { forwardRef, useEffect, useImperativeHandle, useState } from "react";
8
8
  import { Client, SystemStatus } from "@dxos/client";
9
9
  import { registerSignalsRuntime } from "@dxos/echo-signals/react";
@@ -11,11 +11,11 @@ import { log } from "@dxos/log";
11
11
  import { useControlledState } from "@dxos/react-hooks";
12
12
  import { getAsyncProviderValue } from "@dxos/util";
13
13
 
14
- // packages/sdk/react-client/src/client/context.ts
14
+ // src/client/context.ts
15
15
  import { createContext } from "react";
16
16
  var ClientContext = createContext(void 0);
17
17
 
18
- // packages/sdk/react-client/src/banner.ts
18
+ // src/banner.ts
19
19
  var BANNER = (client) => {
20
20
  const commitHash = client.config.get("runtime.app.build.commitHash");
21
21
  const hash = commitHash ? ` App Commit ${commitHash}
@@ -39,8 +39,8 @@ var printBanner = (client) => {
39
39
  console.log(`%c${BANNER(client)}`, "font-family: monospace;");
40
40
  };
41
41
 
42
- // packages/sdk/react-client/src/client/ClientProvider.tsx
43
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/client/ClientProvider.tsx";
42
+ // src/client/ClientProvider.tsx
43
+ var __dxlog_file = "/__w/dxos/dxos/packages/sdk/react-client/src/client/ClientProvider.tsx";
44
44
  var ClientProvider = /* @__PURE__ */ forwardRef(({ children, config: configProvider, client: clientProvider, services: servicesProvider, status: controlledStatus, fallback: Fallback = () => null, signalsRuntime = true, noBanner, onInitialized, ...options }, forwardedRef) => {
45
45
  useEffect(() => {
46
46
  signalsRuntime && registerSignalsRuntime();
@@ -185,7 +185,7 @@ var ClientProvider = /* @__PURE__ */ forwardRef(({ children, config: configProvi
185
185
  }, children);
186
186
  });
187
187
 
188
- // packages/sdk/react-client/src/client/useClient.ts
188
+ // src/client/useClient.ts
189
189
  import { useContext } from "react";
190
190
  import { raise } from "@dxos/debug";
191
191
  var useClient = () => {
@@ -193,7 +193,7 @@ var useClient = () => {
193
193
  return client;
194
194
  };
195
195
 
196
- // packages/sdk/react-client/src/client/useClientStatus.ts
196
+ // src/client/useClientStatus.ts
197
197
  import { useEffect as useEffect2, useState as useState2 } from "react";
198
198
  var useClientStatus = (client) => {
199
199
  const [status, setStatus] = useState2();
@@ -210,7 +210,7 @@ var useClientStatus = (client) => {
210
210
  return status;
211
211
  };
212
212
 
213
- // packages/sdk/react-client/src/client/useConfig.ts
213
+ // src/client/useConfig.ts
214
214
  import { useContext as useContext2 } from "react";
215
215
  import { raise as raise2 } from "@dxos/debug";
216
216
  var useConfig = () => {
@@ -218,7 +218,7 @@ var useConfig = () => {
218
218
  return client.config;
219
219
  };
220
220
 
221
- // packages/sdk/react-client/src/client/useShell.ts
221
+ // src/client/useShell.ts
222
222
  import { useEffect as useEffect3, useState as useState3 } from "react";
223
223
  var useShell = () => {
224
224
  const client = useClient();
@@ -233,7 +233,7 @@ var useShellDisplay = () => {
233
233
  return display;
234
234
  };
235
235
 
236
- // packages/sdk/react-client/src/client/useStatus.ts
236
+ // src/client/useStatus.ts
237
237
  import { useContext as useContext3 } from "react";
238
238
  import { raise as raise3 } from "@dxos/debug";
239
239
  var useStatus = () => {
@@ -241,8 +241,8 @@ var useStatus = () => {
241
241
  return status;
242
242
  };
243
243
 
244
- // packages/sdk/react-client/src/client/AgentHostingProvider.tsx
245
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/client/AgentHostingProvider.tsx";
244
+ // src/client/AgentHostingProvider.tsx
245
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/sdk/react-client/src/client/AgentHostingProvider.tsx";
246
246
  var AgentHostingContext = /* @__PURE__ */ createContext2(null);
247
247
  var AgentHostingProvider = (props) => {
248
248
  const client = useClient();
@@ -309,4 +309,4 @@ export {
309
309
  useShellDisplay,
310
310
  useStatus
311
311
  };
312
- //# sourceMappingURL=chunk-72QD3PXL.mjs.map
312
+ //# sourceMappingURL=chunk-AAR7V3KL.mjs.map
@@ -1,11 +1,11 @@
1
- // packages/sdk/react-client/src/invitations/index.ts
1
+ // src/invitations/index.ts
2
2
  import { AuthenticatingInvitationObservable, CancellableInvitationObservable, InvitationEncoder as InvitationEncoder2, Invitation as Invitation2, InvitationsProxy } from "@dxos/client/invitations";
3
3
 
4
- // packages/sdk/react-client/src/invitations/useInvitationStatus.ts
4
+ // src/invitations/useInvitationStatus.ts
5
5
  import { useReducer, useMemo, useCallback, useEffect } from "react";
6
6
  import { Invitation, InvitationEncoder } from "@dxos/client/invitations";
7
7
  import { log } from "@dxos/log";
8
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts";
8
+ var __dxlog_file = "/__w/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts";
9
9
  var isShareableInvitation = (invitation) => invitation.authMethod !== Invitation.AuthMethod.KNOWN_PUBLIC_KEY || invitation.guestKeypair?.privateKey;
10
10
  var useInvitationStatus = (observable) => {
11
11
  const [state, dispatch] = useReducer((prev, action) => {
@@ -160,4 +160,4 @@ export {
160
160
  Invitation2 as Invitation,
161
161
  InvitationsProxy
162
162
  };
163
- //# sourceMappingURL=chunk-AL2CUQ46.mjs.map
163
+ //# sourceMappingURL=chunk-O5SEVDJG.mjs.map
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  useClient
3
- } from "../chunk-72QD3PXL.mjs";
3
+ } from "../chunk-AAR7V3KL.mjs";
4
4
 
5
- // packages/sdk/react-client/src/devtools/index.ts
5
+ // src/devtools/index.ts
6
6
  export * from "@dxos/client/devtools";
7
7
 
8
- // packages/sdk/react-client/src/devtools/useDevtools.ts
8
+ // src/devtools/useDevtools.ts
9
9
  import { raise } from "@dxos/debug";
10
10
  var useDevtools = () => {
11
11
  const client = useClient();
12
12
  return client.services.services.DevtoolsHost ?? raise(new Error("DevtoolsHost not available."));
13
13
  };
14
14
 
15
- // packages/sdk/react-client/src/devtools/useStream.ts
15
+ // src/devtools/useStream.ts
16
16
  import { useState, useEffect } from "react";
17
17
  import { log } from "@dxos/log";
18
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/devtools/useStream.ts";
18
+ var __dxlog_file = "/__w/dxos/dxos/packages/sdk/react-client/src/devtools/useStream.ts";
19
19
  var useStream = (streamFactory, defaultValue, deps = []) => {
20
20
  const [value, setValue] = useState(defaultValue);
21
21
  useEffect(() => {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  useInvitationStatus
3
- } from "../chunk-AL2CUQ46.mjs";
3
+ } from "../chunk-O5SEVDJG.mjs";
4
4
  import {
5
5
  useClient
6
- } from "../chunk-72QD3PXL.mjs";
6
+ } from "../chunk-AAR7V3KL.mjs";
7
7
 
8
- // packages/sdk/react-client/src/echo/index.ts
8
+ // src/echo/index.ts
9
9
  export * from "@dxos/client/echo";
10
10
 
11
- // packages/sdk/react-client/src/echo/useMembers.ts
11
+ // src/echo/useMembers.ts
12
12
  import { MulticastObservable } from "@dxos/async";
13
13
  import { HaloSpaceMember } from "@dxos/client/echo";
14
14
  import { useMulticastObservable as useMulticastObservable2 } from "@dxos/react-hooks";
15
15
 
16
- // packages/sdk/react-client/src/echo/useSpaces.ts
16
+ // src/echo/useSpaces.ts
17
17
  import { useEffect, useState } from "react";
18
18
  import { SpaceState } from "@dxos/client/echo";
19
19
  import { useMulticastObservable } from "@dxos/react-hooks";
@@ -47,7 +47,7 @@ var useSpaces = ({ all = false } = {}) => {
47
47
  return spaces.filter((space) => all || space.state.get() === SpaceState.SPACE_READY);
48
48
  };
49
49
 
50
- // packages/sdk/react-client/src/echo/useMembers.ts
50
+ // src/echo/useMembers.ts
51
51
  var useMembers = (spaceKey) => {
52
52
  const spaces = useSpaces({
53
53
  all: true
@@ -57,7 +57,7 @@ var useMembers = (spaceKey) => {
57
57
  return members.filter((member) => member.role !== HaloSpaceMember.Role.REMOVED);
58
58
  };
59
59
 
60
- // packages/sdk/react-client/src/echo/useQuery.ts
60
+ // src/echo/useQuery.ts
61
61
  import { useMemo, useSyncExternalStore } from "react";
62
62
  import { Filter, Query, isSpace } from "@dxos/client/echo";
63
63
  var EMPTY_ARRAY = [];
@@ -88,7 +88,7 @@ var useQuery = (spaceOrEcho, queryOrFilter, deps) => {
88
88
  return objects ?? [];
89
89
  };
90
90
 
91
- // packages/sdk/react-client/src/echo/useQueue.ts
91
+ // src/echo/useQueue.ts
92
92
  import { useEffect as useEffect2, useMemo as useMemo2, useRef } from "react";
93
93
  import { raise } from "@dxos/debug";
94
94
  var MIN_POLL_INTERVAL = 1e3;
@@ -137,7 +137,7 @@ var useQueue = (queueDxn, options = {}) => {
137
137
  return queue;
138
138
  };
139
139
 
140
- // packages/sdk/react-client/src/echo/useSchema.ts
140
+ // src/echo/useSchema.ts
141
141
  import { useMemo as useMemo3, useSyncExternalStore as useSyncExternalStore2 } from "react";
142
142
  var useSchema = (client, space, typename) => {
143
143
  const { subscribe, getSchema } = useMemo3(() => {
@@ -178,7 +178,7 @@ var useSchema = (client, space, typename) => {
178
178
  return useSyncExternalStore2(subscribe, getSchema);
179
179
  };
180
180
 
181
- // packages/sdk/react-client/src/echo/useSpaceInvitations.ts
181
+ // src/echo/useSpaceInvitations.ts
182
182
  import { useMemo as useMemo4 } from "react";
183
183
  import { MulticastObservable as MulticastObservable2 } from "@dxos/async";
184
184
  import { useMulticastObservable as useMulticastObservable3 } from "@dxos/react-hooks";
@@ -194,7 +194,7 @@ var useSpaceInvitation = (spaceKey, invitationId) => {
194
194
  return useInvitationStatus(invitation);
195
195
  };
196
196
 
197
- // packages/sdk/react-client/src/echo/useSubscription.ts
197
+ // src/echo/useSubscription.ts
198
198
  import { useEffect as useEffect3, useRef as useRef2 } from "react";
199
199
  import { createSubscription } from "@dxos/client/echo";
200
200
  var useSubscription = (cb, selection) => {
@@ -211,11 +211,11 @@ var useSubscription = (cb, selection) => {
211
211
  return subscriptionRef.current;
212
212
  };
213
213
 
214
- // packages/sdk/react-client/src/echo/useSyncState.ts
214
+ // src/echo/useSyncState.ts
215
215
  import { useEffect as useEffect4, useState as useState2 } from "react";
216
216
  import { Context } from "@dxos/context";
217
217
  import { EdgeService } from "@dxos/protocols";
218
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/echo/useSyncState.ts";
218
+ var __dxlog_file = "/__w/dxos/dxos/packages/sdk/react-client/src/echo/useSyncState.ts";
219
219
  var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);
220
220
  var useSyncState = () => {
221
221
  const client = useClient();
@@ -230,7 +230,7 @@ var useSyncState = () => {
230
230
  if (spaceState[space.id]) {
231
231
  continue;
232
232
  }
233
- ctx.onDispose(space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
233
+ ctx.onDispose(space.db.subscribeToSyncState(ctx, ({ peers = [] }) => {
234
234
  const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));
235
235
  if (syncState) {
236
236
  setSpaceState((spaceState2) => ({
@@ -260,7 +260,7 @@ var useSpaceSyncState = (space) => {
260
260
  F: __dxlog_file,
261
261
  L: 64
262
262
  });
263
- space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
263
+ space.db.subscribeToSyncState(ctx, ({ peers = [] }) => {
264
264
  const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));
265
265
  if (syncState) {
266
266
  setSpaceState(syncState);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/echo/index.ts", "../../../../src/echo/useMembers.ts", "../../../../src/echo/useSpaces.ts", "../../../../src/echo/useQuery.ts", "../../../../src/echo/useQueue.ts", "../../../../src/echo/useSchema.ts", "../../../../src/echo/useSpaceInvitations.ts", "../../../../src/echo/useSubscription.ts", "../../../../src/echo/useSyncState.ts"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nexport * from '@dxos/client/echo';\n\nexport * from './useMembers';\nexport * from './useQuery';\nexport * from './useQueue';\nexport * from './useSchema';\nexport * from './useSpaces';\nexport * from './useSpaceInvitations';\nexport * from './useSubscription';\nexport * from './useSyncState';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { MulticastObservable } from '@dxos/async';\nimport { type PublicKey } from '@dxos/client';\nimport { HaloSpaceMember, type SpaceMember } from '@dxos/client/echo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useSpaces } from './useSpaces';\n\nexport const useMembers = (spaceKey: PublicKey | undefined): SpaceMember[] => {\n // TODO(dmaretskyi): useSpace hook for spaces that are not ready.\n const spaces = useSpaces({ all: true });\n const space = spaceKey ? spaces.find((space) => space.key.equals(spaceKey)) : undefined;\n\n // EMPTY_OBSERVABLE needs to be a stable reference to avoid re-subscribing on every render.\n const members = useMulticastObservable(space?.members ?? MulticastObservable.empty()) ?? [];\n return members.filter((member) => member.role !== HaloSpaceMember.Role.REMOVED);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type PublicKeyLike } from '@dxos/client';\nimport { type Space, SpaceState } from '@dxos/client/echo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\n/**\n * Get a specific Space using its key.\n * The space is not guaranteed to be in the ready state.\n * Returns the default space if no key is provided.\n * Requires a ClientProvider somewhere in the parent tree.\n *\n * @param spaceKeyLike the key of the space to look for\n */\nexport const useSpace = (spaceKeyLike?: PublicKeyLike): Space | undefined => {\n const client = useClient();\n const spaces = useMulticastObservable<Space[]>(client.spaces);\n const [ready, setReady] = useState(false);\n\n useEffect(() => {\n // Only wait for ready if looking for the default space.\n if (spaceKeyLike) {\n return;\n }\n\n const timeout = setTimeout(async () => {\n await client.spaces.waitUntilReady();\n setReady(true);\n });\n\n return () => clearTimeout(timeout);\n }, [client, spaceKeyLike]);\n\n if (spaceKeyLike) {\n return spaces.find((space) => space.key.equals(spaceKeyLike) || space.id === spaceKeyLike);\n }\n\n if (ready && client.halo.identity.get()) {\n return client.spaces.default;\n }\n};\n\nexport type UseSpacesParams = {\n /**\n * Return uninitialized spaces as well.\n */\n all?: boolean;\n};\n\n/**\n * Get all Spaces available to current user.\n * Requires a ClientProvider somewhere in the parent tree.\n * By default, only ready spaces are returned.\n * @returns an array of Spaces\n */\nexport const useSpaces = ({ all = false }: UseSpacesParams = {}): Space[] => {\n const client = useClient();\n const spaces = useMulticastObservable<Space[]>(client.spaces);\n\n // TODO(dmaretskyi): Array reference equality.\n return spaces.filter((space) => all || space.state.get() === SpaceState.SPACE_READY);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useMemo, useSyncExternalStore } from 'react';\n\nimport { type Echo, Filter, type Live, Query, type Space, isSpace } from '@dxos/client/echo';\n\nconst EMPTY_ARRAY: never[] = [];\n\nconst noop = () => {};\n\n// TODO(dmaretskyi): Queries are fully serializable, so we can remove `deps` argument.\ninterface UseQueryFn {\n <Q extends Query.Any>(spaceOrEcho: Space | Echo | undefined, query: Q, deps?: any[]): Live<Query.Type<Q>>[];\n\n <F extends Filter.Any>(spaceOrEcho: Space | Echo | undefined, filter: F, deps?: any[]): Live<Filter.Type<F>>[];\n}\n\n/**\n * Create subscription.\n */\nexport const useQuery: UseQueryFn = (\n spaceOrEcho: Space | Echo | undefined,\n queryOrFilter: Query.Any | Filter.Any,\n deps?: any[],\n): Live<unknown>[] => {\n const query = Filter.is(queryOrFilter) ? Query.select(queryOrFilter) : queryOrFilter;\n\n const { getObjects, subscribe } = useMemo(() => {\n let subscribed = false;\n const queryResult =\n spaceOrEcho === undefined\n ? undefined\n : isSpace(spaceOrEcho)\n ? spaceOrEcho.db.query(query)\n : spaceOrEcho.query(query);\n\n return {\n getObjects: () => (subscribed && queryResult ? queryResult.objects : EMPTY_ARRAY),\n subscribe: (cb: () => void) => {\n subscribed = true;\n const unsubscribe = queryResult?.subscribe(cb) ?? noop;\n return () => {\n unsubscribe?.();\n subscribed = false;\n };\n },\n };\n }, [spaceOrEcho, JSON.stringify(query.ast), ...(deps ?? [])]);\n\n // https://beta.reactjs.org/reference/react/useSyncExternalStore\n // NOTE: This hook will resubscribe whenever the callback passed to the first argument changes; make sure it is stable.\n const objects = useSyncExternalStore<Live<unknown>[] | undefined>(subscribe, getObjects);\n return objects ?? [];\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo, useRef } from 'react';\n\nimport { type Queue } from '@dxos/client/echo';\nimport { raise } from '@dxos/debug';\nimport { type Obj, type Relation } from '@dxos/echo';\nimport { type DXN } from '@dxos/keys';\n\nimport { useClient } from '../client';\n\nconst MIN_POLL_INTERVAL = 1_000;\n\nexport type UseQueueOptions = {\n pollInterval?: number;\n};\n\n/**\n * Polls the given Edge queue.\n */\n// TODO(burdon): Replace polling with socket?\n// TODO(dmaretskyi): Move into client package.\n// TODO(dmaretskyi): Consider passing the space into the hook to support queue DXNs without space id.\n// TODO(ZaymonFC): If queue is unchanged returned object should be refferentially stable on poll.\nexport const useQueue = <T extends Obj.Any | Relation.Any>(\n queueDxn?: DXN,\n options: UseQueueOptions = {},\n): Queue<T> | undefined => {\n const client = useClient();\n const mountedRef = useRef(true);\n\n const queue = useMemo<Queue<T> | undefined>(() => {\n if (!queueDxn) {\n return undefined;\n }\n\n const { spaceId } = queueDxn.asQueueDXN() ?? raise(new TypeError('Invalid queue DXN'));\n return client.spaces.get(spaceId)?.queues.get<T>(queueDxn);\n }, [client, queueDxn?.toString()]);\n\n useEffect(() => {\n void queue?.refresh();\n }, [queue]);\n\n useEffect(() => {\n let timeout: NodeJS.Timeout;\n mountedRef.current = true;\n\n const poll = () => {\n if (!mountedRef.current) {\n return;\n }\n\n void queue?.refresh().finally(() => {\n if (mountedRef.current && options.pollInterval) {\n timeout = setTimeout(poll, Math.max(options.pollInterval ?? 0, MIN_POLL_INTERVAL));\n }\n });\n };\n\n if (options.pollInterval) {\n poll();\n }\n\n return () => {\n mountedRef.current = false;\n clearTimeout(timeout);\n };\n }, [queue, options.pollInterval]);\n\n return queue;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\nimport { useMemo, useSyncExternalStore } from 'react';\n\nimport { type Client } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { type BaseSchema } from '@dxos/echo-schema';\n\n/**\n * Subscribe to and retrieve schema changes from a space's schema registry.\n */\nexport const useSchema = (\n client: Client,\n space: Space | undefined,\n typename: string | undefined,\n): Schema.Schema.AnyNoContext | undefined => {\n const { subscribe, getSchema } = useMemo(() => {\n if (!typename || !space) {\n return {\n subscribe: () => () => {},\n getSchema: () => undefined,\n };\n }\n\n const staticSchema = client.graph.schemaRegistry.getSchema(typename);\n if (staticSchema) {\n return {\n subscribe: () => () => {},\n getSchema: () => staticSchema,\n };\n }\n\n const query = space.db.schemaRegistry.query({ typename });\n const initialResult: BaseSchema = query.runSync()[0];\n let currentSchema = initialResult;\n\n return {\n subscribe: (onStoreChange: () => void) => {\n const unsubscribe = query.subscribe(() => {\n currentSchema = query.results[0];\n onStoreChange();\n });\n\n return unsubscribe;\n },\n getSchema: () => currentSchema,\n };\n }, [typename, space]);\n\n return useSyncExternalStore(subscribe, getSchema);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { MulticastObservable } from '@dxos/async';\nimport { type PublicKey } from '@dxos/client';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useSpace } from './useSpaces';\nimport { type CancellableInvitationObservable, useInvitationStatus } from '../invitations';\n\nexport const useSpaceInvitations = (spaceKey?: PublicKey): CancellableInvitationObservable[] => {\n const space = useSpace(spaceKey);\n return useMulticastObservable(space?.invitations ?? MulticastObservable.empty()) ?? [];\n};\n\nexport const useSpaceInvitation = (spaceKey?: PublicKey, invitationId?: string) => {\n const invitations = useSpaceInvitations(spaceKey);\n const invitation = useMemo(\n () => invitations.find((invitation) => invitation.get().invitationId === invitationId),\n [invitations],\n );\n return useInvitationStatus(invitation);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useEffect, useRef } from 'react';\n\nimport { type Selection, type SubscriptionHandle, createSubscription } from '@dxos/client/echo';\n\n/**\n * Create reactive selection.\n * Calls the callback when the selection changes and during the first render.\n */\n// TODO(wittjosiah): Is this still needed with signals reactivity? If not, remove or update jsdoc with usage info.\nexport const useSubscription = (cb: () => void, selection: Selection) => {\n // Make sure that the callback is always the one from the latest render.\n // Without this, we would always call the callback from the initial render,\n // which might contain stale data.\n const callbackRef = useRef(cb);\n callbackRef.current = cb;\n\n const subscriptionRef = useRef<SubscriptionHandle>();\n\n useEffect(() => {\n subscriptionRef.current = createSubscription(() => {\n callbackRef.current();\n });\n\n return () => subscriptionRef.current?.unsubscribe();\n }, []);\n\n subscriptionRef.current?.update(selection);\n return subscriptionRef.current;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type PeerSyncState, type SpaceSyncStateMap, type Space } from '@dxos/client/echo';\nimport { Context } from '@dxos/context';\nimport { type SpaceId } from '@dxos/keys';\nimport { EdgeService } from '@dxos/protocols';\n\nimport { useClient } from '../client';\n\nconst isEdgePeerId = (peerId: string, spaceId: SpaceId) =>\n peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);\n\n/**\n * Hook Subscribes to sync state for each space.\n */\nexport const useSyncState = (): SpaceSyncStateMap => {\n const client = useClient();\n const [spaceState, setSpaceState] = useState<SpaceSyncStateMap>({});\n\n useEffect(() => {\n const ctx = new Context();\n const createSubscriptions = (spaces: Space[]) => {\n for (const space of spaces) {\n if (spaceState[space.id]) {\n continue;\n }\n\n ctx.onDispose(\n space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {\n const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));\n if (syncState) {\n setSpaceState((spaceState) => ({ ...spaceState, [space.id]: syncState }));\n }\n }),\n );\n }\n };\n\n createSubscriptions(client.spaces.get());\n client.spaces.subscribe((spaces) => {\n createSubscriptions(spaces);\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [client]);\n\n return spaceState;\n};\n\n/**\n * Hook Subscribes to sync state for a single space.\n */\n// TODO(wittjosiah): Reconcile w/ useSyncState.\nexport const useSpaceSyncState = (space: Space): PeerSyncState | undefined => {\n const [spaceState, setSpaceState] = useState<PeerSyncState>();\n\n useEffect(() => {\n const ctx = new Context();\n space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {\n const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));\n if (syncState) {\n setSpaceState(syncState);\n }\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [space]);\n\n return spaceState;\n};\n"],
5
- "mappings": ";;;;;;;;AAIA,cAAc;;;ACAd,SAASA,2BAA2B;AAEpC,SAASC,uBAAyC;AAClD,SAASC,0BAAAA,+BAA8B;;;ACHvC,SAASC,WAAWC,gBAAgB;AAGpC,SAAqBC,kBAAkB;AACvC,SAASC,8BAA8B;AAYhC,IAAMC,WAAW,CAACC,iBAAAA;AACvB,QAAMC,SAASC,UAAAA;AACf,QAAMC,SAASC,uBAAgCH,OAAOE,MAAM;AAC5D,QAAM,CAACE,OAAOC,QAAAA,IAAYC,SAAS,KAAA;AAEnCC,YAAU,MAAA;AAER,QAAIR,cAAc;AAChB;IACF;AAEA,UAAMS,UAAUC,WAAW,YAAA;AACzB,YAAMT,OAAOE,OAAOQ,eAAc;AAClCL,eAAS,IAAA;IACX,CAAA;AAEA,WAAO,MAAMM,aAAaH,OAAAA;EAC5B,GAAG;IAACR;IAAQD;GAAa;AAEzB,MAAIA,cAAc;AAChB,WAAOG,OAAOU,KAAK,CAACC,UAAUA,MAAMC,IAAIC,OAAOhB,YAAAA,KAAiBc,MAAMG,OAAOjB,YAAAA;EAC/E;AAEA,MAAIK,SAASJ,OAAOiB,KAAKC,SAASC,IAAG,GAAI;AACvC,WAAOnB,OAAOE,OAAOkB;EACvB;AACF;AAeO,IAAMC,YAAY,CAAC,EAAEC,MAAM,MAAK,IAAsB,CAAC,MAAC;AAC7D,QAAMtB,SAASC,UAAAA;AACf,QAAMC,SAASC,uBAAgCH,OAAOE,MAAM;AAG5D,SAAOA,OAAOqB,OAAO,CAACV,UAAUS,OAAOT,MAAMW,MAAML,IA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AAO,MAAA;AACL,WAAKH,IAAIe,QAAO;IAClB;EACF,GAAG;IAACrB;GAAO;AAEX,SAAOE;AACT;AAMO,IAAMoB,oBAAoB,CAACZ,UAAAA;AAChC,QAAM,CAACR,YAAYC,aAAAA,IAAiBC,UAAAA;AAEpCC,EAAAA,WAAU,MAAA;AACR,UAAMC,MAAM,IAAIC,QAAAA,QAAAA;;;;AAChBG,UAAMG,KAAKC,qBAAqBR,KAAK,CAAC,EAAES,QAAQ,CAAA,EAAE,MAAE;AAClD,YAAMC,YAAYD,MAAME,KAAK,CAACC,UAAUzB,aAAayB,MAAMxB,QAAQgB,MAAMC,EAAE,CAAA;AAC3E,UAAIK,WAAW;AACbb,sBAAca,SAAAA;MAChB;IACF,CAAA;AAEA,WAAO,MAAA;AACL,WAAKV,IAAIe,QAAO;IAClB;EACF,GAAG;IAACX;GAAM;AAEV,SAAOR;AACT;",
6
- "names": ["MulticastObservable", "HaloSpaceMember", "useMulticastObservable", "useEffect", "useState", "SpaceState", "useMulticastObservable", "useSpace", "spaceKeyLike", "client", "useClient", "spaces", "useMulticastObservable", "ready", "setReady", "useState", "useEffect", "timeout", "setTimeout", "waitUntilReady", "clearTimeout", "find", "space", "key", "equals", "id", "halo", "identity", "get", "default", "useSpaces", "all", "filter", "state", "SpaceState", "SPACE_READY", "useMembers", "spaceKey", "spaces", "useSpaces", "all", "space", "find", "key", "equals", "undefined", "members", "useMulticastObservable", "MulticastObservable", "empty", "filter", "member", "role", "HaloSpaceMember", "Role", "REMOVED", "useMemo", "useSyncExternalStore", "Filter", "Query", "isSpace", "EMPTY_ARRAY", "noop", "useQuery", "spaceOrEcho", "queryOrFilter", "deps", "query", "Filter", "is", "Query", "select", "getObjects", "subscribe", "useMemo", "subscribed", "queryResult", "undefined", "isSpace", "db", "objects", "cb", "unsubscribe", "JSON", "stringify", "ast", "useSyncExternalStore", "useEffect", "useMemo", "useRef", "raise", "MIN_POLL_INTERVAL", "useQueue", "queueDxn", "options", "client", "useClient", "mountedRef", "useRef", "queue", "useMemo", "undefined", "spaceId", "asQueueDXN", "raise", "TypeError", "spaces", "get", "queues", "toString", "useEffect", "refresh", "timeout", "current", "poll", "finally", "pollInterval", "setTimeout", "Math", "max", "clearTimeout", "useMemo", "useSyncExternalStore", "useSchema", "client", "space", "typename", "subscribe", "getSchema", "useMemo", "undefined", "staticSchema", "graph", "schemaRegistry", "query", "db", "initialResult", "runSync", "currentSchema", "onStoreChange", "unsubscribe", "results", "useSyncExternalStore", "useMemo", "MulticastObservable", "useMulticastObservable", "useSpaceInvitations", "spaceKey", "space", "useSpace", "useMulticastObservable", "invitations", "MulticastObservable", "empty", "useSpaceInvitation", "invitationId", "invitation", "useMemo", "find", "get", "useInvitationStatus", "useEffect", "useRef", "createSubscription", "useSubscription", "cb", "selection", "callbackRef", "useRef", "current", "subscriptionRef", "useEffect", "createSubscription", "unsubscribe", "update", "useEffect", "useState", "Context", "EdgeService", "isEdgePeerId", "peerId", "spaceId", "startsWith", "EdgeService", "AUTOMERGE_REPLICATOR", "useSyncState", "client", "useClient", "spaceState", "setSpaceState", "useState", "useEffect", "ctx", "Context", "createSubscriptions", "spaces", "space", "id", "onDispose", "crud", "subscribeToSyncState", "peers", "syncState", "find", "state", "get", "subscribe", "dispose", "useSpaceSyncState"]
4
+ "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nexport * from '@dxos/client/echo';\n\nexport * from './useMembers';\nexport * from './useQuery';\nexport * from './useQueue';\nexport * from './useSchema';\nexport * from './useSpaces';\nexport * from './useSpaceInvitations';\nexport * from './useSubscription';\nexport * from './useSyncState';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { MulticastObservable } from '@dxos/async';\nimport { type PublicKey } from '@dxos/client';\nimport { HaloSpaceMember, type SpaceMember } from '@dxos/client/echo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useSpaces } from './useSpaces';\n\nexport const useMembers = (spaceKey: PublicKey | undefined): SpaceMember[] => {\n // TODO(dmaretskyi): useSpace hook for spaces that are not ready.\n const spaces = useSpaces({ all: true });\n const space = spaceKey ? spaces.find((space) => space.key.equals(spaceKey)) : undefined;\n\n // EMPTY_OBSERVABLE needs to be a stable reference to avoid re-subscribing on every render.\n const members = useMulticastObservable(space?.members ?? MulticastObservable.empty()) ?? [];\n return members.filter((member) => member.role !== HaloSpaceMember.Role.REMOVED);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type PublicKeyLike } from '@dxos/client';\nimport { type Space, SpaceState } from '@dxos/client/echo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\n/**\n * Get a specific Space using its key.\n * The space is not guaranteed to be in the ready state.\n * Returns the default space if no key is provided.\n * Requires a ClientProvider somewhere in the parent tree.\n *\n * @param spaceKeyLike the key of the space to look for\n */\nexport const useSpace = (spaceKeyLike?: PublicKeyLike): Space | undefined => {\n const client = useClient();\n const spaces = useMulticastObservable<Space[]>(client.spaces);\n const [ready, setReady] = useState(false);\n\n useEffect(() => {\n // Only wait for ready if looking for the default space.\n if (spaceKeyLike) {\n return;\n }\n\n const timeout = setTimeout(async () => {\n await client.spaces.waitUntilReady();\n setReady(true);\n });\n\n return () => clearTimeout(timeout);\n }, [client, spaceKeyLike]);\n\n if (spaceKeyLike) {\n return spaces.find((space) => space.key.equals(spaceKeyLike) || space.id === spaceKeyLike);\n }\n\n if (ready && client.halo.identity.get()) {\n return client.spaces.default;\n }\n};\n\nexport type UseSpacesParams = {\n /**\n * Return uninitialized spaces as well.\n */\n all?: boolean;\n};\n\n/**\n * Get all Spaces available to current user.\n * Requires a ClientProvider somewhere in the parent tree.\n * By default, only ready spaces are returned.\n * @returns an array of Spaces\n */\nexport const useSpaces = ({ all = false }: UseSpacesParams = {}): Space[] => {\n const client = useClient();\n const spaces = useMulticastObservable<Space[]>(client.spaces);\n\n // TODO(dmaretskyi): Array reference equality.\n return spaces.filter((space) => all || space.state.get() === SpaceState.SPACE_READY);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useMemo, useSyncExternalStore } from 'react';\n\nimport { type Echo, Filter, type Live, Query, type Space, isSpace } from '@dxos/client/echo';\n\nconst EMPTY_ARRAY: never[] = [];\n\nconst noop = () => {};\n\n// TODO(dmaretskyi): Queries are fully serializable, so we can remove `deps` argument.\ninterface UseQueryFn {\n <Q extends Query.Any>(spaceOrEcho: Space | Echo | undefined, query: Q, deps?: any[]): Live<Query.Type<Q>>[];\n\n <F extends Filter.Any>(spaceOrEcho: Space | Echo | undefined, filter: F, deps?: any[]): Live<Filter.Type<F>>[];\n}\n\n/**\n * Create subscription.\n */\nexport const useQuery: UseQueryFn = (\n spaceOrEcho: Space | Echo | undefined,\n queryOrFilter: Query.Any | Filter.Any,\n deps?: any[],\n): Live<unknown>[] => {\n const query = Filter.is(queryOrFilter) ? Query.select(queryOrFilter) : queryOrFilter;\n\n const { getObjects, subscribe } = useMemo(() => {\n let subscribed = false;\n const queryResult =\n spaceOrEcho === undefined\n ? undefined\n : isSpace(spaceOrEcho)\n ? spaceOrEcho.db.query(query)\n : spaceOrEcho.query(query);\n\n return {\n getObjects: () => (subscribed && queryResult ? queryResult.objects : EMPTY_ARRAY),\n subscribe: (cb: () => void) => {\n subscribed = true;\n const unsubscribe = queryResult?.subscribe(cb) ?? noop;\n return () => {\n unsubscribe?.();\n subscribed = false;\n };\n },\n };\n }, [spaceOrEcho, JSON.stringify(query.ast), ...(deps ?? [])]);\n\n // https://beta.reactjs.org/reference/react/useSyncExternalStore\n // NOTE: This hook will resubscribe whenever the callback passed to the first argument changes; make sure it is stable.\n const objects = useSyncExternalStore<Live<unknown>[] | undefined>(subscribe, getObjects);\n return objects ?? [];\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo, useRef } from 'react';\n\nimport { type Queue } from '@dxos/client/echo';\nimport { raise } from '@dxos/debug';\nimport { type Obj, type Relation } from '@dxos/echo';\nimport { type DXN } from '@dxos/keys';\n\nimport { useClient } from '../client';\n\nconst MIN_POLL_INTERVAL = 1_000;\n\nexport type UseQueueOptions = {\n pollInterval?: number;\n};\n\n/**\n * Polls the given Edge queue.\n */\n// TODO(burdon): Replace polling with socket?\n// TODO(dmaretskyi): Move into client package.\n// TODO(dmaretskyi): Consider passing the space into the hook to support queue DXNs without space id.\n// TODO(ZaymonFC): If queue is unchanged returned object should be refferentially stable on poll.\nexport const useQueue = <T extends Obj.Any | Relation.Any>(\n queueDxn?: DXN,\n options: UseQueueOptions = {},\n): Queue<T> | undefined => {\n const client = useClient();\n const mountedRef = useRef(true);\n\n const queue = useMemo<Queue<T> | undefined>(() => {\n if (!queueDxn) {\n return undefined;\n }\n\n const { spaceId } = queueDxn.asQueueDXN() ?? raise(new TypeError('Invalid queue DXN'));\n return client.spaces.get(spaceId)?.queues.get<T>(queueDxn);\n }, [client, queueDxn?.toString()]);\n\n useEffect(() => {\n void queue?.refresh();\n }, [queue]);\n\n useEffect(() => {\n let timeout: NodeJS.Timeout;\n mountedRef.current = true;\n\n const poll = () => {\n if (!mountedRef.current) {\n return;\n }\n\n void queue?.refresh().finally(() => {\n if (mountedRef.current && options.pollInterval) {\n timeout = setTimeout(poll, Math.max(options.pollInterval ?? 0, MIN_POLL_INTERVAL));\n }\n });\n };\n\n if (options.pollInterval) {\n poll();\n }\n\n return () => {\n mountedRef.current = false;\n clearTimeout(timeout);\n };\n }, [queue, options.pollInterval]);\n\n return queue;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\nimport { useMemo, useSyncExternalStore } from 'react';\n\nimport { type Client } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { type BaseSchema } from '@dxos/echo-schema';\n\n/**\n * Subscribe to and retrieve schema changes from a space's schema registry.\n */\nexport const useSchema = (\n client: Client,\n space: Space | undefined,\n typename: string | undefined,\n): Schema.Schema.AnyNoContext | undefined => {\n const { subscribe, getSchema } = useMemo(() => {\n if (!typename || !space) {\n return {\n subscribe: () => () => {},\n getSchema: () => undefined,\n };\n }\n\n const staticSchema = client.graph.schemaRegistry.getSchema(typename);\n if (staticSchema) {\n return {\n subscribe: () => () => {},\n getSchema: () => staticSchema,\n };\n }\n\n const query = space.db.schemaRegistry.query({ typename });\n const initialResult: BaseSchema = query.runSync()[0];\n let currentSchema = initialResult;\n\n return {\n subscribe: (onStoreChange: () => void) => {\n const unsubscribe = query.subscribe(() => {\n currentSchema = query.results[0];\n onStoreChange();\n });\n\n return unsubscribe;\n },\n getSchema: () => currentSchema,\n };\n }, [typename, space]);\n\n return useSyncExternalStore(subscribe, getSchema);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { MulticastObservable } from '@dxos/async';\nimport { type PublicKey } from '@dxos/client';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useSpace } from './useSpaces';\nimport { type CancellableInvitationObservable, useInvitationStatus } from '../invitations';\n\nexport const useSpaceInvitations = (spaceKey?: PublicKey): CancellableInvitationObservable[] => {\n const space = useSpace(spaceKey);\n return useMulticastObservable(space?.invitations ?? MulticastObservable.empty()) ?? [];\n};\n\nexport const useSpaceInvitation = (spaceKey?: PublicKey, invitationId?: string) => {\n const invitations = useSpaceInvitations(spaceKey);\n const invitation = useMemo(\n () => invitations.find((invitation) => invitation.get().invitationId === invitationId),\n [invitations],\n );\n return useInvitationStatus(invitation);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useEffect, useRef } from 'react';\n\nimport { type Selection, type SubscriptionHandle, createSubscription } from '@dxos/client/echo';\n\n/**\n * Create reactive selection.\n * Calls the callback when the selection changes and during the first render.\n */\n// TODO(wittjosiah): Is this still needed with signals reactivity? If not, remove or update jsdoc with usage info.\nexport const useSubscription = (cb: () => void, selection: Selection) => {\n // Make sure that the callback is always the one from the latest render.\n // Without this, we would always call the callback from the initial render,\n // which might contain stale data.\n const callbackRef = useRef(cb);\n callbackRef.current = cb;\n\n const subscriptionRef = useRef<SubscriptionHandle>();\n\n useEffect(() => {\n subscriptionRef.current = createSubscription(() => {\n callbackRef.current();\n });\n\n return () => subscriptionRef.current?.unsubscribe();\n }, []);\n\n subscriptionRef.current?.update(selection);\n return subscriptionRef.current;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type PeerSyncState, type SpaceSyncStateMap, type Space } from '@dxos/client/echo';\nimport { Context } from '@dxos/context';\nimport { type SpaceId } from '@dxos/keys';\nimport { EdgeService } from '@dxos/protocols';\n\nimport { useClient } from '../client';\n\nconst isEdgePeerId = (peerId: string, spaceId: SpaceId) =>\n peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);\n\n/**\n * Hook Subscribes to sync state for each space.\n */\nexport const useSyncState = (): SpaceSyncStateMap => {\n const client = useClient();\n const [spaceState, setSpaceState] = useState<SpaceSyncStateMap>({});\n\n useEffect(() => {\n const ctx = new Context();\n const createSubscriptions = (spaces: Space[]) => {\n for (const space of spaces) {\n if (spaceState[space.id]) {\n continue;\n }\n\n ctx.onDispose(\n space.db.subscribeToSyncState(ctx, ({ peers = [] }) => {\n const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));\n if (syncState) {\n setSpaceState((spaceState) => ({ ...spaceState, [space.id]: syncState }));\n }\n }),\n );\n }\n };\n\n createSubscriptions(client.spaces.get());\n client.spaces.subscribe((spaces) => {\n createSubscriptions(spaces);\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [client]);\n\n return spaceState;\n};\n\n/**\n * Hook Subscribes to sync state for a single space.\n */\n// TODO(wittjosiah): Reconcile w/ useSyncState.\nexport const useSpaceSyncState = (space: Space): PeerSyncState | undefined => {\n const [spaceState, setSpaceState] = useState<PeerSyncState>();\n\n useEffect(() => {\n const ctx = new Context();\n space.db.subscribeToSyncState(ctx, ({ peers = [] }) => {\n const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));\n if (syncState) {\n setSpaceState(sync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MAAA;AACR,UAAMC,MAAM,IAAIC,QAAAA,QAAAA;;;;AAChBG,UAAMG,GAAGC,qBAAqBR,KAAK,CAAC,EAAES,QAAQ,CAAA,EAAE,MAAE;AAChD,YAAMC,YAAYD,MAAME,KAAK,CAACC,UAAUzB,aAAayB,MAAMxB,QAAQgB,MAAMC,EAAE,CAAA;AAC3E,UAAIK,WAAW;AACbb,sBAAca,SAAAA;MAChB;IACF,CAAA;AAEA,WAAO,MAAA;AACL,WAAKV,IAAIe,QAAO;IAClB;EACF,GAAG;IAACX;GAAM;AAEV,SAAOR;AACT;",
6
+ "names": ["MulticastObservable", "HaloSpaceMember", "useMulticastObservable", "useEffect", "useState", "SpaceState", "useMulticastObservable", "useSpace", "spaceKeyLike", "client", "useClient", "spaces", "useMulticastObservable", "ready", "setReady", "useState", "useEffect", "timeout", "setTimeout", "waitUntilReady", "clearTimeout", "find", "space", "key", "equals", "id", "halo", "identity", "get", "default", "useSpaces", "all", "filter", "state", "SpaceState", "SPACE_READY", "useMembers", "spaceKey", "spaces", "useSpaces", "all", "space", "find", "key", "equals", "undefined", "members", "useMulticastObservable", "MulticastObservable", "empty", "filter", "member", "role", "HaloSpaceMember", "Role", "REMOVED", "useMemo", "useSyncExternalStore", "Filter", "Query", "isSpace", "EMPTY_ARRAY", "noop", "useQuery", "spaceOrEcho", "queryOrFilter", "deps", "query", "Filter", "is", "Query", "select", "getObjects", "subscribe", "useMemo", "subscribed", "queryResult", "undefined", "isSpace", "db", "objects", "cb", "unsubscribe", "JSON", "stringify", "ast", "useSyncExternalStore", "useEffect", "useMemo", "useRef", "raise", "MIN_POLL_INTERVAL", "useQueue", "queueDxn", "options", "client", "useClient", "mountedRef", "useRef", "queue", "useMemo", "undefined", "spaceId", "asQueueDXN", "raise", "TypeError", "spaces", "get", "queues", "toString", "useEffect", "refresh", "timeout", "current", "poll", "finally", "pollInterval", "setTimeout", "Math", "max", "clearTimeout", "useMemo", "useSyncExternalStore", "useSchema", "client", "space", "typename", "subscribe", "getSchema", "useMemo", "undefined", "staticSchema", "graph", "schemaRegistry", "query", "db", "initialResult", "runSync", "currentSchema", "onStoreChange", "unsubscribe", "results", "useSyncExternalStore", "useMemo", "MulticastObservable", "useMulticastObservable", "useSpaceInvitations", "spaceKey", "space", "useSpace", "useMulticastObservable", "invitations", "MulticastObservable", "empty", "useSpaceInvitation", "invitationId", "invitation", "useMemo", "find", "get", "useInvitationStatus", "useEffect", "useRef", "createSubscription", "useSubscription", "cb", "selection", "callbackRef", "useRef", "current", "subscriptionRef", "useEffect", "createSubscription", "unsubscribe", "update", "useEffect", "useState", "Context", "EdgeService", "isEdgePeerId", "peerId", "spaceId", "startsWith", "EdgeService", "AUTOMERGE_REPLICATOR", "useSyncState", "client", "useClient", "spaceState", "setSpaceState", "useState", "useEffect", "ctx", "Context", "createSubscriptions", "spaces", "space", "id", "onDispose", "db", "subscribeToSyncState", "peers", "syncState", "find", "state", "get", "subscribe", "dispose", "useSpaceSyncState"]
7
7
  }
@@ -1,35 +1,35 @@
1
1
  import {
2
2
  useInvitationStatus
3
- } from "../chunk-AL2CUQ46.mjs";
3
+ } from "../chunk-O5SEVDJG.mjs";
4
4
  import {
5
5
  useClient
6
- } from "../chunk-72QD3PXL.mjs";
6
+ } from "../chunk-AAR7V3KL.mjs";
7
7
 
8
- // packages/sdk/react-client/src/halo/index.ts
8
+ // src/halo/index.ts
9
9
  import { Device, DeviceKind, DeviceType } from "@dxos/client/halo";
10
10
 
11
- // packages/sdk/react-client/src/halo/useContacts.ts
11
+ // src/halo/useContacts.ts
12
12
  import { useMulticastObservable } from "@dxos/react-hooks";
13
13
  var useContacts = () => {
14
14
  const client = useClient();
15
15
  return useMulticastObservable(client.halo.contacts);
16
16
  };
17
17
 
18
- // packages/sdk/react-client/src/halo/useCredentials.ts
18
+ // src/halo/useCredentials.ts
19
19
  import { useMulticastObservable as useMulticastObservable2 } from "@dxos/react-hooks";
20
20
  var useCredentials = () => {
21
21
  const client = useClient();
22
22
  return useMulticastObservable2(client.halo.credentials);
23
23
  };
24
24
 
25
- // packages/sdk/react-client/src/halo/useDevices.ts
25
+ // src/halo/useDevices.ts
26
26
  import { useMulticastObservable as useMulticastObservable3 } from "@dxos/react-hooks";
27
27
  var useDevices = () => {
28
28
  const client = useClient();
29
29
  return useMulticastObservable3(client.halo.devices);
30
30
  };
31
31
 
32
- // packages/sdk/react-client/src/halo/useHaloInvitations.ts
32
+ // src/halo/useHaloInvitations.ts
33
33
  import { useMemo } from "react";
34
34
  import { useMulticastObservable as useMulticastObservable4 } from "@dxos/react-hooks";
35
35
  var useHaloInvitations = () => {
@@ -44,14 +44,14 @@ var useHaloInvitation = (invitationId) => {
44
44
  return useInvitationStatus(invitation);
45
45
  };
46
46
 
47
- // packages/sdk/react-client/src/halo/useIdentity.ts
47
+ // src/halo/useIdentity.ts
48
48
  import { useMulticastObservable as useMulticastObservable5 } from "@dxos/react-hooks";
49
49
  var useIdentity = () => {
50
50
  const client = useClient();
51
51
  return useMulticastObservable5(client.halo.identity);
52
52
  };
53
53
 
54
- // packages/sdk/react-client/src/halo/useKeyStore.ts
54
+ // src/halo/useKeyStore.ts
55
55
  import { useMemo as useMemo2, useReducer } from "react";
56
56
  var KeyStore = class {
57
57
  constructor(_defaultKeys = []) {
@@ -10,9 +10,9 @@ import {
10
10
  useShell,
11
11
  useShellDisplay,
12
12
  useStatus
13
- } from "./chunk-72QD3PXL.mjs";
13
+ } from "./chunk-AAR7V3KL.mjs";
14
14
 
15
- // packages/sdk/react-client/src/index.ts
15
+ // src/index.ts
16
16
  export * from "@dxos/client";
17
17
  import { useMulticastObservable } from "@dxos/react-hooks";
18
18
  export {
@@ -5,7 +5,7 @@ import {
5
5
  InvitationEncoder,
6
6
  InvitationsProxy,
7
7
  useInvitationStatus
8
- } from "../chunk-AL2CUQ46.mjs";
8
+ } from "../chunk-O5SEVDJG.mjs";
9
9
  export {
10
10
  AuthenticatingInvitationObservable,
11
11
  CancellableInvitationObservable,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  useClient
3
- } from "../chunk-72QD3PXL.mjs";
3
+ } from "../chunk-AAR7V3KL.mjs";
4
4
 
5
- // packages/sdk/react-client/src/mesh/index.ts
5
+ // src/mesh/index.ts
6
6
  export * from "@dxos/client/mesh";
7
7
 
8
- // packages/sdk/react-client/src/mesh/useNetworkStatus.ts
8
+ // src/mesh/useNetworkStatus.ts
9
9
  import { useMulticastObservable } from "@dxos/react-hooks";
10
10
  var useNetworkStatus = () => {
11
11
  const client = useClient();