@dxos/react-client 0.8.3 → 0.8.4-main.1da679c

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 (369) hide show
  1. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  2. package/dist/lib/browser/{chunk-AL2CUQ46.mjs → chunk-BXOLJYAY.mjs} +5 -5
  3. package/dist/lib/{node-esm/chunk-UYJUBYMU.mjs.map → browser/chunk-BXOLJYAY.mjs.map} +3 -3
  4. package/dist/lib/browser/{chunk-72QD3PXL.mjs → chunk-TA2HGRAF.mjs} +76 -79
  5. package/dist/lib/browser/chunk-TA2HGRAF.mjs.map +7 -0
  6. package/dist/lib/browser/devtools/index.mjs +6 -6
  7. package/dist/lib/browser/devtools/index.mjs.map +3 -3
  8. package/dist/lib/browser/echo/index.mjs +28 -31
  9. package/dist/lib/browser/echo/index.mjs.map +3 -3
  10. package/dist/lib/browser/halo/index.mjs +28 -13
  11. package/dist/lib/browser/halo/index.mjs.map +3 -3
  12. package/dist/lib/browser/index.mjs +2 -2
  13. package/dist/lib/browser/invitations/index.mjs +1 -1
  14. package/dist/lib/browser/mesh/index.mjs +3 -3
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/testing/index.mjs +41 -43
  17. package/dist/lib/browser/testing/index.mjs.map +3 -3
  18. package/dist/lib/browser/worker.mjs +1 -1
  19. package/dist/lib/node-esm/{chunk-UYJUBYMU.mjs → chunk-256IHY6F.mjs} +5 -5
  20. package/dist/lib/{browser/chunk-AL2CUQ46.mjs.map → node-esm/chunk-256IHY6F.mjs.map} +3 -3
  21. package/dist/lib/node-esm/{chunk-NBTZZNQ5.mjs → chunk-ZJMNF7GC.mjs} +76 -79
  22. package/dist/lib/node-esm/chunk-ZJMNF7GC.mjs.map +7 -0
  23. package/dist/lib/node-esm/devtools/index.mjs +6 -6
  24. package/dist/lib/node-esm/devtools/index.mjs.map +3 -3
  25. package/dist/lib/node-esm/echo/index.mjs +28 -31
  26. package/dist/lib/node-esm/echo/index.mjs.map +3 -3
  27. package/dist/lib/node-esm/halo/index.mjs +28 -13
  28. package/dist/lib/node-esm/halo/index.mjs.map +3 -3
  29. package/dist/lib/node-esm/index.mjs +2 -2
  30. package/dist/lib/node-esm/invitations/index.mjs +1 -1
  31. package/dist/lib/node-esm/mesh/index.mjs +3 -3
  32. package/dist/lib/node-esm/meta.json +1 -1
  33. package/dist/lib/node-esm/testing/index.mjs +41 -43
  34. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  35. package/dist/lib/node-esm/worker.mjs +1 -1
  36. package/dist/types/src/client/AgentHostingProvider.d.ts.map +1 -1
  37. package/dist/types/src/client/ClientProvider.d.ts.map +1 -1
  38. package/dist/types/src/echo/useQuery.d.ts +3 -3
  39. package/dist/types/src/echo/useQuery.d.ts.map +1 -1
  40. package/dist/types/src/echo/useSpaceInvitations.d.ts.map +1 -1
  41. package/dist/types/src/echo/useSpaces.d.ts.map +1 -1
  42. package/dist/types/src/echo/useSyncState.d.ts +1 -1
  43. package/dist/types/src/echo/useSyncState.d.ts.map +1 -1
  44. package/dist/types/src/halo/Passkey.stories.d.ts +5 -5
  45. package/dist/types/src/halo/Passkey.stories.d.ts.map +1 -1
  46. package/dist/types/src/halo/useHaloInvitations.d.ts.map +1 -1
  47. package/dist/types/src/playwright/{playwright.config.d.cts → playwright.config.d.ts} +1 -1
  48. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
  49. package/dist/types/src/testing/ClientRepeater.d.ts.map +1 -1
  50. package/dist/types/src/testing/ClientRepeater.stories.d.ts +6 -9
  51. package/dist/types/src/testing/ClientRepeater.stories.d.ts.map +1 -1
  52. package/dist/types/src/testing/withClientProvider.d.ts +1 -1
  53. package/dist/types/src/testing/withClientProvider.d.ts.map +1 -1
  54. package/dist/types/src/testing/withClientProvider.stories.d.ts +7 -9
  55. package/dist/types/src/testing/withClientProvider.stories.d.ts.map +1 -1
  56. package/dist/types/tsconfig.tsbuildinfo +1 -1
  57. package/moon.yml +19 -0
  58. package/package.json +33 -25
  59. package/src/client/AgentHostingProvider.tsx +1 -1
  60. package/src/client/ClientProvider.test.tsx +3 -2
  61. package/src/client/ClientProvider.tsx +33 -36
  62. package/src/client/useConfig.test.tsx +2 -1
  63. package/src/devtools/useStream.ts +1 -1
  64. package/src/echo/useQuery.test.tsx +2 -1
  65. package/src/echo/useQuery.ts +12 -4
  66. package/src/echo/useSpaceInvitations.ts +2 -1
  67. package/src/echo/useSpaces.test.tsx +2 -1
  68. package/src/echo/useSpaces.ts +5 -9
  69. package/src/echo/useSyncState.ts +3 -3
  70. package/src/halo/Passkey.stories.tsx +12 -6
  71. package/src/halo/useDevices.test.tsx +2 -1
  72. package/src/halo/useHaloInvitations.ts +1 -1
  73. package/src/invitations/useInvitationStatus.ts +1 -1
  74. package/src/playwright/playwright.config.ts +17 -0
  75. package/src/playwright/smoke.spec.ts +4 -6
  76. package/src/testing/ClientRepeater.stories.tsx +11 -5
  77. package/src/testing/ClientRepeater.tsx +20 -24
  78. package/src/testing/withClientProvider.stories.tsx +14 -8
  79. package/src/testing/withClientProvider.tsx +7 -6
  80. package/vitest.config.ts +1 -1
  81. package/.eslintrc.cjs +0 -12
  82. package/README.yml +0 -33
  83. package/dist/lib/browser/chunk-72QD3PXL.mjs.map +0 -7
  84. package/dist/lib/node/chunk-5RUIFUEC.cjs +0 -334
  85. package/dist/lib/node/chunk-5RUIFUEC.cjs.map +0 -7
  86. package/dist/lib/node/chunk-FYOAVV65.cjs +0 -188
  87. package/dist/lib/node/chunk-FYOAVV65.cjs.map +0 -7
  88. package/dist/lib/node/devtools/index.cjs +0 -62
  89. package/dist/lib/node/devtools/index.cjs.map +0 -7
  90. package/dist/lib/node/echo/index.cjs +0 -302
  91. package/dist/lib/node/echo/index.cjs.map +0 -7
  92. package/dist/lib/node/halo/index.cjs +0 -123
  93. package/dist/lib/node/halo/index.cjs.map +0 -7
  94. package/dist/lib/node/index.cjs +0 -55
  95. package/dist/lib/node/index.cjs.map +0 -7
  96. package/dist/lib/node/invitations/index.cjs +0 -39
  97. package/dist/lib/node/invitations/index.cjs.map +0 -7
  98. package/dist/lib/node/mesh/index.cjs +0 -37
  99. package/dist/lib/node/mesh/index.cjs.map +0 -7
  100. package/dist/lib/node/meta.json +0 -1
  101. package/dist/lib/node/testing/index.cjs +0 -278
  102. package/dist/lib/node/testing/index.cjs.map +0 -7
  103. package/dist/lib/node/worker.cjs +0 -23
  104. package/dist/lib/node/worker.cjs.map +0 -7
  105. package/dist/lib/node-esm/chunk-NBTZZNQ5.mjs.map +0 -7
  106. package/dist/types/src/playwright/playwright.config.d.cts.map +0 -1
  107. package/project.json +0 -40
  108. package/src/playwright/playwright.config.cts +0 -18
  109. package/typedoc/.nojekyll +0 -1
  110. package/typedoc/assets/hierarchy.js +0 -1
  111. package/typedoc/assets/highlight.css +0 -99
  112. package/typedoc/assets/icons.js +0 -18
  113. package/typedoc/assets/icons.svg +0 -1
  114. package/typedoc/assets/main.js +0 -60
  115. package/typedoc/assets/navigation.js +0 -1
  116. package/typedoc/assets/search.js +0 -1
  117. package/typedoc/assets/style.css +0 -1640
  118. package/typedoc/classes/echo.Hypergraph.html +0 -17
  119. package/typedoc/classes/echo.PropertiesType.html +0 -19
  120. package/typedoc/classes/echo.QueryResult.html +0 -18
  121. package/typedoc/classes/halo.KeyStore.html +0 -6
  122. package/typedoc/classes/index.AgentClientServiceProvider.html +0 -10
  123. package/typedoc/classes/index.AgentManagerClient.html +0 -22
  124. package/typedoc/classes/index.AlreadyJoinedError.html +0 -15
  125. package/typedoc/classes/index.ApiError.html +0 -16
  126. package/typedoc/classes/index.CancelledError.html +0 -16
  127. package/typedoc/classes/index.Client.html +0 -51
  128. package/typedoc/classes/index.ClientServicesProxy.html +0 -12
  129. package/typedoc/classes/index.Config.html +0 -17
  130. package/typedoc/classes/index.DataCorruptionError.html +0 -16
  131. package/typedoc/classes/index.DatabaseError.html +0 -15
  132. package/typedoc/classes/index.EntityNotFoundError.html +0 -15
  133. package/typedoc/classes/index.FakeAgentHostingProvider.html +0 -7
  134. package/typedoc/classes/index.IFrameManager.html +0 -6
  135. package/typedoc/classes/index.IdentityNotInitializedError.html +0 -15
  136. package/typedoc/classes/index.InvalidConfigError.html +0 -16
  137. package/typedoc/classes/index.InvalidInvitationError.html +0 -15
  138. package/typedoc/classes/index.InvalidInvitationExtensionRoleError.html +0 -16
  139. package/typedoc/classes/index.InvalidStorageVersionError.html +0 -15
  140. package/typedoc/classes/index.LocalClientServices.html +0 -12
  141. package/typedoc/classes/index.PublicKey.html +0 -55
  142. package/typedoc/classes/index.RemoteServiceConnectionError.html +0 -15
  143. package/typedoc/classes/index.RemoteServiceConnectionTimeout.html +0 -15
  144. package/typedoc/classes/index.RpcClosedError.html +0 -15
  145. package/typedoc/classes/index.RpcNotOpenError.html +0 -15
  146. package/typedoc/classes/index.SharedWorkerConnection.html +0 -5
  147. package/typedoc/classes/index.Shell.html +0 -35
  148. package/typedoc/classes/index.ShellManager.html +0 -9
  149. package/typedoc/classes/index.SystemError.html +0 -16
  150. package/typedoc/classes/index.UnknownModelError.html +0 -15
  151. package/typedoc/classes/index.WorkerClientServices.html +0 -12
  152. package/typedoc/classes/invitations.AuthenticatingInvitationObservable.html +0 -30
  153. package/typedoc/classes/invitations.CancellableInvitationObservable.html +0 -29
  154. package/typedoc/classes/invitations.InvitationEncoder.html +0 -5
  155. package/typedoc/classes/invitations.InvitationsProxy.html +0 -12
  156. package/typedoc/enums/devtools.KeyType.html +0 -9
  157. package/typedoc/enums/echo.HaloSpaceMember.Role.html +0 -9
  158. package/typedoc/enums/echo.IndexKind.Kind.html +0 -8
  159. package/typedoc/enums/echo.QueryOptions.DataLocation.html +0 -6
  160. package/typedoc/enums/echo.QueryOptions.ShowDeletedOption.html +0 -6
  161. package/typedoc/enums/echo.ResultFormat.html +0 -10
  162. package/typedoc/enums/echo.SpaceMember.PresenceState.html +0 -5
  163. package/typedoc/enums/echo.SpaceState.html +0 -13
  164. package/typedoc/enums/echo.TextKind.html +0 -5
  165. package/typedoc/enums/halo.Device.PresenceState.html +0 -6
  166. package/typedoc/enums/halo.DeviceKind.html +0 -5
  167. package/typedoc/enums/halo.DeviceType.html +0 -9
  168. package/typedoc/enums/index.ShellDisplay.html +0 -5
  169. package/typedoc/enums/index.ShellLayout.html +0 -13
  170. package/typedoc/enums/index.SystemStatus.html +0 -5
  171. package/typedoc/enums/invitations.Invitation.AuthMethod.html +0 -6
  172. package/typedoc/enums/invitations.Invitation.Kind.html +0 -5
  173. package/typedoc/enums/invitations.Invitation.State.html +0 -13
  174. package/typedoc/enums/invitations.Invitation.Type.html +0 -6
  175. package/typedoc/enums/mesh.ConnectionState.html +0 -5
  176. package/typedoc/functions/devtools.useDevtools.html +0 -1
  177. package/typedoc/functions/devtools.useStream.html +0 -2
  178. package/typedoc/functions/echo.useMembers.html +0 -1
  179. package/typedoc/functions/echo.useQueue.html +0 -2
  180. package/typedoc/functions/echo.useSchema.html +0 -2
  181. package/typedoc/functions/echo.useSpace.html +0 -6
  182. package/typedoc/functions/echo.useSpaceInvitation.html +0 -1
  183. package/typedoc/functions/echo.useSpaceInvitations.html +0 -1
  184. package/typedoc/functions/echo.useSpaceSyncState.html +0 -2
  185. package/typedoc/functions/echo.useSpaces.html +0 -5
  186. package/typedoc/functions/echo.useSubscription.html +0 -3
  187. package/typedoc/functions/echo.useSyncState.html +0 -2
  188. package/typedoc/functions/halo.useContacts.html +0 -4
  189. package/typedoc/functions/halo.useCredentials.html +0 -1
  190. package/typedoc/functions/halo.useDevices.html +0 -1
  191. package/typedoc/functions/halo.useHaloInvitation.html +0 -1
  192. package/typedoc/functions/halo.useHaloInvitations.html +0 -1
  193. package/typedoc/functions/halo.useIdentity.html +0 -3
  194. package/typedoc/functions/halo.useKeyStore.html +0 -3
  195. package/typedoc/functions/index.AgentHostingProvider.html +0 -2
  196. package/typedoc/functions/index.useAgentHostingClient.html +0 -1
  197. package/typedoc/functions/index.useClient.html +0 -3
  198. package/typedoc/functions/index.useClientStatus.html +0 -1
  199. package/typedoc/functions/index.useConfig.html +0 -3
  200. package/typedoc/functions/index.useShell.html +0 -2
  201. package/typedoc/functions/index.useShellDisplay.html +0 -2
  202. package/typedoc/functions/index.useStatus.html +0 -1
  203. package/typedoc/functions/invitations.useInvitationStatus.html +0 -1
  204. package/typedoc/functions/mesh.useNetworkStatus.html +0 -2
  205. package/typedoc/hierarchy.html +0 -1
  206. package/typedoc/index.html +0 -23
  207. package/typedoc/interfaces/devtools.DevtoolsHook.html +0 -22
  208. package/typedoc/interfaces/devtools.DevtoolsHost.html +0 -26
  209. package/typedoc/interfaces/echo.DocAccessor.html +0 -3
  210. package/typedoc/interfaces/echo.Echo.html +0 -39
  211. package/typedoc/interfaces/echo.EchoDatabase.html +0 -25
  212. package/typedoc/interfaces/echo.Expando.html +0 -3
  213. package/typedoc/interfaces/echo.Filter.html +0 -3
  214. package/typedoc/interfaces/echo.HaloSpaceMember.html +0 -18
  215. package/typedoc/interfaces/echo.IDocHandle.html +0 -6
  216. package/typedoc/interfaces/echo.IndexKind.html +0 -9
  217. package/typedoc/interfaces/echo.Query.html +0 -34
  218. package/typedoc/interfaces/echo.QueryOptions.html +0 -39
  219. package/typedoc/interfaces/echo.Queue.html +0 -17
  220. package/typedoc/interfaces/echo.Ref.html +0 -32
  221. package/typedoc/interfaces/echo.Space.html +0 -39
  222. package/typedoc/interfaces/echo.SpaceMember.html +0 -7
  223. package/typedoc/interfaces/echo.SpaceSyncState.PeerState.html +0 -14
  224. package/typedoc/interfaces/echo.SpaceSyncState.html +0 -4
  225. package/typedoc/interfaces/echo.SubscriptionHandle.html +0 -5
  226. package/typedoc/interfaces/echo.TypedObject.html +0 -16
  227. package/typedoc/interfaces/halo.Contact.html +0 -10
  228. package/typedoc/interfaces/halo.Credential.html +0 -27
  229. package/typedoc/interfaces/halo.Device.html +0 -11
  230. package/typedoc/interfaces/halo.Halo.html +0 -16
  231. package/typedoc/interfaces/halo.Identity.html +0 -15
  232. package/typedoc/interfaces/index.AgentHostingProviderClient.html +0 -6
  233. package/typedoc/interfaces/index.AppContextRequest.html +0 -33
  234. package/typedoc/interfaces/index.ClientServicesProvider.html +0 -9
  235. package/typedoc/interfaces/index.InvitationUrlRequest.html +0 -9
  236. package/typedoc/interfaces/index.LayoutRequest.html +0 -29
  237. package/typedoc/interfaces/index.ShellRuntime.html +0 -15
  238. package/typedoc/interfaces/invitations.Invitation.html +0 -92
  239. package/typedoc/interfaces/invitations.Invitations.html +0 -5
  240. package/typedoc/interfaces/mesh.GossipMessage.html +0 -10
  241. package/typedoc/interfaces/mesh.NetworkStatus.Signal.html +0 -5
  242. package/typedoc/interfaces/mesh.NetworkStatus.html +0 -6
  243. package/typedoc/media/LICENSE +0 -8
  244. package/typedoc/modules/devtools.html +0 -1
  245. package/typedoc/modules/echo.Filter.html +0 -1
  246. package/typedoc/modules/echo.HaloSpaceMember.html +0 -1
  247. package/typedoc/modules/echo.IndexKind.html +0 -1
  248. package/typedoc/modules/echo.Query.html +0 -1
  249. package/typedoc/modules/echo.QueryOptions.html +0 -1
  250. package/typedoc/modules/echo.Ref.html +0 -2
  251. package/typedoc/modules/echo.SpaceMember.html +0 -1
  252. package/typedoc/modules/echo.SpaceSyncState.html +0 -1
  253. package/typedoc/modules/echo.html +0 -1
  254. package/typedoc/modules/halo.Device.html +0 -1
  255. package/typedoc/modules/halo.html +0 -1
  256. package/typedoc/modules/index.html +0 -1
  257. package/typedoc/modules/invitations.Invitation.html +0 -1
  258. package/typedoc/modules/invitations.html +0 -1
  259. package/typedoc/modules/mesh.NetworkStatus.html +0 -1
  260. package/typedoc/modules/mesh.html +0 -1
  261. package/typedoc/modules/worker.html +0 -1
  262. package/typedoc/modules.html +0 -1
  263. package/typedoc/types/devtools.MountOptions.html +0 -3
  264. package/typedoc/types/echo.AnyLiveObject.html +0 -2
  265. package/typedoc/types/echo.Filter.And.html +0 -1
  266. package/typedoc/types/echo.Filter.Any.html +0 -1
  267. package/typedoc/types/echo.Filter.Or.html +0 -1
  268. package/typedoc/types/echo.Filter.Props.html +0 -1
  269. package/typedoc/types/echo.Filter.Type.html +0 -1
  270. package/typedoc/types/echo.Live.html +0 -5
  271. package/typedoc/types/echo.ObjectMeta.html +0 -1
  272. package/typedoc/types/echo.ObjectMigration.html +0 -7
  273. package/typedoc/types/echo.ObjectVersion.html +0 -2
  274. package/typedoc/types/echo.PeerSyncState.html +0 -1
  275. package/typedoc/types/echo.Progress.html +0 -3
  276. package/typedoc/types/echo.PropertiesTypeProps.html +0 -1
  277. package/typedoc/types/echo.Query.Any.html +0 -1
  278. package/typedoc/types/echo.Query.TextSearchOptions.html +0 -2
  279. package/typedoc/types/echo.Query.Type.html +0 -1
  280. package/typedoc/types/echo.Ref.Target.html +0 -2
  281. package/typedoc/types/echo.Selection.html +0 -1
  282. package/typedoc/types/echo.SpaceId.html +0 -6
  283. package/typedoc/types/echo.SpaceSyncStateMap.html +0 -1
  284. package/typedoc/types/echo.UseQueueOptions.html +0 -2
  285. package/typedoc/types/echo.UseSpacesParams.html +0 -3
  286. package/typedoc/types/index.AgentHostingProviderProps.html +0 -3
  287. package/typedoc/types/index.ClientContextProps.html +0 -3
  288. package/typedoc/types/index.ClientOptions.html +0 -12
  289. package/typedoc/types/index.ClientProviderProps.html +0 -2
  290. package/typedoc/types/index.ClientServices.html +0 -15
  291. package/typedoc/types/index.FromAgentOptions.html +0 -2
  292. package/typedoc/types/index.PublicKeyLike.html +0 -2
  293. package/typedoc/types/invitations.InvitationAction.html +0 -1
  294. package/typedoc/types/invitations.InvitationResult.html +0 -5
  295. package/typedoc/types/invitations.InvitationStatus.html +0 -15
  296. package/typedoc/variables/devtools.mountDevtoolsHooks.html +0 -1
  297. package/typedoc/variables/devtools.unmountDevtoolsHooks.html +0 -1
  298. package/typedoc/variables/echo.DocAccessor.html +0 -1
  299. package/typedoc/variables/echo.EchoObjectSchema.html +0 -1
  300. package/typedoc/variables/echo.Expando.html +0 -1
  301. package/typedoc/variables/echo.FQ_ID_LENGTH.html +0 -1
  302. package/typedoc/variables/echo.Filter.html +0 -1
  303. package/typedoc/variables/echo.OBJECT_ID_LENGTH.html +0 -1
  304. package/typedoc/variables/echo.ObjectVersion.html +0 -1
  305. package/typedoc/variables/echo.Query.html +0 -1
  306. package/typedoc/variables/echo.Queue.html +0 -1
  307. package/typedoc/variables/echo.ReactiveObjectSchema.html +0 -1
  308. package/typedoc/variables/echo.Ref.html +0 -2
  309. package/typedoc/variables/echo.RefArray.html +0 -2
  310. package/typedoc/variables/echo.SPACE_ID_LENGTH.html +0 -1
  311. package/typedoc/variables/echo.SpaceId.html +0 -1
  312. package/typedoc/variables/echo.SpaceSchema.html +0 -1
  313. package/typedoc/variables/echo.TypedObject.html +0 -3
  314. package/typedoc/variables/echo.compareForeignKeys.html +0 -1
  315. package/typedoc/variables/echo.createDocAccessor.html +0 -1
  316. package/typedoc/variables/echo.createEmptyEdgeSyncState.html +0 -1
  317. package/typedoc/variables/echo.createObject.html +0 -1
  318. package/typedoc/variables/echo.createQueueDXN.html +0 -2
  319. package/typedoc/variables/echo.createSubscription.html +0 -5
  320. package/typedoc/variables/echo.defineObjectMigration.html +0 -1
  321. package/typedoc/variables/echo.fromCursor.html +0 -1
  322. package/typedoc/variables/echo.fullyQualifiedId.html +0 -4
  323. package/typedoc/variables/echo.getMeta.html +0 -1
  324. package/typedoc/variables/echo.getObjectCore.html +0 -1
  325. package/typedoc/variables/echo.getRangeFromCursor.html +0 -1
  326. package/typedoc/variables/echo.getSchema.html +0 -2
  327. package/typedoc/variables/echo.getSource.html +0 -4
  328. package/typedoc/variables/echo.getSpace.html +0 -1
  329. package/typedoc/variables/echo.getSyncSummary.html +0 -1
  330. package/typedoc/variables/echo.getTarget.html +0 -4
  331. package/typedoc/variables/echo.getTextInRange.html +0 -2
  332. package/typedoc/variables/echo.getType.html +0 -5
  333. package/typedoc/variables/echo.getTypename.html +0 -6
  334. package/typedoc/variables/echo.getVersion.html +0 -3
  335. package/typedoc/variables/echo.importSpace.html +0 -1
  336. package/typedoc/variables/echo.internalDecodeReference.html +0 -1
  337. package/typedoc/variables/echo.isEchoObject.html +0 -2
  338. package/typedoc/variables/echo.isLiveObject.html +0 -2
  339. package/typedoc/variables/echo.isRelation.html +0 -2
  340. package/typedoc/variables/echo.isSpace.html +0 -1
  341. package/typedoc/variables/echo.live.html +0 -3
  342. package/typedoc/variables/echo.loadObjectReferences.html +0 -7
  343. package/typedoc/variables/echo.makeRef.html +0 -2
  344. package/typedoc/variables/echo.parseFullyQualifiedId.html +0 -2
  345. package/typedoc/variables/echo.parseId.html +0 -1
  346. package/typedoc/variables/echo.refFromDXN.html +0 -2
  347. package/typedoc/variables/echo.toCursor.html +0 -1
  348. package/typedoc/variables/echo.toCursorRange.html +0 -1
  349. package/typedoc/variables/echo.updateText.html +0 -6
  350. package/typedoc/variables/echo.useQuery.html +0 -2
  351. package/typedoc/variables/index.AgentHostingContext.html +0 -1
  352. package/typedoc/variables/index.ClientProvider.html +0 -3
  353. package/typedoc/variables/index.DXOS_VERSION.html +0 -1
  354. package/typedoc/variables/index.Defaults.html +0 -2
  355. package/typedoc/variables/index.Dynamics.html +0 -2
  356. package/typedoc/variables/index.Envs.html +0 -2
  357. package/typedoc/variables/index.Local.html +0 -2
  358. package/typedoc/variables/index.Remote.html +0 -1
  359. package/typedoc/variables/index.Storage.html +0 -2
  360. package/typedoc/variables/index.createClientServices.html +0 -4
  361. package/typedoc/variables/index.fromAgent.html +0 -2
  362. package/typedoc/variables/index.fromHost.html +0 -2
  363. package/typedoc/variables/index.fromSocket.html +0 -2
  364. package/typedoc/variables/index.fromWorker.html +0 -2
  365. package/typedoc/variables/index.getUnixSocket.html +0 -1
  366. package/typedoc/variables/index.resolveRef.html +0 -1
  367. package/typedoc/variables/index.useMulticastObservable.html +0 -3
  368. package/typedoc/variables/worker.getWorkerServiceHost.html +0 -1
  369. package/typedoc/variables/worker.onconnect.html +0 -1
@@ -1,278 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var testing_exports = {};
31
- __export(testing_exports, {
32
- ClientRepeater: () => ClientRepeater,
33
- ClientStory: () => ClientStory,
34
- useClientProvider: () => useClientProvider,
35
- useMultiClient: () => useMultiClient,
36
- withClientProvider: () => withClientProvider,
37
- withMultiClientProvider: () => withMultiClientProvider
38
- });
39
- module.exports = __toCommonJS(testing_exports);
40
- var import_chunk_5RUIFUEC = require("../chunk-5RUIFUEC.cjs");
41
- __reExport(testing_exports, require("@dxos/client/testing"), module.exports);
42
- var import_react = require("react");
43
- var import_debug = require("@dxos/debug");
44
- var import_react2 = __toESM(require("react"));
45
- var import_client = require("@dxos/client");
46
- var import_testing = require("@dxos/client/testing");
47
- var import_react3 = require("@dxos/echo-signals/react");
48
- var import_random = require("@dxos/random");
49
- var import_react4 = __toESM(require("react"));
50
- var import_react_error_boundary = require("react-error-boundary");
51
- var import_async = require("@dxos/async");
52
- var import_testing2 = require("@dxos/client/testing");
53
- var import_log = require("@dxos/log");
54
- var ClientStory = /* @__PURE__ */ (0, import_react.createContext)(void 0);
55
- var useClientProvider = () => {
56
- return (0, import_react.useContext)(ClientStory) ?? (0, import_debug.raise)(new Error("Missing ClientStory"));
57
- };
58
- var ClientRepeater = (props) => {
59
- const { component: Component, controls: Controls, count = 1, types, createIdentity, createSpace, onSpaceCreated } = props;
60
- (0, import_react2.useEffect)(() => {
61
- (0, import_react3.registerSignalsRuntime)();
62
- }, []);
63
- const [clients, setClients] = (0, import_react2.useState)(props.clients ?? []);
64
- const [spaceKey, setSpaceKey] = (0, import_react2.useState)();
65
- const testBuilder = (0, import_react2.useRef)(new import_testing.TestBuilder());
66
- (0, import_react2.useEffect)(() => {
67
- const timeout = setTimeout(async () => {
68
- const clients2 = [
69
- ...Array(count)
70
- ].map((_) => new import_client.Client({
71
- services: testBuilder.current.createLocalClientServices(),
72
- types
73
- }));
74
- await Promise.all(clients2.map((client) => client.initialize()));
75
- if (createIdentity || createSpace) {
76
- await Promise.all(clients2.map((client) => client.halo.createIdentity()));
77
- }
78
- if (createSpace) {
79
- const client = clients2[0];
80
- const space = await client.spaces.create({
81
- name: import_random.faker.commerce.productName()
82
- });
83
- setSpaceKey(space.key);
84
- await onSpaceCreated?.({
85
- client,
86
- space
87
- }, {});
88
- await Promise.all(clients2.slice(1).flatMap((client2) => (0, import_testing.performInvitation)({
89
- host: space,
90
- guest: client2.spaces
91
- })));
92
- }
93
- setClients(clients2);
94
- });
95
- return () => clearTimeout(timeout);
96
- }, []);
97
- if (clients.length === 0) {
98
- return null;
99
- }
100
- return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, Controls && /* @__PURE__ */ import_react2.default.createElement(Controls, {
101
- clients
102
- }), clients.map((client, index) => /* @__PURE__ */ import_react2.default.createElement(import_chunk_5RUIFUEC.ClientProvider, {
103
- key: index,
104
- client
105
- }, /* @__PURE__ */ import_react2.default.createElement(Component, {
106
- id: index,
107
- count: clients.length,
108
- spaceKey,
109
- ...props.args
110
- }))));
111
- };
112
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/testing/withClientProvider.tsx";
113
- var initializeClient = async (client, { createIdentity, createSpace, onSpaceCreated, onIdentityCreated, onInitialized }, context) => {
114
- await onInitialized?.(client);
115
- if (createIdentity || createSpace) {
116
- if (!client.halo.identity.get()) {
117
- await client.halo.createIdentity();
118
- await onIdentityCreated?.({
119
- client
120
- });
121
- }
122
- }
123
- let space;
124
- if (createSpace) {
125
- space = await client.spaces.create({
126
- name: "Test Space"
127
- });
128
- await onSpaceCreated?.({
129
- client,
130
- space
131
- }, context);
132
- }
133
- return {
134
- space
135
- };
136
- };
137
- var withClientProvider = ({ createIdentity, createSpace, onSpaceCreated, onIdentityCreated, onInitialized, ...props } = {}) => {
138
- return (Story, context) => {
139
- const [data, setData] = (0, import_react4.useState)({});
140
- const handleInitialized = async (client) => {
141
- const data2 = await initializeClient(client, {
142
- createIdentity,
143
- createSpace,
144
- onSpaceCreated,
145
- onIdentityCreated,
146
- onInitialized
147
- }, context);
148
- setData(data2);
149
- };
150
- return /* @__PURE__ */ import_react4.default.createElement(ErrorBoundary, null, /* @__PURE__ */ import_react4.default.createElement(import_chunk_5RUIFUEC.ClientProvider, {
151
- onInitialized: handleInitialized,
152
- ...props
153
- }, /* @__PURE__ */ import_react4.default.createElement(ClientStory.Provider, {
154
- value: data
155
- }, /* @__PURE__ */ import_react4.default.createElement(Story, null))));
156
- };
157
- };
158
- var MultiClientContext = /* @__PURE__ */ (0, import_react4.createContext)({
159
- id: 0
160
- });
161
- var useMultiClient = () => (0, import_react4.useContext)(MultiClientContext);
162
- var withMultiClientProvider = ({ numClients = 2, createIdentity, createSpace, onSpaceCreated, onIdentityCreated, onInitialized, ...props }) => {
163
- return (Story, context) => {
164
- const builder = (0, import_react4.useRef)(new import_testing2.TestBuilder());
165
- const hostRef = (0, import_react4.useRef)();
166
- const spaceReady = (0, import_react4.useRef)(new import_async.Trigger());
167
- const handleInitialized = async (client, index) => {
168
- import_log.log.info("initialized", {
169
- index
170
- }, {
171
- F: __dxlog_file,
172
- L: 129,
173
- S: void 0,
174
- C: (f, a) => f(...a)
175
- });
176
- if (createSpace) {
177
- if (!hostRef.current) {
178
- hostRef.current = client;
179
- const { space } = await initializeClient(client, {
180
- createIdentity,
181
- createSpace,
182
- onSpaceCreated,
183
- onIdentityCreated,
184
- onInitialized
185
- }, context);
186
- spaceReady.current.wake(space);
187
- import_log.log.info("inviting", {
188
- index
189
- }, {
190
- F: __dxlog_file,
191
- L: 146,
192
- S: void 0,
193
- C: (f, a) => f(...a)
194
- });
195
- } else {
196
- await initializeClient(client, {
197
- createIdentity,
198
- onInitialized
199
- }, context);
200
- const space = await spaceReady.current.wait();
201
- if (space) {
202
- import_log.log.info("joining", {
203
- index
204
- }, {
205
- F: __dxlog_file,
206
- L: 151,
207
- S: void 0,
208
- C: (f, a) => f(...a)
209
- });
210
- await Promise.all((0, import_testing2.performInvitation)({
211
- host: space,
212
- guest: client.spaces
213
- }));
214
- }
215
- }
216
- }
217
- };
218
- return /* @__PURE__ */ import_react4.default.createElement(ErrorBoundary, null, Array.from({
219
- length: numClients
220
- }).map((_, index) => /* @__PURE__ */ import_react4.default.createElement(MultiClientContext.Provider, {
221
- key: index,
222
- value: {
223
- id: index
224
- }
225
- }, /* @__PURE__ */ import_react4.default.createElement(import_chunk_5RUIFUEC.ClientProvider, {
226
- services: builder.current.createLocalClientServices(),
227
- onInitialized: (client) => handleInitialized(client, index),
228
- ...props
229
- }, /* @__PURE__ */ import_react4.default.createElement(Story, null)))));
230
- };
231
- };
232
- var ErrorBoundary = ({ children }) => {
233
- const [error, setError] = (0, import_react4.useState)();
234
- (0, import_react4.useEffect)(() => {
235
- const handleError = (event) => {
236
- setError(event.reason);
237
- };
238
- window.addEventListener("unhandledrejection", handleError);
239
- return () => window.removeEventListener("unhandledrejection", handleError);
240
- }, []);
241
- if (error) {
242
- return /* @__PURE__ */ import_react4.default.createElement(ErrorFallback, {
243
- error,
244
- resetErrorBoundary: () => setError(void 0)
245
- });
246
- }
247
- return /* @__PURE__ */ import_react4.default.createElement(import_react_error_boundary.ErrorBoundary, {
248
- FallbackComponent: ErrorFallback
249
- }, children);
250
- };
251
- var ErrorFallback = ({ error }) => {
252
- const { name, message, stack } = error instanceof Error ? error : {
253
- name: "Error",
254
- message: String(error),
255
- stack: void 0
256
- };
257
- return /* @__PURE__ */ import_react4.default.createElement("div", {
258
- role: "alert",
259
- className: "flex flex-col p-4 gap-4 overflow-auto"
260
- }, /* @__PURE__ */ import_react4.default.createElement("h1", {
261
- className: "text-xl text-red-500"
262
- }, name), /* @__PURE__ */ import_react4.default.createElement("div", {
263
- className: "text-lg"
264
- }, message), stack && /* @__PURE__ */ import_react4.default.createElement("pre", {
265
- className: "whitespace-pre-wrap text-sm text-subdued"
266
- }, stack));
267
- };
268
- // Annotate the CommonJS export names for ESM import in node:
269
- 0 && (module.exports = {
270
- ClientRepeater,
271
- ClientStory,
272
- useClientProvider,
273
- useMultiClient,
274
- withClientProvider,
275
- withMultiClientProvider,
276
- ...require("@dxos/client/testing")
277
- });
278
- //# sourceMappingURL=index.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/testing/index.ts", "../../../../src/testing/context.tsx", "../../../../src/testing/ClientRepeater.tsx", "../../../../src/testing/withClientProvider.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nexport * from '@dxos/client/testing';\n\nexport * from './context';\nexport * from './ClientRepeater';\nexport * from './withClientProvider';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type Space } from '@dxos/client/echo';\nimport { raise } from '@dxos/debug';\n\nexport type ClientStory = {\n space?: Space;\n};\n\n// TODO(wittjosiah): Add to multi-client as well.\nexport const ClientStory = createContext<ClientStory | undefined>(undefined);\n\nexport const useClientProvider = (): ClientStory => {\n return useContext(ClientStory) ?? raise(new Error('Missing ClientStory'));\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport React, { useState, type FC, useEffect, useRef } from 'react';\n\nimport { Client, type PublicKey } from '@dxos/client';\nimport { TestBuilder, performInvitation } from '@dxos/client/testing';\nimport { type TypedObject } from '@dxos/echo-schema';\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\nimport { faker } from '@dxos/random';\n\nimport { type WithClientProviderProps } from './withClientProvider';\nimport { ClientProvider } from '../client';\n\nexport type ClientRepeatedComponentProps = { id: number; count: number; spaceKey?: PublicKey };\n\nexport type ClientRepeaterControlsProps = { clients: Client[] };\n\n// TODO(burdon): Reconcile with ClientProviderProps.\nexport type ClientRepeaterProps<P extends ClientRepeatedComponentProps> = {\n className?: string;\n component: FC<ClientRepeatedComponentProps>;\n controls?: FC<ClientRepeaterControlsProps>;\n count?: number;\n clients?: Client[];\n types?: TypedObject[];\n args?: Omit<P, 'id' | 'count'>;\n} & Pick<WithClientProviderProps, 'createIdentity' | 'createSpace' | 'onSpaceCreated'>;\n\n/**\n * Utility component for Storybook stories which sets up clients for n peers.\n * The `Component` property is rendered n times, once for each peer.\n * @deprecated use `withClientProvider`.\n */\n// TODO(burdon): To discuss: evolve ClientRepeater with optional decorator that uses it.\n// NOTE: This is specifically not a storybook decorator because it broke stories as a decorator.\n// This seems primarily due to the fact that it required top-level await for the clients to initialize.\n// Storybook seemed to handle it alright, but Chromatic had a lot of trouble with it.\n// There was also a question of whether or not calling the story function multiple times was a good idea.\nexport const ClientRepeater = <P extends ClientRepeatedComponentProps>(props: ClientRepeaterProps<P>) => {\n const {\n component: Component,\n controls: Controls,\n count = 1,\n types,\n createIdentity,\n createSpace,\n onSpaceCreated,\n } = props;\n useEffect(() => {\n registerSignalsRuntime();\n }, []);\n\n const [clients, setClients] = useState(props.clients ?? []);\n const [spaceKey, setSpaceKey] = useState<PublicKey>();\n\n const testBuilder = useRef(new TestBuilder());\n useEffect(() => {\n const timeout = setTimeout(async () => {\n const clients = [...Array(count)].map(\n (_) => new Client({ services: testBuilder.current.createLocalClientServices(), types }),\n );\n\n await Promise.all(clients.map((client) => client.initialize()));\n if (createIdentity || createSpace) {\n await Promise.all(clients.map((client) => client.halo.createIdentity()));\n }\n\n if (createSpace) {\n const client = clients[0];\n const space = await client.spaces.create({ name: faker.commerce.productName() });\n setSpaceKey(space.key);\n await onSpaceCreated?.({ client, space }, {});\n await Promise.all(\n clients.slice(1).flatMap((client) => performInvitation({ host: space, guest: client.spaces })),\n );\n }\n\n setClients(clients);\n });\n\n return () => clearTimeout(timeout);\n }, []);\n\n if (clients.length === 0) {\n return null;\n }\n\n return (\n <>\n {Controls && <Controls clients={clients} />}\n {clients.map((client, index) => (\n <ClientProvider key={index} client={client}>\n <Component id={index} count={clients.length} spaceKey={spaceKey} {...{ ...props.args }} />\n </ClientProvider>\n ))}\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type StoryContext, type Decorator } from '@storybook/react';\nimport React, { createContext, type PropsWithChildren, useContext, useEffect, useRef, useState } from 'react';\nimport { type FallbackProps, ErrorBoundary as NativeErrorBoundary } from 'react-error-boundary';\n\nimport { Trigger } from '@dxos/async';\nimport { type Client } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { performInvitation, TestBuilder } from '@dxos/client/testing';\nimport { log } from '@dxos/log';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { ClientStory } from './context';\nimport { ClientProvider, type ClientProviderProps } from '../client';\n\ntype InitializeProps = {\n createIdentity?: boolean;\n createSpace?: boolean;\n onInitialized?: (client: Client) => MaybePromise<void>;\n onIdentityCreated?: (props: { client: Client }) => MaybePromise<void>;\n // NOTE: context must be untyped until ClientRepeater is removed.\n onSpaceCreated?: (props: { client: Client; space: Space }, context: StoryContext | any) => MaybePromise<void>;\n};\n\n/**\n * Initialize client, identity and first space.\n */\nconst initializeClient = async (\n client: Client,\n { createIdentity, createSpace, onSpaceCreated, onIdentityCreated, onInitialized }: InitializeProps,\n context: StoryContext,\n): Promise<ClientStory> => {\n await onInitialized?.(client);\n\n if (createIdentity || createSpace) {\n if (!client.halo.identity.get()) {\n await client.halo.createIdentity();\n await onIdentityCreated?.({ client });\n }\n }\n\n let space: Space | undefined;\n if (createSpace) {\n space = await client.spaces.create({ name: 'Test Space' });\n await onSpaceCreated?.({ client, space }, context);\n }\n\n return { space };\n};\n\nexport type WithClientProviderProps = InitializeProps & Omit<ClientProviderProps, 'onInitialized'>;\n\n/**\n * Decorator that provides the client context.\n */\nexport const withClientProvider = ({\n createIdentity,\n createSpace,\n onSpaceCreated,\n onIdentityCreated,\n onInitialized,\n ...props\n}: WithClientProviderProps = {}): Decorator => {\n return (Story, context) => {\n const [data, setData] = useState<ClientStory>({});\n const handleInitialized = async (client: Client) => {\n const data = await initializeClient(\n client,\n {\n createIdentity,\n createSpace,\n onSpaceCreated,\n onIdentityCreated,\n onInitialized,\n },\n context,\n );\n\n setData(data);\n };\n\n return (\n <ErrorBoundary>\n <ClientProvider onInitialized={handleInitialized} {...props}>\n <ClientStory.Provider value={data}>\n <Story />\n </ClientStory.Provider>\n </ClientProvider>\n </ErrorBoundary>\n );\n };\n};\n\n// TODO(burdon): Implement context per client for context.\n// TODO(burdon): Callback once all invitations have completed.\n// TODO(burdon): Delay/jitter for creation of other clients.\nexport type WithMultiClientProviderProps = InitializeProps &\n Omit<ClientProviderProps, 'onInitialized'> & { numClients?: number };\n\nconst MultiClientContext = createContext<{ id: number }>({ id: 0 });\n\nexport const useMultiClient = () => useContext(MultiClientContext);\n\n/**\n * Decorator that creates a scaffold for multiple clients.\n * Orchestrates invitations between a randomly selected host and the remaining clients.\n * NOTE: Should come before withLayout.\n */\nexport const withMultiClientProvider = ({\n numClients = 2,\n createIdentity,\n createSpace,\n onSpaceCreated,\n onIdentityCreated,\n onInitialized,\n ...props\n}: WithMultiClientProviderProps): Decorator => {\n return (Story, context) => {\n const builder = useRef(new TestBuilder());\n const hostRef = useRef<Client>();\n const spaceReady = useRef(new Trigger<Space | undefined>());\n\n // Handle invitations.\n // NOTE: The zeroth client isn't necessarily the first to be initialized.\n const handleInitialized = async (client: Client, index: number) => {\n log.info('initialized', { index });\n if (createSpace) {\n if (!hostRef.current) {\n hostRef.current = client;\n const { space } = await initializeClient(\n client,\n {\n createIdentity,\n createSpace,\n onSpaceCreated,\n onIdentityCreated,\n onInitialized,\n },\n context,\n );\n\n spaceReady.current.wake(space);\n log.info('inviting', { index });\n } else {\n await initializeClient(client, { createIdentity, onInitialized }, context);\n const space = await spaceReady.current.wait();\n if (space) {\n log.info('joining', { index });\n await Promise.all(performInvitation({ host: space, guest: client.spaces }));\n }\n }\n }\n };\n\n return (\n <ErrorBoundary>\n {Array.from({ length: numClients }).map((_, index) => (\n <MultiClientContext.Provider key={index} value={{ id: index }}>\n <ClientProvider\n services={builder.current.createLocalClientServices()}\n onInitialized={(client) => handleInitialized(client, index)}\n {...props}\n >\n <Story />\n </ClientProvider>\n </MultiClientContext.Provider>\n ))}\n </ErrorBoundary>\n );\n };\n};\n\nconst ErrorBoundary = ({ children }: PropsWithChildren) => {\n const [error, setError] = useState<Error>();\n useEffect(() => {\n const handleError = (event: PromiseRejectionEvent) => {\n setError(event.reason);\n };\n\n window.addEventListener('unhandledrejection', handleError);\n return () => window.removeEventListener('unhandledrejection', handleError);\n }, []);\n\n if (error) {\n return <ErrorFallback error={error} resetErrorBoundary={() => setError(undefined)} />;\n }\n\n return <NativeErrorBoundary FallbackComponent={ErrorFallback}>{children}</NativeErrorBoundary>;\n};\n\nconst ErrorFallback = ({ error }: FallbackProps) => {\n const { name, message, stack } =\n error instanceof Error ? error : { name: 'Error', message: String(error), stack: undefined };\n return (\n <div role='alert' className='flex flex-col p-4 gap-4 overflow-auto'>\n <h1 className='text-xl text-red-500'>{name}</h1>\n <div className='text-lg'>{message}</div>\n {stack && <pre className='whitespace-pre-wrap text-sm text-subdued'>{stack}</pre>}\n </div>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,4BAAc;ACAd,mBAA0C;AAG1C,mBAAsB;ACHtB,IAAAA,gBAA4D;AAE5D,oBAAuC;AACvC,qBAA+C;AAE/C,IAAAA,gBAAuC;AACvC,oBAAsB;ACLtB,IAAAA,gBAAsG;AACtG,kCAAyE;AAEzE,mBAAwB;AAGxB,IAAAC,kBAA+C;AAC/C,iBAAoB;AFEb,IAAMC,cAAcC,gDAAuCC,MAAAA;AAE3D,IAAMC,oBAAoB,MAAA;AAC/B,aAAOC,yBAAWJ,WAAAA,SAAgBK,oBAAM,IAAIC,MAAM,qBAAA,CAAA;AACpD;ACsBO,IAAMC,iBAAiB,CAAyCC,UAAAA;AACrE,QAAM,EACJC,WAAWC,WACXC,UAAUC,UACVC,QAAQ,GACRC,OACAC,gBACAC,aACAC,eAAc,IACZT;AACJU,+BAAU,MAAA;AACRC,8CAAAA;EACF,GAAG,CAAA,CAAE;AAEL,QAAM,CAACC,SAASC,UAAAA,QAAcC,wBAASd,MAAMY,WAAW,CAAA,CAAE;AAC1D,QAAM,CAACG,UAAUC,WAAAA,QAAeF,wBAAAA;AAEhC,QAAMG,kBAAcC,sBAAO,IAAIC,2BAAAA,CAAAA;AAC/BT,+BAAU,MAAA;AACR,UAAMU,UAAUC,WAAW,YAAA;AACzB,YAAMT,WAAU;WAAIU,MAAMjB,KAAAA;QAAQkB,IAChC,CAACC,MAAM,IAAIC,qBAAO;QAAEC,UAAUT,YAAYU,QAAQC,0BAAyB;QAAItB;MAAM,CAAA,CAAA;AAGvF,YAAMuB,QA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JiD,8BAAAA,QAAA,cAACY,OAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;EAMb;AACF;AAEA,IAAMI,gBAAgB,CAAC,EAAEgB,SAAQ,MAAqB;AACpD,QAAM,CAACC,OAAOC,QAAAA,QAAYrE,cAAAA,UAAAA;AAC1BJ,oBAAAA,WAAU,MAAA;AACR,UAAM0E,cAAc,CAACC,UAAAA;AACnBF,eAASE,MAAMC,MAAM;IACvB;AAEAC,WAAOC,iBAAiB,sBAAsBJ,WAAAA;AAC9C,WAAO,MAAMG,OAAOE,oBAAoB,sBAAsBL,WAAAA;EAChE,GAAG,CAAA,CAAE;AAEL,MAAIF,OAAO;AACT,WAAOjC,8BAAAA,QAAA,cAACyC,eAAAA;MAAcR;MAAcS,oBAAoB,MAAMR,SAASzF,MAAAA;;EACzE;AAEA,SAAOuD,8BAAAA,QAAA,cAAC2C,4BAAAA,eAAAA;IAAoBC,mBAAmBH;KAAgBT,QAAAA;AACjE;AAEA,IAAMS,gBAAgB,CAAC,EAAER,MAAK,MAAiB;AAC7C,QAAM,EAAE7C,MAAMyD,SAASC,MAAK,IAC1Bb,iBAAiBpF,QAAQoF,QAAQ;IAAE7C,MAAM;IAASyD,SAASE,OAAOd,KAAAA;IAAQa,OAAOrG;EAAU;AAC7F,SACEuD,8BAAAA,QAAA,cAACgD,OAAAA;IAAIC,MAAK;IAAQC,WAAU;KAC1BlD,8BAAAA,QAAA,cAACmD,MAAAA;IAAGD,WAAU;KAAwB9D,IAAAA,GACtCY,8BAAAA,QAAA,cAACgD,OAAAA;IAAIE,WAAU;KAAWL,OAAAA,GACzBC,SAAS9C,8BAAAA,QAAA,cAACoD,OAAAA;IAAIF,WAAU;KAA4CJ,KAAAA,CAAAA;AAG3E;",
6
- "names": ["import_react", "import_testing", "ClientStory", "createContext", "undefined", "useClientProvider", "useContext", "raise", "Error", "ClientRepeater", "props", "component", "Component", "controls", "Controls", "count", "types", "createIdentity", "createSpace", "onSpaceCreated", "useEffect", "registerSignalsRuntime", "clients", "setClients", "useState", "spaceKey", "setSpaceKey", "testBuilder", "useRef", "TestBuilder", "timeout", "setTimeout", "Array", "map", "_", "Client", "services", "current", "createLocalClientServices", "Promise", "all", "client", "initialize", "halo", "space", "spaces", "create", "name", "faker", "commerce", "productName", "key", "slice", "flatMap", "performInvitation", "host", "guest", "clearTimeout", "length", "React", "index", "ClientProvider", "id", "args", "initializeClient", "onIdentityCreated", "onInitialized", "context", "identity", "get", "withClientProvider", "Story", "data", "setData", "handleInitialized", "ErrorBoundary", "Provider", "value", "MultiClientContext", "useMultiClient", "withMultiClientProvider", "numClients", "builder", "hostRef", "spaceReady", "Trigger", "log", "info", "wake", "wait", "from", "children", "error", "setError", "handleError", "event", "reason", "window", "addEventListener", "removeEventListener", "ErrorFallback", "resetErrorBoundary", "NativeErrorBoundary", "FallbackComponent", "message", "stack", "String", "div", "role", "className", "h1", "pre"]
7
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
- var worker_exports = {};
17
- module.exports = __toCommonJS(worker_exports);
18
- __reExport(worker_exports, require("@dxos/client/worker"), module.exports);
19
- // Annotate the CommonJS export names for ESM import in node:
20
- 0 && (module.exports = {
21
- ...require("@dxos/client/worker")
22
- });
23
- //# sourceMappingURL=worker.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/worker.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@dxos/client/worker';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAIA,2BAAc;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/client/AgentHostingProvider.tsx", "../../../src/client/ClientProvider.tsx", "../../../src/client/context.ts", "../../../src/banner.ts", "../../../src/client/useClient.ts", "../../../src/client/useClientStatus.ts", "../../../src/client/useConfig.ts", "../../../src/client/useShell.ts", "../../../src/client/useStatus.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { createContext, type PropsWithChildren, useContext, useState } from 'react';\n\nimport { type AgentHostingProviderClient, AgentManagerClient, FakeAgentHostingProvider } from '@dxos/client';\nimport { type Halo } from '@dxos/client/halo';\nimport { type Config } from '@dxos/config';\nimport { log } from '@dxos/log';\n\nimport { useClient } from '../client';\n\nexport type AgentHostingProviderProps = { config: Config; halo: Halo };\n\nexport const AgentHostingContext = createContext<AgentHostingProviderClient | null>(null);\n\n/**\n * Experimental agent hosting provider.\n * @param props\n * @constructor\n * @deprecated\n */\nexport const AgentHostingProvider = (props: PropsWithChildren) => {\n const client = useClient();\n const [agentHostingProviderClient] = useState(makeClient(client));\n return (\n <AgentHostingContext.Provider value={agentHostingProviderClient}> {props.children}</AgentHostingContext.Provider>\n );\n};\n\nexport const useAgentHostingClient = () => {\n return useContext(AgentHostingContext);\n};\n\nconst makeClient = ({ config, halo }: AgentHostingProviderProps) => {\n const agentHostingConfig = config.get('runtime.services.agentHosting');\n if (!agentHostingConfig) {\n log('no agent hosting configured');\n return null;\n }\n\n // TODO(nf): Dynamically discover based on runtime config.\n let agentHostingProviderClient: AgentHostingProviderClient | null = null;\n switch (agentHostingConfig.type) {\n case 'LOCAL_TESTING': {\n log('using FakeAgentHostingProvider');\n return new FakeAgentHostingProvider();\n }\n\n case 'AGENTHOSTING_API': {\n agentHostingProviderClient = new AgentManagerClient(config, halo);\n if (agentHostingProviderClient.init()) {\n return agentHostingProviderClient;\n } else {\n // Not authorized or error initializing.\n return null;\n }\n }\n\n default: {\n log.error('Unknown agent hosting provider type: ' + agentHostingConfig.type);\n return null;\n }\n }\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport React, {\n forwardRef,\n type FunctionComponent,\n type PropsWithChildren,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\n\nimport { Client, type ClientOptions, type ClientServicesProvider, SystemStatus } from '@dxos/client';\nimport { type Config } from '@dxos/config';\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\nimport { log } from '@dxos/log';\nimport { useControlledState } from '@dxos/react-hooks';\nimport { getAsyncProviderValue, type MaybePromise, type Provider } from '@dxos/util';\n\nimport { ClientContext, type ClientContextProps } from './context';\nimport { printBanner } from '../banner';\n\n/**\n * Properties for the ClientProvider.\n */\nexport type ClientProviderProps = Omit<ClientOptions, 'config' | 'services'> &\n Pick<ClientContextProps, 'status'> &\n PropsWithChildren<{\n /**\n * Client object or async provider to enable to caller to do custom initialization.\n *\n * NOTE: For advanced use cases only.\n */\n client?: Client | Provider<Promise<Client>>;\n\n /**\n * Config object or async provider.\n *\n * NOTE: If a `client` is provided then `config` is ignored.\n */\n // TODO(burdon): Reconcile with ClientOptions.\n config?: Config | Provider<Promise<Config>>;\n\n /**\n * Callback to enable the caller to create a custom ClientServicesProvider.\n *\n * NOTE: If a `client` is provided then `services` is ignored.\n */\n // TODO(burdon): Reconcile with ClientOptions.\n services?: ClientServicesProvider | ((config?: Config) => MaybePromise<ClientServicesProvider>);\n\n /**\n * ReactNode to display until the client is available.\n */\n fallback?: FunctionComponent<Partial<ClientContextProps>>;\n\n /**\n * Enable (by default) registration of Preact signals runtime for reactive ECHO objects.\n * @see https://www.npmjs.com/package/@preact/signals-react\n */\n signalsRuntime?: boolean;\n\n /**\n * Skip the DXOS banner.\n */\n noBanner?: boolean;\n\n /**\n * Post initialization hook to enable to caller to do custom initialization.\n */\n onInitialized?: (client: Client) => MaybePromise<void>;\n }>;\n\n/**\n * Root component that provides the DXOS client instance to child components.\n * To be used with the `useClient` hook.\n */\nexport const ClientProvider = forwardRef<Client | undefined, ClientProviderProps>(\n (\n {\n children,\n config: configProvider,\n client: clientProvider,\n services: servicesProvider,\n status: controlledStatus,\n fallback: Fallback = () => null,\n signalsRuntime = true,\n noBanner,\n onInitialized,\n ...options\n },\n forwardedRef,\n ) => {\n useEffect(() => {\n // TODO(wittjosiah): Ideally this should be imported asynchronously because it is optional.\n // Unfortunately, async import seemed to break signals React instrumentation.\n signalsRuntime && registerSignalsRuntime();\n }, []);\n\n // The client is initialized asynchronously.\n // If an error occurs during initialization, it is caught and the state is set.\n // This allows the error to be thrown in the render method.\n // The assumption is that a client initialization error is fatal to the app.\n // This error will be caught by the nearest error boundary.\n const [error, setError] = useState();\n if (error) {\n throw error;\n }\n\n const [client, setClient] = useState(clientProvider instanceof Client ? clientProvider : undefined);\n\n // Provide external access.\n useImperativeHandle(forwardedRef, () => client, [client]);\n\n // Client status subscription.\n const [status, setStatus] = useControlledState(controlledStatus);\n useEffect(() => {\n if (!client) {\n return;\n }\n\n const subscription = client.status.subscribe((status) => setStatus(status));\n return () => subscription.unsubscribe();\n }, [client]);\n\n // Create and/or initialize client.\n useEffect(() => {\n let disposed = false;\n const initialize = async (client: Client) => {\n if (!client.initialized) {\n await client.initialize().catch((err) => {\n if (!disposed) {\n setError(err);\n }\n });\n log('client ready');\n await onInitialized?.(client);\n log('initialization complete');\n }\n\n setClient(client);\n\n if (!noBanner) {\n printBanner(client);\n }\n };\n\n let client: Client;\n const t = setTimeout(async () => {\n try {\n if (clientProvider) {\n // Asynchronously request client.\n client = await getAsyncProviderValue(clientProvider);\n await initialize(client);\n } else {\n // Asynchronously construct client (config may be undefined).\n const config = await getAsyncProviderValue(configProvider);\n log('resolved config', { config });\n const services = await getAsyncProviderValue(servicesProvider, config);\n log('created services', { services });\n client = new Client({ config, services, ...options });\n log('created client');\n await initialize(client);\n }\n } catch (err) {\n if (!disposed) {\n log.catch(err);\n }\n }\n });\n\n return () => {\n log('clean up');\n disposed = true;\n clearTimeout(t);\n // Only destroy if the client is not provided by the parent.\n if (!clientProvider) {\n void client\n ?.destroy()\n .then(() => {\n log('destroyed');\n })\n .catch((err) => log.catch(err));\n }\n };\n }, [configProvider, clientProvider, servicesProvider, noBanner]);\n\n if (!client?.initialized || status !== SystemStatus.ACTIVE) {\n return <Fallback client={client} status={status} />;\n }\n\n return <ClientContext.Provider value={{ client, status }}>{children}</ClientContext.Provider>;\n },\n);\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\n\nimport { type Client, type SystemStatus } from '@dxos/client';\n\nexport type ClientContextProps = {\n client: Client;\n status?: SystemStatus | null;\n};\n\n/**\n * @internal Use ClientProvider to create or initialize the Client.\n */\nexport const ClientContext: Context<ClientContextProps | undefined> = createContext<ClientContextProps | undefined>(\n undefined,\n);\n", "//\n// Copyright 2021 DXOS.org\n//\n\nimport { type Client } from '@dxos/client';\n\n// http://patorjk.com/software/taag/#p=testall&f=Patorjk-HeX&t=DXOS\nconst BANNER = (client: Client) => {\n const commitHash = client.config.get('runtime.app.build.commitHash');\n const hash = commitHash ? ` App Commit ${commitHash} \\n` : '';\n\n return (\n '\\n' +\n '_/\\\\/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\______/\\\\/\\\\/\\\\/\\\\/\\\\_\\n' +\n '_/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\__/\\\\/\\\\_________\\n' +\n '_/\\\\/\\\\____/\\\\/\\\\______/\\\\/\\\\______/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\___\\n' +\n '_/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\__________/\\\\/\\\\_\\n' +\n '_/\\\\/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\/\\\\___\\n' +\n `\\n DXOS Client ${client.version} \\n${hash}`\n );\n};\n\nlet bannerPrinted = false;\n\nexport const printBanner = (client: Client) => {\n if (bannerPrinted || window.location.hostname === 'localhost') {\n return;\n }\n\n bannerPrinted = true;\n // eslint-disable-next-line no-console\n console.log(`%c${BANNER(client)}`, 'font-family: monospace;');\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { ClientContext } from '../client/context';\n\n/**\n * Hook returning instance of DXOS client.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useClient = () => {\n const { client } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return client;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type Client, type SystemStatus } from '@dxos/client';\n\nexport const useClientStatus = (client: Client) => {\n const [status, setStatus] = useState<SystemStatus | null>();\n useEffect(() => {\n if (!client) {\n return;\n }\n\n const subscription = client.status.subscribe((status) => setStatus(status));\n return () => subscription.unsubscribe();\n }, [client, setStatus]);\n\n return status;\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { ClientContext } from './context';\n\n/**\n * Hook returning config object used to initialize the DXOS client instance.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useConfig = () => {\n const { client } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return client.config;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type Shell, type ShellDisplay } from '@dxos/client';\n\nimport { useClient } from './useClient';\n\n/**\n * Helper hook to access the shell.\n */\nexport const useShell = (): Shell => {\n const client = useClient();\n return client.shell;\n};\n\n/**\n * Hook to access the shell’s display state.\n */\nexport const useShellDisplay = (): ShellDisplay => {\n const client = useClient();\n const [display, setDisplay] = useState(client.shell.display);\n useEffect(() => client.shell.onDisplayChange(setDisplay), [client]);\n return display;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { type SystemStatus } from '@dxos/client';\nimport { raise } from '@dxos/debug';\n\nimport { ClientContext } from './context';\n\nexport const useStatus = (): SystemStatus | null | undefined => {\n const { status } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return status;\n};\n"],
5
- "mappings": ";;;AAIA,OAAOA,UAASC,iBAAAA,gBAAuCC,cAAAA,aAAYC,YAAAA,iBAAgB;AAEnF,SAA0CC,oBAAoBC,gCAAgC;AAG9F,SAASC,OAAAA,YAAW;;;ACLpB,OAAOC,SACLC,YAGAC,WACAC,qBACAC,gBACK;AAEP,SAASC,QAAyDC,oBAAoB;AAEtF,SAASC,8BAA8B;AACvC,SAASC,WAAW;AACpB,SAASC,0BAA0B;AACnC,SAASC,6BAA+D;;;ACdxE,SAAuBC,qBAAqB;AAYrC,IAAMC,gBAAyDC,cACpEC,MAAAA;;;ACVF,IAAMC,SAAS,CAACC,WAAAA;AACd,QAAMC,aAAaD,OAAOE,OAAOC,IAAI,8BAAA;AACrC,QAAMC,OAAOH,aAAa,eAAeA,UAAAA;IAAkB;AAE3D,SACE;;;;;;;eAMkBD,OAAOK,OAAO;EAAMD,IAAAA;AAE1C;AAEA,IAAIE,gBAAgB;AAEb,IAAMC,cAAc,CAACP,WAAAA;AAC1B,MAAIM,iBAAiBE,OAAOC,SAASC,aAAa,aAAa;AAC7D;EACF;AAEAJ,kBAAgB;AAEhBK,UAAQC,IAAI,KAAKb,OAAOC,MAAAA,CAAAA,IAAW,yBAAA;AACrC;;;;AF8CO,I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ASC,WAAWJ,MAAAA,CAAAA;AACzD,SACE,gBAAAK,OAAA,cAACT,oBAAoBU,UAAQ;IAACC,OAAOL;KAA4B,KAAEH,MAAMS,QAAQ;AAErF;AAEO,IAAMC,wBAAwB,MAAA;AACnC,SAAOC,YAAWd,mBAAAA;AACpB;AAEA,IAAMQ,aAAa,CAAC,EAAEO,QAAQC,KAAI,MAA6B;AAC7D,QAAMC,qBAAqBF,OAAOG,IAAI,+BAAA;AACtC,MAAI,CAACD,oBAAoB;AACvBE,IAAAA,KAAI,+BAAA,QAAA;;;;;;AACJ,WAAO;EACT;AAGA,MAAIb,6BAAgE;AACpE,UAAQW,mBAAmBG,MAAI;IAC7B,KAAK,iBAAiB;AACpBD,MAAAA,KAAI,kCAAA,QAAA;;;;;;AACJ,aAAO,IAAIE,yBAAAA;IACb;IAEA,KAAK,oBAAoB;AACvBf,mCAA6B,IAAIgB,mBAAmBP,QAAQC,IAAAA;AAC5D,UAAIV,2BAA2BiB,KAAI,GAAI;AACrC,eAAOjB;MACT,OAAO;AAEL,eAAO;MACT;IACF;IAEA,SAAS;AACPa,MAAAA,KAAIK,MAAM,0CAA0CP,mBAAmBG,MAAI,QAAA;;;;;;AAC3E,aAAO;IACT;EACF;AACF;",
6
- "names": ["React", "createContext", "useContext", "useState", "AgentManagerClient", "FakeAgentHostingProvider", "log", "React", "forwardRef", "useEffect", "useImperativeHandle", "useState", "Client", "SystemStatus", "registerSignalsRuntime", "log", "useControlledState", "getAsyncProviderValue", "createContext", "ClientContext", "createContext", "undefined", "BANNER", "client", "commitHash", "config", "get", "hash", "version", "bannerPrinted", "printBanner", "window", "location", "hostname", "console", "log", "ClientProvider", "forwardRef", "children", "config", "configProvider", "client", "clientProvider", "services", "servicesProvider", "status", "controlledStatus", "fallback", "Fallback", "signalsRuntime", "noBanner", "onInitialized", "options", "forwardedRef", "useEffect", "registerSignalsRuntime", "error", "setError", "useState", "setClient", "Client", "undefined", "useImperativeHandle", "setStatus", "useControlledState", "subscription", "subscribe", "unsubscribe", "disposed", "initialize", "initialized", "catch", "err", "log", "printBanner", "t", "setTimeout", "getAsyncProviderValue", "clearTimeout", "destroy", "then", "SystemStatus", "ACTIVE", "ClientContext", "Provider", "value", "useContext", "raise", "useClient", "client", "useContext", "ClientContext", "raise", "Error", "useEffect", "useState", "useClientStatus", "client", "status", "setStatus", "useState", "useEffect", "subscription", "subscribe", "unsubscribe", "useContext", "raise", "useConfig", "client", "useContext", "ClientContext", "raise", "Error", "config", "useEffect", "useState", "useShell", "client", "useClient", "shell", "useShellDisplay", "display", "setDisplay", "useState", "useEffect", "onDisplayChange", "useContext", "raise", "useStatus", "status", "useContext", "ClientContext", "raise", "Error", "AgentHostingContext", "createContext", "AgentHostingProvider", "props", "client", "useClient", "agentHostingProviderClient", "useState", "makeClient", "React", "Provider", "value", "children", "useAgentHostingClient", "useContext", "config", "halo", "agentHostingConfig", "get", "log", "type", "FakeAgentHostingProvider", "AgentManagerClient", "init", "error"]
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"playwright.config.d.cts","sourceRoot":"","sources":["../../../../src/playwright/playwright.config.cts"],"names":[],"mappings":";AASA,wBAQG"}
package/project.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3
- "name": "react-client",
4
- "tags": [
5
- "scope:sdk"
6
- ],
7
- "sourceRoot": "{projectRoot}/src",
8
- "projectType": "library",
9
- "targets": {
10
- "build": {},
11
- "compile": {
12
- "options": {
13
- "entryPoints": [
14
- "{projectRoot}/src/devtools/index.ts",
15
- "{projectRoot}/src/echo/index.ts",
16
- "{projectRoot}/src/halo/index.ts",
17
- "{projectRoot}/src/index.ts",
18
- "{projectRoot}/src/invitations/index.ts",
19
- "{projectRoot}/src/mesh/index.ts",
20
- "{projectRoot}/src/testing/index.ts",
21
- "{projectRoot}/src/worker.ts"
22
- ]
23
- }
24
- },
25
- "e2e": {
26
- "dependsOn": [
27
- "^compile",
28
- "stories:mkdist"
29
- ]
30
- },
31
- "lint": {},
32
- "pack": {},
33
- "test": {},
34
- "typedoc": {}
35
- },
36
- "implicitDependencies": [
37
- "esbuild",
38
- "node-std"
39
- ]
40
- }
@@ -1,18 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { nxE2EPreset } from '@nx/playwright/preset';
6
- import { defineConfig } from '@playwright/test';
7
-
8
- import { e2ePreset } from '@dxos/test-utils/playwright';
9
-
10
- export default defineConfig({
11
- ...nxE2EPreset(__filename, { testDir: __dirname }),
12
- ...e2ePreset(__dirname),
13
- webServer: {
14
- command: 'pnpm -w nx storybook-e2e stories',
15
- port: 9009,
16
- reuseExistingServer: !process.env.CI,
17
- },
18
- });
package/typedoc/.nojekyll DELETED
@@ -1 +0,0 @@
1
- TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -1 +0,0 @@
1
- window.hierarchyData = "eJyll0tT2zAUhf+L1oJKtiTb2XVSmKZToAN9LBgWwhZBE0XKyEpKyvDfO84DbOzE1+2KCejofPdeRTo8I+9cKNHollKRYpYSzDJKcEwY5oxhTkSMk4TeYeTVg1F50M6WaPSMYsKqH1bOFRqhsdHKhhvlVzpX5TfvVrpQHmE007ZAo4gLjJbeoBHSNij/IHNVftC2UE+n3dLTxzA3CKPcyLJEIxTK4qTa6+RVX/3xUZvCK4tGtxkjmBLKcZZxTCmL714wYjyrMX40Xsli/cVpq4oz790bH43SPd/G8BWurTkItv1F5ZqSuutCQ712K3scGmXzVGCRUZzQqCqYk6g+FGlzZQy42Ob6/kJ5FNfcPskgx8775aI6I0DLDhHAl7F3vveyVAMcX5cPaTXjGeZCYEESLFiGRUJwkm3OGReiBnRmgw7rSxfO3dJCe98hAjQirftO7EoaXYydfdBToG1b0+8qSNJ2ndiVDnLA5Lt1APcoPer+FJQttbPXzkCPBGATABer3zWTQu0HOrE6aGn0H/D38IgYwJGQdn9ugvNyqn4qXw6eUIcWQJHRGsW1mrugdlf82Fm7fUeAHMfU/SQJjfpJvuu5csvwzyw7PYAmrl+Z14t8bFwJPhjN9QA3HjXdLl24Wihw45sCgF9Sn/rNugxqDvSqLR70/pEI8yjGIkpxEsc44Zt3MMnqbf5hZ9b9theuUAaI05L0F5+xxrM/VTY0ok0rFB0OAge1AIqM1yi+ulyaZsDqt+8Q9ftW2etYHnxaA/JHWwQwpqw+61/Oz5QfWnKXCmIt0vcj/+zKoO10P7DtlqAcfFg+NAtTmkaYRtsMXH14D3khrZy24I6fx4YG0JuoMZZzOVNdBfabH1KCcnij8mV4rN7VXFbbvD32V/el8it5b9RxmP368rR/JwBcRkk7qlfa/yHr2WZQ3E3J7l8KETcDxd6t91S/cdVUQw8zJ8mOI4m6OQC3SycJ6IJ5efkLt5cegQ=="
@@ -1,99 +0,0 @@
1
- :root {
2
- --light-hl-0: #795E26;
3
- --dark-hl-0: #DCDCAA;
4
- --light-hl-1: #000000;
5
- --dark-hl-1: #D4D4D4;
6
- --light-hl-2: #A31515;
7
- --dark-hl-2: #CE9178;
8
- --light-hl-3: #AF00DB;
9
- --dark-hl-3: #C586C0;
10
- --light-hl-4: #001080;
11
- --dark-hl-4: #9CDCFE;
12
- --light-hl-5: #0000FF;
13
- --dark-hl-5: #569CD6;
14
- --light-hl-6: #0070C1;
15
- --dark-hl-6: #4FC1FF;
16
- --light-hl-7: #800000;
17
- --dark-hl-7: #808080;
18
- --light-hl-8: #800000;
19
- --dark-hl-8: #569CD6;
20
- --light-hl-9: #000000FF;
21
- --dark-hl-9: #D4D4D4;
22
- --light-hl-10: #267F99;
23
- --dark-hl-10: #4EC9B0;
24
- --light-code-background: #FFFFFF;
25
- --dark-code-background: #1E1E1E;
26
- }
27
-
28
- @media (prefers-color-scheme: light) { :root {
29
- --hl-0: var(--light-hl-0);
30
- --hl-1: var(--light-hl-1);
31
- --hl-2: var(--light-hl-2);
32
- --hl-3: var(--light-hl-3);
33
- --hl-4: var(--light-hl-4);
34
- --hl-5: var(--light-hl-5);
35
- --hl-6: var(--light-hl-6);
36
- --hl-7: var(--light-hl-7);
37
- --hl-8: var(--light-hl-8);
38
- --hl-9: var(--light-hl-9);
39
- --hl-10: var(--light-hl-10);
40
- --code-background: var(--light-code-background);
41
- } }
42
-
43
- @media (prefers-color-scheme: dark) { :root {
44
- --hl-0: var(--dark-hl-0);
45
- --hl-1: var(--dark-hl-1);
46
- --hl-2: var(--dark-hl-2);
47
- --hl-3: var(--dark-hl-3);
48
- --hl-4: var(--dark-hl-4);
49
- --hl-5: var(--dark-hl-5);
50
- --hl-6: var(--dark-hl-6);
51
- --hl-7: var(--dark-hl-7);
52
- --hl-8: var(--dark-hl-8);
53
- --hl-9: var(--dark-hl-9);
54
- --hl-10: var(--dark-hl-10);
55
- --code-background: var(--dark-code-background);
56
- } }
57
-
58
- :root[data-theme='light'] {
59
- --hl-0: var(--light-hl-0);
60
- --hl-1: var(--light-hl-1);
61
- --hl-2: var(--light-hl-2);
62
- --hl-3: var(--light-hl-3);
63
- --hl-4: var(--light-hl-4);
64
- --hl-5: var(--light-hl-5);
65
- --hl-6: var(--light-hl-6);
66
- --hl-7: var(--light-hl-7);
67
- --hl-8: var(--light-hl-8);
68
- --hl-9: var(--light-hl-9);
69
- --hl-10: var(--light-hl-10);
70
- --code-background: var(--light-code-background);
71
- }
72
-
73
- :root[data-theme='dark'] {
74
- --hl-0: var(--dark-hl-0);
75
- --hl-1: var(--dark-hl-1);
76
- --hl-2: var(--dark-hl-2);
77
- --hl-3: var(--dark-hl-3);
78
- --hl-4: var(--dark-hl-4);
79
- --hl-5: var(--dark-hl-5);
80
- --hl-6: var(--dark-hl-6);
81
- --hl-7: var(--dark-hl-7);
82
- --hl-8: var(--dark-hl-8);
83
- --hl-9: var(--dark-hl-9);
84
- --hl-10: var(--dark-hl-10);
85
- --code-background: var(--dark-code-background);
86
- }
87
-
88
- .hl-0 { color: var(--hl-0); }
89
- .hl-1 { color: var(--hl-1); }
90
- .hl-2 { color: var(--hl-2); }
91
- .hl-3 { color: var(--hl-3); }
92
- .hl-4 { color: var(--hl-4); }
93
- .hl-5 { color: var(--hl-5); }
94
- .hl-6 { color: var(--hl-6); }
95
- .hl-7 { color: var(--hl-7); }
96
- .hl-8 { color: var(--hl-8); }
97
- .hl-9 { color: var(--hl-9); }
98
- .hl-10 { color: var(--hl-10); }
99
- pre, code { background: var(--code-background); }
@@ -1,18 +0,0 @@
1
- (function() {
2
- addIcons();
3
- function addIcons() {
4
- if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
5
- const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
6
- svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g>`;
7
- svg.style.display = "none";
8
- if (location.protocol === "file:") updateUseElements();
9
- }
10
-
11
- function updateUseElements() {
12
- document.querySelectorAll("use").forEach(el => {
13
- if (el.getAttribute("href").includes("#icon-")) {
14
- el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
15
- }
16
- });
17
- }
18
- })()