@dxos/plugin-space 0.8.2-main.f11618f → 0.8.2-main.fbd8ed0

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 (273) hide show
  1. package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs +328 -0
  2. package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs.map +7 -0
  3. package/dist/lib/browser/{app-graph-serializer-UUJH7JRN.mjs → app-graph-serializer-VRU57AEZ.mjs} +6 -6
  4. package/dist/lib/browser/app-graph-serializer-VRU57AEZ.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-4226DMDP.mjs → chunk-43UQWMD3.mjs} +298 -504
  6. package/dist/lib/browser/chunk-43UQWMD3.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-AR5R2F6B.mjs +88 -0
  8. package/dist/lib/browser/chunk-AR5R2F6B.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-CY35NLWL.mjs +296 -0
  10. package/dist/lib/browser/chunk-CY35NLWL.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-JS6ZV4GV.mjs → chunk-IQFFOAWD.mjs} +24 -38
  12. package/dist/lib/browser/chunk-IQFFOAWD.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-DIJ7LMCS.mjs → chunk-UBSVH2NQ.mjs} +3 -4
  14. package/dist/lib/browser/chunk-UBSVH2NQ.mjs.map +7 -0
  15. package/dist/lib/browser/{identity-created-NRVE4XLL.mjs → identity-created-ANRJHNMQ.mjs} +3 -3
  16. package/dist/lib/browser/identity-created-ANRJHNMQ.mjs.map +7 -0
  17. package/dist/lib/browser/index.mjs +23 -19
  18. package/dist/lib/browser/index.mjs.map +3 -3
  19. package/dist/lib/browser/{intent-resolver-NP55M7C7.mjs → intent-resolver-KRINV5QI.mjs} +15 -33
  20. package/dist/lib/browser/intent-resolver-KRINV5QI.mjs.map +7 -0
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/{react-root-XKAUZ3X2.mjs → react-root-J3SP2HVW.mjs} +5 -4
  23. package/dist/lib/browser/{react-surface-2DW2UDRX.mjs → react-surface-J7T2IMH4.mjs} +5 -12
  24. package/dist/lib/browser/react-surface-J7T2IMH4.mjs.map +7 -0
  25. package/dist/lib/browser/schema-defs-OCBY7APN.mjs +26 -0
  26. package/dist/lib/browser/schema-defs-OCBY7APN.mjs.map +7 -0
  27. package/dist/lib/browser/{schema-tools-YAXPRIXP.mjs → schema-tools-MYC4LTQD.mjs} +22 -22
  28. package/dist/lib/browser/schema-tools-MYC4LTQD.mjs.map +7 -0
  29. package/dist/lib/browser/{settings-MVT32NP6.mjs → settings-G24447B7.mjs} +2 -2
  30. package/dist/lib/browser/{spaces-ready-ERNSICUW.mjs → spaces-ready-5I3RKYTT.mjs} +16 -15
  31. package/dist/lib/browser/spaces-ready-5I3RKYTT.mjs.map +7 -0
  32. package/dist/lib/browser/{state-CYV6QCTN.mjs → state-SI4B5GHC.mjs} +2 -2
  33. package/dist/lib/browser/state-SI4B5GHC.mjs.map +7 -0
  34. package/dist/lib/browser/types/index.mjs +1 -1
  35. package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs +328 -0
  36. package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs.map +7 -0
  37. package/dist/lib/node/{app-graph-serializer-M6Z2OPA4.cjs → app-graph-serializer-VLBCR3IX.cjs} +22 -22
  38. package/dist/lib/node/app-graph-serializer-VLBCR3IX.cjs.map +7 -0
  39. package/dist/lib/node/{chunk-UOCR4G2D.cjs → chunk-5YHUQJVB.cjs} +7 -8
  40. package/dist/lib/node/chunk-5YHUQJVB.cjs.map +7 -0
  41. package/dist/lib/node/chunk-DQN4ZQDW.cjs +119 -0
  42. package/dist/lib/node/chunk-DQN4ZQDW.cjs.map +7 -0
  43. package/dist/lib/node/chunk-K6ZO4WDJ.cjs +324 -0
  44. package/dist/lib/node/chunk-K6ZO4WDJ.cjs.map +7 -0
  45. package/dist/lib/node/{chunk-ZMQO74LX.cjs → chunk-MXBE2VET.cjs} +338 -535
  46. package/dist/lib/node/chunk-MXBE2VET.cjs.map +7 -0
  47. package/dist/lib/node/{chunk-XADZLQAJ.cjs → chunk-SCATWJKX.cjs} +46 -61
  48. package/dist/lib/node/chunk-SCATWJKX.cjs.map +7 -0
  49. package/dist/lib/node/{identity-created-YDTRMOMX.cjs → identity-created-NIPYGVG3.cjs} +7 -7
  50. package/dist/lib/node/identity-created-NIPYGVG3.cjs.map +7 -0
  51. package/dist/lib/node/index.cjs +73 -70
  52. package/dist/lib/node/index.cjs.map +3 -3
  53. package/dist/lib/node/{intent-resolver-3J52ARFL.cjs → intent-resolver-MJVRY6YE.cjs} +63 -80
  54. package/dist/lib/node/intent-resolver-MJVRY6YE.cjs.map +7 -0
  55. package/dist/lib/node/meta.json +1 -1
  56. package/dist/lib/node/{react-root-XUE2J7HT.cjs → react-root-M4BZ6VXB.cjs} +9 -8
  57. package/dist/lib/node/{react-root-XUE2J7HT.cjs.map → react-root-M4BZ6VXB.cjs.map} +1 -1
  58. package/dist/lib/node/{react-surface-IWSTOZ2E.cjs → react-surface-RYKSYYKM.cjs} +42 -47
  59. package/dist/lib/node/react-surface-RYKSYYKM.cjs.map +7 -0
  60. package/dist/lib/node/{schema-PPJ5BZ3A.cjs → schema-defs-2HJLXSNK.cjs} +13 -11
  61. package/dist/lib/node/schema-defs-2HJLXSNK.cjs.map +7 -0
  62. package/dist/lib/node/{schema-tools-BLIMOZYY.cjs → schema-tools-OE3MFYYH.cjs} +24 -24
  63. package/dist/lib/node/schema-tools-OE3MFYYH.cjs.map +7 -0
  64. package/dist/lib/node/{settings-JLV7YT6Q.cjs → settings-AFWO4AWK.cjs} +6 -6
  65. package/dist/lib/node/{spaces-ready-6EBR4SM4.cjs → spaces-ready-BMPXSFHF.cjs} +24 -23
  66. package/dist/lib/node/spaces-ready-BMPXSFHF.cjs.map +7 -0
  67. package/dist/lib/node/{state-JLN7TGRR.cjs → state-L2ZSDKLS.cjs} +5 -5
  68. package/dist/lib/node/state-L2ZSDKLS.cjs.map +7 -0
  69. package/dist/lib/node/types/index.cjs +15 -15
  70. package/dist/lib/node/types/index.cjs.map +1 -1
  71. package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs +329 -0
  72. package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs.map +7 -0
  73. package/dist/lib/node-esm/{app-graph-serializer-J3B4WSXU.mjs → app-graph-serializer-GEUYYXKD.mjs} +6 -6
  74. package/dist/lib/node-esm/app-graph-serializer-GEUYYXKD.mjs.map +7 -0
  75. package/dist/lib/node-esm/{chunk-OLISVDCF.mjs → chunk-5NIBYPVF.mjs} +3 -4
  76. package/dist/lib/node-esm/chunk-5NIBYPVF.mjs.map +7 -0
  77. package/dist/lib/node-esm/chunk-CLRCW6PU.mjs +297 -0
  78. package/dist/lib/node-esm/chunk-CLRCW6PU.mjs.map +7 -0
  79. package/dist/lib/node-esm/{chunk-PQI4D4SH.mjs → chunk-FI3WV22Y.mjs} +298 -504
  80. package/dist/lib/node-esm/chunk-FI3WV22Y.mjs.map +7 -0
  81. package/dist/lib/node-esm/chunk-HNKAG5CX.mjs +90 -0
  82. package/dist/lib/node-esm/chunk-HNKAG5CX.mjs.map +7 -0
  83. package/dist/lib/node-esm/{chunk-ABTVMAG5.mjs → chunk-S2W6HS4A.mjs} +24 -38
  84. package/dist/lib/node-esm/chunk-S2W6HS4A.mjs.map +7 -0
  85. package/dist/lib/node-esm/{identity-created-EC6SVYB5.mjs → identity-created-O5X2FFWU.mjs} +3 -3
  86. package/dist/lib/node-esm/identity-created-O5X2FFWU.mjs.map +7 -0
  87. package/dist/lib/node-esm/index.mjs +23 -19
  88. package/dist/lib/node-esm/index.mjs.map +3 -3
  89. package/dist/lib/node-esm/{intent-resolver-MXQIFIRC.mjs → intent-resolver-JT6EB47M.mjs} +15 -33
  90. package/dist/lib/node-esm/intent-resolver-JT6EB47M.mjs.map +7 -0
  91. package/dist/lib/node-esm/meta.json +1 -1
  92. package/dist/lib/node-esm/{react-root-ZBCJCEFS.mjs → react-root-S2LW4FS7.mjs} +5 -4
  93. package/dist/lib/{browser/react-root-XKAUZ3X2.mjs.map → node-esm/react-root-S2LW4FS7.mjs.map} +1 -1
  94. package/dist/lib/node-esm/{react-surface-JCHDAPGM.mjs → react-surface-ZNNMO7QQ.mjs} +5 -12
  95. package/dist/lib/node-esm/react-surface-ZNNMO7QQ.mjs.map +7 -0
  96. package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs +27 -0
  97. package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs.map +7 -0
  98. package/dist/lib/node-esm/{schema-tools-IU7EX5A5.mjs → schema-tools-YTJLA3NQ.mjs} +22 -22
  99. package/dist/lib/node-esm/schema-tools-YTJLA3NQ.mjs.map +7 -0
  100. package/dist/lib/node-esm/{settings-AILIMHTE.mjs → settings-MJVSCOI4.mjs} +2 -2
  101. package/dist/lib/node-esm/{spaces-ready-5PXESKHX.mjs → spaces-ready-XKG57SL5.mjs} +16 -15
  102. package/dist/lib/node-esm/spaces-ready-XKG57SL5.mjs.map +7 -0
  103. package/dist/lib/node-esm/{state-YZPY5T5A.mjs → state-QUDYGEU6.mjs} +2 -2
  104. package/dist/lib/node-esm/state-QUDYGEU6.mjs.map +7 -0
  105. package/dist/lib/node-esm/types/index.mjs +1 -1
  106. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  108. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  109. package/dist/types/src/capabilities/app-graph-serializer.d.ts +2 -2
  110. package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -1
  111. package/dist/types/src/capabilities/identity-created.d.ts +2 -2
  112. package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
  113. package/dist/types/src/capabilities/index.d.ts +8 -184
  114. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  115. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
  116. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  117. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/schema-defs.d.ts +4 -0
  119. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
  120. package/dist/types/src/capabilities/schema-tools.d.ts +2 -2
  121. package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
  122. package/dist/types/src/capabilities/spaces-ready.d.ts +2 -2
  123. package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/state.d.ts +2 -2
  125. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  126. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  127. package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
  128. package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
  129. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  130. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  131. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  132. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  133. package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
  134. package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
  135. package/dist/types/src/components/MenuFooter.d.ts +2 -2
  136. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  137. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +2 -2
  138. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
  139. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts +2 -2
  140. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
  141. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -1
  142. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +2 -2
  143. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
  144. package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
  145. package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
  146. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
  147. package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
  148. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  149. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  150. package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
  151. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  152. package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
  153. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  154. package/dist/types/src/components/SyncStatus/save-tracker.d.ts.map +1 -1
  155. package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
  156. package/dist/types/src/components/index.d.ts +0 -1
  157. package/dist/types/src/components/index.d.ts.map +1 -1
  158. package/dist/types/src/hooks/index.d.ts +1 -0
  159. package/dist/types/src/hooks/index.d.ts.map +1 -1
  160. package/dist/types/src/hooks/useActiveSpace.d.ts +4 -0
  161. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -0
  162. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -2
  163. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
  164. package/dist/types/src/hooks/usePath.d.ts +3 -2
  165. package/dist/types/src/hooks/usePath.d.ts.map +1 -1
  166. package/dist/types/src/index.d.ts +1 -0
  167. package/dist/types/src/index.d.ts.map +1 -1
  168. package/dist/types/src/translations.d.ts +2 -263
  169. package/dist/types/src/translations.d.ts.map +1 -1
  170. package/dist/types/src/types/collection.d.ts +9 -8
  171. package/dist/types/src/types/collection.d.ts.map +1 -1
  172. package/dist/types/src/types/thread.d.ts +113 -242
  173. package/dist/types/src/types/thread.d.ts.map +1 -1
  174. package/dist/types/src/types/types.d.ts +145 -160
  175. package/dist/types/src/types/types.d.ts.map +1 -1
  176. package/dist/types/src/util.d.ts +10 -16
  177. package/dist/types/src/util.d.ts.map +1 -1
  178. package/dist/types/tsconfig.tsbuildinfo +1 -1
  179. package/package.json +51 -45
  180. package/src/SpacePlugin.tsx +8 -7
  181. package/src/capabilities/app-graph-builder.ts +376 -268
  182. package/src/capabilities/app-graph-serializer.ts +4 -4
  183. package/src/capabilities/identity-created.ts +3 -3
  184. package/src/capabilities/index.ts +2 -2
  185. package/src/capabilities/intent-resolver.ts +9 -28
  186. package/src/capabilities/react-surface.tsx +15 -23
  187. package/src/capabilities/schema-defs.ts +30 -0
  188. package/src/capabilities/schema-tool.test.ts +2 -3
  189. package/src/capabilities/schema-tools.ts +25 -25
  190. package/src/capabilities/spaces-ready.ts +14 -12
  191. package/src/capabilities/state.ts +3 -3
  192. package/src/components/AwaitingObject.tsx +1 -1
  193. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +2 -2
  194. package/src/components/CreateDialog/CreateObjectDialog.tsx +1 -1
  195. package/src/components/CreateDialog/CreateSpaceDialog.tsx +2 -3
  196. package/src/components/MembersContainer.stories.tsx +1 -5
  197. package/src/components/MenuFooter.tsx +2 -2
  198. package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +2 -2
  199. package/src/components/ObjectSettings/BaseObjectSettings.tsx +2 -2
  200. package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -4
  201. package/src/components/PersistenceStatus.tsx +11 -14
  202. package/src/components/SpacePresence.stories.tsx +1 -1
  203. package/src/components/SpacePresence.tsx +34 -43
  204. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +5 -3
  205. package/src/components/SyncStatus/InlineSyncStatus.tsx +10 -17
  206. package/src/components/index.ts +0 -1
  207. package/src/hooks/index.ts +1 -0
  208. package/src/hooks/useActiveSpace.ts +20 -0
  209. package/src/hooks/useInputSurfaceLookup.tsx +2 -2
  210. package/src/hooks/usePath.ts +9 -6
  211. package/src/index.ts +1 -0
  212. package/src/translations.ts +1 -2
  213. package/src/types/collection.ts +6 -4
  214. package/src/types/thread.ts +14 -8
  215. package/src/types/types.ts +104 -112
  216. package/src/util.tsx +36 -73
  217. package/dist/lib/browser/app-graph-builder-ZWNOWRAX.mjs +0 -369
  218. package/dist/lib/browser/app-graph-builder-ZWNOWRAX.mjs.map +0 -7
  219. package/dist/lib/browser/app-graph-serializer-UUJH7JRN.mjs.map +0 -7
  220. package/dist/lib/browser/chunk-4226DMDP.mjs.map +0 -7
  221. package/dist/lib/browser/chunk-DIJ7LMCS.mjs.map +0 -7
  222. package/dist/lib/browser/chunk-JS6ZV4GV.mjs.map +0 -7
  223. package/dist/lib/browser/chunk-O7WGQVLQ.mjs +0 -306
  224. package/dist/lib/browser/chunk-O7WGQVLQ.mjs.map +0 -7
  225. package/dist/lib/browser/identity-created-NRVE4XLL.mjs.map +0 -7
  226. package/dist/lib/browser/intent-resolver-NP55M7C7.mjs.map +0 -7
  227. package/dist/lib/browser/react-surface-2DW2UDRX.mjs.map +0 -7
  228. package/dist/lib/browser/schema-FHTA26SW.mjs +0 -24
  229. package/dist/lib/browser/schema-FHTA26SW.mjs.map +0 -7
  230. package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
  231. package/dist/lib/browser/spaces-ready-ERNSICUW.mjs.map +0 -7
  232. package/dist/lib/browser/state-CYV6QCTN.mjs.map +0 -7
  233. package/dist/lib/node/app-graph-builder-LLIV422L.cjs +0 -371
  234. package/dist/lib/node/app-graph-builder-LLIV422L.cjs.map +0 -7
  235. package/dist/lib/node/app-graph-serializer-M6Z2OPA4.cjs.map +0 -7
  236. package/dist/lib/node/chunk-EQ5BPSQ7.cjs +0 -334
  237. package/dist/lib/node/chunk-EQ5BPSQ7.cjs.map +0 -7
  238. package/dist/lib/node/chunk-UOCR4G2D.cjs.map +0 -7
  239. package/dist/lib/node/chunk-XADZLQAJ.cjs.map +0 -7
  240. package/dist/lib/node/chunk-ZMQO74LX.cjs.map +0 -7
  241. package/dist/lib/node/identity-created-YDTRMOMX.cjs.map +0 -7
  242. package/dist/lib/node/intent-resolver-3J52ARFL.cjs.map +0 -7
  243. package/dist/lib/node/react-surface-IWSTOZ2E.cjs.map +0 -7
  244. package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +0 -7
  245. package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
  246. package/dist/lib/node/spaces-ready-6EBR4SM4.cjs.map +0 -7
  247. package/dist/lib/node/state-JLN7TGRR.cjs.map +0 -7
  248. package/dist/lib/node-esm/app-graph-builder-HSGLCS76.mjs +0 -370
  249. package/dist/lib/node-esm/app-graph-builder-HSGLCS76.mjs.map +0 -7
  250. package/dist/lib/node-esm/app-graph-serializer-J3B4WSXU.mjs.map +0 -7
  251. package/dist/lib/node-esm/chunk-ABTVMAG5.mjs.map +0 -7
  252. package/dist/lib/node-esm/chunk-FJPCLEKN.mjs +0 -307
  253. package/dist/lib/node-esm/chunk-FJPCLEKN.mjs.map +0 -7
  254. package/dist/lib/node-esm/chunk-OLISVDCF.mjs.map +0 -7
  255. package/dist/lib/node-esm/chunk-PQI4D4SH.mjs.map +0 -7
  256. package/dist/lib/node-esm/identity-created-EC6SVYB5.mjs.map +0 -7
  257. package/dist/lib/node-esm/intent-resolver-MXQIFIRC.mjs.map +0 -7
  258. package/dist/lib/node-esm/react-surface-JCHDAPGM.mjs.map +0 -7
  259. package/dist/lib/node-esm/schema-OUZKVYM5.mjs +0 -25
  260. package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +0 -7
  261. package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
  262. package/dist/lib/node-esm/spaces-ready-5PXESKHX.mjs.map +0 -7
  263. package/dist/lib/node-esm/state-YZPY5T5A.mjs.map +0 -7
  264. package/dist/types/src/capabilities/schema.d.ts +0 -4
  265. package/dist/types/src/capabilities/schema.d.ts.map +0 -1
  266. package/dist/types/src/components/PopoverAddSpace.d.ts +0 -4
  267. package/dist/types/src/components/PopoverAddSpace.d.ts.map +0 -1
  268. package/src/capabilities/schema.ts +0 -27
  269. package/src/components/PopoverAddSpace.tsx +0 -52
  270. /package/dist/lib/{node-esm/react-root-ZBCJCEFS.mjs.map → browser/react-root-J3SP2HVW.mjs.map} +0 -0
  271. /package/dist/lib/browser/{settings-MVT32NP6.mjs.map → settings-G24447B7.mjs.map} +0 -0
  272. /package/dist/lib/node/{settings-JLV7YT6Q.cjs.map → settings-AFWO4AWK.cjs.map} +0 -0
  273. /package/dist/lib/node-esm/{settings-AILIMHTE.mjs.map → settings-MJVSCOI4.mjs.map} +0 -0
@@ -1,16 +1,20 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ useInputSurfaceLookup,
4
+ usePath
5
+ } from "./chunk-HNKAG5CX.mjs";
2
6
  import {
3
7
  SpaceCapabilities
4
8
  } from "./chunk-PIYAWT5N.mjs";
5
9
  import {
6
10
  COMPOSER_SPACE_LOCK,
7
11
  getSpaceDisplayName
8
- } from "./chunk-ABTVMAG5.mjs";
12
+ } from "./chunk-S2W6HS4A.mjs";
9
13
  import {
10
14
  CollectionType,
11
15
  SpaceAction,
12
16
  SpaceForm
13
- } from "./chunk-FJPCLEKN.mjs";
17
+ } from "./chunk-CLRCW6PU.mjs";
14
18
  import {
15
19
  SPACE_PLUGIN,
16
20
  meta
@@ -34,7 +38,7 @@ var AwaitingObject = ({ id }) => {
34
38
  const { dispatchPromise: dispatch } = useIntentDispatcher();
35
39
  const layout = useLayout();
36
40
  const client = useClient();
37
- const objects = useQuery(client.spaces, Filter.all());
41
+ const objects = useQuery(client.spaces, Filter.everything());
38
42
  useEffect(() => {
39
43
  if (!id) {
40
44
  return;
@@ -111,15 +115,15 @@ var AwaitingObject = ({ id }) => {
111
115
 
112
116
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
113
117
  import { pipe } from "effect";
114
- import React4, { useCallback as useCallback4, useRef } from "react";
115
- import { Capabilities, chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager as usePluginManager2 } from "@dxos/app-framework";
118
+ import React3, { useCallback as useCallback3, useRef } from "react";
119
+ import { Capabilities, chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework";
116
120
  import { invariant as invariant2 } from "@dxos/invariant";
117
121
  import { useClient as useClient2 } from "@dxos/react-client";
118
122
  import { getSpace, isLiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
119
123
  import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation3 } from "@dxos/react-ui";
120
124
 
121
125
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
122
- import React3, { useCallback as useCallback3, useState as useState3 } from "react";
126
+ import React2, { useCallback as useCallback2, useState as useState2 } from "react";
123
127
  import { getTypeAnnotation } from "@dxos/echo-schema";
124
128
  import { invariant } from "@dxos/invariant";
125
129
  import { Icon, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
@@ -127,77 +131,11 @@ import { Form } from "@dxos/react-ui-form";
127
131
  import { SearchList } from "@dxos/react-ui-searchlist";
128
132
  import { mx as mx2 } from "@dxos/react-ui-theme";
129
133
  import { isNonNullable } from "@dxos/util";
130
-
131
- // packages/plugins/plugin-space/src/hooks/useInputSurfaceLookup.tsx
132
- import React2, { useCallback as useCallback2 } from "react";
133
- import { usePluginManager, isSurfaceAvailable, Surface } from "@dxos/app-framework";
134
- var useInputSurfaceLookup = (baseData) => {
135
- const pluginManager = usePluginManager();
136
- return useCallback2(({ prop, schema, inputProps }) => {
137
- const composedData = {
138
- prop,
139
- schema,
140
- ...baseData
141
- };
142
- if (!isSurfaceAvailable(pluginManager.context, {
143
- role: "form-input",
144
- data: composedData
145
- })) {
146
- return void 0;
147
- }
148
- return /* @__PURE__ */ React2.createElement(Surface, {
149
- role: "form-input",
150
- data: composedData,
151
- ...inputProps
152
- });
153
- }, [
154
- pluginManager,
155
- baseData
156
- ]);
157
- };
158
-
159
- // packages/plugins/plugin-space/src/hooks/usePath.ts
160
- import { useEffect as useEffect2, useState as useState2 } from "react";
161
- var usePath = (graph, id, timeout) => {
162
- const [pathState, setPathState] = useState2(id ? graph.getPath({
163
- target: id
164
- }) : void 0);
165
- useEffect2(() => {
166
- if (!id && pathState) {
167
- setPathState(void 0);
168
- }
169
- if (pathState?.at(-1) === id || !id) {
170
- return;
171
- }
172
- const frame = requestAnimationFrame(async () => {
173
- try {
174
- const path = await graph.waitForPath({
175
- target: id
176
- }, {
177
- timeout
178
- });
179
- if (path) {
180
- setPathState(path);
181
- }
182
- } catch {
183
- }
184
- });
185
- return () => cancelAnimationFrame(frame);
186
- }, [
187
- graph,
188
- id,
189
- timeout,
190
- pathState
191
- ]);
192
- return pathState;
193
- };
194
-
195
- // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
196
134
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx";
197
135
  var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
198
136
  const { t } = useTranslation2(SPACE_PLUGIN);
199
- const [typename, setTypename] = useState3(initialTypename);
200
- const [target, setTarget] = useState3(initialTarget);
137
+ const [typename, setTypename] = useState2(initialTypename);
138
+ const [target, setTarget] = useState2(initialTarget);
201
139
  const form = forms.find((form2) => getTypeAnnotation(form2.objectSchema)?.typename === typename);
202
140
  const options = forms.map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
203
141
  const nameA = t("typename label", {
@@ -210,7 +148,7 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
210
148
  });
211
149
  return nameA.localeCompare(nameB);
212
150
  });
213
- const handleCreateObject = useCallback3(async (props) => {
151
+ const handleCreateObject = useCallback2(async (props) => {
214
152
  if (!form || !target) {
215
153
  return;
216
154
  }
@@ -224,7 +162,7 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
224
162
  form,
225
163
  target
226
164
  ]);
227
- const handleSetTypename = useCallback3(async (typename2) => {
165
+ const handleSetTypename = useCallback2(async (typename2) => {
228
166
  invariant(target, "target is required", {
229
167
  F: __dxlog_file,
230
168
  L: 72,
@@ -251,18 +189,18 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
251
189
  const inputSurfaceLookup = useInputSurfaceLookup({
252
190
  target
253
191
  });
254
- return /* @__PURE__ */ React3.createElement("div", {
192
+ return /* @__PURE__ */ React2.createElement("div", {
255
193
  role: "form",
256
194
  className: mx2("flex flex-col gap-2", classNames)
257
- }, !form ? /* @__PURE__ */ React3.createElement(SelectSchema, {
195
+ }, !form ? /* @__PURE__ */ React2.createElement(SelectSchema, {
258
196
  options,
259
197
  resolve,
260
198
  onChange: handleSetTypename
261
- }) : !target ? /* @__PURE__ */ React3.createElement(SelectSpace, {
199
+ }) : !target ? /* @__PURE__ */ React2.createElement(SelectSpace, {
262
200
  spaces,
263
201
  defaultSpaceId,
264
202
  onChange: setTarget
265
- }) : form.formSchema ? /* @__PURE__ */ React3.createElement(Form, {
203
+ }) : form.formSchema ? /* @__PURE__ */ React2.createElement(Form, {
266
204
  classNames: "!p-0",
267
205
  autoFocus: true,
268
206
  values: {
@@ -276,15 +214,15 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
276
214
  };
277
215
  var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
278
216
  const { t } = useTranslation2(SPACE_PLUGIN);
279
- return /* @__PURE__ */ React3.createElement(SearchList.Root, {
217
+ return /* @__PURE__ */ React2.createElement(SearchList.Root, {
280
218
  label: t("space input label"),
281
219
  classNames: "flex flex-col grow overflow-hidden"
282
- }, /* @__PURE__ */ React3.createElement(SearchList.Input, {
220
+ }, /* @__PURE__ */ React2.createElement(SearchList.Input, {
283
221
  autoFocus: true,
284
222
  "data-testid": "create-object-form.space-input",
285
223
  placeholder: t("space input placeholder"),
286
224
  classNames: "px-1 my-2"
287
- }), /* @__PURE__ */ React3.createElement(SearchList.Content, {
225
+ }), /* @__PURE__ */ React2.createElement(SearchList.Content, {
288
226
  classNames: "max-bs-[24rem] overflow-auto"
289
227
  }, spaces.sort((a, b) => {
290
228
  const aName = toLocalizedString(getSpaceDisplayName(a, {
@@ -294,14 +232,14 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
294
232
  personal: b.id === defaultSpaceId
295
233
  }), t);
296
234
  return aName.localeCompare(bName);
297
- }).map((space) => /* @__PURE__ */ React3.createElement(SearchList.Item, {
235
+ }).map((space) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
298
236
  key: space.id,
299
237
  value: toLocalizedString(getSpaceDisplayName(space, {
300
238
  personal: space.id === defaultSpaceId
301
239
  }), t),
302
240
  onSelect: () => onChange(space),
303
241
  classNames: "flex items-center gap-2"
304
- }, /* @__PURE__ */ React3.createElement("span", {
242
+ }, /* @__PURE__ */ React2.createElement("span", {
305
243
  className: "grow truncate"
306
244
  }, toLocalizedString(getSpaceDisplayName(space, {
307
245
  personal: space.id === defaultSpaceId
@@ -309,17 +247,17 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
309
247
  };
310
248
  var SelectSchema = ({ options, resolve, onChange }) => {
311
249
  const { t } = useTranslation2(SPACE_PLUGIN);
312
- return /* @__PURE__ */ React3.createElement(SearchList.Root, {
250
+ return /* @__PURE__ */ React2.createElement(SearchList.Root, {
313
251
  label: t("schema input label"),
314
252
  classNames: "flex flex-col grow overflow-hidden"
315
- }, /* @__PURE__ */ React3.createElement(SearchList.Input, {
253
+ }, /* @__PURE__ */ React2.createElement(SearchList.Input, {
316
254
  autoFocus: true,
317
255
  "data-testid": "create-object-form.schema-input",
318
256
  placeholder: t("schema input placeholder"),
319
257
  classNames: "px-1 my-2"
320
- }), /* @__PURE__ */ React3.createElement(SearchList.Content, {
258
+ }), /* @__PURE__ */ React2.createElement(SearchList.Content, {
321
259
  classNames: "max-bs-[24rem] overflow-auto"
322
- }, options.map((option) => /* @__PURE__ */ React3.createElement(SearchList.Item, {
260
+ }, options.map((option) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
323
261
  key: option.typename,
324
262
  value: t("typename label", {
325
263
  ns: option.typename,
@@ -327,9 +265,9 @@ var SelectSchema = ({ options, resolve, onChange }) => {
327
265
  }),
328
266
  onSelect: () => onChange(option.typename),
329
267
  classNames: "flex items-center gap-2"
330
- }, /* @__PURE__ */ React3.createElement("span", {
268
+ }, /* @__PURE__ */ React2.createElement("span", {
331
269
  className: "flex gap-2 items-center grow truncate"
332
- }, /* @__PURE__ */ React3.createElement(Icon, {
270
+ }, /* @__PURE__ */ React2.createElement(Icon, {
333
271
  icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
334
272
  size: 5
335
273
  }), t("typename label", {
@@ -340,33 +278,33 @@ var SelectSchema = ({ options, resolve, onChange }) => {
340
278
 
341
279
  // packages/plugins/plugin-space/src/capabilities/index.ts
342
280
  import { lazy } from "@dxos/app-framework";
343
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-HSGLCS76.mjs"));
344
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-J3B4WSXU.mjs"));
345
- var IdentityCreated = lazy(() => import("./identity-created-EC6SVYB5.mjs"));
346
- var IntentResolver = lazy(() => import("./intent-resolver-MXQIFIRC.mjs"));
347
- var ReactRoot = lazy(() => import("./react-root-ZBCJCEFS.mjs"));
348
- var ReactSurface = lazy(() => import("./react-surface-JCHDAPGM.mjs"));
349
- var Schema = lazy(() => import("./schema-OUZKVYM5.mjs"));
350
- var Tools = lazy(() => import("./schema-tools-IU7EX5A5.mjs"));
351
- var SpaceSettings = lazy(() => import("./settings-AILIMHTE.mjs"));
352
- var SpaceState = lazy(() => import("./state-YZPY5T5A.mjs"));
353
- var SpacesReady = lazy(() => import("./spaces-ready-5PXESKHX.mjs"));
281
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-WVCQZ324.mjs"));
282
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-GEUYYXKD.mjs"));
283
+ var IdentityCreated = lazy(() => import("./identity-created-O5X2FFWU.mjs"));
284
+ var IntentResolver = lazy(() => import("./intent-resolver-JT6EB47M.mjs"));
285
+ var ReactRoot = lazy(() => import("./react-root-S2LW4FS7.mjs"));
286
+ var ReactSurface = lazy(() => import("./react-surface-ZNNMO7QQ.mjs"));
287
+ var SchemaDefs = lazy(() => import("./schema-defs-B74N3GQ5.mjs"));
288
+ var SchemaTools = lazy(() => import("./schema-tools-YTJLA3NQ.mjs"));
289
+ var SpaceSettings = lazy(() => import("./settings-MJVSCOI4.mjs"));
290
+ var SpaceState = lazy(() => import("./state-QUDYGEU6.mjs"));
291
+ var SpacesReady = lazy(() => import("./spaces-ready-XKG57SL5.mjs"));
354
292
 
355
293
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
356
294
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
357
295
  var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
358
296
  var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavigate }) => {
359
297
  const closeRef = useRef(null);
360
- const manager = usePluginManager2();
298
+ const manager = usePluginManager();
361
299
  const { t } = useTranslation3(SPACE_PLUGIN);
362
300
  const client = useClient2();
363
301
  const spaces = useSpaces();
364
302
  const { dispatchPromise: dispatch } = useIntentDispatcher2();
365
303
  const forms = useCapabilities(SpaceCapabilities.ObjectForm);
366
- const resolve = useCallback4((typename2) => manager.context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
304
+ const resolve = useCallback3((typename2) => manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
367
305
  manager
368
306
  ]);
369
- const handleCreateObject = useCallback4(async ({ form, target: target2, data = {} }) => {
307
+ const handleCreateObject = useCallback3(async ({ form, target: target2, data = {} }) => {
370
308
  if (!target2) {
371
309
  return;
372
310
  }
@@ -407,22 +345,22 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
407
345
  return (
408
346
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
409
347
  // Consider factoring it out to the tabs package.
410
- /* @__PURE__ */ React4.createElement(Dialog.Content, {
348
+ /* @__PURE__ */ React3.createElement(Dialog.Content, {
411
349
  classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
412
- }, /* @__PURE__ */ React4.createElement("div", {
350
+ }, /* @__PURE__ */ React3.createElement("div", {
413
351
  role: "none",
414
352
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
415
- }, /* @__PURE__ */ React4.createElement(Dialog.Title, null, t("create object dialog title")), /* @__PURE__ */ React4.createElement(Dialog.Close, {
353
+ }, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("create object dialog title")), /* @__PURE__ */ React3.createElement(Dialog.Close, {
416
354
  asChild: true
417
- }, /* @__PURE__ */ React4.createElement(Button2, {
355
+ }, /* @__PURE__ */ React3.createElement(Button2, {
418
356
  ref: closeRef,
419
357
  density: "fine",
420
358
  variant: "ghost",
421
359
  autoFocus: true
422
- }, /* @__PURE__ */ React4.createElement(Icon2, {
360
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
423
361
  icon: "ph--x--regular",
424
362
  size: 4
425
- })))), /* @__PURE__ */ React4.createElement(CreateObjectPanel, {
363
+ })))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
426
364
  classNames: "p-4",
427
365
  forms,
428
366
  spaces,
@@ -438,7 +376,7 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
438
376
 
439
377
  // packages/plugins/plugin-space/src/components/CreateDialog/CreateSpaceDialog.tsx
440
378
  import { Effect } from "effect";
441
- import React5, { useCallback as useCallback5, useRef as useRef2 } from "react";
379
+ import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
442
380
  import { createIntent as createIntent3, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
443
381
  import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as useTranslation4 } from "@dxos/react-ui";
444
382
  import { Form as Form2 } from "@dxos/react-ui-form";
@@ -451,7 +389,7 @@ var CreateSpaceDialog = () => {
451
389
  const { t } = useTranslation4(SPACE_PLUGIN);
452
390
  const { dispatch } = useIntentDispatcher3();
453
391
  const inputSurfaceLookup = useInputSurfaceLookup();
454
- const handleCreateSpace = useCallback5(async (data) => {
392
+ const handleCreateSpace = useCallback4(async (data) => {
455
393
  const program = Effect.gen(function* () {
456
394
  const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
457
395
  yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
@@ -469,24 +407,24 @@ var CreateSpaceDialog = () => {
469
407
  return (
470
408
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
471
409
  // Consider factoring it out to the tabs package.
472
- /* @__PURE__ */ React5.createElement(Dialog2.Content, {
410
+ /* @__PURE__ */ React4.createElement(Dialog2.Content, {
473
411
  classNames: "p-0 bs-content min-bs-[16rem] max-bs-full md:max-is-[32rem] overflow-hidden"
474
- }, /* @__PURE__ */ React5.createElement("div", {
412
+ }, /* @__PURE__ */ React4.createElement("div", {
475
413
  role: "none",
476
414
  className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
477
- }, /* @__PURE__ */ React5.createElement(Dialog2.Title, null, t("create space dialog title")), /* @__PURE__ */ React5.createElement(Dialog2.Close, {
415
+ }, /* @__PURE__ */ React4.createElement(Dialog2.Title, null, t("create space dialog title")), /* @__PURE__ */ React4.createElement(Dialog2.Close, {
478
416
  asChild: true
479
- }, /* @__PURE__ */ React5.createElement(Button3, {
417
+ }, /* @__PURE__ */ React4.createElement(Button3, {
480
418
  ref: closeRef,
481
419
  density: "fine",
482
420
  variant: "ghost",
483
421
  autoFocus: true
484
- }, /* @__PURE__ */ React5.createElement(Icon3, {
422
+ }, /* @__PURE__ */ React4.createElement(Icon3, {
485
423
  icon: "ph--x--regular",
486
424
  size: 4
487
- })))), /* @__PURE__ */ React5.createElement("div", {
425
+ })))), /* @__PURE__ */ React4.createElement("div", {
488
426
  className: "p-4"
489
- }, /* @__PURE__ */ React5.createElement(Form2, {
427
+ }, /* @__PURE__ */ React4.createElement(Form2, {
490
428
  testId: "create-space-form",
491
429
  classNames: "!p-0",
492
430
  autoFocus: true,
@@ -499,35 +437,35 @@ var CreateSpaceDialog = () => {
499
437
  };
500
438
 
501
439
  // packages/plugins/plugin-space/src/components/CollectionMain.tsx
502
- import React6 from "react";
440
+ import React5 from "react";
503
441
  import { useTranslation as useTranslation5 } from "@dxos/react-ui";
504
442
  import { baseSurface, descriptionMessage, mx as mx3 } from "@dxos/react-ui-theme";
505
443
  var CollectionMain = ({ collection }) => {
506
444
  const { t } = useTranslation5(SPACE_PLUGIN);
507
- return /* @__PURE__ */ React6.createElement("div", {
445
+ return /* @__PURE__ */ React5.createElement("div", {
508
446
  role: "none",
509
447
  className: mx3(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
510
448
  "data-testid": "composer.firstRunMessage"
511
- }, /* @__PURE__ */ React6.createElement("p", {
449
+ }, /* @__PURE__ */ React5.createElement("p", {
512
450
  role: "alert",
513
451
  className: mx3(descriptionMessage, "rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
514
452
  }, collection.name ?? t("unnamed collection label")));
515
453
  };
516
454
 
517
455
  // packages/plugins/plugin-space/src/components/CollectionSection.tsx
518
- import React7 from "react";
456
+ import React6 from "react";
519
457
  import { useTranslation as useTranslation6 } from "@dxos/react-ui";
520
458
  var CollectionSection = ({ collection }) => {
521
459
  const { t } = useTranslation6(SPACE_PLUGIN);
522
- return /* @__PURE__ */ React7.createElement("div", {
460
+ return /* @__PURE__ */ React6.createElement("div", {
523
461
  className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
524
- }, /* @__PURE__ */ React7.createElement("span", {
462
+ }, /* @__PURE__ */ React6.createElement("span", {
525
463
  className: "truncate"
526
464
  }, collection.name ?? t("unnamed collection label")));
527
465
  };
528
466
 
529
467
  // packages/plugins/plugin-space/src/components/JoinDialog.tsx
530
- import React8, { useCallback as useCallback6 } from "react";
468
+ import React7, { useCallback as useCallback5 } from "react";
531
469
  import { createIntent as createIntent4, LayoutAction as LayoutAction4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
532
470
  import { Trigger } from "@dxos/async";
533
471
  import { ObservabilityAction } from "@dxos/plugin-observability/types";
@@ -540,7 +478,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
540
478
  const client = useClient3();
541
479
  const { graph } = useAppGraph();
542
480
  const { t } = useTranslation7(SPACE_PLUGIN);
543
- const handleDone = useCallback6(async (result) => {
481
+ const handleDone = useCallback5(async (result) => {
544
482
  const spaceKey = result?.spaceKey;
545
483
  if (!spaceKey) {
546
484
  return;
@@ -620,16 +558,16 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
620
558
  client,
621
559
  graph
622
560
  ]);
623
- return /* @__PURE__ */ React8.createElement(Dialog3.Content, null, /* @__PURE__ */ React8.createElement(Dialog3.Title, {
561
+ return /* @__PURE__ */ React7.createElement(Dialog3.Content, null, /* @__PURE__ */ React7.createElement(Dialog3.Title, {
624
562
  classNames: "sr-only"
625
563
  }, t("join space label", {
626
564
  ns: "os"
627
- })), /* @__PURE__ */ React8.createElement(JoinPanel, {
565
+ })), /* @__PURE__ */ React7.createElement(JoinPanel, {
628
566
  ...props,
629
- exitActionParent: /* @__PURE__ */ React8.createElement(Dialog3.Close, {
567
+ exitActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
630
568
  asChild: true
631
569
  }),
632
- doneActionParent: /* @__PURE__ */ React8.createElement(Dialog3.Close, {
570
+ doneActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
633
571
  asChild: true
634
572
  }),
635
573
  onDone: handleDone
@@ -638,7 +576,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
638
576
 
639
577
  // packages/plugins/plugin-space/src/components/MembersContainer.tsx
640
578
  import { Check, X } from "@phosphor-icons/react";
641
- import React9, { useCallback as useCallback7, useMemo, useState as useState4 } from "react";
579
+ import React8, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
642
580
  import { QR } from "react-qr-rounded";
643
581
  import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
644
582
  import { log } from "@dxos/log";
@@ -676,14 +614,14 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
676
614
  const visibleInvitations = invitations?.filter((invitation) => ![
677
615
  Invitation.State.CANCELLED
678
616
  ].includes(invitation.get().state));
679
- const [activeAction, setInternalActiveAction] = useState4(localStorage.getItem(activeActionKey) ?? "inviteMany");
617
+ const [activeAction, setInternalActiveAction] = useState3(localStorage.getItem(activeActionKey) ?? "inviteMany");
680
618
  const setActiveAction = (nextAction) => {
681
619
  setInternalActiveAction(nextAction);
682
620
  localStorage.setItem(activeActionKey, nextAction);
683
621
  };
684
622
  const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
685
623
  const locked = space.properties[COMPOSER_SPACE_LOCK];
686
- const handleChangeLocked = useCallback7(() => {
624
+ const handleChangeLocked = useCallback6(() => {
687
625
  space.properties[COMPOSER_SPACE_LOCK] = !locked;
688
626
  }, [
689
627
  locked,
@@ -697,7 +635,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
697
635
  description: t("invite one description", {
698
636
  ns: "os"
699
637
  }),
700
- icon: () => /* @__PURE__ */ React9.createElement(Icon4, {
638
+ icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
701
639
  icon: "ph--user-plus--regular",
702
640
  size: 5
703
641
  }),
@@ -722,7 +660,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
722
660
  description: t("invite many description", {
723
661
  ns: "os"
724
662
  }),
725
- icon: () => /* @__PURE__ */ React9.createElement(Icon4, {
663
+ icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
726
664
  icon: "ph--users-three--regular",
727
665
  size: 5
728
666
  }),
@@ -745,51 +683,51 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
745
683
  space,
746
684
  target
747
685
  ]);
748
- const [selectedInvitation, setSelectedInvitation] = useState4(null);
686
+ const [selectedInvitation, setSelectedInvitation] = useState3(null);
749
687
  const handleSend = (event) => {
750
688
  setSelectedInvitation(event.invitation);
751
689
  };
752
690
  const handleBack = () => {
753
691
  setSelectedInvitation(null);
754
692
  };
755
- return /* @__PURE__ */ React9.createElement(Clipboard.Provider, null, /* @__PURE__ */ React9.createElement(StackItem.Content, {
693
+ return /* @__PURE__ */ React8.createElement(Clipboard.Provider, null, /* @__PURE__ */ React8.createElement(StackItem.Content, {
756
694
  classNames: "block overflow-y-auto"
757
- }, /* @__PURE__ */ React9.createElement(ControlPage, null, /* @__PURE__ */ React9.createElement(ControlSection, {
695
+ }, /* @__PURE__ */ React8.createElement(ControlPage, null, /* @__PURE__ */ React8.createElement(ControlSection, {
758
696
  title: t("members verbose label"),
759
697
  description: t("members description")
760
- }, /* @__PURE__ */ React9.createElement(ControlFrame, null, /* @__PURE__ */ React9.createElement(ControlFrameItem, {
698
+ }, /* @__PURE__ */ React8.createElement(ControlFrame, null, /* @__PURE__ */ React8.createElement(ControlFrameItem, {
761
699
  title: t("members label")
762
- }, /* @__PURE__ */ React9.createElement(SpaceMemberList, {
700
+ }, /* @__PURE__ */ React8.createElement(SpaceMemberList, {
763
701
  spaceKey: space.key,
764
702
  includeSelf: true
765
- })), locked && /* @__PURE__ */ React9.createElement(ControlFrameItem, {
703
+ })), locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
766
704
  title: t("invitations label")
767
- }, /* @__PURE__ */ React9.createElement("p", {
705
+ }, /* @__PURE__ */ React8.createElement("p", {
768
706
  className: "text-description mbe-2"
769
- }, t("locked space description"))), !locked && /* @__PURE__ */ React9.createElement(ControlFrameItem, {
707
+ }, t("locked space description"))), !locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
770
708
  title: t("invitations label")
771
- }, selectedInvitation && /* @__PURE__ */ React9.createElement(InvitationSection, {
709
+ }, selectedInvitation && /* @__PURE__ */ React8.createElement(InvitationSection, {
772
710
  ...selectedInvitation,
773
711
  onBack: handleBack
774
- }), !selectedInvitation && /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("p", {
712
+ }), !selectedInvitation && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
775
713
  className: "text-description mbe-2"
776
- }, t("space invitation description")), /* @__PURE__ */ React9.createElement(InvitationList, {
714
+ }, t("space invitation description")), /* @__PURE__ */ React8.createElement(InvitationList, {
777
715
  className: "mb-2",
778
716
  send: handleSend,
779
717
  invitations: visibleInvitations ?? [],
780
718
  onClickRemove: (invitation) => invitation.cancel(),
781
719
  createInvitationUrl
782
- }), /* @__PURE__ */ React9.createElement(BifurcatedAction, {
720
+ }), /* @__PURE__ */ React8.createElement(BifurcatedAction, {
783
721
  actions: inviteActions,
784
722
  activeAction,
785
723
  onChangeActiveAction: setActiveAction,
786
724
  "data-testid": "membersContainer.createInvitation"
787
- })))), /* @__PURE__ */ React9.createElement("div", {
725
+ })))), /* @__PURE__ */ React8.createElement("div", {
788
726
  className: "justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
789
- }, /* @__PURE__ */ React9.createElement(ControlItemInput, {
727
+ }, /* @__PURE__ */ React8.createElement(ControlItemInput, {
790
728
  title: t("space locked label"),
791
729
  description: t("space locked description")
792
- }, /* @__PURE__ */ React9.createElement(Input.Switch, {
730
+ }, /* @__PURE__ */ React8.createElement(Input.Switch, {
793
731
  checked: locked,
794
732
  onCheckedChange: handleChangeLocked,
795
733
  classNames: "justify-self-end"
@@ -797,23 +735,23 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
797
735
  };
798
736
  var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
799
737
  const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
800
- return /* @__PURE__ */ React9.createElement(Viewport.Root, {
738
+ return /* @__PURE__ */ React8.createElement(Viewport.Root, {
801
739
  activeView
802
- }, /* @__PURE__ */ React9.createElement(Viewport.Views, null, /* @__PURE__ */ React9.createElement(Viewport.View, {
740
+ }, /* @__PURE__ */ React8.createElement(Viewport.Views, null, /* @__PURE__ */ React8.createElement(Viewport.View, {
803
741
  id: "init"
804
- }), /* @__PURE__ */ React9.createElement(Viewport.View, {
742
+ }), /* @__PURE__ */ React8.createElement(Viewport.View, {
805
743
  id: "complete"
806
- }, /* @__PURE__ */ React9.createElement(InvitationComplete, {
744
+ }, /* @__PURE__ */ React8.createElement(InvitationComplete, {
807
745
  statusValue: state
808
- })), /* @__PURE__ */ React9.createElement(Viewport.View, {
746
+ })), /* @__PURE__ */ React8.createElement(Viewport.View, {
809
747
  id: "auth-code"
810
- }, /* @__PURE__ */ React9.createElement(InvitationAuthCode, {
748
+ }, /* @__PURE__ */ React8.createElement(InvitationAuthCode, {
811
749
  id: invitationId,
812
750
  code: authCode ?? "never",
813
751
  onCancel: onBack
814
- })), /* @__PURE__ */ React9.createElement(Viewport.View, {
752
+ })), /* @__PURE__ */ React8.createElement(Viewport.View, {
815
753
  id: "qr-code"
816
- }, /* @__PURE__ */ React9.createElement(InvitationQR, {
754
+ }, /* @__PURE__ */ React8.createElement(InvitationQR, {
817
755
  id: invitationId,
818
756
  url,
819
757
  onCancel: onBack
@@ -823,31 +761,31 @@ var InvitationQR = ({ id, url, onCancel }) => {
823
761
  const { t } = useTranslation8("os");
824
762
  const qrLabel = useId("members-container__qr-code");
825
763
  const emoji = hexToEmoji(id);
826
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("p", {
764
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
827
765
  className: "text-description"
828
766
  }, t("qr code description", {
829
767
  ns: SPACE_PLUGIN
830
- })), /* @__PURE__ */ React9.createElement("div", {
768
+ })), /* @__PURE__ */ React8.createElement("div", {
831
769
  role: "group",
832
770
  className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
833
- }, /* @__PURE__ */ React9.createElement("div", {
771
+ }, /* @__PURE__ */ React8.createElement("div", {
834
772
  role: "none",
835
773
  className: "is-full aspect-square relative text-description"
836
- }, /* @__PURE__ */ React9.createElement(QR, {
774
+ }, /* @__PURE__ */ React8.createElement(QR, {
837
775
  rounding: 100,
838
776
  backgroundColor: "transparent",
839
777
  color: "currentColor",
840
778
  "aria-labelledby": qrLabel,
841
779
  errorCorrectionLevel: "Q",
842
780
  cutout: true
843
- }, url ?? "never"), /* @__PURE__ */ React9.createElement(Centered, null, /* @__PURE__ */ React9.createElement(Emoji, {
781
+ }, url ?? "never"), /* @__PURE__ */ React8.createElement(Centered, null, /* @__PURE__ */ React8.createElement(Emoji, {
844
782
  text: emoji
845
- }))), /* @__PURE__ */ React9.createElement("span", {
783
+ }))), /* @__PURE__ */ React8.createElement("span", {
846
784
  id: qrLabel,
847
785
  className: "sr-only"
848
- }, t("qr label")), /* @__PURE__ */ React9.createElement(Clipboard.Button, {
786
+ }, t("qr label")), /* @__PURE__ */ React8.createElement(Clipboard.Button, {
849
787
  value: url ?? "never"
850
- })), /* @__PURE__ */ React9.createElement(Button4, {
788
+ })), /* @__PURE__ */ React8.createElement(Button4, {
851
789
  variant: "ghost",
852
790
  onClick: onCancel
853
791
  }, t("cancel label")));
@@ -855,33 +793,33 @@ var InvitationQR = ({ id, url, onCancel }) => {
855
793
  var InvitationAuthCode = ({ id, code, onCancel }) => {
856
794
  const { t } = useTranslation8("os");
857
795
  const emoji = hexToEmoji(id);
858
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("p", {
796
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
859
797
  className: "text-description"
860
- }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React9.createElement(Emoji, {
798
+ }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React8.createElement(Emoji, {
861
799
  text: emoji,
862
800
  className: "mli-auto mlb-2 text-center"
863
- }), /* @__PURE__ */ React9.createElement("p", {
801
+ }), /* @__PURE__ */ React8.createElement("p", {
864
802
  className: "text-description"
865
- }, t("auth code message")), /* @__PURE__ */ React9.createElement(AuthCode, {
803
+ }, t("auth code message")), /* @__PURE__ */ React8.createElement(AuthCode, {
866
804
  code,
867
805
  large: true,
868
806
  classNames: "mli-auto mlb-2 text-center grow"
869
- }), /* @__PURE__ */ React9.createElement(Button4, {
807
+ }), /* @__PURE__ */ React8.createElement(Button4, {
870
808
  variant: "ghost",
871
809
  onClick: onCancel
872
810
  }, t("cancel label")));
873
811
  };
874
812
  var InvitationComplete = ({ statusValue }) => {
875
- return statusValue > 0 ? /* @__PURE__ */ React9.createElement(Check, {
813
+ return statusValue > 0 ? /* @__PURE__ */ React8.createElement(Check, {
876
814
  className: mx4("m-1.5", getSize2(6))
877
- }) : /* @__PURE__ */ React9.createElement(X, {
815
+ }) : /* @__PURE__ */ React8.createElement(X, {
878
816
  className: mx4("m-1.5", getSize2(6))
879
817
  });
880
818
  };
881
819
 
882
820
  // packages/plugins/plugin-space/src/components/MenuFooter.tsx
883
821
  import { Planet } from "@phosphor-icons/react";
884
- import React10 from "react";
822
+ import React9 from "react";
885
823
  import { getSpace as getSpace2 } from "@dxos/client/echo";
886
824
  import { useClient as useClient4 } from "@dxos/react-client";
887
825
  import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation9 } from "@dxos/react-ui";
@@ -892,127 +830,33 @@ var MenuFooter = ({ object }) => {
892
830
  const spaceName = space ? getSpaceDisplayName(space, {
893
831
  personal: client.spaces.default === space
894
832
  }) : "";
895
- return space ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React10.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React10.createElement("dl", {
833
+ return space ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React9.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React9.createElement("dl", {
896
834
  className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
897
- }, /* @__PURE__ */ React10.createElement("dt", {
835
+ }, /* @__PURE__ */ React9.createElement("dt", {
898
836
  className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
899
- }, t("location label")), /* @__PURE__ */ React10.createElement("dd", {
837
+ }, t("location label")), /* @__PURE__ */ React9.createElement("dd", {
900
838
  className: "line-clamp-3"
901
- }, /* @__PURE__ */ React10.createElement(Planet, {
839
+ }, /* @__PURE__ */ React9.createElement(Planet, {
902
840
  className: "inline-block mie-1"
903
841
  }), toLocalizedString2(spaceName, t)))) : null;
904
842
  };
905
843
 
906
844
  // packages/plugins/plugin-space/src/components/ObjectSettings/ObjectSettingsContainer.tsx
907
- import React14, { useMemo as useMemo2 } from "react";
908
- import { Surface as Surface2 } from "@dxos/app-framework";
845
+ import React11, { useMemo as useMemo2 } from "react";
846
+ import { Surface } from "@dxos/app-framework";
909
847
  import { Clipboard as Clipboard2 } from "@dxos/react-ui";
910
848
  import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
911
849
 
912
- // packages/plugins/plugin-space/src/components/ObjectSettings/AdvancedObjectSettings.tsx
913
- import React12, { useCallback as useCallback9, useState as useState5 } from "react";
914
- import { ForeignKeySchema } from "@dxos/echo-schema";
915
- import { getMeta } from "@dxos/react-client/echo";
916
- import { IconButton as IconButton2, useTranslation as useTranslation11 } from "@dxos/react-ui";
917
- import { Form as Form3 } from "@dxos/react-ui-form";
918
-
919
- // packages/plugins/plugin-space/src/components/ObjectSettings/ForeignKeys.tsx
920
- import React11, { useCallback as useCallback8 } from "react";
921
- import { IconButton, List, ListItem, useTranslation as useTranslation10 } from "@dxos/react-ui";
922
- var ForeignKeys = ({ keys, onDelete }) => {
923
- return /* @__PURE__ */ React11.createElement(List, {
924
- classNames: "flex flex-col gap-2"
925
- }, keys.map((key) => /* @__PURE__ */ React11.createElement(KeyItem, {
926
- key: key.id,
927
- forignKey: key,
928
- onDelete
929
- })));
930
- };
931
- var KeyItem = ({ forignKey, onDelete }) => {
932
- const { t } = useTranslation10(SPACE_PLUGIN);
933
- const handleDelete = useCallback8(() => {
934
- onDelete?.(forignKey);
935
- }, [
936
- forignKey,
937
- onDelete
938
- ]);
939
- return /* @__PURE__ */ React11.createElement(ListItem.Root, {
940
- classNames: "px-2"
941
- }, /* @__PURE__ */ React11.createElement(ListItem.Heading, {
942
- classNames: "flex flex-col grow truncate"
943
- }, /* @__PURE__ */ React11.createElement("div", null, forignKey.source), /* @__PURE__ */ React11.createElement("div", {
944
- className: "text-description text-sm truncate"
945
- }, forignKey.id)), /* @__PURE__ */ React11.createElement(ListItem.Endcap, null, /* @__PURE__ */ React11.createElement(IconButton, {
946
- iconOnly: true,
947
- icon: "ph--x--regular",
948
- variant: "ghost",
949
- label: t("delete key"),
950
- onClick: handleDelete
951
- })));
952
- };
953
-
954
- // packages/plugins/plugin-space/src/components/ObjectSettings/AdvancedObjectSettings.tsx
955
- var initialValues2 = {
956
- source: "",
957
- id: ""
958
- };
959
- var AdvancedObjectSettings = ({ object }) => {
960
- const { t } = useTranslation11(SPACE_PLUGIN);
961
- const [adding, setAdding] = useState5(false);
962
- const keys = getMeta(object).keys;
963
- const handleNew = useCallback9(() => setAdding(true), []);
964
- const handleCancel = useCallback9(() => setAdding(false), []);
965
- const handleSave = useCallback9((key) => {
966
- const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
967
- if (index === -1) {
968
- keys.push(key);
969
- }
970
- setAdding(false);
971
- }, [
972
- keys
973
- ]);
974
- const handleDelete = useCallback9((key) => {
975
- const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
976
- if (index !== -1) {
977
- keys.splice(index, 1);
978
- }
979
- }, [
980
- keys
981
- ]);
982
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("div", {
983
- className: "p-2 flex flex-col gap-4"
984
- }, /* @__PURE__ */ React12.createElement("h2", null, t("advanced settings label")), /* @__PURE__ */ React12.createElement("div", {
985
- className: "flex items-center"
986
- }, /* @__PURE__ */ React12.createElement("h3", {
987
- className: "text-sm font-semibold"
988
- }, t("foreign keys")), /* @__PURE__ */ React12.createElement("div", {
989
- className: "grow"
990
- }), /* @__PURE__ */ React12.createElement(IconButton2, {
991
- classNames: adding && "invisible",
992
- icon: "ph--plus--regular",
993
- label: t("add key"),
994
- onClick: handleNew
995
- })), !adding && /* @__PURE__ */ React12.createElement(ForeignKeys, {
996
- keys,
997
- onDelete: handleDelete
998
- })), adding && /* @__PURE__ */ React12.createElement(Form3, {
999
- schema: ForeignKeySchema,
1000
- values: initialValues2,
1001
- onSave: handleSave,
1002
- onCancel: handleCancel
1003
- }));
1004
- };
1005
-
1006
850
  // packages/plugins/plugin-space/src/components/ObjectSettings/BaseObjectSettings.tsx
1007
- import React13, { useRef as useRef3 } from "react";
1008
- import { Input as Input2, useTranslation as useTranslation12 } from "@dxos/react-ui";
851
+ import React10, { useRef as useRef3 } from "react";
852
+ import { Input as Input2, useTranslation as useTranslation10 } from "@dxos/react-ui";
1009
853
  import { mx as mx5 } from "@dxos/react-ui-theme";
1010
854
  var BaseObjectSettings = ({ classNames, children, object }) => {
1011
- const { t } = useTranslation12(meta.id);
855
+ const { t } = useTranslation10(meta.id);
1012
856
  const inputRef = useRef3(null);
1013
- return /* @__PURE__ */ React13.createElement("form", {
857
+ return /* @__PURE__ */ React10.createElement("form", {
1014
858
  className: mx5("flex flex-col p-2 gap-2", classNames)
1015
- }, /* @__PURE__ */ React13.createElement(Input2.Root, null, /* @__PURE__ */ React13.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React13.createElement(Input2.TextInput, {
859
+ }, /* @__PURE__ */ React10.createElement(Input2.Root, null, /* @__PURE__ */ React10.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React10.createElement(Input2.TextInput, {
1016
860
  ref: inputRef,
1017
861
  placeholder: t("name placeholder"),
1018
862
  value: object.name ?? "",
@@ -1034,29 +878,27 @@ var ObjectSettingsContainer = ({ object, role }) => {
1034
878
  }), [
1035
879
  object
1036
880
  ]);
1037
- return /* @__PURE__ */ React14.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React14.createElement(StackItem2.Content, {
881
+ return /* @__PURE__ */ React11.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React11.createElement(StackItem2.Content, {
1038
882
  toolbar: false,
1039
883
  role
1040
- }, /* @__PURE__ */ React14.createElement("div", {
884
+ }, /* @__PURE__ */ React11.createElement("div", {
1041
885
  className: "flex flex-col overflow-y-auto divide-y divide-separator"
1042
- }, /* @__PURE__ */ React14.createElement(BaseObjectSettings, {
886
+ }, /* @__PURE__ */ React11.createElement(BaseObjectSettings, {
1043
887
  object
1044
- }, /* @__PURE__ */ React14.createElement(Surface2, {
888
+ }, /* @__PURE__ */ React11.createElement(Surface, {
1045
889
  role: "base-object-settings",
1046
890
  data
1047
- })), /* @__PURE__ */ React14.createElement(Surface2, {
891
+ })), /* @__PURE__ */ React11.createElement(Surface, {
1048
892
  role: "object-settings",
1049
893
  data
1050
- }), /* @__PURE__ */ React14.createElement(AdvancedObjectSettings, {
1051
- object
1052
894
  }))));
1053
895
  };
1054
896
 
1055
897
  // packages/plugins/plugin-space/src/components/PersistenceStatus.tsx
1056
898
  import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
1057
- import React15, { useEffect as useEffect3, useState as useState6 } from "react";
899
+ import React12, { useEffect as useEffect2, useState as useState4 } from "react";
1058
900
  import { debounce } from "@dxos/async";
1059
- import { Tooltip, useTranslation as useTranslation13 } from "@dxos/react-ui";
901
+ import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
1060
902
  import { getSize as getSize3, mx as mx6, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
1061
903
  var Status;
1062
904
  (function(Status2) {
@@ -1065,12 +907,12 @@ var Status;
1065
907
  Status2[Status2["ERROR"] = 2] = "ERROR";
1066
908
  })(Status || (Status = {}));
1067
909
  var PersistenceStatus = ({ db }) => {
1068
- const { t } = useTranslation13(SPACE_PLUGIN);
1069
- const [displayMessage, setDisplayMessage] = useState6(false);
1070
- const [status, naturalSetStatus] = useState6(0);
1071
- const [prevStatus, setPrevStatus] = useState6(0);
910
+ const { t } = useTranslation11(SPACE_PLUGIN);
911
+ const [displayMessage, setDisplayMessage] = useState4(false);
912
+ const [status, naturalSetStatus] = useState4(0);
913
+ const [prevStatus, setPrevStatus] = useState4(0);
1072
914
  const _setStatus = debounce(naturalSetStatus, 500);
1073
- useEffect3(() => {
915
+ useEffect2(() => {
1074
916
  setPrevStatus(status);
1075
917
  if (prevStatus !== status && status === 0) {
1076
918
  setDisplayMessage(true);
@@ -1082,96 +924,50 @@ var PersistenceStatus = ({ db }) => {
1082
924
  ]);
1083
925
  switch (status) {
1084
926
  case 2:
1085
- return /* @__PURE__ */ React15.createElement("div", {
927
+ return /* @__PURE__ */ React12.createElement("div", {
1086
928
  className: "flex items-center"
1087
- }, /* @__PURE__ */ React15.createElement(Warning, {
929
+ }, /* @__PURE__ */ React12.createElement(Warning, {
1088
930
  className: mx6(getSize3(4), "me-1")
1089
- }), /* @__PURE__ */ React15.createElement("span", {
931
+ }), /* @__PURE__ */ React12.createElement("span", {
1090
932
  className: mx6("text-sm", warningText)
1091
933
  }, t("persistence error label")));
1092
934
  case 1:
1093
- return /* @__PURE__ */ React15.createElement("div", {
935
+ return /* @__PURE__ */ React12.createElement("div", {
1094
936
  className: "flex items-center"
1095
- }, /* @__PURE__ */ React15.createElement(ArrowsCounterClockwise, {
937
+ }, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
1096
938
  className: mx6(getSize3(4), "me-1")
1097
- }), /* @__PURE__ */ React15.createElement("span", {
939
+ }), /* @__PURE__ */ React12.createElement("span", {
1098
940
  className: mx6("text-sm", staticPlaceholderText)
1099
941
  }, t("persistence pending label")));
1100
942
  case 0:
1101
943
  default:
1102
- return /* @__PURE__ */ React15.createElement(Tooltip.Root, {
1103
- delayDuration: 400
1104
- }, /* @__PURE__ */ React15.createElement(Tooltip.Trigger, {
944
+ return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
945
+ delayDuration: 400,
1105
946
  role: "status",
947
+ content: t("persisted locally message"),
1106
948
  className: "flex items-center"
1107
- }, /* @__PURE__ */ React15.createElement(CheckCircle2, {
949
+ }, /* @__PURE__ */ React12.createElement(CheckCircle2, {
1108
950
  className: mx6(getSize3(4), "me-1")
1109
- }), displayMessage && /* @__PURE__ */ React15.createElement("span", {
951
+ }), displayMessage && /* @__PURE__ */ React12.createElement("span", {
1110
952
  className: mx6("text-sm", staticPlaceholderText)
1111
- }, t("persisted locally label"))), /* @__PURE__ */ React15.createElement(Tooltip.Portal, null, /* @__PURE__ */ React15.createElement(Tooltip.Content, null, t("persisted locally message"), /* @__PURE__ */ React15.createElement(Tooltip.Arrow, null))));
953
+ }, t("persisted locally label")));
1112
954
  }
1113
955
  };
1114
956
 
1115
- // packages/plugins/plugin-space/src/components/PopoverAddSpace.tsx
1116
- import React16 from "react";
1117
- import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1118
- import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
1119
- var POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1120
- var PopoverAddSpace = () => {
1121
- const { t } = useTranslation14(SPACE_PLUGIN);
1122
- const { dispatchPromise: dispatch } = useIntentDispatcher6();
1123
- return /* @__PURE__ */ React16.createElement("div", {
1124
- role: "none",
1125
- className: "p-1 grid grid-cols-1 gap-1 [&>button]:justify-start"
1126
- }, /* @__PURE__ */ React16.createElement(IconButton3, {
1127
- variant: "ghost",
1128
- label: t("create space label"),
1129
- icon: "ph--plus--regular",
1130
- onClick: () => {
1131
- void dispatch(createIntent6(SpaceAction.OpenCreateSpace));
1132
- void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
1133
- part: "popover",
1134
- options: {
1135
- variant: "react",
1136
- anchorId: "",
1137
- state: false
1138
- }
1139
- }));
1140
- },
1141
- "data-testid": "spacePlugin.createSpace"
1142
- }), /* @__PURE__ */ React16.createElement(IconButton3, {
1143
- variant: "ghost",
1144
- label: t("join space label"),
1145
- icon: "ph--sign-in--regular",
1146
- onClick: () => {
1147
- void dispatch(createIntent6(SpaceAction.Join));
1148
- void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
1149
- part: "popover",
1150
- options: {
1151
- variant: "react",
1152
- anchorId: "",
1153
- state: false
1154
- }
1155
- }));
1156
- },
1157
- "data-testid": "spacePlugin.joinSpace"
1158
- }));
1159
- };
1160
-
1161
957
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
1162
- import React17, { useCallback as useCallback10, useRef as useRef4, useState as useState7 } from "react";
1163
- import { createIntent as createIntent7, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
958
+ import React13, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
959
+ import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1164
960
  import { log as log2 } from "@dxos/log";
1165
- import { Button as Button5, Input as Input3, useTranslation as useTranslation15 } from "@dxos/react-ui";
961
+ import { Button as Button5, Input as Input3, useTranslation as useTranslation12 } from "@dxos/react-ui";
1166
962
  var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
1167
963
  var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
1168
964
  var PopoverRenameObject = ({ object: obj }) => {
1169
- const { t } = useTranslation15(SPACE_PLUGIN);
965
+ const { t } = useTranslation12(SPACE_PLUGIN);
1170
966
  const doneButton = useRef4(null);
1171
967
  const object = obj;
1172
- const [name, setName] = useState7(object.name || object.title || "");
1173
- const { dispatchPromise: dispatch } = useIntentDispatcher7();
1174
- const handleDone = useCallback10(() => {
968
+ const [name, setName] = useState5(object.name || object.title || "");
969
+ const { dispatchPromise: dispatch } = useIntentDispatcher6();
970
+ const handleDone = useCallback7(() => {
1175
971
  try {
1176
972
  object.name = name;
1177
973
  } catch {
@@ -1188,7 +984,7 @@ var PopoverRenameObject = ({ object: obj }) => {
1188
984
  });
1189
985
  }
1190
986
  }
1191
- void dispatch(createIntent7(LayoutAction6.UpdatePopover, {
987
+ void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
1192
988
  part: "popover",
1193
989
  options: {
1194
990
  variant: "react",
@@ -1200,21 +996,21 @@ var PopoverRenameObject = ({ object: obj }) => {
1200
996
  object,
1201
997
  name
1202
998
  ]);
1203
- return /* @__PURE__ */ React17.createElement("div", {
999
+ return /* @__PURE__ */ React13.createElement("div", {
1204
1000
  role: "none",
1205
1001
  className: "p-1 flex gap-2"
1206
- }, /* @__PURE__ */ React17.createElement("div", {
1002
+ }, /* @__PURE__ */ React13.createElement("div", {
1207
1003
  role: "none",
1208
1004
  className: "flex-1"
1209
- }, /* @__PURE__ */ React17.createElement(Input3.Root, null, /* @__PURE__ */ React17.createElement(Input3.Label, {
1005
+ }, /* @__PURE__ */ React13.createElement(Input3.Root, null, /* @__PURE__ */ React13.createElement(Input3.Label, {
1210
1006
  srOnly: true
1211
- }, t("object name label")), /* @__PURE__ */ React17.createElement(Input3.TextInput, {
1007
+ }, t("object name label")), /* @__PURE__ */ React13.createElement(Input3.TextInput, {
1212
1008
  placeholder: t("object placeholder"),
1213
1009
  value: name,
1214
1010
  "data-testid": "spacePlugin.renameObject.input",
1215
1011
  onChange: ({ target: { value } }) => setName(value),
1216
1012
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1217
- }))), /* @__PURE__ */ React17.createElement(Button5, {
1013
+ }))), /* @__PURE__ */ React13.createElement(Button5, {
1218
1014
  ref: doneButton,
1219
1015
  classNames: "self-stretch",
1220
1016
  onClick: handleDone
@@ -1224,18 +1020,18 @@ var PopoverRenameObject = ({ object: obj }) => {
1224
1020
  };
1225
1021
 
1226
1022
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
1227
- import React18, { useCallback as useCallback11, useRef as useRef5, useState as useState8 } from "react";
1228
- import { createIntent as createIntent8, LayoutAction as LayoutAction7, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
1229
- import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation16 } from "@dxos/react-ui";
1023
+ import React14, { useCallback as useCallback8, useRef as useRef5, useState as useState6 } from "react";
1024
+ import { createIntent as createIntent7, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
1025
+ import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation13 } from "@dxos/react-ui";
1230
1026
  var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1231
1027
  var PopoverRenameSpace = ({ space }) => {
1232
- const { t } = useTranslation16(SPACE_PLUGIN);
1028
+ const { t } = useTranslation13(SPACE_PLUGIN);
1233
1029
  const doneButton = useRef5(null);
1234
- const [name, setName] = useState8(space.properties.name ?? "");
1235
- const { dispatchPromise: dispatch } = useIntentDispatcher8();
1236
- const handleDone = useCallback11(() => {
1030
+ const [name, setName] = useState6(space.properties.name ?? "");
1031
+ const { dispatchPromise: dispatch } = useIntentDispatcher7();
1032
+ const handleDone = useCallback8(() => {
1237
1033
  space.properties.name = name;
1238
- void dispatch(createIntent8(LayoutAction7.UpdatePopover, {
1034
+ void dispatch(createIntent7(LayoutAction6.UpdatePopover, {
1239
1035
  part: "popover",
1240
1036
  options: {
1241
1037
  variant: "react",
@@ -1247,24 +1043,24 @@ var PopoverRenameSpace = ({ space }) => {
1247
1043
  space,
1248
1044
  name
1249
1045
  ]);
1250
- return /* @__PURE__ */ React18.createElement("div", {
1046
+ return /* @__PURE__ */ React14.createElement("div", {
1251
1047
  role: "none",
1252
1048
  className: "p-1 flex gap-2"
1253
- }, /* @__PURE__ */ React18.createElement("div", {
1049
+ }, /* @__PURE__ */ React14.createElement("div", {
1254
1050
  role: "none",
1255
1051
  className: "flex-1"
1256
- }, /* @__PURE__ */ React18.createElement(Input4.Root, null, /* @__PURE__ */ React18.createElement(Input4.Label, {
1052
+ }, /* @__PURE__ */ React14.createElement(Input4.Root, null, /* @__PURE__ */ React14.createElement(Input4.Label, {
1257
1053
  srOnly: true
1258
- }, t("space name label")), /* @__PURE__ */ React18.createElement(Input4.TextInput, {
1054
+ }, t("space name label")), /* @__PURE__ */ React14.createElement(Input4.TextInput, {
1259
1055
  defaultValue: space.properties.name ?? "",
1260
1056
  placeholder: t("unnamed space label"),
1261
1057
  onChange: ({ target: { value } }) => setName(value),
1262
1058
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
1263
1059
  // Currently this is not possible because Radix does not expose the popover context.
1264
1060
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1265
- }))), /* @__PURE__ */ React18.createElement(Popover.Close, {
1061
+ }))), /* @__PURE__ */ React14.createElement(Popover.Close, {
1266
1062
  asChild: true
1267
- }, /* @__PURE__ */ React18.createElement(Button6, {
1063
+ }, /* @__PURE__ */ React14.createElement(Button6, {
1268
1064
  ref: doneButton,
1269
1065
  classNames: "self-stretch",
1270
1066
  onClick: handleDone
@@ -1274,13 +1070,13 @@ var PopoverRenameSpace = ({ space }) => {
1274
1070
  };
1275
1071
 
1276
1072
  // packages/plugins/plugin-space/src/components/SchemaContainer.tsx
1277
- import React19, { useState as useState9, useEffect as useEffect4 } from "react";
1278
- import { useTranslation as useTranslation17 } from "@dxos/react-ui";
1073
+ import React15, { useState as useState7, useEffect as useEffect3 } from "react";
1074
+ import { useTranslation as useTranslation14 } from "@dxos/react-ui";
1279
1075
  import { controlItemClasses, ControlPage as ControlPage2, ControlSection as ControlSection2 } from "@dxos/react-ui-form";
1280
1076
  import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
1281
1077
  var useQuerySpaceSchemas = (space) => {
1282
- const [schemas, setSchemas] = useState9([]);
1283
- useEffect4(() => {
1078
+ const [schemas, setSchemas] = useState7([]);
1079
+ useEffect3(() => {
1284
1080
  const query = space.db.schemaRegistry.query();
1285
1081
  const initialResults = query.runSync();
1286
1082
  setSchemas(initialResults);
@@ -1292,31 +1088,32 @@ var useQuerySpaceSchemas = (space) => {
1292
1088
  return schemas;
1293
1089
  };
1294
1090
  var SchemaContainer = ({ space }) => {
1295
- const { t } = useTranslation17(SPACE_PLUGIN);
1091
+ const { t } = useTranslation14(SPACE_PLUGIN);
1296
1092
  const schemas = useQuerySpaceSchemas(space);
1297
- return /* @__PURE__ */ React19.createElement(StackItem3.Content, {
1093
+ return /* @__PURE__ */ React15.createElement(StackItem3.Content, {
1298
1094
  classNames: "block overflow-y-auto"
1299
- }, /* @__PURE__ */ React19.createElement(ControlPage2, null, /* @__PURE__ */ React19.createElement(ControlSection2, {
1095
+ }, /* @__PURE__ */ React15.createElement(ControlPage2, null, /* @__PURE__ */ React15.createElement(ControlSection2, {
1300
1096
  title: t("schema verbose label"),
1301
1097
  description: t("schema description")
1302
- }, /* @__PURE__ */ React19.createElement("div", {
1098
+ }, /* @__PURE__ */ React15.createElement("div", {
1303
1099
  role: "none",
1304
1100
  className: controlItemClasses
1305
- }, schemas.length === 0 && /* @__PURE__ */ React19.createElement("div", {
1101
+ }, schemas.length === 0 && /* @__PURE__ */ React15.createElement("div", {
1306
1102
  className: "text-center plb-4"
1307
- }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React19.createElement("div", {
1103
+ }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React15.createElement("div", {
1308
1104
  key: schema.id
1309
- }, /* @__PURE__ */ React19.createElement("div", null, schema.typename)))))));
1105
+ }, /* @__PURE__ */ React15.createElement("div", null, schema.typename)))))));
1310
1106
  };
1311
1107
 
1312
1108
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
1313
- import React20, { forwardRef, useCallback as useCallback12, useEffect as useEffect5, useState as useState10 } from "react";
1109
+ import { Option } from "effect";
1110
+ import React16, { forwardRef, useCallback as useCallback9, useEffect as useEffect4, useState as useState8 } from "react";
1314
1111
  import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
1315
1112
  import { generateName } from "@dxos/display-name";
1316
1113
  import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
1317
1114
  import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
1318
1115
  import { useIdentity } from "@dxos/react-client/halo";
1319
- import { Avatar, Tooltip as Tooltip2, useTranslation as useTranslation18, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
1116
+ import { Avatar, Tooltip as Tooltip2, Popover as Popover2, useTranslation as useTranslation15, List, ListItem, useDefaultValue } from "@dxos/react-ui";
1320
1117
  import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
1321
1118
  import { ComplexMap, keyToFallback } from "@dxos/util";
1322
1119
  var REFRESH_INTERVAL = 5e3;
@@ -1329,13 +1126,13 @@ var SpacePresence = ({ object, spaceKey }) => {
1329
1126
  const identity = useIdentity();
1330
1127
  const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
1331
1128
  const spaceMembers = useMembers(space?.key);
1332
- const [_moment, setMoment] = useState10(Date.now());
1333
- useEffect5(() => {
1129
+ const [_moment, setMoment] = useState8(Date.now());
1130
+ useEffect4(() => {
1334
1131
  const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
1335
1132
  return () => clearInterval(interval);
1336
1133
  }, []);
1337
- const memberOnline = useCallback12((member) => member.presence === 1, []);
1338
- const memberIsNotSelf = useCallback12((member) => !identity?.identityKey.equals(member.identity.identityKey), [
1134
+ const memberOnline = useCallback9((member) => member.presence === 1, []);
1135
+ const memberIsNotSelf = useCallback9((member) => !identity?.identityKey.equals(member.identity.identityKey), [
1339
1136
  identity?.identityKey
1340
1137
  ]);
1341
1138
  if (!identity || !spaceState || !space) {
@@ -1352,7 +1149,7 @@ var SpacePresence = ({ object, spaceKey }) => {
1352
1149
  lastSeen
1353
1150
  };
1354
1151
  }).toSorted((a, b) => a.lastSeen - b.lastSeen);
1355
- return /* @__PURE__ */ React20.createElement(FullPresence, {
1152
+ return /* @__PURE__ */ React16.createElement(FullPresence, {
1356
1153
  members: membersForObject
1357
1154
  });
1358
1155
  };
@@ -1362,40 +1159,39 @@ var FullPresence = (props) => {
1362
1159
  if (members.length === 0) {
1363
1160
  return null;
1364
1161
  }
1365
- return /* @__PURE__ */ React20.createElement("div", {
1162
+ return /* @__PURE__ */ React16.createElement("div", {
1366
1163
  className: "dx-avatar-group",
1367
1164
  "data-testid": "spacePlugin.presence"
1368
- }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React20.createElement(Tooltip2.Root, {
1369
- key: member.identity.identityKey.toHex()
1370
- }, /* @__PURE__ */ React20.createElement(Tooltip2.Trigger, {
1165
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1166
+ key: member.identity.identityKey.toHex(),
1167
+ side: "bottom",
1168
+ content: getName(member.identity),
1371
1169
  className: "grid focus:outline-none"
1372
- }, /* @__PURE__ */ React20.createElement(PresenceAvatar, {
1170
+ }, /* @__PURE__ */ React16.createElement(PresenceAvatar, {
1373
1171
  identity: member.identity,
1374
1172
  match: member.currentlyAttended,
1375
1173
  index: members.length - i,
1376
1174
  onClick: () => onMemberClick?.(member),
1377
1175
  size
1378
- })), /* @__PURE__ */ React20.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip2.Content, {
1379
- side: "bottom"
1380
- }, /* @__PURE__ */ React20.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React20.createElement(Tooltip2.Root, null, /* @__PURE__ */ React20.createElement(Tooltip2.Trigger, {
1176
+ }))), members.length > 3 && /* @__PURE__ */ React16.createElement(Popover2.Root, null, /* @__PURE__ */ React16.createElement(Popover2.Trigger, {
1381
1177
  className: "grid focus:outline-none"
1382
- }, /* @__PURE__ */ React20.createElement(Avatar.Root, null, /* @__PURE__ */ React20.createElement(Avatar.Content, {
1178
+ }, /* @__PURE__ */ React16.createElement(Avatar.Root, null, /* @__PURE__ */ React16.createElement(Avatar.Content, {
1383
1179
  status: "inactive",
1384
1180
  style: {
1385
1181
  zIndex: members.length - 4
1386
1182
  },
1387
1183
  fallback: `+${members.length - 3}`,
1388
1184
  size
1389
- }))), /* @__PURE__ */ React20.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip2.Content, {
1185
+ }))), /* @__PURE__ */ React16.createElement(Popover2.Portal, null, /* @__PURE__ */ React16.createElement(Popover2.Content, {
1390
1186
  side: "bottom"
1391
- }, /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React20.createElement(List2, {
1187
+ }, /* @__PURE__ */ React16.createElement(Popover2.Arrow, null), /* @__PURE__ */ React16.createElement(List, {
1392
1188
  classNames: "max-h-56 overflow-y-auto"
1393
- }, members.map((member) => /* @__PURE__ */ React20.createElement(ListItem2.Root, {
1189
+ }, members.map((member) => /* @__PURE__ */ React16.createElement(ListItem.Root, {
1394
1190
  key: member.identity.identityKey.toHex(),
1395
1191
  classNames: "flex gap-2 items-center cursor-pointer mbe-2",
1396
1192
  onClick: () => onMemberClick?.(member),
1397
1193
  "data-testid": "identity-list-item"
1398
- }, /* @__PURE__ */ React20.createElement(PresenceAvatar, {
1194
+ }, /* @__PURE__ */ React16.createElement(PresenceAvatar, {
1399
1195
  identity: member.identity,
1400
1196
  size,
1401
1197
  showName: true,
@@ -1405,7 +1201,7 @@ var FullPresence = (props) => {
1405
1201
  var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
1406
1202
  const status = match ? "current" : "active";
1407
1203
  const fallbackValue = keyToFallback(identity.identityKey);
1408
- return /* @__PURE__ */ React20.createElement(Avatar.Root, null, /* @__PURE__ */ React20.createElement(Avatar.Content, {
1204
+ return /* @__PURE__ */ React16.createElement(Avatar.Root, null, /* @__PURE__ */ React16.createElement(Avatar.Content, {
1409
1205
  status,
1410
1206
  hue: identity.profile?.data?.hue || fallbackValue.hue,
1411
1207
  "data-testid": "spacePlugin.presence.member",
@@ -1419,7 +1215,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
1419
1215
  onClick,
1420
1216
  fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
1421
1217
  ref: forwardedRef
1422
- }), /* @__PURE__ */ React20.createElement(Avatar.Label, {
1218
+ }), /* @__PURE__ */ React16.createElement(Avatar.Label, {
1423
1219
  classNames: showName ? "text-sm truncate pli-2" : "sr-only"
1424
1220
  }, getName(identity)));
1425
1221
  });
@@ -1430,13 +1226,13 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1430
1226
  const attended = useAttended();
1431
1227
  const startOfAttention = attended.at(-1);
1432
1228
  const path = usePath(graph, startOfAttention);
1433
- const containsAttended = !open && !isAttended && id && path ? path.includes(id) : false;
1229
+ const containsAttended = !open && !isAttended && id && Option.isSome(path) ? path.value.includes(id) : false;
1434
1230
  const getActiveViewers = (viewers2) => {
1435
1231
  const moment = Date.now();
1436
1232
  return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
1437
1233
  };
1438
- const [activeViewers, setActiveViewers] = useState10(viewers ? getActiveViewers(viewers) : []);
1439
- useEffect5(() => {
1234
+ const [activeViewers, setActiveViewers] = useState8(viewers ? getActiveViewers(viewers) : []);
1235
+ useEffect4(() => {
1440
1236
  if (viewers) {
1441
1237
  setActiveViewers(getActiveViewers(viewers));
1442
1238
  const interval = setInterval(() => {
@@ -1447,96 +1243,96 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1447
1243
  }, [
1448
1244
  viewers
1449
1245
  ]);
1450
- return /* @__PURE__ */ React20.createElement(SmallPresence, {
1246
+ return /* @__PURE__ */ React16.createElement(SmallPresence, {
1451
1247
  count: activeViewers.length,
1452
1248
  attended: isAttended,
1453
1249
  containsAttended
1454
1250
  });
1455
1251
  };
1456
1252
  var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1457
- const { t } = useTranslation18(SPACE_PLUGIN);
1458
- return /* @__PURE__ */ React20.createElement(Tooltip2.Root, null, /* @__PURE__ */ React20.createElement(Tooltip2.Trigger, {
1459
- asChild: true
1460
- }, /* @__PURE__ */ React20.createElement(AttentionGlyph, {
1253
+ const { t } = useTranslation15(SPACE_PLUGIN);
1254
+ return /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1255
+ asChild: true,
1256
+ content: t("presence label", {
1257
+ count
1258
+ }),
1259
+ side: "bottom"
1260
+ }, /* @__PURE__ */ React16.createElement(AttentionGlyph, {
1461
1261
  attended,
1462
1262
  containsAttended,
1463
1263
  presence: count > 1 ? "many" : count === 1 ? "one" : "none",
1464
1264
  classNames: "self-center mie-1"
1465
- })), /* @__PURE__ */ React20.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip2.Content, {
1466
- side: "bottom"
1467
- }, /* @__PURE__ */ React20.createElement("span", null, t("presence label", {
1468
- count
1469
- })), /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null))));
1265
+ }));
1470
1266
  };
1471
1267
 
1472
1268
  // packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
1473
- import React21 from "react";
1474
- import { createIntent as createIntent9, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
1269
+ import React17 from "react";
1270
+ import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
1475
1271
  import { useClient as useClient6 } from "@dxos/react-client";
1476
1272
  import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
1477
- import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as useTranslation19, List as List3, ListItem as ListItem3, Button as Button7 } from "@dxos/react-ui";
1273
+ import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as useTranslation16, List as List2, ListItem as ListItem2, Button as Button7 } from "@dxos/react-ui";
1478
1274
  import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
1479
1275
  var SpacePluginSettings = ({ settings }) => {
1480
- const { t } = useTranslation19(SPACE_PLUGIN);
1481
- const { dispatchPromise: dispatch } = useIntentDispatcher9();
1276
+ const { t } = useTranslation16(SPACE_PLUGIN);
1277
+ const { dispatchPromise: dispatch } = useIntentDispatcher8();
1482
1278
  const client = useClient6();
1483
1279
  const spaces = useSpaces2({
1484
1280
  all: settings.showHidden
1485
1281
  });
1486
- return /* @__PURE__ */ React21.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React21.createElement(DeprecatedFormInput, {
1282
+ return /* @__PURE__ */ React17.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1487
1283
  label: t("show hidden spaces label")
1488
- }, /* @__PURE__ */ React21.createElement(Input5.Switch, {
1284
+ }, /* @__PURE__ */ React17.createElement(Input5.Switch, {
1489
1285
  checked: settings.showHidden,
1490
1286
  onCheckedChange: (checked) => settings.showHidden = !!checked
1491
- })), /* @__PURE__ */ React21.createElement("div", {
1287
+ })), /* @__PURE__ */ React17.createElement("div", {
1492
1288
  role: "none"
1493
- }, /* @__PURE__ */ React21.createElement("h2", {
1289
+ }, /* @__PURE__ */ React17.createElement("h2", {
1494
1290
  className: "text-xl my-4"
1495
- }, "Space Settings"), /* @__PURE__ */ React21.createElement(List3, {
1291
+ }, "Space Settings"), /* @__PURE__ */ React17.createElement(List2, {
1496
1292
  classNames: "max-w-md mx-auto"
1497
- }, spaces.map((space) => /* @__PURE__ */ React21.createElement(ListItem3.Root, {
1293
+ }, spaces.map((space) => /* @__PURE__ */ React17.createElement(ListItem2.Root, {
1498
1294
  key: space.id
1499
- }, /* @__PURE__ */ React21.createElement(ListItem3.Heading, {
1295
+ }, /* @__PURE__ */ React17.createElement(ListItem2.Heading, {
1500
1296
  classNames: "flex flex-col grow truncate mbe-2"
1501
1297
  }, toLocalizedString3(getSpaceDisplayName(space, {
1502
1298
  personal: space === client.spaces.default
1503
- }), t)), /* @__PURE__ */ React21.createElement(ListItem3.Endcap, null, /* @__PURE__ */ React21.createElement(Button7, {
1504
- onClick: () => dispatch(createIntent9(SpaceAction.OpenSettings, {
1299
+ }), t)), /* @__PURE__ */ React17.createElement(ListItem2.Endcap, null, /* @__PURE__ */ React17.createElement(Button7, {
1300
+ onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
1505
1301
  space
1506
1302
  }))
1507
1303
  }, t("open space settings label"))))))));
1508
1304
  };
1509
1305
 
1510
1306
  // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx
1511
- import { pipe as pipe2, Schema as S } from "effect";
1512
- import React22, { useCallback as useCallback13, useMemo as useMemo3, useState as useState11 } from "react";
1513
- import { chain as chain2, createIntent as createIntent10, LayoutAction as LayoutAction8, useIntentDispatcher as useIntentDispatcher10 } from "@dxos/app-framework";
1307
+ import { pipe as pipe2, Schema } from "effect";
1308
+ import React18, { useCallback as useCallback10, useMemo as useMemo3, useState as useState9 } from "react";
1309
+ import { chain as chain2, createIntent as createIntent9, LayoutAction as LayoutAction7, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
1514
1310
  import { log as log3 } from "@dxos/log";
1515
1311
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1516
1312
  import { useClient as useClient7 } from "@dxos/react-client";
1517
1313
  import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
1518
- import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as useTranslation20 } from "@dxos/react-ui";
1519
- import { Form as Form4, ControlItem, ControlItemInput as ControlItemInput2, ControlSection as ControlSection3, ControlPage as ControlPage3 } from "@dxos/react-ui-form";
1314
+ import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as useTranslation17 } from "@dxos/react-ui";
1315
+ import { Form as Form3, ControlItem, ControlItemInput as ControlItemInput2, ControlSection as ControlSection3, ControlPage as ControlPage3 } from "@dxos/react-ui-form";
1520
1316
  import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
1521
1317
  import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
1522
1318
  var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
1523
- var FormSchema = SpaceForm.pipe(S.extend(S.Struct({
1524
- archived: S.Boolean.annotations({
1319
+ var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
1320
+ archived: Schema.Boolean.annotations({
1525
1321
  title: "Archive space"
1526
1322
  })
1527
1323
  })));
1528
1324
  var SpaceSettingsContainer = ({ space }) => {
1529
- const { t } = useTranslation20(SPACE_PLUGIN);
1530
- const { dispatchPromise: dispatch } = useIntentDispatcher10();
1325
+ const { t } = useTranslation17(SPACE_PLUGIN);
1326
+ const { dispatchPromise: dispatch } = useIntentDispatcher9();
1531
1327
  const client = useClient7();
1532
1328
  const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
1533
- const [edgeReplication, setEdgeReplication] = useState11(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1534
- const toggleEdgeReplication = useCallback13(async (next) => {
1329
+ const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1330
+ const toggleEdgeReplication = useCallback10(async (next) => {
1535
1331
  setEdgeReplication(next);
1536
1332
  await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
1537
1333
  log3.catch(err, void 0, {
1538
1334
  F: __dxlog_file5,
1539
- L: 49,
1335
+ L: 51,
1540
1336
  S: void 0,
1541
1337
  C: (f, a) => f(...a)
1542
1338
  });
@@ -1545,7 +1341,7 @@ var SpaceSettingsContainer = ({ space }) => {
1545
1341
  }, [
1546
1342
  space
1547
1343
  ]);
1548
- const handleSave = useCallback13((properties) => {
1344
+ const handleSave = useCallback10((properties) => {
1549
1345
  void toggleEdgeReplication(properties.edgeReplication);
1550
1346
  if (properties.name !== space.properties.name) {
1551
1347
  space.properties.name = properties.name;
@@ -1557,14 +1353,14 @@ var SpaceSettingsContainer = ({ space }) => {
1557
1353
  space.properties.hue = properties.hue;
1558
1354
  }
1559
1355
  if (properties.archived && !archived) {
1560
- void dispatch(pipe2(createIntent10(SpaceAction.Close, {
1356
+ void dispatch(pipe2(createIntent9(SpaceAction.Close, {
1561
1357
  space
1562
- }), chain2(LayoutAction8.SwitchWorkspace, {
1358
+ }), chain2(LayoutAction7.SwitchWorkspace, {
1563
1359
  part: "workspace",
1564
1360
  subject: client.spaces.default.id
1565
1361
  })));
1566
1362
  } else if (!properties.archived && archived) {
1567
- void dispatch(createIntent10(SpaceAction.Open, {
1363
+ void dispatch(createIntent9(SpaceAction.Open, {
1568
1364
  space
1569
1365
  }));
1570
1366
  }
@@ -1588,14 +1384,14 @@ var SpaceSettingsContainer = ({ space }) => {
1588
1384
  ]);
1589
1385
  const customElements = useMemo3(() => ({
1590
1386
  name: ({ type, label, getValue, onValueChange }) => {
1591
- const handleChange = useCallback13(({ target: { value } }) => onValueChange(type, value), [
1387
+ const handleChange = useCallback10(({ target: { value } }) => onValueChange(type, value), [
1592
1388
  onValueChange,
1593
1389
  type
1594
1390
  ]);
1595
- return /* @__PURE__ */ React22.createElement(ControlItemInput2, {
1391
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1596
1392
  title: label,
1597
1393
  description: t("display name description")
1598
- }, /* @__PURE__ */ React22.createElement(Input6.TextInput, {
1394
+ }, /* @__PURE__ */ React18.createElement(Input6.TextInput, {
1599
1395
  value: getValue(),
1600
1396
  onChange: handleChange,
1601
1397
  placeholder: t("display name input placeholder"),
@@ -1603,18 +1399,18 @@ var SpaceSettingsContainer = ({ space }) => {
1603
1399
  }));
1604
1400
  },
1605
1401
  icon: ({ type, label, getValue, onValueChange }) => {
1606
- const handleChange = useCallback13((nextEmoji) => onValueChange(type, nextEmoji), [
1402
+ const handleChange = useCallback10((nextEmoji) => onValueChange(type, nextEmoji), [
1607
1403
  onValueChange,
1608
1404
  type
1609
1405
  ]);
1610
- const handleEmojiReset = useCallback13(() => onValueChange(type, void 0), [
1406
+ const handleEmojiReset = useCallback10(() => onValueChange(type, void 0), [
1611
1407
  onValueChange,
1612
1408
  type
1613
1409
  ]);
1614
- return /* @__PURE__ */ React22.createElement(ControlItem, {
1410
+ return /* @__PURE__ */ React18.createElement(ControlItem, {
1615
1411
  title: label,
1616
1412
  description: t("icon description")
1617
- }, /* @__PURE__ */ React22.createElement(IconPicker, {
1413
+ }, /* @__PURE__ */ React18.createElement(IconPicker, {
1618
1414
  value: getValue(),
1619
1415
  onChange: handleChange,
1620
1416
  onReset: handleEmojiReset,
@@ -1623,18 +1419,18 @@ var SpaceSettingsContainer = ({ space }) => {
1623
1419
  }));
1624
1420
  },
1625
1421
  hue: ({ type, label, getValue, onValueChange }) => {
1626
- const handleChange = useCallback13((nextHue) => onValueChange(type, nextHue), [
1422
+ const handleChange = useCallback10((nextHue) => onValueChange(type, nextHue), [
1627
1423
  onValueChange,
1628
1424
  type
1629
1425
  ]);
1630
- const handleHueReset = useCallback13(() => onValueChange(type, void 0), [
1426
+ const handleHueReset = useCallback10(() => onValueChange(type, void 0), [
1631
1427
  onValueChange,
1632
1428
  type
1633
1429
  ]);
1634
- return /* @__PURE__ */ React22.createElement(ControlItem, {
1430
+ return /* @__PURE__ */ React18.createElement(ControlItem, {
1635
1431
  title: label,
1636
1432
  description: t("hue description")
1637
- }, /* @__PURE__ */ React22.createElement(HuePicker, {
1433
+ }, /* @__PURE__ */ React18.createElement(HuePicker, {
1638
1434
  value: getValue(),
1639
1435
  onChange: handleChange,
1640
1436
  onReset: handleHueReset,
@@ -1642,29 +1438,29 @@ var SpaceSettingsContainer = ({ space }) => {
1642
1438
  }));
1643
1439
  },
1644
1440
  edgeReplication: ({ type, label, getValue, onValueChange }) => {
1645
- const handleChange = useCallback13((checked) => onValueChange(type, checked), [
1441
+ const handleChange = useCallback10((checked) => onValueChange(type, checked), [
1646
1442
  onValueChange,
1647
1443
  type
1648
1444
  ]);
1649
- return /* @__PURE__ */ React22.createElement(ControlItemInput2, {
1445
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1650
1446
  title: label,
1651
1447
  description: t("edge replication description")
1652
- }, /* @__PURE__ */ React22.createElement(Input6.Switch, {
1448
+ }, /* @__PURE__ */ React18.createElement(Input6.Switch, {
1653
1449
  checked: getValue(),
1654
1450
  onCheckedChange: handleChange,
1655
1451
  classNames: "justify-self-end"
1656
1452
  }));
1657
1453
  },
1658
1454
  archived: ({ type, label, getValue, onValueChange }) => {
1659
- const handleChange = useCallback13(() => onValueChange(type, !getValue()), [
1455
+ const handleChange = useCallback10(() => onValueChange(type, !getValue()), [
1660
1456
  onValueChange,
1661
1457
  type,
1662
1458
  getValue
1663
1459
  ]);
1664
- return /* @__PURE__ */ React22.createElement(ControlItemInput2, {
1460
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1665
1461
  title: label,
1666
1462
  description: t("archive space description")
1667
- }, /* @__PURE__ */ React22.createElement(Button8, {
1463
+ }, /* @__PURE__ */ React18.createElement(Button8, {
1668
1464
  disabled: space === client.spaces.default,
1669
1465
  onClick: handleChange
1670
1466
  }, getValue() ? t("unarchive space label") : t("archive space label")));
@@ -1673,16 +1469,16 @@ var SpaceSettingsContainer = ({ space }) => {
1673
1469
  t,
1674
1470
  space
1675
1471
  ]);
1676
- return /* @__PURE__ */ React22.createElement(StackItem4.Content, {
1472
+ return /* @__PURE__ */ React18.createElement(StackItem4.Content, {
1677
1473
  classNames: "block overflow-y-auto pli-2"
1678
- }, /* @__PURE__ */ React22.createElement(ControlPage3, null, /* @__PURE__ */ React22.createElement(ControlSection3, {
1474
+ }, /* @__PURE__ */ React18.createElement(ControlPage3, null, /* @__PURE__ */ React18.createElement(ControlSection3, {
1679
1475
  title: t("space properties settings verbose label", {
1680
1476
  ns: SPACE_PLUGIN
1681
1477
  }),
1682
1478
  description: t("space properties settings description", {
1683
1479
  ns: SPACE_PLUGIN
1684
1480
  })
1685
- }, /* @__PURE__ */ React22.createElement(Form4, {
1481
+ }, /* @__PURE__ */ React18.createElement(Form3, {
1686
1482
  schema: FormSchema,
1687
1483
  values,
1688
1484
  autoSave: true,
@@ -1693,18 +1489,19 @@ var SpaceSettingsContainer = ({ space }) => {
1693
1489
  };
1694
1490
 
1695
1491
  // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1696
- import React23, { useEffect as useEffect6, useState as useState12 } from "react";
1492
+ import { Option as Option2 } from "effect";
1493
+ import React19, { useEffect as useEffect5, useState as useState10 } from "react";
1697
1494
  import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1698
1495
  import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
1699
1496
  import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1700
1497
  import { useClient as useClient8 } from "@dxos/react-client";
1701
1498
  import { useSpaceSyncState } from "@dxos/react-client/echo";
1702
- import { Tooltip as Tooltip3, useTranslation as useTranslation21 } from "@dxos/react-ui";
1499
+ import { Tooltip as Tooltip3, useTranslation as useTranslation18 } from "@dxos/react-ui";
1703
1500
  import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1704
1501
  var useEdgeStatus = () => {
1705
- const [status, setStatus] = useState12(EdgeStatus.NOT_CONNECTED);
1502
+ const [status, setStatus] = useState10(EdgeStatus.NOT_CONNECTED);
1706
1503
  const client = useClient8();
1707
- useEffect6(() => {
1504
+ useEffect5(() => {
1708
1505
  client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
1709
1506
  setStatus(status2);
1710
1507
  });
@@ -1714,7 +1511,7 @@ var useEdgeStatus = () => {
1714
1511
  return status;
1715
1512
  };
1716
1513
  var InlineSyncStatus = ({ space, open }) => {
1717
- const { t } = useTranslation21(SPACE_PLUGIN);
1514
+ const { t } = useTranslation18(SPACE_PLUGIN);
1718
1515
  const id = space.id;
1719
1516
  const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1720
1517
  const isAttended = hasAttention || isAncestor || isRelated;
@@ -1722,30 +1519,29 @@ var InlineSyncStatus = ({ space, open }) => {
1722
1519
  const attended = useAttended2();
1723
1520
  const startOfAttention = attended.at(-1);
1724
1521
  const path = usePath(graph, startOfAttention);
1725
- const containsAttended = !open && !isAttended && id && path ? path.includes(id) : false;
1522
+ const containsAttended = !open && !isAttended && id && Option2.isSome(path) ? path.value.includes(id) : false;
1726
1523
  const connectedToEdge = useEdgeStatus() === EdgeStatus.CONNECTED;
1727
1524
  const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
1728
1525
  const syncState = useSpaceSyncState(space);
1729
1526
  const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
1730
- return /* @__PURE__ */ React23.createElement(Tooltip3.Root, null, /* @__PURE__ */ React23.createElement(Tooltip3.Trigger, {
1731
- asChild: true
1732
- }, /* @__PURE__ */ React23.createElement(AttentionGlyph2, {
1527
+ return /* @__PURE__ */ React19.createElement(Tooltip3.Trigger, {
1528
+ asChild: true,
1529
+ content: t("syncing label"),
1530
+ side: "bottom"
1531
+ }, /* @__PURE__ */ React19.createElement(AttentionGlyph2, {
1733
1532
  syncing,
1734
1533
  attended: isAttended,
1735
1534
  containsAttended,
1736
1535
  classNames: "self-center mie-1"
1737
- })), /* @__PURE__ */ React23.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React23.createElement(Tooltip3.Content, {
1738
- side: "bottom",
1739
- classNames: "z-[70]"
1740
- }, /* @__PURE__ */ React23.createElement("span", null, t("syncing label")), /* @__PURE__ */ React23.createElement(Tooltip3.Arrow, null))));
1536
+ }));
1741
1537
  };
1742
1538
 
1743
1539
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1744
- import React24, { useEffect as useEffect7, useState as useState13 } from "react";
1540
+ import React20, { useEffect as useEffect6, useState as useState11 } from "react";
1745
1541
  import { StatusBar } from "@dxos/plugin-status-bar";
1746
1542
  import { useClient as useClient9 } from "@dxos/react-client";
1747
1543
  import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
1748
- import { Icon as Icon5, useTranslation as useTranslation22 } from "@dxos/react-ui";
1544
+ import { Icon as Icon5, useTranslation as useTranslation19 } from "@dxos/react-ui";
1749
1545
 
1750
1546
  // packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
1751
1547
  import { Context } from "@dxos/context";
@@ -1843,19 +1639,19 @@ var SYNC_STALLED_TIMEOUT = 5e3;
1843
1639
  var SyncStatus = () => {
1844
1640
  const client = useClient9();
1845
1641
  const state = useSyncState();
1846
- const [saved, setSaved] = useState13(true);
1847
- useEffect7(() => {
1642
+ const [saved, setSaved] = useState11(true);
1643
+ useEffect6(() => {
1848
1644
  return createClientSaveTracker(client, (state2) => {
1849
1645
  setSaved(state2 === "saved");
1850
1646
  });
1851
1647
  }, []);
1852
- return /* @__PURE__ */ React24.createElement(SyncStatusIndicator, {
1648
+ return /* @__PURE__ */ React20.createElement(SyncStatusIndicator, {
1853
1649
  state,
1854
1650
  saved
1855
1651
  });
1856
1652
  };
1857
1653
  var SyncStatusIndicator = ({ state, saved }) => {
1858
- const { t } = useTranslation22(SPACE_PLUGIN);
1654
+ const { t } = useTranslation19(SPACE_PLUGIN);
1859
1655
  const summary = getSyncSummary(state);
1860
1656
  const offline = Object.values(state).length === 0;
1861
1657
  const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
@@ -1866,8 +1662,8 @@ var SyncStatusIndicator = ({ state, saved }) => {
1866
1662
  needsToUpload,
1867
1663
  needsToDownload
1868
1664
  });
1869
- const [classNames, setClassNames] = useState13();
1870
- useEffect7(() => {
1665
+ const [classNames, setClassNames] = useState11();
1666
+ useEffect6(() => {
1871
1667
  setClassNames(void 0);
1872
1668
  if (offline || !needsToUpload && !needsToDownload) {
1873
1669
  return;
@@ -1882,12 +1678,12 @@ var SyncStatusIndicator = ({ state, saved }) => {
1882
1678
  needsToDownload
1883
1679
  ]);
1884
1680
  const title = t(`${status} label`);
1885
- const icon = /* @__PURE__ */ React24.createElement(Icon5, {
1681
+ const icon = /* @__PURE__ */ React20.createElement(Icon5, {
1886
1682
  icon: getIcon(status),
1887
1683
  size: 4,
1888
1684
  classNames
1889
1685
  });
1890
- return /* @__PURE__ */ React24.createElement(StatusBar.Item, {
1686
+ return /* @__PURE__ */ React20.createElement(StatusBar.Item, {
1891
1687
  title
1892
1688
  }, icon);
1893
1689
  };
@@ -1906,8 +1702,6 @@ export {
1906
1702
  MenuFooter,
1907
1703
  ObjectSettingsContainer,
1908
1704
  PersistenceStatus,
1909
- POPOVER_ADD_SPACE,
1910
- PopoverAddSpace,
1911
1705
  POPOVER_RENAME_OBJECT,
1912
1706
  PopoverRenameObject,
1913
1707
  POPOVER_RENAME_SPACE,
@@ -1929,10 +1723,10 @@ export {
1929
1723
  IntentResolver,
1930
1724
  ReactRoot,
1931
1725
  ReactSurface,
1932
- Schema,
1933
- Tools,
1726
+ SchemaDefs,
1727
+ SchemaTools,
1934
1728
  SpaceSettings,
1935
1729
  SpaceState,
1936
1730
  SpacesReady
1937
1731
  };
1938
- //# sourceMappingURL=chunk-PQI4D4SH.mjs.map
1732
+ //# sourceMappingURL=chunk-FI3WV22Y.mjs.map