@dxos/plugin-space 0.7.5-main.ff8607b → 0.7.5-staging.b81e783

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 (224) hide show
  1. package/dist/lib/browser/{app-graph-builder-J4NX44Y4.mjs → app-graph-builder-MGK5HWPZ.mjs} +21 -100
  2. package/dist/lib/browser/app-graph-builder-MGK5HWPZ.mjs.map +7 -0
  3. package/dist/lib/browser/{app-graph-serializer-QF7VVRCV.mjs → app-graph-serializer-FOWFLYGU.mjs} +4 -4
  4. package/dist/lib/browser/{chunk-6UIFMVVI.mjs → chunk-23RVI5FZ.mjs} +16 -5
  5. package/dist/lib/browser/chunk-23RVI5FZ.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-RLZQJD47.mjs → chunk-NU7WDVGN.mjs} +2 -1
  7. package/dist/lib/browser/chunk-NU7WDVGN.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-XZ2NH3CP.mjs → chunk-POARSSRI.mjs} +306 -210
  9. package/dist/lib/browser/chunk-POARSSRI.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-SDK7RZI3.mjs → chunk-UDWHTKB5.mjs} +6 -3
  11. package/dist/lib/browser/chunk-UDWHTKB5.mjs.map +7 -0
  12. package/dist/lib/browser/{chunk-XPZ6IIXF.mjs → chunk-ULA2UQJ4.mjs} +15 -1
  13. package/dist/lib/browser/chunk-ULA2UQJ4.mjs.map +7 -0
  14. package/dist/lib/browser/{identity-created-25TK5XNO.mjs → identity-created-FYGS6TBH.mjs} +2 -2
  15. package/dist/lib/browser/index.mjs +55 -21
  16. package/dist/lib/browser/index.mjs.map +3 -3
  17. package/dist/lib/browser/{intent-resolver-IEDVV74T.mjs → intent-resolver-E2UU3DAS.mjs} +86 -54
  18. package/dist/lib/browser/intent-resolver-E2UU3DAS.mjs.map +7 -0
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/{react-root-6VRPRLQR.mjs → react-root-STUND2SO.mjs} +5 -5
  21. package/dist/lib/browser/{react-surface-DMNDXLZ7.mjs → react-surface-P7CKFNJR.mjs} +16 -22
  22. package/dist/lib/browser/react-surface-P7CKFNJR.mjs.map +7 -0
  23. package/dist/lib/browser/schema-5W3DSY2E.mjs +24 -0
  24. package/dist/lib/browser/schema-5W3DSY2E.mjs.map +7 -0
  25. package/dist/lib/browser/{settings-K4JPYYEM.mjs → settings-PHPCXX33.mjs} +2 -2
  26. package/dist/lib/browser/{spaces-ready-2MUWWVVO.mjs → spaces-ready-K47RR7N2.mjs} +4 -4
  27. package/dist/lib/browser/{state-6DCY5YJP.mjs → state-INJ63O57.mjs} +2 -2
  28. package/dist/lib/browser/types/index.mjs +5 -3
  29. package/dist/lib/node/{app-graph-builder-ZOPG4MOS.cjs → app-graph-builder-ZIUBXRPA.cjs} +45 -124
  30. package/dist/lib/node/app-graph-builder-ZIUBXRPA.cjs.map +7 -0
  31. package/dist/lib/node/{app-graph-serializer-QE2G4MWB.cjs → app-graph-serializer-VQOGHKXL.cjs} +20 -20
  32. package/dist/lib/node/{chunk-3QWZCN6L.cjs → chunk-OVGKWJOC.cjs} +51 -40
  33. package/dist/lib/node/chunk-OVGKWJOC.cjs.map +7 -0
  34. package/dist/lib/node/{chunk-SZEIQGQU.cjs → chunk-RHYA4XUB.cjs} +367 -270
  35. package/dist/lib/node/chunk-RHYA4XUB.cjs.map +7 -0
  36. package/dist/lib/node/{chunk-D6BFKOXY.cjs → chunk-U6DYXAR3.cjs} +10 -7
  37. package/dist/lib/node/chunk-U6DYXAR3.cjs.map +7 -0
  38. package/dist/lib/node/{chunk-6MEOP3DH.cjs → chunk-WAJKBO3J.cjs} +21 -6
  39. package/dist/lib/node/chunk-WAJKBO3J.cjs.map +7 -0
  40. package/dist/lib/node/{chunk-UX3U4RU2.cjs → chunk-YZKNRFHU.cjs} +5 -4
  41. package/dist/lib/node/chunk-YZKNRFHU.cjs.map +7 -0
  42. package/dist/lib/node/{identity-created-7G5U7R36.cjs → identity-created-AXI64BLE.cjs} +6 -6
  43. package/dist/lib/node/index.cjs +108 -75
  44. package/dist/lib/node/index.cjs.map +3 -3
  45. package/dist/lib/node/{intent-resolver-N2W2L6OL.cjs → intent-resolver-TJ5DFPZP.cjs} +136 -105
  46. package/dist/lib/node/intent-resolver-TJ5DFPZP.cjs.map +7 -0
  47. package/dist/lib/node/meta.json +1 -1
  48. package/dist/lib/node/{react-root-YD35W3VU.cjs → react-root-WQGBCJ2K.cjs} +10 -10
  49. package/dist/lib/node/{react-surface-QPLXK7DT.cjs → react-surface-GSEV6XCR.cjs} +49 -57
  50. package/dist/lib/node/react-surface-GSEV6XCR.cjs.map +7 -0
  51. package/dist/lib/node/schema-YN7WVFRX.cjs +40 -0
  52. package/dist/lib/node/schema-YN7WVFRX.cjs.map +7 -0
  53. package/dist/lib/node/{settings-TEELGWS4.cjs → settings-5QYFWNH7.cjs} +6 -6
  54. package/dist/lib/node/{spaces-ready-PZZQWS6T.cjs → spaces-ready-FQNAKR7G.cjs} +13 -13
  55. package/dist/lib/node/{state-WPZC4JXB.cjs → state-57UE3DYE.cjs} +6 -6
  56. package/dist/lib/node/types/index.cjs +18 -16
  57. package/dist/lib/node/types/index.cjs.map +2 -2
  58. package/dist/lib/node-esm/{app-graph-builder-TKGLOK22.mjs → app-graph-builder-TERVM2SL.mjs} +21 -100
  59. package/dist/lib/node-esm/app-graph-builder-TERVM2SL.mjs.map +7 -0
  60. package/dist/lib/node-esm/{app-graph-serializer-HLX2JRNF.mjs → app-graph-serializer-GZRSWHEN.mjs} +4 -4
  61. package/dist/lib/node-esm/{chunk-4UX5WGKJ.mjs → chunk-2TQ2AJEZ.mjs} +6 -3
  62. package/dist/lib/node-esm/chunk-2TQ2AJEZ.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-LGL4A5B5.mjs → chunk-6RSVVEPS.mjs} +2 -1
  64. package/dist/lib/node-esm/chunk-6RSVVEPS.mjs.map +7 -0
  65. package/dist/lib/node-esm/{chunk-N6EAOMIS.mjs → chunk-ONKFX23L.mjs} +306 -210
  66. package/dist/lib/node-esm/chunk-ONKFX23L.mjs.map +7 -0
  67. package/dist/lib/node-esm/{chunk-LA45TPAN.mjs → chunk-PGH5L7MV.mjs} +16 -5
  68. package/dist/lib/node-esm/chunk-PGH5L7MV.mjs.map +7 -0
  69. package/dist/lib/node-esm/{chunk-AAQRELDK.mjs → chunk-TRNZQEEN.mjs} +15 -1
  70. package/dist/lib/node-esm/chunk-TRNZQEEN.mjs.map +7 -0
  71. package/dist/lib/node-esm/{identity-created-7THGZ7EW.mjs → identity-created-3CGEXNPO.mjs} +2 -2
  72. package/dist/lib/node-esm/index.mjs +55 -21
  73. package/dist/lib/node-esm/index.mjs.map +3 -3
  74. package/dist/lib/node-esm/{intent-resolver-L2TKJU4I.mjs → intent-resolver-7NJCJ3FA.mjs} +86 -54
  75. package/dist/lib/node-esm/intent-resolver-7NJCJ3FA.mjs.map +7 -0
  76. package/dist/lib/node-esm/meta.json +1 -1
  77. package/dist/lib/node-esm/{react-root-Q5MFDXZE.mjs → react-root-OLYAEMP5.mjs} +5 -5
  78. package/dist/lib/node-esm/{react-surface-RQQZ5BOG.mjs → react-surface-6IFC6ZMN.mjs} +16 -22
  79. package/dist/lib/node-esm/react-surface-6IFC6ZMN.mjs.map +7 -0
  80. package/dist/lib/node-esm/schema-LOR2EVGY.mjs +25 -0
  81. package/dist/lib/node-esm/schema-LOR2EVGY.mjs.map +7 -0
  82. package/dist/lib/node-esm/{settings-KXYUZBLN.mjs → settings-H6MXTEQM.mjs} +2 -2
  83. package/dist/lib/node-esm/{spaces-ready-MWNP3WBX.mjs → spaces-ready-HKAQG5SA.mjs} +4 -4
  84. package/dist/lib/node-esm/{state-5GH2D5U4.mjs → state-VYA6OFHD.mjs} +2 -2
  85. package/dist/lib/node-esm/types/index.mjs +5 -3
  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.map +1 -1
  89. package/dist/types/src/capabilities/capabilities.d.ts +2 -1
  90. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  91. package/dist/types/src/capabilities/index.d.ts +2 -0
  92. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -1
  94. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  96. package/dist/types/src/capabilities/schema.d.ts +4 -0
  97. package/dist/types/src/capabilities/schema.d.ts.map +1 -0
  98. package/dist/types/src/components/AdvancedObjectSettings/AdvancedObjectSettings.d.ts +1 -2
  99. package/dist/types/src/components/AdvancedObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
  100. package/dist/types/src/components/AdvancedObjectSettings/ForeignKeys.d.ts +1 -2
  101. package/dist/types/src/components/AdvancedObjectSettings/ForeignKeys.d.ts.map +1 -1
  102. package/dist/types/src/components/AwaitingObject.d.ts +1 -2
  103. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  104. package/dist/types/src/components/BaseObjectSettings.d.ts +1 -2
  105. package/dist/types/src/components/BaseObjectSettings.d.ts.map +1 -1
  106. package/dist/types/src/components/CollectionMain.d.ts +1 -2
  107. package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
  108. package/dist/types/src/components/CollectionSection.d.ts +1 -2
  109. package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
  110. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -4
  111. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  112. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
  113. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -7
  114. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  115. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts +1 -2
  116. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  117. package/dist/types/src/components/JoinDialog.d.ts +1 -2
  118. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  119. package/dist/types/src/components/MenuFooter.d.ts +1 -2
  120. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  121. package/dist/types/src/components/PersistenceStatus.d.ts +1 -2
  122. package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
  123. package/dist/types/src/components/PopoverAddSpace.d.ts +3 -0
  124. package/dist/types/src/components/PopoverAddSpace.d.ts.map +1 -0
  125. package/dist/types/src/components/PopoverRenameObject.d.ts +1 -2
  126. package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
  127. package/dist/types/src/components/PopoverRenameSpace.d.ts +1 -2
  128. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
  129. package/dist/types/src/components/ShareSpaceButton.d.ts +2 -3
  130. package/dist/types/src/components/ShareSpaceButton.d.ts.map +1 -1
  131. package/dist/types/src/components/SpacePluginSettings.d.ts +1 -2
  132. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  133. package/dist/types/src/components/SpacePresence.d.ts +4 -5
  134. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  135. package/dist/types/src/components/SpacePresence.stories.d.ts +2 -3
  136. package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
  137. package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts +1 -2
  138. package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts.map +1 -1
  139. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts +3 -5
  140. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts.map +1 -1
  141. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.stories.d.ts.map +1 -1
  142. package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts +1 -2
  143. package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
  144. package/dist/types/src/components/SyncStatus/Space.d.ts +2 -3
  145. package/dist/types/src/components/SyncStatus/Space.d.ts.map +1 -1
  146. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +3 -4
  147. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  148. package/dist/types/src/components/index.d.ts +1 -0
  149. package/dist/types/src/components/index.d.ts.map +1 -1
  150. package/dist/types/src/events.d.ts +4 -0
  151. package/dist/types/src/events.d.ts.map +1 -1
  152. package/dist/types/src/index.d.ts +1 -1
  153. package/dist/types/src/index.d.ts.map +1 -1
  154. package/dist/types/src/translations.d.ts +9 -0
  155. package/dist/types/src/translations.d.ts.map +1 -1
  156. package/dist/types/src/types/types.d.ts +26 -1
  157. package/dist/types/src/types/types.d.ts.map +1 -1
  158. package/dist/types/src/util.d.ts +2 -1
  159. package/dist/types/src/util.d.ts.map +1 -1
  160. package/package.json +41 -39
  161. package/src/SpacePlugin.tsx +41 -12
  162. package/src/capabilities/app-graph-builder.ts +15 -90
  163. package/src/capabilities/capabilities.ts +3 -1
  164. package/src/capabilities/index.ts +1 -0
  165. package/src/capabilities/intent-resolver.ts +93 -46
  166. package/src/capabilities/react-surface.tsx +12 -28
  167. package/src/capabilities/schema.ts +27 -0
  168. package/src/components/BaseObjectSettings.tsx +7 -0
  169. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +1 -3
  170. package/src/components/CreateDialog/CreateObjectDialog.tsx +29 -21
  171. package/src/components/CreateDialog/CreateObjectPanel.tsx +41 -44
  172. package/src/components/CreateDialog/CreateSpaceDialog.tsx +8 -1
  173. package/src/components/PopoverAddSpace.tsx +46 -0
  174. package/src/components/SpacePresence.stories.tsx +2 -2
  175. package/src/components/SpaceSettings/SpaceSettingsPanel.stories.tsx +5 -1
  176. package/src/components/SpaceSettings/SpaceSettingsPanel.tsx +27 -4
  177. package/src/components/index.ts +1 -0
  178. package/src/events.ts +6 -0
  179. package/src/index.ts +1 -1
  180. package/src/translations.ts +3 -0
  181. package/src/types/types.ts +21 -1
  182. package/src/util.tsx +8 -2
  183. package/dist/lib/browser/app-graph-builder-J4NX44Y4.mjs.map +0 -7
  184. package/dist/lib/browser/chunk-6UIFMVVI.mjs.map +0 -7
  185. package/dist/lib/browser/chunk-RLZQJD47.mjs.map +0 -7
  186. package/dist/lib/browser/chunk-SDK7RZI3.mjs.map +0 -7
  187. package/dist/lib/browser/chunk-XPZ6IIXF.mjs.map +0 -7
  188. package/dist/lib/browser/chunk-XZ2NH3CP.mjs.map +0 -7
  189. package/dist/lib/browser/intent-resolver-IEDVV74T.mjs.map +0 -7
  190. package/dist/lib/browser/react-surface-DMNDXLZ7.mjs.map +0 -7
  191. package/dist/lib/node/app-graph-builder-ZOPG4MOS.cjs.map +0 -7
  192. package/dist/lib/node/chunk-3QWZCN6L.cjs.map +0 -7
  193. package/dist/lib/node/chunk-6MEOP3DH.cjs.map +0 -7
  194. package/dist/lib/node/chunk-D6BFKOXY.cjs.map +0 -7
  195. package/dist/lib/node/chunk-SZEIQGQU.cjs.map +0 -7
  196. package/dist/lib/node/chunk-UX3U4RU2.cjs.map +0 -7
  197. package/dist/lib/node/intent-resolver-N2W2L6OL.cjs.map +0 -7
  198. package/dist/lib/node/react-surface-QPLXK7DT.cjs.map +0 -7
  199. package/dist/lib/node-esm/app-graph-builder-TKGLOK22.mjs.map +0 -7
  200. package/dist/lib/node-esm/chunk-4UX5WGKJ.mjs.map +0 -7
  201. package/dist/lib/node-esm/chunk-AAQRELDK.mjs.map +0 -7
  202. package/dist/lib/node-esm/chunk-LA45TPAN.mjs.map +0 -7
  203. package/dist/lib/node-esm/chunk-LGL4A5B5.mjs.map +0 -7
  204. package/dist/lib/node-esm/chunk-N6EAOMIS.mjs.map +0 -7
  205. package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs.map +0 -7
  206. package/dist/lib/node-esm/react-surface-RQQZ5BOG.mjs.map +0 -7
  207. /package/dist/lib/browser/{app-graph-serializer-QF7VVRCV.mjs.map → app-graph-serializer-FOWFLYGU.mjs.map} +0 -0
  208. /package/dist/lib/browser/{identity-created-25TK5XNO.mjs.map → identity-created-FYGS6TBH.mjs.map} +0 -0
  209. /package/dist/lib/browser/{react-root-6VRPRLQR.mjs.map → react-root-STUND2SO.mjs.map} +0 -0
  210. /package/dist/lib/browser/{settings-K4JPYYEM.mjs.map → settings-PHPCXX33.mjs.map} +0 -0
  211. /package/dist/lib/browser/{spaces-ready-2MUWWVVO.mjs.map → spaces-ready-K47RR7N2.mjs.map} +0 -0
  212. /package/dist/lib/browser/{state-6DCY5YJP.mjs.map → state-INJ63O57.mjs.map} +0 -0
  213. /package/dist/lib/node/{app-graph-serializer-QE2G4MWB.cjs.map → app-graph-serializer-VQOGHKXL.cjs.map} +0 -0
  214. /package/dist/lib/node/{identity-created-7G5U7R36.cjs.map → identity-created-AXI64BLE.cjs.map} +0 -0
  215. /package/dist/lib/node/{react-root-YD35W3VU.cjs.map → react-root-WQGBCJ2K.cjs.map} +0 -0
  216. /package/dist/lib/node/{settings-TEELGWS4.cjs.map → settings-5QYFWNH7.cjs.map} +0 -0
  217. /package/dist/lib/node/{spaces-ready-PZZQWS6T.cjs.map → spaces-ready-FQNAKR7G.cjs.map} +0 -0
  218. /package/dist/lib/node/{state-WPZC4JXB.cjs.map → state-57UE3DYE.cjs.map} +0 -0
  219. /package/dist/lib/node-esm/{app-graph-serializer-HLX2JRNF.mjs.map → app-graph-serializer-GZRSWHEN.mjs.map} +0 -0
  220. /package/dist/lib/node-esm/{identity-created-7THGZ7EW.mjs.map → identity-created-3CGEXNPO.mjs.map} +0 -0
  221. /package/dist/lib/node-esm/{react-root-Q5MFDXZE.mjs.map → react-root-OLYAEMP5.mjs.map} +0 -0
  222. /package/dist/lib/node-esm/{settings-KXYUZBLN.mjs.map → settings-H6MXTEQM.mjs.map} +0 -0
  223. /package/dist/lib/node-esm/{spaces-ready-MWNP3WBX.mjs.map → spaces-ready-HKAQG5SA.mjs.map} +0 -0
  224. /package/dist/lib/node-esm/{state-5GH2D5U4.mjs.map → state-VYA6OFHD.mjs.map} +0 -0
@@ -1,16 +1,16 @@
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-6RSVVEPS.mjs";
5
5
  import {
6
6
  COMPOSER_SPACE_LOCK,
7
7
  getSpaceDisplayName
8
- } from "./chunk-LA45TPAN.mjs";
8
+ } from "./chunk-PGH5L7MV.mjs";
9
9
  import {
10
10
  CollectionType,
11
11
  SpaceAction,
12
12
  SpaceForm
13
- } from "./chunk-AAQRELDK.mjs";
13
+ } from "./chunk-TRNZQEEN.mjs";
14
14
  import {
15
15
  SPACE_PLUGIN
16
16
  } from "./chunk-ICCM4YRJ.mjs";
@@ -207,14 +207,21 @@ import React4 from "react";
207
207
  import { Input, useTranslation as useTranslation4 } from "@dxos/react-ui";
208
208
  var BaseObjectSettings = ({ object }) => {
209
209
  const { t } = useTranslation4(SPACE_PLUGIN);
210
+ const inputRef = React4.useRef(null);
210
211
  return /* @__PURE__ */ React4.createElement("div", {
211
212
  role: "form",
212
213
  className: "flex flex-col w-full p-2 gap-1"
213
214
  }, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React4.createElement(Input.TextInput, {
215
+ ref: inputRef,
214
216
  placeholder: t("name placeholder"),
215
217
  value: object.name ?? "",
216
218
  onChange: (event) => {
217
219
  object.name = event.target.value;
220
+ },
221
+ onKeyDown: (event) => {
222
+ if (event.key === "Enter") {
223
+ inputRef.current?.blur();
224
+ }
218
225
  }
219
226
  })));
220
227
  };
@@ -222,20 +229,23 @@ var BaseObjectSettings = ({ object }) => {
222
229
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
223
230
  import { pipe } from "effect";
224
231
  import React6, { useCallback as useCallback5, useRef } from "react";
225
- import { chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
232
+ import { Capabilities, chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager as usePluginManager2 } from "@dxos/app-framework";
233
+ import { invariant as invariant2 } from "@dxos/invariant";
226
234
  import { useClient as useClient2 } from "@dxos/react-client";
227
235
  import { getSpace, isReactiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
228
236
  import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation6 } from "@dxos/react-ui";
229
237
 
230
238
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
231
- import React5, { useCallback as useCallback4, useMemo, useState as useState3 } from "react";
239
+ import React5, { useCallback as useCallback4, useState as useState3 } from "react";
232
240
  import { Surface, isSurfaceAvailable, usePluginManager } from "@dxos/app-framework";
233
- import { getObjectAnnotation, S } from "@dxos/echo-schema";
241
+ import { getObjectAnnotation } from "@dxos/echo-schema";
242
+ import { invariant } from "@dxos/invariant";
234
243
  import { Icon, toLocalizedString, useTranslation as useTranslation5 } from "@dxos/react-ui";
235
244
  import { Form as Form2 } from "@dxos/react-ui-form";
236
245
  import { SearchList } from "@dxos/react-ui-searchlist";
237
246
  import { mx as mx2 } from "@dxos/react-ui-theme";
238
- import { nonNullable } from "@dxos/util";
247
+ import { isNonNullable } from "@dxos/util";
248
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx";
239
249
  var useInputSurfaceLookup = (baseData) => {
240
250
  const pluginManager = usePluginManager();
241
251
  return useCallback4(({ prop, schema, inputProps }) => {
@@ -260,12 +270,12 @@ var useInputSurfaceLookup = (baseData) => {
260
270
  baseData
261
271
  ]);
262
272
  };
263
- var CreateObjectPanel = ({ classNames, schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
273
+ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
264
274
  const { t } = useTranslation5(SPACE_PLUGIN);
265
275
  const [typename, setTypename] = useState3(initialTypename);
266
276
  const [target, setTarget] = useState3(initialTarget);
267
- const schema = schemas.find((schema2) => getObjectAnnotation(schema2)?.typename === typename);
268
- const options = schemas.map(getObjectAnnotation).filter(nonNullable).sort((a, b) => {
277
+ const form = forms.find((form2) => getObjectAnnotation(form2.objectSchema)?.typename === typename);
278
+ const options = forms.map((form2) => getObjectAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
269
279
  const nameA = t("typename label", {
270
280
  ns: a.typename,
271
281
  defaultValue: a.typename
@@ -277,63 +287,68 @@ var CreateObjectPanel = ({ classNames, schemas, spaces, typename: initialTypenam
277
287
  return nameA.localeCompare(nameB);
278
288
  });
279
289
  const handleCreateObject = useCallback4(async (props) => {
280
- if (!schema || !target) {
290
+ if (!form || !target) {
281
291
  return;
282
292
  }
283
293
  await onCreateObject?.({
284
- schema,
294
+ form,
285
295
  target,
286
296
  data: props
287
297
  });
288
298
  }, [
289
299
  onCreateObject,
290
- schema,
300
+ form,
291
301
  target
292
302
  ]);
293
- const metadata = useMemo(() => {
294
- if (!typename) {
295
- return;
303
+ const handleSetTypename = useCallback4(async (typename2) => {
304
+ invariant(target, "target is required", {
305
+ F: __dxlog_file,
306
+ L: 94,
307
+ S: void 0,
308
+ A: [
309
+ "target",
310
+ "'target is required'"
311
+ ]
312
+ });
313
+ const form2 = forms.find((form3) => getObjectAnnotation(form3.objectSchema)?.typename === typename2);
314
+ if (form2 && !form2.formSchema) {
315
+ await onCreateObject?.({
316
+ form: form2,
317
+ target
318
+ });
319
+ } else {
320
+ setTypename(typename2);
296
321
  }
297
- return resolve?.(typename);
298
322
  }, [
299
- resolve,
300
- typename
323
+ forms,
324
+ onCreateObject,
325
+ target
301
326
  ]);
302
327
  const inputSurfaceLookup = useInputSurfaceLookup({
303
328
  target
304
329
  });
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
330
  return /* @__PURE__ */ React5.createElement("div", {
326
331
  role: "form",
327
332
  className: mx2("flex flex-col gap-2", classNames)
328
- }, !schema ? /* @__PURE__ */ React5.createElement(SelectSchema, {
333
+ }, !form ? /* @__PURE__ */ React5.createElement(SelectSchema, {
329
334
  options,
330
335
  resolve,
331
- onChange: setTypename
336
+ onChange: handleSetTypename
332
337
  }) : !target ? /* @__PURE__ */ React5.createElement(SelectSpace, {
333
338
  spaces,
334
339
  defaultSpaceId,
335
340
  onChange: setTarget
336
- }) : form);
341
+ }) : form.formSchema ? /* @__PURE__ */ React5.createElement(Form2, {
342
+ classNames: "!p-0",
343
+ autoFocus: true,
344
+ values: {
345
+ name: initialName
346
+ },
347
+ schema: form.formSchema,
348
+ testId: "create-object-form",
349
+ onSave: handleCreateObject,
350
+ lookupComponent: inputSurfaceLookup
351
+ }) : void 0);
337
352
  };
338
353
  var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
339
354
  const { t } = useTranslation5(SPACE_PLUGIN);
@@ -399,23 +414,50 @@ var SelectSchema = ({ options, resolve, onChange }) => {
399
414
  }))))));
400
415
  };
401
416
 
417
+ // packages/plugins/plugin-space/src/capabilities/index.ts
418
+ import { lazy } from "@dxos/app-framework";
419
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-TERVM2SL.mjs"));
420
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-GZRSWHEN.mjs"));
421
+ var IdentityCreated = lazy(() => import("./identity-created-3CGEXNPO.mjs"));
422
+ var IntentResolver = lazy(() => import("./intent-resolver-7NJCJ3FA.mjs"));
423
+ var ReactRoot = lazy(() => import("./react-root-OLYAEMP5.mjs"));
424
+ var ReactSurface = lazy(() => import("./react-surface-6IFC6ZMN.mjs"));
425
+ var Schema = lazy(() => import("./schema-LOR2EVGY.mjs"));
426
+ var SpaceSettings = lazy(() => import("./settings-H6MXTEQM.mjs"));
427
+ var SpaceState = lazy(() => import("./state-VYA6OFHD.mjs"));
428
+ var SpacesReady = lazy(() => import("./spaces-ready-HKAQG5SA.mjs"));
429
+
402
430
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
431
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
403
432
  var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
404
- var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _shouldNavigate, resolve }) => {
433
+ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavigate }) => {
405
434
  const closeRef = useRef(null);
435
+ const manager = usePluginManager2();
406
436
  const { t } = useTranslation6(SPACE_PLUGIN);
407
437
  const client = useClient2();
408
438
  const spaces = useSpaces();
409
439
  const { dispatchPromise: dispatch } = useIntentDispatcher2();
410
- const handleCreateObject = useCallback5(async ({ schema, target: _target, data }) => {
440
+ const forms = useCapabilities(SpaceCapabilities.ObjectForm);
441
+ const resolve = useCallback5((typename2) => manager.context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
442
+ manager
443
+ ]);
444
+ const handleCreateObject = useCallback5(async ({ form, target: _target, data = {} }) => {
411
445
  const target2 = isSpace(_target) ? _target.properties[CollectionType.typename]?.target : _target;
412
- const createObjectIntent = resolve?.(schema.typename)?.createObject;
413
- if (!createObjectIntent || !target2) {
446
+ if (!target2) {
414
447
  return;
415
448
  }
416
449
  closeRef.current?.click();
417
450
  const space = isSpace(target2) ? target2 : getSpace(target2);
418
- const result = await dispatch(createObjectIntent(data, {
451
+ invariant2(space, "Missing space", {
452
+ F: __dxlog_file2,
453
+ L: 75,
454
+ S: void 0,
455
+ A: [
456
+ "space",
457
+ "'Missing space'"
458
+ ]
459
+ });
460
+ const result = await dispatch(form.getIntent(data, {
419
461
  space
420
462
  }));
421
463
  const object = result.data?.object;
@@ -457,7 +499,7 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
457
499
  size: 4
458
500
  })))), /* @__PURE__ */ React6.createElement(CreateObjectPanel, {
459
501
  classNames: "p-4",
460
- schemas,
502
+ forms,
461
503
  spaces,
462
504
  target,
463
505
  typename,
@@ -520,6 +562,8 @@ var CreateSpaceDialog = () => {
520
562
  className: "p-4"
521
563
  }, /* @__PURE__ */ React7.createElement(Form3, {
522
564
  testId: "create-space-form",
565
+ classNames: "!p-0",
566
+ autoFocus: true,
523
567
  values: initialValues2,
524
568
  schema: SpaceForm,
525
569
  onSave: handleCreateSpace
@@ -563,7 +607,7 @@ import { ObservabilityAction } from "@dxos/plugin-observability/types";
563
607
  import { useClient as useClient3 } from "@dxos/react-client";
564
608
  import { Dialog as Dialog3 } from "@dxos/react-ui";
565
609
  import { JoinPanel } from "@dxos/shell/react";
566
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/JoinDialog.tsx";
610
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/JoinDialog.tsx";
567
611
  var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
568
612
  var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
569
613
  const { dispatchPromise: dispatch } = useIntentDispatcher4();
@@ -602,7 +646,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
602
646
  const space = result?.spaceKey ? client.spaces.get(result.spaceKey) : void 0;
603
647
  if (!space) {
604
648
  log.warn("Space not found", result?.spaceKey, {
605
- F: __dxlog_file,
649
+ F: __dxlog_file3,
606
650
  L: 56,
607
651
  S: void 0,
608
652
  C: (f, a) => f(...a)
@@ -742,14 +786,58 @@ var PersistenceStatus = ({ db }) => {
742
786
  }
743
787
  };
744
788
 
789
+ // packages/plugins/plugin-space/src/components/PopoverAddSpace.tsx
790
+ import React13 from "react";
791
+ import { createIntent as createIntent5, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
792
+ import { IconButton as IconButton3, useTranslation as useTranslation12 } from "@dxos/react-ui";
793
+ var POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
794
+ var PopoverAddSpace = () => {
795
+ const { t } = useTranslation12(SPACE_PLUGIN);
796
+ const { dispatchPromise: dispatch } = useIntentDispatcher5();
797
+ return /* @__PURE__ */ React13.createElement("div", {
798
+ role: "none",
799
+ className: "grid grid-cols-1 gap-1 [&>button]:justify-start"
800
+ }, /* @__PURE__ */ React13.createElement(IconButton3, {
801
+ variant: "ghost",
802
+ label: t("join space label"),
803
+ icon: "ph--sign-in--regular",
804
+ onClick: () => {
805
+ void dispatch(createIntent5(SpaceAction.Join));
806
+ void dispatch(createIntent5(LayoutAction5.UpdatePopover, {
807
+ part: "popover",
808
+ options: {
809
+ anchorId: "",
810
+ state: false
811
+ }
812
+ }));
813
+ },
814
+ "data-testid": "spacePlugin.joinSpace"
815
+ }), /* @__PURE__ */ React13.createElement(IconButton3, {
816
+ variant: "ghost",
817
+ label: t("create space label"),
818
+ icon: "ph--plus--regular",
819
+ onClick: () => {
820
+ void dispatch(createIntent5(SpaceAction.OpenCreateSpace));
821
+ void dispatch(createIntent5(LayoutAction5.UpdatePopover, {
822
+ part: "popover",
823
+ options: {
824
+ anchorId: "",
825
+ state: false
826
+ }
827
+ }));
828
+ },
829
+ "data-testid": "spacePlugin.createSpace"
830
+ }));
831
+ };
832
+
745
833
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
746
- import React13, { useCallback as useCallback8, useRef as useRef3, useState as useState5 } from "react";
834
+ import React14, { useCallback as useCallback8, useRef as useRef3, useState as useState5 } from "react";
747
835
  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";
836
+ import { Button as Button4, Input as Input2, Popover, useTranslation as useTranslation13 } from "@dxos/react-ui";
837
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
750
838
  var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
751
839
  var PopoverRenameObject = ({ object: obj }) => {
752
- const { t } = useTranslation12(SPACE_PLUGIN);
840
+ const { t } = useTranslation13(SPACE_PLUGIN);
753
841
  const doneButton = useRef3(null);
754
842
  const object = obj;
755
843
  const [name, setName] = useState5(object.name || object.title || "");
@@ -763,7 +851,7 @@ var PopoverRenameObject = ({ object: obj }) => {
763
851
  log2.error("Failed to rename object", {
764
852
  err
765
853
  }, {
766
- F: __dxlog_file2,
854
+ F: __dxlog_file4,
767
855
  L: 30,
768
856
  S: void 0,
769
857
  C: (f, a) => f(...a)
@@ -774,23 +862,23 @@ var PopoverRenameObject = ({ object: obj }) => {
774
862
  object,
775
863
  name
776
864
  ]);
777
- return /* @__PURE__ */ React13.createElement("div", {
865
+ return /* @__PURE__ */ React14.createElement("div", {
778
866
  role: "none",
779
867
  className: "p-1 flex gap-2"
780
- }, /* @__PURE__ */ React13.createElement("div", {
868
+ }, /* @__PURE__ */ React14.createElement("div", {
781
869
  role: "none",
782
870
  className: "flex-1"
783
- }, /* @__PURE__ */ React13.createElement(Input2.Root, null, /* @__PURE__ */ React13.createElement(Input2.Label, {
871
+ }, /* @__PURE__ */ React14.createElement(Input2.Root, null, /* @__PURE__ */ React14.createElement(Input2.Label, {
784
872
  srOnly: true
785
- }, t("object name label")), /* @__PURE__ */ React13.createElement(Input2.TextInput, {
873
+ }, t("object name label")), /* @__PURE__ */ React14.createElement(Input2.TextInput, {
786
874
  placeholder: t("object title placeholder"),
787
875
  value: name,
788
876
  "data-testid": "spacePlugin.renameObject.input",
789
877
  onChange: ({ target: { value } }) => setName(value),
790
878
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
791
- }))), /* @__PURE__ */ React13.createElement(Popover.Close, {
879
+ }))), /* @__PURE__ */ React14.createElement(Popover.Close, {
792
880
  asChild: true
793
- }, /* @__PURE__ */ React13.createElement(Button4, {
881
+ }, /* @__PURE__ */ React14.createElement(Button4, {
794
882
  ref: doneButton,
795
883
  classNames: "self-stretch",
796
884
  onClick: handleDone
@@ -800,11 +888,11 @@ var PopoverRenameObject = ({ object: obj }) => {
800
888
  };
801
889
 
802
890
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
803
- 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";
891
+ import React15, { useCallback as useCallback9, useRef as useRef4, useState as useState6 } from "react";
892
+ import { Button as Button5, Input as Input3, Popover as Popover2, useTranslation as useTranslation14 } from "@dxos/react-ui";
805
893
  var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
806
894
  var PopoverRenameSpace = ({ space }) => {
807
- const { t } = useTranslation13(SPACE_PLUGIN);
895
+ const { t } = useTranslation14(SPACE_PLUGIN);
808
896
  const doneButton = useRef4(null);
809
897
  const [name, setName] = useState6(space.properties.name ?? "");
810
898
  const handleDone = useCallback9(() => {
@@ -813,24 +901,24 @@ var PopoverRenameSpace = ({ space }) => {
813
901
  space,
814
902
  name
815
903
  ]);
816
- return /* @__PURE__ */ React14.createElement("div", {
904
+ return /* @__PURE__ */ React15.createElement("div", {
817
905
  role: "none",
818
906
  className: "p-1 flex gap-2"
819
- }, /* @__PURE__ */ React14.createElement("div", {
907
+ }, /* @__PURE__ */ React15.createElement("div", {
820
908
  role: "none",
821
909
  className: "flex-1"
822
- }, /* @__PURE__ */ React14.createElement(Input3.Root, null, /* @__PURE__ */ React14.createElement(Input3.Label, {
910
+ }, /* @__PURE__ */ React15.createElement(Input3.Root, null, /* @__PURE__ */ React15.createElement(Input3.Label, {
823
911
  srOnly: true
824
- }, t("space name label")), /* @__PURE__ */ React14.createElement(Input3.TextInput, {
912
+ }, t("space name label")), /* @__PURE__ */ React15.createElement(Input3.TextInput, {
825
913
  defaultValue: space.properties.name ?? "",
826
914
  placeholder: t("unnamed space label"),
827
915
  onChange: ({ target: { value } }) => setName(value),
828
916
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
829
917
  // Currently this is not possible because Radix does not expose the popover context.
830
918
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
831
- }))), /* @__PURE__ */ React14.createElement(Popover2.Close, {
919
+ }))), /* @__PURE__ */ React15.createElement(Popover2.Close, {
832
920
  asChild: true
833
- }, /* @__PURE__ */ React14.createElement(Button5, {
921
+ }, /* @__PURE__ */ React15.createElement(Button5, {
834
922
  ref: doneButton,
835
923
  classNames: "self-stretch",
836
924
  onClick: handleDone
@@ -840,20 +928,20 @@ var PopoverRenameSpace = ({ space }) => {
840
928
  };
841
929
 
842
930
  // packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
843
- import React15 from "react";
844
- import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
845
- import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
931
+ import React16 from "react";
932
+ import { createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
933
+ import { IconButton as IconButton4, useTranslation as useTranslation15 } from "@dxos/react-ui";
846
934
  var ShareSpaceButton = ({ space }) => {
847
- const { dispatchPromise: dispatch } = useIntentDispatcher5();
848
- return /* @__PURE__ */ React15.createElement(ShareSpaceButtonImpl, {
849
- onClick: () => dispatch(createIntent5(SpaceAction.Share, {
935
+ const { dispatchPromise: dispatch } = useIntentDispatcher6();
936
+ return /* @__PURE__ */ React16.createElement(ShareSpaceButtonImpl, {
937
+ onClick: () => dispatch(createIntent6(SpaceAction.Share, {
850
938
  space
851
939
  }))
852
940
  });
853
941
  };
854
942
  var ShareSpaceButtonImpl = ({ onClick }) => {
855
- const { t } = useTranslation14(SPACE_PLUGIN);
856
- return /* @__PURE__ */ React15.createElement(IconButton3, {
943
+ const { t } = useTranslation15(SPACE_PLUGIN);
944
+ return /* @__PURE__ */ React16.createElement(IconButton4, {
857
945
  "data-testid": "spacePlugin.shareSpaceButton",
858
946
  icon: "ph--users--regular",
859
947
  label: t("share space label"),
@@ -862,28 +950,16 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
862
950
  };
863
951
 
864
952
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
865
- import React16, { useCallback as useCallback10, useEffect as useEffect4, useState as useState8 } from "react";
953
+ import React17, { useCallback as useCallback10, useEffect as useEffect4, useState as useState8 } from "react";
866
954
  import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
867
955
  import { generateName } from "@dxos/display-name";
868
956
  import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
869
957
  import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId2 } from "@dxos/react-client/echo";
870
958
  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";
959
+ import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useTranslation as useTranslation16, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
872
960
  import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
873
961
  import { ComplexMap, keyToFallback } from "@dxos/util";
874
962
 
875
- // packages/plugins/plugin-space/src/capabilities/index.ts
876
- import { lazy } from "@dxos/app-framework";
877
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-TKGLOK22.mjs"));
878
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-HLX2JRNF.mjs"));
879
- var IdentityCreated = lazy(() => import("./identity-created-7THGZ7EW.mjs"));
880
- var IntentResolver = lazy(() => import("./intent-resolver-L2TKJU4I.mjs"));
881
- var ReactRoot = lazy(() => import("./react-root-Q5MFDXZE.mjs"));
882
- var ReactSurface = lazy(() => import("./react-surface-RQQZ5BOG.mjs"));
883
- var SpaceSettings = lazy(() => import("./settings-KXYUZBLN.mjs"));
884
- var SpaceState = lazy(() => import("./state-5GH2D5U4.mjs"));
885
- var SpacesReady = lazy(() => import("./spaces-ready-MWNP3WBX.mjs"));
886
-
887
963
  // packages/plugins/plugin-space/src/hooks/usePath.ts
888
964
  import { useEffect as useEffect3, useState as useState7 } from "react";
889
965
  var usePath = (graph, id, timeout) => {
@@ -954,7 +1030,7 @@ var SpacePresence = ({ object, spaceKey }) => {
954
1030
  lastSeen
955
1031
  };
956
1032
  }).toSorted((a, b) => a.lastSeen - b.lastSeen);
957
- return /* @__PURE__ */ React16.createElement(FullPresence, {
1033
+ return /* @__PURE__ */ React17.createElement(FullPresence, {
958
1034
  members: membersForObject
959
1035
  });
960
1036
  };
@@ -964,38 +1040,38 @@ var FullPresence = (props) => {
964
1040
  if (members.length === 0) {
965
1041
  return null;
966
1042
  }
967
- return /* @__PURE__ */ React16.createElement(AvatarGroup.Root, {
1043
+ return /* @__PURE__ */ React17.createElement(AvatarGroup.Root, {
968
1044
  size,
969
1045
  classNames: "mbs-2 mie-4",
970
1046
  "data-testid": "spacePlugin.presence"
971
- }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React16.createElement(Tooltip2.Root, {
1047
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React17.createElement(Tooltip2.Root, {
972
1048
  key: member.identity.identityKey.toHex()
973
- }, /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React16.createElement(PrensenceAvatar, {
1049
+ }, /* @__PURE__ */ React17.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React17.createElement(PrensenceAvatar, {
974
1050
  identity: member.identity,
975
1051
  group: true,
976
1052
  match: member.currentlyAttended,
977
1053
  index: members.length - i,
978
1054
  onClick: () => onMemberClick?.(member)
979
- })), /* @__PURE__ */ React16.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React16.createElement(Tooltip2.Content, {
1055
+ })), /* @__PURE__ */ React17.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip2.Content, {
980
1056
  side: "bottom"
981
- }, /* @__PURE__ */ React16.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React16.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React16.createElement(Tooltip2.Root, null, /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React16.createElement(AvatarGroupItem.Root, {
1057
+ }, /* @__PURE__ */ React17.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React17.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React17.createElement(Tooltip2.Root, null, /* @__PURE__ */ React17.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React17.createElement(AvatarGroupItem.Root, {
982
1058
  status: "inactive"
983
- }, /* @__PURE__ */ React16.createElement(Avatar.Frame, {
1059
+ }, /* @__PURE__ */ React17.createElement(Avatar.Frame, {
984
1060
  style: {
985
1061
  zIndex: members.length - 4
986
1062
  }
987
- }, /* @__PURE__ */ React16.createElement(Avatar.Fallback, {
1063
+ }, /* @__PURE__ */ React17.createElement(Avatar.Fallback, {
988
1064
  text: `+${members.length - 3}`
989
- })))), /* @__PURE__ */ React16.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React16.createElement(Tooltip2.Content, {
1065
+ })))), /* @__PURE__ */ React17.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip2.Content, {
990
1066
  side: "bottom"
991
- }, /* @__PURE__ */ React16.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React16.createElement(List2, {
1067
+ }, /* @__PURE__ */ React17.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React17.createElement(List2, {
992
1068
  classNames: "max-h-56 overflow-y-auto"
993
- }, members.map((member) => /* @__PURE__ */ React16.createElement(ListItem2.Root, {
1069
+ }, members.map((member) => /* @__PURE__ */ React17.createElement(ListItem2.Root, {
994
1070
  key: member.identity.identityKey.toHex(),
995
1071
  classNames: "flex gap-2 items-center cursor-pointer mbe-2",
996
1072
  onClick: () => onMemberClick?.(member),
997
1073
  "data-testid": "identity-list-item"
998
- }, /* @__PURE__ */ React16.createElement(PrensenceAvatar, {
1074
+ }, /* @__PURE__ */ React17.createElement(PrensenceAvatar, {
999
1075
  identity: member.identity,
1000
1076
  showName: true,
1001
1077
  match: member.currentlyAttended
@@ -1005,10 +1081,10 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
1005
1081
  const Root = group ? AvatarGroupItem.Root : Avatar.Root;
1006
1082
  const status = match ? "current" : "active";
1007
1083
  const fallbackValue = keyToFallback(identity.identityKey);
1008
- return /* @__PURE__ */ React16.createElement(Root, {
1084
+ return /* @__PURE__ */ React17.createElement(Root, {
1009
1085
  status,
1010
1086
  hue: identity.profile?.data?.hue || fallbackValue.hue
1011
- }, /* @__PURE__ */ React16.createElement(Avatar.Frame, {
1087
+ }, /* @__PURE__ */ React17.createElement(Avatar.Frame, {
1012
1088
  "data-testid": "spacePlugin.presence.member",
1013
1089
  "data-status": status,
1014
1090
  ...index ? {
@@ -1017,9 +1093,9 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
1017
1093
  }
1018
1094
  } : {},
1019
1095
  onClick: () => onClick?.()
1020
- }, /* @__PURE__ */ React16.createElement(Avatar.Fallback, {
1096
+ }, /* @__PURE__ */ React17.createElement(Avatar.Fallback, {
1021
1097
  text: identity.profile?.data?.emoji || fallbackValue.emoji
1022
- })), showName && /* @__PURE__ */ React16.createElement(Avatar.Label, {
1098
+ })), showName && /* @__PURE__ */ React17.createElement(Avatar.Label, {
1023
1099
  classNames: "text-sm truncate pli-2"
1024
1100
  }, getName(identity)));
1025
1101
  };
@@ -1047,52 +1123,53 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1047
1123
  }, [
1048
1124
  viewers
1049
1125
  ]);
1050
- return /* @__PURE__ */ React16.createElement(SmallPresence, {
1126
+ return /* @__PURE__ */ React17.createElement(SmallPresence, {
1051
1127
  count: activeViewers.length,
1052
1128
  attended: isAttended,
1053
1129
  containsAttended
1054
1130
  });
1055
1131
  };
1056
1132
  var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1057
- const { t } = useTranslation15(SPACE_PLUGIN);
1058
- return /* @__PURE__ */ React16.createElement(Tooltip2.Root, null, /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1133
+ const { t } = useTranslation16(SPACE_PLUGIN);
1134
+ return /* @__PURE__ */ React17.createElement(Tooltip2.Root, null, /* @__PURE__ */ React17.createElement(Tooltip2.Trigger, {
1059
1135
  asChild: true
1060
- }, /* @__PURE__ */ React16.createElement(AttentionGlyph, {
1136
+ }, /* @__PURE__ */ React17.createElement(AttentionGlyph, {
1061
1137
  attended,
1062
1138
  containsAttended,
1063
1139
  presence: count > 1 ? "many" : count === 1 ? "one" : "none",
1064
1140
  classNames: "self-center mie-1"
1065
- })), /* @__PURE__ */ React16.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React16.createElement(Tooltip2.Content, {
1141
+ })), /* @__PURE__ */ React17.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip2.Content, {
1066
1142
  side: "bottom"
1067
- }, /* @__PURE__ */ React16.createElement("span", null, t("presence label", {
1143
+ }, /* @__PURE__ */ React17.createElement("span", null, t("presence label", {
1068
1144
  count
1069
- })), /* @__PURE__ */ React16.createElement(Tooltip2.Arrow, null))));
1145
+ })), /* @__PURE__ */ React17.createElement(Tooltip2.Arrow, null))));
1070
1146
  };
1071
1147
 
1072
1148
  // packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
1073
- import React17 from "react";
1074
- import { Input as Input4, useTranslation as useTranslation16 } from "@dxos/react-ui";
1149
+ import React18 from "react";
1150
+ import { Input as Input4, useTranslation as useTranslation17 } from "@dxos/react-ui";
1075
1151
  import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
1076
1152
  var SpacePluginSettings = ({ settings }) => {
1077
- const { t } = useTranslation16(SPACE_PLUGIN);
1078
- return /* @__PURE__ */ React17.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1153
+ const { t } = useTranslation17(SPACE_PLUGIN);
1154
+ return /* @__PURE__ */ React18.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React18.createElement(DeprecatedFormInput, {
1079
1155
  label: t("show hidden spaces label")
1080
- }, /* @__PURE__ */ React17.createElement(Input4.Switch, {
1156
+ }, /* @__PURE__ */ React18.createElement(Input4.Switch, {
1081
1157
  checked: settings.showHidden,
1082
1158
  onCheckedChange: (checked) => settings.showHidden = !!checked
1083
1159
  })));
1084
1160
  };
1085
1161
 
1086
1162
  // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx
1087
- import React18, { useCallback as useCallback11, useState as useState9 } from "react";
1163
+ import React19, { useCallback as useCallback11, useState as useState9 } from "react";
1088
1164
  import { log as log3 } from "@dxos/log";
1089
1165
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1090
1166
  import { useClient as useClient6 } from "@dxos/react-client";
1091
- import { Input as Input5, useTranslation as useTranslation17 } from "@dxos/react-ui";
1167
+ import { Input as Input5, Toolbar, useTranslation as useTranslation18 } from "@dxos/react-ui";
1092
1168
  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";
1094
- var SpaceSettingsPanel = ({ classNames, space }) => {
1095
- const { t } = useTranslation17(SPACE_PLUGIN);
1169
+ import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
1170
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx";
1171
+ var SpaceSettingsPanel = ({ space }) => {
1172
+ const { t } = useTranslation18(SPACE_PLUGIN);
1096
1173
  const client = useClient6();
1097
1174
  const edgeEnabled = Boolean(client.config.values.runtime?.client?.edgeFeatures?.echoReplicator);
1098
1175
  const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
@@ -1100,8 +1177,8 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
1100
1177
  setEdgeReplication(next);
1101
1178
  await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
1102
1179
  log3.catch(err, void 0, {
1103
- F: __dxlog_file3,
1104
- L: 35,
1180
+ F: __dxlog_file5,
1181
+ L: 36,
1105
1182
  S: void 0,
1106
1183
  C: (f, a) => f(...a)
1107
1184
  });
@@ -1110,32 +1187,48 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
1110
1187
  }, [
1111
1188
  space
1112
1189
  ]);
1113
- return /* @__PURE__ */ React18.createElement(DeprecatedFormContainer2, null, /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1190
+ return /* @__PURE__ */ React19.createElement(DeprecatedFormContainer2, null, /* @__PURE__ */ React19.createElement(DeprecatedFormInput2, {
1114
1191
  label: t("name label")
1115
- }, /* @__PURE__ */ React18.createElement(Input5.TextInput, {
1192
+ }, /* @__PURE__ */ React19.createElement(Input5.TextInput, {
1116
1193
  placeholder: t("unnamed space label"),
1117
1194
  value: space.properties.name ?? "",
1118
1195
  onChange: (event) => {
1119
1196
  space.properties.name = event.target.value;
1120
1197
  }
1121
- })), edgeEnabled && /* @__PURE__ */ React18.createElement(DeprecatedFormInput2, {
1198
+ })), /* @__PURE__ */ React19.createElement(DeprecatedFormInput2, {
1199
+ label: t("icon label")
1200
+ }, /* @__PURE__ */ React19.createElement(Toolbar.Root, null, /* @__PURE__ */ React19.createElement(IconPicker, {
1201
+ value: space.properties.icon,
1202
+ onChange: (nextIcon) => space.properties.icon = nextIcon,
1203
+ onReset: () => {
1204
+ space.properties.icon = void 0;
1205
+ }
1206
+ }))), /* @__PURE__ */ React19.createElement(DeprecatedFormInput2, {
1207
+ label: t("hue label")
1208
+ }, /* @__PURE__ */ React19.createElement(Toolbar.Root, null, /* @__PURE__ */ React19.createElement(HuePicker, {
1209
+ value: space.properties.hue,
1210
+ onChange: (nextHue) => space.properties.hue = nextHue,
1211
+ onReset: () => {
1212
+ space.properties.hue = void 0;
1213
+ }
1214
+ }))), edgeEnabled && /* @__PURE__ */ React19.createElement(DeprecatedFormInput2, {
1122
1215
  label: t("edge replication label")
1123
- }, /* @__PURE__ */ React18.createElement(Input5.Switch, {
1216
+ }, /* @__PURE__ */ React19.createElement(Input5.Switch, {
1124
1217
  checked: edgeReplication,
1125
1218
  onCheckedChange: toggleEdgeReplication
1126
1219
  })));
1127
1220
  };
1128
1221
 
1129
1222
  // 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";
1223
+ import React20, { useMemo, useState as useState10 } from "react";
1224
+ import { Surface as Surface2, useCapabilities as useCapabilities2 } from "@dxos/app-framework";
1132
1225
  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";
1226
+ import { Button as Button6, Clipboard, Dialog as Dialog4, Icon as Icon4, toLocalizedString as toLocalizedString3, useTranslation as useTranslation19 } from "@dxos/react-ui";
1134
1227
  import { Tabs } from "@dxos/react-ui-tabs";
1135
1228
  import { SpacePanel } from "@dxos/shell/react";
1136
1229
  var SPACE_SETTINGS_DIALOG = `${SPACE_PLUGIN}/SpaceSettingsDialog`;
1137
1230
  var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "members", namesCache }) => {
1138
- const { t } = useTranslation18(SPACE_PLUGIN);
1231
+ const { t } = useTranslation19(SPACE_PLUGIN);
1139
1232
  const client = useClient7();
1140
1233
  const [tabsActivePart, setTabsActivePart] = useState10("list");
1141
1234
  const [selected, setSelected] = useState10(initialTab);
@@ -1144,8 +1237,8 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1144
1237
  personal: client.spaces.default === space,
1145
1238
  namesCache
1146
1239
  });
1147
- const panels = useCapabilities(SpaceCapabilities.SettingsPanel);
1148
- const data = useMemo2(() => ({
1240
+ const panels = useCapabilities2(SpaceCapabilities.SettingsPanel);
1241
+ const data = useMemo(() => ({
1149
1242
  subject: space
1150
1243
  }), [
1151
1244
  space
@@ -1153,76 +1246,76 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1153
1246
  return (
1154
1247
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
1155
1248
  // Consider factoring it out to the tabs package.
1156
- /* @__PURE__ */ React19.createElement(Dialog4.Content, {
1249
+ /* @__PURE__ */ React20.createElement(Dialog4.Content, {
1157
1250
  classNames: "p-0 bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
1158
- }, /* @__PURE__ */ React19.createElement("div", {
1251
+ }, /* @__PURE__ */ React20.createElement("div", {
1159
1252
  role: "none",
1160
1253
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
1161
- }, /* @__PURE__ */ React19.createElement(Dialog4.Title, {
1254
+ }, /* @__PURE__ */ React20.createElement(Dialog4.Title, {
1162
1255
  onClick: () => setTabsActivePart("list"),
1163
1256
  "aria-description": t("click to return to tablist description"),
1164
1257
  classNames: "flex cursor-pointer items-center group/title"
1165
- }, /* @__PURE__ */ React19.createElement(Icon4, {
1258
+ }, /* @__PURE__ */ React20.createElement(Icon4, {
1166
1259
  icon: "ph--caret-left--regular",
1167
1260
  size: 4,
1168
1261
  classNames: [
1169
1262
  "@md:hidden",
1170
1263
  tabsActivePart === "list" && "invisible"
1171
1264
  ]
1172
- }), /* @__PURE__ */ React19.createElement("span", {
1265
+ }), /* @__PURE__ */ React20.createElement("span", {
1173
1266
  className: tabsActivePart !== "list" ? "group-hover/title:underline @md:group-hover/title:no-underline underline-offset-4 decoration-1" : ""
1174
- }, toLocalizedString3(name, t))), /* @__PURE__ */ React19.createElement(Dialog4.Close, {
1267
+ }, toLocalizedString3(name, t))), /* @__PURE__ */ React20.createElement(Dialog4.Close, {
1175
1268
  asChild: true
1176
- }, /* @__PURE__ */ React19.createElement(Button6, {
1269
+ }, /* @__PURE__ */ React20.createElement(Button6, {
1177
1270
  density: "fine",
1178
1271
  variant: "ghost",
1179
1272
  autoFocus: true
1180
- }, /* @__PURE__ */ React19.createElement(Icon4, {
1273
+ }, /* @__PURE__ */ React20.createElement(Icon4, {
1181
1274
  icon: "ph--x--regular",
1182
1275
  size: 4
1183
- })))), /* @__PURE__ */ React19.createElement(Tabs.Root, {
1276
+ })))), /* @__PURE__ */ React20.createElement(Tabs.Root, {
1184
1277
  orientation: "vertical",
1185
1278
  value: selected,
1186
1279
  onValueChange: setSelected,
1187
1280
  activePart: tabsActivePart,
1188
1281
  onActivePartChange: setTabsActivePart,
1189
1282
  classNames: "flex flex-col flex-1 mbs-2"
1190
- }, /* @__PURE__ */ React19.createElement(Tabs.Viewport, {
1283
+ }, /* @__PURE__ */ React20.createElement(Tabs.Viewport, {
1191
1284
  classNames: "flex-1 min-bs-0"
1192
- }, /* @__PURE__ */ React19.createElement("div", {
1285
+ }, /* @__PURE__ */ React20.createElement("div", {
1193
1286
  role: "none",
1194
1287
  className: "overflow-y-auto pli-3 @md:pis-2 @md:pie-0 mbe-4 border-r border-separator"
1195
- }, /* @__PURE__ */ React19.createElement(Tabs.Tablist, {
1288
+ }, /* @__PURE__ */ React20.createElement(Tabs.Tablist, {
1196
1289
  classNames: "flex flex-col max-bs-none min-is-[200px] gap-4 overflow-y-auto"
1197
- }, /* @__PURE__ */ React19.createElement("div", {
1290
+ }, /* @__PURE__ */ React20.createElement("div", {
1198
1291
  role: "none",
1199
1292
  className: "flex flex-col ml-1"
1200
- }, /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1293
+ }, /* @__PURE__ */ React20.createElement(Tabs.Tab, {
1201
1294
  value: "settings"
1202
- }, t("settings tab label")), /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1295
+ }, t("settings tab label")), /* @__PURE__ */ React20.createElement(Tabs.Tab, {
1203
1296
  value: "members",
1204
1297
  disabled: locked
1205
- }, t("members tab label")), panels.map((panel) => /* @__PURE__ */ React19.createElement(Tabs.Tab, {
1298
+ }, t("members tab label")), panels.map((panel) => /* @__PURE__ */ React20.createElement(Tabs.Tab, {
1206
1299
  key: panel.id,
1207
1300
  value: panel.id
1208
- }, toLocalizedString3(panel.label, t)))))), /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1301
+ }, toLocalizedString3(panel.label, t)))))), /* @__PURE__ */ React20.createElement(Tabs.Tabpanel, {
1209
1302
  value: "settings",
1210
1303
  classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1211
- }, /* @__PURE__ */ React19.createElement(SpaceSettingsPanel, {
1304
+ }, /* @__PURE__ */ React20.createElement(SpaceSettingsPanel, {
1212
1305
  space
1213
- })), /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1306
+ })), /* @__PURE__ */ React20.createElement(Tabs.Tabpanel, {
1214
1307
  value: "members",
1215
1308
  classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1216
- }, /* @__PURE__ */ React19.createElement(Clipboard.Provider, null, /* @__PURE__ */ React19.createElement(SpacePanel, {
1309
+ }, /* @__PURE__ */ React20.createElement(Clipboard.Provider, null, /* @__PURE__ */ React20.createElement(SpacePanel, {
1217
1310
  space,
1218
1311
  hideHeading: true,
1219
1312
  target,
1220
1313
  createInvitationUrl
1221
- }))), panels.map((panel) => /* @__PURE__ */ React19.createElement(Tabs.Tabpanel, {
1314
+ }))), panels.map((panel) => /* @__PURE__ */ React20.createElement(Tabs.Tabpanel, {
1222
1315
  key: panel.id,
1223
1316
  value: panel.id,
1224
1317
  classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
1225
- }, /* @__PURE__ */ React19.createElement(Surface2, {
1318
+ }, /* @__PURE__ */ React20.createElement(Surface2, {
1226
1319
  role: `space-settings--${panel.id}`,
1227
1320
  data
1228
1321
  }))))))
@@ -1230,12 +1323,12 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
1230
1323
  };
1231
1324
 
1232
1325
  // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1233
- import React20, { useEffect as useEffect6, useState as useState12 } from "react";
1326
+ import React21, { useEffect as useEffect6, useState as useState12 } from "react";
1234
1327
  import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1235
1328
  import { QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
1236
1329
  import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1237
1330
  import { useClient as useClient9 } from "@dxos/react-client";
1238
- import { Tooltip as Tooltip3, useTranslation as useTranslation19 } from "@dxos/react-ui";
1331
+ import { Tooltip as Tooltip3, useTranslation as useTranslation20 } from "@dxos/react-ui";
1239
1332
  import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1240
1333
 
1241
1334
  // packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts
@@ -1243,7 +1336,7 @@ import { useEffect as useEffect5, useState as useState11 } from "react";
1243
1336
  import { Context } from "@dxos/context";
1244
1337
  import { EdgeService } from "@dxos/protocols";
1245
1338
  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";
1339
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts";
1247
1340
  var createEmptyEdgeSyncState = () => ({
1248
1341
  missingOnLocal: 0,
1249
1342
  missingOnRemote: 0,
@@ -1267,7 +1360,7 @@ var useSyncState = () => {
1267
1360
  const [spaceState, setSpaceState] = useState11({});
1268
1361
  useEffect5(() => {
1269
1362
  const ctx = new Context(void 0, {
1270
- F: __dxlog_file4,
1363
+ F: __dxlog_file6,
1271
1364
  L: 48
1272
1365
  });
1273
1366
  const createSubscriptions = (spaces) => {
@@ -1302,7 +1395,7 @@ var useSpaceSyncState = (space) => {
1302
1395
  const [spaceState, setSpaceState] = useState11();
1303
1396
  useEffect5(() => {
1304
1397
  const ctx = new Context(void 0, {
1305
- F: __dxlog_file4,
1398
+ F: __dxlog_file6,
1306
1399
  L: 87
1307
1400
  });
1308
1401
  space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
@@ -1334,7 +1427,7 @@ var useEdgeStatus = () => {
1334
1427
  return status;
1335
1428
  };
1336
1429
  var InlineSyncStatus = ({ space, open }) => {
1337
- const { t } = useTranslation19(SPACE_PLUGIN);
1430
+ const { t } = useTranslation20(SPACE_PLUGIN);
1338
1431
  const id = space.id;
1339
1432
  const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1340
1433
  const isAttended = hasAttention || isAncestor || isRelated;
@@ -1347,32 +1440,32 @@ var InlineSyncStatus = ({ space, open }) => {
1347
1440
  const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
1348
1441
  const syncState = useSpaceSyncState(space);
1349
1442
  const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
1350
- return /* @__PURE__ */ React20.createElement(Tooltip3.Root, null, /* @__PURE__ */ React20.createElement(Tooltip3.Trigger, {
1443
+ return /* @__PURE__ */ React21.createElement(Tooltip3.Root, null, /* @__PURE__ */ React21.createElement(Tooltip3.Trigger, {
1351
1444
  asChild: true
1352
- }, /* @__PURE__ */ React20.createElement(AttentionGlyph2, {
1445
+ }, /* @__PURE__ */ React21.createElement(AttentionGlyph2, {
1353
1446
  syncing,
1354
1447
  attended: isAttended,
1355
1448
  containsAttended,
1356
1449
  classNames: "self-center mie-1"
1357
- })), /* @__PURE__ */ React20.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip3.Content, {
1450
+ })), /* @__PURE__ */ React21.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React21.createElement(Tooltip3.Content, {
1358
1451
  side: "bottom",
1359
1452
  classNames: "z-[70]"
1360
- }, /* @__PURE__ */ React20.createElement("span", null, t("syncing label")), /* @__PURE__ */ React20.createElement(Tooltip3.Arrow, null))));
1453
+ }, /* @__PURE__ */ React21.createElement("span", null, t("syncing label")), /* @__PURE__ */ React21.createElement(Tooltip3.Arrow, null))));
1361
1454
  };
1362
1455
 
1363
1456
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1364
- import React22, { useCallback as useCallback12, useEffect as useEffect8, useState as useState14 } from "react";
1457
+ import React23, { useCallback as useCallback12, useEffect as useEffect8, useState as useState14 } from "react";
1365
1458
  import { StatusBar } from "@dxos/plugin-status-bar";
1366
1459
  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";
1460
+ import { Icon as Icon6, Input as Input6, Popover as Popover3, useTranslation as useTranslation22 } from "@dxos/react-ui";
1368
1461
  import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
1369
1462
  import { mx as mx6 } from "@dxos/react-ui-theme";
1370
1463
 
1371
1464
  // packages/plugins/plugin-space/src/components/SyncStatus/Space.tsx
1372
- import React21, { useEffect as useEffect7, useState as useState13 } from "react";
1465
+ import React22, { useEffect as useEffect7, useState as useState13 } from "react";
1373
1466
  import { useClient as useClient10 } from "@dxos/react-client";
1374
1467
  import { useSpace } from "@dxos/react-client/echo";
1375
- import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation20 } from "@dxos/react-ui";
1468
+ import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation21 } from "@dxos/react-ui";
1376
1469
  import { mx as mx5 } from "@dxos/react-ui-theme";
1377
1470
  var SYNC_STALLED_TIMEOUT = 5e3;
1378
1471
  var styles = {
@@ -1404,7 +1497,7 @@ var useActive = (count) => {
1404
1497
  return active;
1405
1498
  };
1406
1499
  var SpaceRowContainer = ({ spaceId, state }) => {
1407
- const { t } = useTranslation20(SPACE_PLUGIN);
1500
+ const { t } = useTranslation21(SPACE_PLUGIN);
1408
1501
  const client = useClient10();
1409
1502
  const space = useSpace(spaceId);
1410
1503
  if (!space) {
@@ -1413,7 +1506,7 @@ var SpaceRowContainer = ({ spaceId, state }) => {
1413
1506
  const spaceName = toLocalizedString4(getSpaceDisplayName(space, {
1414
1507
  personal: space === client.spaces.default
1415
1508
  }), t);
1416
- return /* @__PURE__ */ React21.createElement(SpaceRow, {
1509
+ return /* @__PURE__ */ React22.createElement(SpaceRow, {
1417
1510
  spaceId,
1418
1511
  spaceName,
1419
1512
  state
@@ -1422,19 +1515,19 @@ var SpaceRowContainer = ({ spaceId, state }) => {
1422
1515
  var SpaceRow = ({ spaceId, spaceName, state: { localDocumentCount, remoteDocumentCount, missingOnLocal, missingOnRemote } }) => {
1423
1516
  const downActive = useActive(localDocumentCount);
1424
1517
  const upActive = useActive(remoteDocumentCount);
1425
- return /* @__PURE__ */ React21.createElement("div", {
1518
+ return /* @__PURE__ */ React22.createElement("div", {
1426
1519
  className: "flex items-center mx-0.5 gap-0.5 cursor-pointer",
1427
1520
  title: spaceId,
1428
1521
  onClick: () => {
1429
1522
  void navigator.clipboard.writeText(spaceId);
1430
1523
  }
1431
- }, /* @__PURE__ */ React21.createElement("span", {
1524
+ }, /* @__PURE__ */ React22.createElement("span", {
1432
1525
  className: "is-1/2 truncate"
1433
- }, spaceName), /* @__PURE__ */ React21.createElement(Icon5, {
1526
+ }, spaceName), /* @__PURE__ */ React22.createElement(Icon5, {
1434
1527
  icon: "ph--arrow-fat-line-left--regular",
1435
1528
  size: 3,
1436
1529
  classNames: mx5(downActive && "animate-[pulse_1s_infinite]")
1437
- }), /* @__PURE__ */ React21.createElement(Candle, {
1530
+ }), /* @__PURE__ */ React22.createElement(Candle, {
1438
1531
  up: {
1439
1532
  count: remoteDocumentCount,
1440
1533
  total: remoteDocumentCount + missingOnRemote
@@ -1444,44 +1537,44 @@ var SpaceRow = ({ spaceId, spaceName, state: { localDocumentCount, remoteDocumen
1444
1537
  total: localDocumentCount + missingOnLocal
1445
1538
  },
1446
1539
  title: spaceId
1447
- }), /* @__PURE__ */ React21.createElement(Icon5, {
1540
+ }), /* @__PURE__ */ React22.createElement(Icon5, {
1448
1541
  icon: "ph--arrow-fat-line-right--regular",
1449
1542
  size: 3,
1450
1543
  classNames: mx5(upActive && "animate-[pulse_1s_step-start_infinite]")
1451
1544
  }));
1452
1545
  };
1453
1546
  var Candle = ({ classNames, up, down }) => {
1454
- return /* @__PURE__ */ React21.createElement("div", {
1547
+ return /* @__PURE__ */ React22.createElement("div", {
1455
1548
  className: mx5("grid grid-cols-[1fr_2rem_1fr] w-full h-3", classNames)
1456
- }, /* @__PURE__ */ React21.createElement(Bar, {
1549
+ }, /* @__PURE__ */ React22.createElement(Bar, {
1457
1550
  classNames: "justify-end",
1458
1551
  ...up
1459
- }), /* @__PURE__ */ React21.createElement("div", {
1552
+ }), /* @__PURE__ */ React22.createElement("div", {
1460
1553
  className: "relative"
1461
- }, /* @__PURE__ */ React21.createElement("div", {
1554
+ }, /* @__PURE__ */ React22.createElement("div", {
1462
1555
  className: mx5("absolute inset-0 flex items-center justify-center text-xs", styles.barBg)
1463
- }, up.total)), /* @__PURE__ */ React21.createElement(Bar, down));
1556
+ }, up.total)), /* @__PURE__ */ React22.createElement(Bar, down));
1464
1557
  };
1465
1558
  var Bar = ({ classNames, count, total }) => {
1466
1559
  let p = count / total * 100;
1467
1560
  if (count < total) {
1468
1561
  p = Math.min(p, 95);
1469
1562
  }
1470
- return /* @__PURE__ */ React21.createElement("div", {
1563
+ return /* @__PURE__ */ React22.createElement("div", {
1471
1564
  className: mx5("relative flex w-full", styles.barBg, classNames)
1472
- }, /* @__PURE__ */ React21.createElement("div", {
1565
+ }, /* @__PURE__ */ React22.createElement("div", {
1473
1566
  className: mx5("shrink-0", styles.barFg),
1474
1567
  style: {
1475
1568
  width: `${p}%`
1476
1569
  }
1477
- }), count !== total && /* @__PURE__ */ React21.createElement("div", {
1570
+ }), count !== total && /* @__PURE__ */ React22.createElement("div", {
1478
1571
  className: "absolute top-0 bottom-0 flex items-center mx-0.5 text-black text-xs"
1479
1572
  }, count));
1480
1573
  };
1481
1574
 
1482
1575
  // packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
1483
1576
  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";
1577
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
1485
1578
  var createClientSaveTracker = (client, cb) => {
1486
1579
  const unsubscribeCallbacks = {};
1487
1580
  const state = {};
@@ -1509,7 +1602,7 @@ var createClientSaveTracker = (client, cb) => {
1509
1602
  };
1510
1603
  var createSpaceSaveTracker = (space, cb) => {
1511
1604
  const ctx = new Context2(void 0, {
1512
- F: __dxlog_file5,
1605
+ F: __dxlog_file7,
1513
1606
  L: 40
1514
1607
  });
1515
1608
  void space.waitUntilReady().then(() => {
@@ -1580,13 +1673,13 @@ var SyncStatus = () => {
1580
1673
  setSaved(state2 === "saved");
1581
1674
  });
1582
1675
  }, []);
1583
- return /* @__PURE__ */ React22.createElement(SyncStatusIndicator, {
1676
+ return /* @__PURE__ */ React23.createElement(SyncStatusIndicator, {
1584
1677
  state,
1585
1678
  saved
1586
1679
  });
1587
1680
  };
1588
1681
  var SyncStatusIndicator = ({ state, saved }) => {
1589
- const { t } = useTranslation21(SPACE_PLUGIN);
1682
+ const { t } = useTranslation22(SPACE_PLUGIN);
1590
1683
  const summary = getSyncSummary(state);
1591
1684
  const offline = Object.values(state).length === 0;
1592
1685
  const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
@@ -1613,58 +1706,58 @@ var SyncStatusIndicator = ({ state, saved }) => {
1613
1706
  needsToDownload
1614
1707
  ]);
1615
1708
  const title = t(`${status} label`);
1616
- const icon = /* @__PURE__ */ React22.createElement(Icon6, {
1709
+ const icon = /* @__PURE__ */ React23.createElement(Icon6, {
1617
1710
  icon: getIcon(status),
1618
1711
  size: 4,
1619
1712
  classNames
1620
1713
  });
1621
1714
  if (offline) {
1622
- return /* @__PURE__ */ React22.createElement(StatusBar.Item, {
1715
+ return /* @__PURE__ */ React23.createElement(StatusBar.Item, {
1623
1716
  title
1624
1717
  }, icon);
1625
1718
  } else {
1626
- return /* @__PURE__ */ React22.createElement(Popover3.Root, null, /* @__PURE__ */ React22.createElement(Popover3.Trigger, {
1719
+ return /* @__PURE__ */ React23.createElement(Popover3.Root, null, /* @__PURE__ */ React23.createElement(Popover3.Trigger, {
1627
1720
  asChild: true
1628
- }, /* @__PURE__ */ React22.createElement(StatusBar.Button, {
1721
+ }, /* @__PURE__ */ React23.createElement(StatusBar.Button, {
1629
1722
  title
1630
- }, icon)), /* @__PURE__ */ React22.createElement(Popover3.Portal, null, /* @__PURE__ */ React22.createElement(Popover3.Content, null, /* @__PURE__ */ React22.createElement(SyncStatusDetail, {
1723
+ }, icon)), /* @__PURE__ */ React23.createElement(Popover3.Portal, null, /* @__PURE__ */ React23.createElement(Popover3.Content, null, /* @__PURE__ */ React23.createElement(SyncStatusDetail, {
1631
1724
  state,
1632
1725
  summary,
1633
1726
  debug: false
1634
- }), /* @__PURE__ */ React22.createElement(Popover3.Arrow, null))));
1727
+ }), /* @__PURE__ */ React23.createElement(Popover3.Arrow, null))));
1635
1728
  }
1636
1729
  };
1637
1730
  var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1638
1731
  const [showAll, setShowAll] = useState14(false);
1639
- const { t } = useTranslation21(SPACE_PLUGIN);
1732
+ const { t } = useTranslation22(SPACE_PLUGIN);
1640
1733
  const entries = Object.entries(state).filter(([_, value]) => showAll || value.missingOnLocal + value.missingOnRemote > 0).toSorted(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
1641
1734
  const handleCheckedChange = useCallback12((state2) => setShowAll(state2), [
1642
1735
  setShowAll
1643
1736
  ]);
1644
- return /* @__PURE__ */ React22.createElement("div", {
1737
+ return /* @__PURE__ */ React23.createElement("div", {
1645
1738
  className: mx6("flex flex-col gap-3 p-2 text-xs min-w-96", classNames)
1646
- }, /* @__PURE__ */ React22.createElement("div", {
1739
+ }, /* @__PURE__ */ React23.createElement("div", {
1647
1740
  role: "none",
1648
1741
  className: "flex items-center"
1649
- }, /* @__PURE__ */ React22.createElement("h1", {
1742
+ }, /* @__PURE__ */ React23.createElement("h1", {
1650
1743
  className: "flex-1"
1651
- }, t("sync status title")), /* @__PURE__ */ React22.createElement("div", {
1744
+ }, t("sync status title")), /* @__PURE__ */ React23.createElement("div", {
1652
1745
  className: "flex items-center gap-2"
1653
- }, /* @__PURE__ */ React22.createElement(Input6.Root, null, /* @__PURE__ */ React22.createElement(Input6.Label, {
1746
+ }, /* @__PURE__ */ React23.createElement(Input6.Root, null, /* @__PURE__ */ React23.createElement(Input6.Label, {
1654
1747
  classNames: "text-xs"
1655
- }, t("show all label")), /* @__PURE__ */ React22.createElement(Input6.Checkbox, {
1748
+ }, t("show all label")), /* @__PURE__ */ React23.createElement(Input6.Checkbox, {
1656
1749
  checked: showAll,
1657
1750
  onCheckedChange: handleCheckedChange
1658
- })))), /* @__PURE__ */ React22.createElement("div", {
1751
+ })))), /* @__PURE__ */ React23.createElement("div", {
1659
1752
  className: "flex flex-col gap-2"
1660
- }, entries.length === 0 && /* @__PURE__ */ React22.createElement("div", {
1753
+ }, entries.length === 0 && /* @__PURE__ */ React23.createElement("div", {
1661
1754
  role: "none",
1662
1755
  className: "flex justify-center"
1663
- }, t("no sync status label")), entries.map(([spaceId, state2]) => /* @__PURE__ */ React22.createElement(SpaceRowContainer, {
1756
+ }, t("no sync status label")), entries.map(([spaceId, state2]) => /* @__PURE__ */ React23.createElement(SpaceRowContainer, {
1664
1757
  key: spaceId,
1665
1758
  spaceId,
1666
1759
  state: state2
1667
- }))), debug && /* @__PURE__ */ React22.createElement(SyntaxHighlighter, {
1760
+ }))), debug && /* @__PURE__ */ React23.createElement(SyntaxHighlighter, {
1668
1761
  language: "json"
1669
1762
  }, JSON.stringify(summary, null, 2)));
1670
1763
  };
@@ -1683,6 +1776,8 @@ export {
1683
1776
  JoinDialog,
1684
1777
  MenuFooter,
1685
1778
  PersistenceStatus,
1779
+ POPOVER_ADD_SPACE,
1780
+ PopoverAddSpace,
1686
1781
  POPOVER_RENAME_OBJECT,
1687
1782
  PopoverRenameObject,
1688
1783
  POPOVER_RENAME_SPACE,
@@ -1707,8 +1802,9 @@ export {
1707
1802
  IntentResolver,
1708
1803
  ReactRoot,
1709
1804
  ReactSurface,
1805
+ Schema,
1710
1806
  SpaceSettings,
1711
1807
  SpaceState,
1712
1808
  SpacesReady
1713
1809
  };
1714
- //# sourceMappingURL=chunk-N6EAOMIS.mjs.map
1810
+ //# sourceMappingURL=chunk-ONKFX23L.mjs.map