@dxos/shell 0.5.1-next.2ad6c47 → 0.5.1-next.7f021b8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/bundle/shell.mjs +82493 -9
  2. package/dist/bundle/shell.mjs.map +1 -1
  3. package/dist/bundle/shell.umd.js +91 -146
  4. package/dist/bundle/shell.umd.js.map +1 -1
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/react.mjs +23 -23
  7. package/dist/lib/browser/react.mjs.map +3 -3
  8. package/dist/types/src/composites/Shell/run-shell.d.ts.map +1 -1
  9. package/dist/types/src/composites/Shell/run-shell.js +2 -1
  10. package/dist/types/src/composites/Shell/run-shell.js.map +1 -1
  11. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +1 -1
  12. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  13. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +1 -1
  14. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  15. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts +1 -3
  16. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts.map +1 -1
  17. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +3 -2
  18. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -1
  19. package/package.json +22 -21
  20. package/src/composites/Shell/run-shell.tsx +11 -2
  21. package/src/panels/IdentityPanel/IdentityPanel.tsx +1 -1
  22. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +2 -2
  23. package/src/panels/IdentityPanel/useAgentHandlers.ts +3 -4
  24. package/dist/bundle/index-C6f21e0q.mjs +0 -96625
  25. package/dist/bundle/index-C6f21e0q.mjs.map +0 -1
  26. package/dist/bundle/index-CJ-3oETH.mjs +0 -110
  27. package/dist/bundle/index-CJ-3oETH.mjs.map +0 -1
@@ -1178,7 +1178,7 @@ import { CopySimple, Plugs, PlugsConnected } from "@phosphor-icons/react";
1178
1178
  import React29, { useEffect as useEffect3, useMemo as useMemo3, useState as useState8 } from "react";
1179
1179
  import { generateName as generateName3 } from "@dxos/display-name";
1180
1180
  import { log as log6 } from "@dxos/log";
1181
- import { useClient as useClient3 } from "@dxos/react-client";
1181
+ import { useClient as useClient4 } from "@dxos/react-client";
1182
1182
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
1183
1183
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
1184
1184
  import { useNetworkStatus, ConnectionState } from "@dxos/react-client/mesh";
@@ -1296,7 +1296,7 @@ var useIdentityMachine = (client, options) => {
1296
1296
  // packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
1297
1297
  import React25, { useCallback as useCallback4 } from "react";
1298
1298
  import { log as log2 } from "@dxos/log";
1299
- import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
1299
+ import { useAgentHostingClient, useClient as useClient2 } from "@dxos/react-client";
1300
1300
  import { useHaloInvitations } from "@dxos/react-client/halo";
1301
1301
  import { Invitation as Invitation2, InvitationEncoder } from "@dxos/react-client/invitations";
1302
1302
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx";
@@ -1304,7 +1304,7 @@ var IdentityActionChooser = (props) => {
1304
1304
  const { send } = props;
1305
1305
  const client = useClient2();
1306
1306
  const invitations = useHaloInvitations();
1307
- const agentHostingProviderClient = useAgentHostingProviderClient(client.config);
1307
+ const agentHostingProviderClient = useAgentHostingClient();
1308
1308
  const onInvitationEvent = useCallback4((invitation) => {
1309
1309
  const invitationCode = InvitationEncoder.encode(invitation);
1310
1310
  if (invitation.state === Invitation2.State.CONNECTING) {
@@ -1364,14 +1364,15 @@ import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
1364
1364
  import { useCallback as useCallback5, useEffect as useEffect2, useState as useState6 } from "react";
1365
1365
  import { invariant } from "@dxos/invariant";
1366
1366
  import { log as log4 } from "@dxos/log";
1367
- import { useAgentHostingProviderClient as useAgentHostingProviderClient2 } from "@dxos/react-client";
1367
+ import { useAgentHostingClient as useAgentHostingClient2, useClient as useClient3 } from "@dxos/react-client";
1368
1368
  import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
1369
1369
  var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts";
1370
- var useAgentHandlers = ({ client, invitations, identity }) => {
1370
+ var useAgentHandlers = ({ invitations, identity }) => {
1371
1371
  const [validationMessage, setValidationMessage] = useState6("");
1372
1372
  const [agentStatus, setAgentStatus] = useState6("");
1373
1373
  const [agentActive, setAgentActive] = useState6(false);
1374
- const agentHostingProviderClient = useAgentHostingProviderClient2(client.config);
1374
+ const agentHostingProviderClient = useAgentHostingClient2();
1375
+ const client = useClient3();
1375
1376
  useEffect2(() => {
1376
1377
  const fetchAgentStatus = async () => {
1377
1378
  if (agentHostingProviderClient) {
@@ -1397,13 +1398,13 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1397
1398
  authCode: invitation.authCode
1398
1399
  }), void 0, {
1399
1400
  F: __dxlog_file3,
1400
- L: 50,
1401
+ L: 49,
1401
1402
  S: void 0,
1402
1403
  C: (f, a) => f(...a)
1403
1404
  });
1404
1405
  invariant(identity, "Identity not found", {
1405
1406
  F: __dxlog_file3,
1406
- L: 51,
1407
+ L: 50,
1407
1408
  S: void 0,
1408
1409
  A: [
1409
1410
  "identity",
@@ -1435,7 +1436,7 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1435
1436
  const identity2 = client.halo.identity.get();
1436
1437
  invariant(identity2, "Identity not found", {
1437
1438
  F: __dxlog_file3,
1438
- L: 81,
1439
+ L: 80,
1439
1440
  S: void 0,
1440
1441
  A: [
1441
1442
  "identity",
@@ -1833,12 +1834,11 @@ var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
1833
1834
  };
1834
1835
  var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = "default", ...props }) => {
1835
1836
  const titleId = useId6("identityPanel__heading", propsTitleId);
1836
- const client = useClient3();
1837
+ const client = useClient4();
1837
1838
  const devices = useDevices();
1838
1839
  const identity = useIdentity();
1839
1840
  const invitations = useHaloInvitations2();
1840
1841
  const agentProps = useAgentHandlers({
1841
- client,
1842
1842
  identity,
1843
1843
  invitations
1844
1844
  });
@@ -1915,7 +1915,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1915
1915
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
1916
1916
  import React38, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1917
1917
  import { log as log10 } from "@dxos/log";
1918
- import { useClient as useClient5, useMulticastObservable } from "@dxos/react-client";
1918
+ import { useClient as useClient6, useMulticastObservable } from "@dxos/react-client";
1919
1919
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
1920
1920
  import { DensityProvider as DensityProvider2, useId as useId8, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1921
1921
 
@@ -2654,13 +2654,13 @@ var IdentityAdded = (props) => {
2654
2654
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2655
2655
  import React33, { useState as useState9 } from "react";
2656
2656
  import { log as log8 } from "@dxos/log";
2657
- import { useClient as useClient4 } from "@dxos/react-client";
2657
+ import { useClient as useClient5 } from "@dxos/react-client";
2658
2658
  import { useTranslation as useTranslation18 } from "@dxos/react-ui";
2659
2659
  var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2660
2660
  var IdentityInput = (props) => {
2661
2661
  const { send, method } = props;
2662
2662
  const isRecover = method === "recover identity";
2663
- const client = useClient4();
2663
+ const client = useClient5();
2664
2664
  const { t } = useTranslation18("os");
2665
2665
  const [validationMessage, setValidationMessage] = useState9("");
2666
2666
  const createIdentity = (displayName) => {
@@ -3102,7 +3102,7 @@ var JoinPanelImpl = (props) => {
3102
3102
  })))));
3103
3103
  };
3104
3104
  var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetStorage }) => {
3105
- const client = useClient5();
3105
+ const client = useClient6();
3106
3106
  const identity = useIdentity2();
3107
3107
  const { hasIosKeyboard } = useThemeContext4();
3108
3108
  const titleId = useId8("joinPanel__heading", propsTitleId);
@@ -3746,7 +3746,7 @@ import React47, { StrictMode } from "react";
3746
3746
  import { createRoot } from "react-dom/client";
3747
3747
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
3748
3748
  import { ShellRuntimeImpl } from "@dxos/client-services";
3749
- import { Client, ClientContext, ClientServicesProxy, Config, SystemStatus } from "@dxos/react-client";
3749
+ import { AgentHostingProvider, Client, ClientContext, ClientServicesProxy, Config, SystemStatus } from "@dxos/react-client";
3750
3750
  import { ThemeProvider, Tooltip as Tooltip7 } from "@dxos/react-ui";
3751
3751
  import { defaultTx } from "@dxos/react-ui-theme";
3752
3752
  import { createIFramePort } from "@dxos/rpc-tunnel";
@@ -3754,7 +3754,7 @@ import { createIFramePort } from "@dxos/rpc-tunnel";
3754
3754
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3755
3755
  import React46, { useEffect as useEffect7, useState as useState13 } from "react";
3756
3756
  import { log as log14 } from "@dxos/log";
3757
- import { ShellDisplay, ShellLayout, useClient as useClient6 } from "@dxos/react-client";
3757
+ import { ShellDisplay, ShellLayout, useClient as useClient7 } from "@dxos/react-client";
3758
3758
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
3759
3759
 
3760
3760
  // packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
@@ -3799,7 +3799,7 @@ var Shell = ({ runtime, origin }) => {
3799
3799
  spaceKey: runtime.spaceKey,
3800
3800
  target: runtime.target
3801
3801
  });
3802
- const client = useClient6();
3802
+ const client = useClient7();
3803
3803
  const space = useSpace2(spaceKey);
3804
3804
  useEffect7(() => {
3805
3805
  return runtime.layoutUpdate.on((request) => setLayout(request));
@@ -4101,15 +4101,15 @@ var runShell = async (config = new Config()) => {
4101
4101
  client,
4102
4102
  status: SystemStatus.ACTIVE
4103
4103
  }
4104
- }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
4104
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(AgentHostingProvider, null, /* @__PURE__ */ React47.createElement(Shell, {
4105
4105
  runtime,
4106
4106
  origin: location.origin
4107
- })))))));
4107
+ }))))))));
4108
4108
  };
4109
4109
 
4110
4110
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4111
4111
  import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState14 } from "react";
4112
- import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient7 } from "@dxos/react-client";
4112
+ import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient8 } from "@dxos/react-client";
4113
4113
  import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
4114
4114
  import { mx as mx25 } from "@dxos/react-ui-theme";
4115
4115
 
@@ -4147,7 +4147,7 @@ var MemoryShellRuntime = class {
4147
4147
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4148
4148
  var ShellContext = /* @__PURE__ */ createContext2({});
4149
4149
  var useShell = () => {
4150
- const client = useClient7();
4150
+ const client = useClient8();
4151
4151
  const { runtime, setDisplay } = useContext2(ShellContext);
4152
4152
  const setLayout = async (layout, options) => {
4153
4153
  if (runtime) {
@@ -4168,7 +4168,7 @@ var useShell = () => {
4168
4168
  };
4169
4169
  };
4170
4170
  var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
4171
- const client = useClient7();
4171
+ const client = useClient8();
4172
4172
  const identity = useIdentity3();
4173
4173
  const [display, setDisplay] = useState14(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4174
4174
  const shellRuntime = useMemo6(() => {