@dxos/plugin-space 0.7.5-labs.e27f9b9 → 0.7.5-main.2567c87

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