@dxos/plugin-space 0.8.2-main.f081794 → 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 (283) 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-6WIAFHYK.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-MHTZAZT2.mjs → chunk-43UQWMD3.mjs} +327 -535
  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-FSHDAPFY.mjs → chunk-IQFFOAWD.mjs} +24 -38
  12. package/dist/lib/browser/chunk-IQFFOAWD.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-MIJHUABE.mjs → chunk-UBSVH2NQ.mjs} +3 -4
  14. package/dist/lib/browser/chunk-UBSVH2NQ.mjs.map +7 -0
  15. package/dist/lib/browser/{identity-created-DVHNLGYU.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 +24 -23
  18. package/dist/lib/browser/index.mjs.map +3 -3
  19. package/dist/lib/browser/{intent-resolver-72IWBVYE.mjs → intent-resolver-KRINV5QI.mjs} +90 -94
  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-DRVM5ACV.mjs → react-root-J3SP2HVW.mjs} +5 -4
  23. package/dist/lib/browser/{react-surface-KODNQYDN.mjs → react-surface-J7T2IMH4.mjs} +6 -30
  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-2UIV5WX5.mjs → settings-G24447B7.mjs} +2 -2
  30. package/dist/lib/browser/{spaces-ready-3URIMLCR.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-GOLCQHFQ.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-EI3ZPOLJ.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-GPZPEQXP.cjs → chunk-MXBE2VET.cjs} +351 -550
  46. package/dist/lib/node/chunk-MXBE2VET.cjs.map +7 -0
  47. package/dist/lib/node/{chunk-U63V2254.cjs → chunk-SCATWJKX.cjs} +46 -61
  48. package/dist/lib/node/chunk-SCATWJKX.cjs.map +7 -0
  49. package/dist/lib/node/{identity-created-YYTW4K3Z.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 +74 -74
  52. package/dist/lib/node/index.cjs.map +3 -3
  53. package/dist/lib/node/{intent-resolver-KA56XGUX.cjs → intent-resolver-MJVRY6YE.cjs} +133 -136
  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-6WGN5WRQ.cjs → react-root-M4BZ6VXB.cjs} +9 -8
  57. package/dist/lib/node/{react-root-6WGN5WRQ.cjs.map → react-root-M4BZ6VXB.cjs.map} +1 -1
  58. package/dist/lib/node/{react-surface-37AVZFPL.cjs → react-surface-RYKSYYKM.cjs} +42 -64
  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-HJROTHC4.cjs → settings-AFWO4AWK.cjs} +6 -6
  65. package/dist/lib/node/{spaces-ready-IWDDIAAD.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-AZXSO7HK.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-DUA32XUX.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-ABKX22IP.mjs → chunk-FI3WV22Y.mjs} +327 -535
  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-TVN6VHTT.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-MP4GLXHO.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 +24 -23
  88. package/dist/lib/node-esm/index.mjs.map +3 -3
  89. package/dist/lib/node-esm/{intent-resolver-SG2ECM5R.mjs → intent-resolver-JT6EB47M.mjs} +90 -94
  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-MSUT6S2S.mjs → react-root-S2LW4FS7.mjs} +5 -4
  93. package/dist/lib/{browser/react-root-DRVM5ACV.mjs.map → node-esm/react-root-S2LW4FS7.mjs.map} +1 -1
  94. package/dist/lib/node-esm/{react-surface-G73SO23W.mjs → react-surface-ZNNMO7QQ.mjs} +6 -30
  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-KCLKPJVY.mjs → settings-MJVSCOI4.mjs} +2 -2
  101. package/dist/lib/node-esm/{spaces-ready-Z3SXKWX2.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 +9 -184
  114. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  115. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -3
  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 -2
  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 +205 -110
  173. package/dist/types/src/types/thread.d.ts.map +1 -1
  174. package/dist/types/src/types/types.d.ts +154 -142
  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 +9 -8
  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 +85 -95
  186. package/src/capabilities/react-surface.tsx +17 -38
  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/CollectionMain.tsx +2 -5
  194. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +2 -2
  195. package/src/components/CreateDialog/CreateObjectDialog.tsx +1 -1
  196. package/src/components/CreateDialog/CreateSpaceDialog.tsx +2 -3
  197. package/src/components/MembersContainer.stories.tsx +1 -5
  198. package/src/components/MembersContainer.tsx +23 -15
  199. package/src/components/MenuFooter.tsx +2 -2
  200. package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +2 -2
  201. package/src/components/ObjectSettings/BaseObjectSettings.tsx +2 -2
  202. package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -4
  203. package/src/components/PersistenceStatus.tsx +11 -14
  204. package/src/components/PopoverRenameObject.tsx +12 -6
  205. package/src/components/PopoverRenameSpace.tsx +8 -0
  206. package/src/components/SpacePresence.stories.tsx +1 -1
  207. package/src/components/SpacePresence.tsx +34 -43
  208. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +5 -3
  209. package/src/components/SyncStatus/InlineSyncStatus.tsx +10 -17
  210. package/src/components/index.ts +0 -2
  211. package/src/hooks/index.ts +1 -0
  212. package/src/hooks/useActiveSpace.ts +20 -0
  213. package/src/hooks/useInputSurfaceLookup.tsx +2 -2
  214. package/src/hooks/usePath.ts +9 -6
  215. package/src/index.ts +1 -0
  216. package/src/translations.ts +1 -2
  217. package/src/types/collection.ts +6 -4
  218. package/src/types/thread.ts +14 -8
  219. package/src/types/types.ts +109 -96
  220. package/src/util.tsx +36 -73
  221. package/dist/lib/browser/app-graph-builder-J4PN5HOM.mjs +0 -369
  222. package/dist/lib/browser/app-graph-builder-J4PN5HOM.mjs.map +0 -7
  223. package/dist/lib/browser/app-graph-serializer-6WIAFHYK.mjs.map +0 -7
  224. package/dist/lib/browser/chunk-FSHDAPFY.mjs.map +0 -7
  225. package/dist/lib/browser/chunk-KDNV4YRD.mjs +0 -283
  226. package/dist/lib/browser/chunk-KDNV4YRD.mjs.map +0 -7
  227. package/dist/lib/browser/chunk-MHTZAZT2.mjs.map +0 -7
  228. package/dist/lib/browser/chunk-MIJHUABE.mjs.map +0 -7
  229. package/dist/lib/browser/identity-created-DVHNLGYU.mjs.map +0 -7
  230. package/dist/lib/browser/intent-resolver-72IWBVYE.mjs.map +0 -7
  231. package/dist/lib/browser/react-surface-KODNQYDN.mjs.map +0 -7
  232. package/dist/lib/browser/schema-FHTA26SW.mjs +0 -24
  233. package/dist/lib/browser/schema-FHTA26SW.mjs.map +0 -7
  234. package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
  235. package/dist/lib/browser/spaces-ready-3URIMLCR.mjs.map +0 -7
  236. package/dist/lib/browser/state-CYV6QCTN.mjs.map +0 -7
  237. package/dist/lib/node/app-graph-builder-3BNPC5GB.cjs +0 -371
  238. package/dist/lib/node/app-graph-builder-3BNPC5GB.cjs.map +0 -7
  239. package/dist/lib/node/app-graph-serializer-GOLCQHFQ.cjs.map +0 -7
  240. package/dist/lib/node/chunk-3UKLWXNJ.cjs +0 -311
  241. package/dist/lib/node/chunk-3UKLWXNJ.cjs.map +0 -7
  242. package/dist/lib/node/chunk-EI3ZPOLJ.cjs.map +0 -7
  243. package/dist/lib/node/chunk-GPZPEQXP.cjs.map +0 -7
  244. package/dist/lib/node/chunk-U63V2254.cjs.map +0 -7
  245. package/dist/lib/node/identity-created-YYTW4K3Z.cjs.map +0 -7
  246. package/dist/lib/node/intent-resolver-KA56XGUX.cjs.map +0 -7
  247. package/dist/lib/node/react-surface-37AVZFPL.cjs.map +0 -7
  248. package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +0 -7
  249. package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
  250. package/dist/lib/node/spaces-ready-IWDDIAAD.cjs.map +0 -7
  251. package/dist/lib/node/state-JLN7TGRR.cjs.map +0 -7
  252. package/dist/lib/node-esm/app-graph-builder-OVMSUAX3.mjs +0 -370
  253. package/dist/lib/node-esm/app-graph-builder-OVMSUAX3.mjs.map +0 -7
  254. package/dist/lib/node-esm/app-graph-serializer-AZXSO7HK.mjs.map +0 -7
  255. package/dist/lib/node-esm/chunk-35OHQARN.mjs +0 -284
  256. package/dist/lib/node-esm/chunk-35OHQARN.mjs.map +0 -7
  257. package/dist/lib/node-esm/chunk-ABKX22IP.mjs.map +0 -7
  258. package/dist/lib/node-esm/chunk-DUA32XUX.mjs.map +0 -7
  259. package/dist/lib/node-esm/chunk-TVN6VHTT.mjs.map +0 -7
  260. package/dist/lib/node-esm/identity-created-MP4GLXHO.mjs.map +0 -7
  261. package/dist/lib/node-esm/intent-resolver-SG2ECM5R.mjs.map +0 -7
  262. package/dist/lib/node-esm/react-surface-G73SO23W.mjs.map +0 -7
  263. package/dist/lib/node-esm/schema-OUZKVYM5.mjs +0 -25
  264. package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +0 -7
  265. package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
  266. package/dist/lib/node-esm/spaces-ready-Z3SXKWX2.mjs.map +0 -7
  267. package/dist/lib/node-esm/state-YZPY5T5A.mjs.map +0 -7
  268. package/dist/types/src/capabilities/schema.d.ts +0 -4
  269. package/dist/types/src/capabilities/schema.d.ts.map +0 -1
  270. package/dist/types/src/components/PopoverAddSpace.d.ts +0 -4
  271. package/dist/types/src/components/PopoverAddSpace.d.ts.map +0 -1
  272. package/dist/types/src/components/ShareSpaceButton.d.ts +0 -9
  273. package/dist/types/src/components/ShareSpaceButton.d.ts.map +0 -1
  274. package/dist/types/src/components/ShareSpaceButton.stories.d.ts +0 -10
  275. package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +0 -1
  276. package/src/capabilities/schema.ts +0 -27
  277. package/src/components/PopoverAddSpace.tsx +0 -52
  278. package/src/components/ShareSpaceButton.stories.tsx +0 -27
  279. package/src/components/ShareSpaceButton.tsx +0 -32
  280. /package/dist/lib/{node-esm/react-root-MSUT6S2S.mjs.map → browser/react-root-J3SP2HVW.mjs.map} +0 -0
  281. /package/dist/lib/browser/{settings-2UIV5WX5.mjs.map → settings-G24447B7.mjs.map} +0 -0
  282. /package/dist/lib/node/{settings-HJROTHC4.cjs.map → settings-AFWO4AWK.cjs.map} +0 -0
  283. /package/dist/lib/node-esm/{settings-KCLKPJVY.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-TVN6VHTT.mjs";
12
+ } from "./chunk-S2W6HS4A.mjs";
9
13
  import {
10
14
  CollectionType,
11
15
  SpaceAction,
12
16
  SpaceForm
13
- } from "./chunk-35OHQARN.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-OVMSUAX3.mjs"));
344
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-AZXSO7HK.mjs"));
345
- var IdentityCreated = lazy(() => import("./identity-created-MP4GLXHO.mjs"));
346
- var IntentResolver = lazy(() => import("./intent-resolver-SG2ECM5R.mjs"));
347
- var ReactRoot = lazy(() => import("./react-root-MSUT6S2S.mjs"));
348
- var ReactSurface = lazy(() => import("./react-surface-G73SO23W.mjs"));
349
- var Schema = lazy(() => import("./schema-OUZKVYM5.mjs"));
350
- var Tools = lazy(() => import("./schema-tools-IU7EX5A5.mjs"));
351
- var SpaceSettings = lazy(() => import("./settings-KCLKPJVY.mjs"));
352
- var SpaceState = lazy(() => import("./state-YZPY5T5A.mjs"));
353
- var SpacesReady = lazy(() => import("./spaces-ready-Z3SXKWX2.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
- import { baseSurface, descriptionText, mx as mx3 } from "@dxos/react-ui-theme";
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
- className: mx3(descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
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,8 +576,9 @@ 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";
581
+ import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
643
582
  import { log } from "@dxos/log";
644
583
  import { useConfig } from "@dxos/react-client";
645
584
  import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
@@ -660,7 +599,7 @@ var handleInvitationEvent = (invitation, subscription) => {
660
599
  authCode: invitation.authCode
661
600
  }), void 0, {
662
601
  F: __dxlog_file3,
663
- L: 39,
602
+ L: 40,
664
603
  S: void 0,
665
604
  C: (f, a) => f(...a)
666
605
  });
@@ -670,18 +609,19 @@ var handleInvitationEvent = (invitation, subscription) => {
670
609
  var MembersContainer = ({ space, createInvitationUrl }) => {
671
610
  const { t } = useTranslation8(SPACE_PLUGIN);
672
611
  const config = useConfig();
612
+ const { dispatchPromise: dispatch } = useIntentDispatcher5();
673
613
  const invitations = useSpaceInvitations(space.key);
674
614
  const visibleInvitations = invitations?.filter((invitation) => ![
675
615
  Invitation.State.CANCELLED
676
616
  ].includes(invitation.get().state));
677
- const [activeAction, setInternalActiveAction] = useState4(localStorage.getItem(activeActionKey) ?? "inviteMany");
617
+ const [activeAction, setInternalActiveAction] = useState3(localStorage.getItem(activeActionKey) ?? "inviteMany");
678
618
  const setActiveAction = (nextAction) => {
679
619
  setInternalActiveAction(nextAction);
680
620
  localStorage.setItem(activeActionKey, nextAction);
681
621
  };
682
622
  const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
683
623
  const locked = space.properties[COMPOSER_SPACE_LOCK];
684
- const handleChangeLocked = useCallback7(() => {
624
+ const handleChangeLocked = useCallback6(() => {
685
625
  space.properties[COMPOSER_SPACE_LOCK] = !locked;
686
626
  }, [
687
627
  locked,
@@ -695,18 +635,19 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
695
635
  description: t("invite one description", {
696
636
  ns: "os"
697
637
  }),
698
- icon: () => /* @__PURE__ */ React9.createElement(Icon4, {
638
+ icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
699
639
  icon: "ph--user-plus--regular",
700
640
  size: 5
701
641
  }),
702
642
  testId: "membersContainer.inviteOne",
703
- onClick: () => {
704
- const invitation = space.share?.({
643
+ onClick: async () => {
644
+ const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
645
+ space,
705
646
  type: Invitation.Type.INTERACTIVE,
706
647
  authMethod: Invitation.AuthMethod.SHARED_SECRET,
707
648
  multiUse: false,
708
649
  target: target && fullyQualifiedId2(target)
709
- });
650
+ }));
710
651
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
711
652
  const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
712
653
  }
@@ -719,18 +660,19 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
719
660
  description: t("invite many description", {
720
661
  ns: "os"
721
662
  }),
722
- icon: () => /* @__PURE__ */ React9.createElement(Icon4, {
663
+ icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
723
664
  icon: "ph--users-three--regular",
724
665
  size: 5
725
666
  }),
726
667
  testId: "membersContainer.inviteMany",
727
- onClick: () => {
728
- const invitation = space.share?.({
668
+ onClick: async () => {
669
+ const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
670
+ space,
729
671
  type: Invitation.Type.DELEGATED,
730
672
  authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
731
673
  multiUse: true,
732
674
  target: target && fullyQualifiedId2(target)
733
- });
675
+ }));
734
676
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
735
677
  const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
736
678
  }
@@ -741,51 +683,51 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
741
683
  space,
742
684
  target
743
685
  ]);
744
- const [selectedInvitation, setSelectedInvitation] = useState4(null);
686
+ const [selectedInvitation, setSelectedInvitation] = useState3(null);
745
687
  const handleSend = (event) => {
746
688
  setSelectedInvitation(event.invitation);
747
689
  };
748
690
  const handleBack = () => {
749
691
  setSelectedInvitation(null);
750
692
  };
751
- 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, {
752
694
  classNames: "block overflow-y-auto"
753
- }, /* @__PURE__ */ React9.createElement(ControlPage, null, /* @__PURE__ */ React9.createElement(ControlSection, {
695
+ }, /* @__PURE__ */ React8.createElement(ControlPage, null, /* @__PURE__ */ React8.createElement(ControlSection, {
754
696
  title: t("members verbose label"),
755
697
  description: t("members description")
756
- }, /* @__PURE__ */ React9.createElement(ControlFrame, null, /* @__PURE__ */ React9.createElement(ControlFrameItem, {
698
+ }, /* @__PURE__ */ React8.createElement(ControlFrame, null, /* @__PURE__ */ React8.createElement(ControlFrameItem, {
757
699
  title: t("members label")
758
- }, /* @__PURE__ */ React9.createElement(SpaceMemberList, {
700
+ }, /* @__PURE__ */ React8.createElement(SpaceMemberList, {
759
701
  spaceKey: space.key,
760
702
  includeSelf: true
761
- })), locked && /* @__PURE__ */ React9.createElement(ControlFrameItem, {
703
+ })), locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
762
704
  title: t("invitations label")
763
- }, /* @__PURE__ */ React9.createElement("p", {
705
+ }, /* @__PURE__ */ React8.createElement("p", {
764
706
  className: "text-description mbe-2"
765
- }, t("locked space description"))), !locked && /* @__PURE__ */ React9.createElement(ControlFrameItem, {
707
+ }, t("locked space description"))), !locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
766
708
  title: t("invitations label")
767
- }, selectedInvitation && /* @__PURE__ */ React9.createElement(InvitationSection, {
709
+ }, selectedInvitation && /* @__PURE__ */ React8.createElement(InvitationSection, {
768
710
  ...selectedInvitation,
769
711
  onBack: handleBack
770
- }), !selectedInvitation && /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("p", {
712
+ }), !selectedInvitation && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
771
713
  className: "text-description mbe-2"
772
- }, t("space invitation description")), /* @__PURE__ */ React9.createElement(InvitationList, {
714
+ }, t("space invitation description")), /* @__PURE__ */ React8.createElement(InvitationList, {
773
715
  className: "mb-2",
774
716
  send: handleSend,
775
717
  invitations: visibleInvitations ?? [],
776
718
  onClickRemove: (invitation) => invitation.cancel(),
777
719
  createInvitationUrl
778
- }), /* @__PURE__ */ React9.createElement(BifurcatedAction, {
720
+ }), /* @__PURE__ */ React8.createElement(BifurcatedAction, {
779
721
  actions: inviteActions,
780
722
  activeAction,
781
723
  onChangeActiveAction: setActiveAction,
782
724
  "data-testid": "membersContainer.createInvitation"
783
- })))), /* @__PURE__ */ React9.createElement("div", {
725
+ })))), /* @__PURE__ */ React8.createElement("div", {
784
726
  className: "justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
785
- }, /* @__PURE__ */ React9.createElement(ControlItemInput, {
727
+ }, /* @__PURE__ */ React8.createElement(ControlItemInput, {
786
728
  title: t("space locked label"),
787
729
  description: t("space locked description")
788
- }, /* @__PURE__ */ React9.createElement(Input.Switch, {
730
+ }, /* @__PURE__ */ React8.createElement(Input.Switch, {
789
731
  checked: locked,
790
732
  onCheckedChange: handleChangeLocked,
791
733
  classNames: "justify-self-end"
@@ -793,23 +735,23 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
793
735
  };
794
736
  var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
795
737
  const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
796
- return /* @__PURE__ */ React9.createElement(Viewport.Root, {
738
+ return /* @__PURE__ */ React8.createElement(Viewport.Root, {
797
739
  activeView
798
- }, /* @__PURE__ */ React9.createElement(Viewport.Views, null, /* @__PURE__ */ React9.createElement(Viewport.View, {
740
+ }, /* @__PURE__ */ React8.createElement(Viewport.Views, null, /* @__PURE__ */ React8.createElement(Viewport.View, {
799
741
  id: "init"
800
- }), /* @__PURE__ */ React9.createElement(Viewport.View, {
742
+ }), /* @__PURE__ */ React8.createElement(Viewport.View, {
801
743
  id: "complete"
802
- }, /* @__PURE__ */ React9.createElement(InvitationComplete, {
744
+ }, /* @__PURE__ */ React8.createElement(InvitationComplete, {
803
745
  statusValue: state
804
- })), /* @__PURE__ */ React9.createElement(Viewport.View, {
746
+ })), /* @__PURE__ */ React8.createElement(Viewport.View, {
805
747
  id: "auth-code"
806
- }, /* @__PURE__ */ React9.createElement(InvitationAuthCode, {
748
+ }, /* @__PURE__ */ React8.createElement(InvitationAuthCode, {
807
749
  id: invitationId,
808
750
  code: authCode ?? "never",
809
751
  onCancel: onBack
810
- })), /* @__PURE__ */ React9.createElement(Viewport.View, {
752
+ })), /* @__PURE__ */ React8.createElement(Viewport.View, {
811
753
  id: "qr-code"
812
- }, /* @__PURE__ */ React9.createElement(InvitationQR, {
754
+ }, /* @__PURE__ */ React8.createElement(InvitationQR, {
813
755
  id: invitationId,
814
756
  url,
815
757
  onCancel: onBack
@@ -819,31 +761,31 @@ var InvitationQR = ({ id, url, onCancel }) => {
819
761
  const { t } = useTranslation8("os");
820
762
  const qrLabel = useId("members-container__qr-code");
821
763
  const emoji = hexToEmoji(id);
822
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("p", {
764
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
823
765
  className: "text-description"
824
766
  }, t("qr code description", {
825
767
  ns: SPACE_PLUGIN
826
- })), /* @__PURE__ */ React9.createElement("div", {
768
+ })), /* @__PURE__ */ React8.createElement("div", {
827
769
  role: "group",
828
770
  className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
829
- }, /* @__PURE__ */ React9.createElement("div", {
771
+ }, /* @__PURE__ */ React8.createElement("div", {
830
772
  role: "none",
831
773
  className: "is-full aspect-square relative text-description"
832
- }, /* @__PURE__ */ React9.createElement(QR, {
774
+ }, /* @__PURE__ */ React8.createElement(QR, {
833
775
  rounding: 100,
834
776
  backgroundColor: "transparent",
835
777
  color: "currentColor",
836
778
  "aria-labelledby": qrLabel,
837
779
  errorCorrectionLevel: "Q",
838
780
  cutout: true
839
- }, url ?? "never"), /* @__PURE__ */ React9.createElement(Centered, null, /* @__PURE__ */ React9.createElement(Emoji, {
781
+ }, url ?? "never"), /* @__PURE__ */ React8.createElement(Centered, null, /* @__PURE__ */ React8.createElement(Emoji, {
840
782
  text: emoji
841
- }))), /* @__PURE__ */ React9.createElement("span", {
783
+ }))), /* @__PURE__ */ React8.createElement("span", {
842
784
  id: qrLabel,
843
785
  className: "sr-only"
844
- }, t("qr label")), /* @__PURE__ */ React9.createElement(Clipboard.Button, {
786
+ }, t("qr label")), /* @__PURE__ */ React8.createElement(Clipboard.Button, {
845
787
  value: url ?? "never"
846
- })), /* @__PURE__ */ React9.createElement(Button4, {
788
+ })), /* @__PURE__ */ React8.createElement(Button4, {
847
789
  variant: "ghost",
848
790
  onClick: onCancel
849
791
  }, t("cancel label")));
@@ -851,33 +793,33 @@ var InvitationQR = ({ id, url, onCancel }) => {
851
793
  var InvitationAuthCode = ({ id, code, onCancel }) => {
852
794
  const { t } = useTranslation8("os");
853
795
  const emoji = hexToEmoji(id);
854
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("p", {
796
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
855
797
  className: "text-description"
856
- }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React9.createElement(Emoji, {
798
+ }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React8.createElement(Emoji, {
857
799
  text: emoji,
858
800
  className: "mli-auto mlb-2 text-center"
859
- }), /* @__PURE__ */ React9.createElement("p", {
801
+ }), /* @__PURE__ */ React8.createElement("p", {
860
802
  className: "text-description"
861
- }, t("auth code message")), /* @__PURE__ */ React9.createElement(AuthCode, {
803
+ }, t("auth code message")), /* @__PURE__ */ React8.createElement(AuthCode, {
862
804
  code,
863
805
  large: true,
864
806
  classNames: "mli-auto mlb-2 text-center grow"
865
- }), /* @__PURE__ */ React9.createElement(Button4, {
807
+ }), /* @__PURE__ */ React8.createElement(Button4, {
866
808
  variant: "ghost",
867
809
  onClick: onCancel
868
810
  }, t("cancel label")));
869
811
  };
870
812
  var InvitationComplete = ({ statusValue }) => {
871
- return statusValue > 0 ? /* @__PURE__ */ React9.createElement(Check, {
813
+ return statusValue > 0 ? /* @__PURE__ */ React8.createElement(Check, {
872
814
  className: mx4("m-1.5", getSize2(6))
873
- }) : /* @__PURE__ */ React9.createElement(X, {
815
+ }) : /* @__PURE__ */ React8.createElement(X, {
874
816
  className: mx4("m-1.5", getSize2(6))
875
817
  });
876
818
  };
877
819
 
878
820
  // packages/plugins/plugin-space/src/components/MenuFooter.tsx
879
821
  import { Planet } from "@phosphor-icons/react";
880
- import React10 from "react";
822
+ import React9 from "react";
881
823
  import { getSpace as getSpace2 } from "@dxos/client/echo";
882
824
  import { useClient as useClient4 } from "@dxos/react-client";
883
825
  import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation9 } from "@dxos/react-ui";
@@ -888,127 +830,33 @@ var MenuFooter = ({ object }) => {
888
830
  const spaceName = space ? getSpaceDisplayName(space, {
889
831
  personal: client.spaces.default === space
890
832
  }) : "";
891
- 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", {
892
834
  className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
893
- }, /* @__PURE__ */ React10.createElement("dt", {
835
+ }, /* @__PURE__ */ React9.createElement("dt", {
894
836
  className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
895
- }, t("location label")), /* @__PURE__ */ React10.createElement("dd", {
837
+ }, t("location label")), /* @__PURE__ */ React9.createElement("dd", {
896
838
  className: "line-clamp-3"
897
- }, /* @__PURE__ */ React10.createElement(Planet, {
839
+ }, /* @__PURE__ */ React9.createElement(Planet, {
898
840
  className: "inline-block mie-1"
899
841
  }), toLocalizedString2(spaceName, t)))) : null;
900
842
  };
901
843
 
902
844
  // packages/plugins/plugin-space/src/components/ObjectSettings/ObjectSettingsContainer.tsx
903
- import React14, { useMemo as useMemo2 } from "react";
904
- import { Surface as Surface2 } from "@dxos/app-framework";
845
+ import React11, { useMemo as useMemo2 } from "react";
846
+ import { Surface } from "@dxos/app-framework";
905
847
  import { Clipboard as Clipboard2 } from "@dxos/react-ui";
906
848
  import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
907
849
 
908
- // packages/plugins/plugin-space/src/components/ObjectSettings/AdvancedObjectSettings.tsx
909
- import React12, { useCallback as useCallback9, useState as useState5 } from "react";
910
- import { ForeignKeySchema } from "@dxos/echo-schema";
911
- import { getMeta } from "@dxos/react-client/echo";
912
- import { IconButton as IconButton2, useTranslation as useTranslation11 } from "@dxos/react-ui";
913
- import { Form as Form3 } from "@dxos/react-ui-form";
914
-
915
- // packages/plugins/plugin-space/src/components/ObjectSettings/ForeignKeys.tsx
916
- import React11, { useCallback as useCallback8 } from "react";
917
- import { IconButton, List, ListItem, useTranslation as useTranslation10 } from "@dxos/react-ui";
918
- var ForeignKeys = ({ keys, onDelete }) => {
919
- return /* @__PURE__ */ React11.createElement(List, {
920
- classNames: "flex flex-col gap-2"
921
- }, keys.map((key) => /* @__PURE__ */ React11.createElement(KeyItem, {
922
- key: key.id,
923
- forignKey: key,
924
- onDelete
925
- })));
926
- };
927
- var KeyItem = ({ forignKey, onDelete }) => {
928
- const { t } = useTranslation10(SPACE_PLUGIN);
929
- const handleDelete = useCallback8(() => {
930
- onDelete?.(forignKey);
931
- }, [
932
- forignKey,
933
- onDelete
934
- ]);
935
- return /* @__PURE__ */ React11.createElement(ListItem.Root, {
936
- classNames: "px-2"
937
- }, /* @__PURE__ */ React11.createElement(ListItem.Heading, {
938
- classNames: "flex flex-col grow truncate"
939
- }, /* @__PURE__ */ React11.createElement("div", null, forignKey.source), /* @__PURE__ */ React11.createElement("div", {
940
- className: "text-description text-sm truncate"
941
- }, forignKey.id)), /* @__PURE__ */ React11.createElement(ListItem.Endcap, null, /* @__PURE__ */ React11.createElement(IconButton, {
942
- iconOnly: true,
943
- icon: "ph--x--regular",
944
- variant: "ghost",
945
- label: t("delete key"),
946
- onClick: handleDelete
947
- })));
948
- };
949
-
950
- // packages/plugins/plugin-space/src/components/ObjectSettings/AdvancedObjectSettings.tsx
951
- var initialValues2 = {
952
- source: "",
953
- id: ""
954
- };
955
- var AdvancedObjectSettings = ({ object }) => {
956
- const { t } = useTranslation11(SPACE_PLUGIN);
957
- const [adding, setAdding] = useState5(false);
958
- const keys = getMeta(object).keys;
959
- const handleNew = useCallback9(() => setAdding(true), []);
960
- const handleCancel = useCallback9(() => setAdding(false), []);
961
- const handleSave = useCallback9((key) => {
962
- const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
963
- if (index === -1) {
964
- keys.push(key);
965
- }
966
- setAdding(false);
967
- }, [
968
- keys
969
- ]);
970
- const handleDelete = useCallback9((key) => {
971
- const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
972
- if (index !== -1) {
973
- keys.splice(index, 1);
974
- }
975
- }, [
976
- keys
977
- ]);
978
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("div", {
979
- className: "p-2 flex flex-col gap-4"
980
- }, /* @__PURE__ */ React12.createElement("h2", null, t("advanced settings label")), /* @__PURE__ */ React12.createElement("div", {
981
- className: "flex items-center"
982
- }, /* @__PURE__ */ React12.createElement("h3", {
983
- className: "text-sm font-semibold"
984
- }, t("foreign keys")), /* @__PURE__ */ React12.createElement("div", {
985
- className: "grow"
986
- }), /* @__PURE__ */ React12.createElement(IconButton2, {
987
- classNames: adding && "invisible",
988
- icon: "ph--plus--regular",
989
- label: t("add key"),
990
- onClick: handleNew
991
- })), !adding && /* @__PURE__ */ React12.createElement(ForeignKeys, {
992
- keys,
993
- onDelete: handleDelete
994
- })), adding && /* @__PURE__ */ React12.createElement(Form3, {
995
- schema: ForeignKeySchema,
996
- values: initialValues2,
997
- onSave: handleSave,
998
- onCancel: handleCancel
999
- }));
1000
- };
1001
-
1002
850
  // packages/plugins/plugin-space/src/components/ObjectSettings/BaseObjectSettings.tsx
1003
- import React13, { useRef as useRef3 } from "react";
1004
- 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";
1005
853
  import { mx as mx5 } from "@dxos/react-ui-theme";
1006
854
  var BaseObjectSettings = ({ classNames, children, object }) => {
1007
- const { t } = useTranslation12(meta.id);
855
+ const { t } = useTranslation10(meta.id);
1008
856
  const inputRef = useRef3(null);
1009
- return /* @__PURE__ */ React13.createElement("form", {
857
+ return /* @__PURE__ */ React10.createElement("form", {
1010
858
  className: mx5("flex flex-col p-2 gap-2", classNames)
1011
- }, /* @__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, {
1012
860
  ref: inputRef,
1013
861
  placeholder: t("name placeholder"),
1014
862
  value: object.name ?? "",
@@ -1030,29 +878,27 @@ var ObjectSettingsContainer = ({ object, role }) => {
1030
878
  }), [
1031
879
  object
1032
880
  ]);
1033
- 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, {
1034
882
  toolbar: false,
1035
883
  role
1036
- }, /* @__PURE__ */ React14.createElement("div", {
884
+ }, /* @__PURE__ */ React11.createElement("div", {
1037
885
  className: "flex flex-col overflow-y-auto divide-y divide-separator"
1038
- }, /* @__PURE__ */ React14.createElement(BaseObjectSettings, {
886
+ }, /* @__PURE__ */ React11.createElement(BaseObjectSettings, {
1039
887
  object
1040
- }, /* @__PURE__ */ React14.createElement(Surface2, {
888
+ }, /* @__PURE__ */ React11.createElement(Surface, {
1041
889
  role: "base-object-settings",
1042
890
  data
1043
- })), /* @__PURE__ */ React14.createElement(Surface2, {
891
+ })), /* @__PURE__ */ React11.createElement(Surface, {
1044
892
  role: "object-settings",
1045
893
  data
1046
- }), /* @__PURE__ */ React14.createElement(AdvancedObjectSettings, {
1047
- object
1048
894
  }))));
1049
895
  };
1050
896
 
1051
897
  // packages/plugins/plugin-space/src/components/PersistenceStatus.tsx
1052
898
  import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
1053
- import React15, { useEffect as useEffect3, useState as useState6 } from "react";
899
+ import React12, { useEffect as useEffect2, useState as useState4 } from "react";
1054
900
  import { debounce } from "@dxos/async";
1055
- import { Tooltip, useTranslation as useTranslation13 } from "@dxos/react-ui";
901
+ import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
1056
902
  import { getSize as getSize3, mx as mx6, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
1057
903
  var Status;
1058
904
  (function(Status2) {
@@ -1061,12 +907,12 @@ var Status;
1061
907
  Status2[Status2["ERROR"] = 2] = "ERROR";
1062
908
  })(Status || (Status = {}));
1063
909
  var PersistenceStatus = ({ db }) => {
1064
- const { t } = useTranslation13(SPACE_PLUGIN);
1065
- const [displayMessage, setDisplayMessage] = useState6(false);
1066
- const [status, naturalSetStatus] = useState6(0);
1067
- 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);
1068
914
  const _setStatus = debounce(naturalSetStatus, 500);
1069
- useEffect3(() => {
915
+ useEffect2(() => {
1070
916
  setPrevStatus(status);
1071
917
  if (prevStatus !== status && status === 0) {
1072
918
  setDisplayMessage(true);
@@ -1078,94 +924,50 @@ var PersistenceStatus = ({ db }) => {
1078
924
  ]);
1079
925
  switch (status) {
1080
926
  case 2:
1081
- return /* @__PURE__ */ React15.createElement("div", {
927
+ return /* @__PURE__ */ React12.createElement("div", {
1082
928
  className: "flex items-center"
1083
- }, /* @__PURE__ */ React15.createElement(Warning, {
929
+ }, /* @__PURE__ */ React12.createElement(Warning, {
1084
930
  className: mx6(getSize3(4), "me-1")
1085
- }), /* @__PURE__ */ React15.createElement("span", {
931
+ }), /* @__PURE__ */ React12.createElement("span", {
1086
932
  className: mx6("text-sm", warningText)
1087
933
  }, t("persistence error label")));
1088
934
  case 1:
1089
- return /* @__PURE__ */ React15.createElement("div", {
935
+ return /* @__PURE__ */ React12.createElement("div", {
1090
936
  className: "flex items-center"
1091
- }, /* @__PURE__ */ React15.createElement(ArrowsCounterClockwise, {
937
+ }, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
1092
938
  className: mx6(getSize3(4), "me-1")
1093
- }), /* @__PURE__ */ React15.createElement("span", {
939
+ }), /* @__PURE__ */ React12.createElement("span", {
1094
940
  className: mx6("text-sm", staticPlaceholderText)
1095
941
  }, t("persistence pending label")));
1096
942
  case 0:
1097
943
  default:
1098
- return /* @__PURE__ */ React15.createElement(Tooltip.Root, {
1099
- delayDuration: 400
1100
- }, /* @__PURE__ */ React15.createElement(Tooltip.Trigger, {
944
+ return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
945
+ delayDuration: 400,
1101
946
  role: "status",
947
+ content: t("persisted locally message"),
1102
948
  className: "flex items-center"
1103
- }, /* @__PURE__ */ React15.createElement(CheckCircle2, {
949
+ }, /* @__PURE__ */ React12.createElement(CheckCircle2, {
1104
950
  className: mx6(getSize3(4), "me-1")
1105
- }), displayMessage && /* @__PURE__ */ React15.createElement("span", {
951
+ }), displayMessage && /* @__PURE__ */ React12.createElement("span", {
1106
952
  className: mx6("text-sm", staticPlaceholderText)
1107
- }, 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")));
1108
954
  }
1109
955
  };
1110
956
 
1111
- // packages/plugins/plugin-space/src/components/PopoverAddSpace.tsx
1112
- import React16 from "react";
1113
- import { createIntent as createIntent5, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
1114
- import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
1115
- var POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1116
- var PopoverAddSpace = () => {
1117
- const { t } = useTranslation14(SPACE_PLUGIN);
1118
- const { dispatchPromise: dispatch } = useIntentDispatcher5();
1119
- return /* @__PURE__ */ React16.createElement("div", {
1120
- role: "none",
1121
- className: "grid grid-cols-1 gap-1 [&>button]:justify-start"
1122
- }, /* @__PURE__ */ React16.createElement(IconButton3, {
1123
- variant: "ghost",
1124
- label: t("create space label"),
1125
- icon: "ph--plus--regular",
1126
- onClick: () => {
1127
- void dispatch(createIntent5(SpaceAction.OpenCreateSpace));
1128
- void dispatch(createIntent5(LayoutAction5.UpdatePopover, {
1129
- part: "popover",
1130
- options: {
1131
- variant: "react",
1132
- anchorId: "",
1133
- state: false
1134
- }
1135
- }));
1136
- },
1137
- "data-testid": "spacePlugin.createSpace"
1138
- }), /* @__PURE__ */ React16.createElement(IconButton3, {
1139
- variant: "ghost",
1140
- label: t("join space label"),
1141
- icon: "ph--sign-in--regular",
1142
- onClick: () => {
1143
- void dispatch(createIntent5(SpaceAction.Join));
1144
- void dispatch(createIntent5(LayoutAction5.UpdatePopover, {
1145
- part: "popover",
1146
- options: {
1147
- variant: "react",
1148
- anchorId: "",
1149
- state: false
1150
- }
1151
- }));
1152
- },
1153
- "data-testid": "spacePlugin.joinSpace"
1154
- }));
1155
- };
1156
-
1157
957
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
1158
- import React17, { useCallback as useCallback10, useRef as useRef4, useState as useState7 } from "react";
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";
1159
960
  import { log as log2 } from "@dxos/log";
1160
- import { Button as Button5, Input as Input3, Popover, useTranslation as useTranslation15 } from "@dxos/react-ui";
961
+ import { Button as Button5, Input as Input3, useTranslation as useTranslation12 } from "@dxos/react-ui";
1161
962
  var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
1162
963
  var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
1163
964
  var PopoverRenameObject = ({ object: obj }) => {
1164
- const { t } = useTranslation15(SPACE_PLUGIN);
965
+ const { t } = useTranslation12(SPACE_PLUGIN);
1165
966
  const doneButton = useRef4(null);
1166
967
  const object = obj;
1167
- const [name, setName] = useState7(object.name || object.title || "");
1168
- const handleDone = useCallback10(() => {
968
+ const [name, setName] = useState5(object.name || object.title || "");
969
+ const { dispatchPromise: dispatch } = useIntentDispatcher6();
970
+ const handleDone = useCallback7(() => {
1169
971
  try {
1170
972
  object.name = name;
1171
973
  } catch {
@@ -1176,73 +978,89 @@ var PopoverRenameObject = ({ object: obj }) => {
1176
978
  err
1177
979
  }, {
1178
980
  F: __dxlog_file4,
1179
- L: 30,
981
+ L: 32,
1180
982
  S: void 0,
1181
983
  C: (f, a) => f(...a)
1182
984
  });
1183
985
  }
1184
986
  }
987
+ void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
988
+ part: "popover",
989
+ options: {
990
+ variant: "react",
991
+ anchorId: "",
992
+ state: false
993
+ }
994
+ }));
1185
995
  }, [
1186
996
  object,
1187
997
  name
1188
998
  ]);
1189
- return /* @__PURE__ */ React17.createElement("div", {
999
+ return /* @__PURE__ */ React13.createElement("div", {
1190
1000
  role: "none",
1191
1001
  className: "p-1 flex gap-2"
1192
- }, /* @__PURE__ */ React17.createElement("div", {
1002
+ }, /* @__PURE__ */ React13.createElement("div", {
1193
1003
  role: "none",
1194
1004
  className: "flex-1"
1195
- }, /* @__PURE__ */ React17.createElement(Input3.Root, null, /* @__PURE__ */ React17.createElement(Input3.Label, {
1005
+ }, /* @__PURE__ */ React13.createElement(Input3.Root, null, /* @__PURE__ */ React13.createElement(Input3.Label, {
1196
1006
  srOnly: true
1197
- }, t("object name label")), /* @__PURE__ */ React17.createElement(Input3.TextInput, {
1007
+ }, t("object name label")), /* @__PURE__ */ React13.createElement(Input3.TextInput, {
1198
1008
  placeholder: t("object placeholder"),
1199
1009
  value: name,
1200
1010
  "data-testid": "spacePlugin.renameObject.input",
1201
1011
  onChange: ({ target: { value } }) => setName(value),
1202
1012
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1203
- }))), /* @__PURE__ */ React17.createElement(Popover.Close, {
1204
- asChild: true
1205
- }, /* @__PURE__ */ React17.createElement(Button5, {
1013
+ }))), /* @__PURE__ */ React13.createElement(Button5, {
1206
1014
  ref: doneButton,
1207
1015
  classNames: "self-stretch",
1208
1016
  onClick: handleDone
1209
1017
  }, t("done label", {
1210
1018
  ns: "os"
1211
- }))));
1019
+ })));
1212
1020
  };
1213
1021
 
1214
1022
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
1215
- import React18, { useCallback as useCallback11, useRef as useRef5, useState as useState8 } from "react";
1216
- import { Button as Button6, Input as Input4, Popover as Popover2, 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";
1217
1026
  var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1218
1027
  var PopoverRenameSpace = ({ space }) => {
1219
- const { t } = useTranslation16(SPACE_PLUGIN);
1028
+ const { t } = useTranslation13(SPACE_PLUGIN);
1220
1029
  const doneButton = useRef5(null);
1221
- const [name, setName] = useState8(space.properties.name ?? "");
1222
- const handleDone = useCallback11(() => {
1030
+ const [name, setName] = useState6(space.properties.name ?? "");
1031
+ const { dispatchPromise: dispatch } = useIntentDispatcher7();
1032
+ const handleDone = useCallback8(() => {
1223
1033
  space.properties.name = name;
1034
+ void dispatch(createIntent7(LayoutAction6.UpdatePopover, {
1035
+ part: "popover",
1036
+ options: {
1037
+ variant: "react",
1038
+ anchorId: "",
1039
+ state: false
1040
+ }
1041
+ }));
1224
1042
  }, [
1225
1043
  space,
1226
1044
  name
1227
1045
  ]);
1228
- return /* @__PURE__ */ React18.createElement("div", {
1046
+ return /* @__PURE__ */ React14.createElement("div", {
1229
1047
  role: "none",
1230
1048
  className: "p-1 flex gap-2"
1231
- }, /* @__PURE__ */ React18.createElement("div", {
1049
+ }, /* @__PURE__ */ React14.createElement("div", {
1232
1050
  role: "none",
1233
1051
  className: "flex-1"
1234
- }, /* @__PURE__ */ React18.createElement(Input4.Root, null, /* @__PURE__ */ React18.createElement(Input4.Label, {
1052
+ }, /* @__PURE__ */ React14.createElement(Input4.Root, null, /* @__PURE__ */ React14.createElement(Input4.Label, {
1235
1053
  srOnly: true
1236
- }, t("space name label")), /* @__PURE__ */ React18.createElement(Input4.TextInput, {
1054
+ }, t("space name label")), /* @__PURE__ */ React14.createElement(Input4.TextInput, {
1237
1055
  defaultValue: space.properties.name ?? "",
1238
1056
  placeholder: t("unnamed space label"),
1239
1057
  onChange: ({ target: { value } }) => setName(value),
1240
1058
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
1241
1059
  // Currently this is not possible because Radix does not expose the popover context.
1242
1060
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1243
- }))), /* @__PURE__ */ React18.createElement(Popover2.Close, {
1061
+ }))), /* @__PURE__ */ React14.createElement(Popover.Close, {
1244
1062
  asChild: true
1245
- }, /* @__PURE__ */ React18.createElement(Button6, {
1063
+ }, /* @__PURE__ */ React14.createElement(Button6, {
1246
1064
  ref: doneButton,
1247
1065
  classNames: "self-stretch",
1248
1066
  onClick: handleDone
@@ -1252,13 +1070,13 @@ var PopoverRenameSpace = ({ space }) => {
1252
1070
  };
1253
1071
 
1254
1072
  // packages/plugins/plugin-space/src/components/SchemaContainer.tsx
1255
- import React19, { useState as useState9, useEffect as useEffect4 } from "react";
1256
- 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";
1257
1075
  import { controlItemClasses, ControlPage as ControlPage2, ControlSection as ControlSection2 } from "@dxos/react-ui-form";
1258
1076
  import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
1259
1077
  var useQuerySpaceSchemas = (space) => {
1260
- const [schemas, setSchemas] = useState9([]);
1261
- useEffect4(() => {
1078
+ const [schemas, setSchemas] = useState7([]);
1079
+ useEffect3(() => {
1262
1080
  const query = space.db.schemaRegistry.query();
1263
1081
  const initialResults = query.runSync();
1264
1082
  setSchemas(initialResults);
@@ -1270,53 +1088,32 @@ var useQuerySpaceSchemas = (space) => {
1270
1088
  return schemas;
1271
1089
  };
1272
1090
  var SchemaContainer = ({ space }) => {
1273
- const { t } = useTranslation17(SPACE_PLUGIN);
1091
+ const { t } = useTranslation14(SPACE_PLUGIN);
1274
1092
  const schemas = useQuerySpaceSchemas(space);
1275
- return /* @__PURE__ */ React19.createElement(StackItem3.Content, {
1093
+ return /* @__PURE__ */ React15.createElement(StackItem3.Content, {
1276
1094
  classNames: "block overflow-y-auto"
1277
- }, /* @__PURE__ */ React19.createElement(ControlPage2, null, /* @__PURE__ */ React19.createElement(ControlSection2, {
1095
+ }, /* @__PURE__ */ React15.createElement(ControlPage2, null, /* @__PURE__ */ React15.createElement(ControlSection2, {
1278
1096
  title: t("schema verbose label"),
1279
1097
  description: t("schema description")
1280
- }, /* @__PURE__ */ React19.createElement("div", {
1098
+ }, /* @__PURE__ */ React15.createElement("div", {
1281
1099
  role: "none",
1282
1100
  className: controlItemClasses
1283
- }, schemas.length === 0 && /* @__PURE__ */ React19.createElement("div", {
1101
+ }, schemas.length === 0 && /* @__PURE__ */ React15.createElement("div", {
1284
1102
  className: "text-center plb-4"
1285
- }, 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", {
1286
1104
  key: schema.id
1287
- }, /* @__PURE__ */ React19.createElement("div", null, schema.typename)))))));
1288
- };
1289
-
1290
- // packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
1291
- import React20 from "react";
1292
- import { createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1293
- import { IconButton as IconButton4, useTranslation as useTranslation18 } from "@dxos/react-ui";
1294
- var ShareSpaceButton = ({ space }) => {
1295
- const { dispatchPromise: dispatch } = useIntentDispatcher6();
1296
- return /* @__PURE__ */ React20.createElement(ShareSpaceButtonImpl, {
1297
- onClick: () => dispatch(createIntent6(SpaceAction.Share, {
1298
- space
1299
- }))
1300
- });
1301
- };
1302
- var ShareSpaceButtonImpl = ({ onClick }) => {
1303
- const { t } = useTranslation18(SPACE_PLUGIN);
1304
- return /* @__PURE__ */ React20.createElement(IconButton4, {
1305
- "data-testid": "spacePlugin.shareSpaceButton",
1306
- icon: "ph--users--regular",
1307
- label: t("share space label"),
1308
- onClick
1309
- });
1105
+ }, /* @__PURE__ */ React15.createElement("div", null, schema.typename)))))));
1310
1106
  };
1311
1107
 
1312
1108
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
1313
- import React21, { 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 useTranslation19, 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__ */ React21.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__ */ React21.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__ */ React21.createElement(Tooltip2.Root, {
1369
- key: member.identity.identityKey.toHex()
1370
- }, /* @__PURE__ */ React21.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__ */ React21.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__ */ React21.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React21.createElement(Tooltip2.Content, {
1379
- side: "bottom"
1380
- }, /* @__PURE__ */ React21.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React21.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React21.createElement(Tooltip2.Root, null, /* @__PURE__ */ React21.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__ */ React21.createElement(Avatar.Root, null, /* @__PURE__ */ React21.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__ */ React21.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React21.createElement(Tooltip2.Content, {
1185
+ }))), /* @__PURE__ */ React16.createElement(Popover2.Portal, null, /* @__PURE__ */ React16.createElement(Popover2.Content, {
1390
1186
  side: "bottom"
1391
- }, /* @__PURE__ */ React21.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.createElement(Avatar.Root, null, /* @__PURE__ */ React21.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__ */ React21.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__ */ React21.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 } = useTranslation19(SPACE_PLUGIN);
1458
- return /* @__PURE__ */ React21.createElement(Tooltip2.Root, null, /* @__PURE__ */ React21.createElement(Tooltip2.Trigger, {
1459
- asChild: true
1460
- }, /* @__PURE__ */ React21.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__ */ React21.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React21.createElement(Tooltip2.Content, {
1466
- side: "bottom"
1467
- }, /* @__PURE__ */ React21.createElement("span", null, t("presence label", {
1468
- count
1469
- })), /* @__PURE__ */ React21.createElement(Tooltip2.Arrow, null))));
1265
+ }));
1470
1266
  };
1471
1267
 
1472
1268
  // packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
1473
- import React22 from "react";
1474
- import { createIntent as createIntent7, useIntentDispatcher as useIntentDispatcher7 } 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 useTranslation20, 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 } = useTranslation20(SPACE_PLUGIN);
1481
- const { dispatchPromise: dispatch } = useIntentDispatcher7();
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__ */ React22.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React22.createElement(DeprecatedFormInput, {
1282
+ return /* @__PURE__ */ React17.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1487
1283
  label: t("show hidden spaces label")
1488
- }, /* @__PURE__ */ React22.createElement(Input5.Switch, {
1284
+ }, /* @__PURE__ */ React17.createElement(Input5.Switch, {
1489
1285
  checked: settings.showHidden,
1490
1286
  onCheckedChange: (checked) => settings.showHidden = !!checked
1491
- })), /* @__PURE__ */ React22.createElement("div", {
1287
+ })), /* @__PURE__ */ React17.createElement("div", {
1492
1288
  role: "none"
1493
- }, /* @__PURE__ */ React22.createElement("h2", {
1289
+ }, /* @__PURE__ */ React17.createElement("h2", {
1494
1290
  className: "text-xl my-4"
1495
- }, "Space Settings"), /* @__PURE__ */ React22.createElement(List3, {
1291
+ }, "Space Settings"), /* @__PURE__ */ React17.createElement(List2, {
1496
1292
  classNames: "max-w-md mx-auto"
1497
- }, spaces.map((space) => /* @__PURE__ */ React22.createElement(ListItem3.Root, {
1293
+ }, spaces.map((space) => /* @__PURE__ */ React17.createElement(ListItem2.Root, {
1498
1294
  key: space.id
1499
- }, /* @__PURE__ */ React22.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__ */ React22.createElement(ListItem3.Endcap, null, /* @__PURE__ */ React22.createElement(Button7, {
1504
- onClick: () => dispatch(createIntent7(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 React23, { useCallback as useCallback13, useMemo as useMemo3, useState as useState11 } from "react";
1513
- import { chain as chain2, createIntent as createIntent8, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher8 } 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 useTranslation21 } 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 } = useTranslation21(SPACE_PLUGIN);
1530
- const { dispatchPromise: dispatch } = useIntentDispatcher8();
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(createIntent8(SpaceAction.Close, {
1356
+ void dispatch(pipe2(createIntent9(SpaceAction.Close, {
1561
1357
  space
1562
- }), chain2(LayoutAction6.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(createIntent8(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__ */ React23.createElement(ControlItemInput2, {
1391
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1596
1392
  title: label,
1597
1393
  description: t("display name description")
1598
- }, /* @__PURE__ */ React23.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__ */ React23.createElement(ControlItem, {
1410
+ return /* @__PURE__ */ React18.createElement(ControlItem, {
1615
1411
  title: label,
1616
1412
  description: t("icon description")
1617
- }, /* @__PURE__ */ React23.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__ */ React23.createElement(ControlItem, {
1430
+ return /* @__PURE__ */ React18.createElement(ControlItem, {
1635
1431
  title: label,
1636
1432
  description: t("hue description")
1637
- }, /* @__PURE__ */ React23.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__ */ React23.createElement(ControlItemInput2, {
1445
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1650
1446
  title: label,
1651
1447
  description: t("edge replication description")
1652
- }, /* @__PURE__ */ React23.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__ */ React23.createElement(ControlItemInput2, {
1460
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1665
1461
  title: label,
1666
1462
  description: t("archive space description")
1667
- }, /* @__PURE__ */ React23.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__ */ React23.createElement(StackItem4.Content, {
1472
+ return /* @__PURE__ */ React18.createElement(StackItem4.Content, {
1677
1473
  classNames: "block overflow-y-auto pli-2"
1678
- }, /* @__PURE__ */ React23.createElement(ControlPage3, null, /* @__PURE__ */ React23.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__ */ React23.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 React24, { 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 useTranslation22 } 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 } = useTranslation22(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__ */ React24.createElement(Tooltip3.Root, null, /* @__PURE__ */ React24.createElement(Tooltip3.Trigger, {
1731
- asChild: true
1732
- }, /* @__PURE__ */ React24.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__ */ React24.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React24.createElement(Tooltip3.Content, {
1738
- side: "bottom",
1739
- classNames: "z-[70]"
1740
- }, /* @__PURE__ */ React24.createElement("span", null, t("syncing label")), /* @__PURE__ */ React24.createElement(Tooltip3.Arrow, null))));
1536
+ }));
1741
1537
  };
1742
1538
 
1743
1539
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1744
- import React25, { 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 useTranslation23 } 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__ */ React25.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 } = useTranslation23(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__ */ React25.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__ */ React25.createElement(StatusBar.Item, {
1686
+ return /* @__PURE__ */ React20.createElement(StatusBar.Item, {
1891
1687
  title
1892
1688
  }, icon);
1893
1689
  };
@@ -1906,16 +1702,12 @@ 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,
1914
1708
  PopoverRenameSpace,
1915
1709
  useQuerySpaceSchemas,
1916
1710
  SchemaContainer,
1917
- ShareSpaceButton,
1918
- ShareSpaceButtonImpl,
1919
1711
  SpacePresence,
1920
1712
  FullPresence,
1921
1713
  SmallPresenceLive,
@@ -1931,10 +1723,10 @@ export {
1931
1723
  IntentResolver,
1932
1724
  ReactRoot,
1933
1725
  ReactSurface,
1934
- Schema,
1935
- Tools,
1726
+ SchemaDefs,
1727
+ SchemaTools,
1936
1728
  SpaceSettings,
1937
1729
  SpaceState,
1938
1730
  SpacesReady
1939
1731
  };
1940
- //# sourceMappingURL=chunk-ABKX22IP.mjs.map
1732
+ //# sourceMappingURL=chunk-FI3WV22Y.mjs.map