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