@dxos/react-client 0.8.3 → 0.8.4-main.03d5cd7b56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.mts +9 -0
- package/.storybook/preview.mts +8 -0
- package/dist/lib/browser/chunk-3LVU7RNK.mjs +16 -0
- package/dist/lib/browser/chunk-3LVU7RNK.mjs.map +7 -0
- package/dist/lib/browser/chunk-CZMIVAGI.mjs +8 -0
- package/dist/lib/browser/chunk-CZMIVAGI.mjs.map +7 -0
- package/dist/lib/browser/chunk-XT352YI6.mjs +134 -0
- package/dist/lib/browser/chunk-XT352YI6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AL2CUQ46.mjs → chunk-YHE6WD44.mjs} +8 -18
- package/dist/lib/browser/chunk-YHE6WD44.mjs.map +7 -0
- package/dist/lib/browser/devtools/index.mjs +8 -12
- package/dist/lib/browser/devtools/index.mjs.map +3 -3
- package/dist/lib/browser/echo/index.mjs +67 -136
- package/dist/lib/browser/echo/index.mjs.map +4 -4
- package/dist/lib/browser/halo/index.mjs +12 -10
- package/dist/lib/browser/halo/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +100 -13
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/invitations/index.mjs +1 -1
- package/dist/lib/browser/mesh/index.mjs +4 -3
- package/dist/lib/browser/mesh/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +117 -160
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/worker.mjs +1 -1
- package/dist/lib/node-esm/chunk-CUDKNAMV.mjs +17 -0
- package/dist/lib/node-esm/chunk-CUDKNAMV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UYJUBYMU.mjs → chunk-RQJPEHDY.mjs} +8 -18
- package/dist/lib/node-esm/chunk-RQJPEHDY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WL3Z5HOH.mjs +135 -0
- package/dist/lib/node-esm/chunk-WL3Z5HOH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WUTK2IJF.mjs +10 -0
- package/dist/lib/node-esm/chunk-WUTK2IJF.mjs.map +7 -0
- package/dist/lib/node-esm/devtools/index.mjs +8 -12
- package/dist/lib/node-esm/devtools/index.mjs.map +3 -3
- package/dist/lib/node-esm/echo/index.mjs +67 -136
- package/dist/lib/node-esm/echo/index.mjs.map +4 -4
- package/dist/lib/node-esm/halo/index.mjs +12 -10
- package/dist/lib/node-esm/halo/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +100 -13
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/invitations/index.mjs +1 -1
- package/dist/lib/node-esm/mesh/index.mjs +4 -3
- package/dist/lib/node-esm/mesh/index.mjs.map +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +117 -160
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/worker.mjs +1 -1
- package/dist/types/src/banner.d.ts.map +1 -1
- package/dist/types/src/client/AgentHostingProvider.d.ts.map +1 -1
- package/dist/types/src/client/ClientProvider.d.ts +1 -11
- package/dist/types/src/client/ClientProvider.d.ts.map +1 -1
- package/dist/types/src/client/useClientStatus.d.ts.map +1 -1
- package/dist/types/src/devtools/useStream.d.ts.map +1 -1
- package/dist/types/src/echo/index.d.ts +2 -2
- package/dist/types/src/echo/index.d.ts.map +1 -1
- package/dist/types/src/echo/useMembers.d.ts +2 -2
- package/dist/types/src/echo/useMembers.d.ts.map +1 -1
- package/dist/types/src/echo/useQueue.d.ts +3 -2
- package/dist/types/src/echo/useQueue.d.ts.map +1 -1
- package/dist/types/src/echo/useSpaceInvitations.d.ts +3 -2
- package/dist/types/src/echo/useSpaceInvitations.d.ts.map +1 -1
- package/dist/types/src/echo/useSpaceProperties.d.ts +13 -0
- package/dist/types/src/echo/useSpaceProperties.d.ts.map +1 -0
- package/dist/types/src/echo/useSpaces.d.ts +19 -9
- package/dist/types/src/echo/useSpaces.d.ts.map +1 -1
- package/dist/types/src/echo/useSubscription.d.ts +1 -1
- package/dist/types/src/echo/useSubscription.d.ts.map +1 -1
- package/dist/types/src/echo/useSyncState.d.ts +1 -1
- package/dist/types/src/echo/useSyncState.d.ts.map +1 -1
- package/dist/types/src/halo/Passkey.stories.d.ts +5 -5
- package/dist/types/src/halo/Passkey.stories.d.ts.map +1 -1
- package/dist/types/src/halo/useHaloInvitations.d.ts.map +1 -1
- package/dist/types/src/halo/useKeyStore.d.ts.map +1 -1
- package/dist/types/src/invitations/useInvitationStatus.d.ts +1 -1
- package/dist/types/src/invitations/useInvitationStatus.d.ts.map +1 -1
- package/dist/types/src/testing/ClientRepeater.d.ts +6 -5
- package/dist/types/src/testing/ClientRepeater.d.ts.map +1 -1
- package/dist/types/src/testing/ClientRepeater.stories.d.ts +6 -10
- package/dist/types/src/testing/ClientRepeater.stories.d.ts.map +1 -1
- package/dist/types/src/testing/context.d.ts +4 -2
- package/dist/types/src/testing/context.d.ts.map +1 -1
- package/dist/types/src/testing/util.d.ts.map +1 -1
- package/dist/types/src/testing/withClientProvider.d.ts +6 -10
- package/dist/types/src/testing/withClientProvider.d.ts.map +1 -1
- package/dist/types/src/testing/withClientProvider.stories.d.ts +8 -9
- package/dist/types/src/testing/withClientProvider.stories.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/docs/README.md +38 -38
- package/moon.yml +20 -0
- package/package.json +43 -58
- package/src/client/AgentHostingProvider.tsx +1 -1
- package/src/client/ClientProvider.test.tsx +2 -2
- package/src/client/ClientProvider.tsx +32 -50
- package/src/client/useConfig.test.tsx +1 -1
- package/src/devtools/useStream.ts +1 -1
- package/src/echo/index.ts +2 -2
- package/src/echo/useMembers.ts +5 -3
- package/src/echo/useQueue.ts +3 -4
- package/src/echo/useSpaceInvitations.ts +10 -5
- package/src/echo/useSpaceProperties.ts +28 -0
- package/src/echo/useSpaces.test.tsx +8 -14
- package/src/echo/useSpaces.ts +32 -30
- package/src/echo/useSubscription.ts +1 -1
- package/src/echo/useSyncState.ts +5 -4
- package/src/halo/Passkey.stories.tsx +20 -20
- package/src/halo/useDevices.test.tsx +1 -1
- package/src/halo/useHaloInvitations.ts +1 -1
- package/src/invitations/useInvitationStatus.ts +9 -8
- package/src/testing/ClientRepeater.stories.tsx +22 -16
- package/src/testing/ClientRepeater.tsx +29 -37
- package/src/testing/context.tsx +4 -3
- package/src/testing/util.tsx +0 -1
- package/src/testing/withClientProvider.stories.tsx +34 -20
- package/src/testing/withClientProvider.tsx +77 -94
- package/tsconfig.json +3 -6
- package/typedoc.json +1 -1
- package/vitest.config.ts +10 -16
- package/.eslintrc.cjs +0 -12
- package/README.yml +0 -33
- package/dist/lib/browser/chunk-72QD3PXL.mjs +0 -312
- package/dist/lib/browser/chunk-72QD3PXL.mjs.map +0 -7
- package/dist/lib/browser/chunk-AL2CUQ46.mjs.map +0 -7
- package/dist/lib/node/chunk-5RUIFUEC.cjs +0 -334
- package/dist/lib/node/chunk-5RUIFUEC.cjs.map +0 -7
- package/dist/lib/node/chunk-FYOAVV65.cjs +0 -188
- package/dist/lib/node/chunk-FYOAVV65.cjs.map +0 -7
- package/dist/lib/node/devtools/index.cjs +0 -62
- package/dist/lib/node/devtools/index.cjs.map +0 -7
- package/dist/lib/node/echo/index.cjs +0 -302
- package/dist/lib/node/echo/index.cjs.map +0 -7
- package/dist/lib/node/halo/index.cjs +0 -123
- package/dist/lib/node/halo/index.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -55
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/invitations/index.cjs +0 -39
- package/dist/lib/node/invitations/index.cjs.map +0 -7
- package/dist/lib/node/mesh/index.cjs +0 -37
- package/dist/lib/node/mesh/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/testing/index.cjs +0 -278
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node/worker.cjs +0 -23
- package/dist/lib/node/worker.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-NBTZZNQ5.mjs +0 -314
- package/dist/lib/node-esm/chunk-NBTZZNQ5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UYJUBYMU.mjs.map +0 -7
- package/dist/types/src/echo/useQuery.d.ts +0 -11
- package/dist/types/src/echo/useQuery.d.ts.map +0 -1
- package/dist/types/src/echo/useQuery.test.d.ts +0 -2
- package/dist/types/src/echo/useQuery.test.d.ts.map +0 -1
- package/dist/types/src/echo/useSchema.d.ts +0 -8
- package/dist/types/src/echo/useSchema.d.ts.map +0 -1
- package/dist/types/src/playwright/playwright.config.d.cts +0 -3
- package/dist/types/src/playwright/playwright.config.d.cts.map +0 -1
- package/dist/types/src/playwright/smoke.spec.d.ts +0 -2
- package/dist/types/src/playwright/smoke.spec.d.ts.map +0 -1
- package/project.json +0 -40
- package/src/echo/useQuery.test.tsx +0 -128
- package/src/echo/useQuery.ts +0 -56
- package/src/echo/useSchema.ts +0 -54
- package/src/playwright/playwright.config.cts +0 -18
- package/src/playwright/smoke.spec.ts +0 -26
- package/typedoc/.nojekyll +0 -1
- package/typedoc/assets/hierarchy.js +0 -1
- package/typedoc/assets/highlight.css +0 -99
- package/typedoc/assets/icons.js +0 -18
- package/typedoc/assets/icons.svg +0 -1
- package/typedoc/assets/main.js +0 -60
- package/typedoc/assets/navigation.js +0 -1
- package/typedoc/assets/search.js +0 -1
- package/typedoc/assets/style.css +0 -1640
- package/typedoc/classes/echo.Hypergraph.html +0 -17
- package/typedoc/classes/echo.PropertiesType.html +0 -19
- package/typedoc/classes/echo.QueryResult.html +0 -18
- package/typedoc/classes/halo.KeyStore.html +0 -6
- package/typedoc/classes/index.AgentClientServiceProvider.html +0 -10
- package/typedoc/classes/index.AgentManagerClient.html +0 -22
- package/typedoc/classes/index.AlreadyJoinedError.html +0 -15
- package/typedoc/classes/index.ApiError.html +0 -16
- package/typedoc/classes/index.CancelledError.html +0 -16
- package/typedoc/classes/index.Client.html +0 -51
- package/typedoc/classes/index.ClientServicesProxy.html +0 -12
- package/typedoc/classes/index.Config.html +0 -17
- package/typedoc/classes/index.DataCorruptionError.html +0 -16
- package/typedoc/classes/index.DatabaseError.html +0 -15
- package/typedoc/classes/index.EntityNotFoundError.html +0 -15
- package/typedoc/classes/index.FakeAgentHostingProvider.html +0 -7
- package/typedoc/classes/index.IFrameManager.html +0 -6
- package/typedoc/classes/index.IdentityNotInitializedError.html +0 -15
- package/typedoc/classes/index.InvalidConfigError.html +0 -16
- package/typedoc/classes/index.InvalidInvitationError.html +0 -15
- package/typedoc/classes/index.InvalidInvitationExtensionRoleError.html +0 -16
- package/typedoc/classes/index.InvalidStorageVersionError.html +0 -15
- package/typedoc/classes/index.LocalClientServices.html +0 -12
- package/typedoc/classes/index.PublicKey.html +0 -55
- package/typedoc/classes/index.RemoteServiceConnectionError.html +0 -15
- package/typedoc/classes/index.RemoteServiceConnectionTimeout.html +0 -15
- package/typedoc/classes/index.RpcClosedError.html +0 -15
- package/typedoc/classes/index.RpcNotOpenError.html +0 -15
- package/typedoc/classes/index.SharedWorkerConnection.html +0 -5
- package/typedoc/classes/index.Shell.html +0 -35
- package/typedoc/classes/index.ShellManager.html +0 -9
- package/typedoc/classes/index.SystemError.html +0 -16
- package/typedoc/classes/index.UnknownModelError.html +0 -15
- package/typedoc/classes/index.WorkerClientServices.html +0 -12
- package/typedoc/classes/invitations.AuthenticatingInvitationObservable.html +0 -30
- package/typedoc/classes/invitations.CancellableInvitationObservable.html +0 -29
- package/typedoc/classes/invitations.InvitationEncoder.html +0 -5
- package/typedoc/classes/invitations.InvitationsProxy.html +0 -12
- package/typedoc/enums/devtools.KeyType.html +0 -9
- package/typedoc/enums/echo.HaloSpaceMember.Role.html +0 -9
- package/typedoc/enums/echo.IndexKind.Kind.html +0 -8
- package/typedoc/enums/echo.QueryOptions.DataLocation.html +0 -6
- package/typedoc/enums/echo.QueryOptions.ShowDeletedOption.html +0 -6
- package/typedoc/enums/echo.ResultFormat.html +0 -10
- package/typedoc/enums/echo.SpaceMember.PresenceState.html +0 -5
- package/typedoc/enums/echo.SpaceState.html +0 -13
- package/typedoc/enums/echo.TextKind.html +0 -5
- package/typedoc/enums/halo.Device.PresenceState.html +0 -6
- package/typedoc/enums/halo.DeviceKind.html +0 -5
- package/typedoc/enums/halo.DeviceType.html +0 -9
- package/typedoc/enums/index.ShellDisplay.html +0 -5
- package/typedoc/enums/index.ShellLayout.html +0 -13
- package/typedoc/enums/index.SystemStatus.html +0 -5
- package/typedoc/enums/invitations.Invitation.AuthMethod.html +0 -6
- package/typedoc/enums/invitations.Invitation.Kind.html +0 -5
- package/typedoc/enums/invitations.Invitation.State.html +0 -13
- package/typedoc/enums/invitations.Invitation.Type.html +0 -6
- package/typedoc/enums/mesh.ConnectionState.html +0 -5
- package/typedoc/functions/devtools.useDevtools.html +0 -1
- package/typedoc/functions/devtools.useStream.html +0 -2
- package/typedoc/functions/echo.useMembers.html +0 -1
- package/typedoc/functions/echo.useQueue.html +0 -2
- package/typedoc/functions/echo.useSchema.html +0 -2
- package/typedoc/functions/echo.useSpace.html +0 -6
- package/typedoc/functions/echo.useSpaceInvitation.html +0 -1
- package/typedoc/functions/echo.useSpaceInvitations.html +0 -1
- package/typedoc/functions/echo.useSpaceSyncState.html +0 -2
- package/typedoc/functions/echo.useSpaces.html +0 -5
- package/typedoc/functions/echo.useSubscription.html +0 -3
- package/typedoc/functions/echo.useSyncState.html +0 -2
- package/typedoc/functions/halo.useContacts.html +0 -4
- package/typedoc/functions/halo.useCredentials.html +0 -1
- package/typedoc/functions/halo.useDevices.html +0 -1
- package/typedoc/functions/halo.useHaloInvitation.html +0 -1
- package/typedoc/functions/halo.useHaloInvitations.html +0 -1
- package/typedoc/functions/halo.useIdentity.html +0 -3
- package/typedoc/functions/halo.useKeyStore.html +0 -3
- package/typedoc/functions/index.AgentHostingProvider.html +0 -2
- package/typedoc/functions/index.useAgentHostingClient.html +0 -1
- package/typedoc/functions/index.useClient.html +0 -3
- package/typedoc/functions/index.useClientStatus.html +0 -1
- package/typedoc/functions/index.useConfig.html +0 -3
- package/typedoc/functions/index.useShell.html +0 -2
- package/typedoc/functions/index.useShellDisplay.html +0 -2
- package/typedoc/functions/index.useStatus.html +0 -1
- package/typedoc/functions/invitations.useInvitationStatus.html +0 -1
- package/typedoc/functions/mesh.useNetworkStatus.html +0 -2
- package/typedoc/hierarchy.html +0 -1
- package/typedoc/index.html +0 -23
- package/typedoc/interfaces/devtools.DevtoolsHook.html +0 -22
- package/typedoc/interfaces/devtools.DevtoolsHost.html +0 -26
- package/typedoc/interfaces/echo.DocAccessor.html +0 -3
- package/typedoc/interfaces/echo.Echo.html +0 -39
- package/typedoc/interfaces/echo.EchoDatabase.html +0 -25
- package/typedoc/interfaces/echo.Expando.html +0 -3
- package/typedoc/interfaces/echo.Filter.html +0 -3
- package/typedoc/interfaces/echo.HaloSpaceMember.html +0 -18
- package/typedoc/interfaces/echo.IDocHandle.html +0 -6
- package/typedoc/interfaces/echo.IndexKind.html +0 -9
- package/typedoc/interfaces/echo.Query.html +0 -34
- package/typedoc/interfaces/echo.QueryOptions.html +0 -39
- package/typedoc/interfaces/echo.Queue.html +0 -17
- package/typedoc/interfaces/echo.Ref.html +0 -32
- package/typedoc/interfaces/echo.Space.html +0 -39
- package/typedoc/interfaces/echo.SpaceMember.html +0 -7
- package/typedoc/interfaces/echo.SpaceSyncState.PeerState.html +0 -14
- package/typedoc/interfaces/echo.SpaceSyncState.html +0 -4
- package/typedoc/interfaces/echo.SubscriptionHandle.html +0 -5
- package/typedoc/interfaces/echo.TypedObject.html +0 -16
- package/typedoc/interfaces/halo.Contact.html +0 -10
- package/typedoc/interfaces/halo.Credential.html +0 -27
- package/typedoc/interfaces/halo.Device.html +0 -11
- package/typedoc/interfaces/halo.Halo.html +0 -16
- package/typedoc/interfaces/halo.Identity.html +0 -15
- package/typedoc/interfaces/index.AgentHostingProviderClient.html +0 -6
- package/typedoc/interfaces/index.AppContextRequest.html +0 -33
- package/typedoc/interfaces/index.ClientServicesProvider.html +0 -9
- package/typedoc/interfaces/index.InvitationUrlRequest.html +0 -9
- package/typedoc/interfaces/index.LayoutRequest.html +0 -29
- package/typedoc/interfaces/index.ShellRuntime.html +0 -15
- package/typedoc/interfaces/invitations.Invitation.html +0 -92
- package/typedoc/interfaces/invitations.Invitations.html +0 -5
- package/typedoc/interfaces/mesh.GossipMessage.html +0 -10
- package/typedoc/interfaces/mesh.NetworkStatus.Signal.html +0 -5
- package/typedoc/interfaces/mesh.NetworkStatus.html +0 -6
- package/typedoc/media/LICENSE +0 -8
- package/typedoc/modules/devtools.html +0 -1
- package/typedoc/modules/echo.Filter.html +0 -1
- package/typedoc/modules/echo.HaloSpaceMember.html +0 -1
- package/typedoc/modules/echo.IndexKind.html +0 -1
- package/typedoc/modules/echo.Query.html +0 -1
- package/typedoc/modules/echo.QueryOptions.html +0 -1
- package/typedoc/modules/echo.Ref.html +0 -2
- package/typedoc/modules/echo.SpaceMember.html +0 -1
- package/typedoc/modules/echo.SpaceSyncState.html +0 -1
- package/typedoc/modules/echo.html +0 -1
- package/typedoc/modules/halo.Device.html +0 -1
- package/typedoc/modules/halo.html +0 -1
- package/typedoc/modules/index.html +0 -1
- package/typedoc/modules/invitations.Invitation.html +0 -1
- package/typedoc/modules/invitations.html +0 -1
- package/typedoc/modules/mesh.NetworkStatus.html +0 -1
- package/typedoc/modules/mesh.html +0 -1
- package/typedoc/modules/worker.html +0 -1
- package/typedoc/modules.html +0 -1
- package/typedoc/types/devtools.MountOptions.html +0 -3
- package/typedoc/types/echo.AnyLiveObject.html +0 -2
- package/typedoc/types/echo.Filter.And.html +0 -1
- package/typedoc/types/echo.Filter.Any.html +0 -1
- package/typedoc/types/echo.Filter.Or.html +0 -1
- package/typedoc/types/echo.Filter.Props.html +0 -1
- package/typedoc/types/echo.Filter.Type.html +0 -1
- package/typedoc/types/echo.Live.html +0 -5
- package/typedoc/types/echo.ObjectMeta.html +0 -1
- package/typedoc/types/echo.ObjectMigration.html +0 -7
- package/typedoc/types/echo.ObjectVersion.html +0 -2
- package/typedoc/types/echo.PeerSyncState.html +0 -1
- package/typedoc/types/echo.Progress.html +0 -3
- package/typedoc/types/echo.PropertiesTypeProps.html +0 -1
- package/typedoc/types/echo.Query.Any.html +0 -1
- package/typedoc/types/echo.Query.TextSearchOptions.html +0 -2
- package/typedoc/types/echo.Query.Type.html +0 -1
- package/typedoc/types/echo.Ref.Target.html +0 -2
- package/typedoc/types/echo.Selection.html +0 -1
- package/typedoc/types/echo.SpaceId.html +0 -6
- package/typedoc/types/echo.SpaceSyncStateMap.html +0 -1
- package/typedoc/types/echo.UseQueueOptions.html +0 -2
- package/typedoc/types/echo.UseSpacesParams.html +0 -3
- package/typedoc/types/index.AgentHostingProviderProps.html +0 -3
- package/typedoc/types/index.ClientContextProps.html +0 -3
- package/typedoc/types/index.ClientOptions.html +0 -12
- package/typedoc/types/index.ClientProviderProps.html +0 -2
- package/typedoc/types/index.ClientServices.html +0 -15
- package/typedoc/types/index.FromAgentOptions.html +0 -2
- package/typedoc/types/index.PublicKeyLike.html +0 -2
- package/typedoc/types/invitations.InvitationAction.html +0 -1
- package/typedoc/types/invitations.InvitationResult.html +0 -5
- package/typedoc/types/invitations.InvitationStatus.html +0 -15
- package/typedoc/variables/devtools.mountDevtoolsHooks.html +0 -1
- package/typedoc/variables/devtools.unmountDevtoolsHooks.html +0 -1
- package/typedoc/variables/echo.DocAccessor.html +0 -1
- package/typedoc/variables/echo.EchoObjectSchema.html +0 -1
- package/typedoc/variables/echo.Expando.html +0 -1
- package/typedoc/variables/echo.FQ_ID_LENGTH.html +0 -1
- package/typedoc/variables/echo.Filter.html +0 -1
- package/typedoc/variables/echo.OBJECT_ID_LENGTH.html +0 -1
- package/typedoc/variables/echo.ObjectVersion.html +0 -1
- package/typedoc/variables/echo.Query.html +0 -1
- package/typedoc/variables/echo.Queue.html +0 -1
- package/typedoc/variables/echo.ReactiveObjectSchema.html +0 -1
- package/typedoc/variables/echo.Ref.html +0 -2
- package/typedoc/variables/echo.RefArray.html +0 -2
- package/typedoc/variables/echo.SPACE_ID_LENGTH.html +0 -1
- package/typedoc/variables/echo.SpaceId.html +0 -1
- package/typedoc/variables/echo.SpaceSchema.html +0 -1
- package/typedoc/variables/echo.TypedObject.html +0 -3
- package/typedoc/variables/echo.compareForeignKeys.html +0 -1
- package/typedoc/variables/echo.createDocAccessor.html +0 -1
- package/typedoc/variables/echo.createEmptyEdgeSyncState.html +0 -1
- package/typedoc/variables/echo.createObject.html +0 -1
- package/typedoc/variables/echo.createQueueDXN.html +0 -2
- package/typedoc/variables/echo.createSubscription.html +0 -5
- package/typedoc/variables/echo.defineObjectMigration.html +0 -1
- package/typedoc/variables/echo.fromCursor.html +0 -1
- package/typedoc/variables/echo.fullyQualifiedId.html +0 -4
- package/typedoc/variables/echo.getMeta.html +0 -1
- package/typedoc/variables/echo.getObjectCore.html +0 -1
- package/typedoc/variables/echo.getRangeFromCursor.html +0 -1
- package/typedoc/variables/echo.getSchema.html +0 -2
- package/typedoc/variables/echo.getSource.html +0 -4
- package/typedoc/variables/echo.getSpace.html +0 -1
- package/typedoc/variables/echo.getSyncSummary.html +0 -1
- package/typedoc/variables/echo.getTarget.html +0 -4
- package/typedoc/variables/echo.getTextInRange.html +0 -2
- package/typedoc/variables/echo.getType.html +0 -5
- package/typedoc/variables/echo.getTypename.html +0 -6
- package/typedoc/variables/echo.getVersion.html +0 -3
- package/typedoc/variables/echo.importSpace.html +0 -1
- package/typedoc/variables/echo.internalDecodeReference.html +0 -1
- package/typedoc/variables/echo.isEchoObject.html +0 -2
- package/typedoc/variables/echo.isLiveObject.html +0 -2
- package/typedoc/variables/echo.isRelation.html +0 -2
- package/typedoc/variables/echo.isSpace.html +0 -1
- package/typedoc/variables/echo.live.html +0 -3
- package/typedoc/variables/echo.loadObjectReferences.html +0 -7
- package/typedoc/variables/echo.makeRef.html +0 -2
- package/typedoc/variables/echo.parseFullyQualifiedId.html +0 -2
- package/typedoc/variables/echo.parseId.html +0 -1
- package/typedoc/variables/echo.refFromDXN.html +0 -2
- package/typedoc/variables/echo.toCursor.html +0 -1
- package/typedoc/variables/echo.toCursorRange.html +0 -1
- package/typedoc/variables/echo.updateText.html +0 -6
- package/typedoc/variables/echo.useQuery.html +0 -2
- package/typedoc/variables/index.AgentHostingContext.html +0 -1
- package/typedoc/variables/index.ClientProvider.html +0 -3
- package/typedoc/variables/index.DXOS_VERSION.html +0 -1
- package/typedoc/variables/index.Defaults.html +0 -2
- package/typedoc/variables/index.Dynamics.html +0 -2
- package/typedoc/variables/index.Envs.html +0 -2
- package/typedoc/variables/index.Local.html +0 -2
- package/typedoc/variables/index.Remote.html +0 -1
- package/typedoc/variables/index.Storage.html +0 -2
- package/typedoc/variables/index.createClientServices.html +0 -4
- package/typedoc/variables/index.fromAgent.html +0 -2
- package/typedoc/variables/index.fromHost.html +0 -2
- package/typedoc/variables/index.fromSocket.html +0 -2
- package/typedoc/variables/index.fromWorker.html +0 -2
- package/typedoc/variables/index.getUnixSocket.html +0 -1
- package/typedoc/variables/index.resolveRef.html +0 -1
- package/typedoc/variables/index.useMulticastObservable.html +0 -3
- package/typedoc/variables/worker.getWorkerServiceHost.html +0 -1
- package/typedoc/variables/worker.onconnect.html +0 -1
|
@@ -1,45 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useInvitationStatus
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YHE6WD44.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useClient
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3LVU7RNK.mjs";
|
|
7
|
+
import "../chunk-CZMIVAGI.mjs";
|
|
7
8
|
|
|
8
|
-
//
|
|
9
|
+
// src/echo/index.ts
|
|
9
10
|
export * from "@dxos/client/echo";
|
|
11
|
+
export * from "@dxos/echo-react";
|
|
10
12
|
|
|
11
|
-
//
|
|
13
|
+
// src/echo/useMembers.ts
|
|
12
14
|
import { MulticastObservable } from "@dxos/async";
|
|
15
|
+
import { PublicKey as PublicKey2 } from "@dxos/client";
|
|
13
16
|
import { HaloSpaceMember } from "@dxos/client/echo";
|
|
14
17
|
import { useMulticastObservable as useMulticastObservable2 } from "@dxos/react-hooks";
|
|
15
18
|
|
|
16
|
-
//
|
|
17
|
-
import {
|
|
19
|
+
// src/echo/useSpaces.ts
|
|
20
|
+
import { PublicKey } from "@dxos/client";
|
|
18
21
|
import { SpaceState } from "@dxos/client/echo";
|
|
19
22
|
import { useMulticastObservable } from "@dxos/react-hooks";
|
|
20
|
-
var useSpace = (
|
|
23
|
+
var useSpace = (spaceId) => {
|
|
21
24
|
const client = useClient();
|
|
22
25
|
const spaces = useMulticastObservable(client.spaces);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (spaceKeyLike) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const timeout = setTimeout(async () => {
|
|
29
|
-
await client.spaces.waitUntilReady();
|
|
30
|
-
setReady(true);
|
|
31
|
-
});
|
|
32
|
-
return () => clearTimeout(timeout);
|
|
33
|
-
}, [
|
|
34
|
-
client,
|
|
35
|
-
spaceKeyLike
|
|
36
|
-
]);
|
|
37
|
-
if (spaceKeyLike) {
|
|
38
|
-
return spaces.find((space) => space.key.equals(spaceKeyLike) || space.id === spaceKeyLike);
|
|
39
|
-
}
|
|
40
|
-
if (ready && client.halo.identity.get()) {
|
|
41
|
-
return client.spaces.default;
|
|
26
|
+
if (!spaceId) {
|
|
27
|
+
return void 0;
|
|
42
28
|
}
|
|
29
|
+
return spaces.find((space) => {
|
|
30
|
+
if (spaceId instanceof PublicKey) {
|
|
31
|
+
return space.key.equals(spaceId);
|
|
32
|
+
}
|
|
33
|
+
return space.id === spaceId;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var useDatabase = (spaceId) => {
|
|
37
|
+
const space = useSpace(spaceId);
|
|
38
|
+
return space?.db;
|
|
43
39
|
};
|
|
44
40
|
var useSpaces = ({ all = false } = {}) => {
|
|
45
41
|
const client = useClient();
|
|
@@ -47,55 +43,24 @@ var useSpaces = ({ all = false } = {}) => {
|
|
|
47
43
|
return spaces.filter((space) => all || space.state.get() === SpaceState.SPACE_READY);
|
|
48
44
|
};
|
|
49
45
|
|
|
50
|
-
//
|
|
46
|
+
// src/echo/useMembers.ts
|
|
51
47
|
var useMembers = (spaceKey) => {
|
|
52
48
|
const spaces = useSpaces({
|
|
53
49
|
all: true
|
|
54
50
|
});
|
|
55
|
-
const space = spaceKey ? spaces.find((space2) => space2.key.equals(spaceKey)) : void 0;
|
|
51
|
+
const space = spaceKey ? spaces.find((space2) => spaceKey instanceof PublicKey2 ? space2.key.equals(spaceKey) : space2.id === spaceKey) : void 0;
|
|
56
52
|
const members = useMulticastObservable2(space?.members ?? MulticastObservable.empty()) ?? [];
|
|
57
53
|
return members.filter((member) => member.role !== HaloSpaceMember.Role.REMOVED);
|
|
58
54
|
};
|
|
59
55
|
|
|
60
|
-
//
|
|
61
|
-
import { useMemo,
|
|
62
|
-
import { Filter, Query, isSpace } from "@dxos/client/echo";
|
|
63
|
-
var EMPTY_ARRAY = [];
|
|
64
|
-
var noop = () => {
|
|
65
|
-
};
|
|
66
|
-
var useQuery = (spaceOrEcho, queryOrFilter, deps) => {
|
|
67
|
-
const query = Filter.is(queryOrFilter) ? Query.select(queryOrFilter) : queryOrFilter;
|
|
68
|
-
const { getObjects, subscribe } = useMemo(() => {
|
|
69
|
-
let subscribed = false;
|
|
70
|
-
const queryResult = spaceOrEcho === void 0 ? void 0 : isSpace(spaceOrEcho) ? spaceOrEcho.db.query(query) : spaceOrEcho.query(query);
|
|
71
|
-
return {
|
|
72
|
-
getObjects: () => subscribed && queryResult ? queryResult.objects : EMPTY_ARRAY,
|
|
73
|
-
subscribe: (cb) => {
|
|
74
|
-
subscribed = true;
|
|
75
|
-
const unsubscribe = queryResult?.subscribe(cb) ?? noop;
|
|
76
|
-
return () => {
|
|
77
|
-
unsubscribe?.();
|
|
78
|
-
subscribed = false;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
}, [
|
|
83
|
-
spaceOrEcho,
|
|
84
|
-
JSON.stringify(query.ast),
|
|
85
|
-
...deps ?? []
|
|
86
|
-
]);
|
|
87
|
-
const objects = useSyncExternalStore(subscribe, getObjects);
|
|
88
|
-
return objects ?? [];
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
// packages/sdk/react-client/src/echo/useQueue.ts
|
|
92
|
-
import { useEffect as useEffect2, useMemo as useMemo2, useRef } from "react";
|
|
56
|
+
// src/echo/useQueue.ts
|
|
57
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
93
58
|
import { raise } from "@dxos/debug";
|
|
94
59
|
var MIN_POLL_INTERVAL = 1e3;
|
|
95
60
|
var useQueue = (queueDxn, options = {}) => {
|
|
96
61
|
const client = useClient();
|
|
97
62
|
const mountedRef = useRef(true);
|
|
98
|
-
const queue =
|
|
63
|
+
const queue = useMemo(() => {
|
|
99
64
|
if (!queueDxn) {
|
|
100
65
|
return void 0;
|
|
101
66
|
}
|
|
@@ -105,12 +70,12 @@ var useQueue = (queueDxn, options = {}) => {
|
|
|
105
70
|
client,
|
|
106
71
|
queueDxn?.toString()
|
|
107
72
|
]);
|
|
108
|
-
|
|
73
|
+
useEffect(() => {
|
|
109
74
|
void queue?.refresh();
|
|
110
75
|
}, [
|
|
111
76
|
queue
|
|
112
77
|
]);
|
|
113
|
-
|
|
78
|
+
useEffect(() => {
|
|
114
79
|
let timeout;
|
|
115
80
|
mountedRef.current = true;
|
|
116
81
|
const poll = () => {
|
|
@@ -137,71 +102,42 @@ var useQueue = (queueDxn, options = {}) => {
|
|
|
137
102
|
return queue;
|
|
138
103
|
};
|
|
139
104
|
|
|
140
|
-
//
|
|
141
|
-
import { useMemo as
|
|
142
|
-
var useSchema = (client, space, typename) => {
|
|
143
|
-
const { subscribe, getSchema } = useMemo3(() => {
|
|
144
|
-
if (!typename || !space) {
|
|
145
|
-
return {
|
|
146
|
-
subscribe: () => () => {
|
|
147
|
-
},
|
|
148
|
-
getSchema: () => void 0
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
const staticSchema = client.graph.schemaRegistry.getSchema(typename);
|
|
152
|
-
if (staticSchema) {
|
|
153
|
-
return {
|
|
154
|
-
subscribe: () => () => {
|
|
155
|
-
},
|
|
156
|
-
getSchema: () => staticSchema
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
const query = space.db.schemaRegistry.query({
|
|
160
|
-
typename
|
|
161
|
-
});
|
|
162
|
-
const initialResult = query.runSync()[0];
|
|
163
|
-
let currentSchema = initialResult;
|
|
164
|
-
return {
|
|
165
|
-
subscribe: (onStoreChange) => {
|
|
166
|
-
const unsubscribe = query.subscribe(() => {
|
|
167
|
-
currentSchema = query.results[0];
|
|
168
|
-
onStoreChange();
|
|
169
|
-
});
|
|
170
|
-
return unsubscribe;
|
|
171
|
-
},
|
|
172
|
-
getSchema: () => currentSchema
|
|
173
|
-
};
|
|
174
|
-
}, [
|
|
175
|
-
typename,
|
|
176
|
-
space
|
|
177
|
-
]);
|
|
178
|
-
return useSyncExternalStore2(subscribe, getSchema);
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// packages/sdk/react-client/src/echo/useSpaceInvitations.ts
|
|
182
|
-
import { useMemo as useMemo4 } from "react";
|
|
105
|
+
// src/echo/useSpaceInvitations.ts
|
|
106
|
+
import { useMemo as useMemo2 } from "react";
|
|
183
107
|
import { MulticastObservable as MulticastObservable2 } from "@dxos/async";
|
|
184
108
|
import { useMulticastObservable as useMulticastObservable3 } from "@dxos/react-hooks";
|
|
185
|
-
var useSpaceInvitations = (
|
|
186
|
-
const space = useSpace(
|
|
109
|
+
var useSpaceInvitations = (spaceId) => {
|
|
110
|
+
const space = useSpace(spaceId);
|
|
187
111
|
return useMulticastObservable3(space?.invitations ?? MulticastObservable2.empty()) ?? [];
|
|
188
112
|
};
|
|
189
|
-
var useSpaceInvitation = (
|
|
190
|
-
const invitations = useSpaceInvitations(
|
|
191
|
-
const invitation =
|
|
113
|
+
var useSpaceInvitation = (spaceId, invitationId) => {
|
|
114
|
+
const invitations = useSpaceInvitations(spaceId);
|
|
115
|
+
const invitation = useMemo2(() => invitations.find((invitation2) => invitation2.get().invitationId === invitationId), [
|
|
192
116
|
invitations
|
|
193
117
|
]);
|
|
194
118
|
return useInvitationStatus(invitation);
|
|
195
119
|
};
|
|
196
120
|
|
|
197
|
-
//
|
|
198
|
-
import {
|
|
121
|
+
// src/echo/useSpaceProperties.ts
|
|
122
|
+
import { MulticastObservable as MulticastObservable3 } from "@dxos/async";
|
|
123
|
+
import { SpaceState as SpaceState2 } from "@dxos/client/echo";
|
|
124
|
+
import { useObject } from "@dxos/echo-react";
|
|
125
|
+
import { useMulticastObservable as useMulticastObservable4 } from "@dxos/react-hooks";
|
|
126
|
+
var useSpaceProperties = (spaceId) => {
|
|
127
|
+
const space = useSpace(spaceId);
|
|
128
|
+
const spaceState = useMulticastObservable4(space?.state ?? MulticastObservable3.empty());
|
|
129
|
+
const properties = spaceState === SpaceState2.SPACE_READY ? space?.properties : void 0;
|
|
130
|
+
return useObject(properties);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/echo/useSubscription.ts
|
|
134
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
199
135
|
import { createSubscription } from "@dxos/client/echo";
|
|
200
136
|
var useSubscription = (cb, selection) => {
|
|
201
137
|
const callbackRef = useRef2(cb);
|
|
202
138
|
callbackRef.current = cb;
|
|
203
|
-
const subscriptionRef = useRef2();
|
|
204
|
-
|
|
139
|
+
const subscriptionRef = useRef2(null);
|
|
140
|
+
useEffect2(() => {
|
|
205
141
|
subscriptionRef.current = createSubscription(() => {
|
|
206
142
|
callbackRef.current();
|
|
207
143
|
});
|
|
@@ -211,26 +147,24 @@ var useSubscription = (cb, selection) => {
|
|
|
211
147
|
return subscriptionRef.current;
|
|
212
148
|
};
|
|
213
149
|
|
|
214
|
-
//
|
|
215
|
-
import { useEffect as
|
|
150
|
+
// src/echo/useSyncState.ts
|
|
151
|
+
import { useEffect as useEffect3, useState } from "react";
|
|
216
152
|
import { Context } from "@dxos/context";
|
|
217
153
|
import { EdgeService } from "@dxos/protocols";
|
|
218
|
-
|
|
219
|
-
var
|
|
154
|
+
import { compositeKey } from "@dxos/util";
|
|
155
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/sdk/react-client/src/echo/useSyncState.ts";
|
|
156
|
+
var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(compositeKey(EdgeService.AUTOMERGE_REPLICATOR, spaceId));
|
|
220
157
|
var useSyncState = () => {
|
|
221
158
|
const client = useClient();
|
|
222
|
-
const [spaceState, setSpaceState] =
|
|
223
|
-
|
|
224
|
-
const ctx = new Context(void 0, {
|
|
225
|
-
F: __dxlog_file,
|
|
226
|
-
L: 25
|
|
227
|
-
});
|
|
159
|
+
const [spaceState, setSpaceState] = useState({});
|
|
160
|
+
useEffect3(() => {
|
|
161
|
+
const ctx = new Context(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 16 });
|
|
228
162
|
const createSubscriptions = (spaces) => {
|
|
229
163
|
for (const space of spaces) {
|
|
230
164
|
if (spaceState[space.id]) {
|
|
231
165
|
continue;
|
|
232
166
|
}
|
|
233
|
-
ctx.onDispose(space.
|
|
167
|
+
ctx.onDispose(space.internal.db.subscribeToSyncState(ctx, ({ peers = [] }) => {
|
|
234
168
|
const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));
|
|
235
169
|
if (syncState) {
|
|
236
170
|
setSpaceState((spaceState2) => ({
|
|
@@ -254,13 +188,10 @@ var useSyncState = () => {
|
|
|
254
188
|
return spaceState;
|
|
255
189
|
};
|
|
256
190
|
var useSpaceSyncState = (space) => {
|
|
257
|
-
const [spaceState, setSpaceState] =
|
|
258
|
-
|
|
259
|
-
const ctx = new Context(void 0, {
|
|
260
|
-
|
|
261
|
-
L: 64
|
|
262
|
-
});
|
|
263
|
-
space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
|
|
191
|
+
const [spaceState, setSpaceState] = useState();
|
|
192
|
+
useEffect3(() => {
|
|
193
|
+
const ctx = new Context(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 51 });
|
|
194
|
+
space.internal.db.subscribeToSyncState(ctx, ({ peers = [] }) => {
|
|
264
195
|
const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));
|
|
265
196
|
if (syncState) {
|
|
266
197
|
setSpaceState(syncState);
|
|
@@ -275,13 +206,13 @@ var useSpaceSyncState = (space) => {
|
|
|
275
206
|
return spaceState;
|
|
276
207
|
};
|
|
277
208
|
export {
|
|
209
|
+
useDatabase,
|
|
278
210
|
useMembers,
|
|
279
|
-
useQuery,
|
|
280
211
|
useQueue,
|
|
281
|
-
useSchema,
|
|
282
212
|
useSpace,
|
|
283
213
|
useSpaceInvitation,
|
|
284
214
|
useSpaceInvitations,
|
|
215
|
+
useSpaceProperties,
|
|
285
216
|
useSpaceSyncState,
|
|
286
217
|
useSpaces,
|
|
287
218
|
useSubscription,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/echo/index.ts", "../../../../src/echo/useMembers.ts", "../../../../src/echo/useSpaces.ts", "../../../../src/echo/
|
|
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": "
|
|
6
|
-
"names": ["MulticastObservable", "
|
|
3
|
+
"sources": ["../../../../src/echo/index.ts", "../../../../src/echo/useMembers.ts", "../../../../src/echo/useSpaces.ts", "../../../../src/echo/useQueue.ts", "../../../../src/echo/useSpaceInvitations.ts", "../../../../src/echo/useSpaceProperties.ts", "../../../../src/echo/useSubscription.ts", "../../../../src/echo/useSyncState.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nexport * from '@dxos/client/echo';\nexport * from '@dxos/echo-react';\n\nexport * from './useMembers';\nexport * from './useQueue';\nexport * from './useSpaces';\nexport * from './useSpaceInvitations';\nexport * from './useSpaceProperties';\nexport * from './useSubscription';\nexport * from './useSyncState';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { MulticastObservable } from '@dxos/async';\nimport { PublicKey, type PublicKeyLike } 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: PublicKeyLike | undefined): SpaceMember[] => {\n // TODO(dmaretskyi): useSpace hook for spaces that are not ready.\n const spaces = useSpaces({ all: true });\n const space = spaceKey\n ? spaces.find((space) => (spaceKey instanceof PublicKey ? space.key.equals(spaceKey) : space.id === spaceKey))\n : 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 { PublicKey } from '@dxos/client';\nimport { type Space, type SpaceId, 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 id.\n * The space is not guaranteed to be in the ready state.\n * Returns undefined if no id is provided.\n * Requires a ClientProvider somewhere in the parent tree.\n *\n * @param spaceId the id of the space to look for.\n */\n// TODO(wittjosiah): Currently unable to remove `PublicKey` from this api.\n// When initially joining a space that is all that is returned.\nexport const useSpace = (spaceId?: SpaceId | PublicKey): Space | undefined => {\n const client = useClient();\n const spaces = useMulticastObservable<Space[]>(client.spaces);\n if (!spaceId) {\n return undefined;\n }\n\n return spaces.find((space) => {\n if (spaceId instanceof PublicKey) {\n return space.key.equals(spaceId);\n }\n\n return space.id === spaceId;\n });\n};\n\n/**\n * Get a Space database by the id of the space.\n * The space is not guaranteed to be in the ready state.\n * Returns undefined if no id is provided.\n * Requires a ClientProvider somewhere in the parent tree.\n *\n * @param spaceId the id of the space to look for.\n * @deprecated Use useSpace.\n */\nexport const useDatabase = (spaceId?: SpaceId): Space['db'] | undefined => {\n const space = useSpace(spaceId);\n return space?.db;\n};\n\nexport type UseSpacesProps = {\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 }: UseSpacesProps = {}): 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 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 Entity } 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 * @deprecated Use `useQuery` instead.\n */\n// TODO(dmaretskyi): Move into client package.\n// TODO(dmaretskyi): Consider passing the space into the hook to support queue DXNs without space id.\nexport const useQueue = <T extends Entity.Unknown>(\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 2022 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { MulticastObservable } from '@dxos/async';\nimport { type PublicKey } from '@dxos/client';\nimport { type SpaceId } from '@dxos/client/echo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { type CancellableInvitationObservable, useInvitationStatus } from '../invitations';\nimport { useSpace } from './useSpaces';\n\n// TODO(wittjosiah): Currently unable to remove `PublicKey` from this api.\n// When initially joining a space that is all that is returned.\nexport const useSpaceInvitations = (spaceId?: SpaceId | PublicKey): CancellableInvitationObservable[] => {\n const space = useSpace(spaceId);\n return useMulticastObservable(space?.invitations ?? MulticastObservable.empty()) ?? [];\n};\n\n// TODO(wittjosiah): Currently unable to remove `PublicKey` from this api.\n// When initially joining a space that is all that is returned.\nexport const useSpaceInvitation = (spaceId?: SpaceId | PublicKey, invitationId?: string) => {\n const invitations = useSpaceInvitations(spaceId);\n const invitation = useMemo(\n () => invitations.find((invitation) => invitation.get().invitationId === invitationId),\n [invitations],\n );\n return useInvitationStatus(invitation);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { MulticastObservable } from '@dxos/async';\nimport { type SpaceProperties, SpaceState } from '@dxos/client/echo';\nimport { type Key, type Obj } from '@dxos/echo';\nimport { type ObjectUpdateCallback, useObject } from '@dxos/echo-react';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useSpace } from './useSpaces';\n\n/**\n * Subscribe to a space's properties with reactive updates.\n * Returns undefined if the space is undefined or not ready yet.\n * Automatically waits for the space to be ready before returning properties.\n *\n * @param spaceId - The space ID to get properties from (can be undefined).\n * @returns A tuple of [snapshot, updateCallback] or [undefined, no-op] if not ready.\n */\nexport const useSpaceProperties = (\n spaceId: Key.SpaceId | undefined,\n): [Obj.Snapshot<SpaceProperties> | undefined, ObjectUpdateCallback<SpaceProperties>] => {\n const space = useSpace(spaceId);\n const spaceState = useMulticastObservable(space?.state ?? MulticastObservable.empty());\n const properties = spaceState === SpaceState.SPACE_READY ? space?.properties : undefined;\n return useObject(properties);\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>(null);\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 Space, type SpaceSyncStateMap } from '@dxos/client/echo';\nimport { Context } from '@dxos/context';\nimport { type SpaceId } from '@dxos/keys';\nimport { EdgeService } from '@dxos/protocols';\nimport { compositeKey } from '@dxos/util';\n\nimport { useClient } from '../client';\n\nconst isEdgePeerId = (peerId: string, spaceId: SpaceId) =>\n peerId.startsWith(compositeKey(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.internal.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.internal.db.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": "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",
|
|
6
|
+
"names": ["MulticastObservable", "PublicKey", "HaloSpaceMember", "useMulticastObservable", "PublicKey", "SpaceState", "useMulticastObservable", "useSpace", "spaceId", "client", "useClient", "spaces", "useMulticastObservable", "undefined", "find", "space", "PublicKey", "key", "equals", "id", "useDatabase", "db", "useSpaces", "all", "filter", "state", "get", "SpaceState", "SPACE_READY", "useMembers", "spaceKey", "spaces", "useSpaces", "all", "space", "find", "PublicKey", "key", "equals", "id", "undefined", "members", "useMulticastObservable", "MulticastObservable", "empty", "filter", "member", "role", "HaloSpaceMember", "Role", "REMOVED", "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", "MulticastObservable", "useMulticastObservable", "useSpaceInvitations", "spaceId", "space", "useSpace", "useMulticastObservable", "invitations", "MulticastObservable", "empty", "useSpaceInvitation", "invitationId", "invitation", "useMemo", "find", "get", "useInvitationStatus", "MulticastObservable", "SpaceState", "useObject", "useMulticastObservable", "useSpaceProperties", "spaceId", "space", "useSpace", "spaceState", "useMulticastObservable", "state", "MulticastObservable", "empty", "properties", "SpaceState", "SPACE_READY", "undefined", "useObject", "useEffect", "useRef", "createSubscription", "useSubscription", "cb", "selection", "callbackRef", "current", "subscriptionRef", "unsubscribe", "update", "useEffect", "useState", "Context", "EdgeService", "compositeKey", "isEdgePeerId", "spaceState", "setSpaceState", "useEffect", "Context", "createSubscriptions", "space", "spaces", "id", "onDispose", "syncState", "client", "internal", "peers", "find", "state"]
|
|
7
7
|
}
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useInvitationStatus
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YHE6WD44.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useClient
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3LVU7RNK.mjs";
|
|
7
|
+
import "../chunk-CZMIVAGI.mjs";
|
|
7
8
|
|
|
8
|
-
//
|
|
9
|
+
// src/halo/index.ts
|
|
9
10
|
import { Device, DeviceKind, DeviceType } from "@dxos/client/halo";
|
|
10
11
|
|
|
11
|
-
//
|
|
12
|
+
// src/halo/useContacts.ts
|
|
12
13
|
import { useMulticastObservable } from "@dxos/react-hooks";
|
|
13
14
|
var useContacts = () => {
|
|
14
15
|
const client = useClient();
|
|
15
16
|
return useMulticastObservable(client.halo.contacts);
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
//
|
|
19
|
+
// src/halo/useCredentials.ts
|
|
19
20
|
import { useMulticastObservable as useMulticastObservable2 } from "@dxos/react-hooks";
|
|
20
21
|
var useCredentials = () => {
|
|
21
22
|
const client = useClient();
|
|
22
23
|
return useMulticastObservable2(client.halo.credentials);
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
//
|
|
26
|
+
// src/halo/useDevices.ts
|
|
26
27
|
import { useMulticastObservable as useMulticastObservable3 } from "@dxos/react-hooks";
|
|
27
28
|
var useDevices = () => {
|
|
28
29
|
const client = useClient();
|
|
29
30
|
return useMulticastObservable3(client.halo.devices);
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
//
|
|
33
|
+
// src/halo/useHaloInvitations.ts
|
|
33
34
|
import { useMemo } from "react";
|
|
34
35
|
import { useMulticastObservable as useMulticastObservable4 } from "@dxos/react-hooks";
|
|
35
36
|
var useHaloInvitations = () => {
|
|
@@ -44,19 +45,20 @@ var useHaloInvitation = (invitationId) => {
|
|
|
44
45
|
return useInvitationStatus(invitation);
|
|
45
46
|
};
|
|
46
47
|
|
|
47
|
-
//
|
|
48
|
+
// src/halo/useIdentity.ts
|
|
48
49
|
import { useMulticastObservable as useMulticastObservable5 } from "@dxos/react-hooks";
|
|
49
50
|
var useIdentity = () => {
|
|
50
51
|
const client = useClient();
|
|
51
52
|
return useMulticastObservable5(client.halo.identity);
|
|
52
53
|
};
|
|
53
54
|
|
|
54
|
-
//
|
|
55
|
+
// src/halo/useKeyStore.ts
|
|
55
56
|
import { useMemo as useMemo2, useReducer } from "react";
|
|
56
57
|
var KeyStore = class {
|
|
58
|
+
_defaultKeys;
|
|
59
|
+
_keyMap = /* @__PURE__ */ new Map();
|
|
57
60
|
constructor(_defaultKeys = []) {
|
|
58
61
|
this._defaultKeys = _defaultKeys;
|
|
59
|
-
this._keyMap = /* @__PURE__ */ new Map();
|
|
60
62
|
}
|
|
61
63
|
get map() {
|
|
62
64
|
return this._keyMap;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/halo/index.ts", "../../../../src/halo/useContacts.ts", "../../../../src/halo/useCredentials.ts", "../../../../src/halo/useDevices.ts", "../../../../src/halo/useHaloInvitations.ts", "../../../../src/halo/useIdentity.ts", "../../../../src/halo/useKeyStore.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n type Credential,\n type Contact,\n type Identity,\n type Halo,\n Device,\n DeviceKind,\n DeviceType,\n} from '@dxos/client/halo';\n\nexport * from './useContacts';\nexport * from './useCredentials';\nexport * from './useDevices';\nexport * from './useHaloInvitations';\nexport * from './useIdentity';\nexport * from './useKeyStore';\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport type { Contact } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\n/**\n * Returns all known Contacts across all Spaces.\n * Contacts are known members of a common Space.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useContacts = (): Contact[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.contacts);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport type { Credential } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\nexport const useCredentials = (): Credential[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.credentials);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport type { Device } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\nexport const useDevices = (): Device[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.devices);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Device", "DeviceKind", "DeviceType", "useMulticastObservable", "useContacts", "client", "useClient", "useMulticastObservable", "halo", "contacts", "useMulticastObservable", "useCredentials", "client", "useClient", "useMulticastObservable", "halo", "credentials", "useMulticastObservable", "useDevices", "client", "useClient", "useMulticastObservable", "halo", "devices", "useMemo", "useMulticastObservable", "useHaloInvitations", "client", "useClient", "useMulticastObservable", "halo", "invitations", "useHaloInvitation", "invitationId", "invitation", "useMemo", "find", "get", "useInvitationStatus", "useMulticastObservable", "useIdentity", "client", "useClient", "useMulticastObservable", "halo", "identity", "useMemo", "useReducer", "KeyStore", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n type Credential,\n type Contact,\n type Identity,\n type Halo,\n Device,\n DeviceKind,\n DeviceType,\n} from '@dxos/client/halo';\n\nexport * from './useContacts';\nexport * from './useCredentials';\nexport * from './useDevices';\nexport * from './useHaloInvitations';\nexport * from './useIdentity';\nexport * from './useKeyStore';\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport type { Contact } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\n/**\n * Returns all known Contacts across all Spaces.\n * Contacts are known members of a common Space.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useContacts = (): Contact[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.contacts);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport type { Credential } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\nexport const useCredentials = (): Credential[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.credentials);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport type { Device } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\nexport const useDevices = (): Device[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.devices);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\nimport { type CancellableInvitationObservable, useInvitationStatus } from '../invitations';\n\nexport const useHaloInvitations = (): CancellableInvitationObservable[] => {\n const client = useClient();\n return useMulticastObservable(client.halo.invitations);\n};\n\nexport const useHaloInvitation = (invitationId?: string) => {\n const invitations = useHaloInvitations();\n const invitation = useMemo(\n () => invitations.find((invitation) => invitation.get().invitationId === invitationId),\n [invitations],\n );\n return useInvitationStatus(invitation);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Identity } from '@dxos/client/halo';\nimport { useMulticastObservable } from '@dxos/react-hooks';\n\nimport { useClient } from '../client';\n\n/**\n * Hook returning DXOS identity object.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useIdentity = (): Identity | null => {\n const client = useClient();\n return useMulticastObservable(client.halo.identity);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useMemo, useReducer } from 'react';\n\n// TODO(burdon): Move to settings plugin.\nexport class KeyStore {\n private _keyMap = new Map<string, string>();\n\n constructor(private readonly _defaultKeys: string[] = []) {}\n\n get map() {\n return this._keyMap;\n }\n\n // TODO(burdon): Create subkeys.\n initialize(): this {\n this._defaultKeys.forEach((key) => {\n const value = localStorage.getItem(key);\n this.setKey(key, value ?? '');\n });\n\n return this;\n }\n\n getKey(key: string): void {\n localStorage.getItem(key);\n }\n\n setKey(key: string, value: string): void {\n localStorage.setItem(key, '');\n this._keyMap.set(key, value);\n }\n}\n\n/**\n * Settings store.\n * @deprecated Replace with HALO key store when available.\n */\nexport const useKeyStore = (\n defaultKeys: string[] = [],\n): [Map<string, string>, (key: string, value: string) => void] => {\n const [, forceUpdate] = useReducer((x) => x + 1, 0);\n const store = useMemo(() => new KeyStore(defaultKeys).initialize(), [defaultKeys]);\n const setKey = (key: string, value: string) => {\n store.setKey(key, value);\n forceUpdate();\n };\n\n return [store.map, setKey];\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAKA,SAKEA,QACAC,YACAC,kBACK;;;ACRP,SAASC,8BAA8B;AAShC,IAAMC,cAAc,MAAA;AACzB,QAAMC,SAASC,UAAAA;AACf,SAAOC,uBAAuBF,OAAOG,KAAKC,QAAQ;AACpD;;;ACZA,SAASC,0BAAAA,+BAA8B;AAIhC,IAAMC,iBAAiB,MAAA;AAC5B,QAAMC,SAASC,UAAAA;AACf,SAAOC,wBAAuBF,OAAOG,KAAKC,WAAW;AACvD;;;ACPA,SAASC,0BAAAA,+BAA8B;AAIhC,IAAMC,aAAa,MAAA;AACxB,QAAMC,SAASC,UAAAA;AACf,SAAOC,wBAAuBF,OAAOG,KAAKC,OAAO;AACnD;;;ACRA,SAASC,eAAe;AAExB,SAASC,0BAAAA,+BAA8B;AAKhC,IAAMC,qBAAqB,MAAA;AAChC,QAAMC,SAASC,UAAAA;AACf,SAAOC,wBAAuBF,OAAOG,KAAKC,WAAW;AACvD;AAEO,IAAMC,oBAAoB,CAACC,iBAAAA;AAChC,QAAMF,cAAcL,mBAAAA;AACpB,QAAMQ,aAAaC,QACjB,MAAMJ,YAAYK,KAAK,CAACF,gBAAeA,YAAWG,IAAG,EAAGJ,iBAAiBA,YAAAA,GACzE;IAACF;GAAY;AAEf,SAAOO,oBAAoBJ,UAAAA;AAC7B;;;AClBA,SAASK,0BAAAA,+BAA8B;AAQhC,IAAMC,cAAc,MAAA;AACzB,QAAMC,SAASC,UAAAA;AACf,SAAOC,wBAAuBF,OAAOG,KAAKC,QAAQ;AACpD;;;ACZA,SAASC,WAAAA,UAASC,kBAAkB;AAG7B,IAAMC,WAAN,MAAMA;;EACHC,UAAU,oBAAIC,IAAAA;EAEtB,YAA6BC,eAAyB,CAAA,GAAI;SAA7BA,eAAAA;EAA8B;EAE3D,IAAIC,MAAM;AACR,WAAO,KAAKH;EACd;;EAGAI,aAAmB;AACjB,SAAKF,aAAaG,QAAQ,CAACC,QAAAA;AACzB,YAAMC,QAAQC,aAAaC,QAAQH,GAAAA;AACnC,WAAKI,OAAOJ,KAAKC,SAAS,EAAA;IAC5B,CAAA;AAEA,WAAO;EACT;EAEAI,OAAOL,KAAmB;AACxBE,iBAAaC,QAAQH,GAAAA;EACvB;EAEAI,OAAOJ,KAAaC,OAAqB;AACvCC,iBAAaI,QAAQN,KAAK,EAAA;AAC1B,SAAKN,QAAQa,IAAIP,KAAKC,KAAAA;EACxB;AACF;AAMO,IAAMO,cAAc,CACzBC,cAAwB,CAAA,MAAE;AAE1B,QAAM,CAAA,EAAGC,WAAAA,IAAelB,WAAW,CAACmB,MAAMA,IAAI,GAAG,CAAA;AACjD,QAAMC,QAAQrB,SAAQ,MAAM,IAAIE,SAASgB,WAAAA,EAAaX,WAAU,GAAI;IAACW;GAAY;AACjF,QAAML,SAAS,CAACJ,KAAaC,UAAAA;AAC3BW,UAAMR,OAAOJ,KAAKC,KAAAA;AAClBS,gBAAAA;EACF;AAEA,SAAO;IAACE,MAAMf;IAAKO;;AACrB;",
|
|
6
|
+
"names": ["Device", "DeviceKind", "DeviceType", "useMulticastObservable", "useContacts", "client", "useClient", "useMulticastObservable", "halo", "contacts", "useMulticastObservable", "useCredentials", "client", "useClient", "useMulticastObservable", "halo", "credentials", "useMulticastObservable", "useDevices", "client", "useClient", "useMulticastObservable", "halo", "devices", "useMemo", "useMulticastObservable", "useHaloInvitations", "client", "useClient", "useMulticastObservable", "halo", "invitations", "useHaloInvitation", "invitationId", "invitation", "useMemo", "find", "get", "useInvitationStatus", "useMulticastObservable", "useIdentity", "client", "useClient", "useMulticastObservable", "halo", "identity", "useMemo", "useReducer", "KeyStore", "_keyMap", "Map", "_defaultKeys", "map", "initialize", "forEach", "key", "value", "localStorage", "getItem", "setKey", "getKey", "setItem", "set", "useKeyStore", "defaultKeys", "forceUpdate", "x", "store"]
|
|
7
7
|
}
|