@dxos/plugin-space 0.7.5-main.9d2a38b → 0.7.5-main.ff8607b

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 (171) hide show
  1. package/dist/lib/browser/{app-graph-builder-F6XSETHX.mjs → app-graph-builder-J4NX44Y4.mjs} +10 -8
  2. package/dist/lib/browser/{app-graph-builder-F6XSETHX.mjs.map → app-graph-builder-J4NX44Y4.mjs.map} +3 -3
  3. package/dist/lib/browser/{app-graph-serializer-FYJE23GN.mjs → app-graph-serializer-QF7VVRCV.mjs} +5 -5
  4. package/dist/lib/browser/{chunk-IZ7QKQ2E.mjs → chunk-6UIFMVVI.mjs} +14 -9
  5. package/dist/lib/browser/chunk-6UIFMVVI.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-SOXNANA6.mjs → chunk-PQXZCNAU.mjs} +3 -2
  7. package/dist/lib/browser/{chunk-SOXNANA6.mjs.map → chunk-PQXZCNAU.mjs.map} +3 -3
  8. package/dist/lib/browser/{chunk-UH5P4UL3.mjs → chunk-RLZQJD47.mjs} +3 -2
  9. package/dist/lib/browser/chunk-RLZQJD47.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-T36CIHPG.mjs → chunk-SDK7RZI3.mjs} +3 -3
  11. package/dist/lib/browser/{chunk-SSJ772GK.mjs → chunk-XPZ6IIXF.mjs} +4 -5
  12. package/dist/lib/browser/chunk-XPZ6IIXF.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-XXD33C4E.mjs → chunk-XZ2NH3CP.mjs} +291 -250
  14. package/dist/lib/browser/chunk-XZ2NH3CP.mjs.map +7 -0
  15. package/dist/lib/browser/{identity-created-4Q4PFIC5.mjs → identity-created-25TK5XNO.mjs} +3 -3
  16. package/dist/lib/browser/index.mjs +11 -11
  17. package/dist/lib/browser/index.mjs.map +3 -3
  18. package/dist/lib/browser/intent-resolver-IEDVV74T.mjs +523 -0
  19. package/dist/lib/browser/intent-resolver-IEDVV74T.mjs.map +7 -0
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{react-root-BDOPFJGJ.mjs → react-root-6VRPRLQR.mjs} +6 -6
  22. package/dist/lib/browser/{react-surface-EGOL2JBL.mjs → react-surface-DMNDXLZ7.mjs} +26 -33
  23. package/dist/lib/browser/react-surface-DMNDXLZ7.mjs.map +7 -0
  24. package/dist/lib/browser/{settings-WF67QZSD.mjs → settings-K4JPYYEM.mjs} +3 -3
  25. package/dist/lib/browser/{spaces-ready-WVU7US3C.mjs → spaces-ready-2MUWWVVO.mjs} +31 -32
  26. package/dist/lib/browser/spaces-ready-2MUWWVVO.mjs.map +7 -0
  27. package/dist/lib/browser/{state-MS4KYJWI.mjs → state-6DCY5YJP.mjs} +3 -3
  28. package/dist/lib/browser/types/index.mjs +2 -2
  29. package/dist/lib/node/{app-graph-builder-GKLVZ4PM.cjs → app-graph-builder-ZOPG4MOS.cjs} +58 -56
  30. package/dist/lib/node/{app-graph-builder-GKLVZ4PM.cjs.map → app-graph-builder-ZOPG4MOS.cjs.map} +3 -3
  31. package/dist/lib/node/{app-graph-serializer-RMTU5YSC.cjs → app-graph-serializer-QE2G4MWB.cjs} +21 -21
  32. package/dist/lib/node/{chunk-5D4RWKTV.cjs → chunk-3QWZCN6L.cjs} +65 -60
  33. package/dist/lib/node/chunk-3QWZCN6L.cjs.map +7 -0
  34. package/dist/lib/node/{chunk-YCBBGTFD.cjs → chunk-6MEOP3DH.cjs} +8 -9
  35. package/dist/lib/node/chunk-6MEOP3DH.cjs.map +7 -0
  36. package/dist/lib/node/{chunk-UENH2YBM.cjs → chunk-D6BFKOXY.cjs} +8 -8
  37. package/dist/lib/node/{chunk-AJRP7AD6.cjs → chunk-SZEIQGQU.cjs} +292 -251
  38. package/dist/lib/node/chunk-SZEIQGQU.cjs.map +7 -0
  39. package/dist/lib/node/{chunk-56NGXG2A.cjs → chunk-UX3U4RU2.cjs} +9 -8
  40. package/dist/lib/node/chunk-UX3U4RU2.cjs.map +7 -0
  41. package/dist/lib/node/{chunk-AO4EW2RX.cjs → chunk-WZR6OAN3.cjs} +6 -5
  42. package/dist/lib/node/{chunk-AO4EW2RX.cjs.map → chunk-WZR6OAN3.cjs.map} +3 -3
  43. package/dist/lib/node/{identity-created-QQWX7WX3.cjs → identity-created-7G5U7R36.cjs} +7 -7
  44. package/dist/lib/node/index.cjs +90 -90
  45. package/dist/lib/node/index.cjs.map +3 -3
  46. package/dist/lib/node/intent-resolver-N2W2L6OL.cjs +522 -0
  47. package/dist/lib/node/intent-resolver-N2W2L6OL.cjs.map +7 -0
  48. package/dist/lib/node/meta.json +1 -1
  49. package/dist/lib/node/{react-root-ZTR2J2I3.cjs → react-root-YD35W3VU.cjs} +12 -12
  50. package/dist/lib/node/{react-surface-75KRPQYT.cjs → react-surface-QPLXK7DT.cjs} +72 -76
  51. package/dist/lib/node/react-surface-QPLXK7DT.cjs.map +7 -0
  52. package/dist/lib/node/{settings-KOVSPA3S.cjs → settings-TEELGWS4.cjs} +8 -8
  53. package/dist/lib/node/{spaces-ready-ILVGUHJH.cjs → spaces-ready-PZZQWS6T.cjs} +39 -40
  54. package/dist/lib/node/spaces-ready-PZZQWS6T.cjs.map +7 -0
  55. package/dist/lib/node/{state-4UIOUKLJ.cjs → state-WPZC4JXB.cjs} +8 -8
  56. package/dist/lib/node/types/index.cjs +16 -16
  57. package/dist/lib/node/types/index.cjs.map +1 -1
  58. package/dist/lib/node-esm/{app-graph-builder-NEHQ5Z63.mjs → app-graph-builder-TKGLOK22.mjs} +10 -8
  59. package/dist/lib/node-esm/{app-graph-builder-NEHQ5Z63.mjs.map → app-graph-builder-TKGLOK22.mjs.map} +3 -3
  60. package/dist/lib/node-esm/{app-graph-serializer-UWWS5OVC.mjs → app-graph-serializer-HLX2JRNF.mjs} +5 -5
  61. package/dist/lib/node-esm/{chunk-E5DWIQ3N.mjs → chunk-4UX5WGKJ.mjs} +3 -3
  62. package/dist/lib/node-esm/{chunk-HTBGWQEU.mjs → chunk-AAQRELDK.mjs} +4 -5
  63. package/dist/lib/node-esm/chunk-AAQRELDK.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-7FUVU45N.mjs → chunk-ICCM4YRJ.mjs} +3 -2
  65. package/dist/lib/node-esm/{chunk-7FUVU45N.mjs.map → chunk-ICCM4YRJ.mjs.map} +3 -3
  66. package/dist/lib/node-esm/{chunk-5QMAPAZD.mjs → chunk-LA45TPAN.mjs} +14 -9
  67. package/dist/lib/node-esm/chunk-LA45TPAN.mjs.map +7 -0
  68. package/dist/lib/node-esm/{chunk-375RB3CZ.mjs → chunk-LGL4A5B5.mjs} +3 -2
  69. package/dist/lib/node-esm/chunk-LGL4A5B5.mjs.map +7 -0
  70. package/dist/lib/node-esm/{chunk-GVOPDPS2.mjs → chunk-N6EAOMIS.mjs} +291 -250
  71. package/dist/lib/node-esm/chunk-N6EAOMIS.mjs.map +7 -0
  72. package/dist/lib/node-esm/{identity-created-HMNY2MPB.mjs → identity-created-7THGZ7EW.mjs} +3 -3
  73. package/dist/lib/node-esm/index.mjs +11 -11
  74. package/dist/lib/node-esm/index.mjs.map +3 -3
  75. package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs +524 -0
  76. package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs.map +7 -0
  77. package/dist/lib/node-esm/meta.json +1 -1
  78. package/dist/lib/node-esm/{react-root-OUPJA4RY.mjs → react-root-Q5MFDXZE.mjs} +6 -6
  79. package/dist/lib/node-esm/{react-surface-7EVWCKIP.mjs → react-surface-RQQZ5BOG.mjs} +26 -33
  80. package/dist/lib/node-esm/react-surface-RQQZ5BOG.mjs.map +7 -0
  81. package/dist/lib/node-esm/{settings-EDK6WI3V.mjs → settings-KXYUZBLN.mjs} +3 -3
  82. package/dist/lib/node-esm/{spaces-ready-CH3W7OGN.mjs → spaces-ready-MWNP3WBX.mjs} +31 -32
  83. package/dist/lib/node-esm/spaces-ready-MWNP3WBX.mjs.map +7 -0
  84. package/dist/lib/node-esm/{state-BMISGQ2O.mjs → state-5GH2D5U4.mjs} +3 -3
  85. package/dist/lib/node-esm/types/index.mjs +2 -2
  86. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/app-graph-builder.d.ts +22 -22
  88. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/capabilities.d.ts +6 -0
  90. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  91. package/dist/types/src/capabilities/index.d.ts +33 -33
  92. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  94. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
  96. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +4 -3
  97. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  98. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  99. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  100. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  101. package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts.map +1 -1
  102. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts.map +1 -1
  103. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  104. package/dist/types/src/meta.d.ts +1 -0
  105. package/dist/types/src/meta.d.ts.map +1 -1
  106. package/dist/types/src/types/types.d.ts +2 -2
  107. package/dist/types/src/types/types.d.ts.map +1 -1
  108. package/dist/types/src/util.d.ts.map +1 -1
  109. package/package.json +38 -37
  110. package/src/SpacePlugin.tsx +4 -5
  111. package/src/capabilities/app-graph-builder.ts +4 -2
  112. package/src/capabilities/capabilities.ts +4 -1
  113. package/src/capabilities/intent-resolver.ts +373 -304
  114. package/src/capabilities/react-surface.tsx +22 -30
  115. package/src/capabilities/spaces-ready.ts +20 -21
  116. package/src/components/AwaitingObject.tsx +5 -5
  117. package/src/components/CreateDialog/CreateObjectDialog.tsx +15 -15
  118. package/src/components/CreateDialog/CreateObjectPanel.tsx +114 -114
  119. package/src/components/CreateDialog/CreateSpaceDialog.tsx +10 -8
  120. package/src/components/JoinDialog.tsx +27 -19
  121. package/src/components/SpacePluginSettings.tsx +3 -3
  122. package/src/components/SpacePresence.tsx +2 -3
  123. package/src/components/SpaceSettings/SpaceSettingsDialog.tsx +16 -1
  124. package/src/components/SpaceSettings/SpaceSettingsPanel.tsx +3 -4
  125. package/src/components/SyncStatus/InlineSyncStatus.tsx +2 -2
  126. package/src/components/SyncStatus/SyncStatus.tsx +2 -1
  127. package/src/meta.ts +1 -0
  128. package/src/types/types.ts +2 -3
  129. package/src/util.tsx +8 -4
  130. package/dist/lib/browser/chunk-IZ7QKQ2E.mjs.map +0 -7
  131. package/dist/lib/browser/chunk-SSJ772GK.mjs.map +0 -7
  132. package/dist/lib/browser/chunk-UH5P4UL3.mjs.map +0 -7
  133. package/dist/lib/browser/chunk-XXD33C4E.mjs.map +0 -7
  134. package/dist/lib/browser/intent-resolver-XRZYCXXX.mjs +0 -459
  135. package/dist/lib/browser/intent-resolver-XRZYCXXX.mjs.map +0 -7
  136. package/dist/lib/browser/react-surface-EGOL2JBL.mjs.map +0 -7
  137. package/dist/lib/browser/spaces-ready-WVU7US3C.mjs.map +0 -7
  138. package/dist/lib/node/chunk-56NGXG2A.cjs.map +0 -7
  139. package/dist/lib/node/chunk-5D4RWKTV.cjs.map +0 -7
  140. package/dist/lib/node/chunk-AJRP7AD6.cjs.map +0 -7
  141. package/dist/lib/node/chunk-YCBBGTFD.cjs.map +0 -7
  142. package/dist/lib/node/intent-resolver-3NI6AUAI.cjs +0 -458
  143. package/dist/lib/node/intent-resolver-3NI6AUAI.cjs.map +0 -7
  144. package/dist/lib/node/react-surface-75KRPQYT.cjs.map +0 -7
  145. package/dist/lib/node/spaces-ready-ILVGUHJH.cjs.map +0 -7
  146. package/dist/lib/node-esm/chunk-375RB3CZ.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-5QMAPAZD.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-GVOPDPS2.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-HTBGWQEU.mjs.map +0 -7
  150. package/dist/lib/node-esm/intent-resolver-P5EVBOGP.mjs +0 -460
  151. package/dist/lib/node-esm/intent-resolver-P5EVBOGP.mjs.map +0 -7
  152. package/dist/lib/node-esm/react-surface-7EVWCKIP.mjs.map +0 -7
  153. package/dist/lib/node-esm/spaces-ready-CH3W7OGN.mjs.map +0 -7
  154. /package/dist/lib/browser/{app-graph-serializer-FYJE23GN.mjs.map → app-graph-serializer-QF7VVRCV.mjs.map} +0 -0
  155. /package/dist/lib/browser/{chunk-T36CIHPG.mjs.map → chunk-SDK7RZI3.mjs.map} +0 -0
  156. /package/dist/lib/browser/{identity-created-4Q4PFIC5.mjs.map → identity-created-25TK5XNO.mjs.map} +0 -0
  157. /package/dist/lib/browser/{react-root-BDOPFJGJ.mjs.map → react-root-6VRPRLQR.mjs.map} +0 -0
  158. /package/dist/lib/browser/{settings-WF67QZSD.mjs.map → settings-K4JPYYEM.mjs.map} +0 -0
  159. /package/dist/lib/browser/{state-MS4KYJWI.mjs.map → state-6DCY5YJP.mjs.map} +0 -0
  160. /package/dist/lib/node/{app-graph-serializer-RMTU5YSC.cjs.map → app-graph-serializer-QE2G4MWB.cjs.map} +0 -0
  161. /package/dist/lib/node/{chunk-UENH2YBM.cjs.map → chunk-D6BFKOXY.cjs.map} +0 -0
  162. /package/dist/lib/node/{identity-created-QQWX7WX3.cjs.map → identity-created-7G5U7R36.cjs.map} +0 -0
  163. /package/dist/lib/node/{react-root-ZTR2J2I3.cjs.map → react-root-YD35W3VU.cjs.map} +0 -0
  164. /package/dist/lib/node/{settings-KOVSPA3S.cjs.map → settings-TEELGWS4.cjs.map} +0 -0
  165. /package/dist/lib/node/{state-4UIOUKLJ.cjs.map → state-WPZC4JXB.cjs.map} +0 -0
  166. /package/dist/lib/node-esm/{app-graph-serializer-UWWS5OVC.mjs.map → app-graph-serializer-HLX2JRNF.mjs.map} +0 -0
  167. /package/dist/lib/node-esm/{chunk-E5DWIQ3N.mjs.map → chunk-4UX5WGKJ.mjs.map} +0 -0
  168. /package/dist/lib/node-esm/{identity-created-HMNY2MPB.mjs.map → identity-created-7THGZ7EW.mjs.map} +0 -0
  169. /package/dist/lib/node-esm/{react-root-OUPJA4RY.mjs.map → react-root-Q5MFDXZE.mjs.map} +0 -0
  170. /package/dist/lib/node-esm/{settings-EDK6WI3V.mjs.map → settings-KXYUZBLN.mjs.map} +0 -0
  171. /package/dist/lib/node-esm/{state-BMISGQ2O.mjs.map → state-5GH2D5U4.mjs.map} +0 -0
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  SpaceCapabilities
3
- } from "./chunk-UH5P4UL3.mjs";
3
+ } from "./chunk-RLZQJD47.mjs";
4
4
  import {
5
5
  COMPOSER_SPACE_LOCK,
6
6
  getSpaceDisplayName
7
- } from "./chunk-IZ7QKQ2E.mjs";
7
+ } from "./chunk-6UIFMVVI.mjs";
8
8
  import {
9
9
  CollectionType,
10
10
  SpaceAction,
11
11
  SpaceForm
12
- } from "./chunk-SSJ772GK.mjs";
12
+ } from "./chunk-XPZ6IIXF.mjs";
13
13
  import {
14
14
  SPACE_PLUGIN
15
- } from "./chunk-SOXNANA6.mjs";
15
+ } from "./chunk-PQXZCNAU.mjs";
16
16
 
17
17
  // packages/plugins/plugin-space/src/components/AdvancedObjectSettings/AdvancedObjectSettings.tsx
18
18
  import React2, { useCallback as useCallback2, useState } from "react";
@@ -111,7 +111,7 @@ var AdvancedObjectSettings = ({ object }) => {
111
111
  // packages/plugins/plugin-space/src/components/AwaitingObject.tsx
112
112
  import { CheckCircle, CircleDashed, CircleNotch } from "@phosphor-icons/react";
113
113
  import React3, { useCallback as useCallback3, useEffect, useState as useState2 } from "react";
114
- import { NavigationAction, useIntentDispatcher, createIntent, useCapability, Capabilities } from "@dxos/app-framework";
114
+ import { createIntent, LayoutAction, useIntentDispatcher, useLayout } from "@dxos/app-framework";
115
115
  import { useClient } from "@dxos/react-client";
116
116
  import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
117
117
  import { Button, Toast, useTranslation as useTranslation3 } from "@dxos/react-ui";
@@ -124,7 +124,7 @@ var AwaitingObject = ({ id }) => {
124
124
  const [found, setFound] = useState2(false);
125
125
  const { t } = useTranslation3(SPACE_PLUGIN);
126
126
  const { dispatchPromise: dispatch } = useIntentDispatcher();
127
- const location = useCapability(Capabilities.Location);
127
+ const layout = useLayout();
128
128
  const client = useClient();
129
129
  const objects = useQuery(client.spaces, Filter.all());
130
130
  useEffect(() => {
@@ -141,14 +141,14 @@ var AwaitingObject = ({ id }) => {
141
141
  useEffect(() => {
142
142
  if (objects.findIndex((object) => fullyQualifiedId(object) === id) > -1) {
143
143
  setFound(true);
144
- if (location.active.solo?.[0].id === id) {
144
+ if (layout.active.includes(id)) {
145
145
  setOpen(false);
146
146
  }
147
147
  }
148
148
  }, [
149
149
  id,
150
150
  objects,
151
- location
151
+ layout
152
152
  ]);
153
153
  const handleClose = useCallback3(async () => dispatch(createIntent(SpaceAction.WaitForObject, {
154
154
  id: void 0
@@ -156,12 +156,11 @@ var AwaitingObject = ({ id }) => {
156
156
  dispatch
157
157
  ]);
158
158
  const handleNavigate = useCallback3(() => {
159
- void dispatch(createIntent(NavigationAction.Open, {
160
- activeParts: {
161
- main: [
162
- id
163
- ]
164
- }
159
+ void dispatch(createIntent(LayoutAction.Open, {
160
+ part: "main",
161
+ subject: [
162
+ id
163
+ ]
165
164
  }));
166
165
  void handleClose();
167
166
  }, [
@@ -222,19 +221,19 @@ var BaseObjectSettings = ({ object }) => {
222
221
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
223
222
  import { pipe } from "effect";
224
223
  import React6, { useCallback as useCallback5, useRef } from "react";
225
- import { chain, createIntent as createIntent2, NavigationAction as NavigationAction2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
224
+ import { chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
226
225
  import { useClient as useClient2 } from "@dxos/react-client";
227
- import { getSpace, isReactiveObject, isSpace as isSpace2, useSpaces } from "@dxos/react-client/echo";
226
+ import { getSpace, isReactiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
228
227
  import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation6 } from "@dxos/react-ui";
229
228
 
230
229
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
231
230
  import React5, { useCallback as useCallback4, useMemo, useState as useState3 } from "react";
232
231
  import { Surface, isSurfaceAvailable, usePluginManager } from "@dxos/app-framework";
233
232
  import { getObjectAnnotation, S } from "@dxos/echo-schema";
234
- import { isSpace } from "@dxos/react-client/echo";
235
- import { Icon, IconButton as IconButton3, Input as Input2, toLocalizedString, useTranslation as useTranslation5 } from "@dxos/react-ui";
236
- import { Form as Form2, InputHeader } from "@dxos/react-ui-form";
233
+ import { Icon, toLocalizedString, useTranslation as useTranslation5 } from "@dxos/react-ui";
234
+ import { Form as Form2 } from "@dxos/react-ui-form";
237
235
  import { SearchList } from "@dxos/react-ui-searchlist";
236
+ import { mx as mx2 } from "@dxos/react-ui-theme";
238
237
  import { nonNullable } from "@dxos/util";
239
238
  var useInputSurfaceLookup = (baseData) => {
240
239
  const pluginManager = usePluginManager();
@@ -260,14 +259,22 @@ var useInputSurfaceLookup = (baseData) => {
260
259
  baseData
261
260
  ]);
262
261
  };
263
- var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
262
+ var CreateObjectPanel = ({ classNames, schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
264
263
  const { t } = useTranslation5(SPACE_PLUGIN);
265
264
  const [typename, setTypename] = useState3(initialTypename);
266
265
  const [target, setTarget] = useState3(initialTarget);
267
266
  const schema = schemas.find((schema2) => getObjectAnnotation(schema2)?.typename === typename);
268
- const options = schemas.map(getObjectAnnotation).filter(nonNullable);
269
- const handleClearSchema = useCallback4(() => setTypename(void 0), []);
270
- const handleClearTarget = useCallback4(() => setTarget(void 0), []);
267
+ const options = schemas.map(getObjectAnnotation).filter(nonNullable).sort((a, b) => {
268
+ const nameA = t("typename label", {
269
+ ns: a.typename,
270
+ defaultValue: a.typename
271
+ });
272
+ const nameB = t("typename label", {
273
+ ns: b.typename,
274
+ defaultValue: b.typename
275
+ });
276
+ return nameA.localeCompare(nameB);
277
+ });
271
278
  const handleCreateObject = useCallback4(async (props) => {
272
279
  if (!schema || !target) {
273
280
  return;
@@ -291,55 +298,6 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
291
298
  resolve,
292
299
  typename
293
300
  ]);
294
- const schemaInput = /* @__PURE__ */ React5.createElement(SearchList.Root, {
295
- label: t("schema input label"),
296
- classNames: "flex flex-col grow overflow-hidden"
297
- }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
298
- autoFocus: true,
299
- "data-testid": "create-object-form.schema-input",
300
- placeholder: t("schema input placeholder"),
301
- classNames: "px-1 my-2"
302
- }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
303
- classNames: "max-bs-[24rem] overflow-auto"
304
- }, options.map((option) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
305
- key: option.typename,
306
- value: t("typename label", {
307
- ns: option.typename,
308
- defaultValue: option.typename
309
- }),
310
- onSelect: () => setTypename(option.typename),
311
- classNames: "flex items-center gap-2"
312
- }, /* @__PURE__ */ React5.createElement("span", {
313
- className: "flex gap-2 items-center grow truncate"
314
- }, /* @__PURE__ */ React5.createElement(Icon, {
315
- icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
316
- size: 5
317
- }), t("typename label", {
318
- ns: option.typename,
319
- defaultValue: option.typename
320
- }))))));
321
- const spaceInput = /* @__PURE__ */ React5.createElement(SearchList.Root, {
322
- label: t("space input label"),
323
- classNames: "flex flex-col grow overflow-hidden"
324
- }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
325
- autoFocus: true,
326
- "data-testid": "create-object-form.space-input",
327
- placeholder: t("space input placeholder"),
328
- classNames: "px-1 my-2"
329
- }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
330
- classNames: "max-bs-[24rem] overflow-auto"
331
- }, spaces.map((space) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
332
- key: space.id,
333
- value: toLocalizedString(getSpaceDisplayName(space, {
334
- personal: space.id === defaultSpaceId
335
- }), t),
336
- onSelect: () => setTarget(space),
337
- classNames: "flex items-center gap-2"
338
- }, /* @__PURE__ */ React5.createElement("span", {
339
- className: "grow truncate"
340
- }, toLocalizedString(getSpaceDisplayName(space, {
341
- personal: space.id === defaultSpaceId
342
- }), t))))));
343
301
  const inputSurfaceLookup = useInputSurfaceLookup({
344
302
  target
345
303
  });
@@ -348,6 +306,7 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
348
306
  name: S.optional(S.String)
349
307
  });
350
308
  return /* @__PURE__ */ React5.createElement(Form2, {
309
+ classNames: "!p-0",
351
310
  autoFocus: true,
352
311
  values: {
353
312
  name: initialName
@@ -364,39 +323,79 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
364
323
  ]);
365
324
  return /* @__PURE__ */ React5.createElement("div", {
366
325
  role: "form",
367
- className: "flex flex-col gap-2"
368
- }, target && /* @__PURE__ */ React5.createElement("div", {
369
- role: "none"
370
- }, /* @__PURE__ */ React5.createElement(Input2.Root, null, /* @__PURE__ */ React5.createElement(InputHeader, null, /* @__PURE__ */ React5.createElement(Input2.Label, null, t(isSpace(target) ? "creating in space label" : "creating in collection label"))), /* @__PURE__ */ React5.createElement("div", {
371
- role: "none",
372
- className: "flex gap-2"
373
- }, /* @__PURE__ */ React5.createElement(Input2.TextInput, {
374
- disabled: true,
375
- value: isSpace(target) ? toLocalizedString(getSpaceDisplayName(target, {
376
- personal: target.id === defaultSpaceId
377
- }), t) : target.name || t("unnamed collection label")
378
- }), /* @__PURE__ */ React5.createElement(IconButton3, {
379
- iconOnly: true,
380
- icon: "ph--x--regular",
381
- label: t("clear input label"),
382
- onClick: handleClearTarget
383
- })))), schema && /* @__PURE__ */ React5.createElement("div", {
384
- role: "none"
385
- }, /* @__PURE__ */ React5.createElement(Input2.Root, null, /* @__PURE__ */ React5.createElement(InputHeader, null, /* @__PURE__ */ React5.createElement(Input2.Label, null, t("creating object type label"))), /* @__PURE__ */ React5.createElement("div", {
386
- role: "none",
387
- className: "flex gap-2"
388
- }, /* @__PURE__ */ React5.createElement(Input2.TextInput, {
389
- disabled: true,
326
+ className: mx2("flex flex-col gap-2", classNames)
327
+ }, !schema ? /* @__PURE__ */ React5.createElement(SelectSchema, {
328
+ options,
329
+ resolve,
330
+ onChange: setTypename
331
+ }) : !target ? /* @__PURE__ */ React5.createElement(SelectSpace, {
332
+ spaces,
333
+ defaultSpaceId,
334
+ onChange: setTarget
335
+ }) : form);
336
+ };
337
+ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
338
+ const { t } = useTranslation5(SPACE_PLUGIN);
339
+ return /* @__PURE__ */ React5.createElement(SearchList.Root, {
340
+ label: t("space input label"),
341
+ classNames: "flex flex-col grow overflow-hidden"
342
+ }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
343
+ autoFocus: true,
344
+ "data-testid": "create-object-form.space-input",
345
+ placeholder: t("space input placeholder"),
346
+ classNames: "px-1 my-2"
347
+ }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
348
+ classNames: "max-bs-[24rem] overflow-auto"
349
+ }, spaces.sort((a, b) => {
350
+ const aName = toLocalizedString(getSpaceDisplayName(a, {
351
+ personal: a.id === defaultSpaceId
352
+ }), t);
353
+ const bName = toLocalizedString(getSpaceDisplayName(b, {
354
+ personal: b.id === defaultSpaceId
355
+ }), t);
356
+ return aName.localeCompare(bName);
357
+ }).map((space) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
358
+ key: space.id,
359
+ value: toLocalizedString(getSpaceDisplayName(space, {
360
+ personal: space.id === defaultSpaceId
361
+ }), t),
362
+ onSelect: () => onChange(space),
363
+ classNames: "flex items-center gap-2"
364
+ }, /* @__PURE__ */ React5.createElement("span", {
365
+ className: "grow truncate"
366
+ }, toLocalizedString(getSpaceDisplayName(space, {
367
+ personal: space.id === defaultSpaceId
368
+ }), t))))));
369
+ };
370
+ var SelectSchema = ({ options, resolve, onChange }) => {
371
+ const { t } = useTranslation5(SPACE_PLUGIN);
372
+ return /* @__PURE__ */ React5.createElement(SearchList.Root, {
373
+ label: t("schema input label"),
374
+ classNames: "flex flex-col grow overflow-hidden"
375
+ }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
376
+ autoFocus: true,
377
+ "data-testid": "create-object-form.schema-input",
378
+ placeholder: t("schema input placeholder"),
379
+ classNames: "px-1 my-2"
380
+ }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
381
+ classNames: "max-bs-[24rem] overflow-auto"
382
+ }, options.map((option) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
383
+ key: option.typename,
390
384
  value: t("typename label", {
391
- ns: schema.typename,
392
- defaultValue: schema.typename
393
- })
394
- }), /* @__PURE__ */ React5.createElement(IconButton3, {
395
- iconOnly: true,
396
- icon: "ph--x--regular",
397
- label: t("clear input label"),
398
- onClick: handleClearSchema
399
- })))), !schema ? schemaInput : !target ? spaceInput : form);
385
+ ns: option.typename,
386
+ defaultValue: option.typename
387
+ }),
388
+ onSelect: () => onChange(option.typename),
389
+ classNames: "flex items-center gap-2"
390
+ }, /* @__PURE__ */ React5.createElement("span", {
391
+ className: "flex gap-2 items-center grow truncate"
392
+ }, /* @__PURE__ */ React5.createElement(Icon, {
393
+ icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
394
+ size: 5
395
+ }), t("typename label", {
396
+ ns: option.typename,
397
+ defaultValue: option.typename
398
+ }))))));
400
399
  };
401
400
 
402
401
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
@@ -408,13 +407,13 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
408
407
  const spaces = useSpaces();
409
408
  const { dispatchPromise: dispatch } = useIntentDispatcher2();
410
409
  const handleCreateObject = useCallback5(async ({ schema, target: _target, data }) => {
411
- const target2 = isSpace2(_target) ? _target.properties[CollectionType.typename]?.target : _target;
410
+ const target2 = isSpace(_target) ? _target.properties[CollectionType.typename]?.target : _target;
412
411
  const createObjectIntent = resolve?.(schema.typename)?.createObject;
413
412
  if (!createObjectIntent || !target2) {
414
413
  return;
415
414
  }
416
415
  closeRef.current?.click();
417
- const space = isSpace2(target2) ? target2 : getSpace(target2);
416
+ const space = isSpace(target2) ? target2 : getSpace(target2);
418
417
  const result = await dispatch(createObjectIntent(data, {
419
418
  space
420
419
  }));
@@ -426,7 +425,9 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
426
425
  });
427
426
  const shouldNavigate = _shouldNavigate ?? (() => true);
428
427
  if (shouldNavigate(object)) {
429
- await dispatch(pipe(addObjectIntent, chain(NavigationAction2.Open, {})));
428
+ await dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
429
+ part: "main"
430
+ })));
430
431
  } else {
431
432
  await dispatch(addObjectIntent);
432
433
  }
@@ -439,7 +440,7 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
439
440
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
440
441
  // Consider factoring it out to the tabs package.
441
442
  /* @__PURE__ */ React6.createElement(Dialog.Content, {
442
- classNames: "p-0 bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
443
+ classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
443
444
  }, /* @__PURE__ */ React6.createElement("div", {
444
445
  role: "none",
445
446
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
@@ -453,9 +454,8 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
453
454
  }, /* @__PURE__ */ React6.createElement(Icon2, {
454
455
  icon: "ph--x--regular",
455
456
  size: 4
456
- })))), /* @__PURE__ */ React6.createElement("div", {
457
- className: "p-4"
458
- }, /* @__PURE__ */ React6.createElement(CreateObjectPanel, {
457
+ })))), /* @__PURE__ */ React6.createElement(CreateObjectPanel, {
458
+ classNames: "p-4",
459
459
  schemas,
460
460
  spaces,
461
461
  target,
@@ -464,13 +464,14 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
464
464
  defaultSpaceId: client.spaces.default.id,
465
465
  resolve,
466
466
  onCreateObject: handleCreateObject
467
- })))
467
+ }))
468
468
  );
469
469
  };
470
470
 
471
471
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateSpaceDialog.tsx
472
+ import { Effect } from "effect";
472
473
  import React7, { useCallback as useCallback6, useRef as useRef2 } from "react";
473
- import { createIntent as createIntent3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
474
+ import { createIntent as createIntent3, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
474
475
  import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as useTranslation7 } from "@dxos/react-ui";
475
476
  import { Form as Form3 } from "@dxos/react-ui-form";
476
477
  var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
@@ -480,15 +481,19 @@ var initialValues2 = {
480
481
  var CreateSpaceDialog = () => {
481
482
  const closeRef = useRef2(null);
482
483
  const { t } = useTranslation7(SPACE_PLUGIN);
483
- const { dispatchPromise: dispatch } = useIntentDispatcher3();
484
+ const { dispatch } = useIntentDispatcher3();
484
485
  const handleCreateSpace = useCallback6(async (data) => {
485
- const result = await dispatch(createIntent3(SpaceAction.Create, data));
486
- const target = result.data?.space;
487
- if (target) {
488
- await dispatch(createIntent3(SpaceAction.OpenCreateObject, {
489
- target
486
+ const program = Effect.gen(function* () {
487
+ const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
488
+ yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
489
+ part: "workspace",
490
+ subject: space.id
490
491
  }));
491
- }
492
+ yield* dispatch(createIntent3(SpaceAction.OpenCreateObject, {
493
+ target: space
494
+ }));
495
+ });
496
+ await Effect.runPromise(program);
492
497
  }, [
493
498
  dispatch
494
499
  ]);
@@ -496,7 +501,7 @@ var CreateSpaceDialog = () => {
496
501
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
497
502
  // Consider factoring it out to the tabs package.
498
503
  /* @__PURE__ */ React7.createElement(Dialog2.Content, {
499
- classNames: "p-0 bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
504
+ classNames: "p-0 bs-content min-bs-[16rem] max-bs-full md:max-is-[32rem] overflow-hidden"
500
505
  }, /* @__PURE__ */ React7.createElement("div", {
501
506
  role: "none",
502
507
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
@@ -524,16 +529,16 @@ var CreateSpaceDialog = () => {
524
529
  // packages/plugins/plugin-space/src/components/CollectionMain.tsx
525
530
  import React8 from "react";
526
531
  import { useTranslation as useTranslation8 } from "@dxos/react-ui";
527
- import { baseSurface, descriptionText, mx as mx2 } from "@dxos/react-ui-theme";
532
+ import { baseSurface, descriptionText, mx as mx3 } from "@dxos/react-ui-theme";
528
533
  var CollectionMain = ({ collection }) => {
529
534
  const { t } = useTranslation8(SPACE_PLUGIN);
530
535
  return /* @__PURE__ */ React8.createElement("div", {
531
536
  role: "none",
532
- className: mx2(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
537
+ className: mx3(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
533
538
  "data-testid": "composer.firstRunMessage"
534
539
  }, /* @__PURE__ */ React8.createElement("p", {
535
540
  role: "alert",
536
- className: mx2(descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
541
+ className: mx3(descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
537
542
  }, collection.name ?? t("unnamed collection label")));
538
543
  };
539
544
 
@@ -551,37 +556,62 @@ var CollectionSection = ({ collection }) => {
551
556
 
552
557
  // packages/plugins/plugin-space/src/components/JoinDialog.tsx
553
558
  import React10, { useCallback as useCallback7 } from "react";
554
- import { createIntent as createIntent4, LayoutAction, NavigationAction as NavigationAction3, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
555
- import { useGraph } from "@dxos/plugin-graph";
559
+ import { createIntent as createIntent4, LayoutAction as LayoutAction4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
560
+ import { log } from "@dxos/log";
556
561
  import { ObservabilityAction } from "@dxos/plugin-observability/types";
557
- import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
558
- import { Dialog as Dialog3, useTranslation as useTranslation10 } from "@dxos/react-ui";
562
+ import { useClient as useClient3 } from "@dxos/react-client";
563
+ import { Dialog as Dialog3 } from "@dxos/react-ui";
559
564
  import { JoinPanel } from "@dxos/shell/react";
565
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/JoinDialog.tsx";
560
566
  var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
561
567
  var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
562
- const { t } = useTranslation10(SPACE_PLUGIN);
563
568
  const { dispatchPromise: dispatch } = useIntentDispatcher4();
564
- const spaces = useSpaces2();
565
- const { graph } = useGraph();
569
+ const client = useClient3();
570
+ const { graph } = useAppGraph();
566
571
  const handleDone = useCallback7(async (result) => {
567
572
  if (result?.spaceKey) {
568
573
  await Promise.all([
569
- dispatch(createIntent4(LayoutAction.SetLayout, {
570
- element: "toast",
574
+ dispatch(createIntent4(LayoutAction4.AddToast, {
575
+ part: "toast",
571
576
  subject: {
572
577
  id: `${SPACE_PLUGIN}/join-success`,
573
578
  duration: 5e3,
574
- title: t("join success label"),
575
- closeLabel: t("dismiss label")
579
+ title: [
580
+ "join success label",
581
+ {
582
+ ns: SPACE_PLUGIN
583
+ }
584
+ ],
585
+ closeLabel: [
586
+ "dismiss label",
587
+ {
588
+ ns: SPACE_PLUGIN
589
+ }
590
+ ]
576
591
  }
577
592
  })),
578
- dispatch(createIntent4(LayoutAction.SetLayout, {
579
- element: "dialog",
580
- state: false
593
+ dispatch(createIntent4(LayoutAction4.UpdateDialog, {
594
+ part: "dialog",
595
+ options: {
596
+ state: false
597
+ }
581
598
  }))
582
599
  ]);
583
600
  }
584
- const space = spaces.find(({ key }) => result?.spaceKey?.equals(key));
601
+ const space = result?.spaceKey ? client.spaces.get(result.spaceKey) : void 0;
602
+ if (!space) {
603
+ log.warn("Space not found", result?.spaceKey, {
604
+ F: __dxlog_file,
605
+ L: 56,
606
+ S: void 0,
607
+ C: (f, a) => f(...a)
608
+ });
609
+ return;
610
+ }
611
+ await dispatch(createIntent4(LayoutAction4.SwitchWorkspace, {
612
+ part: "workspace",
613
+ subject: space.id
614
+ }));
585
615
  const target = result?.target || (navigableCollections ? space?.id : void 0);
586
616
  if (target) {
587
617
  await graph.waitForPath({
@@ -589,15 +619,15 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
589
619
  }).catch(() => {
590
620
  });
591
621
  await Promise.all([
592
- dispatch(createIntent4(NavigationAction3.Open, {
593
- activeParts: {
594
- main: [
595
- target
596
- ]
597
- }
622
+ dispatch(createIntent4(LayoutAction4.Open, {
623
+ part: "main",
624
+ subject: [
625
+ target
626
+ ]
598
627
  })),
599
- dispatch(createIntent4(NavigationAction3.Expose, {
600
- id: target
628
+ dispatch(createIntent4(LayoutAction4.Expose, {
629
+ part: "navigation",
630
+ subject: target
601
631
  }))
602
632
  ]);
603
633
  }
@@ -612,7 +642,8 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
612
642
  }
613
643
  }, [
614
644
  dispatch,
615
- spaces
645
+ client,
646
+ graph
616
647
  ]);
617
648
  return /* @__PURE__ */ React10.createElement(Dialog3.Content, null, /* @__PURE__ */ React10.createElement(JoinPanel, {
618
649
  ...props,
@@ -630,11 +661,11 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
630
661
  import { Planet } from "@phosphor-icons/react";
631
662
  import React11 from "react";
632
663
  import { getSpace as getSpace2 } from "@dxos/client/echo";
633
- import { useClient as useClient3 } from "@dxos/react-client";
634
- import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation11 } from "@dxos/react-ui";
664
+ import { useClient as useClient4 } from "@dxos/react-client";
665
+ import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation10 } from "@dxos/react-ui";
635
666
  var MenuFooter = ({ object }) => {
636
- const { t } = useTranslation11(SPACE_PLUGIN);
637
- const client = useClient3();
667
+ const { t } = useTranslation10(SPACE_PLUGIN);
668
+ const client = useClient4();
638
669
  const space = getSpace2(object);
639
670
  const spaceName = space ? getSpaceDisplayName(space, {
640
671
  personal: client.spaces.default === space
@@ -654,8 +685,8 @@ var MenuFooter = ({ object }) => {
654
685
  import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
655
686
  import React12, { useEffect as useEffect2, useState as useState4 } from "react";
656
687
  import { debounce } from "@dxos/async";
657
- import { Tooltip, useTranslation as useTranslation12 } from "@dxos/react-ui";
658
- import { getSize as getSize2, mx as mx3, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
688
+ import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
689
+ import { getSize as getSize2, mx as mx4, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
659
690
  var Status;
660
691
  (function(Status2) {
661
692
  Status2[Status2["PERSISTED_LOCALLY"] = 0] = "PERSISTED_LOCALLY";
@@ -663,7 +694,7 @@ var Status;
663
694
  Status2[Status2["ERROR"] = 2] = "ERROR";
664
695
  })(Status || (Status = {}));
665
696
  var PersistenceStatus = ({ db }) => {
666
- const { t } = useTranslation12(SPACE_PLUGIN);
697
+ const { t } = useTranslation11(SPACE_PLUGIN);
667
698
  const [displayMessage, setDisplayMessage] = useState4(false);
668
699
  const [status, naturalSetStatus] = useState4(0);
669
700
  const [prevStatus, setPrevStatus] = useState4(0);
@@ -683,17 +714,17 @@ var PersistenceStatus = ({ db }) => {
683
714
  return /* @__PURE__ */ React12.createElement("div", {
684
715
  className: "flex items-center"
685
716
  }, /* @__PURE__ */ React12.createElement(Warning, {
686
- className: mx3(getSize2(4), "me-1")
717
+ className: mx4(getSize2(4), "me-1")
687
718
  }), /* @__PURE__ */ React12.createElement("span", {
688
- className: mx3("text-sm", warningText)
719
+ className: mx4("text-sm", warningText)
689
720
  }, t("persistence error label")));
690
721
  case 1:
691
722
  return /* @__PURE__ */ React12.createElement("div", {
692
723
  className: "flex items-center"
693
724
  }, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
694
- className: mx3(getSize2(4), "me-1")
725
+ className: mx4(getSize2(4), "me-1")
695
726
  }), /* @__PURE__ */ React12.createElement("span", {
696
- className: mx3("text-sm", staticPlaceholderText)
727
+ className: mx4("text-sm", staticPlaceholderText)
697
728
  }, t("persistence pending label")));
698
729
  case 0:
699
730
  default:
@@ -703,21 +734,21 @@ var PersistenceStatus = ({ db }) => {
703
734
  role: "status",
704
735
  className: "flex items-center"
705
736
  }, /* @__PURE__ */ React12.createElement(CheckCircle2, {
706
- className: mx3(getSize2(4), "me-1")
737
+ className: mx4(getSize2(4), "me-1")
707
738
  }), displayMessage && /* @__PURE__ */ React12.createElement("span", {
708
- className: mx3("text-sm", staticPlaceholderText)
739
+ className: mx4("text-sm", staticPlaceholderText)
709
740
  }, t("persisted locally label"))), /* @__PURE__ */ React12.createElement(Tooltip.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip.Content, null, t("persisted locally message"), /* @__PURE__ */ React12.createElement(Tooltip.Arrow, null))));
710
741
  }
711
742
  };
712
743
 
713
744
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
714
745
  import React13, { useCallback as useCallback8, useRef as useRef3, useState as useState5 } from "react";
715
- import { log } from "@dxos/log";
716
- import { Button as Button4, Input as Input3, Popover, useTranslation as useTranslation13 } from "@dxos/react-ui";
717
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
746
+ import { log as log2 } from "@dxos/log";
747
+ import { Button as Button4, Input as Input2, Popover, useTranslation as useTranslation12 } from "@dxos/react-ui";
748
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
718
749
  var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
719
750
  var PopoverRenameObject = ({ object: obj }) => {
720
- const { t } = useTranslation13(SPACE_PLUGIN);
751
+ const { t } = useTranslation12(SPACE_PLUGIN);
721
752
  const doneButton = useRef3(null);
722
753
  const object = obj;
723
754
  const [name, setName] = useState5(object.name || object.title || "");
@@ -728,10 +759,10 @@ var PopoverRenameObject = ({ object: obj }) => {
728
759
  try {
729
760
  object.title = name;
730
761
  } catch (err) {
731
- log.error("Failed to rename object", {
762
+ log2.error("Failed to rename object", {
732
763
  err
733
764
  }, {
734
- F: __dxlog_file,
765
+ F: __dxlog_file2,
735
766
  L: 30,
736
767
  S: void 0,
737
768
  C: (f, a) => f(...a)
@@ -748,9 +779,9 @@ var PopoverRenameObject = ({ object: obj }) => {
748
779
  }, /* @__PURE__ */ React13.createElement("div", {
749
780
  role: "none",
750
781
  className: "flex-1"
751
- }, /* @__PURE__ */ React13.createElement(Input3.Root, null, /* @__PURE__ */ React13.createElement(Input3.Label, {
782
+ }, /* @__PURE__ */ React13.createElement(Input2.Root, null, /* @__PURE__ */ React13.createElement(Input2.Label, {
752
783
  srOnly: true
753
- }, t("object name label")), /* @__PURE__ */ React13.createElement(Input3.TextInput, {
784
+ }, t("object name label")), /* @__PURE__ */ React13.createElement(Input2.TextInput, {
754
785
  placeholder: t("object title placeholder"),
755
786
  value: name,
756
787
  "data-testid": "spacePlugin.renameObject.input",
@@ -769,10 +800,10 @@ var PopoverRenameObject = ({ object: obj }) => {
769
800
 
770
801
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
771
802
  import React14, { useCallback as useCallback9, useRef as useRef4, useState as useState6 } from "react";
772
- import { Button as Button5, Input as Input4, Popover as Popover2, useTranslation as useTranslation14 } from "@dxos/react-ui";
803
+ import { Button as Button5, Input as Input3, Popover as Popover2, useTranslation as useTranslation13 } from "@dxos/react-ui";
773
804
  var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
774
805
  var PopoverRenameSpace = ({ space }) => {
775
- const { t } = useTranslation14(SPACE_PLUGIN);
806
+ const { t } = useTranslation13(SPACE_PLUGIN);
776
807
  const doneButton = useRef4(null);
777
808
  const [name, setName] = useState6(space.properties.name ?? "");
778
809
  const handleDone = useCallback9(() => {
@@ -787,9 +818,9 @@ var PopoverRenameSpace = ({ space }) => {
787
818
  }, /* @__PURE__ */ React14.createElement("div", {
788
819
  role: "none",
789
820
  className: "flex-1"
790
- }, /* @__PURE__ */ React14.createElement(Input4.Root, null, /* @__PURE__ */ React14.createElement(Input4.Label, {
821
+ }, /* @__PURE__ */ React14.createElement(Input3.Root, null, /* @__PURE__ */ React14.createElement(Input3.Label, {
791
822
  srOnly: true
792
- }, t("space name label")), /* @__PURE__ */ React14.createElement(Input4.TextInput, {
823
+ }, t("space name label")), /* @__PURE__ */ React14.createElement(Input3.TextInput, {
793
824
  defaultValue: space.properties.name ?? "",
794
825
  placeholder: t("unnamed space label"),
795
826
  onChange: ({ target: { value } }) => setName(value),
@@ -810,7 +841,7 @@ var PopoverRenameSpace = ({ space }) => {
810
841
  // packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
811
842
  import React15 from "react";
812
843
  import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
813
- import { IconButton as IconButton4, useTranslation as useTranslation15 } from "@dxos/react-ui";
844
+ import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
814
845
  var ShareSpaceButton = ({ space }) => {
815
846
  const { dispatchPromise: dispatch } = useIntentDispatcher5();
816
847
  return /* @__PURE__ */ React15.createElement(ShareSpaceButtonImpl, {
@@ -820,8 +851,8 @@ var ShareSpaceButton = ({ space }) => {
820
851
  });
821
852
  };
822
853
  var ShareSpaceButtonImpl = ({ onClick }) => {
823
- const { t } = useTranslation15(SPACE_PLUGIN);
824
- return /* @__PURE__ */ React15.createElement(IconButton4, {
854
+ const { t } = useTranslation14(SPACE_PLUGIN);
855
+ return /* @__PURE__ */ React15.createElement(IconButton3, {
825
856
  "data-testid": "spacePlugin.shareSpaceButton",
826
857
  icon: "ph--users--regular",
827
858
  label: t("share space label"),
@@ -831,27 +862,26 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
831
862
 
832
863
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
833
864
  import React16, { useCallback as useCallback10, useEffect as useEffect4, useState as useState8 } from "react";
834
- import { useCapability as useCapability2 } from "@dxos/app-framework";
865
+ import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
835
866
  import { generateName } from "@dxos/display-name";
836
- import { useGraph as useGraph2 } from "@dxos/plugin-graph";
837
- import { PublicKey, useClient as useClient4 } from "@dxos/react-client";
867
+ import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
838
868
  import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId2 } from "@dxos/react-client/echo";
839
869
  import { useIdentity } from "@dxos/react-client/halo";
840
- import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useTranslation as useTranslation16, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
870
+ import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useTranslation as useTranslation15, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
841
871
  import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
842
872
  import { ComplexMap, keyToFallback } from "@dxos/util";
843
873
 
844
874
  // packages/plugins/plugin-space/src/capabilities/index.ts
845
875
  import { lazy } from "@dxos/app-framework";
846
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-F6XSETHX.mjs"));
847
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-FYJE23GN.mjs"));
848
- var IdentityCreated = lazy(() => import("./identity-created-4Q4PFIC5.mjs"));
849
- var IntentResolver = lazy(() => import("./intent-resolver-XRZYCXXX.mjs"));
850
- var ReactRoot = lazy(() => import("./react-root-BDOPFJGJ.mjs"));
851
- var ReactSurface = lazy(() => import("./react-surface-EGOL2JBL.mjs"));
852
- var SpaceSettings = lazy(() => import("./settings-WF67QZSD.mjs"));
853
- var SpaceState = lazy(() => import("./state-MS4KYJWI.mjs"));
854
- var SpacesReady = lazy(() => import("./spaces-ready-WVU7US3C.mjs"));
876
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-J4NX44Y4.mjs"));
877
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-QF7VVRCV.mjs"));
878
+ var IdentityCreated = lazy(() => import("./identity-created-25TK5XNO.mjs"));
879
+ var IntentResolver = lazy(() => import("./intent-resolver-IEDVV74T.mjs"));
880
+ var ReactRoot = lazy(() => import("./react-root-6VRPRLQR.mjs"));
881
+ var ReactSurface = lazy(() => import("./react-surface-DMNDXLZ7.mjs"));
882
+ var SpaceSettings = lazy(() => import("./settings-K4JPYYEM.mjs"));
883
+ var SpaceState = lazy(() => import("./state-6DCY5YJP.mjs"));
884
+ var SpacesReady = lazy(() => import("./spaces-ready-2MUWWVVO.mjs"));
855
885
 
856
886
  // packages/plugins/plugin-space/src/hooks/usePath.ts
857
887
  import { useEffect as useEffect3, useState as useState7 } from "react";
@@ -895,8 +925,8 @@ var ACTIVITY_DURATION = 3e4;
895
925
  var noViewers = new ComplexMap(PublicKey.hash);
896
926
  var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
897
927
  var SpacePresence = ({ object, spaceKey }) => {
898
- const spaceState = useCapability2(SpaceCapabilities.MutableState);
899
- const client = useClient4();
928
+ const spaceState = useCapability(SpaceCapabilities.MutableState);
929
+ const client = useClient5();
900
930
  const identity = useIdentity();
901
931
  const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
902
932
  const spaceMembers = useMembers(space?.key);
@@ -995,7 +1025,7 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
995
1025
  var SmallPresenceLive = ({ id, open, viewers }) => {
996
1026
  const { hasAttention, isAncestor, isRelated } = useAttention(id);
997
1027
  const isAttended = hasAttention || isAncestor || isRelated;
998
- const { graph } = useGraph2();
1028
+ const { graph } = useAppGraph2();
999
1029
  const attended = useAttended();
1000
1030
  const startOfAttention = attended.at(-1);
1001
1031
  const path = usePath(graph, startOfAttention);
@@ -1023,7 +1053,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1023
1053
  });
1024
1054
  };
1025
1055
  var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1026
- const { t } = useTranslation16(SPACE_PLUGIN);
1056
+ const { t } = useTranslation15(SPACE_PLUGIN);
1027
1057
  return /* @__PURE__ */ React16.createElement(Tooltip2.Root, null, /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1028
1058
  asChild: true
1029
1059
  }, /* @__PURE__ */ React16.createElement(AttentionGlyph, {
@@ -1040,13 +1070,13 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1040
1070
 
1041
1071
  // packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
1042
1072
  import React17 from "react";
1043
- import { Input as Input5, useTranslation as useTranslation17 } from "@dxos/react-ui";
1044
- import { DeprecatedFormInput } from "@dxos/react-ui-form";
1073
+ import { Input as Input4, useTranslation as useTranslation16 } from "@dxos/react-ui";
1074
+ import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
1045
1075
  var SpacePluginSettings = ({ settings }) => {
1046
- const { t } = useTranslation17(SPACE_PLUGIN);
1047
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1076
+ const { t } = useTranslation16(SPACE_PLUGIN);
1077
+ return /* @__PURE__ */ React17.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1048
1078
  label: t("show hidden spaces label")
1049
- }, /* @__PURE__ */ React17.createElement(Input5.Switch, {
1079
+ }, /* @__PURE__ */ React17.createElement(Input4.Switch, {
1050
1080
  checked: settings.showHidden,
1051
1081
  onCheckedChange: (checked) => settings.showHidden = !!checked
1052
1082
  })));
@@ -1054,24 +1084,23 @@ var SpacePluginSettings = ({ settings }) => {
1054
1084
 
1055
1085
  // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx
1056
1086
  import React18, { useCallback as useCallback11, useState as useState9 } from "react";
1057
- import { log as log2 } from "@dxos/log";
1087
+ import { log as log3 } from "@dxos/log";
1058
1088
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1059
- import { useClient as useClient5 } from "@dxos/react-client";
1060
- import { Input as Input6, useTranslation as useTranslation18 } from "@dxos/react-ui";
1061
- import { DeprecatedFormInput as DeprecatedFormInput2 } from "@dxos/react-ui-form";
1062
- import { mx as mx4 } from "@dxos/react-ui-theme";
1063
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx";
1089
+ import { useClient as useClient6 } from "@dxos/react-client";
1090
+ import { Input as Input5, useTranslation as useTranslation17 } from "@dxos/react-ui";
1091
+ import { DeprecatedFormContainer as DeprecatedFormContainer2, DeprecatedFormInput as DeprecatedFormInput2 } from "@dxos/react-ui-form";
1092
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx";
1064
1093
  var SpaceSettingsPanel = ({ classNames, space }) => {
1065
- const { t } = useTranslation18(SPACE_PLUGIN);
1066
- const client = useClient5();
1094
+ const { t } = useTranslation17(SPACE_PLUGIN);
1095
+ const client = useClient6();
1067
1096
  const edgeEnabled = Boolean(client.config.values.runtime?.client?.edgeFeatures?.echoReplicator);
1068
1097
  const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1069
1098
  const toggleEdgeReplication = useCallback11(async (next) => {
1070
1099
  setEdgeReplication(next);
1071
1100
  await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
1072
- log2.catch(err, void 0, {
1073
- F: __dxlog_file2,
1074
- L: 36,
1101
+ log3.catch(err, void 0, {
1102
+ F: __dxlog_file3,
1103
+ L: 35,
1075
1104
  S: void 0,
1076
1105
  C: (f, a) => f(...a)
1077
1106
  });
@@ -1080,12 +1109,9 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
1080
1109
  }, [
1081
1110
  space
1082
1111
  ]);
1083
- return /* @__PURE__ */ React18.createElement("div", {
1084
- role: "form",
1085
- className: mx4("flex flex-col", classNames)
1086
- }, /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1112
+ return /* @__PURE__ */ React18.createElement(DeprecatedFormContainer2, null, /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1087
1113
  label: t("name label")
1088
- }, /* @__PURE__ */ React18.createElement(Input6.TextInput, {
1114
+ }, /* @__PURE__ */ React18.createElement(Input5.TextInput, {
1089
1115
  placeholder: t("unnamed space label"),
1090
1116
  value: space.properties.name ?? "",
1091
1117
  onChange: (event) => {
@@ -1093,22 +1119,23 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
1093
1119
  }
1094
1120
  })), edgeEnabled && /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1095
1121
  label: t("edge replication label")
1096
- }, /* @__PURE__ */ React18.createElement(Input6.Switch, {
1122
+ }, /* @__PURE__ */ React18.createElement(Input5.Switch, {
1097
1123
  checked: edgeReplication,
1098
1124
  onCheckedChange: toggleEdgeReplication
1099
1125
  })));
1100
1126
  };
1101
1127
 
1102
1128
  // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsDialog.tsx
1103
- import React19, { useState as useState10 } from "react";
1104
- import { useClient as useClient6 } from "@dxos/react-client";
1105
- import { Button as Button6, Clipboard, Dialog as Dialog4, Icon as Icon4, toLocalizedString as toLocalizedString3, useTranslation as useTranslation19 } from "@dxos/react-ui";
1129
+ import React19, { useMemo as useMemo2, useState as useState10 } from "react";
1130
+ import { Surface as Surface2, useCapabilities } from "@dxos/app-framework";
1131
+ import { useClient as useClient7 } from "@dxos/react-client";
1132
+ import { Button as Button6, Clipboard, Dialog as Dialog4, Icon as Icon4, toLocalizedString as toLocalizedString3, useTranslation as useTranslation18 } from "@dxos/react-ui";
1106
1133
  import { Tabs } from "@dxos/react-ui-tabs";
1107
1134
  import { SpacePanel } from "@dxos/shell/react";
1108
1135
  var SPACE_SETTINGS_DIALOG = `${SPACE_PLUGIN}/SpaceSettingsDialog`;
1109
1136
  var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "members", namesCache }) => {
1110
- const { t } = useTranslation19(SPACE_PLUGIN);
1111
- const client = useClient6();
1137
+ const { t } = useTranslation18(SPACE_PLUGIN);
1138
+ const client = useClient7();
1112
1139
  const [tabsActivePart, setTabsActivePart] = useState10("list");
1113
1140
  const [selected, setSelected] = useState10(initialTab);
1114
1141
  const locked = space.properties[COMPOSER_SPACE_LOCK];
@@ -1116,6 +1143,12 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1116
1143
  personal: client.spaces.default === space,
1117
1144
  namesCache
1118
1145
  });
1146
+ const panels = useCapabilities(SpaceCapabilities.SettingsPanel);
1147
+ const data = useMemo2(() => ({
1148
+ subject: space
1149
+ }), [
1150
+ space
1151
+ ]);
1119
1152
  return (
1120
1153
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
1121
1154
  // Consider factoring it out to the tabs package.
@@ -1168,7 +1201,10 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1168
1201
  }, t("settings tab label")), /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1169
1202
  value: "members",
1170
1203
  disabled: locked
1171
- }, t("members tab label"))))), /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1204
+ }, t("members tab label")), panels.map((panel) => /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1205
+ key: panel.id,
1206
+ value: panel.id
1207
+ }, toLocalizedString3(panel.label, t)))))), /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1172
1208
  value: "settings",
1173
1209
  classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1174
1210
  }, /* @__PURE__ */ React19.createElement(SpaceSettingsPanel, {
@@ -1181,25 +1217,32 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1181
1217
  hideHeading: true,
1182
1218
  target,
1183
1219
  createInvitationUrl
1220
+ }))), panels.map((panel) => /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1221
+ key: panel.id,
1222
+ value: panel.id,
1223
+ classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1224
+ }, /* @__PURE__ */ React19.createElement(Surface2, {
1225
+ role: `space-settings--${panel.id}`,
1226
+ data
1184
1227
  }))))))
1185
1228
  );
1186
1229
  };
1187
1230
 
1188
1231
  // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1189
1232
  import React20, { useEffect as useEffect6, useState as useState12 } from "react";
1190
- import { useGraph as useGraph3 } from "@dxos/plugin-graph";
1233
+ import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1191
1234
  import { QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
1192
1235
  import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1193
- import { useClient as useClient8 } from "@dxos/react-client";
1194
- import { Tooltip as Tooltip3, useTranslation as useTranslation20 } from "@dxos/react-ui";
1236
+ import { useClient as useClient9 } from "@dxos/react-client";
1237
+ import { Tooltip as Tooltip3, useTranslation as useTranslation19 } from "@dxos/react-ui";
1195
1238
  import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1196
1239
 
1197
1240
  // packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts
1198
1241
  import { useEffect as useEffect5, useState as useState11 } from "react";
1199
1242
  import { Context } from "@dxos/context";
1200
1243
  import { EdgeService } from "@dxos/protocols";
1201
- import { useClient as useClient7 } from "@dxos/react-client";
1202
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts";
1244
+ import { useClient as useClient8 } from "@dxos/react-client";
1245
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts";
1203
1246
  var createEmptyEdgeSyncState = () => ({
1204
1247
  missingOnLocal: 0,
1205
1248
  missingOnRemote: 0,
@@ -1219,11 +1262,11 @@ var getSyncSummary = (syncMap) => {
1219
1262
  };
1220
1263
  var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);
1221
1264
  var useSyncState = () => {
1222
- const client = useClient7();
1265
+ const client = useClient8();
1223
1266
  const [spaceState, setSpaceState] = useState11({});
1224
1267
  useEffect5(() => {
1225
1268
  const ctx = new Context(void 0, {
1226
- F: __dxlog_file3,
1269
+ F: __dxlog_file4,
1227
1270
  L: 48
1228
1271
  });
1229
1272
  const createSubscriptions = (spaces) => {
@@ -1258,7 +1301,7 @@ var useSpaceSyncState = (space) => {
1258
1301
  const [spaceState, setSpaceState] = useState11();
1259
1302
  useEffect5(() => {
1260
1303
  const ctx = new Context(void 0, {
1261
- F: __dxlog_file3,
1304
+ F: __dxlog_file4,
1262
1305
  L: 87
1263
1306
  });
1264
1307
  space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
@@ -1279,7 +1322,7 @@ var useSpaceSyncState = (space) => {
1279
1322
  // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1280
1323
  var useEdgeStatus = () => {
1281
1324
  const [status, setStatus] = useState12(QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED);
1282
- const client = useClient8();
1325
+ const client = useClient9();
1283
1326
  useEffect6(() => {
1284
1327
  client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
1285
1328
  setStatus(status2);
@@ -1290,11 +1333,11 @@ var useEdgeStatus = () => {
1290
1333
  return status;
1291
1334
  };
1292
1335
  var InlineSyncStatus = ({ space, open }) => {
1293
- const { t } = useTranslation20(SPACE_PLUGIN);
1336
+ const { t } = useTranslation19(SPACE_PLUGIN);
1294
1337
  const id = space.id;
1295
1338
  const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1296
1339
  const isAttended = hasAttention || isAncestor || isRelated;
1297
- const { graph } = useGraph3();
1340
+ const { graph } = useAppGraph3();
1298
1341
  const attended = useAttended2();
1299
1342
  const startOfAttention = attended.at(-1);
1300
1343
  const path = usePath(graph, startOfAttention);
@@ -1319,16 +1362,16 @@ var InlineSyncStatus = ({ space, open }) => {
1319
1362
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1320
1363
  import React22, { useCallback as useCallback12, useEffect as useEffect8, useState as useState14 } from "react";
1321
1364
  import { StatusBar } from "@dxos/plugin-status-bar";
1322
- import { useClient as useClient10 } from "@dxos/react-client";
1323
- import { Icon as Icon6, Input as Input7, Popover as Popover3, useTranslation as useTranslation22 } from "@dxos/react-ui";
1365
+ import { useClient as useClient11 } from "@dxos/react-client";
1366
+ import { Icon as Icon6, Input as Input6, Popover as Popover3, useTranslation as useTranslation21 } from "@dxos/react-ui";
1324
1367
  import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
1325
1368
  import { mx as mx6 } from "@dxos/react-ui-theme";
1326
1369
 
1327
1370
  // packages/plugins/plugin-space/src/components/SyncStatus/Space.tsx
1328
1371
  import React21, { useEffect as useEffect7, useState as useState13 } from "react";
1329
- import { useClient as useClient9 } from "@dxos/react-client";
1372
+ import { useClient as useClient10 } from "@dxos/react-client";
1330
1373
  import { useSpace } from "@dxos/react-client/echo";
1331
- import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation21 } from "@dxos/react-ui";
1374
+ import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation20 } from "@dxos/react-ui";
1332
1375
  import { mx as mx5 } from "@dxos/react-ui-theme";
1333
1376
  var SYNC_STALLED_TIMEOUT = 5e3;
1334
1377
  var styles = {
@@ -1360,8 +1403,8 @@ var useActive = (count) => {
1360
1403
  return active;
1361
1404
  };
1362
1405
  var SpaceRowContainer = ({ spaceId, state }) => {
1363
- const { t } = useTranslation21(SPACE_PLUGIN);
1364
- const client = useClient9();
1406
+ const { t } = useTranslation20(SPACE_PLUGIN);
1407
+ const client = useClient10();
1365
1408
  const space = useSpace(spaceId);
1366
1409
  if (!space) {
1367
1410
  return null;
@@ -1437,7 +1480,7 @@ var Bar = ({ classNames, count, total }) => {
1437
1480
 
1438
1481
  // packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
1439
1482
  import { Context as Context2 } from "@dxos/context";
1440
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
1483
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
1441
1484
  var createClientSaveTracker = (client, cb) => {
1442
1485
  const unsubscribeCallbacks = {};
1443
1486
  const state = {};
@@ -1465,7 +1508,7 @@ var createClientSaveTracker = (client, cb) => {
1465
1508
  };
1466
1509
  var createSpaceSaveTracker = (space, cb) => {
1467
1510
  const ctx = new Context2(void 0, {
1468
- F: __dxlog_file4,
1511
+ F: __dxlog_file5,
1469
1512
  L: 40
1470
1513
  });
1471
1514
  void space.waitUntilReady().then(() => {
@@ -1528,7 +1571,7 @@ var getIcon = (status) => {
1528
1571
 
1529
1572
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1530
1573
  var SyncStatus = () => {
1531
- const client = useClient10();
1574
+ const client = useClient11();
1532
1575
  const state = useSyncState();
1533
1576
  const [saved, setSaved] = useState14(true);
1534
1577
  useEffect8(() => {
@@ -1542,7 +1585,7 @@ var SyncStatus = () => {
1542
1585
  });
1543
1586
  };
1544
1587
  var SyncStatusIndicator = ({ state, saved }) => {
1545
- const { t } = useTranslation22(SPACE_PLUGIN);
1588
+ const { t } = useTranslation21(SPACE_PLUGIN);
1546
1589
  const summary = getSyncSummary(state);
1547
1590
  const offline = Object.values(state).length === 0;
1548
1591
  const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
@@ -1583,18 +1626,16 @@ var SyncStatusIndicator = ({ state, saved }) => {
1583
1626
  asChild: true
1584
1627
  }, /* @__PURE__ */ React22.createElement(StatusBar.Button, {
1585
1628
  title
1586
- }, icon)), /* @__PURE__ */ React22.createElement(Popover3.Portal, null, /* @__PURE__ */ React22.createElement(Popover3.Content, {
1587
- sideOffset: 16
1588
- }, /* @__PURE__ */ React22.createElement(SyncStatusDetail, {
1629
+ }, icon)), /* @__PURE__ */ React22.createElement(Popover3.Portal, null, /* @__PURE__ */ React22.createElement(Popover3.Content, null, /* @__PURE__ */ React22.createElement(SyncStatusDetail, {
1589
1630
  state,
1590
1631
  summary,
1591
1632
  debug: false
1592
- }))));
1633
+ }), /* @__PURE__ */ React22.createElement(Popover3.Arrow, null))));
1593
1634
  }
1594
1635
  };
1595
1636
  var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1596
1637
  const [showAll, setShowAll] = useState14(false);
1597
- const { t } = useTranslation22(SPACE_PLUGIN);
1638
+ const { t } = useTranslation21(SPACE_PLUGIN);
1598
1639
  const entries = Object.entries(state).filter(([_, value]) => showAll || value.missingOnLocal + value.missingOnRemote > 0).toSorted(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
1599
1640
  const handleCheckedChange = useCallback12((state2) => setShowAll(state2), [
1600
1641
  setShowAll
@@ -1608,9 +1649,9 @@ var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1608
1649
  className: "flex-1"
1609
1650
  }, t("sync status title")), /* @__PURE__ */ React22.createElement("div", {
1610
1651
  className: "flex items-center gap-2"
1611
- }, /* @__PURE__ */ React22.createElement(Input7.Root, null, /* @__PURE__ */ React22.createElement(Input7.Label, {
1652
+ }, /* @__PURE__ */ React22.createElement(Input6.Root, null, /* @__PURE__ */ React22.createElement(Input6.Label, {
1612
1653
  classNames: "text-xs"
1613
- }, t("show all label")), /* @__PURE__ */ React22.createElement(Input7.Checkbox, {
1654
+ }, t("show all label")), /* @__PURE__ */ React22.createElement(Input6.Checkbox, {
1614
1655
  checked: showAll,
1615
1656
  onCheckedChange: handleCheckedChange
1616
1657
  })))), /* @__PURE__ */ React22.createElement("div", {
@@ -1669,4 +1710,4 @@ export {
1669
1710
  SpaceState,
1670
1711
  SpacesReady
1671
1712
  };
1672
- //# sourceMappingURL=chunk-XXD33C4E.mjs.map
1713
+ //# sourceMappingURL=chunk-XZ2NH3CP.mjs.map