@dxos/plugin-space 0.7.5-labs.a279d8c → 0.7.5-labs.c0e040f

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 (184) hide show
  1. package/dist/lib/browser/{app-graph-builder-5D2QB43K.mjs → app-graph-builder-GSS3V7IN.mjs} +15 -13
  2. package/dist/lib/browser/app-graph-builder-GSS3V7IN.mjs.map +7 -0
  3. package/dist/lib/browser/{app-graph-serializer-VNWPLPDF.mjs → app-graph-serializer-QDXM5M6K.mjs} +5 -5
  4. package/dist/lib/browser/{chunk-PDJ4MLA4.mjs → chunk-DIBLC24B.mjs} +308 -251
  5. package/dist/lib/browser/chunk-DIBLC24B.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-SOXNANA6.mjs → chunk-PQXZCNAU.mjs} +3 -2
  7. package/dist/lib/browser/{chunk-SOXNANA6.mjs.map → chunk-PQXZCNAU.mjs.map} +3 -3
  8. package/dist/lib/browser/{chunk-UH5P4UL3.mjs → chunk-RLZQJD47.mjs} +3 -2
  9. package/dist/lib/browser/chunk-RLZQJD47.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-5TBRONF6.mjs → chunk-SDK7RZI3.mjs} +3 -3
  11. package/dist/lib/browser/{chunk-HCXWKGTE.mjs → chunk-XPZ6IIXF.mjs} +4 -9
  12. package/dist/lib/browser/chunk-XPZ6IIXF.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-ZBKFJNHH.mjs → chunk-ZL5ZFGBK.mjs} +15 -9
  14. package/dist/lib/browser/chunk-ZL5ZFGBK.mjs.map +7 -0
  15. package/dist/lib/browser/{identity-created-EC5FOCX2.mjs → identity-created-25TK5XNO.mjs} +3 -3
  16. package/dist/lib/browser/index.mjs +14 -13
  17. package/dist/lib/browser/index.mjs.map +3 -3
  18. package/dist/lib/browser/intent-resolver-LNTCXZ57.mjs +537 -0
  19. package/dist/lib/browser/intent-resolver-LNTCXZ57.mjs.map +7 -0
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{react-root-4QQST3T2.mjs → react-root-Q7JJDCPB.mjs} +6 -6
  22. package/dist/lib/browser/{react-surface-JTNUNOJG.mjs → react-surface-BDMYLARO.mjs} +26 -33
  23. package/dist/lib/browser/react-surface-BDMYLARO.mjs.map +7 -0
  24. package/dist/lib/browser/{settings-ASFF5BZL.mjs → settings-K4JPYYEM.mjs} +3 -3
  25. package/dist/lib/browser/{spaces-ready-4SFNS5JQ.mjs → spaces-ready-THYJEJYZ.mjs} +31 -32
  26. package/dist/lib/browser/spaces-ready-THYJEJYZ.mjs.map +7 -0
  27. package/dist/lib/browser/{state-MS4KYJWI.mjs → state-6DCY5YJP.mjs} +3 -3
  28. package/dist/lib/browser/types/index.mjs +2 -4
  29. package/dist/lib/node/{app-graph-builder-ZQ5S62YR.cjs → app-graph-builder-V3RCGDV7.cjs} +60 -58
  30. package/dist/lib/node/app-graph-builder-V3RCGDV7.cjs.map +7 -0
  31. package/dist/lib/node/{app-graph-serializer-72S7P33H.cjs → app-graph-serializer-H4UACG57.cjs} +21 -21
  32. package/dist/lib/node/{chunk-VCPICVIE.cjs → chunk-4AZ2DD4G.cjs} +308 -251
  33. package/dist/lib/node/chunk-4AZ2DD4G.cjs.map +7 -0
  34. package/dist/lib/node/{chunk-DDZYVNVP.cjs → chunk-6MEOP3DH.cjs} +8 -14
  35. package/dist/lib/node/chunk-6MEOP3DH.cjs.map +7 -0
  36. package/dist/lib/node/{chunk-BQRNTKSQ.cjs → chunk-D6BFKOXY.cjs} +8 -8
  37. package/dist/lib/node/{chunk-Z34MTEU7.cjs → chunk-SYVPVU3K.cjs} +66 -60
  38. package/dist/lib/node/chunk-SYVPVU3K.cjs.map +7 -0
  39. package/dist/lib/node/{chunk-56NGXG2A.cjs → chunk-UX3U4RU2.cjs} +9 -8
  40. package/dist/lib/node/chunk-UX3U4RU2.cjs.map +7 -0
  41. package/dist/lib/node/{chunk-AO4EW2RX.cjs → chunk-WZR6OAN3.cjs} +6 -5
  42. package/dist/lib/node/{chunk-AO4EW2RX.cjs.map → chunk-WZR6OAN3.cjs.map} +3 -3
  43. package/dist/lib/node/{identity-created-IMDS4A6A.cjs → identity-created-7G5U7R36.cjs} +7 -7
  44. package/dist/lib/node/index.cjs +93 -92
  45. package/dist/lib/node/index.cjs.map +3 -3
  46. package/dist/lib/node/intent-resolver-CDE4M3TW.cjs +536 -0
  47. package/dist/lib/node/intent-resolver-CDE4M3TW.cjs.map +7 -0
  48. package/dist/lib/node/meta.json +1 -1
  49. package/dist/lib/node/{react-root-TCHYZQY3.cjs → react-root-JN6AIHMS.cjs} +12 -12
  50. package/dist/lib/node/{react-surface-TFPR6QAQ.cjs → react-surface-XSK2QEQV.cjs} +72 -76
  51. package/dist/lib/node/react-surface-XSK2QEQV.cjs.map +7 -0
  52. package/dist/lib/node/{settings-QLCKAUHK.cjs → settings-TEELGWS4.cjs} +8 -8
  53. package/dist/lib/node/{spaces-ready-RZTKEXOL.cjs → spaces-ready-L4MJTFQ6.cjs} +39 -40
  54. package/dist/lib/node/spaces-ready-L4MJTFQ6.cjs.map +7 -0
  55. package/dist/lib/node/{state-4UIOUKLJ.cjs → state-WPZC4JXB.cjs} +8 -8
  56. package/dist/lib/node/types/index.cjs +16 -18
  57. package/dist/lib/node/types/index.cjs.map +2 -2
  58. package/dist/lib/node-esm/{app-graph-builder-CD6IYPSS.mjs → app-graph-builder-VFHK7OQI.mjs} +15 -13
  59. package/dist/lib/node-esm/app-graph-builder-VFHK7OQI.mjs.map +7 -0
  60. package/dist/lib/node-esm/{app-graph-serializer-CFXS6ZE2.mjs → app-graph-serializer-PIPJVXYZ.mjs} +5 -5
  61. package/dist/lib/node-esm/{chunk-M4XTHK35.mjs → chunk-4UX5WGKJ.mjs} +3 -3
  62. package/dist/lib/node-esm/{chunk-CLGCKZ2D.mjs → chunk-AAQRELDK.mjs} +4 -9
  63. package/dist/lib/node-esm/chunk-AAQRELDK.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-I75ZN2YH.mjs → chunk-FTVEA5LO.mjs} +308 -251
  65. package/dist/lib/node-esm/chunk-FTVEA5LO.mjs.map +7 -0
  66. package/dist/lib/node-esm/{chunk-7FUVU45N.mjs → chunk-ICCM4YRJ.mjs} +3 -2
  67. package/dist/lib/node-esm/{chunk-7FUVU45N.mjs.map → chunk-ICCM4YRJ.mjs.map} +3 -3
  68. package/dist/lib/node-esm/{chunk-375RB3CZ.mjs → chunk-LGL4A5B5.mjs} +3 -2
  69. package/dist/lib/node-esm/chunk-LGL4A5B5.mjs.map +7 -0
  70. package/dist/lib/node-esm/{chunk-FUMGYUD3.mjs → chunk-RCZRYXI3.mjs} +15 -9
  71. package/dist/lib/node-esm/chunk-RCZRYXI3.mjs.map +7 -0
  72. package/dist/lib/node-esm/{identity-created-SJYZZ7Q3.mjs → identity-created-7THGZ7EW.mjs} +3 -3
  73. package/dist/lib/node-esm/index.mjs +14 -13
  74. package/dist/lib/node-esm/index.mjs.map +3 -3
  75. package/dist/lib/node-esm/intent-resolver-7L3GJAZE.mjs +538 -0
  76. package/dist/lib/node-esm/intent-resolver-7L3GJAZE.mjs.map +7 -0
  77. package/dist/lib/node-esm/meta.json +1 -1
  78. package/dist/lib/node-esm/{react-root-BEX2XFJK.mjs → react-root-BNA6PBFZ.mjs} +6 -6
  79. package/dist/lib/node-esm/{react-surface-TRLHCJZ3.mjs → react-surface-FTI2LQNL.mjs} +26 -33
  80. package/dist/lib/node-esm/react-surface-FTI2LQNL.mjs.map +7 -0
  81. package/dist/lib/node-esm/{settings-WLVEO4JM.mjs → settings-KXYUZBLN.mjs} +3 -3
  82. package/dist/lib/node-esm/{spaces-ready-ITGYYT5A.mjs → spaces-ready-ZC2R73H3.mjs} +31 -32
  83. package/dist/lib/node-esm/spaces-ready-ZC2R73H3.mjs.map +7 -0
  84. package/dist/lib/node-esm/{state-BMISGQ2O.mjs → state-5GH2D5U4.mjs} +3 -3
  85. package/dist/lib/node-esm/types/index.mjs +2 -4
  86. package/dist/types/src/SpacePlugin.d.ts +5 -1
  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 +6 -0
  91. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  92. package/dist/types/src/capabilities/index.d.ts +34 -33
  93. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  94. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -1
  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/BaseObjectSettings.d.ts.map +1 -1
  99. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +4 -3
  100. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  101. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  102. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  103. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  104. package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts.map +1 -1
  105. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts +3 -4
  106. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts.map +1 -1
  107. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.stories.d.ts.map +1 -1
  108. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  109. package/dist/types/src/meta.d.ts +1 -0
  110. package/dist/types/src/meta.d.ts.map +1 -1
  111. package/dist/types/src/types/types.d.ts +2 -5
  112. package/dist/types/src/types/types.d.ts.map +1 -1
  113. package/dist/types/src/util.d.ts +1 -0
  114. package/dist/types/src/util.d.ts.map +1 -1
  115. package/dist/types/tsconfig.tsbuildinfo +1 -1
  116. package/package.json +39 -37
  117. package/src/SpacePlugin.tsx +11 -6
  118. package/src/capabilities/app-graph-builder.ts +9 -8
  119. package/src/capabilities/capabilities.ts +4 -1
  120. package/src/capabilities/intent-resolver.ts +410 -312
  121. package/src/capabilities/react-surface.tsx +22 -30
  122. package/src/capabilities/spaces-ready.ts +20 -21
  123. package/src/components/AwaitingObject.tsx +5 -5
  124. package/src/components/BaseObjectSettings.tsx +7 -0
  125. package/src/components/CreateDialog/CreateObjectDialog.tsx +15 -15
  126. package/src/components/CreateDialog/CreateObjectPanel.tsx +114 -115
  127. package/src/components/CreateDialog/CreateSpaceDialog.tsx +18 -9
  128. package/src/components/JoinDialog.tsx +27 -19
  129. package/src/components/SpacePluginSettings.tsx +3 -3
  130. package/src/components/SpacePresence.stories.tsx +2 -2
  131. package/src/components/SpacePresence.tsx +2 -3
  132. package/src/components/SpaceSettings/SpaceSettingsDialog.tsx +16 -1
  133. package/src/components/SpaceSettings/SpaceSettingsPanel.stories.tsx +5 -1
  134. package/src/components/SpaceSettings/SpaceSettingsPanel.tsx +15 -8
  135. package/src/components/SyncStatus/InlineSyncStatus.tsx +2 -2
  136. package/src/components/SyncStatus/SyncStatus.tsx +2 -1
  137. package/src/meta.ts +1 -0
  138. package/src/types/types.ts +2 -7
  139. package/src/util.tsx +9 -4
  140. package/dist/lib/browser/app-graph-builder-5D2QB43K.mjs.map +0 -7
  141. package/dist/lib/browser/chunk-HCXWKGTE.mjs.map +0 -7
  142. package/dist/lib/browser/chunk-PDJ4MLA4.mjs.map +0 -7
  143. package/dist/lib/browser/chunk-UH5P4UL3.mjs.map +0 -7
  144. package/dist/lib/browser/chunk-ZBKFJNHH.mjs.map +0 -7
  145. package/dist/lib/browser/intent-resolver-Y6AZTVRL.mjs +0 -459
  146. package/dist/lib/browser/intent-resolver-Y6AZTVRL.mjs.map +0 -7
  147. package/dist/lib/browser/react-surface-JTNUNOJG.mjs.map +0 -7
  148. package/dist/lib/browser/spaces-ready-4SFNS5JQ.mjs.map +0 -7
  149. package/dist/lib/node/app-graph-builder-ZQ5S62YR.cjs.map +0 -7
  150. package/dist/lib/node/chunk-56NGXG2A.cjs.map +0 -7
  151. package/dist/lib/node/chunk-DDZYVNVP.cjs.map +0 -7
  152. package/dist/lib/node/chunk-VCPICVIE.cjs.map +0 -7
  153. package/dist/lib/node/chunk-Z34MTEU7.cjs.map +0 -7
  154. package/dist/lib/node/intent-resolver-MUGCKZPN.cjs +0 -458
  155. package/dist/lib/node/intent-resolver-MUGCKZPN.cjs.map +0 -7
  156. package/dist/lib/node/react-surface-TFPR6QAQ.cjs.map +0 -7
  157. package/dist/lib/node/spaces-ready-RZTKEXOL.cjs.map +0 -7
  158. package/dist/lib/node-esm/app-graph-builder-CD6IYPSS.mjs.map +0 -7
  159. package/dist/lib/node-esm/chunk-375RB3CZ.mjs.map +0 -7
  160. package/dist/lib/node-esm/chunk-CLGCKZ2D.mjs.map +0 -7
  161. package/dist/lib/node-esm/chunk-FUMGYUD3.mjs.map +0 -7
  162. package/dist/lib/node-esm/chunk-I75ZN2YH.mjs.map +0 -7
  163. package/dist/lib/node-esm/intent-resolver-6PNQKHDL.mjs +0 -460
  164. package/dist/lib/node-esm/intent-resolver-6PNQKHDL.mjs.map +0 -7
  165. package/dist/lib/node-esm/react-surface-TRLHCJZ3.mjs.map +0 -7
  166. package/dist/lib/node-esm/spaces-ready-ITGYYT5A.mjs.map +0 -7
  167. /package/dist/lib/browser/{app-graph-serializer-VNWPLPDF.mjs.map → app-graph-serializer-QDXM5M6K.mjs.map} +0 -0
  168. /package/dist/lib/browser/{chunk-5TBRONF6.mjs.map → chunk-SDK7RZI3.mjs.map} +0 -0
  169. /package/dist/lib/browser/{identity-created-EC5FOCX2.mjs.map → identity-created-25TK5XNO.mjs.map} +0 -0
  170. /package/dist/lib/browser/{react-root-4QQST3T2.mjs.map → react-root-Q7JJDCPB.mjs.map} +0 -0
  171. /package/dist/lib/browser/{settings-ASFF5BZL.mjs.map → settings-K4JPYYEM.mjs.map} +0 -0
  172. /package/dist/lib/browser/{state-MS4KYJWI.mjs.map → state-6DCY5YJP.mjs.map} +0 -0
  173. /package/dist/lib/node/{app-graph-serializer-72S7P33H.cjs.map → app-graph-serializer-H4UACG57.cjs.map} +0 -0
  174. /package/dist/lib/node/{chunk-BQRNTKSQ.cjs.map → chunk-D6BFKOXY.cjs.map} +0 -0
  175. /package/dist/lib/node/{identity-created-IMDS4A6A.cjs.map → identity-created-7G5U7R36.cjs.map} +0 -0
  176. /package/dist/lib/node/{react-root-TCHYZQY3.cjs.map → react-root-JN6AIHMS.cjs.map} +0 -0
  177. /package/dist/lib/node/{settings-QLCKAUHK.cjs.map → settings-TEELGWS4.cjs.map} +0 -0
  178. /package/dist/lib/node/{state-4UIOUKLJ.cjs.map → state-WPZC4JXB.cjs.map} +0 -0
  179. /package/dist/lib/node-esm/{app-graph-serializer-CFXS6ZE2.mjs.map → app-graph-serializer-PIPJVXYZ.mjs.map} +0 -0
  180. /package/dist/lib/node-esm/{chunk-M4XTHK35.mjs.map → chunk-4UX5WGKJ.mjs.map} +0 -0
  181. /package/dist/lib/node-esm/{identity-created-SJYZZ7Q3.mjs.map → identity-created-7THGZ7EW.mjs.map} +0 -0
  182. /package/dist/lib/node-esm/{react-root-BEX2XFJK.mjs.map → react-root-BNA6PBFZ.mjs.map} +0 -0
  183. /package/dist/lib/node-esm/{settings-WLVEO4JM.mjs.map → settings-KXYUZBLN.mjs.map} +0 -0
  184. /package/dist/lib/node-esm/{state-BMISGQ2O.mjs.map → state-5GH2D5U4.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-375RB3CZ.mjs";
4
+ } from "./chunk-LGL4A5B5.mjs";
5
5
  import {
6
6
  COMPOSER_SPACE_LOCK,
7
7
  getSpaceDisplayName
8
- } from "./chunk-FUMGYUD3.mjs";
8
+ } from "./chunk-RCZRYXI3.mjs";
9
9
  import {
10
10
  CollectionType,
11
11
  SpaceAction,
12
12
  SpaceForm
13
- } from "./chunk-CLGCKZ2D.mjs";
13
+ } from "./chunk-AAQRELDK.mjs";
14
14
  import {
15
15
  SPACE_PLUGIN
16
- } from "./chunk-7FUVU45N.mjs";
16
+ } from "./chunk-ICCM4YRJ.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 { NavigationAction, useIntentDispatcher, createIntent, useCapability, Capabilities } from "@dxos/app-framework";
115
+ import { createIntent, LayoutAction, useIntentDispatcher, useLayout } 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 location = useCapability(Capabilities.Location);
128
+ const layout = useLayout();
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 (location.active.solo?.[0].id === id) {
145
+ if (layout.active.includes(id)) {
146
146
  setOpen(false);
147
147
  }
148
148
  }
149
149
  }, [
150
150
  id,
151
151
  objects,
152
- location
152
+ layout
153
153
  ]);
154
154
  const handleClose = useCallback3(async () => dispatch(createIntent(SpaceAction.WaitForObject, {
155
155
  id: void 0
@@ -157,12 +157,11 @@ var AwaitingObject = ({ id }) => {
157
157
  dispatch
158
158
  ]);
159
159
  const handleNavigate = useCallback3(() => {
160
- void dispatch(createIntent(NavigationAction.Open, {
161
- activeParts: {
162
- main: [
163
- id
164
- ]
165
- }
160
+ void dispatch(createIntent(LayoutAction.Open, {
161
+ part: "main",
162
+ subject: [
163
+ id
164
+ ]
166
165
  }));
167
166
  void handleClose();
168
167
  }, [
@@ -208,14 +207,21 @@ import React4 from "react";
208
207
  import { Input, useTranslation as useTranslation4 } from "@dxos/react-ui";
209
208
  var BaseObjectSettings = ({ object }) => {
210
209
  const { t } = useTranslation4(SPACE_PLUGIN);
210
+ const inputRef = React4.useRef(null);
211
211
  return /* @__PURE__ */ React4.createElement("div", {
212
212
  role: "form",
213
213
  className: "flex flex-col w-full p-2 gap-1"
214
214
  }, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React4.createElement(Input.TextInput, {
215
+ ref: inputRef,
215
216
  placeholder: t("name placeholder"),
216
217
  value: object.name ?? "",
217
218
  onChange: (event) => {
218
219
  object.name = event.target.value;
220
+ },
221
+ onKeyDown: (event) => {
222
+ if (event.key === "Enter") {
223
+ inputRef.current?.blur();
224
+ }
219
225
  }
220
226
  })));
221
227
  };
@@ -223,20 +229,20 @@ var BaseObjectSettings = ({ object }) => {
223
229
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
224
230
  import { pipe } from "effect";
225
231
  import React6, { useCallback as useCallback5, useRef } from "react";
226
- import { chain, createIntent as createIntent2, NavigationAction as NavigationAction2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
232
+ import { chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
227
233
  import { useClient as useClient2 } from "@dxos/react-client";
228
- import { getSpace, isReactiveObject, isSpace as isSpace2, useSpaces } from "@dxos/react-client/echo";
234
+ import { getSpace, isReactiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
229
235
  import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation6 } from "@dxos/react-ui";
230
236
 
231
237
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
232
238
  import React5, { useCallback as useCallback4, useMemo, useState as useState3 } from "react";
233
239
  import { Surface, isSurfaceAvailable, usePluginManager } from "@dxos/app-framework";
234
240
  import { getObjectAnnotation, S } from "@dxos/echo-schema";
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";
241
+ import { Icon, toLocalizedString, useTranslation as useTranslation5 } from "@dxos/react-ui";
242
+ import { Form as Form2 } from "@dxos/react-ui-form";
238
243
  import { SearchList } from "@dxos/react-ui-searchlist";
239
- import { nonNullable } from "@dxos/util";
244
+ import { mx as mx2 } from "@dxos/react-ui-theme";
245
+ import { isNonNullable } from "@dxos/util";
240
246
  var useInputSurfaceLookup = (baseData) => {
241
247
  const pluginManager = usePluginManager();
242
248
  return useCallback4(({ prop, schema, inputProps }) => {
@@ -261,14 +267,22 @@ var useInputSurfaceLookup = (baseData) => {
261
267
  baseData
262
268
  ]);
263
269
  };
264
- var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
270
+ var CreateObjectPanel = ({ classNames, schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
265
271
  const { t } = useTranslation5(SPACE_PLUGIN);
266
272
  const [typename, setTypename] = useState3(initialTypename);
267
273
  const [target, setTarget] = useState3(initialTarget);
268
274
  const schema = schemas.find((schema2) => getObjectAnnotation(schema2)?.typename === typename);
269
- const options = schemas.map(getObjectAnnotation).filter(nonNullable);
270
- const handleClearSchema = useCallback4(() => setTypename(void 0), []);
271
- const handleClearTarget = useCallback4(() => setTarget(void 0), []);
275
+ const options = schemas.map(getObjectAnnotation).filter(isNonNullable).sort((a, b) => {
276
+ const nameA = t("typename label", {
277
+ ns: a.typename,
278
+ defaultValue: a.typename
279
+ });
280
+ const nameB = t("typename label", {
281
+ ns: b.typename,
282
+ defaultValue: b.typename
283
+ });
284
+ return nameA.localeCompare(nameB);
285
+ });
272
286
  const handleCreateObject = useCallback4(async (props) => {
273
287
  if (!schema || !target) {
274
288
  return;
@@ -292,55 +306,6 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
292
306
  resolve,
293
307
  typename
294
308
  ]);
295
- const schemaInput = /* @__PURE__ */ React5.createElement(SearchList.Root, {
296
- label: t("schema input label"),
297
- classNames: "flex flex-col grow overflow-hidden"
298
- }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
299
- autoFocus: true,
300
- "data-testid": "create-object-form.schema-input",
301
- placeholder: t("schema input placeholder"),
302
- classNames: "px-1 my-2"
303
- }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
304
- classNames: "max-bs-[24rem] overflow-auto"
305
- }, options.map((option) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
306
- key: option.typename,
307
- value: t("typename label", {
308
- ns: option.typename,
309
- defaultValue: option.typename
310
- }),
311
- onSelect: () => setTypename(option.typename),
312
- classNames: "flex items-center gap-2"
313
- }, /* @__PURE__ */ React5.createElement("span", {
314
- className: "flex gap-2 items-center grow truncate"
315
- }, /* @__PURE__ */ React5.createElement(Icon, {
316
- icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
317
- size: 5
318
- }), t("typename label", {
319
- ns: option.typename,
320
- defaultValue: option.typename
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
309
  const inputSurfaceLookup = useInputSurfaceLookup({
345
310
  target
346
311
  });
@@ -349,6 +314,7 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
349
314
  name: S.optional(S.String)
350
315
  });
351
316
  return /* @__PURE__ */ React5.createElement(Form2, {
317
+ classNames: "!p-0",
352
318
  autoFocus: true,
353
319
  values: {
354
320
  name: initialName
@@ -365,39 +331,79 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
365
331
  ]);
366
332
  return /* @__PURE__ */ React5.createElement("div", {
367
333
  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,
334
+ className: mx2("flex flex-col gap-2", classNames)
335
+ }, !schema ? /* @__PURE__ */ React5.createElement(SelectSchema, {
336
+ options,
337
+ resolve,
338
+ onChange: setTypename
339
+ }) : !target ? /* @__PURE__ */ React5.createElement(SelectSpace, {
340
+ spaces,
341
+ defaultSpaceId,
342
+ onChange: setTarget
343
+ }) : form);
344
+ };
345
+ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
346
+ const { t } = useTranslation5(SPACE_PLUGIN);
347
+ return /* @__PURE__ */ React5.createElement(SearchList.Root, {
348
+ label: t("space input label"),
349
+ classNames: "flex flex-col grow overflow-hidden"
350
+ }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
351
+ autoFocus: true,
352
+ "data-testid": "create-object-form.space-input",
353
+ placeholder: t("space input placeholder"),
354
+ classNames: "px-1 my-2"
355
+ }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
356
+ classNames: "max-bs-[24rem] overflow-auto"
357
+ }, spaces.sort((a, b) => {
358
+ const aName = toLocalizedString(getSpaceDisplayName(a, {
359
+ personal: a.id === defaultSpaceId
360
+ }), t);
361
+ const bName = toLocalizedString(getSpaceDisplayName(b, {
362
+ personal: b.id === defaultSpaceId
363
+ }), t);
364
+ return aName.localeCompare(bName);
365
+ }).map((space) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
366
+ key: space.id,
367
+ value: toLocalizedString(getSpaceDisplayName(space, {
368
+ personal: space.id === defaultSpaceId
369
+ }), t),
370
+ onSelect: () => onChange(space),
371
+ classNames: "flex items-center gap-2"
372
+ }, /* @__PURE__ */ React5.createElement("span", {
373
+ className: "grow truncate"
374
+ }, toLocalizedString(getSpaceDisplayName(space, {
375
+ personal: space.id === defaultSpaceId
376
+ }), t))))));
377
+ };
378
+ var SelectSchema = ({ options, resolve, onChange }) => {
379
+ const { t } = useTranslation5(SPACE_PLUGIN);
380
+ return /* @__PURE__ */ React5.createElement(SearchList.Root, {
381
+ label: t("schema input label"),
382
+ classNames: "flex flex-col grow overflow-hidden"
383
+ }, /* @__PURE__ */ React5.createElement(SearchList.Input, {
384
+ autoFocus: true,
385
+ "data-testid": "create-object-form.schema-input",
386
+ placeholder: t("schema input placeholder"),
387
+ classNames: "px-1 my-2"
388
+ }), /* @__PURE__ */ React5.createElement(SearchList.Content, {
389
+ classNames: "max-bs-[24rem] overflow-auto"
390
+ }, options.map((option) => /* @__PURE__ */ React5.createElement(SearchList.Item, {
391
+ key: option.typename,
391
392
  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);
393
+ ns: option.typename,
394
+ defaultValue: option.typename
395
+ }),
396
+ onSelect: () => onChange(option.typename),
397
+ classNames: "flex items-center gap-2"
398
+ }, /* @__PURE__ */ React5.createElement("span", {
399
+ className: "flex gap-2 items-center grow truncate"
400
+ }, /* @__PURE__ */ React5.createElement(Icon, {
401
+ icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
402
+ size: 5
403
+ }), t("typename label", {
404
+ ns: option.typename,
405
+ defaultValue: option.typename
406
+ }))))));
401
407
  };
402
408
 
403
409
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
@@ -409,13 +415,13 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
409
415
  const spaces = useSpaces();
410
416
  const { dispatchPromise: dispatch } = useIntentDispatcher2();
411
417
  const handleCreateObject = useCallback5(async ({ schema, target: _target, data }) => {
412
- const target2 = isSpace2(_target) ? _target.properties[CollectionType.typename]?.target : _target;
418
+ const target2 = isSpace(_target) ? _target.properties[CollectionType.typename]?.target : _target;
413
419
  const createObjectIntent = resolve?.(schema.typename)?.createObject;
414
420
  if (!createObjectIntent || !target2) {
415
421
  return;
416
422
  }
417
423
  closeRef.current?.click();
418
- const space = isSpace2(target2) ? target2 : getSpace(target2);
424
+ const space = isSpace(target2) ? target2 : getSpace(target2);
419
425
  const result = await dispatch(createObjectIntent(data, {
420
426
  space
421
427
  }));
@@ -427,7 +433,9 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
427
433
  });
428
434
  const shouldNavigate = _shouldNavigate ?? (() => true);
429
435
  if (shouldNavigate(object)) {
430
- await dispatch(pipe(addObjectIntent, chain(NavigationAction2.Open, {})));
436
+ await dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
437
+ part: "main"
438
+ })));
431
439
  } else {
432
440
  await dispatch(addObjectIntent);
433
441
  }
@@ -440,7 +448,7 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
440
448
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
441
449
  // Consider factoring it out to the tabs package.
442
450
  /* @__PURE__ */ React6.createElement(Dialog.Content, {
443
- classNames: "p-0 bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
451
+ classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
444
452
  }, /* @__PURE__ */ React6.createElement("div", {
445
453
  role: "none",
446
454
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
@@ -454,9 +462,8 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
454
462
  }, /* @__PURE__ */ React6.createElement(Icon2, {
455
463
  icon: "ph--x--regular",
456
464
  size: 4
457
- })))), /* @__PURE__ */ React6.createElement("div", {
458
- className: "p-4"
459
- }, /* @__PURE__ */ React6.createElement(CreateObjectPanel, {
465
+ })))), /* @__PURE__ */ React6.createElement(CreateObjectPanel, {
466
+ classNames: "p-4",
460
467
  schemas,
461
468
  spaces,
462
469
  target,
@@ -465,13 +472,14 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
465
472
  defaultSpaceId: client.spaces.default.id,
466
473
  resolve,
467
474
  onCreateObject: handleCreateObject
468
- })))
475
+ }))
469
476
  );
470
477
  };
471
478
 
472
479
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateSpaceDialog.tsx
480
+ import { Effect } from "effect";
473
481
  import React7, { useCallback as useCallback6, useRef as useRef2 } from "react";
474
- import { createIntent as createIntent3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
482
+ import { createIntent as createIntent3, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
475
483
  import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as useTranslation7 } from "@dxos/react-ui";
476
484
  import { Form as Form3 } from "@dxos/react-ui-form";
477
485
  var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
@@ -481,15 +489,19 @@ var initialValues2 = {
481
489
  var CreateSpaceDialog = () => {
482
490
  const closeRef = useRef2(null);
483
491
  const { t } = useTranslation7(SPACE_PLUGIN);
484
- const { dispatchPromise: dispatch } = useIntentDispatcher3();
492
+ const { dispatch } = useIntentDispatcher3();
485
493
  const handleCreateSpace = useCallback6(async (data) => {
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
494
+ const program = Effect.gen(function* () {
495
+ const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
496
+ yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
497
+ part: "workspace",
498
+ subject: space.id
491
499
  }));
492
- }
500
+ yield* dispatch(createIntent3(SpaceAction.OpenCreateObject, {
501
+ target: space
502
+ }));
503
+ });
504
+ await Effect.runPromise(program);
493
505
  }, [
494
506
  dispatch
495
507
  ]);
@@ -497,7 +509,7 @@ var CreateSpaceDialog = () => {
497
509
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
498
510
  // Consider factoring it out to the tabs package.
499
511
  /* @__PURE__ */ React7.createElement(Dialog2.Content, {
500
- classNames: "p-0 bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
512
+ classNames: "p-0 bs-content min-bs-[16rem] max-bs-full md:max-is-[32rem] overflow-hidden"
501
513
  }, /* @__PURE__ */ React7.createElement("div", {
502
514
  role: "none",
503
515
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
@@ -515,6 +527,8 @@ var CreateSpaceDialog = () => {
515
527
  className: "p-4"
516
528
  }, /* @__PURE__ */ React7.createElement(Form3, {
517
529
  testId: "create-space-form",
530
+ classNames: "!p-0",
531
+ autoFocus: true,
518
532
  values: initialValues2,
519
533
  schema: SpaceForm,
520
534
  onSave: handleCreateSpace
@@ -525,16 +539,16 @@ var CreateSpaceDialog = () => {
525
539
  // packages/plugins/plugin-space/src/components/CollectionMain.tsx
526
540
  import React8 from "react";
527
541
  import { useTranslation as useTranslation8 } from "@dxos/react-ui";
528
- import { baseSurface, descriptionText, mx as mx2 } from "@dxos/react-ui-theme";
542
+ import { baseSurface, descriptionText, mx as mx3 } from "@dxos/react-ui-theme";
529
543
  var CollectionMain = ({ collection }) => {
530
544
  const { t } = useTranslation8(SPACE_PLUGIN);
531
545
  return /* @__PURE__ */ React8.createElement("div", {
532
546
  role: "none",
533
- className: mx2(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
547
+ className: mx3(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
534
548
  "data-testid": "composer.firstRunMessage"
535
549
  }, /* @__PURE__ */ React8.createElement("p", {
536
550
  role: "alert",
537
- className: mx2(descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
551
+ className: mx3(descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
538
552
  }, collection.name ?? t("unnamed collection label")));
539
553
  };
540
554
 
@@ -552,37 +566,62 @@ var CollectionSection = ({ collection }) => {
552
566
 
553
567
  // packages/plugins/plugin-space/src/components/JoinDialog.tsx
554
568
  import React10, { useCallback as useCallback7 } from "react";
555
- import { createIntent as createIntent4, LayoutAction, NavigationAction as NavigationAction3, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
556
- import { useGraph } from "@dxos/plugin-graph";
569
+ import { createIntent as createIntent4, LayoutAction as LayoutAction4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
570
+ import { log } from "@dxos/log";
557
571
  import { ObservabilityAction } from "@dxos/plugin-observability/types";
558
- import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
559
- import { Dialog as Dialog3, useTranslation as useTranslation10 } from "@dxos/react-ui";
572
+ import { useClient as useClient3 } from "@dxos/react-client";
573
+ import { Dialog as Dialog3 } from "@dxos/react-ui";
560
574
  import { JoinPanel } from "@dxos/shell/react";
575
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/JoinDialog.tsx";
561
576
  var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
562
577
  var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
563
- const { t } = useTranslation10(SPACE_PLUGIN);
564
578
  const { dispatchPromise: dispatch } = useIntentDispatcher4();
565
- const spaces = useSpaces2();
566
- const { graph } = useGraph();
579
+ const client = useClient3();
580
+ const { graph } = useAppGraph();
567
581
  const handleDone = useCallback7(async (result) => {
568
582
  if (result?.spaceKey) {
569
583
  await Promise.all([
570
- dispatch(createIntent4(LayoutAction.SetLayout, {
571
- element: "toast",
584
+ dispatch(createIntent4(LayoutAction4.AddToast, {
585
+ part: "toast",
572
586
  subject: {
573
587
  id: `${SPACE_PLUGIN}/join-success`,
574
588
  duration: 5e3,
575
- title: t("join success label"),
576
- closeLabel: t("dismiss label")
589
+ title: [
590
+ "join success label",
591
+ {
592
+ ns: SPACE_PLUGIN
593
+ }
594
+ ],
595
+ closeLabel: [
596
+ "dismiss label",
597
+ {
598
+ ns: SPACE_PLUGIN
599
+ }
600
+ ]
577
601
  }
578
602
  })),
579
- dispatch(createIntent4(LayoutAction.SetLayout, {
580
- element: "dialog",
581
- state: false
603
+ dispatch(createIntent4(LayoutAction4.UpdateDialog, {
604
+ part: "dialog",
605
+ options: {
606
+ state: false
607
+ }
582
608
  }))
583
609
  ]);
584
610
  }
585
- const space = spaces.find(({ key }) => result?.spaceKey?.equals(key));
611
+ const space = result?.spaceKey ? client.spaces.get(result.spaceKey) : void 0;
612
+ if (!space) {
613
+ log.warn("Space not found", result?.spaceKey, {
614
+ F: __dxlog_file,
615
+ L: 56,
616
+ S: void 0,
617
+ C: (f, a) => f(...a)
618
+ });
619
+ return;
620
+ }
621
+ await dispatch(createIntent4(LayoutAction4.SwitchWorkspace, {
622
+ part: "workspace",
623
+ subject: space.id
624
+ }));
586
625
  const target = result?.target || (navigableCollections ? space?.id : void 0);
587
626
  if (target) {
588
627
  await graph.waitForPath({
@@ -590,15 +629,15 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
590
629
  }).catch(() => {
591
630
  });
592
631
  await Promise.all([
593
- dispatch(createIntent4(NavigationAction3.Open, {
594
- activeParts: {
595
- main: [
596
- target
597
- ]
598
- }
632
+ dispatch(createIntent4(LayoutAction4.Open, {
633
+ part: "main",
634
+ subject: [
635
+ target
636
+ ]
599
637
  })),
600
- dispatch(createIntent4(NavigationAction3.Expose, {
601
- id: target
638
+ dispatch(createIntent4(LayoutAction4.Expose, {
639
+ part: "navigation",
640
+ subject: target
602
641
  }))
603
642
  ]);
604
643
  }
@@ -613,7 +652,8 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
613
652
  }
614
653
  }, [
615
654
  dispatch,
616
- spaces
655
+ client,
656
+ graph
617
657
  ]);
618
658
  return /* @__PURE__ */ React10.createElement(Dialog3.Content, null, /* @__PURE__ */ React10.createElement(JoinPanel, {
619
659
  ...props,
@@ -631,11 +671,11 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
631
671
  import { Planet } from "@phosphor-icons/react";
632
672
  import React11 from "react";
633
673
  import { getSpace as getSpace2 } from "@dxos/client/echo";
634
- import { useClient as useClient3 } from "@dxos/react-client";
635
- import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation11 } from "@dxos/react-ui";
674
+ import { useClient as useClient4 } from "@dxos/react-client";
675
+ import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation10 } from "@dxos/react-ui";
636
676
  var MenuFooter = ({ object }) => {
637
- const { t } = useTranslation11(SPACE_PLUGIN);
638
- const client = useClient3();
677
+ const { t } = useTranslation10(SPACE_PLUGIN);
678
+ const client = useClient4();
639
679
  const space = getSpace2(object);
640
680
  const spaceName = space ? getSpaceDisplayName(space, {
641
681
  personal: client.spaces.default === space
@@ -655,8 +695,8 @@ var MenuFooter = ({ object }) => {
655
695
  import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
656
696
  import React12, { useEffect as useEffect2, useState as useState4 } from "react";
657
697
  import { debounce } from "@dxos/async";
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";
698
+ import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
699
+ import { getSize as getSize2, mx as mx4, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
660
700
  var Status;
661
701
  (function(Status2) {
662
702
  Status2[Status2["PERSISTED_LOCALLY"] = 0] = "PERSISTED_LOCALLY";
@@ -664,7 +704,7 @@ var Status;
664
704
  Status2[Status2["ERROR"] = 2] = "ERROR";
665
705
  })(Status || (Status = {}));
666
706
  var PersistenceStatus = ({ db }) => {
667
- const { t } = useTranslation12(SPACE_PLUGIN);
707
+ const { t } = useTranslation11(SPACE_PLUGIN);
668
708
  const [displayMessage, setDisplayMessage] = useState4(false);
669
709
  const [status, naturalSetStatus] = useState4(0);
670
710
  const [prevStatus, setPrevStatus] = useState4(0);
@@ -684,17 +724,17 @@ var PersistenceStatus = ({ db }) => {
684
724
  return /* @__PURE__ */ React12.createElement("div", {
685
725
  className: "flex items-center"
686
726
  }, /* @__PURE__ */ React12.createElement(Warning, {
687
- className: mx3(getSize2(4), "me-1")
727
+ className: mx4(getSize2(4), "me-1")
688
728
  }), /* @__PURE__ */ React12.createElement("span", {
689
- className: mx3("text-sm", warningText)
729
+ className: mx4("text-sm", warningText)
690
730
  }, t("persistence error label")));
691
731
  case 1:
692
732
  return /* @__PURE__ */ React12.createElement("div", {
693
733
  className: "flex items-center"
694
734
  }, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
695
- className: mx3(getSize2(4), "me-1")
735
+ className: mx4(getSize2(4), "me-1")
696
736
  }), /* @__PURE__ */ React12.createElement("span", {
697
- className: mx3("text-sm", staticPlaceholderText)
737
+ className: mx4("text-sm", staticPlaceholderText)
698
738
  }, t("persistence pending label")));
699
739
  case 0:
700
740
  default:
@@ -704,21 +744,21 @@ var PersistenceStatus = ({ db }) => {
704
744
  role: "status",
705
745
  className: "flex items-center"
706
746
  }, /* @__PURE__ */ React12.createElement(CheckCircle2, {
707
- className: mx3(getSize2(4), "me-1")
747
+ className: mx4(getSize2(4), "me-1")
708
748
  }), displayMessage && /* @__PURE__ */ React12.createElement("span", {
709
- className: mx3("text-sm", staticPlaceholderText)
749
+ className: mx4("text-sm", staticPlaceholderText)
710
750
  }, 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))));
711
751
  }
712
752
  };
713
753
 
714
754
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
715
755
  import React13, { useCallback as useCallback8, useRef as useRef3, useState as useState5 } from "react";
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";
756
+ import { log as log2 } from "@dxos/log";
757
+ import { Button as Button4, Input as Input2, Popover, useTranslation as useTranslation12 } from "@dxos/react-ui";
758
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
719
759
  var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
720
760
  var PopoverRenameObject = ({ object: obj }) => {
721
- const { t } = useTranslation13(SPACE_PLUGIN);
761
+ const { t } = useTranslation12(SPACE_PLUGIN);
722
762
  const doneButton = useRef3(null);
723
763
  const object = obj;
724
764
  const [name, setName] = useState5(object.name || object.title || "");
@@ -729,10 +769,10 @@ var PopoverRenameObject = ({ object: obj }) => {
729
769
  try {
730
770
  object.title = name;
731
771
  } catch (err) {
732
- log.error("Failed to rename object", {
772
+ log2.error("Failed to rename object", {
733
773
  err
734
774
  }, {
735
- F: __dxlog_file,
775
+ F: __dxlog_file2,
736
776
  L: 30,
737
777
  S: void 0,
738
778
  C: (f, a) => f(...a)
@@ -749,9 +789,9 @@ var PopoverRenameObject = ({ object: obj }) => {
749
789
  }, /* @__PURE__ */ React13.createElement("div", {
750
790
  role: "none",
751
791
  className: "flex-1"
752
- }, /* @__PURE__ */ React13.createElement(Input3.Root, null, /* @__PURE__ */ React13.createElement(Input3.Label, {
792
+ }, /* @__PURE__ */ React13.createElement(Input2.Root, null, /* @__PURE__ */ React13.createElement(Input2.Label, {
753
793
  srOnly: true
754
- }, t("object name label")), /* @__PURE__ */ React13.createElement(Input3.TextInput, {
794
+ }, t("object name label")), /* @__PURE__ */ React13.createElement(Input2.TextInput, {
755
795
  placeholder: t("object title placeholder"),
756
796
  value: name,
757
797
  "data-testid": "spacePlugin.renameObject.input",
@@ -770,10 +810,10 @@ var PopoverRenameObject = ({ object: obj }) => {
770
810
 
771
811
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
772
812
  import React14, { useCallback as useCallback9, useRef as useRef4, useState as useState6 } from "react";
773
- import { Button as Button5, Input as Input4, Popover as Popover2, useTranslation as useTranslation14 } from "@dxos/react-ui";
813
+ import { Button as Button5, Input as Input3, Popover as Popover2, useTranslation as useTranslation13 } from "@dxos/react-ui";
774
814
  var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
775
815
  var PopoverRenameSpace = ({ space }) => {
776
- const { t } = useTranslation14(SPACE_PLUGIN);
816
+ const { t } = useTranslation13(SPACE_PLUGIN);
777
817
  const doneButton = useRef4(null);
778
818
  const [name, setName] = useState6(space.properties.name ?? "");
779
819
  const handleDone = useCallback9(() => {
@@ -788,9 +828,9 @@ var PopoverRenameSpace = ({ space }) => {
788
828
  }, /* @__PURE__ */ React14.createElement("div", {
789
829
  role: "none",
790
830
  className: "flex-1"
791
- }, /* @__PURE__ */ React14.createElement(Input4.Root, null, /* @__PURE__ */ React14.createElement(Input4.Label, {
831
+ }, /* @__PURE__ */ React14.createElement(Input3.Root, null, /* @__PURE__ */ React14.createElement(Input3.Label, {
792
832
  srOnly: true
793
- }, t("space name label")), /* @__PURE__ */ React14.createElement(Input4.TextInput, {
833
+ }, t("space name label")), /* @__PURE__ */ React14.createElement(Input3.TextInput, {
794
834
  defaultValue: space.properties.name ?? "",
795
835
  placeholder: t("unnamed space label"),
796
836
  onChange: ({ target: { value } }) => setName(value),
@@ -811,7 +851,7 @@ var PopoverRenameSpace = ({ space }) => {
811
851
  // packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
812
852
  import React15 from "react";
813
853
  import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
814
- import { IconButton as IconButton4, useTranslation as useTranslation15 } from "@dxos/react-ui";
854
+ import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
815
855
  var ShareSpaceButton = ({ space }) => {
816
856
  const { dispatchPromise: dispatch } = useIntentDispatcher5();
817
857
  return /* @__PURE__ */ React15.createElement(ShareSpaceButtonImpl, {
@@ -821,8 +861,8 @@ var ShareSpaceButton = ({ space }) => {
821
861
  });
822
862
  };
823
863
  var ShareSpaceButtonImpl = ({ onClick }) => {
824
- const { t } = useTranslation15(SPACE_PLUGIN);
825
- return /* @__PURE__ */ React15.createElement(IconButton4, {
864
+ const { t } = useTranslation14(SPACE_PLUGIN);
865
+ return /* @__PURE__ */ React15.createElement(IconButton3, {
826
866
  "data-testid": "spacePlugin.shareSpaceButton",
827
867
  icon: "ph--users--regular",
828
868
  label: t("share space label"),
@@ -832,27 +872,26 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
832
872
 
833
873
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
834
874
  import React16, { useCallback as useCallback10, useEffect as useEffect4, useState as useState8 } from "react";
835
- import { useCapability as useCapability2 } from "@dxos/app-framework";
875
+ import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
836
876
  import { generateName } from "@dxos/display-name";
837
- import { useGraph as useGraph2 } from "@dxos/plugin-graph";
838
- import { PublicKey, useClient as useClient4 } from "@dxos/react-client";
877
+ import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
839
878
  import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId2 } from "@dxos/react-client/echo";
840
879
  import { useIdentity } from "@dxos/react-client/halo";
841
- import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useTranslation as useTranslation16, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
880
+ import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useTranslation as useTranslation15, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
842
881
  import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
843
882
  import { ComplexMap, keyToFallback } from "@dxos/util";
844
883
 
845
884
  // packages/plugins/plugin-space/src/capabilities/index.ts
846
885
  import { lazy } from "@dxos/app-framework";
847
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-CD6IYPSS.mjs"));
848
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-CFXS6ZE2.mjs"));
849
- var IdentityCreated = lazy(() => import("./identity-created-SJYZZ7Q3.mjs"));
850
- var IntentResolver = lazy(() => import("./intent-resolver-6PNQKHDL.mjs"));
851
- var ReactRoot = lazy(() => import("./react-root-BEX2XFJK.mjs"));
852
- var ReactSurface = lazy(() => import("./react-surface-TRLHCJZ3.mjs"));
853
- var SpaceSettings = lazy(() => import("./settings-WLVEO4JM.mjs"));
854
- var SpaceState = lazy(() => import("./state-BMISGQ2O.mjs"));
855
- var SpacesReady = lazy(() => import("./spaces-ready-ITGYYT5A.mjs"));
886
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-VFHK7OQI.mjs"));
887
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-PIPJVXYZ.mjs"));
888
+ var IdentityCreated = lazy(() => import("./identity-created-7THGZ7EW.mjs"));
889
+ var IntentResolver = lazy(() => import("./intent-resolver-7L3GJAZE.mjs"));
890
+ var ReactRoot = lazy(() => import("./react-root-BNA6PBFZ.mjs"));
891
+ var ReactSurface = lazy(() => import("./react-surface-FTI2LQNL.mjs"));
892
+ var SpaceSettings = lazy(() => import("./settings-KXYUZBLN.mjs"));
893
+ var SpaceState = lazy(() => import("./state-5GH2D5U4.mjs"));
894
+ var SpacesReady = lazy(() => import("./spaces-ready-ZC2R73H3.mjs"));
856
895
 
857
896
  // packages/plugins/plugin-space/src/hooks/usePath.ts
858
897
  import { useEffect as useEffect3, useState as useState7 } from "react";
@@ -896,8 +935,8 @@ var ACTIVITY_DURATION = 3e4;
896
935
  var noViewers = new ComplexMap(PublicKey.hash);
897
936
  var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
898
937
  var SpacePresence = ({ object, spaceKey }) => {
899
- const spaceState = useCapability2(SpaceCapabilities.MutableState);
900
- const client = useClient4();
938
+ const spaceState = useCapability(SpaceCapabilities.MutableState);
939
+ const client = useClient5();
901
940
  const identity = useIdentity();
902
941
  const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
903
942
  const spaceMembers = useMembers(space?.key);
@@ -996,7 +1035,7 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
996
1035
  var SmallPresenceLive = ({ id, open, viewers }) => {
997
1036
  const { hasAttention, isAncestor, isRelated } = useAttention(id);
998
1037
  const isAttended = hasAttention || isAncestor || isRelated;
999
- const { graph } = useGraph2();
1038
+ const { graph } = useAppGraph2();
1000
1039
  const attended = useAttended();
1001
1040
  const startOfAttention = attended.at(-1);
1002
1041
  const path = usePath(graph, startOfAttention);
@@ -1024,7 +1063,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1024
1063
  });
1025
1064
  };
1026
1065
  var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1027
- const { t } = useTranslation16(SPACE_PLUGIN);
1066
+ const { t } = useTranslation15(SPACE_PLUGIN);
1028
1067
  return /* @__PURE__ */ React16.createElement(Tooltip2.Root, null, /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1029
1068
  asChild: true
1030
1069
  }, /* @__PURE__ */ React16.createElement(AttentionGlyph, {
@@ -1041,13 +1080,13 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1041
1080
 
1042
1081
  // packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
1043
1082
  import React17 from "react";
1044
- import { Input as Input5, useTranslation as useTranslation17 } from "@dxos/react-ui";
1045
- import { DeprecatedFormInput } from "@dxos/react-ui-form";
1083
+ import { Input as Input4, useTranslation as useTranslation16 } from "@dxos/react-ui";
1084
+ import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
1046
1085
  var SpacePluginSettings = ({ settings }) => {
1047
- const { t } = useTranslation17(SPACE_PLUGIN);
1048
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1086
+ const { t } = useTranslation16(SPACE_PLUGIN);
1087
+ return /* @__PURE__ */ React17.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1049
1088
  label: t("show hidden spaces label")
1050
- }, /* @__PURE__ */ React17.createElement(Input5.Switch, {
1089
+ }, /* @__PURE__ */ React17.createElement(Input4.Switch, {
1051
1090
  checked: settings.showHidden,
1052
1091
  onCheckedChange: (checked) => settings.showHidden = !!checked
1053
1092
  })));
@@ -1055,23 +1094,23 @@ var SpacePluginSettings = ({ settings }) => {
1055
1094
 
1056
1095
  // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx
1057
1096
  import React18, { useCallback as useCallback11, useState as useState9 } from "react";
1058
- import { log as log2 } from "@dxos/log";
1097
+ import { log as log3 } from "@dxos/log";
1059
1098
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
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";
1065
- var SpaceSettingsPanel = ({ classNames, space }) => {
1066
- const { t } = useTranslation18(SPACE_PLUGIN);
1067
- const client = useClient5();
1099
+ import { useClient as useClient6 } from "@dxos/react-client";
1100
+ import { Input as Input5, useTranslation as useTranslation17 } from "@dxos/react-ui";
1101
+ import { DeprecatedFormContainer as DeprecatedFormContainer2, DeprecatedFormInput as DeprecatedFormInput2 } from "@dxos/react-ui-form";
1102
+ import { HuePickerBlock } from "@dxos/react-ui-pickers";
1103
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx";
1104
+ var SpaceSettingsPanel = ({ space }) => {
1105
+ const { t } = useTranslation17(SPACE_PLUGIN);
1106
+ const client = useClient6();
1068
1107
  const edgeEnabled = Boolean(client.config.values.runtime?.client?.edgeFeatures?.echoReplicator);
1069
1108
  const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1070
1109
  const toggleEdgeReplication = useCallback11(async (next) => {
1071
1110
  setEdgeReplication(next);
1072
1111
  await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
1073
- log2.catch(err, void 0, {
1074
- F: __dxlog_file2,
1112
+ log3.catch(err, void 0, {
1113
+ F: __dxlog_file3,
1075
1114
  L: 36,
1076
1115
  S: void 0,
1077
1116
  C: (f, a) => f(...a)
@@ -1081,35 +1120,39 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
1081
1120
  }, [
1082
1121
  space
1083
1122
  ]);
1084
- return /* @__PURE__ */ React18.createElement("div", {
1085
- role: "form",
1086
- className: mx4("flex flex-col", classNames)
1087
- }, /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1123
+ return /* @__PURE__ */ React18.createElement(DeprecatedFormContainer2, null, /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1088
1124
  label: t("name label")
1089
- }, /* @__PURE__ */ React18.createElement(Input6.TextInput, {
1125
+ }, /* @__PURE__ */ React18.createElement(Input5.TextInput, {
1090
1126
  placeholder: t("unnamed space label"),
1091
1127
  value: space.properties.name ?? "",
1092
1128
  onChange: (event) => {
1093
1129
  space.properties.name = event.target.value;
1094
1130
  }
1131
+ })), /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1132
+ label: t("hue label")
1133
+ }, /* @__PURE__ */ React18.createElement(HuePickerBlock, {
1134
+ hue: space.properties.hue,
1135
+ onChangeHue: (nextHue) => space.properties.hue = nextHue,
1136
+ onClickClear: () => space.properties.hue = void 0
1095
1137
  })), edgeEnabled && /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1096
1138
  label: t("edge replication label")
1097
- }, /* @__PURE__ */ React18.createElement(Input6.Switch, {
1139
+ }, /* @__PURE__ */ React18.createElement(Input5.Switch, {
1098
1140
  checked: edgeReplication,
1099
1141
  onCheckedChange: toggleEdgeReplication
1100
1142
  })));
1101
1143
  };
1102
1144
 
1103
1145
  // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsDialog.tsx
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";
1146
+ import React19, { useMemo as useMemo2, useState as useState10 } from "react";
1147
+ import { Surface as Surface2, useCapabilities } from "@dxos/app-framework";
1148
+ import { useClient as useClient7 } from "@dxos/react-client";
1149
+ import { Button as Button6, Clipboard, Dialog as Dialog4, Icon as Icon4, toLocalizedString as toLocalizedString3, useTranslation as useTranslation18 } from "@dxos/react-ui";
1107
1150
  import { Tabs } from "@dxos/react-ui-tabs";
1108
1151
  import { SpacePanel } from "@dxos/shell/react";
1109
1152
  var SPACE_SETTINGS_DIALOG = `${SPACE_PLUGIN}/SpaceSettingsDialog`;
1110
1153
  var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "members", namesCache }) => {
1111
- const { t } = useTranslation19(SPACE_PLUGIN);
1112
- const client = useClient6();
1154
+ const { t } = useTranslation18(SPACE_PLUGIN);
1155
+ const client = useClient7();
1113
1156
  const [tabsActivePart, setTabsActivePart] = useState10("list");
1114
1157
  const [selected, setSelected] = useState10(initialTab);
1115
1158
  const locked = space.properties[COMPOSER_SPACE_LOCK];
@@ -1117,6 +1160,12 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1117
1160
  personal: client.spaces.default === space,
1118
1161
  namesCache
1119
1162
  });
1163
+ const panels = useCapabilities(SpaceCapabilities.SettingsPanel);
1164
+ const data = useMemo2(() => ({
1165
+ subject: space
1166
+ }), [
1167
+ space
1168
+ ]);
1120
1169
  return (
1121
1170
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
1122
1171
  // Consider factoring it out to the tabs package.
@@ -1169,7 +1218,10 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1169
1218
  }, t("settings tab label")), /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1170
1219
  value: "members",
1171
1220
  disabled: locked
1172
- }, t("members tab label"))))), /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1221
+ }, t("members tab label")), panels.map((panel) => /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1222
+ key: panel.id,
1223
+ value: panel.id
1224
+ }, toLocalizedString3(panel.label, t)))))), /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1173
1225
  value: "settings",
1174
1226
  classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1175
1227
  }, /* @__PURE__ */ React19.createElement(SpaceSettingsPanel, {
@@ -1182,25 +1234,32 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1182
1234
  hideHeading: true,
1183
1235
  target,
1184
1236
  createInvitationUrl
1237
+ }))), panels.map((panel) => /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1238
+ key: panel.id,
1239
+ value: panel.id,
1240
+ classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1241
+ }, /* @__PURE__ */ React19.createElement(Surface2, {
1242
+ role: `space-settings--${panel.id}`,
1243
+ data
1185
1244
  }))))))
1186
1245
  );
1187
1246
  };
1188
1247
 
1189
1248
  // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1190
1249
  import React20, { useEffect as useEffect6, useState as useState12 } from "react";
1191
- import { useGraph as useGraph3 } from "@dxos/plugin-graph";
1250
+ import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1192
1251
  import { QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
1193
1252
  import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1194
- import { useClient as useClient8 } from "@dxos/react-client";
1195
- import { Tooltip as Tooltip3, useTranslation as useTranslation20 } from "@dxos/react-ui";
1253
+ import { useClient as useClient9 } from "@dxos/react-client";
1254
+ import { Tooltip as Tooltip3, useTranslation as useTranslation19 } from "@dxos/react-ui";
1196
1255
  import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1197
1256
 
1198
1257
  // packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts
1199
1258
  import { useEffect as useEffect5, useState as useState11 } from "react";
1200
1259
  import { Context } from "@dxos/context";
1201
1260
  import { EdgeService } from "@dxos/protocols";
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";
1261
+ import { useClient as useClient8 } from "@dxos/react-client";
1262
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts";
1204
1263
  var createEmptyEdgeSyncState = () => ({
1205
1264
  missingOnLocal: 0,
1206
1265
  missingOnRemote: 0,
@@ -1220,11 +1279,11 @@ var getSyncSummary = (syncMap) => {
1220
1279
  };
1221
1280
  var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);
1222
1281
  var useSyncState = () => {
1223
- const client = useClient7();
1282
+ const client = useClient8();
1224
1283
  const [spaceState, setSpaceState] = useState11({});
1225
1284
  useEffect5(() => {
1226
1285
  const ctx = new Context(void 0, {
1227
- F: __dxlog_file3,
1286
+ F: __dxlog_file4,
1228
1287
  L: 48
1229
1288
  });
1230
1289
  const createSubscriptions = (spaces) => {
@@ -1259,7 +1318,7 @@ var useSpaceSyncState = (space) => {
1259
1318
  const [spaceState, setSpaceState] = useState11();
1260
1319
  useEffect5(() => {
1261
1320
  const ctx = new Context(void 0, {
1262
- F: __dxlog_file3,
1321
+ F: __dxlog_file4,
1263
1322
  L: 87
1264
1323
  });
1265
1324
  space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
@@ -1280,7 +1339,7 @@ var useSpaceSyncState = (space) => {
1280
1339
  // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1281
1340
  var useEdgeStatus = () => {
1282
1341
  const [status, setStatus] = useState12(QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED);
1283
- const client = useClient8();
1342
+ const client = useClient9();
1284
1343
  useEffect6(() => {
1285
1344
  client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
1286
1345
  setStatus(status2);
@@ -1291,11 +1350,11 @@ var useEdgeStatus = () => {
1291
1350
  return status;
1292
1351
  };
1293
1352
  var InlineSyncStatus = ({ space, open }) => {
1294
- const { t } = useTranslation20(SPACE_PLUGIN);
1353
+ const { t } = useTranslation19(SPACE_PLUGIN);
1295
1354
  const id = space.id;
1296
1355
  const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1297
1356
  const isAttended = hasAttention || isAncestor || isRelated;
1298
- const { graph } = useGraph3();
1357
+ const { graph } = useAppGraph3();
1299
1358
  const attended = useAttended2();
1300
1359
  const startOfAttention = attended.at(-1);
1301
1360
  const path = usePath(graph, startOfAttention);
@@ -1320,16 +1379,16 @@ var InlineSyncStatus = ({ space, open }) => {
1320
1379
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1321
1380
  import React22, { useCallback as useCallback12, useEffect as useEffect8, useState as useState14 } from "react";
1322
1381
  import { StatusBar } from "@dxos/plugin-status-bar";
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";
1382
+ import { useClient as useClient11 } from "@dxos/react-client";
1383
+ import { Icon as Icon6, Input as Input6, Popover as Popover3, useTranslation as useTranslation21 } from "@dxos/react-ui";
1325
1384
  import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
1326
1385
  import { mx as mx6 } from "@dxos/react-ui-theme";
1327
1386
 
1328
1387
  // packages/plugins/plugin-space/src/components/SyncStatus/Space.tsx
1329
1388
  import React21, { useEffect as useEffect7, useState as useState13 } from "react";
1330
- import { useClient as useClient9 } from "@dxos/react-client";
1389
+ import { useClient as useClient10 } from "@dxos/react-client";
1331
1390
  import { useSpace } from "@dxos/react-client/echo";
1332
- import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation21 } from "@dxos/react-ui";
1391
+ import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation20 } from "@dxos/react-ui";
1333
1392
  import { mx as mx5 } from "@dxos/react-ui-theme";
1334
1393
  var SYNC_STALLED_TIMEOUT = 5e3;
1335
1394
  var styles = {
@@ -1361,8 +1420,8 @@ var useActive = (count) => {
1361
1420
  return active;
1362
1421
  };
1363
1422
  var SpaceRowContainer = ({ spaceId, state }) => {
1364
- const { t } = useTranslation21(SPACE_PLUGIN);
1365
- const client = useClient9();
1423
+ const { t } = useTranslation20(SPACE_PLUGIN);
1424
+ const client = useClient10();
1366
1425
  const space = useSpace(spaceId);
1367
1426
  if (!space) {
1368
1427
  return null;
@@ -1438,7 +1497,7 @@ var Bar = ({ classNames, count, total }) => {
1438
1497
 
1439
1498
  // packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
1440
1499
  import { Context as Context2 } from "@dxos/context";
1441
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
1500
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
1442
1501
  var createClientSaveTracker = (client, cb) => {
1443
1502
  const unsubscribeCallbacks = {};
1444
1503
  const state = {};
@@ -1466,7 +1525,7 @@ var createClientSaveTracker = (client, cb) => {
1466
1525
  };
1467
1526
  var createSpaceSaveTracker = (space, cb) => {
1468
1527
  const ctx = new Context2(void 0, {
1469
- F: __dxlog_file4,
1528
+ F: __dxlog_file5,
1470
1529
  L: 40
1471
1530
  });
1472
1531
  void space.waitUntilReady().then(() => {
@@ -1529,7 +1588,7 @@ var getIcon = (status) => {
1529
1588
 
1530
1589
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1531
1590
  var SyncStatus = () => {
1532
- const client = useClient10();
1591
+ const client = useClient11();
1533
1592
  const state = useSyncState();
1534
1593
  const [saved, setSaved] = useState14(true);
1535
1594
  useEffect8(() => {
@@ -1543,7 +1602,7 @@ var SyncStatus = () => {
1543
1602
  });
1544
1603
  };
1545
1604
  var SyncStatusIndicator = ({ state, saved }) => {
1546
- const { t } = useTranslation22(SPACE_PLUGIN);
1605
+ const { t } = useTranslation21(SPACE_PLUGIN);
1547
1606
  const summary = getSyncSummary(state);
1548
1607
  const offline = Object.values(state).length === 0;
1549
1608
  const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
@@ -1584,18 +1643,16 @@ var SyncStatusIndicator = ({ state, saved }) => {
1584
1643
  asChild: true
1585
1644
  }, /* @__PURE__ */ React22.createElement(StatusBar.Button, {
1586
1645
  title
1587
- }, icon)), /* @__PURE__ */ React22.createElement(Popover3.Portal, null, /* @__PURE__ */ React22.createElement(Popover3.Content, {
1588
- sideOffset: 16
1589
- }, /* @__PURE__ */ React22.createElement(SyncStatusDetail, {
1646
+ }, icon)), /* @__PURE__ */ React22.createElement(Popover3.Portal, null, /* @__PURE__ */ React22.createElement(Popover3.Content, null, /* @__PURE__ */ React22.createElement(SyncStatusDetail, {
1590
1647
  state,
1591
1648
  summary,
1592
1649
  debug: false
1593
- }))));
1650
+ }), /* @__PURE__ */ React22.createElement(Popover3.Arrow, null))));
1594
1651
  }
1595
1652
  };
1596
1653
  var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1597
1654
  const [showAll, setShowAll] = useState14(false);
1598
- const { t } = useTranslation22(SPACE_PLUGIN);
1655
+ const { t } = useTranslation21(SPACE_PLUGIN);
1599
1656
  const entries = Object.entries(state).filter(([_, value]) => showAll || value.missingOnLocal + value.missingOnRemote > 0).toSorted(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
1600
1657
  const handleCheckedChange = useCallback12((state2) => setShowAll(state2), [
1601
1658
  setShowAll
@@ -1609,9 +1666,9 @@ var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1609
1666
  className: "flex-1"
1610
1667
  }, t("sync status title")), /* @__PURE__ */ React22.createElement("div", {
1611
1668
  className: "flex items-center gap-2"
1612
- }, /* @__PURE__ */ React22.createElement(Input7.Root, null, /* @__PURE__ */ React22.createElement(Input7.Label, {
1669
+ }, /* @__PURE__ */ React22.createElement(Input6.Root, null, /* @__PURE__ */ React22.createElement(Input6.Label, {
1613
1670
  classNames: "text-xs"
1614
- }, t("show all label")), /* @__PURE__ */ React22.createElement(Input7.Checkbox, {
1671
+ }, t("show all label")), /* @__PURE__ */ React22.createElement(Input6.Checkbox, {
1615
1672
  checked: showAll,
1616
1673
  onCheckedChange: handleCheckedChange
1617
1674
  })))), /* @__PURE__ */ React22.createElement("div", {
@@ -1670,4 +1727,4 @@ export {
1670
1727
  SpaceState,
1671
1728
  SpacesReady
1672
1729
  };
1673
- //# sourceMappingURL=chunk-I75ZN2YH.mjs.map
1730
+ //# sourceMappingURL=chunk-FTVEA5LO.mjs.map