@dxos/react-client 0.9.1-main.c7dcc2e112 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  // src/invitations/index.ts
2
- import { AuthenticatingInvitationObservable, CancellableInvitationObservable, InvitationEncoder as InvitationEncoder2, Invitation as Invitation2, InvitationsProxy } from "@dxos/client/invitations";
2
+ import { AuthenticatingInvitationObservable, CancellableInvitationObservable, Invitation as Invitation2, InvitationEncoder as InvitationEncoder2, InvitationsProxy } from "@dxos/client/invitations";
3
3
 
4
4
  // src/invitations/useInvitationStatus.ts
5
5
  import { useCallback, useEffect, useMemo, useReducer } from "react";
@@ -146,8 +146,8 @@ export {
146
146
  useInvitationStatus,
147
147
  AuthenticatingInvitationObservable,
148
148
  CancellableInvitationObservable,
149
- InvitationEncoder2 as InvitationEncoder,
150
149
  Invitation2 as Invitation,
150
+ InvitationEncoder2 as InvitationEncoder,
151
151
  InvitationsProxy
152
152
  };
153
- //# sourceMappingURL=chunk-YHE6WD44.mjs.map
153
+ //# sourceMappingURL=chunk-SSDQ6NXU.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/invitations/index.ts", "../../../src/invitations/useInvitationStatus.ts"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n AuthenticatingInvitationObservable,\n CancellableInvitationObservable,\n InvitationEncoder,\n Invitation,\n type Invitations,\n InvitationsProxy,\n} from '@dxos/client/invitations';\n\nexport * from './useInvitationStatus';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useCallback, useEffect, useMemo, useReducer } from 'react';\n\nimport { type PublicKey } from '@dxos/client';\nimport {\n type AuthenticatingInvitationObservable,\n type CancellableInvitationObservable,\n Invitation,\n InvitationEncoder,\n} from '@dxos/client/invitations';\nimport { log } from '@dxos/log';\n\nexport type InvitationResult = {\n spaceKey: PublicKey | null;\n identityKey: PublicKey | null;\n swarmKey: PublicKey | null;\n target: string | null;\n};\n\ninterface InvitationReducerState {\n status: Invitation.State; // TODO(burdon): Rename state.\n haltedAt?: Invitation.State;\n result: InvitationResult;\n error?: Error;\n id?: string;\n multiUse?: boolean;\n shareable?: boolean;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n}\n\ntype InvitationPayload = { invitation: Invitation };\n\nexport type InvitationAction =\n | ({\n status:\n | Invitation.State.INIT\n | Invitation.State.CONNECTED\n | Invitation.State.READY_FOR_AUTHENTICATION\n | Invitation.State.AUTHENTICATING;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CONNECTING;\n observable: CancellableInvitationObservable;\n } & InvitationPayload)\n | ({\n status: Invitation.State.SUCCESS;\n result: InvitationResult;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;\n haltedAt: Invitation.State;\n } & InvitationPayload)\n | {\n status: Invitation.State.ERROR;\n error?: Error;\n haltedAt: Invitation.State;\n };\n\nexport type InvitationStatus = {\n id?: string;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n status: Invitation.State;\n haltedAt?: Invitation.State;\n multiUse?: boolean;\n shareable?: boolean;\n result: InvitationResult;\n error?: Error;\n cancel(): void;\n // TODO(wittjosiah): Remove?\n connect(observable: CancellableInvitationObservable): void;\n authenticate(authCode: string): Promise<void>;\n};\n\n// Without private key, the invitation code cannot be created.\n// These invitations are only available to be accepted but not shared.\nconst isShareableInvitation = (invitation: Invitation) =>\n invitation.authMethod !== Invitation.AuthMethod.KNOWN_PUBLIC_KEY || !!invitation.guestKeypair?.privateKey;\n\nexport const useInvitationStatus = (observable?: CancellableInvitationObservable): InvitationStatus => {\n const [state, dispatch] = useReducer(\n (prev: InvitationReducerState, action: InvitationAction): InvitationReducerState => {\n log('useInvitationStatus', { action });\n const invitationProps =\n 'invitation' in action\n ? {\n id: action.invitation.invitationId,\n multiUse: action.invitation.multiUse,\n invitationCode: InvitationEncoder.encode(action.invitation),\n authCode: action.invitation.authCode,\n authMethod: action.invitation.authMethod,\n shareable: isShareableInvitation(action.invitation),\n type: action.invitation.type,\n }\n : {};\n return {\n ...prev,\n ...invitationProps,\n // TODO(burdon): State.\n status: action.status,\n // `invitationObservable`, `secret`, and `result` is persisted between the status-actions that set them.\n result: action.status === Invitation.State.SUCCESS ? action.result : prev.result,\n // `error` gets set each time we enter the error state\n ...(action.status === Invitation.State.ERROR && { error: action.error }),\n // `haltedAt` gets set on only the first error/cancelled/timeout action and reset on any others.\n ...((action.status === Invitation.State.ERROR ||\n action.status === Invitation.State.CANCELLED ||\n action.status === Invitation.State.TIMEOUT) && {\n haltedAt: typeof prev.haltedAt === 'undefined' ? action.haltedAt : prev.haltedAt,\n }),\n };\n },\n null,\n (_arg: null): InvitationReducerState => {\n const invitation = observable?.get();\n return {\n status: Invitation.State.INIT,\n result: { spaceKey: null, identityKey: null, swarmKey: null, target: null },\n id: invitation?.invitationId,\n multiUse: invitation?.multiUse,\n invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,\n authCode: invitation?.authCode,\n authMethod: invitation?.authMethod,\n shareable: invitation ? isShareableInvitation(invitation) : false,\n type: invitation?.type,\n };\n },\n );\n\n // Handle unmount.\n\n useEffect(() => {\n const update = (invitation: Invitation) => {\n switch (invitation.state) {\n case Invitation.State.INIT:\n case Invitation.State.CONNECTED:\n case Invitation.State.READY_FOR_AUTHENTICATION:\n case Invitation.State.AUTHENTICATING: {\n dispatch({\n invitation,\n status: invitation.state,\n });\n break;\n }\n\n case Invitation.State.SUCCESS: {\n dispatch({\n invitation,\n status: invitation.state,\n result: {\n spaceKey: invitation.spaceKey || null,\n identityKey: invitation.identityKey || null,\n swarmKey: invitation.swarmKey || null,\n target: invitation.target || null,\n },\n });\n break;\n }\n\n case Invitation.State.CANCELLED:\n case Invitation.State.TIMEOUT: {\n dispatch({ invitation, status: invitation.state, haltedAt: state.status });\n break;\n }\n }\n };\n\n const subscription = observable?.subscribe(update, (err: Error) => {\n dispatch({ status: Invitation.State.ERROR, error: err, haltedAt: state.status });\n });\n\n const currentState = observable?.get();\n if (currentState) {\n update(currentState);\n }\n\n return () => subscription?.unsubscribe();\n }, [observable, state.status]);\n\n // Return memoized callbacks & values.\n\n const connect = useCallback((observable: CancellableInvitationObservable) => {\n dispatch({ invitation: observable.get(), status: Invitation.State.CONNECTING, observable });\n }, []);\n\n const authenticate = useCallback(\n (authCode: string) => {\n log('authenticating...', { authCode });\n return (observable as AuthenticatingInvitationObservable).authenticate(authCode);\n },\n [observable],\n );\n\n const cancel = useCallback(async () => observable?.cancel(), [observable]);\n\n return useMemo(() => {\n return {\n ...state,\n cancel,\n connect,\n authenticate,\n };\n }, [state, cancel, connect, authenticate]);\n};\n"],
5
- "mappings": ";AAKA,SACEA,oCACAC,iCACAC,qBAAAA,oBACAC,cAAAA,aAEAC,wBACK;;;ACRP,SAASC,aAAaC,WAAWC,SAASC,kBAAkB;AAG5D,SAGEC,YACAC,yBACK;AACP,SAASC,WAAW;AAqEpB,IAAA,eAAA;IAME,wBAA0BH,CAAAA,eACvBI,WAA8BC,eAAAA,WAAAA,WAAAA,oBAAAA,CAAAA,CAAAA,WAAAA,cAAAA;IACzB,sBAAuB,CAAA,eAAA;gBAAEA,QAAAA,IAAAA,WAAAA,CAAAA,MAAAA,WAAAA;AAAO,QAAA,uBAAA;MACpC;qBAGYA,YAAiB,GAACC,cAAY,GAAA,IAAA,GAAA,OAAA,CAAA;UAClCC,kBAAiBC,gBAAmB,SAAA;MACpCC,IAAAA,OAAAA,WAAgBP;MAChBQ,UAAUL,OAAOG,WAAWE;MAC5BC,gBAAYN,kBAAkBM,OAAU,OAAA,UAAA;MACxCC,UAAAA,OAAWC,WAAAA;MACXC,YAAMT,OAAOG,WAAe;MAE9B,WAAC,sBAAA,OAAA,UAAA;MACP,MAAO,OAAA,WAAA;Q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qB1B,YAAiB2B,UAAK,QAAA,CAAA,QAAA;eAAEC;QAAYF,QAAAA,WAAgBX,MAAM;QAAC,OAAA;QAChF,UAAA,MAAA;MAEA,CAAA;IACA,CAAA;UACEc,eAAOC,YAAAA,IAAAA;AACT,QAAA,cAAA;AAEA,aAAaC,YAAAA;IACZ;AAACC,WAAAA,MAAAA,cAAAA,YAAAA;;IAAyB;IAE7B,MAAA;EAEA,CAAA;kBACazB,YAAYyB,CAAAA,gBAAc;aAAIjB;MAAqCiB,YAAAA,YAAAA,IAAAA;MAAW,QAAA,WAAA,MAAA;MACtF,YAAAA;IAEL,CAAA;MAEI9B,CAAAA;uBAA2BO,YAAAA,CAAAA,aAAAA;AAAS,QAAA,qBAAA;MACpC;IAEF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,KAAA,GAAA,OAAA,CAAA;AAACuB,WAAAA,WAAAA,aAAAA,QAAAA;KAAW;IAGd;;QAAyE,SAAA,YAAA,YAAA,YAAA,OAAA,GAAA;IAEzE;;iBAEOC,MAAK;WACRC;MACAC,GAAAA;MACAC;MACF;MACC;IAACH;;IAAeE;IAASC;IAAa;IACzC;;;",
6
- "names": ["AuthenticatingInvitationObservable", "CancellableInvitationObservable", "InvitationEncoder", "Invitation", "InvitationsProxy", "useCallback", "useEffect", "useMemo", "useReducer", "Invitation", "InvitationEncoder", "log", "prev", "action", "invitationId", "multiUse", "invitation", "invitationCode", "authCode", "authMethod", "shareable", "isShareableInvitation", "type", "invitationProps", "status", "result", "INIT", "spaceKey", "identityKey", "swarmKey", "target", "State", "READY_FOR_AUTHENTICATION", "AUTHENTICATING", "dispatch", "haltedAt", "ERROR", "error", "update", "currentState", "subscription", "observable", "state", "cancel", "connect", "authenticate"]
4
+ "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n AuthenticatingInvitationObservable,\n CancellableInvitationObservable,\n Invitation,\n InvitationEncoder,\n type Invitations,\n InvitationsProxy,\n} from '@dxos/client/invitations';\n\nexport * from './useInvitationStatus';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useCallback, useEffect, useMemo, useReducer } from 'react';\n\nimport { type PublicKey } from '@dxos/client';\nimport {\n type AuthenticatingInvitationObservable,\n type CancellableInvitationObservable,\n Invitation,\n InvitationEncoder,\n} from '@dxos/client/invitations';\nimport { log } from '@dxos/log';\n\nexport type InvitationResult = {\n spaceKey: PublicKey | null;\n identityKey: PublicKey | null;\n swarmKey: PublicKey | null;\n target: string | null;\n};\n\ninterface InvitationReducerState {\n status: Invitation.State; // TODO(burdon): Rename state.\n haltedAt?: Invitation.State;\n result: InvitationResult;\n error?: Error;\n id?: string;\n multiUse?: boolean;\n shareable?: boolean;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n}\n\ntype InvitationPayload = { invitation: Invitation };\n\nexport type InvitationAction =\n | ({\n status:\n | Invitation.State.INIT\n | Invitation.State.CONNECTED\n | Invitation.State.READY_FOR_AUTHENTICATION\n | Invitation.State.AUTHENTICATING;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CONNECTING;\n observable: CancellableInvitationObservable;\n } & InvitationPayload)\n | ({\n status: Invitation.State.SUCCESS;\n result: InvitationResult;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;\n haltedAt: Invitation.State;\n } & InvitationPayload)\n | {\n status: Invitation.State.ERROR;\n error?: Error;\n haltedAt: Invitation.State;\n };\n\nexport type InvitationStatus = {\n id?: string;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n status: Invitation.State;\n haltedAt?: Invitation.State;\n multiUse?: boolean;\n shareable?: boolean;\n result: InvitationResult;\n error?: Error;\n cancel(): void;\n // TODO(wittjosiah): Remove?\n connect(observable: CancellableInvitationObservable): void;\n authenticate(authCode: string): Promise<void>;\n};\n\n// Without private key, the invitation code cannot be created.\n// These invitations are only available to be accepted but not shared.\nconst isShareableInvitation = (invitation: Invitation) =>\n invitation.authMethod !== Invitation.AuthMethod.KNOWN_PUBLIC_KEY || !!invitation.guestKeypair?.privateKey;\n\nexport const useInvitationStatus = (observable?: CancellableInvitationObservable): InvitationStatus => {\n const [state, dispatch] = useReducer(\n (prev: InvitationReducerState, action: InvitationAction): InvitationReducerState => {\n log('useInvitationStatus', { action });\n const invitationProps =\n 'invitation' in action\n ? {\n id: action.invitation.invitationId,\n multiUse: action.invitation.multiUse,\n invitationCode: InvitationEncoder.encode(action.invitation),\n authCode: action.invitation.authCode,\n authMethod: action.invitation.authMethod,\n shareable: isShareableInvitation(action.invitation),\n type: action.invitation.type,\n }\n : {};\n return {\n ...prev,\n ...invitationProps,\n // TODO(burdon): State.\n status: action.status,\n // `invitationObservable`, `secret`, and `result` is persisted between the status-actions that set them.\n result: action.status === Invitation.State.SUCCESS ? action.result : prev.result,\n // `error` gets set each time we enter the error state\n ...(action.status === Invitation.State.ERROR && { error: action.error }),\n // `haltedAt` gets set on only the first error/cancelled/timeout action and reset on any others.\n ...((action.status === Invitation.State.ERROR ||\n action.status === Invitation.State.CANCELLED ||\n action.status === Invitation.State.TIMEOUT) && {\n haltedAt: typeof prev.haltedAt === 'undefined' ? action.haltedAt : prev.haltedAt,\n }),\n };\n },\n null,\n (_arg: null): InvitationReducerState => {\n const invitation = observable?.get();\n return {\n status: Invitation.State.INIT,\n result: { spaceKey: null, identityKey: null, swarmKey: null, target: null },\n id: invitation?.invitationId,\n multiUse: invitation?.multiUse,\n invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,\n authCode: invitation?.authCode,\n authMethod: invitation?.authMethod,\n shareable: invitation ? isShareableInvitation(invitation) : false,\n type: invitation?.type,\n };\n },\n );\n\n // Handle unmount.\n\n useEffect(() => {\n const update = (invitation: Invitation) => {\n switch (invitation.state) {\n case Invitation.State.INIT:\n case Invitation.State.CONNECTED:\n case Invitation.State.READY_FOR_AUTHENTICATION:\n case Invitation.State.AUTHENTICATING: {\n dispatch({\n invitation,\n status: invitation.state,\n });\n break;\n }\n\n case Invitation.State.SUCCESS: {\n dispatch({\n invitation,\n status: invitation.state,\n result: {\n spaceKey: invitation.spaceKey || null,\n identityKey: invitation.identityKey || null,\n swarmKey: invitation.swarmKey || null,\n target: invitation.target || null,\n },\n });\n break;\n }\n\n case Invitation.State.CANCELLED:\n case Invitation.State.TIMEOUT: {\n dispatch({ invitation, status: invitation.state, haltedAt: state.status });\n break;\n }\n }\n };\n\n const subscription = observable?.subscribe(update, (err: Error) => {\n dispatch({ status: Invitation.State.ERROR, error: err, haltedAt: state.status });\n });\n\n const currentState = observable?.get();\n if (currentState) {\n update(currentState);\n }\n\n return () => subscription?.unsubscribe();\n }, [observable, state.status]);\n\n // Return memoized callbacks & values.\n\n const connect = useCallback((observable: CancellableInvitationObservable) => {\n dispatch({ invitation: observable.get(), status: Invitation.State.CONNECTING, observable });\n }, []);\n\n const authenticate = useCallback(\n (authCode: string) => {\n log('authenticating...', { authCode });\n return (observable as AuthenticatingInvitationObservable).authenticate(authCode);\n },\n [observable],\n );\n\n const cancel = useCallback(async () => observable?.cancel(), [observable]);\n\n return useMemo(() => {\n return {\n ...state,\n cancel,\n connect,\n authenticate,\n };\n }, [state, cancel, connect, authenticate]);\n};\n"],
5
+ "mappings": ";AAKA,SACEA,oCACAC,iCACAC,cAAAA,aACAC,qBAAAA,oBAEAC,wBACK;;;ACRP,SAASC,aAAaC,WAAWC,SAASC,kBAAkB;AAG5D,SAGEC,YACAC,yBACK;AACP,SAASC,WAAW;AAqEpB,IAAA,eAAA;IAME,wBAA0BH,CAAAA,eACvBI,WAA8BC,eAAAA,WAAAA,WAAAA,oBAAAA,CAAAA,CAAAA,WAAAA,cAAAA;IACzB,sBAAuB,CAAA,eAAA;gBAAEA,QAAAA,IAAAA,WAAAA,CAAAA,MAAAA,WAAAA;AAAO,QAAA,uBAAA;MACpC;qBAGYA,YAAiB,GAACC,cAAY,GAAA,IAAA,GAAA,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oBACVY;cACAC,UAAUb,WAAWa,YAAY;cACjCC,aAAQd,WAAWc,eAAU;cAC/B,UAAA,WAAA,YAAA;cACF,QAAA,WAAA,UAAA;YACA;UACF,CAAA;AAEKrB;QACL;aAA+B,WAAA,MAAA;wBAC7ByB,MAAS;mBAAcV;YAA0BW;YAAuB,QAAA,WAAA;YACxE,UAAA,MAAA;UACF,CAAA;AACF;QACF;MAEA;;yBACqB1B,YAAiB2B,UAAK,QAAA,CAAA,QAAA;eAAEC;QAAYF,QAAAA,WAAgBX,MAAM;QAAC,OAAA;QAChF,UAAA,MAAA;MAEA,CAAA;IACA,CAAA;UACEc,eAAOC,YAAAA,IAAAA;AACT,QAAA,cAAA;AAEA,aAAaC,YAAAA;IACZ;AAACC,WAAAA,MAAAA,cAAAA,YAAAA;;IAAyB;IAE7B,MAAA;EAEA,CAAA;kBACazB,YAAYyB,CAAAA,gBAAc;aAAIjB;MAAqCiB,YAAAA,YAAAA,IAAAA;MAAW,QAAA,WAAA,MAAA;MACtF,YAAAA;IAEL,CAAA;MAEI9B,CAAAA;uBAA2BO,YAAAA,CAAAA,aAAAA;AAAS,QAAA,qBAAA;MACpC;IAEF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,KAAA,GAAA,OAAA,CAAA;AAACuB,WAAAA,WAAAA,aAAAA,QAAAA;KAAW;IAGd;;QAAyE,SAAA,YAAA,YAAA,YAAA,OAAA,GAAA;IAEzE;;iBAEOC,MAAK;WACRC;MACAC,GAAAA;MACAC;MACF;MACC;IAACH;;IAAeE;IAASC;IAAa;IACzC;;;",
6
+ "names": ["AuthenticatingInvitationObservable", "CancellableInvitationObservable", "Invitation", "InvitationEncoder", "InvitationsProxy", "useCallback", "useEffect", "useMemo", "useReducer", "Invitation", "InvitationEncoder", "log", "prev", "action", "invitationId", "multiUse", "invitation", "invitationCode", "authCode", "authMethod", "shareable", "isShareableInvitation", "type", "invitationProps", "status", "result", "INIT", "spaceKey", "identityKey", "swarmKey", "target", "State", "READY_FOR_AUTHENTICATION", "AUTHENTICATING", "dispatch", "haltedAt", "ERROR", "error", "update", "currentState", "subscription", "observable", "state", "cancel", "connect", "authenticate"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useInvitationStatus
3
- } from "../chunk-YHE6WD44.mjs";
3
+ } from "../chunk-SSDQ6NXU.mjs";
4
4
  import {
5
5
  useClient
6
6
  } from "../chunk-3LVU7RNK.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useInvitationStatus
3
- } from "../chunk-YHE6WD44.mjs";
3
+ } from "../chunk-SSDQ6NXU.mjs";
4
4
  import {
5
5
  useClient
6
6
  } from "../chunk-3LVU7RNK.mjs";
@@ -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 { 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;",
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n type Contact,\n type Credential,\n Device,\n DeviceKind,\n DeviceType,\n type Halo,\n type Identity,\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,SAGEA,QACAC,YACAC,kBAGK;;;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
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
  }
@@ -5,7 +5,7 @@ import {
5
5
  InvitationEncoder,
6
6
  InvitationsProxy,
7
7
  useInvitationStatus
8
- } from "../chunk-YHE6WD44.mjs";
8
+ } from "../chunk-SSDQ6NXU.mjs";
9
9
  export {
10
10
  AuthenticatingInvitationObservable,
11
11
  CancellableInvitationObservable,
@@ -1 +1 @@
1
- {"inputs":{"src/client/AgentHostingProvider.tsx":{"bytes":6817,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/banner.ts":{"bytes":3744,"imports":[],"format":"esm"},"src/client/context.ts":{"bytes":1194,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/client/ClientProvider.tsx":{"bytes":15846,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/banner.ts","kind":"import-statement","original":"../banner"},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/client/useClient.ts":{"bytes":1556,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/context.ts","kind":"import-statement","original":"../client/context"}],"format":"esm"},"src/client/useClientStatus.ts":{"bytes":1872,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/client/useConfig.ts":{"bytes":1657,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/client/useShell.ts":{"bytes":2242,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/client/useClient.ts","kind":"import-statement","original":"./useClient"}],"format":"esm"},"src/client/useStatus.ts":{"bytes":1377,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/client/index.ts":{"bytes":1067,"imports":[{"path":"src/client/AgentHostingProvider.tsx","kind":"import-statement","original":"./AgentHostingProvider"},{"path":"src/client/ClientProvider.tsx","kind":"import-statement","original":"./ClientProvider"},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"},{"path":"src/client/useClient.ts","kind":"import-statement","original":"./useClient"},{"path":"src/client/useClientStatus.ts","kind":"import-statement","original":"./useClientStatus"},{"path":"src/client/useConfig.ts","kind":"import-statement","original":"./useConfig"},{"path":"src/client/useShell.ts","kind":"import-statement","original":"./useShell"},{"path":"src/client/useStatus.ts","kind":"import-statement","original":"./useStatus"}],"format":"esm"},"src/devtools/useDevtools.ts":{"bytes":1305,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/devtools/useStream.ts":{"bytes":2683,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/devtools/index.ts":{"bytes":595,"imports":[{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"src/devtools/useDevtools.ts","kind":"import-statement","original":"./useDevtools"},{"path":"src/devtools/useStream.ts","kind":"import-statement","original":"./useStream"}],"format":"esm"},"src/echo/useSpaces.ts":{"bytes":6283,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/useMembers.ts":{"bytes":3380,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"src/invitations/useInvitationStatus.ts":{"bytes":20307,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/invitations/index.ts":{"bytes":1198,"imports":[{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"src/invitations/useInvitationStatus.ts","kind":"import-statement","original":"./useInvitationStatus"}],"format":"esm"},"src/echo/useSpaceInvitations.ts":{"bytes":3945,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/invitations/index.ts","kind":"import-statement","original":"../invitations"},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"src/echo/useSpaceProperties.ts":{"bytes":3500,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"src/echo/useSubscription.ts":{"bytes":3440,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"format":"esm"},"src/echo/useSyncState.ts":{"bytes":7194,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/useFeedSyncState.ts":{"bytes":7676,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/useRegistry.ts":{"bytes":1132,"imports":[{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/index.ts":{"bytes":1331,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"src/echo/useMembers.ts","kind":"import-statement","original":"./useMembers"},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"},{"path":"src/echo/useSpaceInvitations.ts","kind":"import-statement","original":"./useSpaceInvitations"},{"path":"src/echo/useSpaceProperties.ts","kind":"import-statement","original":"./useSpaceProperties"},{"path":"src/echo/useSubscription.ts","kind":"import-statement","original":"./useSubscription"},{"path":"src/echo/useSyncState.ts","kind":"import-statement","original":"./useSyncState"},{"path":"src/echo/useFeedSyncState.ts","kind":"import-statement","original":"./useFeedSyncState"},{"path":"src/echo/useRegistry.ts","kind":"import-statement","original":"./useRegistry"}],"format":"esm"},"src/halo/useContacts.ts":{"bytes":1618,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useCredentials.ts":{"bytes":1250,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useDevices.ts":{"bytes":1202,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useHaloInvitations.ts":{"bytes":2626,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"},{"path":"src/invitations/index.ts","kind":"import-statement","original":"../invitations"}],"format":"esm"},"src/halo/useIdentity.ts":{"bytes":1488,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useKeyStore.ts":{"bytes":4446,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/halo/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"src/halo/useContacts.ts","kind":"import-statement","original":"./useContacts"},{"path":"src/halo/useCredentials.ts","kind":"import-statement","original":"./useCredentials"},{"path":"src/halo/useDevices.ts","kind":"import-statement","original":"./useDevices"},{"path":"src/halo/useHaloInvitations.ts","kind":"import-statement","original":"./useHaloInvitations"},{"path":"src/halo/useIdentity.ts","kind":"import-statement","original":"./useIdentity"},{"path":"src/halo/useKeyStore.ts","kind":"import-statement","original":"./useKeyStore"}],"format":"esm"},"src/index.ts":{"bytes":680,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"./client"}],"format":"esm"},"src/mesh/useNetworkStatus.ts":{"bytes":1408,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/mesh/index.ts":{"bytes":507,"imports":[{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"src/mesh/useNetworkStatus.ts","kind":"import-statement","original":"./useNetworkStatus"}],"format":"esm"},"src/testing/context.tsx":{"bytes":1581,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/testing/ClientRepeater.tsx":{"bytes":10392,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/testing/withClientProvider.tsx":{"bytes":17977,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"},{"path":"src/testing/context.tsx","kind":"import-statement","original":"./context"}],"format":"esm"},"src/testing/index.ts":{"bytes":709,"imports":[{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"src/testing/context.tsx","kind":"import-statement","original":"./context"},{"path":"src/testing/ClientRepeater.tsx","kind":"import-statement","original":"./ClientRepeater"},{"path":"src/testing/withClientProvider.tsx","kind":"import-statement","original":"./withClientProvider"}],"format":"esm"},"src/worker.ts":{"bytes":401,"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/devtools/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2196},"dist/lib/browser/devtools/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["useDevtools","useStream"],"entryPoint":"src/devtools/index.ts","inputs":{"src/devtools/index.ts":{"bytesInOutput":39},"src/devtools/useDevtools.ts":{"bytesInOutput":195},"src/devtools/useStream.ts":{"bytesInOutput":631}},"bytes":1112},"dist/lib/browser/echo/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18838},"dist/lib/browser/echo/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YHE6WD44.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["useDatabase","useFeedSyncState","useMembers","useRegistry","useSpace","useSpaceInvitation","useSpaceInvitations","useSpaceProperties","useSpaceSyncState","useSpaces","useSubscription","useSyncState"],"entryPoint":"src/echo/index.ts","inputs":{"src/echo/index.ts":{"bytesInOutput":69},"src/echo/useMembers.ts":{"bytesInOutput":659},"src/echo/useSpaces.ts":{"bytesInOutput":781},"src/echo/useSpaceInvitations.ts":{"bytesInOutput":660},"src/echo/useSpaceProperties.ts":{"bytesInOutput":563},"src/echo/useSubscription.ts":{"bytesInOutput":508},"src/echo/useSyncState.ts":{"bytesInOutput":1735},"src/echo/useFeedSyncState.ts":{"bytesInOutput":1718},"src/echo/useRegistry.ts":{"bytesInOutput":91}},"bytes":7485},"dist/lib/browser/halo/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6965},"dist/lib/browser/halo/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YHE6WD44.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["Device","DeviceKind","DeviceType","KeyStore","useContacts","useCredentials","useDevices","useHaloInvitation","useHaloInvitations","useIdentity","useKeyStore"],"entryPoint":"src/halo/index.ts","inputs":{"src/halo/index.ts":{"bytesInOutput":68},"src/halo/useContacts.ts":{"bytesInOutput":174},"src/halo/useCredentials.ts":{"bytesInOutput":208},"src/halo/useDevices.ts":{"bytesInOutput":200},"src/halo/useHaloInvitations.ts":{"bytesInOutput":521},"src/halo/useIdentity.ts":{"bytesInOutput":202},"src/halo/useKeyStore.ts":{"bytesInOutput":937}},"bytes":2873},"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7138},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-XT352YI6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["AgentHostingContext","AgentHostingProvider","ClientContext","ClientProvider","useAgentHostingClient","useClient","useClientStatus","useConfig","useMulticastObservable","useShell","useShellDisplay","useStatus"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":90},"src/client/AgentHostingProvider.tsx":{"bytesInOutput":1700},"src/client/useClientStatus.ts":{"bytesInOutput":383},"src/client/useConfig.ts":{"bytesInOutput":234},"src/client/useShell.ts":{"bytesInOutput":377},"src/client/useStatus.ts":{"bytesInOutput":238}},"bytes":3629},"dist/lib/browser/invitations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/invitations/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YHE6WD44.mjs","kind":"import-statement"}],"exports":["AuthenticatingInvitationObservable","CancellableInvitationObservable","Invitation","InvitationEncoder","InvitationsProxy","useInvitationStatus"],"entryPoint":"src/invitations/index.ts","inputs":{},"bytes":388},"dist/lib/browser/chunk-YHE6WD44.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10410},"dist/lib/browser/chunk-YHE6WD44.mjs":{"imports":[{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["AuthenticatingInvitationObservable","CancellableInvitationObservable","Invitation","InvitationEncoder","InvitationsProxy","useInvitationStatus"],"inputs":{"src/invitations/index.ts":{"bytesInOutput":198},"src/invitations/useInvitationStatus.ts":{"bytesInOutput":4615}},"bytes":5128},"dist/lib/browser/mesh/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":936},"dist/lib/browser/mesh/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true}],"exports":["useNetworkStatus"],"entryPoint":"src/mesh/index.ts","inputs":{"src/mesh/index.ts":{"bytesInOutput":35},"src/mesh/useNetworkStatus.ts":{"bytesInOutput":184}},"bytes":425},"dist/lib/browser/chunk-3LVU7RNK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":807},"dist/lib/browser/chunk-3LVU7RNK.mjs":{"imports":[{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["useClient"],"inputs":{"src/client/useClient.ts":{"bytesInOutput":211}},"bytes":364},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15608},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XT352YI6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["ClientRepeater","ClientStory","useClientStory","withClientProvider","withMultiClientProvider"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/index.ts":{"bytesInOutput":38},"src/testing/context.tsx":{"bytesInOutput":254},"src/testing/ClientRepeater.tsx":{"bytesInOutput":1851},"src/testing/withClientProvider.tsx":{"bytesInOutput":4257}},"bytes":6763},"dist/lib/browser/chunk-XT352YI6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9977},"dist/lib/browser/chunk-XT352YI6.mjs":{"imports":[{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["ClientProvider"],"inputs":{"src/client/ClientProvider.tsx":{"bytesInOutput":3513},"src/banner.ts":{"bytesInOutput":817}},"bytes":4546},"dist/lib/browser/chunk-CZMIVAGI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":694},"dist/lib/browser/chunk-CZMIVAGI.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["ClientContext"],"inputs":{"src/client/context.ts":{"bytesInOutput":82}},"bytes":180},"dist/lib/browser/worker.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":206},"dist/lib/browser/worker.mjs":{"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/worker.ts","inputs":{"src/worker.ts":{"bytesInOutput":37}},"bytes":90}}}
1
+ {"inputs":{"src/client/AgentHostingProvider.tsx":{"bytes":6817,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/banner.ts":{"bytes":3744,"imports":[],"format":"esm"},"src/client/context.ts":{"bytes":1194,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/client/ClientProvider.tsx":{"bytes":15846,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/banner.ts","kind":"import-statement","original":"../banner"},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/client/useClient.ts":{"bytes":1556,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/context.ts","kind":"import-statement","original":"../client/context"}],"format":"esm"},"src/client/useClientStatus.ts":{"bytes":1872,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/client/useConfig.ts":{"bytes":1657,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/client/useShell.ts":{"bytes":2242,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/client/useClient.ts","kind":"import-statement","original":"./useClient"}],"format":"esm"},"src/client/useStatus.ts":{"bytes":1377,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/client/index.ts":{"bytes":1067,"imports":[{"path":"src/client/AgentHostingProvider.tsx","kind":"import-statement","original":"./AgentHostingProvider"},{"path":"src/client/ClientProvider.tsx","kind":"import-statement","original":"./ClientProvider"},{"path":"src/client/context.ts","kind":"import-statement","original":"./context"},{"path":"src/client/useClient.ts","kind":"import-statement","original":"./useClient"},{"path":"src/client/useClientStatus.ts","kind":"import-statement","original":"./useClientStatus"},{"path":"src/client/useConfig.ts","kind":"import-statement","original":"./useConfig"},{"path":"src/client/useShell.ts","kind":"import-statement","original":"./useShell"},{"path":"src/client/useStatus.ts","kind":"import-statement","original":"./useStatus"}],"format":"esm"},"src/devtools/useDevtools.ts":{"bytes":1305,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/devtools/useStream.ts":{"bytes":2683,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/devtools/index.ts":{"bytes":595,"imports":[{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"src/devtools/useDevtools.ts","kind":"import-statement","original":"./useDevtools"},{"path":"src/devtools/useStream.ts","kind":"import-statement","original":"./useStream"}],"format":"esm"},"src/echo/useSpaces.ts":{"bytes":6283,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/useMembers.ts":{"bytes":3380,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"src/invitations/useInvitationStatus.ts":{"bytes":20307,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/invitations/index.ts":{"bytes":1198,"imports":[{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"src/invitations/useInvitationStatus.ts","kind":"import-statement","original":"./useInvitationStatus"}],"format":"esm"},"src/echo/useSpaceInvitations.ts":{"bytes":3945,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/invitations/index.ts","kind":"import-statement","original":"../invitations"},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"src/echo/useSpaceProperties.ts":{"bytes":3500,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"src/echo/useSubscription.ts":{"bytes":3440,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"format":"esm"},"src/echo/useSyncState.ts":{"bytes":7194,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/useFeedSyncState.ts":{"bytes":7676,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/useRegistry.ts":{"bytes":1132,"imports":[{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/echo/index.ts":{"bytes":1331,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"src/echo/useMembers.ts","kind":"import-statement","original":"./useMembers"},{"path":"src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"},{"path":"src/echo/useSpaceInvitations.ts","kind":"import-statement","original":"./useSpaceInvitations"},{"path":"src/echo/useSpaceProperties.ts","kind":"import-statement","original":"./useSpaceProperties"},{"path":"src/echo/useSubscription.ts","kind":"import-statement","original":"./useSubscription"},{"path":"src/echo/useSyncState.ts","kind":"import-statement","original":"./useSyncState"},{"path":"src/echo/useFeedSyncState.ts","kind":"import-statement","original":"./useFeedSyncState"},{"path":"src/echo/useRegistry.ts","kind":"import-statement","original":"./useRegistry"}],"format":"esm"},"src/halo/useContacts.ts":{"bytes":1618,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useCredentials.ts":{"bytes":1250,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useDevices.ts":{"bytes":1202,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useHaloInvitations.ts":{"bytes":2626,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"},{"path":"src/invitations/index.ts","kind":"import-statement","original":"../invitations"}],"format":"esm"},"src/halo/useIdentity.ts":{"bytes":1488,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/halo/useKeyStore.ts":{"bytes":4446,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/halo/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"src/halo/useContacts.ts","kind":"import-statement","original":"./useContacts"},{"path":"src/halo/useCredentials.ts","kind":"import-statement","original":"./useCredentials"},{"path":"src/halo/useDevices.ts","kind":"import-statement","original":"./useDevices"},{"path":"src/halo/useHaloInvitations.ts","kind":"import-statement","original":"./useHaloInvitations"},{"path":"src/halo/useIdentity.ts","kind":"import-statement","original":"./useIdentity"},{"path":"src/halo/useKeyStore.ts","kind":"import-statement","original":"./useKeyStore"}],"format":"esm"},"src/index.ts":{"bytes":680,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"./client"}],"format":"esm"},"src/mesh/useNetworkStatus.ts":{"bytes":1408,"imports":[{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/mesh/index.ts":{"bytes":507,"imports":[{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"src/mesh/useNetworkStatus.ts","kind":"import-statement","original":"./useNetworkStatus"}],"format":"esm"},"src/testing/context.tsx":{"bytes":1581,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/testing/ClientRepeater.tsx":{"bytes":10392,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"src/testing/withClientProvider.tsx":{"bytes":17977,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/client/index.ts","kind":"import-statement","original":"../client"},{"path":"src/testing/context.tsx","kind":"import-statement","original":"./context"}],"format":"esm"},"src/testing/index.ts":{"bytes":709,"imports":[{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"src/testing/context.tsx","kind":"import-statement","original":"./context"},{"path":"src/testing/ClientRepeater.tsx","kind":"import-statement","original":"./ClientRepeater"},{"path":"src/testing/withClientProvider.tsx","kind":"import-statement","original":"./withClientProvider"}],"format":"esm"},"src/worker.ts":{"bytes":401,"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/devtools/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2196},"dist/lib/browser/devtools/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["useDevtools","useStream"],"entryPoint":"src/devtools/index.ts","inputs":{"src/devtools/index.ts":{"bytesInOutput":39},"src/devtools/useDevtools.ts":{"bytesInOutput":195},"src/devtools/useStream.ts":{"bytesInOutput":631}},"bytes":1112},"dist/lib/browser/echo/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18838},"dist/lib/browser/echo/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SSDQ6NXU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["useDatabase","useFeedSyncState","useMembers","useRegistry","useSpace","useSpaceInvitation","useSpaceInvitations","useSpaceProperties","useSpaceSyncState","useSpaces","useSubscription","useSyncState"],"entryPoint":"src/echo/index.ts","inputs":{"src/echo/index.ts":{"bytesInOutput":69},"src/echo/useMembers.ts":{"bytesInOutput":659},"src/echo/useSpaces.ts":{"bytesInOutput":781},"src/echo/useSpaceInvitations.ts":{"bytesInOutput":660},"src/echo/useSpaceProperties.ts":{"bytesInOutput":563},"src/echo/useSubscription.ts":{"bytesInOutput":508},"src/echo/useSyncState.ts":{"bytesInOutput":1735},"src/echo/useFeedSyncState.ts":{"bytesInOutput":1718},"src/echo/useRegistry.ts":{"bytesInOutput":91}},"bytes":7485},"dist/lib/browser/halo/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6965},"dist/lib/browser/halo/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SSDQ6NXU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["Device","DeviceKind","DeviceType","KeyStore","useContacts","useCredentials","useDevices","useHaloInvitation","useHaloInvitations","useIdentity","useKeyStore"],"entryPoint":"src/halo/index.ts","inputs":{"src/halo/index.ts":{"bytesInOutput":68},"src/halo/useContacts.ts":{"bytesInOutput":174},"src/halo/useCredentials.ts":{"bytesInOutput":208},"src/halo/useDevices.ts":{"bytesInOutput":200},"src/halo/useHaloInvitations.ts":{"bytesInOutput":521},"src/halo/useIdentity.ts":{"bytesInOutput":202},"src/halo/useKeyStore.ts":{"bytesInOutput":937}},"bytes":2873},"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7138},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-XT352YI6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["AgentHostingContext","AgentHostingProvider","ClientContext","ClientProvider","useAgentHostingClient","useClient","useClientStatus","useConfig","useMulticastObservable","useShell","useShellDisplay","useStatus"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":90},"src/client/AgentHostingProvider.tsx":{"bytesInOutput":1700},"src/client/useClientStatus.ts":{"bytesInOutput":383},"src/client/useConfig.ts":{"bytesInOutput":234},"src/client/useShell.ts":{"bytesInOutput":377},"src/client/useStatus.ts":{"bytesInOutput":238}},"bytes":3629},"dist/lib/browser/invitations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/invitations/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SSDQ6NXU.mjs","kind":"import-statement"}],"exports":["AuthenticatingInvitationObservable","CancellableInvitationObservable","Invitation","InvitationEncoder","InvitationsProxy","useInvitationStatus"],"entryPoint":"src/invitations/index.ts","inputs":{},"bytes":388},"dist/lib/browser/chunk-SSDQ6NXU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10410},"dist/lib/browser/chunk-SSDQ6NXU.mjs":{"imports":[{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["AuthenticatingInvitationObservable","CancellableInvitationObservable","Invitation","InvitationEncoder","InvitationsProxy","useInvitationStatus"],"inputs":{"src/invitations/index.ts":{"bytesInOutput":198},"src/invitations/useInvitationStatus.ts":{"bytesInOutput":4615}},"bytes":5128},"dist/lib/browser/mesh/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":936},"dist/lib/browser/mesh/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-3LVU7RNK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true}],"exports":["useNetworkStatus"],"entryPoint":"src/mesh/index.ts","inputs":{"src/mesh/index.ts":{"bytesInOutput":35},"src/mesh/useNetworkStatus.ts":{"bytesInOutput":184}},"bytes":425},"dist/lib/browser/chunk-3LVU7RNK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":807},"dist/lib/browser/chunk-3LVU7RNK.mjs":{"imports":[{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["useClient"],"inputs":{"src/client/useClient.ts":{"bytesInOutput":211}},"bytes":364},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15608},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XT352YI6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["ClientRepeater","ClientStory","useClientStory","withClientProvider","withMultiClientProvider"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/index.ts":{"bytesInOutput":38},"src/testing/context.tsx":{"bytesInOutput":254},"src/testing/ClientRepeater.tsx":{"bytesInOutput":1851},"src/testing/withClientProvider.tsx":{"bytesInOutput":4257}},"bytes":6763},"dist/lib/browser/chunk-XT352YI6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9977},"dist/lib/browser/chunk-XT352YI6.mjs":{"imports":[{"path":"dist/lib/browser/chunk-CZMIVAGI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["ClientProvider"],"inputs":{"src/client/ClientProvider.tsx":{"bytesInOutput":3513},"src/banner.ts":{"bytesInOutput":817}},"bytes":4546},"dist/lib/browser/chunk-CZMIVAGI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":694},"dist/lib/browser/chunk-CZMIVAGI.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["ClientContext"],"inputs":{"src/client/context.ts":{"bytesInOutput":82}},"bytes":180},"dist/lib/browser/worker.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":206},"dist/lib/browser/worker.mjs":{"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/worker.ts","inputs":{"src/worker.ts":{"bytesInOutput":37}},"bytes":90}}}
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
 
3
3
  // src/invitations/index.ts
4
- import { AuthenticatingInvitationObservable, CancellableInvitationObservable, InvitationEncoder as InvitationEncoder2, Invitation as Invitation2, InvitationsProxy } from "@dxos/client/invitations";
4
+ import { AuthenticatingInvitationObservable, CancellableInvitationObservable, Invitation as Invitation2, InvitationEncoder as InvitationEncoder2, InvitationsProxy } from "@dxos/client/invitations";
5
5
 
6
6
  // src/invitations/useInvitationStatus.ts
7
7
  import { useCallback, useEffect, useMemo, useReducer } from "react";
@@ -148,8 +148,8 @@ export {
148
148
  useInvitationStatus,
149
149
  AuthenticatingInvitationObservable,
150
150
  CancellableInvitationObservable,
151
- InvitationEncoder2 as InvitationEncoder,
152
151
  Invitation2 as Invitation,
152
+ InvitationEncoder2 as InvitationEncoder,
153
153
  InvitationsProxy
154
154
  };
155
- //# sourceMappingURL=chunk-RQJPEHDY.mjs.map
155
+ //# sourceMappingURL=chunk-JZNSBWIR.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/invitations/index.ts", "../../../src/invitations/useInvitationStatus.ts"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n AuthenticatingInvitationObservable,\n CancellableInvitationObservable,\n InvitationEncoder,\n Invitation,\n type Invitations,\n InvitationsProxy,\n} from '@dxos/client/invitations';\n\nexport * from './useInvitationStatus';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useCallback, useEffect, useMemo, useReducer } from 'react';\n\nimport { type PublicKey } from '@dxos/client';\nimport {\n type AuthenticatingInvitationObservable,\n type CancellableInvitationObservable,\n Invitation,\n InvitationEncoder,\n} from '@dxos/client/invitations';\nimport { log } from '@dxos/log';\n\nexport type InvitationResult = {\n spaceKey: PublicKey | null;\n identityKey: PublicKey | null;\n swarmKey: PublicKey | null;\n target: string | null;\n};\n\ninterface InvitationReducerState {\n status: Invitation.State; // TODO(burdon): Rename state.\n haltedAt?: Invitation.State;\n result: InvitationResult;\n error?: Error;\n id?: string;\n multiUse?: boolean;\n shareable?: boolean;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n}\n\ntype InvitationPayload = { invitation: Invitation };\n\nexport type InvitationAction =\n | ({\n status:\n | Invitation.State.INIT\n | Invitation.State.CONNECTED\n | Invitation.State.READY_FOR_AUTHENTICATION\n | Invitation.State.AUTHENTICATING;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CONNECTING;\n observable: CancellableInvitationObservable;\n } & InvitationPayload)\n | ({\n status: Invitation.State.SUCCESS;\n result: InvitationResult;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;\n haltedAt: Invitation.State;\n } & InvitationPayload)\n | {\n status: Invitation.State.ERROR;\n error?: Error;\n haltedAt: Invitation.State;\n };\n\nexport type InvitationStatus = {\n id?: string;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n status: Invitation.State;\n haltedAt?: Invitation.State;\n multiUse?: boolean;\n shareable?: boolean;\n result: InvitationResult;\n error?: Error;\n cancel(): void;\n // TODO(wittjosiah): Remove?\n connect(observable: CancellableInvitationObservable): void;\n authenticate(authCode: string): Promise<void>;\n};\n\n// Without private key, the invitation code cannot be created.\n// These invitations are only available to be accepted but not shared.\nconst isShareableInvitation = (invitation: Invitation) =>\n invitation.authMethod !== Invitation.AuthMethod.KNOWN_PUBLIC_KEY || !!invitation.guestKeypair?.privateKey;\n\nexport const useInvitationStatus = (observable?: CancellableInvitationObservable): InvitationStatus => {\n const [state, dispatch] = useReducer(\n (prev: InvitationReducerState, action: InvitationAction): InvitationReducerState => {\n log('useInvitationStatus', { action });\n const invitationProps =\n 'invitation' in action\n ? {\n id: action.invitation.invitationId,\n multiUse: action.invitation.multiUse,\n invitationCode: InvitationEncoder.encode(action.invitation),\n authCode: action.invitation.authCode,\n authMethod: action.invitation.authMethod,\n shareable: isShareableInvitation(action.invitation),\n type: action.invitation.type,\n }\n : {};\n return {\n ...prev,\n ...invitationProps,\n // TODO(burdon): State.\n status: action.status,\n // `invitationObservable`, `secret`, and `result` is persisted between the status-actions that set them.\n result: action.status === Invitation.State.SUCCESS ? action.result : prev.result,\n // `error` gets set each time we enter the error state\n ...(action.status === Invitation.State.ERROR && { error: action.error }),\n // `haltedAt` gets set on only the first error/cancelled/timeout action and reset on any others.\n ...((action.status === Invitation.State.ERROR ||\n action.status === Invitation.State.CANCELLED ||\n action.status === Invitation.State.TIMEOUT) && {\n haltedAt: typeof prev.haltedAt === 'undefined' ? action.haltedAt : prev.haltedAt,\n }),\n };\n },\n null,\n (_arg: null): InvitationReducerState => {\n const invitation = observable?.get();\n return {\n status: Invitation.State.INIT,\n result: { spaceKey: null, identityKey: null, swarmKey: null, target: null },\n id: invitation?.invitationId,\n multiUse: invitation?.multiUse,\n invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,\n authCode: invitation?.authCode,\n authMethod: invitation?.authMethod,\n shareable: invitation ? isShareableInvitation(invitation) : false,\n type: invitation?.type,\n };\n },\n );\n\n // Handle unmount.\n\n useEffect(() => {\n const update = (invitation: Invitation) => {\n switch (invitation.state) {\n case Invitation.State.INIT:\n case Invitation.State.CONNECTED:\n case Invitation.State.READY_FOR_AUTHENTICATION:\n case Invitation.State.AUTHENTICATING: {\n dispatch({\n invitation,\n status: invitation.state,\n });\n break;\n }\n\n case Invitation.State.SUCCESS: {\n dispatch({\n invitation,\n status: invitation.state,\n result: {\n spaceKey: invitation.spaceKey || null,\n identityKey: invitation.identityKey || null,\n swarmKey: invitation.swarmKey || null,\n target: invitation.target || null,\n },\n });\n break;\n }\n\n case Invitation.State.CANCELLED:\n case Invitation.State.TIMEOUT: {\n dispatch({ invitation, status: invitation.state, haltedAt: state.status });\n break;\n }\n }\n };\n\n const subscription = observable?.subscribe(update, (err: Error) => {\n dispatch({ status: Invitation.State.ERROR, error: err, haltedAt: state.status });\n });\n\n const currentState = observable?.get();\n if (currentState) {\n update(currentState);\n }\n\n return () => subscription?.unsubscribe();\n }, [observable, state.status]);\n\n // Return memoized callbacks & values.\n\n const connect = useCallback((observable: CancellableInvitationObservable) => {\n dispatch({ invitation: observable.get(), status: Invitation.State.CONNECTING, observable });\n }, []);\n\n const authenticate = useCallback(\n (authCode: string) => {\n log('authenticating...', { authCode });\n return (observable as AuthenticatingInvitationObservable).authenticate(authCode);\n },\n [observable],\n );\n\n const cancel = useCallback(async () => observable?.cancel(), [observable]);\n\n return useMemo(() => {\n return {\n ...state,\n cancel,\n connect,\n authenticate,\n };\n }, [state, cancel, connect, authenticate]);\n};\n"],
5
- "mappings": ";;;AAKA,SACEA,oCACAC,iCACAC,qBAAAA,oBACAC,cAAAA,aAEAC,wBACK;;;ACRP,SAASC,aAAaC,WAAWC,SAASC,kBAAkB;AAG5D,SAGEC,YACAC,yBACK;AACP,SAASC,WAAW;AAqEpB,IAAA,eAAA;IAME,wBAA0BH,CAAAA,eACvBI,WAA8BC,eAAAA,WAAAA,WAAAA,oBAAAA,CAAAA,CAAAA,WAAAA,cAAAA;IACzB,sBAAuB,CAAA,eAAA;gBAAEA,QAAAA,IAAAA,WAA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PV;YACF;YACA,QAAA,WAAA;UACF,CAAA;AAEKf;QAA0B;wBAC7ByB,MAAS;mBAEPV;YACAC;oBACEE,WAAUX;oBACVY;cACAC,UAAUb,WAAWa,YAAY;cACjCC,aAAQd,WAAWc,eAAU;cAC/B,UAAA,WAAA,YAAA;cACF,QAAA,WAAA,UAAA;YACA;UACF,CAAA;AAEKrB;QACL;aAA+B,WAAA,MAAA;wBAC7ByB,MAAS;mBAAcV;YAA0BW;YAAuB,QAAA,WAAA;YACxE,UAAA,MAAA;UACF,CAAA;AACF;QACF;MAEA;;yBACqB1B,YAAiB2B,UAAK,QAAA,CAAA,QAAA;eAAEC;QAAYF,QAAAA,WAAgBX,MAAM;QAAC,OAAA;QAChF,UAAA,MAAA;MAEA,CAAA;IACA,CAAA;UACEc,eAAOC,YAAAA,IAAAA;AACT,QAAA,cAAA;AAEA,aAAaC,YAAAA;IACZ;AAACC,WAAAA,MAAAA,cAAAA,YAAAA;;IAAyB;IAE7B,MAAA;EAEA,CAAA;kBACazB,YAAYyB,CAAAA,gBAAc;aAAIjB;MAAqCiB,YAAAA,YAAAA,IAAAA;MAAW,QAAA,WAAA,MAAA;MACtF,YAAAA;IAEL,CAAA;MAEI9B,CAAAA;uBAA2BO,YAAAA,CAAAA,aAAAA;AAAS,QAAA,qBAAA;MACpC;IAEF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,KAAA,GAAA,OAAA,CAAA;AAACuB,WAAAA,WAAAA,aAAAA,QAAAA;KAAW;IAGd;;QAAyE,SAAA,YAAA,YAAA,YAAA,OAAA,GAAA;IAEzE;;iBAEOC,MAAK;WACRC;MACAC,GAAAA;MACAC;MACF;MACC;IAACH;;IAAeE;IAASC;IAAa;IACzC;;;",
6
- "names": ["AuthenticatingInvitationObservable", "CancellableInvitationObservable", "InvitationEncoder", "Invitation", "InvitationsProxy", "useCallback", "useEffect", "useMemo", "useReducer", "Invitation", "InvitationEncoder", "log", "prev", "action", "invitationId", "multiUse", "invitation", "invitationCode", "authCode", "authMethod", "shareable", "isShareableInvitation", "type", "invitationProps", "status", "result", "INIT", "spaceKey", "identityKey", "swarmKey", "target", "State", "READY_FOR_AUTHENTICATION", "AUTHENTICATING", "dispatch", "haltedAt", "ERROR", "error", "update", "currentState", "subscription", "observable", "state", "cancel", "connect", "authenticate"]
4
+ "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n AuthenticatingInvitationObservable,\n CancellableInvitationObservable,\n Invitation,\n InvitationEncoder,\n type Invitations,\n InvitationsProxy,\n} from '@dxos/client/invitations';\n\nexport * from './useInvitationStatus';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useCallback, useEffect, useMemo, useReducer } from 'react';\n\nimport { type PublicKey } from '@dxos/client';\nimport {\n type AuthenticatingInvitationObservable,\n type CancellableInvitationObservable,\n Invitation,\n InvitationEncoder,\n} from '@dxos/client/invitations';\nimport { log } from '@dxos/log';\n\nexport type InvitationResult = {\n spaceKey: PublicKey | null;\n identityKey: PublicKey | null;\n swarmKey: PublicKey | null;\n target: string | null;\n};\n\ninterface InvitationReducerState {\n status: Invitation.State; // TODO(burdon): Rename state.\n haltedAt?: Invitation.State;\n result: InvitationResult;\n error?: Error;\n id?: string;\n multiUse?: boolean;\n shareable?: boolean;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n}\n\ntype InvitationPayload = { invitation: Invitation };\n\nexport type InvitationAction =\n | ({\n status:\n | Invitation.State.INIT\n | Invitation.State.CONNECTED\n | Invitation.State.READY_FOR_AUTHENTICATION\n | Invitation.State.AUTHENTICATING;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CONNECTING;\n observable: CancellableInvitationObservable;\n } & InvitationPayload)\n | ({\n status: Invitation.State.SUCCESS;\n result: InvitationResult;\n } & InvitationPayload)\n | ({\n status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;\n haltedAt: Invitation.State;\n } & InvitationPayload)\n | {\n status: Invitation.State.ERROR;\n error?: Error;\n haltedAt: Invitation.State;\n };\n\nexport type InvitationStatus = {\n id?: string;\n invitationCode?: string;\n authCode?: string;\n authMethod?: Invitation.AuthMethod;\n type?: Invitation.Type;\n status: Invitation.State;\n haltedAt?: Invitation.State;\n multiUse?: boolean;\n shareable?: boolean;\n result: InvitationResult;\n error?: Error;\n cancel(): void;\n // TODO(wittjosiah): Remove?\n connect(observable: CancellableInvitationObservable): void;\n authenticate(authCode: string): Promise<void>;\n};\n\n// Without private key, the invitation code cannot be created.\n// These invitations are only available to be accepted but not shared.\nconst isShareableInvitation = (invitation: Invitation) =>\n invitation.authMethod !== Invitation.AuthMethod.KNOWN_PUBLIC_KEY || !!invitation.guestKeypair?.privateKey;\n\nexport const useInvitationStatus = (observable?: CancellableInvitationObservable): InvitationStatus => {\n const [state, dispatch] = useReducer(\n (prev: InvitationReducerState, action: InvitationAction): InvitationReducerState => {\n log('useInvitationStatus', { action });\n const invitationProps =\n 'invitation' in action\n ? {\n id: action.invitation.invitationId,\n multiUse: action.invitation.multiUse,\n invitationCode: InvitationEncoder.encode(action.invitation),\n authCode: action.invitation.authCode,\n authMethod: action.invitation.authMethod,\n shareable: isShareableInvitation(action.invitation),\n type: action.invitation.type,\n }\n : {};\n return {\n ...prev,\n ...invitationProps,\n // TODO(burdon): State.\n status: action.status,\n // `invitationObservable`, `secret`, and `result` is persisted between the status-actions that set them.\n result: action.status === Invitation.State.SUCCESS ? action.result : prev.result,\n // `error` gets set each time we enter the error state\n ...(action.status === Invitation.State.ERROR && { error: action.error }),\n // `haltedAt` gets set on only the first error/cancelled/timeout action and reset on any others.\n ...((action.status === Invitation.State.ERROR ||\n action.status === Invitation.State.CANCELLED ||\n action.status === Invitation.State.TIMEOUT) && {\n haltedAt: typeof prev.haltedAt === 'undefined' ? action.haltedAt : prev.haltedAt,\n }),\n };\n },\n null,\n (_arg: null): InvitationReducerState => {\n const invitation = observable?.get();\n return {\n status: Invitation.State.INIT,\n result: { spaceKey: null, identityKey: null, swarmKey: null, target: null },\n id: invitation?.invitationId,\n multiUse: invitation?.multiUse,\n invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,\n authCode: invitation?.authCode,\n authMethod: invitation?.authMethod,\n shareable: invitation ? isShareableInvitation(invitation) : false,\n type: invitation?.type,\n };\n },\n );\n\n // Handle unmount.\n\n useEffect(() => {\n const update = (invitation: Invitation) => {\n switch (invitation.state) {\n case Invitation.State.INIT:\n case Invitation.State.CONNECTED:\n case Invitation.State.READY_FOR_AUTHENTICATION:\n case Invitation.State.AUTHENTICATING: {\n dispatch({\n invitation,\n status: invitation.state,\n });\n break;\n }\n\n case Invitation.State.SUCCESS: {\n dispatch({\n invitation,\n status: invitation.state,\n result: {\n spaceKey: invitation.spaceKey || null,\n identityKey: invitation.identityKey || null,\n swarmKey: invitation.swarmKey || null,\n target: invitation.target || null,\n },\n });\n break;\n }\n\n case Invitation.State.CANCELLED:\n case Invitation.State.TIMEOUT: {\n dispatch({ invitation, status: invitation.state, haltedAt: state.status });\n break;\n }\n }\n };\n\n const subscription = observable?.subscribe(update, (err: Error) => {\n dispatch({ status: Invitation.State.ERROR, error: err, haltedAt: state.status });\n });\n\n const currentState = observable?.get();\n if (currentState) {\n update(currentState);\n }\n\n return () => subscription?.unsubscribe();\n }, [observable, state.status]);\n\n // Return memoized callbacks & values.\n\n const connect = useCallback((observable: CancellableInvitationObservable) => {\n dispatch({ invitation: observable.get(), status: Invitation.State.CONNECTING, observable });\n }, []);\n\n const authenticate = useCallback(\n (authCode: string) => {\n log('authenticating...', { authCode });\n return (observable as AuthenticatingInvitationObservable).authenticate(authCode);\n },\n [observable],\n );\n\n const cancel = useCallback(async () => observable?.cancel(), [observable]);\n\n return useMemo(() => {\n return {\n ...state,\n cancel,\n connect,\n authenticate,\n };\n }, [state, cancel, connect, authenticate]);\n};\n"],
5
+ "mappings": ";;;AAKA,SACEA,oCACAC,iCACAC,cAAAA,aACAC,qBAAAA,oBAEAC,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AAA,GAAA;IAEzE;;iBAEOC,MAAK;WACRC;MACAC,GAAAA;MACAC;MACF;MACC;IAACH;;IAAeE;IAASC;IAAa;IACzC;;;",
6
+ "names": ["AuthenticatingInvitationObservable", "CancellableInvitationObservable", "Invitation", "InvitationEncoder", "InvitationsProxy", "useCallback", "useEffect", "useMemo", "useReducer", "Invitation", "InvitationEncoder", "log", "prev", "action", "invitationId", "multiUse", "invitation", "invitationCode", "authCode", "authMethod", "shareable", "isShareableInvitation", "type", "invitationProps", "status", "result", "INIT", "spaceKey", "identityKey", "swarmKey", "target", "State", "READY_FOR_AUTHENTICATION", "AUTHENTICATING", "dispatch", "haltedAt", "ERROR", "error", "update", "currentState", "subscription", "observable", "state", "cancel", "connect", "authenticate"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  useInvitationStatus
4
- } from "../chunk-RQJPEHDY.mjs";
4
+ } from "../chunk-JZNSBWIR.mjs";
5
5
  import {
6
6
  useClient
7
7
  } from "../chunk-CUDKNAMV.mjs";
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  useInvitationStatus
4
- } from "../chunk-RQJPEHDY.mjs";
4
+ } from "../chunk-JZNSBWIR.mjs";
5
5
  import {
6
6
  useClient
7
7
  } from "../chunk-CUDKNAMV.mjs";
@@ -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 { 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,IAA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aC,UAAAA;AAC3BW,UAAMR,OAAOJ,KAAKC,KAAAA;AAClBS,gBAAAA;EACF;AAEA,SAAO;IAACE,MAAMf;IAAKO;;AACrB;",
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n// NOTE: Export * fails here.\nexport {\n type Contact,\n type Credential,\n Device,\n DeviceKind,\n DeviceType,\n type Halo,\n type Identity,\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,SAGEA,QACAC,YACAC,kBAGK;;;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,QAAM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AA;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
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
  }
@@ -6,7 +6,7 @@ import {
6
6
  InvitationEncoder,
7
7
  InvitationsProxy,
8
8
  useInvitationStatus
9
- } from "../chunk-RQJPEHDY.mjs";
9
+ } from "../chunk-JZNSBWIR.mjs";
10
10
  export {
11
11
  AuthenticatingInvitationObservable,
12
12
  CancellableInvitationObservable,