@dxos/react-client 0.5.3-main.4e877aa → 0.5.3-main.57eca40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-BQ4BAP42.mjs → chunk-26VFTP7R.mjs} +38 -30
- package/dist/lib/browser/chunk-26VFTP7R.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KR6MTIAK.mjs → chunk-RXX5XM6Z.mjs} +8 -8
- package/dist/lib/browser/chunk-RXX5XM6Z.mjs.map +7 -0
- package/dist/lib/browser/devtools/index.mjs +1 -1
- package/dist/lib/browser/echo/index.mjs +2 -2
- package/dist/lib/browser/halo/index.mjs +2 -2
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/invitations/index.mjs +1 -1
- package/dist/lib/browser/mesh/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-HVU2FX77.cjs → chunk-BZPBZFOR.cjs} +11 -11
- package/dist/lib/node/chunk-BZPBZFOR.cjs.map +7 -0
- package/dist/lib/node/{chunk-X5URYLUS.cjs → chunk-TQWLADVH.cjs} +41 -33
- package/dist/lib/node/chunk-TQWLADVH.cjs.map +7 -0
- package/dist/lib/node/devtools/index.cjs +2 -2
- package/dist/lib/node/echo/index.cjs +5 -5
- package/dist/lib/node/halo/index.cjs +7 -7
- package/dist/lib/node/index.cjs +11 -11
- package/dist/lib/node/invitations/index.cjs +7 -7
- package/dist/lib/node/invitations/index.cjs.map +1 -1
- package/dist/lib/node/mesh/index.cjs +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +2 -2
- package/dist/types/src/client/ClientContext.d.ts +3 -0
- package/dist/types/src/client/ClientContext.d.ts.map +1 -1
- package/dist/types/src/invitations/useInvitationStatus.d.ts +10 -6
- package/dist/types/src/invitations/useInvitationStatus.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/client/ClientContext.tsx +3 -0
- package/src/invitations/useInvitationStatus.ts +46 -36
- package/typedoc.json +1 -1
- package/dist/lib/browser/chunk-BQ4BAP42.mjs.map +0 -7
- package/dist/lib/browser/chunk-KR6MTIAK.mjs.map +0 -7
- package/dist/lib/node/chunk-HVU2FX77.cjs.map +0 -7
- package/dist/lib/node/chunk-X5URYLUS.cjs.map +0 -7
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/sdk/react-client/src/banner.ts":{"bytes":3658,"imports":[],"format":"esm"},"packages/sdk/react-client/src/client/ClientContext.tsx":{"bytes":15632,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/banner.ts","kind":"import-statement","original":"../banner"}],"format":"esm"},"packages/sdk/react-client/src/client/useClientServices.ts":{"bytes":1563,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/useConfig.ts":{"bytes":1775,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/useShell.ts":{"bytes":1106,"imports":[{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/useStatus.ts":{"bytes":1507,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/AgentHostingProvider.tsx":{"bytes":7087,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/index.ts":{"bytes":988,"imports":[{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"},{"path":"packages/sdk/react-client/src/client/useClientServices.ts","kind":"import-statement","original":"./useClientServices"},{"path":"packages/sdk/react-client/src/client/useConfig.ts","kind":"import-statement","original":"./useConfig"},{"path":"packages/sdk/react-client/src/client/useShell.ts","kind":"import-statement","original":"./useShell"},{"path":"packages/sdk/react-client/src/client/useStatus.ts","kind":"import-statement","original":"./useStatus"},{"path":"packages/sdk/react-client/src/client/AgentHostingProvider.tsx","kind":"import-statement","original":"./AgentHostingProvider"}],"format":"esm"},"packages/sdk/react-client/src/devtools/useDevtools.ts":{"bytes":1938,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/devtools/useStream.ts":{"bytes":2796,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/devtools/index.ts":{"bytes":693,"imports":[{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/devtools/useDevtools.ts","kind":"import-statement","original":"./useDevtools"},{"path":"packages/sdk/react-client/src/devtools/useStream.ts","kind":"import-statement","original":"./useStream"}],"format":"esm"},"packages/sdk/react-client/src/echo/useSpaces.ts":{"bytes":6145,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/echo/useMembers.ts":{"bytes":3157,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"packages/sdk/react-client/src/echo/useQuery.ts":{"bytes":5959,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/invitations/useInvitationStatus.ts":{"bytes":18076,"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"},"packages/sdk/react-client/src/invitations/index.ts":{"bytes":1299,"imports":[{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/invitations/useInvitationStatus.ts","kind":"import-statement","original":"./useInvitationStatus"}],"format":"esm"},"packages/sdk/react-client/src/echo/useSpaceInvitations.ts":{"bytes":3253,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"},{"path":"packages/sdk/react-client/src/invitations/index.ts","kind":"import-statement","original":"../invitations"}],"format":"esm"},"packages/sdk/react-client/src/echo/useSubscription.ts":{"bytes":3528,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/echo/index.ts":{"bytes":986,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/echo/useMembers.ts","kind":"import-statement","original":"./useMembers"},{"path":"packages/sdk/react-client/src/echo/useQuery.ts","kind":"import-statement","original":"./useQuery"},{"path":"packages/sdk/react-client/src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"},{"path":"packages/sdk/react-client/src/echo/useSpaceInvitations.ts","kind":"import-statement","original":"./useSpaceInvitations"},{"path":"packages/sdk/react-client/src/echo/useSubscription.ts","kind":"import-statement","original":"./useSubscription"}],"format":"esm"},"packages/sdk/react-client/src/halo/useContacts.ts":{"bytes":1718,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/halo/useDevices.ts":{"bytes":1305,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/halo/useHaloInvitations.ts":{"bytes":2737,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"},{"path":"packages/sdk/react-client/src/invitations/index.ts","kind":"import-statement","original":"../invitations"}],"format":"esm"},"packages/sdk/react-client/src/halo/useIdentity.ts":{"bytes":1588,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/halo/useKeyStore.ts":{"bytes":4572,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/halo/index.ts":{"bytes":1301,"imports":[{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/halo/useContacts.ts","kind":"import-statement","original":"./useContacts"},{"path":"packages/sdk/react-client/src/halo/useDevices.ts","kind":"import-statement","original":"./useDevices"},{"path":"packages/sdk/react-client/src/halo/useHaloInvitations.ts","kind":"import-statement","original":"./useHaloInvitations"},{"path":"packages/sdk/react-client/src/halo/useIdentity.ts","kind":"import-statement","original":"./useIdentity"},{"path":"packages/sdk/react-client/src/halo/useKeyStore.ts","kind":"import-statement","original":"./useKeyStore"}],"format":"esm"},"packages/sdk/react-client/src/index.ts":{"bytes":888,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"./client"}],"format":"esm"},"packages/sdk/react-client/src/mesh/useNetworkStatus.ts":{"bytes":1517,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/mesh/index.ts":{"bytes":601,"imports":[{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/mesh/useNetworkStatus.ts","kind":"import-statement","original":"./useNetworkStatus"}],"format":"esm"},"packages/sdk/react-client/src/testing/ClientRepeater.tsx":{"bytes":11188,"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/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/testing/FullscreenDecorator.tsx":{"bytes":1552,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/testing/index.ts":{"bytes":724,"imports":[{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/testing/ClientRepeater.tsx","kind":"import-statement","original":"./ClientRepeater"},{"path":"packages/sdk/react-client/src/testing/FullscreenDecorator.tsx","kind":"import-statement","original":"./FullscreenDecorator"}],"format":"esm"},"packages/sdk/react-client/src/worker.ts":{"bytes":491,"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"packages/sdk/react-client/dist/lib/node/devtools/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2520},"packages/sdk/react-client/dist/lib/node/devtools/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs","kind":"import-statement"},{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["useDevtools","useStream"],"entryPoint":"packages/sdk/react-client/src/devtools/index.ts","inputs":{"packages/sdk/react-client/src/devtools/index.ts":{"bytesInOutput":39},"packages/sdk/react-client/src/devtools/useDevtools.ts":{"bytesInOutput":506},"packages/sdk/react-client/src/devtools/useStream.ts":{"bytesInOutput":692}},"bytes":1534},"packages/sdk/react-client/dist/lib/node/echo/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11629},"packages/sdk/react-client/dist/lib/node/echo/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-X5URYLUS.cjs","kind":"import-statement"},{"path":"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs","kind":"import-statement"},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","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/async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"exports":["useMembers","useQuery","useSpace","useSpaceInvitation","useSpaceInvitations","useSpaces","useSubscription"],"entryPoint":"packages/sdk/react-client/src/echo/index.ts","inputs":{"packages/sdk/react-client/src/echo/index.ts":{"bytesInOutput":35},"packages/sdk/react-client/src/echo/useMembers.ts":{"bytesInOutput":545},"packages/sdk/react-client/src/echo/useSpaces.ts":{"bytesInOutput":956},"packages/sdk/react-client/src/echo/useQuery.ts":{"bytesInOutput":1033},"packages/sdk/react-client/src/echo/useSpaceInvitations.ts":{"bytesInOutput":677},"packages/sdk/react-client/src/echo/useSubscription.ts":{"bytesInOutput":519}},"bytes":4419},"packages/sdk/react-client/dist/lib/node/halo/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6286},"packages/sdk/react-client/dist/lib/node/halo/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-X5URYLUS.cjs","kind":"import-statement"},{"path":"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs","kind":"import-statement"},{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["Device","DeviceKind","DeviceType","KeyStore","useContacts","useDevices","useHaloInvitation","useHaloInvitations","useIdentity","useKeyStore"],"entryPoint":"packages/sdk/react-client/src/halo/index.ts","inputs":{"packages/sdk/react-client/src/halo/index.ts":{"bytesInOutput":68},"packages/sdk/react-client/src/halo/useContacts.ts":{"bytesInOutput":174},"packages/sdk/react-client/src/halo/useDevices.ts":{"bytesInOutput":200},"packages/sdk/react-client/src/halo/useHaloInvitations.ts":{"bytesInOutput":521},"packages/sdk/react-client/src/halo/useIdentity.ts":{"bytesInOutput":202},"packages/sdk/react-client/src/halo/useKeyStore.ts":{"bytesInOutput":928}},"bytes":2731},"packages/sdk/react-client/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":393},"packages/sdk/react-client/dist/lib/node/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true}],"exports":["AgentHostingContext","AgentHostingProvider","ClientContext","ClientProvider","useAgentHostingClient","useClient","useClientServices","useConfig","useMulticastObservable","useShell","useStatus"],"entryPoint":"packages/sdk/react-client/src/index.ts","inputs":{"packages/sdk/react-client/src/index.ts":{"bytesInOutput":129}},"bytes":641},"packages/sdk/react-client/dist/lib/node/invitations/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/react-client/dist/lib/node/invitations/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-X5URYLUS.cjs","kind":"import-statement"}],"exports":["AuthenticatingInvitationObservable","CancellableInvitationObservable","Invitation","InvitationEncoder","InvitationsProxy","useInvitationStatus"],"entryPoint":"packages/sdk/react-client/src/invitations/index.ts","inputs":{},"bytes":388},"packages/sdk/react-client/dist/lib/node/chunk-X5URYLUS.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9782},"packages/sdk/react-client/dist/lib/node/chunk-X5URYLUS.cjs":{"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":{"packages/sdk/react-client/src/invitations/index.ts":{"bytesInOutput":198},"packages/sdk/react-client/src/invitations/useInvitationStatus.ts":{"bytesInOutput":4204}},"bytes":4769},"packages/sdk/react-client/dist/lib/node/mesh/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":935},"packages/sdk/react-client/dist/lib/node/mesh/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs","kind":"import-statement"},{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true}],"exports":["useNetworkStatus"],"entryPoint":"packages/sdk/react-client/src/mesh/index.ts","inputs":{"packages/sdk/react-client/src/mesh/index.ts":{"bytesInOutput":35},"packages/sdk/react-client/src/mesh/useNetworkStatus.ts":{"bytesInOutput":184}},"bytes":445},"packages/sdk/react-client/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6870},"packages/sdk/react-client/dist/lib/node/testing/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs","kind":"import-statement"},{"path":"@dxos/client/testing","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/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["ClientRepeater","FullscreenDecorator"],"entryPoint":"packages/sdk/react-client/src/testing/index.ts","inputs":{"packages/sdk/react-client/src/testing/index.ts":{"bytesInOutput":38},"packages/sdk/react-client/src/testing/ClientRepeater.tsx":{"bytesInOutput":2181},"packages/sdk/react-client/src/testing/FullscreenDecorator.tsx":{"bytesInOutput":290}},"bytes":2831},"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16029},"packages/sdk/react-client/dist/lib/node/chunk-HVU2FX77.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","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/debug","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/services","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["AgentHostingContext","AgentHostingProvider","ClientContext","ClientProvider","useAgentHostingClient","useClient","useClientServices","useConfig","useShell","useStatus"],"inputs":{"packages/sdk/react-client/src/client/ClientContext.tsx":{"bytesInOutput":3601},"packages/sdk/react-client/src/banner.ts":{"bytesInOutput":773},"packages/sdk/react-client/src/client/useClientServices.ts":{"bytesInOutput":250},"packages/sdk/react-client/src/client/useConfig.ts":{"bytesInOutput":245},"packages/sdk/react-client/src/client/useShell.ts":{"bytesInOutput":79},"packages/sdk/react-client/src/client/useStatus.ts":{"bytesInOutput":238},"packages/sdk/react-client/src/client/AgentHostingProvider.tsx":{"bytesInOutput":1898},"packages/sdk/react-client/src/client/index.ts":{"bytesInOutput":0}},"bytes":7769},"packages/sdk/react-client/dist/lib/node/worker.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":206},"packages/sdk/react-client/dist/lib/node/worker.cjs":{"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"exports":[],"entryPoint":"packages/sdk/react-client/src/worker.ts","inputs":{"packages/sdk/react-client/src/worker.ts":{"bytesInOutput":37}},"bytes":116}}}
|
|
1
|
+
{"inputs":{"packages/sdk/react-client/src/banner.ts":{"bytes":3658,"imports":[],"format":"esm"},"packages/sdk/react-client/src/client/ClientContext.tsx":{"bytes":15700,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/banner.ts","kind":"import-statement","original":"../banner"}],"format":"esm"},"packages/sdk/react-client/src/client/useClientServices.ts":{"bytes":1563,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/useConfig.ts":{"bytes":1775,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/useShell.ts":{"bytes":1106,"imports":[{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/useStatus.ts":{"bytes":1507,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/AgentHostingProvider.tsx":{"bytes":7087,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"}],"format":"esm"},"packages/sdk/react-client/src/client/index.ts":{"bytes":988,"imports":[{"path":"packages/sdk/react-client/src/client/ClientContext.tsx","kind":"import-statement","original":"./ClientContext"},{"path":"packages/sdk/react-client/src/client/useClientServices.ts","kind":"import-statement","original":"./useClientServices"},{"path":"packages/sdk/react-client/src/client/useConfig.ts","kind":"import-statement","original":"./useConfig"},{"path":"packages/sdk/react-client/src/client/useShell.ts","kind":"import-statement","original":"./useShell"},{"path":"packages/sdk/react-client/src/client/useStatus.ts","kind":"import-statement","original":"./useStatus"},{"path":"packages/sdk/react-client/src/client/AgentHostingProvider.tsx","kind":"import-statement","original":"./AgentHostingProvider"}],"format":"esm"},"packages/sdk/react-client/src/devtools/useDevtools.ts":{"bytes":1938,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/devtools/useStream.ts":{"bytes":2796,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/devtools/index.ts":{"bytes":693,"imports":[{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/devtools/useDevtools.ts","kind":"import-statement","original":"./useDevtools"},{"path":"packages/sdk/react-client/src/devtools/useStream.ts","kind":"import-statement","original":"./useStream"}],"format":"esm"},"packages/sdk/react-client/src/echo/useSpaces.ts":{"bytes":6145,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/echo/useMembers.ts":{"bytes":3157,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"}],"format":"esm"},"packages/sdk/react-client/src/echo/useQuery.ts":{"bytes":5959,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/invitations/useInvitationStatus.ts":{"bytes":18956,"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"},"packages/sdk/react-client/src/invitations/index.ts":{"bytes":1299,"imports":[{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/invitations/useInvitationStatus.ts","kind":"import-statement","original":"./useInvitationStatus"}],"format":"esm"},"packages/sdk/react-client/src/echo/useSpaceInvitations.ts":{"bytes":3253,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"},{"path":"packages/sdk/react-client/src/invitations/index.ts","kind":"import-statement","original":"../invitations"}],"format":"esm"},"packages/sdk/react-client/src/echo/useSubscription.ts":{"bytes":3528,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/echo/index.ts":{"bytes":986,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/echo/useMembers.ts","kind":"import-statement","original":"./useMembers"},{"path":"packages/sdk/react-client/src/echo/useQuery.ts","kind":"import-statement","original":"./useQuery"},{"path":"packages/sdk/react-client/src/echo/useSpaces.ts","kind":"import-statement","original":"./useSpaces"},{"path":"packages/sdk/react-client/src/echo/useSpaceInvitations.ts","kind":"import-statement","original":"./useSpaceInvitations"},{"path":"packages/sdk/react-client/src/echo/useSubscription.ts","kind":"import-statement","original":"./useSubscription"}],"format":"esm"},"packages/sdk/react-client/src/halo/useContacts.ts":{"bytes":1718,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/halo/useDevices.ts":{"bytes":1305,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/halo/useHaloInvitations.ts":{"bytes":2737,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"},{"path":"packages/sdk/react-client/src/invitations/index.ts","kind":"import-statement","original":"../invitations"}],"format":"esm"},"packages/sdk/react-client/src/halo/useIdentity.ts":{"bytes":1588,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/halo/useKeyStore.ts":{"bytes":4572,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/halo/index.ts":{"bytes":1301,"imports":[{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/halo/useContacts.ts","kind":"import-statement","original":"./useContacts"},{"path":"packages/sdk/react-client/src/halo/useDevices.ts","kind":"import-statement","original":"./useDevices"},{"path":"packages/sdk/react-client/src/halo/useHaloInvitations.ts","kind":"import-statement","original":"./useHaloInvitations"},{"path":"packages/sdk/react-client/src/halo/useIdentity.ts","kind":"import-statement","original":"./useIdentity"},{"path":"packages/sdk/react-client/src/halo/useKeyStore.ts","kind":"import-statement","original":"./useKeyStore"}],"format":"esm"},"packages/sdk/react-client/src/index.ts":{"bytes":888,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"./client"}],"format":"esm"},"packages/sdk/react-client/src/mesh/useNetworkStatus.ts":{"bytes":1517,"imports":[{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/mesh/index.ts":{"bytes":601,"imports":[{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/mesh/useNetworkStatus.ts","kind":"import-statement","original":"./useNetworkStatus"}],"format":"esm"},"packages/sdk/react-client/src/testing/ClientRepeater.tsx":{"bytes":11188,"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/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/client/index.ts","kind":"import-statement","original":"../client"}],"format":"esm"},"packages/sdk/react-client/src/testing/FullscreenDecorator.tsx":{"bytes":1552,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/react-client/src/testing/index.ts":{"bytes":724,"imports":[{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"packages/sdk/react-client/src/testing/ClientRepeater.tsx","kind":"import-statement","original":"./ClientRepeater"},{"path":"packages/sdk/react-client/src/testing/FullscreenDecorator.tsx","kind":"import-statement","original":"./FullscreenDecorator"}],"format":"esm"},"packages/sdk/react-client/src/worker.ts":{"bytes":491,"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"packages/sdk/react-client/dist/lib/node/devtools/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2520},"packages/sdk/react-client/dist/lib/node/devtools/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs","kind":"import-statement"},{"path":"@dxos/client/devtools","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["useDevtools","useStream"],"entryPoint":"packages/sdk/react-client/src/devtools/index.ts","inputs":{"packages/sdk/react-client/src/devtools/index.ts":{"bytesInOutput":39},"packages/sdk/react-client/src/devtools/useDevtools.ts":{"bytesInOutput":506},"packages/sdk/react-client/src/devtools/useStream.ts":{"bytesInOutput":692}},"bytes":1534},"packages/sdk/react-client/dist/lib/node/echo/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11629},"packages/sdk/react-client/dist/lib/node/echo/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-TQWLADVH.cjs","kind":"import-statement"},{"path":"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs","kind":"import-statement"},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-async","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/async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true}],"exports":["useMembers","useQuery","useSpace","useSpaceInvitation","useSpaceInvitations","useSpaces","useSubscription"],"entryPoint":"packages/sdk/react-client/src/echo/index.ts","inputs":{"packages/sdk/react-client/src/echo/index.ts":{"bytesInOutput":35},"packages/sdk/react-client/src/echo/useMembers.ts":{"bytesInOutput":545},"packages/sdk/react-client/src/echo/useSpaces.ts":{"bytesInOutput":956},"packages/sdk/react-client/src/echo/useQuery.ts":{"bytesInOutput":1033},"packages/sdk/react-client/src/echo/useSpaceInvitations.ts":{"bytesInOutput":677},"packages/sdk/react-client/src/echo/useSubscription.ts":{"bytesInOutput":519}},"bytes":4419},"packages/sdk/react-client/dist/lib/node/halo/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6286},"packages/sdk/react-client/dist/lib/node/halo/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-TQWLADVH.cjs","kind":"import-statement"},{"path":"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs","kind":"import-statement"},{"path":"@dxos/client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["Device","DeviceKind","DeviceType","KeyStore","useContacts","useDevices","useHaloInvitation","useHaloInvitations","useIdentity","useKeyStore"],"entryPoint":"packages/sdk/react-client/src/halo/index.ts","inputs":{"packages/sdk/react-client/src/halo/index.ts":{"bytesInOutput":68},"packages/sdk/react-client/src/halo/useContacts.ts":{"bytesInOutput":174},"packages/sdk/react-client/src/halo/useDevices.ts":{"bytesInOutput":200},"packages/sdk/react-client/src/halo/useHaloInvitations.ts":{"bytesInOutput":521},"packages/sdk/react-client/src/halo/useIdentity.ts":{"bytesInOutput":202},"packages/sdk/react-client/src/halo/useKeyStore.ts":{"bytesInOutput":928}},"bytes":2731},"packages/sdk/react-client/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":393},"packages/sdk/react-client/dist/lib/node/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true}],"exports":["AgentHostingContext","AgentHostingProvider","ClientContext","ClientProvider","useAgentHostingClient","useClient","useClientServices","useConfig","useMulticastObservable","useShell","useStatus"],"entryPoint":"packages/sdk/react-client/src/index.ts","inputs":{"packages/sdk/react-client/src/index.ts":{"bytesInOutput":129}},"bytes":641},"packages/sdk/react-client/dist/lib/node/invitations/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/react-client/dist/lib/node/invitations/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-TQWLADVH.cjs","kind":"import-statement"}],"exports":["AuthenticatingInvitationObservable","CancellableInvitationObservable","Invitation","InvitationEncoder","InvitationsProxy","useInvitationStatus"],"entryPoint":"packages/sdk/react-client/src/invitations/index.ts","inputs":{},"bytes":388},"packages/sdk/react-client/dist/lib/node/chunk-TQWLADVH.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10269},"packages/sdk/react-client/dist/lib/node/chunk-TQWLADVH.cjs":{"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":{"packages/sdk/react-client/src/invitations/index.ts":{"bytesInOutput":198},"packages/sdk/react-client/src/invitations/useInvitationStatus.ts":{"bytesInOutput":4397}},"bytes":4962},"packages/sdk/react-client/dist/lib/node/mesh/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":935},"packages/sdk/react-client/dist/lib/node/mesh/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs","kind":"import-statement"},{"path":"@dxos/client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-async","kind":"import-statement","external":true}],"exports":["useNetworkStatus"],"entryPoint":"packages/sdk/react-client/src/mesh/index.ts","inputs":{"packages/sdk/react-client/src/mesh/index.ts":{"bytesInOutput":35},"packages/sdk/react-client/src/mesh/useNetworkStatus.ts":{"bytesInOutput":184}},"bytes":445},"packages/sdk/react-client/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6870},"packages/sdk/react-client/dist/lib/node/testing/index.cjs":{"imports":[{"path":"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs","kind":"import-statement"},{"path":"@dxos/client/testing","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/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/random","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["ClientRepeater","FullscreenDecorator"],"entryPoint":"packages/sdk/react-client/src/testing/index.ts","inputs":{"packages/sdk/react-client/src/testing/index.ts":{"bytesInOutput":38},"packages/sdk/react-client/src/testing/ClientRepeater.tsx":{"bytesInOutput":2181},"packages/sdk/react-client/src/testing/FullscreenDecorator.tsx":{"bytesInOutput":290}},"bytes":2831},"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16078},"packages/sdk/react-client/dist/lib/node/chunk-BZPBZFOR.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","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/debug","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/services","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["AgentHostingContext","AgentHostingProvider","ClientContext","ClientProvider","useAgentHostingClient","useClient","useClientServices","useConfig","useShell","useStatus"],"inputs":{"packages/sdk/react-client/src/client/ClientContext.tsx":{"bytesInOutput":3601},"packages/sdk/react-client/src/banner.ts":{"bytesInOutput":773},"packages/sdk/react-client/src/client/useClientServices.ts":{"bytesInOutput":250},"packages/sdk/react-client/src/client/useConfig.ts":{"bytesInOutput":245},"packages/sdk/react-client/src/client/useShell.ts":{"bytesInOutput":79},"packages/sdk/react-client/src/client/useStatus.ts":{"bytesInOutput":238},"packages/sdk/react-client/src/client/AgentHostingProvider.tsx":{"bytesInOutput":1898},"packages/sdk/react-client/src/client/index.ts":{"bytesInOutput":0}},"bytes":7769},"packages/sdk/react-client/dist/lib/node/worker.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":206},"packages/sdk/react-client/dist/lib/node/worker.cjs":{"imports":[{"path":"@dxos/client/worker","kind":"import-statement","external":true}],"exports":[],"entryPoint":"packages/sdk/react-client/src/worker.ts","inputs":{"packages/sdk/react-client/src/worker.ts":{"bytesInOutput":37}},"bytes":116}}}
|
|
@@ -33,7 +33,7 @@ __export(testing_exports, {
|
|
|
33
33
|
FullscreenDecorator: () => FullscreenDecorator
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(testing_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_BZPBZFOR = require("../chunk-BZPBZFOR.cjs");
|
|
37
37
|
__reExport(testing_exports, require("@dxos/client/testing"), module.exports);
|
|
38
38
|
var import_react = __toESM(require("react"));
|
|
39
39
|
var import_client = require("@dxos/client");
|
|
@@ -83,7 +83,7 @@ var ClientRepeater = (props) => {
|
|
|
83
83
|
clients
|
|
84
84
|
}), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
85
85
|
className
|
|
86
|
-
}, clients.map((client, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
+
}, clients.map((client, index) => /* @__PURE__ */ import_react.default.createElement(import_chunk_BZPBZFOR.ClientContext.Provider, {
|
|
87
87
|
key: index,
|
|
88
88
|
value: {
|
|
89
89
|
client
|
|
@@ -14,6 +14,9 @@ export declare const ClientContext: Context<ClientContextProps | undefined>;
|
|
|
14
14
|
* Requires ClientContext to be set via ClientProvider.
|
|
15
15
|
*/
|
|
16
16
|
export declare const useClient: () => Client;
|
|
17
|
+
/**
|
|
18
|
+
* Properties for the ClientProvider.
|
|
19
|
+
*/
|
|
17
20
|
export type ClientProviderProps = Omit<ClientOptions, 'config' | 'services'> & {
|
|
18
21
|
children?: ReactNode;
|
|
19
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientContext.d.ts","sourceRoot":"","sources":["../../../../src/client/ClientContext.tsx"],"names":[],"mappings":"AAIA,OAAc,EACZ,KAAK,SAAS,EAEd,KAAK,OAAO,EAIZ,KAAK,iBAAiB,EAEvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvG,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAK7E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IAIf,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B,MAAM,CAAC,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|
|
@@ -6,18 +6,21 @@ export type InvitationResult = {
|
|
|
6
6
|
swarmKey: PublicKey | null;
|
|
7
7
|
target: string | null;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type InvitationPayload = {
|
|
10
|
+
invitation: Invitation;
|
|
11
|
+
};
|
|
12
|
+
export type InvitationAction = ({
|
|
10
13
|
status: Invitation.State.INIT | Invitation.State.CONNECTED | Invitation.State.READY_FOR_AUTHENTICATION | Invitation.State.AUTHENTICATING;
|
|
11
|
-
} | {
|
|
14
|
+
} & InvitationPayload) | ({
|
|
12
15
|
status: Invitation.State.CONNECTING;
|
|
13
16
|
observable: CancellableInvitationObservable;
|
|
14
|
-
} | {
|
|
17
|
+
} & InvitationPayload) | ({
|
|
15
18
|
status: Invitation.State.SUCCESS;
|
|
16
19
|
result: InvitationResult;
|
|
17
|
-
} | {
|
|
20
|
+
} & InvitationPayload) | ({
|
|
18
21
|
status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;
|
|
19
22
|
haltedAt: Invitation.State;
|
|
20
|
-
} | {
|
|
23
|
+
} & InvitationPayload) | {
|
|
21
24
|
status: Invitation.State.ERROR;
|
|
22
25
|
error?: Error;
|
|
23
26
|
haltedAt: Invitation.State;
|
|
@@ -37,5 +40,6 @@ export type InvitationStatus = {
|
|
|
37
40
|
connect(observable: CancellableInvitationObservable): void;
|
|
38
41
|
authenticate(authCode: string): Promise<void>;
|
|
39
42
|
};
|
|
40
|
-
export declare const useInvitationStatus: (
|
|
43
|
+
export declare const useInvitationStatus: (observable?: CancellableInvitationObservable) => InvitationStatus;
|
|
44
|
+
export {};
|
|
41
45
|
//# sourceMappingURL=useInvitationStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInvitationStatus.d.ts","sourceRoot":"","sources":["../../../../src/invitations/useInvitationStatus.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAE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AAgB,CAAC;CAC1B,GAAG,iBAAiB,CAAC,GACtB,CAAC;IACC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC;IAC9D,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;CAC5B,GAAG,iBAAiB,CAAC,GACtB;IACE,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;CAC5B,CAAC;AAEN,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,CAAC,UAAU,EAAE,+BAA+B,GAAG,IAAI,CAAC;IAC3D,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBAAiB,+BAA+B,KAAG,gBA0HlF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-client",
|
|
3
|
-
"version": "0.5.3-main.
|
|
3
|
+
"version": "0.5.3-main.57eca40",
|
|
4
4
|
"description": "React client API",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -91,17 +91,17 @@
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@dxos/async": "0.5.3-main.
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/config": "0.5.3-main.
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/node-std": "0.5.3-main.
|
|
103
|
-
"@dxos/react-async": "0.5.3-main.
|
|
104
|
-
"@dxos/util": "0.5.3-main.
|
|
94
|
+
"@dxos/async": "0.5.3-main.57eca40",
|
|
95
|
+
"@dxos/codec-protobuf": "0.5.3-main.57eca40",
|
|
96
|
+
"@dxos/config": "0.5.3-main.57eca40",
|
|
97
|
+
"@dxos/client": "0.5.3-main.57eca40",
|
|
98
|
+
"@dxos/debug": "0.5.3-main.57eca40",
|
|
99
|
+
"@dxos/echo-signals": "0.5.3-main.57eca40",
|
|
100
|
+
"@dxos/log": "0.5.3-main.57eca40",
|
|
101
|
+
"@dxos/invariant": "0.5.3-main.57eca40",
|
|
102
|
+
"@dxos/node-std": "0.5.3-main.57eca40",
|
|
103
|
+
"@dxos/react-async": "0.5.3-main.57eca40",
|
|
104
|
+
"@dxos/util": "0.5.3-main.57eca40"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@testing-library/dom": "^8.17.1",
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
"react": "^18.2.0",
|
|
113
113
|
"react-dom": "^18.2.0",
|
|
114
114
|
"yjs": "^13.6.10",
|
|
115
|
-
"@dxos/random": "0.5.3-main.
|
|
116
|
-
"@dxos/react-ui
|
|
117
|
-
"@dxos/react-ui": "0.5.3-main.
|
|
118
|
-
"@dxos/storybook-utils": "0.5.3-main.
|
|
115
|
+
"@dxos/random": "0.5.3-main.57eca40",
|
|
116
|
+
"@dxos/react-ui": "0.5.3-main.57eca40",
|
|
117
|
+
"@dxos/react-ui-theme": "0.5.3-main.57eca40",
|
|
118
|
+
"@dxos/storybook-utils": "0.5.3-main.57eca40"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"react": "*",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
"optionalDependencies": {
|
|
125
125
|
"yjs": "^13.6.10",
|
|
126
|
-
"@dxos/random": "0.5.3-main.
|
|
126
|
+
"@dxos/random": "0.5.3-main.57eca40"
|
|
127
127
|
},
|
|
128
128
|
"publishConfig": {
|
|
129
129
|
"access": "public"
|
|
@@ -25,33 +25,36 @@ interface InvitationReducerState {
|
|
|
25
25
|
haltedAt?: Invitation.State;
|
|
26
26
|
result: InvitationResult;
|
|
27
27
|
error?: number;
|
|
28
|
-
observable?: CancellableInvitationObservable | AuthenticatingInvitationObservable;
|
|
29
28
|
id?: string;
|
|
29
|
+
multiUse?: boolean;
|
|
30
30
|
invitationCode?: string;
|
|
31
31
|
authCode?: string;
|
|
32
|
-
|
|
32
|
+
authMethod?: Invitation.AuthMethod;
|
|
33
|
+
type?: Invitation.Type;
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
type InvitationPayload = { invitation: Invitation };
|
|
37
|
+
|
|
35
38
|
export type InvitationAction =
|
|
36
|
-
| {
|
|
39
|
+
| ({
|
|
37
40
|
status:
|
|
38
41
|
| Invitation.State.INIT
|
|
39
42
|
| Invitation.State.CONNECTED
|
|
40
43
|
| Invitation.State.READY_FOR_AUTHENTICATION
|
|
41
44
|
| Invitation.State.AUTHENTICATING;
|
|
42
|
-
}
|
|
43
|
-
| {
|
|
45
|
+
} & InvitationPayload)
|
|
46
|
+
| ({
|
|
44
47
|
status: Invitation.State.CONNECTING;
|
|
45
48
|
observable: CancellableInvitationObservable;
|
|
46
|
-
}
|
|
47
|
-
| {
|
|
49
|
+
} & InvitationPayload)
|
|
50
|
+
| ({
|
|
48
51
|
status: Invitation.State.SUCCESS;
|
|
49
52
|
result: InvitationResult;
|
|
50
|
-
}
|
|
51
|
-
| {
|
|
53
|
+
} & InvitationPayload)
|
|
54
|
+
| ({
|
|
52
55
|
status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;
|
|
53
56
|
haltedAt: Invitation.State;
|
|
54
|
-
}
|
|
57
|
+
} & InvitationPayload)
|
|
55
58
|
| {
|
|
56
59
|
status: Invitation.State.ERROR;
|
|
57
60
|
error?: Error;
|
|
@@ -75,12 +78,24 @@ export type InvitationStatus = {
|
|
|
75
78
|
authenticate(authCode: string): Promise<void>;
|
|
76
79
|
};
|
|
77
80
|
|
|
78
|
-
export const useInvitationStatus = (
|
|
81
|
+
export const useInvitationStatus = (observable?: CancellableInvitationObservable): InvitationStatus => {
|
|
79
82
|
const [state, dispatch] = useReducer<Reducer<InvitationReducerState, InvitationAction>, null>(
|
|
80
83
|
(prev, action) => {
|
|
81
84
|
log('useInvitationStatus', { action });
|
|
85
|
+
const invitationProps =
|
|
86
|
+
'invitation' in action
|
|
87
|
+
? {
|
|
88
|
+
id: action.invitation.invitationId,
|
|
89
|
+
multiUse: action.invitation.multiUse,
|
|
90
|
+
invitationCode: InvitationEncoder.encode(action.invitation),
|
|
91
|
+
authCode: action.invitation.authCode,
|
|
92
|
+
authMethod: action.invitation.authMethod,
|
|
93
|
+
type: action.invitation.type,
|
|
94
|
+
}
|
|
95
|
+
: {};
|
|
82
96
|
return {
|
|
83
97
|
...prev,
|
|
98
|
+
...invitationProps,
|
|
84
99
|
// TODO(burdon): State.
|
|
85
100
|
status: action.status,
|
|
86
101
|
// `invitationObservable`, `secret`, and `result` is persisted between the status-actions that set them.
|
|
@@ -93,16 +108,20 @@ export const useInvitationStatus = (initialObservable?: CancellableInvitationObs
|
|
|
93
108
|
action.status === Invitation.State.TIMEOUT) && {
|
|
94
109
|
haltedAt: typeof prev.haltedAt === 'undefined' ? action.haltedAt : prev.haltedAt,
|
|
95
110
|
}),
|
|
96
|
-
observable:
|
|
97
|
-
action.status === Invitation.State.CONNECTING ? action.observable ?? prev.observable : prev.observable,
|
|
98
111
|
} as InvitationReducerState;
|
|
99
112
|
},
|
|
100
113
|
null,
|
|
101
114
|
(_arg: null) => {
|
|
115
|
+
const invitation = observable?.get();
|
|
102
116
|
return {
|
|
103
117
|
status: Invitation.State.INIT,
|
|
104
118
|
result: { spaceKey: null, identityKey: null, swarmKey: null, target: null },
|
|
105
|
-
|
|
119
|
+
id: invitation?.invitationId,
|
|
120
|
+
multiUse: invitation?.multiUse,
|
|
121
|
+
invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,
|
|
122
|
+
authCode: invitation?.authCode,
|
|
123
|
+
authMethod: invitation?.authMethod,
|
|
124
|
+
type: invitation?.type,
|
|
106
125
|
};
|
|
107
126
|
},
|
|
108
127
|
);
|
|
@@ -112,10 +131,12 @@ export const useInvitationStatus = (initialObservable?: CancellableInvitationObs
|
|
|
112
131
|
useEffect(() => {
|
|
113
132
|
const update = (invitation: Invitation) => {
|
|
114
133
|
switch (invitation.state) {
|
|
134
|
+
case Invitation.State.INIT:
|
|
115
135
|
case Invitation.State.CONNECTED:
|
|
116
136
|
case Invitation.State.READY_FOR_AUTHENTICATION:
|
|
117
137
|
case Invitation.State.AUTHENTICATING: {
|
|
118
138
|
dispatch({
|
|
139
|
+
invitation,
|
|
119
140
|
status: invitation.state,
|
|
120
141
|
});
|
|
121
142
|
break;
|
|
@@ -123,6 +144,7 @@ export const useInvitationStatus = (initialObservable?: CancellableInvitationObs
|
|
|
123
144
|
|
|
124
145
|
case Invitation.State.SUCCESS: {
|
|
125
146
|
dispatch({
|
|
147
|
+
invitation,
|
|
126
148
|
status: invitation.state,
|
|
127
149
|
result: {
|
|
128
150
|
spaceKey: invitation.spaceKey || null,
|
|
@@ -136,58 +158,46 @@ export const useInvitationStatus = (initialObservable?: CancellableInvitationObs
|
|
|
136
158
|
|
|
137
159
|
case Invitation.State.CANCELLED:
|
|
138
160
|
case Invitation.State.TIMEOUT: {
|
|
139
|
-
dispatch({ status: invitation.state, haltedAt: state.status });
|
|
161
|
+
dispatch({ invitation, status: invitation.state, haltedAt: state.status });
|
|
140
162
|
break;
|
|
141
163
|
}
|
|
142
164
|
}
|
|
143
165
|
};
|
|
144
166
|
|
|
145
|
-
const subscription =
|
|
167
|
+
const subscription = observable?.subscribe(update, (err: Error) => {
|
|
146
168
|
dispatch({ status: Invitation.State.ERROR, error: err, haltedAt: state.status });
|
|
147
169
|
});
|
|
148
170
|
|
|
149
|
-
const currentState =
|
|
171
|
+
const currentState = observable?.get();
|
|
150
172
|
if (currentState) {
|
|
151
173
|
update(currentState);
|
|
152
174
|
}
|
|
153
175
|
|
|
154
176
|
return () => subscription?.unsubscribe();
|
|
155
|
-
}, [
|
|
177
|
+
}, [observable, state.status]);
|
|
156
178
|
|
|
157
179
|
// Return memoized callbacks & values.
|
|
158
180
|
|
|
159
181
|
const connect = useCallback((observable: CancellableInvitationObservable) => {
|
|
160
|
-
dispatch({ status: Invitation.State.CONNECTING, observable });
|
|
182
|
+
dispatch({ invitation: observable.get(), status: Invitation.State.CONNECTING, observable });
|
|
161
183
|
}, []);
|
|
162
184
|
|
|
163
185
|
const authenticate = useCallback(
|
|
164
186
|
(authCode: string) => {
|
|
165
187
|
log('authenticating...', { authCode });
|
|
166
|
-
return (
|
|
188
|
+
return (observable as AuthenticatingInvitationObservable).authenticate(authCode);
|
|
167
189
|
},
|
|
168
|
-
[
|
|
190
|
+
[observable],
|
|
169
191
|
);
|
|
170
192
|
|
|
171
|
-
const cancel = useCallback(async () =>
|
|
193
|
+
const cancel = useCallback(async () => observable?.cancel(), [observable]);
|
|
172
194
|
|
|
173
195
|
return useMemo(() => {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
status: state.status,
|
|
177
|
-
haltedAt: state.haltedAt,
|
|
178
|
-
result: state.result,
|
|
179
|
-
error: state.error,
|
|
196
|
+
return {
|
|
197
|
+
...state,
|
|
180
198
|
cancel,
|
|
181
199
|
connect,
|
|
182
200
|
authenticate,
|
|
183
|
-
id: invitation?.invitationId,
|
|
184
|
-
multiUse: invitation?.multiUse,
|
|
185
|
-
invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,
|
|
186
|
-
authCode: invitation?.authCode,
|
|
187
|
-
authMethod: invitation?.authMethod,
|
|
188
|
-
type: invitation?.type,
|
|
189
201
|
};
|
|
190
|
-
|
|
191
|
-
return result;
|
|
192
202
|
}, [state, cancel, connect, authenticate]);
|
|
193
203
|
};
|
package/typedoc.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 { useReducer, type Reducer, useMemo, useCallback, useEffect } 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?: number;\n observable?: CancellableInvitationObservable | AuthenticatingInvitationObservable;\n id?: string;\n invitationCode?: string;\n authCode?: string;\n multiUse?: boolean;\n}\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 }\n | {\n status: Invitation.State.CONNECTING;\n observable: CancellableInvitationObservable;\n }\n | {\n status: Invitation.State.SUCCESS;\n result: InvitationResult;\n }\n | {\n status: Invitation.State.CANCELLED | Invitation.State.TIMEOUT;\n haltedAt: Invitation.State;\n }\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 result: InvitationResult;\n error?: number;\n cancel(): void;\n // TODO(wittjosiah): Remove?\n connect(observable: CancellableInvitationObservable): void;\n authenticate(authCode: string): Promise<void>;\n};\n\nexport const useInvitationStatus = (initialObservable?: CancellableInvitationObservable): InvitationStatus => {\n const [state, dispatch] = useReducer<Reducer<InvitationReducerState, InvitationAction>, null>(\n (prev, action) => {\n log('useInvitationStatus', { action });\n return {\n ...prev,\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 observable:\n action.status === Invitation.State.CONNECTING ? action.observable ?? prev.observable : prev.observable,\n } as InvitationReducerState;\n },\n null,\n (_arg: null) => {\n return {\n status: Invitation.State.INIT,\n result: { spaceKey: null, identityKey: null, swarmKey: null, target: null },\n observable: initialObservable,\n };\n },\n );\n\n // Handle unmount.\n\n useEffect(() => {\n const update = (invitation: Invitation) => {\n switch (invitation.state) {\n case Invitation.State.CONNECTED:\n case Invitation.State.READY_FOR_AUTHENTICATION:\n case Invitation.State.AUTHENTICATING: {\n dispatch({\n status: invitation.state,\n });\n break;\n }\n\n case Invitation.State.SUCCESS: {\n dispatch({\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({ status: invitation.state, haltedAt: state.status });\n break;\n }\n }\n };\n\n const subscription = state.observable?.subscribe(update, (err: Error) => {\n dispatch({ status: Invitation.State.ERROR, error: err, haltedAt: state.status });\n });\n\n const currentState = state.observable?.get();\n if (currentState) {\n update(currentState);\n }\n\n return () => subscription?.unsubscribe();\n }, [state.observable, state.status]);\n\n // Return memoized callbacks & values.\n\n const connect = useCallback((observable: CancellableInvitationObservable) => {\n dispatch({ status: Invitation.State.CONNECTING, observable });\n }, []);\n\n const authenticate = useCallback(\n (authCode: string) => {\n log('authenticating...', { authCode });\n return (state.observable as AuthenticatingInvitationObservable).authenticate(authCode);\n },\n [state.observable],\n );\n\n const cancel = useCallback(async () => state.observable?.cancel(), [state.observable]);\n\n return useMemo(() => {\n const invitation = state.observable?.get();\n const result = {\n status: state.status,\n haltedAt: state.haltedAt,\n result: state.result,\n error: state.error,\n cancel,\n connect,\n authenticate,\n id: invitation?.invitationId,\n multiUse: invitation?.multiUse,\n invitationCode: invitation ? InvitationEncoder.encode(invitation) : undefined,\n authCode: invitation?.authCode,\n authMethod: invitation?.authMethod,\n type: invitation?.type,\n };\n\n return result;\n }, [state, cancel, connect, authenticate]);\n};\n"],
|
|
5
|
-
"mappings": ";AAKA,SACEA,oCACAC,iCACAC,qBAAAA,oBACAC,cAAAA,aAEAC,wBACK;;;ACRP,SAASC,YAA0BC,SAASC,aAAaC,iBAAiB;AAG1E,SAGEC,YACAC,yBACK;AACP,SAASC,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MACpEP,UAAUZ,YAAYY;MACtBQ,YAAYpB,YAAYoB;MACxBC,MAAMrB,YAAYqB;IACpB;AAEA,WAAOtC;EACT,GAAG;IAACL;IAAOmC;IAAQH;IAASC;GAAa;AAC3C;",
|
|
6
|
-
"names": ["AuthenticatingInvitationObservable", "CancellableInvitationObservable", "InvitationEncoder", "Invitation", "InvitationsProxy", "useReducer", "useMemo", "useCallback", "useEffect", "Invitation", "InvitationEncoder", "log", "useInvitationStatus", "initialObservable", "state", "dispatch", "prev", "action", "status", "result", "State", "SUCCESS", "ERROR", "error", "CANCELLED", "TIMEOUT", "haltedAt", "observable", "CONNECTING", "_arg", "INIT", "spaceKey", "identityKey", "swarmKey", "target", "update", "invitation", "CONNECTED", "READY_FOR_AUTHENTICATION", "AUTHENTICATING", "subscription", "subscribe", "err", "currentState", "get", "unsubscribe", "connect", "authenticate", "authCode", "cancel", "id", "invitationId", "multiUse", "invitationCode", "encode", "undefined", "authMethod", "type"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/client/ClientContext.tsx", "../../../src/banner.ts", "../../../src/client/useClientServices.ts", "../../../src/client/useConfig.ts", "../../../src/client/useShell.ts", "../../../src/client/useStatus.ts", "../../../src/client/AgentHostingProvider.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nimport React, {\n type ReactNode,\n useState,\n type Context,\n createContext,\n useContext,\n useEffect,\n type FunctionComponent,\n useMemo,\n} from 'react';\n\nimport { Client, type ClientOptions } from '@dxos/client';\nimport { SystemStatus, type ClientServices, type ClientServicesProvider } from '@dxos/client/services';\nimport { type Config } from '@dxos/config';\nimport { raise } from '@dxos/debug';\nimport { registerSignalFactory } from '@dxos/echo-signals/react';\nimport { log } from '@dxos/log';\nimport { getAsyncValue, type MaybePromise, type Provider } from '@dxos/util'; // TODO(burdon): Deprecate \"util\"?\n\nimport { printBanner } from '../banner';\n\n// TODO(burdon): Reconcile with ClientOptions.\nexport type ClientContextProps = {\n client: Client;\n\n // Optionally expose services (e.g., for devtools).\n // TODO(burdon): Can't this just be accessed via `client.services`?\n services?: ClientServices;\n\n status?: SystemStatus | null;\n};\n\nexport const ClientContext: Context<ClientContextProps | undefined> = createContext<ClientContextProps | undefined>(\n undefined,\n);\n\n/**\n * Hook returning instance of DXOS client.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useClient = () => {\n const { client } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return client;\n};\n\nexport type ClientProviderProps = Omit<ClientOptions, 'config' | 'services'> & {\n children?: ReactNode;\n\n /**\n * Config object or async provider.\n */\n config?: Config | Provider<Promise<Config>>;\n\n /**\n * Callback to enable the caller to create a custom ClientServicesProvider.\n *\n * Most apps won't need this.\n */\n services?: (config?: Config) => MaybePromise<ClientServicesProvider>;\n\n /**\n * Client object or async provider to enable to caller to do custom initialization.\n *\n * Most apps won't need this.\n */\n // TODO(wittjosiah): Remove async and just use to keeping reference to client?\n // (Prefering `onInitialized` for custom initialization.)\n client?: Client | Provider<Promise<Client>>;\n\n /**\n * ReactNode to display until the client is available.\n */\n // TODO(wittjosiah): Rename to `placeholder`.\n fallback?: FunctionComponent<Partial<ClientContextProps>>;\n\n /**\n * Set to false to stop default signal factory from being registered.\n */\n registerSignalFactory?: boolean;\n\n /**\n * Post initialization hook to enable to caller to do custom initialization.\n *\n * @param Client\n */\n onInitialized?: (client: Client) => MaybePromise<void>;\n};\n\n/**\n * Root component that provides the DXOS client instance to child components.\n * To be used with the `useClient` hook.\n */\nexport const ClientProvider = ({\n children,\n config: configProvider,\n services: createServices,\n client: clientProvider,\n fallback: Fallback = () => null,\n registerSignalFactory: register = true,\n onInitialized,\n ...options\n}: ClientProviderProps) => {\n useMemo(() => {\n // TODO(wittjosiah): Ideally this should be imported asynchronosly because it is optional.\n // Unfortunately, async import seemed to break signals React instrumentation.\n register && registerSignalFactory();\n }, []);\n\n const [client, setClient] = useState(clientProvider instanceof Client ? clientProvider : undefined);\n const [status, setStatus] = useState<SystemStatus | null>(null);\n const [error, setError] = useState();\n if (error) {\n throw error;\n }\n\n useEffect(() => {\n if (!client) {\n return;\n }\n\n const subscription = client.status.subscribe((status) => setStatus(status));\n return () => subscription.unsubscribe();\n }, [client, setStatus]);\n\n useEffect(() => {\n const done = async (client: Client) => {\n await client.initialize().catch(setError);\n log('client ready');\n await onInitialized?.(client);\n log('initialization complete');\n setClient(client);\n setStatus(client.status.get() ?? SystemStatus.ACTIVE);\n printBanner(client);\n };\n\n const timeout = setTimeout(async () => {\n if (clientProvider) {\n // Asynchronously request client.\n const client = await getAsyncValue(clientProvider);\n await done(client);\n } else {\n // Asynchronously construct client (config may be undefined).\n const config = await getAsyncValue(configProvider);\n log('resolved config', { config });\n const services = await createServices?.(config);\n log('created services', { services });\n const client = new Client({ config, services, ...options });\n log('created client');\n await done(client);\n }\n });\n\n return () => {\n log('clean up');\n clearTimeout(timeout);\n void client?.destroy().catch((err) => log.catch(err));\n };\n }, [clientProvider, configProvider, createServices]);\n\n if (!client || status !== SystemStatus.ACTIVE) {\n return <Fallback client={client} status={status} />;\n }\n\n // prettier-ignore\n return (\n <ClientContext.Provider value={{ client, status }}>\n {children}\n </ClientContext.Provider>\n );\n};\n", "//\n// Copyright 2021 DXOS.org\n//\n\nimport { type Client } from '@dxos/client';\n\n// http://patorjk.com/software/taag/#p=testall&f=Patorjk-HeX&t=DXOS\nconst BANNER = (client: Client) => {\n const commitHash = client.config.get('runtime.app.build.commitHash');\n const hash = commitHash ? ` App Commit ${commitHash} \\n` : '';\n\n return (\n '\\n' +\n '_/\\\\/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\______/\\\\/\\\\/\\\\/\\\\/\\\\_\\n' +\n '_/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\__/\\\\/\\\\_________\\n' +\n '_/\\\\/\\\\____/\\\\/\\\\______/\\\\/\\\\______/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\___\\n' +\n '_/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\__________/\\\\/\\\\_\\n' +\n '_/\\\\/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\____/\\\\/\\\\/\\\\/\\\\/\\\\___\\n' +\n `\\n DXOS Client ${client.version} \\n${hash}`\n );\n};\n\nlet bannerPrinted = false;\n\nexport const printBanner = (client: Client) => {\n if (bannerPrinted) {\n return;\n }\n\n bannerPrinted = true;\n // eslint-disable-next-line no-console\n console.log(`%c${BANNER(client)}`, 'font-family: monospace;');\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport type { ClientServices } from '@dxos/client/services';\nimport { raise } from '@dxos/debug';\n\nimport { ClientContext } from './ClientContext';\n\nexport const useClientServices = (): ClientServices | undefined => {\n const { services } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return services;\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { ClientContext } from './ClientContext';\n\n/**\n * Hook returning config object used to initialize the DXOS client instance.\n * Requires ClientContext to be set via ClientProvider.\n */\nexport const useConfig = () => {\n const { client } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return client.config;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Shell } from '@dxos/client/services';\n\nimport { useClient } from './ClientContext';\n\n/**\n * Helper hook to access the shell.\n */\nexport const useShell = (): Shell => {\n const client = useClient();\n return client.shell;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport type { SystemStatus } from '@dxos/client/services';\nimport { raise } from '@dxos/debug';\n\nimport { ClientContext } from './ClientContext';\n\nexport const useStatus = (): SystemStatus | null | undefined => {\n const { status } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));\n return status;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { createContext, type PropsWithChildren, useContext, useState } from 'react';\n\nimport { type Halo } from '@dxos/client/halo';\nimport { type AgentHostingProviderClient, AgentManagerClient, FakeAgentHostingProvider } from '@dxos/client/services';\nimport { type Config } from '@dxos/config';\nimport { log } from '@dxos/log';\n\nimport { useClient } from './ClientContext';\n\n/*\n * Interface for invoking the agent hosting provider client.\n * @experimental\n */\n\nexport type AgentHostingProviderProps = { config: Config; halo: Halo };\n\nexport const AgentHostingContext = createContext<AgentHostingProviderClient | null>(null);\n\nexport const AgentHostingProvider = (props: PropsWithChildren<{}>) => {\n const client = useClient();\n const [agentHostingProviderClient] = useState(makeClient(client));\n return (\n <AgentHostingContext.Provider value={agentHostingProviderClient}> {props.children}</AgentHostingContext.Provider>\n );\n};\n\nexport const useAgentHostingClient = () => {\n return useContext(AgentHostingContext);\n};\n\nconst makeClient = ({ config, halo }: AgentHostingProviderProps) => {\n const agentHostingConfig = config.get('runtime.services.agentHosting');\n if (!agentHostingConfig) {\n log('no agent hosting configured');\n return null;\n }\n\n // TODO(nf): Dynamically discover based on runtime config.\n let agentHostingProviderClient: AgentHostingProviderClient | null = null;\n switch (agentHostingConfig.type) {\n case 'LOCAL_TESTING': {\n log('using FakeAgentHostingProvider');\n return new FakeAgentHostingProvider(config, halo);\n }\n\n case 'AGENTHOSTING_API': {\n agentHostingProviderClient = new AgentManagerClient(config, halo);\n if (agentHostingProviderClient.init()) {\n return agentHostingProviderClient;\n } else {\n // Not authorized or error initializing\n return null;\n }\n }\n\n default: {\n log.error('Unknown agent hosting provider type: ' + agentHostingConfig.type);\n return null;\n }\n }\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,OAAOA,SAELC,UAEAC,eACAC,YACAC,WAEAC,eACK;A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MC,qBAAqBF,OAAOG,IAAI,+BAAA;AACtC,MAAI,CAACD,oBAAoB;AACvBE,IAAAA,KAAI,+BAAA,QAAA;;;;;;AACJ,WAAO;EACT;AAGA,MAAIb,6BAAgE;AACpE,UAAQW,mBAAmBG,MAAI;IAC7B,KAAK,iBAAiB;AACpBD,MAAAA,KAAI,kCAAA,QAAA;;;;;;AACJ,aAAO,IAAIE,yBAAyBN,QAAQC,IAAAA;IAC9C;IAEA,KAAK,oBAAoB;AACvBV,mCAA6B,IAAIgB,mBAAmBP,QAAQC,IAAAA;AAC5D,UAAIV,2BAA2BiB,KAAI,GAAI;AACrC,eAAOjB;MACT,OAAO;AAEL,eAAO;MACT;IACF;IAEA,SAAS;AACPa,MAAAA,KAAIK,MAAM,0CAA0CP,mBAAmBG,MAAI,QAAA;;;;;;AAC3E,aAAO;IACT;EACF;AACF;",
|
|
6
|
-
"names": ["React", "useState", "createContext", "useContext", "useEffect", "useMemo", "Client", "SystemStatus", "raise", "registerSignalFactory", "log", "getAsyncValue", "BANNER", "client", "commitHash", "config", "get", "hash", "version", "bannerPrinted", "printBanner", "console", "log", "ClientContext", "createContext", "undefined", "useClient", "client", "useContext", "raise", "Error", "ClientProvider", "children", "config", "configProvider", "services", "createServices", "clientProvider", "fallback", "Fallback", "registerSignalFactory", "register", "onInitialized", "options", "useMemo", "setClient", "useState", "Client", "status", "setStatus", "error", "setError", "useEffect", "subscription", "subscribe", "unsubscribe", "done", "initialize", "catch", "log", "get", "SystemStatus", "ACTIVE", "printBanner", "timeout", "setTimeout", "getAsyncValue", "clearTimeout", "destroy", "err", "Provider", "value", "useContext", "raise", "useClientServices", "services", "useContext", "ClientContext", "raise", "Error", "useContext", "raise", "useConfig", "client", "useContext", "ClientContext", "raise", "Error", "config", "useShell", "client", "useClient", "shell", "useContext", "raise", "useStatus", "status", "useContext", "ClientContext", "raise", "Error", "React", "createContext", "useContext", "useState", "AgentManagerClient", "FakeAgentHostingProvider", "log", "AgentHostingContext", "createContext", "AgentHostingProvider", "props", "client", "useClient", "agentHostingProviderClient", "useState", "makeClient", "React", "Provider", "value", "children", "useAgentHostingClient", "useContext", "config", "halo", "agentHostingConfig", "get", "log", "type", "FakeAgentHostingProvider", "AgentManagerClient", "init", "error"]
|
|
7
|
-
}
|