@dxos/react-ui 0.1.24-next.6b1f434 → 0.1.25-next.3c6b542

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.
@@ -780,7 +780,7 @@ var IdentityPanel = ({ identity, onClickManageProfile }) => {
780
780
  };
781
781
 
782
782
  // packages/apps/patterns/react-ui/src/panels/JoinPanel/JoinPanel.tsx
783
- import React27, { useEffect, useReducer as useReducer2 } from "react";
783
+ import React27, { useEffect, useReducer as useReducer2, useState as useState6 } from "react";
784
784
  import { InvitationEncoder as InvitationEncoder2 } from "@dxos/client";
785
785
  import { log } from "@dxos/log";
786
786
  import { useClient as useClient6, useIdentity as useIdentity2 } from "@dxos/react-client";
@@ -1762,6 +1762,7 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
1762
1762
  const internalTitleId = useId4("joinPanel__title");
1763
1763
  const titleId = propsTitleId != null ? propsTitleId : internalTitleId;
1764
1764
  const identity = useIdentity2();
1765
+ const [prevIdentity, setPrevIdentity] = useState6(identity);
1765
1766
  const availableIdentities = identity ? [
1766
1767
  identity
1767
1768
  ] : [];
@@ -1869,6 +1870,13 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
1869
1870
  spaceViewState: "invitation input",
1870
1871
  haloViewState: "invitation input"
1871
1872
  });
1873
+ if (identity !== prevIdentity) {
1874
+ setPrevIdentity(identity);
1875
+ identity && !prevIdentity && dispatch({
1876
+ type: "added identity",
1877
+ identity
1878
+ });
1879
+ }
1872
1880
  useEffect(() => {
1873
1881
  if (unredeemedHaloInvitationCode) {
1874
1882
  dispatch({
@@ -1885,7 +1893,7 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
1885
1893
  attrValue
1886
1894
  }, {
1887
1895
  file: "JoinPanel.tsx",
1888
- line: 158,
1896
+ line: 163,
1889
1897
  scope: void 0,
1890
1898
  callSite: (f, a) => f(...a)
1891
1899
  });
@@ -2290,7 +2298,7 @@ var JoinDialog = ({ slots, ...joinPanelProps }) => {
2290
2298
  };
2291
2299
 
2292
2300
  // packages/apps/patterns/react-ui/src/composites/Shell/Shell.tsx
2293
- import React33, { useEffect as useEffect2, useState as useState6 } from "react";
2301
+ import React33, { useEffect as useEffect2, useState as useState7 } from "react";
2294
2302
  import { ShellDisplay, ShellLayout } from "@dxos/protocols/proto/dxos/iframe";
2295
2303
  import { useClient as useClient8, useSpace as useSpace3, useSpaces as useSpaces2 } from "@dxos/react-client";
2296
2304
 
@@ -2386,13 +2394,13 @@ var SpaceDialog = ({ slots, ...spacePanelProps }) => {
2386
2394
 
2387
2395
  // packages/apps/patterns/react-ui/src/composites/Shell/Shell.tsx
2388
2396
  var Shell = ({ runtime, origin }) => {
2389
- const client = useClient8();
2390
- const spaces = useSpaces2();
2391
- const [{ layout, invitationCode, spaceKey }, setLayout] = useState6({
2397
+ const [{ layout, invitationCode, spaceKey }, setLayout] = useState7({
2392
2398
  layout: runtime.layout,
2393
2399
  invitationCode: runtime.invitationCode,
2394
2400
  spaceKey: runtime.spaceKey
2395
2401
  });
2402
+ const client = useClient8();
2403
+ const spaces = useSpaces2();
2396
2404
  const space = useSpace3(spaceKey);
2397
2405
  useEffect2(() => {
2398
2406
  return runtime.layoutUpdate.on((request) => setLayout(request));