@dxos/plugin-space 0.8.2-staging.7ac8446 → 0.8.2

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 (341) hide show
  1. package/dist/lib/browser/app-graph-builder-DCWUULKX.mjs +328 -0
  2. package/dist/lib/browser/app-graph-builder-DCWUULKX.mjs.map +7 -0
  3. package/dist/lib/browser/{app-graph-serializer-DSF2U3A5.mjs → app-graph-serializer-MLU7XI2P.mjs} +10 -10
  4. package/dist/lib/browser/app-graph-serializer-MLU7XI2P.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-KVRYWFZU.mjs → chunk-3LN4LJN6.mjs} +3 -8
  6. package/dist/lib/{node-esm/chunk-PIYAWT5N.mjs.map → browser/chunk-3LN4LJN6.mjs.map} +3 -3
  7. package/dist/lib/browser/chunk-7Y4M7GXO.mjs +94 -0
  8. package/dist/lib/browser/chunk-7Y4M7GXO.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-LO5UL6RU.mjs → chunk-N5QMRLKI.mjs} +78 -173
  10. package/dist/lib/browser/chunk-N5QMRLKI.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-Q4BTFH2P.mjs +1900 -0
  12. package/dist/lib/browser/chunk-Q4BTFH2P.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-5BDV575R.mjs → chunk-VEBKN45O.mjs} +21 -10
  14. package/dist/lib/browser/chunk-VEBKN45O.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-W46VVHFM.mjs +288 -0
  16. package/dist/lib/browser/chunk-W46VVHFM.mjs.map +7 -0
  17. package/dist/lib/browser/{identity-created-JR7BNXFH.mjs → identity-created-O63SIYOF.mjs} +5 -5
  18. package/dist/lib/browser/identity-created-O63SIYOF.mjs.map +7 -0
  19. package/dist/lib/browser/index.mjs +34 -54
  20. package/dist/lib/browser/index.mjs.map +3 -3
  21. package/dist/lib/browser/{intent-resolver-RKYILWWQ.mjs → intent-resolver-KBF3YU6I.mjs} +116 -108
  22. package/dist/lib/browser/intent-resolver-KBF3YU6I.mjs.map +7 -0
  23. package/dist/lib/browser/meta.json +1 -1
  24. package/dist/lib/browser/{react-root-6H7NX2M2.mjs → react-root-PVKJE4EZ.mjs} +6 -5
  25. package/dist/lib/browser/{react-surface-7AGLOVMK.mjs → react-surface-252P4NCK.mjs} +121 -54
  26. package/dist/lib/browser/react-surface-252P4NCK.mjs.map +7 -0
  27. package/dist/lib/browser/schema-defs-JMN74RNK.mjs +26 -0
  28. package/dist/lib/browser/schema-defs-JMN74RNK.mjs.map +7 -0
  29. package/dist/lib/browser/{schema-tools-YAXPRIXP.mjs → schema-tools-JIEMHUXV.mjs} +26 -26
  30. package/dist/lib/browser/schema-tools-JIEMHUXV.mjs.map +7 -0
  31. package/dist/lib/browser/{settings-PJPTJUPE.mjs → settings-2IN2WLUK.mjs} +4 -4
  32. package/dist/lib/browser/settings-2IN2WLUK.mjs.map +7 -0
  33. package/dist/lib/browser/{spaces-ready-BSSP7HHG.mjs → spaces-ready-L4QAGTDE.mjs} +20 -19
  34. package/dist/lib/browser/spaces-ready-L4QAGTDE.mjs.map +7 -0
  35. package/dist/lib/browser/{state-X7VLCC6E.mjs → state-6HOSHLIN.mjs} +3 -5
  36. package/dist/lib/browser/state-6HOSHLIN.mjs.map +7 -0
  37. package/dist/lib/browser/types/index.mjs +7 -7
  38. package/dist/lib/node/app-graph-builder-WC445X77.cjs +328 -0
  39. package/dist/lib/node/app-graph-builder-WC445X77.cjs.map +7 -0
  40. package/dist/lib/node/{app-graph-serializer-JELGJUAY.cjs → app-graph-serializer-UPQOQVMJ.cjs} +22 -22
  41. package/dist/lib/node/app-graph-serializer-UPQOQVMJ.cjs.map +7 -0
  42. package/dist/lib/node/chunk-5WLAXYE3.cjs +125 -0
  43. package/dist/lib/node/chunk-5WLAXYE3.cjs.map +7 -0
  44. package/dist/lib/node/{chunk-IKIDS6XF.cjs → chunk-7GQGM4ZF.cjs} +7 -13
  45. package/dist/lib/node/{chunk-IKIDS6XF.cjs.map → chunk-7GQGM4ZF.cjs.map} +3 -3
  46. package/dist/lib/node/{chunk-TUZWEPGX.cjs → chunk-COQYISES.cjs} +100 -198
  47. package/dist/lib/node/chunk-COQYISES.cjs.map +7 -0
  48. package/dist/lib/node/{chunk-PU2EYH4E.cjs → chunk-DXL5TDFP.cjs} +25 -14
  49. package/dist/lib/node/chunk-DXL5TDFP.cjs.map +7 -0
  50. package/dist/lib/node/chunk-FXHI7JNY.cjs +315 -0
  51. package/dist/lib/node/chunk-FXHI7JNY.cjs.map +7 -0
  52. package/dist/lib/node/chunk-Q3YZEYZT.cjs +1904 -0
  53. package/dist/lib/node/chunk-Q3YZEYZT.cjs.map +7 -0
  54. package/dist/lib/node/{identity-created-XU4HFV2T.cjs → identity-created-UXEAUGC7.cjs} +7 -7
  55. package/dist/lib/node/identity-created-UXEAUGC7.cjs.map +7 -0
  56. package/dist/lib/node/index.cjs +83 -105
  57. package/dist/lib/node/index.cjs.map +3 -3
  58. package/dist/lib/node/{intent-resolver-VJ7YV74L.cjs → intent-resolver-SVFJKUH7.cjs} +161 -152
  59. package/dist/lib/node/intent-resolver-SVFJKUH7.cjs.map +7 -0
  60. package/dist/lib/node/meta.json +1 -1
  61. package/dist/lib/node/{react-root-TEL5RW3N.cjs → react-root-DDPDUMCG.cjs} +11 -10
  62. package/dist/lib/node/{react-root-TEL5RW3N.cjs.map → react-root-DDPDUMCG.cjs.map} +1 -1
  63. package/dist/lib/node/{react-surface-2H3S5TY5.cjs → react-surface-JUIU37BX.cjs} +144 -77
  64. package/dist/lib/node/react-surface-JUIU37BX.cjs.map +7 -0
  65. package/dist/lib/node/{schema-PPJ5BZ3A.cjs → schema-defs-XLFBG3XK.cjs} +14 -12
  66. package/dist/lib/node/schema-defs-XLFBG3XK.cjs.map +7 -0
  67. package/dist/lib/node/{schema-tools-BLIMOZYY.cjs → schema-tools-ZG6Z2QRC.cjs} +32 -32
  68. package/dist/lib/node/schema-tools-ZG6Z2QRC.cjs.map +7 -0
  69. package/dist/lib/node/{settings-WVFP2UEP.cjs → settings-FOH7EB5C.cjs} +7 -7
  70. package/dist/lib/node/settings-FOH7EB5C.cjs.map +7 -0
  71. package/dist/lib/node/{spaces-ready-7DNZSUOG.cjs → spaces-ready-VXQYCBII.cjs} +27 -26
  72. package/dist/lib/node/spaces-ready-VXQYCBII.cjs.map +7 -0
  73. package/dist/lib/node/{state-5KX6WBJH.cjs → state-ZT3MTZXB.cjs} +7 -9
  74. package/dist/lib/node/state-ZT3MTZXB.cjs.map +7 -0
  75. package/dist/lib/node/types/index.cjs +15 -15
  76. package/dist/lib/node/types/index.cjs.map +1 -1
  77. package/dist/lib/node-esm/app-graph-builder-E7CCGPQJ.mjs +329 -0
  78. package/dist/lib/node-esm/app-graph-builder-E7CCGPQJ.mjs.map +7 -0
  79. package/dist/lib/node-esm/{app-graph-serializer-FXONFKOE.mjs → app-graph-serializer-UCMSLPIA.mjs} +10 -10
  80. package/dist/lib/node-esm/app-graph-serializer-UCMSLPIA.mjs.map +7 -0
  81. package/dist/lib/node-esm/{chunk-PIYAWT5N.mjs → chunk-4X4Y63ND.mjs} +3 -8
  82. package/dist/lib/{browser/chunk-KVRYWFZU.mjs.map → node-esm/chunk-4X4Y63ND.mjs.map} +3 -3
  83. package/dist/lib/node-esm/chunk-FTELJGEG.mjs +289 -0
  84. package/dist/lib/node-esm/chunk-FTELJGEG.mjs.map +7 -0
  85. package/dist/lib/node-esm/chunk-GH2FGJXH.mjs +96 -0
  86. package/dist/lib/node-esm/chunk-GH2FGJXH.mjs.map +7 -0
  87. package/dist/lib/node-esm/chunk-HL2Z2GNW.mjs +1901 -0
  88. package/dist/lib/node-esm/chunk-HL2Z2GNW.mjs.map +7 -0
  89. package/dist/lib/node-esm/{chunk-3ZOUV4DF.mjs → chunk-OSPEGYX3.mjs} +21 -10
  90. package/dist/lib/node-esm/chunk-OSPEGYX3.mjs.map +7 -0
  91. package/dist/lib/node-esm/{chunk-ZGLK25WQ.mjs → chunk-XAZNQ3QN.mjs} +78 -173
  92. package/dist/lib/node-esm/chunk-XAZNQ3QN.mjs.map +7 -0
  93. package/dist/lib/node-esm/{identity-created-WJKAS2PV.mjs → identity-created-ZECO4NH3.mjs} +5 -5
  94. package/dist/lib/node-esm/identity-created-ZECO4NH3.mjs.map +7 -0
  95. package/dist/lib/node-esm/index.mjs +34 -54
  96. package/dist/lib/node-esm/index.mjs.map +3 -3
  97. package/dist/lib/node-esm/{intent-resolver-ZFNSA4CM.mjs → intent-resolver-K2UDBF2R.mjs} +116 -108
  98. package/dist/lib/node-esm/intent-resolver-K2UDBF2R.mjs.map +7 -0
  99. package/dist/lib/node-esm/meta.json +1 -1
  100. package/dist/lib/node-esm/{react-root-PRBJMWLQ.mjs → react-root-6F7B3OVO.mjs} +6 -5
  101. package/dist/lib/{browser/react-root-6H7NX2M2.mjs.map → node-esm/react-root-6F7B3OVO.mjs.map} +1 -1
  102. package/dist/lib/node-esm/{react-surface-RCZG2PNF.mjs → react-surface-NP3Y6BNZ.mjs} +121 -54
  103. package/dist/lib/node-esm/react-surface-NP3Y6BNZ.mjs.map +7 -0
  104. package/dist/lib/node-esm/schema-defs-QZJS6UXN.mjs +27 -0
  105. package/dist/lib/node-esm/schema-defs-QZJS6UXN.mjs.map +7 -0
  106. package/dist/lib/node-esm/{schema-tools-IU7EX5A5.mjs → schema-tools-2Y4D42PD.mjs} +26 -26
  107. package/dist/lib/node-esm/schema-tools-2Y4D42PD.mjs.map +7 -0
  108. package/dist/lib/node-esm/{settings-FJZPC2TV.mjs → settings-Q4XDFSYD.mjs} +4 -4
  109. package/dist/lib/node-esm/settings-Q4XDFSYD.mjs.map +7 -0
  110. package/dist/lib/node-esm/{spaces-ready-7X5PGB2V.mjs → spaces-ready-JHKPD4PH.mjs} +20 -19
  111. package/dist/lib/node-esm/spaces-ready-JHKPD4PH.mjs.map +7 -0
  112. package/dist/lib/node-esm/{state-Z6E2YTNC.mjs → state-4ATRHSKA.mjs} +3 -5
  113. package/dist/lib/node-esm/state-4ATRHSKA.mjs.map +7 -0
  114. package/dist/lib/node-esm/types/index.mjs +7 -7
  115. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  116. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  117. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/app-graph-serializer.d.ts +2 -2
  119. package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -1
  120. package/dist/types/src/capabilities/capabilities.d.ts +0 -8
  121. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  122. package/dist/types/src/capabilities/identity-created.d.ts +2 -2
  123. package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/index.d.ts +9 -184
  125. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  126. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -3
  127. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  128. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  129. package/dist/types/src/capabilities/schema-defs.d.ts +4 -0
  130. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/schema-tools.d.ts +3 -3
  132. package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
  133. package/dist/types/src/capabilities/spaces-ready.d.ts +2 -2
  134. package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
  135. package/dist/types/src/capabilities/state.d.ts +2 -2
  136. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  137. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  138. package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
  139. package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
  140. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
  141. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  142. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  143. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  144. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  145. package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
  146. package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
  147. package/dist/types/src/components/MenuFooter.d.ts +2 -2
  148. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  149. package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.d.ts +2 -2
  150. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -0
  151. package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.d.ts +2 -2
  152. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -0
  153. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -0
  154. package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.d.ts +2 -2
  155. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -0
  156. package/dist/types/src/components/ObjectSettings/index.d.ts.map +1 -0
  157. package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
  158. package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
  159. package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
  160. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
  161. package/dist/types/src/components/SchemaContainer.d.ts +13 -0
  162. package/dist/types/src/components/SchemaContainer.d.ts.map +1 -0
  163. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  164. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  165. package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
  166. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +0 -2
  167. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  168. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +7 -0
  169. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -0
  170. package/dist/types/src/components/SpaceSettings/index.d.ts +0 -1
  171. package/dist/types/src/components/SpaceSettings/index.d.ts.map +1 -1
  172. package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
  173. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -8
  174. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  175. package/dist/types/src/components/SyncStatus/save-tracker.d.ts.map +1 -1
  176. package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
  177. package/dist/types/src/components/index.d.ts +2 -3
  178. package/dist/types/src/components/index.d.ts.map +1 -1
  179. package/dist/types/src/hooks/index.d.ts +2 -0
  180. package/dist/types/src/hooks/index.d.ts.map +1 -1
  181. package/dist/types/src/hooks/useActiveSpace.d.ts +4 -0
  182. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -0
  183. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +14 -0
  184. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -0
  185. package/dist/types/src/hooks/usePath.d.ts +3 -2
  186. package/dist/types/src/hooks/usePath.d.ts.map +1 -1
  187. package/dist/types/src/index.d.ts +3 -2
  188. package/dist/types/src/index.d.ts.map +1 -1
  189. package/dist/types/src/translations.d.ts +17 -242
  190. package/dist/types/src/translations.d.ts.map +1 -1
  191. package/dist/types/src/types/collection.d.ts +9 -8
  192. package/dist/types/src/types/collection.d.ts.map +1 -1
  193. package/dist/types/src/types/index.d.ts +0 -1
  194. package/dist/types/src/types/index.d.ts.map +1 -1
  195. package/dist/types/src/types/types.d.ts +173 -146
  196. package/dist/types/src/types/types.d.ts.map +1 -1
  197. package/dist/types/src/util.d.ts +36 -20
  198. package/dist/types/src/util.d.ts.map +1 -1
  199. package/dist/types/tsconfig.tsbuildinfo +1 -1
  200. package/package.json +54 -47
  201. package/src/SpacePlugin.tsx +11 -20
  202. package/src/capabilities/app-graph-builder.ts +377 -230
  203. package/src/capabilities/app-graph-serializer.ts +8 -8
  204. package/src/capabilities/capabilities.ts +0 -9
  205. package/src/capabilities/identity-created.ts +5 -5
  206. package/src/capabilities/index.ts +2 -2
  207. package/src/capabilities/intent-resolver.ts +107 -111
  208. package/src/capabilities/react-surface.tsx +111 -50
  209. package/src/capabilities/schema-defs.ts +30 -0
  210. package/src/capabilities/schema-tool.test.ts +2 -3
  211. package/src/capabilities/schema-tools.ts +29 -29
  212. package/src/capabilities/settings.ts +2 -2
  213. package/src/capabilities/spaces-ready.ts +17 -15
  214. package/src/capabilities/state.ts +3 -5
  215. package/src/components/AwaitingObject.tsx +1 -1
  216. package/src/components/CollectionMain.tsx +2 -5
  217. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +4 -4
  218. package/src/components/CreateDialog/CreateObjectDialog.tsx +4 -4
  219. package/src/components/CreateDialog/CreateObjectPanel.tsx +3 -25
  220. package/src/components/CreateDialog/CreateSpaceDialog.tsx +6 -3
  221. package/src/components/MembersContainer.stories.tsx +1 -5
  222. package/src/components/MembersContainer.tsx +80 -54
  223. package/src/components/MenuFooter.tsx +2 -2
  224. package/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.tsx +4 -4
  225. package/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.tsx +2 -2
  226. package/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.tsx +4 -4
  227. package/src/components/PersistenceStatus.tsx +11 -14
  228. package/src/components/PopoverRenameObject.tsx +15 -9
  229. package/src/components/PopoverRenameSpace.tsx +9 -1
  230. package/src/components/SchemaContainer.tsx +59 -0
  231. package/src/components/SpacePluginSettings.tsx +27 -2
  232. package/src/components/SpacePresence.stories.tsx +1 -1
  233. package/src/components/SpacePresence.tsx +60 -65
  234. package/src/components/SpaceSettings/{SpacePropertiesForm.stories.tsx → SpaceSettingsContainer.stories.tsx} +6 -6
  235. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +159 -39
  236. package/src/components/SpaceSettings/index.ts +0 -1
  237. package/src/components/SyncStatus/InlineSyncStatus.tsx +15 -24
  238. package/src/components/SyncStatus/SyncStatus.tsx +6 -69
  239. package/src/components/index.ts +2 -3
  240. package/src/hooks/index.ts +2 -0
  241. package/src/hooks/useActiveSpace.ts +20 -0
  242. package/src/hooks/useInputSurfaceLookup.tsx +31 -0
  243. package/src/hooks/usePath.ts +9 -6
  244. package/src/index.ts +3 -2
  245. package/src/translations.ts +19 -7
  246. package/src/types/collection.ts +6 -4
  247. package/src/types/index.ts +0 -1
  248. package/src/types/types.ts +130 -101
  249. package/src/util.tsx +75 -172
  250. package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs +0 -315
  251. package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +0 -7
  252. package/dist/lib/browser/app-graph-serializer-DSF2U3A5.mjs.map +0 -7
  253. package/dist/lib/browser/chunk-5BDV575R.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-AYW4IDRT.mjs +0 -275
  255. package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +0 -7
  256. package/dist/lib/browser/chunk-JZXWPMLA.mjs +0 -2081
  257. package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +0 -7
  258. package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +0 -7
  259. package/dist/lib/browser/identity-created-JR7BNXFH.mjs.map +0 -7
  260. package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +0 -7
  261. package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +0 -7
  262. package/dist/lib/browser/schema-FHTA26SW.mjs +0 -24
  263. package/dist/lib/browser/schema-FHTA26SW.mjs.map +0 -7
  264. package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
  265. package/dist/lib/browser/settings-PJPTJUPE.mjs.map +0 -7
  266. package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +0 -7
  267. package/dist/lib/browser/state-X7VLCC6E.mjs.map +0 -7
  268. package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs +0 -318
  269. package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +0 -7
  270. package/dist/lib/node/app-graph-serializer-JELGJUAY.cjs.map +0 -7
  271. package/dist/lib/node/chunk-3GKCNADA.cjs +0 -2074
  272. package/dist/lib/node/chunk-3GKCNADA.cjs.map +0 -7
  273. package/dist/lib/node/chunk-PU2EYH4E.cjs.map +0 -7
  274. package/dist/lib/node/chunk-TUZWEPGX.cjs.map +0 -7
  275. package/dist/lib/node/chunk-WDEIFDTX.cjs +0 -300
  276. package/dist/lib/node/chunk-WDEIFDTX.cjs.map +0 -7
  277. package/dist/lib/node/identity-created-XU4HFV2T.cjs.map +0 -7
  278. package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +0 -7
  279. package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +0 -7
  280. package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +0 -7
  281. package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
  282. package/dist/lib/node/settings-WVFP2UEP.cjs.map +0 -7
  283. package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +0 -7
  284. package/dist/lib/node/state-5KX6WBJH.cjs.map +0 -7
  285. package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs +0 -316
  286. package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +0 -7
  287. package/dist/lib/node-esm/app-graph-serializer-FXONFKOE.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +0 -7
  289. package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs +0 -2082
  290. package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +0 -7
  291. package/dist/lib/node-esm/chunk-FC4UHDPL.mjs +0 -276
  292. package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +0 -7
  293. package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +0 -7
  294. package/dist/lib/node-esm/identity-created-WJKAS2PV.mjs.map +0 -7
  295. package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +0 -7
  296. package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +0 -7
  297. package/dist/lib/node-esm/schema-OUZKVYM5.mjs +0 -25
  298. package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +0 -7
  299. package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
  300. package/dist/lib/node-esm/settings-FJZPC2TV.mjs.map +0 -7
  301. package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +0 -7
  302. package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +0 -7
  303. package/dist/types/src/capabilities/schema.d.ts +0 -4
  304. package/dist/types/src/capabilities/schema.d.ts.map +0 -1
  305. package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +0 -1
  306. package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts.map +0 -1
  307. package/dist/types/src/components/ObjectSettingsContainer/ForeignKeys.d.ts.map +0 -1
  308. package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +0 -1
  309. package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +0 -1
  310. package/dist/types/src/components/PopoverAddSpace.d.ts +0 -4
  311. package/dist/types/src/components/PopoverAddSpace.d.ts.map +0 -1
  312. package/dist/types/src/components/ShareSpaceButton.d.ts +0 -9
  313. package/dist/types/src/components/ShareSpaceButton.d.ts.map +0 -1
  314. package/dist/types/src/components/ShareSpaceButton.stories.d.ts +0 -10
  315. package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +0 -1
  316. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts +0 -7
  317. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts.map +0 -1
  318. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts +0 -7
  319. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts.map +0 -1
  320. package/dist/types/src/components/SyncStatus/Space.d.ts +0 -13
  321. package/dist/types/src/components/SyncStatus/Space.d.ts.map +0 -1
  322. package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts +0 -9
  323. package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts.map +0 -1
  324. package/dist/types/src/components/SyncStatus/sync-state.d.ts +0 -18
  325. package/dist/types/src/components/SyncStatus/sync-state.d.ts.map +0 -1
  326. package/dist/types/src/types/thread.d.ts +0 -128
  327. package/dist/types/src/types/thread.d.ts.map +0 -1
  328. package/src/capabilities/schema.ts +0 -27
  329. package/src/components/PopoverAddSpace.tsx +0 -46
  330. package/src/components/ShareSpaceButton.stories.tsx +0 -27
  331. package/src/components/ShareSpaceButton.tsx +0 -32
  332. package/src/components/SpaceSettings/SpacePropertiesForm.tsx +0 -136
  333. package/src/components/SyncStatus/Space.tsx +0 -133
  334. package/src/components/SyncStatus/SyncStatusDetail.stories.tsx +0 -89
  335. package/src/components/SyncStatus/sync-state.ts +0 -101
  336. package/src/types/thread.ts +0 -24
  337. /package/dist/lib/{node-esm/react-root-PRBJMWLQ.mjs.map → browser/react-root-PVKJE4EZ.mjs.map} +0 -0
  338. /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.d.ts +0 -0
  339. /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/index.d.ts +0 -0
  340. /package/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.tsx +0 -0
  341. /package/src/components/{ObjectSettingsContainer → ObjectSettings}/index.ts +0 -0
@@ -0,0 +1,1900 @@
1
+ import {
2
+ useInputSurfaceLookup,
3
+ usePath
4
+ } from "./chunk-7Y4M7GXO.mjs";
5
+ import {
6
+ SpaceCapabilities
7
+ } from "./chunk-3LN4LJN6.mjs";
8
+ import {
9
+ COMPOSER_SPACE_LOCK,
10
+ getSpaceDisplayName
11
+ } from "./chunk-N5QMRLKI.mjs";
12
+ import {
13
+ CollectionType,
14
+ SpaceAction,
15
+ SpaceForm
16
+ } from "./chunk-W46VVHFM.mjs";
17
+ import {
18
+ SPACE_PLUGIN,
19
+ meta
20
+ } from "./chunk-PTKYMZWO.mjs";
21
+
22
+ // packages/plugins/plugin-space/src/components/AwaitingObject.tsx
23
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
24
+ import { CheckCircle, CircleDashed, CircleNotch } from "@phosphor-icons/react";
25
+ import React, { useCallback, useEffect, useState } from "react";
26
+ import { createIntent, LayoutAction, useIntentDispatcher, useLayout } from "@dxos/app-framework";
27
+ import { useClient } from "@dxos/react-client";
28
+ import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
29
+ import { Button, Toast, useTranslation } from "@dxos/react-ui";
30
+ import { getSize, mx } from "@dxos/react-ui-theme";
31
+ var WAIT_FOR_OBJECT_TIMEOUT = 18e4;
32
+ var TOAST_TIMEOUT = 24e4;
33
+ var AwaitingObject = ({ id }) => {
34
+ var _effect = _useSignals();
35
+ try {
36
+ const [open, setOpen] = useState(true);
37
+ const [waiting, setWaiting] = useState(true);
38
+ const [found, setFound] = useState(false);
39
+ const { t } = useTranslation(SPACE_PLUGIN);
40
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
41
+ const layout = useLayout();
42
+ const client = useClient();
43
+ const objects = useQuery(client.spaces, Filter.everything());
44
+ useEffect(() => {
45
+ if (!id) {
46
+ return;
47
+ }
48
+ const timeout = setTimeout(() => {
49
+ setWaiting(false);
50
+ }, WAIT_FOR_OBJECT_TIMEOUT);
51
+ () => clearTimeout(timeout);
52
+ }, [
53
+ id
54
+ ]);
55
+ useEffect(() => {
56
+ if (objects.findIndex((object) => fullyQualifiedId(object) === id) > -1) {
57
+ setFound(true);
58
+ if (layout.active.includes(id)) {
59
+ setOpen(false);
60
+ }
61
+ }
62
+ }, [
63
+ id,
64
+ objects,
65
+ layout
66
+ ]);
67
+ const handleClose = useCallback(async () => dispatch(createIntent(SpaceAction.WaitForObject, {
68
+ id: void 0
69
+ })), [
70
+ dispatch
71
+ ]);
72
+ const handleNavigate = useCallback(() => {
73
+ void dispatch(createIntent(LayoutAction.Open, {
74
+ part: "main",
75
+ subject: [
76
+ id
77
+ ]
78
+ }));
79
+ void handleClose();
80
+ }, [
81
+ id,
82
+ handleClose,
83
+ dispatch
84
+ ]);
85
+ return /* @__PURE__ */ React.createElement(Toast.Root, {
86
+ open,
87
+ duration: TOAST_TIMEOUT,
88
+ onOpenChange: setOpen
89
+ }, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
90
+ classNames: "flex items-center gap-2"
91
+ }, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CheckCircle, {
92
+ className: getSize(5)
93
+ }), /* @__PURE__ */ React.createElement("span", null, t("found object label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CircleNotch, {
94
+ className: mx(getSize(5), "animate-spin")
95
+ }), /* @__PURE__ */ React.createElement("span", null, t("waiting for object label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CircleDashed, {
96
+ className: getSize(5)
97
+ }), /* @__PURE__ */ React.createElement("span", null, t("object not found label")))), /* @__PURE__ */ React.createElement(Toast.Description, null, t(found ? "found object description" : waiting ? "waiting for object description" : "object not found description"))), /* @__PURE__ */ React.createElement(Toast.Actions, null, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Toast.Action, {
98
+ altText: t("go to object alt"),
99
+ asChild: true
100
+ }, /* @__PURE__ */ React.createElement(Button, {
101
+ variant: "primary",
102
+ onClick: handleNavigate
103
+ }, t("go to object label"))), /* @__PURE__ */ React.createElement(Toast.Close, {
104
+ asChild: true
105
+ }, /* @__PURE__ */ React.createElement(Button, {
106
+ onClick: handleClose
107
+ }, t("close label", {
108
+ ns: "appkit"
109
+ })))) : /* @__PURE__ */ React.createElement(Toast.Close, {
110
+ asChild: true
111
+ }, /* @__PURE__ */ React.createElement(Button, {
112
+ onClick: handleClose
113
+ }, t(waiting ? "close label" : "confirm label", {
114
+ ns: "appkit"
115
+ })))));
116
+ } finally {
117
+ _effect.f();
118
+ }
119
+ };
120
+
121
+ // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
122
+ import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
123
+ import { pipe } from "effect";
124
+ import React3, { useCallback as useCallback3, useRef } from "react";
125
+ import { Capabilities, chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework";
126
+ import { invariant as invariant2 } from "@dxos/invariant";
127
+ import { useClient as useClient2 } from "@dxos/react-client";
128
+ import { getSpace, isLiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
129
+ import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation3 } from "@dxos/react-ui";
130
+
131
+ // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
132
+ import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
133
+ import React2, { useCallback as useCallback2, useState as useState2 } from "react";
134
+ import { getTypeAnnotation } from "@dxos/echo-schema";
135
+ import { invariant } from "@dxos/invariant";
136
+ import { Icon, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
137
+ import { Form } from "@dxos/react-ui-form";
138
+ import { SearchList } from "@dxos/react-ui-searchlist";
139
+ import { mx as mx2 } from "@dxos/react-ui-theme";
140
+ import { isNonNullable } from "@dxos/util";
141
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx";
142
+ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
143
+ var _effect = _useSignals2();
144
+ try {
145
+ const { t } = useTranslation2(SPACE_PLUGIN);
146
+ const [typename, setTypename] = useState2(initialTypename);
147
+ const [target, setTarget] = useState2(initialTarget);
148
+ const form = forms.find((form2) => getTypeAnnotation(form2.objectSchema)?.typename === typename);
149
+ const options = forms.map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
150
+ const nameA = t("typename label", {
151
+ ns: a.typename,
152
+ defaultValue: a.typename
153
+ });
154
+ const nameB = t("typename label", {
155
+ ns: b.typename,
156
+ defaultValue: b.typename
157
+ });
158
+ return nameA.localeCompare(nameB);
159
+ });
160
+ const handleCreateObject = useCallback2(async (props) => {
161
+ if (!form || !target) {
162
+ return;
163
+ }
164
+ await onCreateObject?.({
165
+ form,
166
+ target,
167
+ data: props
168
+ });
169
+ }, [
170
+ onCreateObject,
171
+ form,
172
+ target
173
+ ]);
174
+ const handleSetTypename = useCallback2(async (typename2) => {
175
+ invariant(target, "target is required", {
176
+ F: __dxlog_file,
177
+ L: 72,
178
+ S: void 0,
179
+ A: [
180
+ "target",
181
+ "'target is required'"
182
+ ]
183
+ });
184
+ const form2 = forms.find((form3) => getTypeAnnotation(form3.objectSchema)?.typename === typename2);
185
+ if (form2 && !form2.formSchema) {
186
+ await onCreateObject?.({
187
+ form: form2,
188
+ target
189
+ });
190
+ } else {
191
+ setTypename(typename2);
192
+ }
193
+ }, [
194
+ forms,
195
+ onCreateObject,
196
+ target
197
+ ]);
198
+ const inputSurfaceLookup = useInputSurfaceLookup({
199
+ target
200
+ });
201
+ return /* @__PURE__ */ React2.createElement("div", {
202
+ role: "form",
203
+ className: mx2("flex flex-col gap-2", classNames)
204
+ }, !form ? /* @__PURE__ */ React2.createElement(SelectSchema, {
205
+ options,
206
+ resolve,
207
+ onChange: handleSetTypename
208
+ }) : !target ? /* @__PURE__ */ React2.createElement(SelectSpace, {
209
+ spaces,
210
+ defaultSpaceId,
211
+ onChange: setTarget
212
+ }) : form.formSchema ? /* @__PURE__ */ React2.createElement(Form, {
213
+ classNames: "!p-0",
214
+ autoFocus: true,
215
+ values: {
216
+ name: initialName
217
+ },
218
+ schema: form.formSchema,
219
+ testId: "create-object-form",
220
+ onSave: handleCreateObject,
221
+ lookupComponent: inputSurfaceLookup
222
+ }) : void 0);
223
+ } finally {
224
+ _effect.f();
225
+ }
226
+ };
227
+ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
228
+ var _effect = _useSignals2();
229
+ try {
230
+ const { t } = useTranslation2(SPACE_PLUGIN);
231
+ return /* @__PURE__ */ React2.createElement(SearchList.Root, {
232
+ label: t("space input label"),
233
+ classNames: "flex flex-col grow overflow-hidden"
234
+ }, /* @__PURE__ */ React2.createElement(SearchList.Input, {
235
+ autoFocus: true,
236
+ "data-testid": "create-object-form.space-input",
237
+ placeholder: t("space input placeholder"),
238
+ classNames: "px-1 my-2"
239
+ }), /* @__PURE__ */ React2.createElement(SearchList.Content, {
240
+ classNames: "max-bs-[24rem] overflow-auto"
241
+ }, spaces.sort((a, b) => {
242
+ const aName = toLocalizedString(getSpaceDisplayName(a, {
243
+ personal: a.id === defaultSpaceId
244
+ }), t);
245
+ const bName = toLocalizedString(getSpaceDisplayName(b, {
246
+ personal: b.id === defaultSpaceId
247
+ }), t);
248
+ return aName.localeCompare(bName);
249
+ }).map((space) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
250
+ key: space.id,
251
+ value: toLocalizedString(getSpaceDisplayName(space, {
252
+ personal: space.id === defaultSpaceId
253
+ }), t),
254
+ onSelect: () => onChange(space),
255
+ classNames: "flex items-center gap-2"
256
+ }, /* @__PURE__ */ React2.createElement("span", {
257
+ className: "grow truncate"
258
+ }, toLocalizedString(getSpaceDisplayName(space, {
259
+ personal: space.id === defaultSpaceId
260
+ }), t))))));
261
+ } finally {
262
+ _effect.f();
263
+ }
264
+ };
265
+ var SelectSchema = ({ options, resolve, onChange }) => {
266
+ var _effect = _useSignals2();
267
+ try {
268
+ const { t } = useTranslation2(SPACE_PLUGIN);
269
+ return /* @__PURE__ */ React2.createElement(SearchList.Root, {
270
+ label: t("schema input label"),
271
+ classNames: "flex flex-col grow overflow-hidden"
272
+ }, /* @__PURE__ */ React2.createElement(SearchList.Input, {
273
+ autoFocus: true,
274
+ "data-testid": "create-object-form.schema-input",
275
+ placeholder: t("schema input placeholder"),
276
+ classNames: "px-1 my-2"
277
+ }), /* @__PURE__ */ React2.createElement(SearchList.Content, {
278
+ classNames: "max-bs-[24rem] overflow-auto"
279
+ }, options.map((option) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
280
+ key: option.typename,
281
+ value: t("typename label", {
282
+ ns: option.typename,
283
+ defaultValue: option.typename
284
+ }),
285
+ onSelect: () => onChange(option.typename),
286
+ classNames: "flex items-center gap-2"
287
+ }, /* @__PURE__ */ React2.createElement("span", {
288
+ className: "flex gap-2 items-center grow truncate"
289
+ }, /* @__PURE__ */ React2.createElement(Icon, {
290
+ icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
291
+ size: 5
292
+ }), t("typename label", {
293
+ ns: option.typename,
294
+ defaultValue: option.typename
295
+ }))))));
296
+ } finally {
297
+ _effect.f();
298
+ }
299
+ };
300
+
301
+ // packages/plugins/plugin-space/src/capabilities/index.ts
302
+ import { lazy } from "@dxos/app-framework";
303
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-DCWUULKX.mjs"));
304
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-MLU7XI2P.mjs"));
305
+ var IdentityCreated = lazy(() => import("./identity-created-O63SIYOF.mjs"));
306
+ var IntentResolver = lazy(() => import("./intent-resolver-KBF3YU6I.mjs"));
307
+ var ReactRoot = lazy(() => import("./react-root-PVKJE4EZ.mjs"));
308
+ var ReactSurface = lazy(() => import("./react-surface-252P4NCK.mjs"));
309
+ var SchemaDefs = lazy(() => import("./schema-defs-JMN74RNK.mjs"));
310
+ var SchemaTools = lazy(() => import("./schema-tools-JIEMHUXV.mjs"));
311
+ var SpaceSettings = lazy(() => import("./settings-2IN2WLUK.mjs"));
312
+ var SpaceState = lazy(() => import("./state-6HOSHLIN.mjs"));
313
+ var SpacesReady = lazy(() => import("./spaces-ready-L4QAGTDE.mjs"));
314
+
315
+ // packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
316
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
317
+ var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
318
+ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavigate }) => {
319
+ var _effect = _useSignals3();
320
+ try {
321
+ const closeRef = useRef(null);
322
+ const manager = usePluginManager();
323
+ const { t } = useTranslation3(SPACE_PLUGIN);
324
+ const client = useClient2();
325
+ const spaces = useSpaces();
326
+ const { dispatchPromise: dispatch } = useIntentDispatcher2();
327
+ const forms = useCapabilities(SpaceCapabilities.ObjectForm);
328
+ const resolve = useCallback3((typename2) => manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
329
+ manager
330
+ ]);
331
+ const handleCreateObject = useCallback3(async ({ form, target: target2, data = {} }) => {
332
+ if (!target2) {
333
+ return;
334
+ }
335
+ closeRef.current?.click();
336
+ const space = isSpace(target2) ? target2 : getSpace(target2);
337
+ invariant2(space, "Missing space", {
338
+ F: __dxlog_file2,
339
+ L: 72,
340
+ S: void 0,
341
+ A: [
342
+ "space",
343
+ "'Missing space'"
344
+ ]
345
+ });
346
+ const result = await dispatch(form.getIntent(data, {
347
+ space
348
+ }));
349
+ const object = result.data?.object;
350
+ if (isLiveObject(object)) {
351
+ const addObjectIntent = createIntent2(SpaceAction.AddObject, {
352
+ target: target2,
353
+ object,
354
+ hidden: form.hidden
355
+ });
356
+ const shouldNavigate = _shouldNavigate ?? (() => true);
357
+ if (shouldNavigate(object)) {
358
+ await dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
359
+ part: "main"
360
+ })));
361
+ } else {
362
+ await dispatch(addObjectIntent);
363
+ }
364
+ }
365
+ }, [
366
+ dispatch,
367
+ resolve
368
+ ]);
369
+ return (
370
+ // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
371
+ // Consider factoring it out to the tabs package.
372
+ /* @__PURE__ */ React3.createElement(Dialog.Content, {
373
+ classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
374
+ }, /* @__PURE__ */ React3.createElement("div", {
375
+ role: "none",
376
+ className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
377
+ }, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("create object dialog title")), /* @__PURE__ */ React3.createElement(Dialog.Close, {
378
+ asChild: true
379
+ }, /* @__PURE__ */ React3.createElement(Button2, {
380
+ ref: closeRef,
381
+ density: "fine",
382
+ variant: "ghost",
383
+ autoFocus: true
384
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
385
+ icon: "ph--x--regular",
386
+ size: 4
387
+ })))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
388
+ classNames: "p-4",
389
+ forms,
390
+ spaces,
391
+ target,
392
+ typename,
393
+ name,
394
+ defaultSpaceId: client.spaces.default.id,
395
+ resolve,
396
+ onCreateObject: handleCreateObject
397
+ }))
398
+ );
399
+ } finally {
400
+ _effect.f();
401
+ }
402
+ };
403
+
404
+ // packages/plugins/plugin-space/src/components/CreateDialog/CreateSpaceDialog.tsx
405
+ import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
406
+ import { Effect } from "effect";
407
+ import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
408
+ import { createIntent as createIntent3, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
409
+ import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as useTranslation4 } from "@dxos/react-ui";
410
+ import { Form as Form2 } from "@dxos/react-ui-form";
411
+ var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
412
+ var initialValues = {
413
+ edgeReplication: true
414
+ };
415
+ var CreateSpaceDialog = () => {
416
+ var _effect = _useSignals4();
417
+ try {
418
+ const closeRef = useRef2(null);
419
+ const { t } = useTranslation4(SPACE_PLUGIN);
420
+ const { dispatch } = useIntentDispatcher3();
421
+ const inputSurfaceLookup = useInputSurfaceLookup();
422
+ const handleCreateSpace = useCallback4(async (data) => {
423
+ const program = Effect.gen(function* () {
424
+ const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
425
+ yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
426
+ part: "workspace",
427
+ subject: space.id
428
+ }));
429
+ yield* dispatch(createIntent3(SpaceAction.OpenCreateObject, {
430
+ target: space
431
+ }));
432
+ });
433
+ await Effect.runPromise(program);
434
+ }, [
435
+ dispatch
436
+ ]);
437
+ return (
438
+ // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
439
+ // Consider factoring it out to the tabs package.
440
+ /* @__PURE__ */ React4.createElement(Dialog2.Content, {
441
+ classNames: "p-0 bs-content min-bs-[16rem] max-bs-full md:max-is-[32rem] overflow-hidden"
442
+ }, /* @__PURE__ */ React4.createElement("div", {
443
+ role: "none",
444
+ className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
445
+ }, /* @__PURE__ */ React4.createElement(Dialog2.Title, null, t("create space dialog title")), /* @__PURE__ */ React4.createElement(Dialog2.Close, {
446
+ asChild: true
447
+ }, /* @__PURE__ */ React4.createElement(Button3, {
448
+ ref: closeRef,
449
+ density: "fine",
450
+ variant: "ghost",
451
+ autoFocus: true
452
+ }, /* @__PURE__ */ React4.createElement(Icon3, {
453
+ icon: "ph--x--regular",
454
+ size: 4
455
+ })))), /* @__PURE__ */ React4.createElement("div", {
456
+ className: "p-4"
457
+ }, /* @__PURE__ */ React4.createElement(Form2, {
458
+ testId: "create-space-form",
459
+ classNames: "!p-0",
460
+ autoFocus: true,
461
+ values: initialValues,
462
+ schema: SpaceForm,
463
+ lookupComponent: inputSurfaceLookup,
464
+ onSave: handleCreateSpace
465
+ })))
466
+ );
467
+ } finally {
468
+ _effect.f();
469
+ }
470
+ };
471
+
472
+ // packages/plugins/plugin-space/src/components/CollectionMain.tsx
473
+ import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
474
+ import React5 from "react";
475
+ import { useTranslation as useTranslation5 } from "@dxos/react-ui";
476
+ import { baseSurface, descriptionMessage, mx as mx3 } from "@dxos/react-ui-theme";
477
+ var CollectionMain = ({ collection }) => {
478
+ var _effect = _useSignals5();
479
+ try {
480
+ const { t } = useTranslation5(SPACE_PLUGIN);
481
+ return /* @__PURE__ */ React5.createElement("div", {
482
+ role: "none",
483
+ className: mx3(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
484
+ "data-testid": "composer.firstRunMessage"
485
+ }, /* @__PURE__ */ React5.createElement("p", {
486
+ role: "alert",
487
+ className: mx3(descriptionMessage, "rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
488
+ }, collection.name ?? t("unnamed collection label")));
489
+ } finally {
490
+ _effect.f();
491
+ }
492
+ };
493
+
494
+ // packages/plugins/plugin-space/src/components/CollectionSection.tsx
495
+ import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
496
+ import React6 from "react";
497
+ import { useTranslation as useTranslation6 } from "@dxos/react-ui";
498
+ var CollectionSection = ({ collection }) => {
499
+ var _effect = _useSignals6();
500
+ try {
501
+ const { t } = useTranslation6(SPACE_PLUGIN);
502
+ return /* @__PURE__ */ React6.createElement("div", {
503
+ className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
504
+ }, /* @__PURE__ */ React6.createElement("span", {
505
+ className: "truncate"
506
+ }, collection.name ?? t("unnamed collection label")));
507
+ } finally {
508
+ _effect.f();
509
+ }
510
+ };
511
+
512
+ // packages/plugins/plugin-space/src/components/JoinDialog.tsx
513
+ import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
514
+ import React7, { useCallback as useCallback5 } from "react";
515
+ import { createIntent as createIntent4, LayoutAction as LayoutAction4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
516
+ import { Trigger } from "@dxos/async";
517
+ import { ObservabilityAction } from "@dxos/plugin-observability/types";
518
+ import { useClient as useClient3 } from "@dxos/react-client";
519
+ import { Dialog as Dialog3, useTranslation as useTranslation7 } from "@dxos/react-ui";
520
+ import { JoinPanel } from "@dxos/shell/react";
521
+ var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
522
+ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
523
+ var _effect = _useSignals7();
524
+ try {
525
+ const { dispatchPromise: dispatch } = useIntentDispatcher4();
526
+ const client = useClient3();
527
+ const { graph } = useAppGraph();
528
+ const { t } = useTranslation7(SPACE_PLUGIN);
529
+ const handleDone = useCallback5(async (result) => {
530
+ const spaceKey = result?.spaceKey;
531
+ if (!spaceKey) {
532
+ return;
533
+ }
534
+ await Promise.all([
535
+ dispatch(createIntent4(LayoutAction4.AddToast, {
536
+ part: "toast",
537
+ subject: {
538
+ id: `${SPACE_PLUGIN}/join-success`,
539
+ duration: 5e3,
540
+ title: [
541
+ "join success label",
542
+ {
543
+ ns: SPACE_PLUGIN
544
+ }
545
+ ],
546
+ closeLabel: [
547
+ "dismiss label",
548
+ {
549
+ ns: SPACE_PLUGIN
550
+ }
551
+ ]
552
+ }
553
+ })),
554
+ dispatch(createIntent4(LayoutAction4.UpdateDialog, {
555
+ part: "dialog",
556
+ options: {
557
+ state: false
558
+ }
559
+ }))
560
+ ]);
561
+ let space = client.spaces.get(spaceKey);
562
+ if (!space) {
563
+ const trigger = new Trigger();
564
+ client.spaces.subscribe(() => {
565
+ const space2 = client.spaces.get(spaceKey);
566
+ if (space2) {
567
+ trigger.wake(space2);
568
+ }
569
+ });
570
+ space = await trigger.wait();
571
+ }
572
+ await dispatch(createIntent4(LayoutAction4.SwitchWorkspace, {
573
+ part: "workspace",
574
+ subject: space.id
575
+ }));
576
+ const target = result?.target || (navigableCollections ? space?.id : void 0);
577
+ if (target) {
578
+ await graph.waitForPath({
579
+ target
580
+ }).catch(() => {
581
+ });
582
+ await Promise.all([
583
+ dispatch(createIntent4(LayoutAction4.Open, {
584
+ part: "main",
585
+ subject: [
586
+ target
587
+ ]
588
+ })),
589
+ dispatch(createIntent4(LayoutAction4.Expose, {
590
+ part: "navigation",
591
+ subject: target
592
+ }))
593
+ ]);
594
+ }
595
+ await onDone?.(result);
596
+ if (space) {
597
+ await dispatch(createIntent4(ObservabilityAction.SendEvent, {
598
+ name: "space.join",
599
+ properties: {
600
+ spaceId: space.id
601
+ }
602
+ }));
603
+ }
604
+ }, [
605
+ dispatch,
606
+ client,
607
+ graph
608
+ ]);
609
+ return /* @__PURE__ */ React7.createElement(Dialog3.Content, null, /* @__PURE__ */ React7.createElement(Dialog3.Title, {
610
+ classNames: "sr-only"
611
+ }, t("join space label", {
612
+ ns: "os"
613
+ })), /* @__PURE__ */ React7.createElement(JoinPanel, {
614
+ ...props,
615
+ exitActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
616
+ asChild: true
617
+ }),
618
+ doneActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
619
+ asChild: true
620
+ }),
621
+ onDone: handleDone
622
+ }));
623
+ } finally {
624
+ _effect.f();
625
+ }
626
+ };
627
+
628
+ // packages/plugins/plugin-space/src/components/MembersContainer.tsx
629
+ import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
630
+ import { Check, X } from "@phosphor-icons/react";
631
+ import React8, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
632
+ import { QR } from "react-qr-rounded";
633
+ import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
634
+ import { log } from "@dxos/log";
635
+ import { useConfig } from "@dxos/react-client";
636
+ import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
637
+ import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
638
+ import { Button as Button4, Clipboard, Icon as Icon4, Input, useId, useTranslation as useTranslation8 } from "@dxos/react-ui";
639
+ import { ControlPage, ControlSection, ControlFrame, ControlFrameItem, ControlItemInput } from "@dxos/react-ui-form";
640
+ import { StackItem } from "@dxos/react-ui-stack";
641
+ import { getSize as getSize2, mx as mx4 } from "@dxos/react-ui-theme";
642
+ import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport } from "@dxos/shell/react";
643
+ import { hexToEmoji } from "@dxos/util";
644
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer.tsx";
645
+ var activeActionKey = "dxos:react-shell/space-manager/active-action";
646
+ var handleInvitationEvent = (invitation, subscription) => {
647
+ const invitationCode = InvitationEncoder.encode(invitation);
648
+ if (invitation.state === Invitation.State.CONNECTING) {
649
+ log.info(JSON.stringify({
650
+ invitationCode,
651
+ authCode: invitation.authCode
652
+ }), void 0, {
653
+ F: __dxlog_file3,
654
+ L: 40,
655
+ S: void 0,
656
+ C: (f, a) => f(...a)
657
+ });
658
+ subscription.unsubscribe();
659
+ }
660
+ };
661
+ var MembersContainer = ({ space, createInvitationUrl }) => {
662
+ var _effect = _useSignals8();
663
+ try {
664
+ const { t } = useTranslation8(SPACE_PLUGIN);
665
+ const config = useConfig();
666
+ const { dispatchPromise: dispatch } = useIntentDispatcher5();
667
+ const invitations = useSpaceInvitations(space.key);
668
+ const visibleInvitations = invitations?.filter((invitation) => ![
669
+ Invitation.State.CANCELLED
670
+ ].includes(invitation.get().state));
671
+ const [activeAction, setInternalActiveAction] = useState3(localStorage.getItem(activeActionKey) ?? "inviteMany");
672
+ const setActiveAction = (nextAction) => {
673
+ setInternalActiveAction(nextAction);
674
+ localStorage.setItem(activeActionKey, nextAction);
675
+ };
676
+ const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
677
+ const locked = space.properties[COMPOSER_SPACE_LOCK];
678
+ const handleChangeLocked = useCallback6(() => {
679
+ space.properties[COMPOSER_SPACE_LOCK] = !locked;
680
+ }, [
681
+ locked,
682
+ space
683
+ ]);
684
+ const inviteActions = useMemo(() => ({
685
+ inviteOne: {
686
+ label: t("invite one label", {
687
+ ns: "os"
688
+ }),
689
+ description: t("invite one description", {
690
+ ns: "os"
691
+ }),
692
+ icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
693
+ icon: "ph--user-plus--regular",
694
+ size: 5
695
+ }),
696
+ testId: "membersContainer.inviteOne",
697
+ onClick: async () => {
698
+ const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
699
+ space,
700
+ type: Invitation.Type.INTERACTIVE,
701
+ authMethod: Invitation.AuthMethod.SHARED_SECRET,
702
+ multiUse: false,
703
+ target: target && fullyQualifiedId2(target)
704
+ }));
705
+ if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
706
+ const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
707
+ }
708
+ }
709
+ },
710
+ inviteMany: {
711
+ label: t("invite many label", {
712
+ ns: "os"
713
+ }),
714
+ description: t("invite many description", {
715
+ ns: "os"
716
+ }),
717
+ icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
718
+ icon: "ph--users-three--regular",
719
+ size: 5
720
+ }),
721
+ testId: "membersContainer.inviteMany",
722
+ onClick: async () => {
723
+ const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
724
+ space,
725
+ type: Invitation.Type.DELEGATED,
726
+ authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
727
+ multiUse: true,
728
+ target: target && fullyQualifiedId2(target)
729
+ }));
730
+ if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
731
+ const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
732
+ }
733
+ }
734
+ }
735
+ }), [
736
+ t,
737
+ space,
738
+ target
739
+ ]);
740
+ const [selectedInvitation, setSelectedInvitation] = useState3(null);
741
+ const handleSend = (event) => {
742
+ setSelectedInvitation(event.invitation);
743
+ };
744
+ const handleBack = () => {
745
+ setSelectedInvitation(null);
746
+ };
747
+ return /* @__PURE__ */ React8.createElement(Clipboard.Provider, null, /* @__PURE__ */ React8.createElement(StackItem.Content, {
748
+ classNames: "block overflow-y-auto"
749
+ }, /* @__PURE__ */ React8.createElement(ControlPage, null, /* @__PURE__ */ React8.createElement(ControlSection, {
750
+ title: t("members verbose label"),
751
+ description: t("members description")
752
+ }, /* @__PURE__ */ React8.createElement(ControlFrame, null, /* @__PURE__ */ React8.createElement(ControlFrameItem, {
753
+ title: t("members label")
754
+ }, /* @__PURE__ */ React8.createElement(SpaceMemberList, {
755
+ spaceKey: space.key,
756
+ includeSelf: true
757
+ })), locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
758
+ title: t("invitations label")
759
+ }, /* @__PURE__ */ React8.createElement("p", {
760
+ className: "text-description mbe-2"
761
+ }, t("locked space description"))), !locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
762
+ title: t("invitations label")
763
+ }, selectedInvitation && /* @__PURE__ */ React8.createElement(InvitationSection, {
764
+ ...selectedInvitation,
765
+ onBack: handleBack
766
+ }), !selectedInvitation && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
767
+ className: "text-description mbe-2"
768
+ }, t("space invitation description")), /* @__PURE__ */ React8.createElement(InvitationList, {
769
+ className: "mb-2",
770
+ send: handleSend,
771
+ invitations: visibleInvitations ?? [],
772
+ onClickRemove: (invitation) => invitation.cancel(),
773
+ createInvitationUrl
774
+ }), /* @__PURE__ */ React8.createElement(BifurcatedAction, {
775
+ actions: inviteActions,
776
+ activeAction,
777
+ onChangeActiveAction: setActiveAction,
778
+ "data-testid": "membersContainer.createInvitation"
779
+ })))), /* @__PURE__ */ React8.createElement("div", {
780
+ className: "justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
781
+ }, /* @__PURE__ */ React8.createElement(ControlItemInput, {
782
+ title: t("space locked label"),
783
+ description: t("space locked description")
784
+ }, /* @__PURE__ */ React8.createElement(Input.Switch, {
785
+ checked: locked,
786
+ onCheckedChange: handleChangeLocked,
787
+ classNames: "justify-self-end"
788
+ })))))));
789
+ } finally {
790
+ _effect.f();
791
+ }
792
+ };
793
+ var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
794
+ var _effect = _useSignals8();
795
+ try {
796
+ const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
797
+ return /* @__PURE__ */ React8.createElement(Viewport.Root, {
798
+ activeView
799
+ }, /* @__PURE__ */ React8.createElement(Viewport.Views, null, /* @__PURE__ */ React8.createElement(Viewport.View, {
800
+ id: "init"
801
+ }), /* @__PURE__ */ React8.createElement(Viewport.View, {
802
+ id: "complete"
803
+ }, /* @__PURE__ */ React8.createElement(InvitationComplete, {
804
+ statusValue: state
805
+ })), /* @__PURE__ */ React8.createElement(Viewport.View, {
806
+ id: "auth-code"
807
+ }, /* @__PURE__ */ React8.createElement(InvitationAuthCode, {
808
+ id: invitationId,
809
+ code: authCode ?? "never",
810
+ onCancel: onBack
811
+ })), /* @__PURE__ */ React8.createElement(Viewport.View, {
812
+ id: "qr-code"
813
+ }, /* @__PURE__ */ React8.createElement(InvitationQR, {
814
+ id: invitationId,
815
+ url,
816
+ onCancel: onBack
817
+ }))));
818
+ } finally {
819
+ _effect.f();
820
+ }
821
+ };
822
+ var InvitationQR = ({ id, url, onCancel }) => {
823
+ var _effect = _useSignals8();
824
+ try {
825
+ const { t } = useTranslation8("os");
826
+ const qrLabel = useId("members-container__qr-code");
827
+ const emoji = hexToEmoji(id);
828
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
829
+ className: "text-description"
830
+ }, t("qr code description", {
831
+ ns: SPACE_PLUGIN
832
+ })), /* @__PURE__ */ React8.createElement("div", {
833
+ role: "group",
834
+ className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
835
+ }, /* @__PURE__ */ React8.createElement("div", {
836
+ role: "none",
837
+ className: "is-full aspect-square relative text-description"
838
+ }, /* @__PURE__ */ React8.createElement(QR, {
839
+ rounding: 100,
840
+ backgroundColor: "transparent",
841
+ color: "currentColor",
842
+ "aria-labelledby": qrLabel,
843
+ errorCorrectionLevel: "Q",
844
+ cutout: true
845
+ }, url ?? "never"), /* @__PURE__ */ React8.createElement(Centered, null, /* @__PURE__ */ React8.createElement(Emoji, {
846
+ text: emoji
847
+ }))), /* @__PURE__ */ React8.createElement("span", {
848
+ id: qrLabel,
849
+ className: "sr-only"
850
+ }, t("qr label")), /* @__PURE__ */ React8.createElement(Clipboard.Button, {
851
+ value: url ?? "never"
852
+ })), /* @__PURE__ */ React8.createElement(Button4, {
853
+ variant: "ghost",
854
+ onClick: onCancel
855
+ }, t("cancel label")));
856
+ } finally {
857
+ _effect.f();
858
+ }
859
+ };
860
+ var InvitationAuthCode = ({ id, code, onCancel }) => {
861
+ var _effect = _useSignals8();
862
+ try {
863
+ const { t } = useTranslation8("os");
864
+ const emoji = hexToEmoji(id);
865
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
866
+ className: "text-description"
867
+ }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React8.createElement(Emoji, {
868
+ text: emoji,
869
+ className: "mli-auto mlb-2 text-center"
870
+ }), /* @__PURE__ */ React8.createElement("p", {
871
+ className: "text-description"
872
+ }, t("auth code message")), /* @__PURE__ */ React8.createElement(AuthCode, {
873
+ code,
874
+ large: true,
875
+ classNames: "mli-auto mlb-2 text-center grow"
876
+ }), /* @__PURE__ */ React8.createElement(Button4, {
877
+ variant: "ghost",
878
+ onClick: onCancel
879
+ }, t("cancel label")));
880
+ } finally {
881
+ _effect.f();
882
+ }
883
+ };
884
+ var InvitationComplete = ({ statusValue }) => {
885
+ var _effect = _useSignals8();
886
+ try {
887
+ return statusValue > 0 ? /* @__PURE__ */ React8.createElement(Check, {
888
+ className: mx4("m-1.5", getSize2(6))
889
+ }) : /* @__PURE__ */ React8.createElement(X, {
890
+ className: mx4("m-1.5", getSize2(6))
891
+ });
892
+ } finally {
893
+ _effect.f();
894
+ }
895
+ };
896
+
897
+ // packages/plugins/plugin-space/src/components/MenuFooter.tsx
898
+ import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
899
+ import { Planet } from "@phosphor-icons/react";
900
+ import React9 from "react";
901
+ import { getSpace as getSpace2 } from "@dxos/client/echo";
902
+ import { useClient as useClient4 } from "@dxos/react-client";
903
+ import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation9 } from "@dxos/react-ui";
904
+ var MenuFooter = ({ object }) => {
905
+ var _effect = _useSignals9();
906
+ try {
907
+ const { t } = useTranslation9(SPACE_PLUGIN);
908
+ const client = useClient4();
909
+ const space = getSpace2(object);
910
+ const spaceName = space ? getSpaceDisplayName(space, {
911
+ personal: client.spaces.default === space
912
+ }) : "";
913
+ 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", {
914
+ className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
915
+ }, /* @__PURE__ */ React9.createElement("dt", {
916
+ className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
917
+ }, t("location label")), /* @__PURE__ */ React9.createElement("dd", {
918
+ className: "line-clamp-3"
919
+ }, /* @__PURE__ */ React9.createElement(Planet, {
920
+ className: "inline-block mie-1"
921
+ }), toLocalizedString2(spaceName, t)))) : null;
922
+ } finally {
923
+ _effect.f();
924
+ }
925
+ };
926
+
927
+ // packages/plugins/plugin-space/src/components/ObjectSettings/ObjectSettingsContainer.tsx
928
+ import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
929
+ import React11, { useMemo as useMemo2 } from "react";
930
+ import { Surface } from "@dxos/app-framework";
931
+ import { Clipboard as Clipboard2 } from "@dxos/react-ui";
932
+ import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
933
+
934
+ // packages/plugins/plugin-space/src/components/ObjectSettings/BaseObjectSettings.tsx
935
+ import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
936
+ import React10, { useRef as useRef3 } from "react";
937
+ import { Input as Input2, useTranslation as useTranslation10 } from "@dxos/react-ui";
938
+ import { mx as mx5 } from "@dxos/react-ui-theme";
939
+ var BaseObjectSettings = ({ classNames, children, object }) => {
940
+ var _effect = _useSignals10();
941
+ try {
942
+ const { t } = useTranslation10(meta.id);
943
+ const inputRef = useRef3(null);
944
+ return /* @__PURE__ */ React10.createElement("form", {
945
+ className: mx5("flex flex-col p-2 gap-2", classNames)
946
+ }, /* @__PURE__ */ React10.createElement(Input2.Root, null, /* @__PURE__ */ React10.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React10.createElement(Input2.TextInput, {
947
+ ref: inputRef,
948
+ placeholder: t("name placeholder"),
949
+ value: object.name ?? "",
950
+ onChange: (event) => {
951
+ object.name = event.target.value;
952
+ },
953
+ onKeyDown: (event) => {
954
+ if (event.key === "Enter") {
955
+ inputRef.current?.blur();
956
+ }
957
+ }
958
+ })), children);
959
+ } finally {
960
+ _effect.f();
961
+ }
962
+ };
963
+
964
+ // packages/plugins/plugin-space/src/components/ObjectSettings/ObjectSettingsContainer.tsx
965
+ var ObjectSettingsContainer = ({ object, role }) => {
966
+ var _effect = _useSignals11();
967
+ try {
968
+ const data = useMemo2(() => ({
969
+ subject: object
970
+ }), [
971
+ object
972
+ ]);
973
+ return /* @__PURE__ */ React11.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React11.createElement(StackItem2.Content, {
974
+ toolbar: false,
975
+ role
976
+ }, /* @__PURE__ */ React11.createElement("div", {
977
+ className: "flex flex-col overflow-y-auto divide-y divide-separator"
978
+ }, /* @__PURE__ */ React11.createElement(BaseObjectSettings, {
979
+ object
980
+ }, /* @__PURE__ */ React11.createElement(Surface, {
981
+ role: "base-object-settings",
982
+ data
983
+ })), /* @__PURE__ */ React11.createElement(Surface, {
984
+ role: "object-settings",
985
+ data
986
+ }))));
987
+ } finally {
988
+ _effect.f();
989
+ }
990
+ };
991
+
992
+ // packages/plugins/plugin-space/src/components/PersistenceStatus.tsx
993
+ import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
994
+ import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
995
+ import React12, { useEffect as useEffect2, useState as useState4 } from "react";
996
+ import { debounce } from "@dxos/async";
997
+ import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
998
+ import { getSize as getSize3, mx as mx6, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
999
+ var PersistenceStatus = ({ db }) => {
1000
+ var _effect = _useSignals12();
1001
+ try {
1002
+ const { t } = useTranslation11(SPACE_PLUGIN);
1003
+ const [displayMessage, setDisplayMessage] = useState4(false);
1004
+ const [status, naturalSetStatus] = useState4(0);
1005
+ const [prevStatus, setPrevStatus] = useState4(0);
1006
+ const _setStatus = debounce(naturalSetStatus, 500);
1007
+ useEffect2(() => {
1008
+ setPrevStatus(status);
1009
+ if (prevStatus !== status && status === 0) {
1010
+ setDisplayMessage(true);
1011
+ const timeout = setTimeout(() => setDisplayMessage(false), 5e3);
1012
+ return () => clearTimeout(timeout);
1013
+ }
1014
+ }, [
1015
+ status
1016
+ ]);
1017
+ switch (status) {
1018
+ case 2:
1019
+ return /* @__PURE__ */ React12.createElement("div", {
1020
+ className: "flex items-center"
1021
+ }, /* @__PURE__ */ React12.createElement(Warning, {
1022
+ className: mx6(getSize3(4), "me-1")
1023
+ }), /* @__PURE__ */ React12.createElement("span", {
1024
+ className: mx6("text-sm", warningText)
1025
+ }, t("persistence error label")));
1026
+ case 1:
1027
+ return /* @__PURE__ */ React12.createElement("div", {
1028
+ className: "flex items-center"
1029
+ }, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
1030
+ className: mx6(getSize3(4), "me-1")
1031
+ }), /* @__PURE__ */ React12.createElement("span", {
1032
+ className: mx6("text-sm", staticPlaceholderText)
1033
+ }, t("persistence pending label")));
1034
+ case 0:
1035
+ default:
1036
+ return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
1037
+ delayDuration: 400,
1038
+ role: "status",
1039
+ content: t("persisted locally message"),
1040
+ className: "flex items-center"
1041
+ }, /* @__PURE__ */ React12.createElement(CheckCircle2, {
1042
+ className: mx6(getSize3(4), "me-1")
1043
+ }), displayMessage && /* @__PURE__ */ React12.createElement("span", {
1044
+ className: mx6("text-sm", staticPlaceholderText)
1045
+ }, t("persisted locally label")));
1046
+ }
1047
+ } finally {
1048
+ _effect.f();
1049
+ }
1050
+ };
1051
+
1052
+ // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
1053
+ import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
1054
+ import React13, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
1055
+ import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1056
+ import { log as log2 } from "@dxos/log";
1057
+ import { Button as Button5, Input as Input3, useTranslation as useTranslation12 } from "@dxos/react-ui";
1058
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
1059
+ var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
1060
+ var PopoverRenameObject = ({ object: obj }) => {
1061
+ var _effect = _useSignals13();
1062
+ try {
1063
+ const { t } = useTranslation12(SPACE_PLUGIN);
1064
+ const doneButton = useRef4(null);
1065
+ const object = obj;
1066
+ const [name, setName] = useState5(object.name || object.title || "");
1067
+ const { dispatchPromise: dispatch } = useIntentDispatcher6();
1068
+ const handleDone = useCallback7(() => {
1069
+ try {
1070
+ object.name = name;
1071
+ } catch {
1072
+ try {
1073
+ object.title = name;
1074
+ } catch (err) {
1075
+ log2.error("Failed to rename object", {
1076
+ err
1077
+ }, {
1078
+ F: __dxlog_file4,
1079
+ L: 32,
1080
+ S: void 0,
1081
+ C: (f, a) => f(...a)
1082
+ });
1083
+ }
1084
+ }
1085
+ void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
1086
+ part: "popover",
1087
+ options: {
1088
+ variant: "react",
1089
+ anchorId: "",
1090
+ state: false
1091
+ }
1092
+ }));
1093
+ }, [
1094
+ object,
1095
+ name
1096
+ ]);
1097
+ return /* @__PURE__ */ React13.createElement("div", {
1098
+ role: "none",
1099
+ className: "p-2 flex gap-2"
1100
+ }, /* @__PURE__ */ React13.createElement("div", {
1101
+ role: "none",
1102
+ className: "flex-1"
1103
+ }, /* @__PURE__ */ React13.createElement(Input3.Root, null, /* @__PURE__ */ React13.createElement(Input3.Label, {
1104
+ srOnly: true
1105
+ }, t("object name label")), /* @__PURE__ */ React13.createElement(Input3.TextInput, {
1106
+ placeholder: t("object placeholder"),
1107
+ value: name,
1108
+ "data-testid": "spacePlugin.renameObject.input",
1109
+ onChange: ({ target: { value } }) => setName(value),
1110
+ onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1111
+ }))), /* @__PURE__ */ React13.createElement(Button5, {
1112
+ ref: doneButton,
1113
+ classNames: "self-stretch",
1114
+ onClick: handleDone
1115
+ }, t("done label", {
1116
+ ns: "os"
1117
+ })));
1118
+ } finally {
1119
+ _effect.f();
1120
+ }
1121
+ };
1122
+
1123
+ // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
1124
+ import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
1125
+ import React14, { useCallback as useCallback8, useRef as useRef5, useState as useState6 } from "react";
1126
+ import { createIntent as createIntent7, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
1127
+ import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation13 } from "@dxos/react-ui";
1128
+ var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1129
+ var PopoverRenameSpace = ({ space }) => {
1130
+ var _effect = _useSignals14();
1131
+ try {
1132
+ const { t } = useTranslation13(SPACE_PLUGIN);
1133
+ const doneButton = useRef5(null);
1134
+ const [name, setName] = useState6(space.properties.name ?? "");
1135
+ const { dispatchPromise: dispatch } = useIntentDispatcher7();
1136
+ const handleDone = useCallback8(() => {
1137
+ space.properties.name = name;
1138
+ void dispatch(createIntent7(LayoutAction6.UpdatePopover, {
1139
+ part: "popover",
1140
+ options: {
1141
+ variant: "react",
1142
+ anchorId: "",
1143
+ state: false
1144
+ }
1145
+ }));
1146
+ }, [
1147
+ space,
1148
+ name
1149
+ ]);
1150
+ return /* @__PURE__ */ React14.createElement("div", {
1151
+ role: "none",
1152
+ className: "p-2 flex gap-2"
1153
+ }, /* @__PURE__ */ React14.createElement("div", {
1154
+ role: "none",
1155
+ className: "flex-1"
1156
+ }, /* @__PURE__ */ React14.createElement(Input4.Root, null, /* @__PURE__ */ React14.createElement(Input4.Label, {
1157
+ srOnly: true
1158
+ }, t("space name label")), /* @__PURE__ */ React14.createElement(Input4.TextInput, {
1159
+ defaultValue: space.properties.name ?? "",
1160
+ placeholder: t("unnamed space label"),
1161
+ onChange: ({ target: { value } }) => setName(value),
1162
+ // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
1163
+ // Currently this is not possible because Radix does not expose the popover context.
1164
+ onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1165
+ }))), /* @__PURE__ */ React14.createElement(Popover.Close, {
1166
+ asChild: true
1167
+ }, /* @__PURE__ */ React14.createElement(Button6, {
1168
+ ref: doneButton,
1169
+ classNames: "self-stretch",
1170
+ onClick: handleDone
1171
+ }, t("done label", {
1172
+ ns: "os"
1173
+ }))));
1174
+ } finally {
1175
+ _effect.f();
1176
+ }
1177
+ };
1178
+
1179
+ // packages/plugins/plugin-space/src/components/SchemaContainer.tsx
1180
+ import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
1181
+ import React15, { useState as useState7, useEffect as useEffect3 } from "react";
1182
+ import { useTranslation as useTranslation14 } from "@dxos/react-ui";
1183
+ import { controlItemClasses, ControlPage as ControlPage2, ControlSection as ControlSection2 } from "@dxos/react-ui-form";
1184
+ import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
1185
+ var useQuerySpaceSchemas = (space) => {
1186
+ const [schemas, setSchemas] = useState7([]);
1187
+ useEffect3(() => {
1188
+ const query = space.db.schemaRegistry.query();
1189
+ const initialResults = query.runSync();
1190
+ setSchemas(initialResults);
1191
+ const unsubscribe = query.subscribe(() => setSchemas(query.results));
1192
+ return () => unsubscribe();
1193
+ }, [
1194
+ space
1195
+ ]);
1196
+ return schemas;
1197
+ };
1198
+ var SchemaContainer = ({ space }) => {
1199
+ var _effect = _useSignals15();
1200
+ try {
1201
+ const { t } = useTranslation14(SPACE_PLUGIN);
1202
+ const schemas = useQuerySpaceSchemas(space);
1203
+ return /* @__PURE__ */ React15.createElement(StackItem3.Content, {
1204
+ classNames: "block overflow-y-auto"
1205
+ }, /* @__PURE__ */ React15.createElement(ControlPage2, null, /* @__PURE__ */ React15.createElement(ControlSection2, {
1206
+ title: t("schema verbose label"),
1207
+ description: t("schema description")
1208
+ }, /* @__PURE__ */ React15.createElement("div", {
1209
+ role: "none",
1210
+ className: controlItemClasses
1211
+ }, schemas.length === 0 && /* @__PURE__ */ React15.createElement("div", {
1212
+ className: "text-center plb-4"
1213
+ }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React15.createElement("div", {
1214
+ key: schema.id
1215
+ }, /* @__PURE__ */ React15.createElement("div", null, schema.typename)))))));
1216
+ } finally {
1217
+ _effect.f();
1218
+ }
1219
+ };
1220
+
1221
+ // packages/plugins/plugin-space/src/components/SpacePresence.tsx
1222
+ import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
1223
+ import { Option } from "effect";
1224
+ import React16, { forwardRef, useCallback as useCallback9, useEffect as useEffect4, useState as useState8 } from "react";
1225
+ import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
1226
+ import { generateName } from "@dxos/display-name";
1227
+ import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
1228
+ import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
1229
+ import { useIdentity } from "@dxos/react-client/halo";
1230
+ import { Avatar, Tooltip as Tooltip2, Popover as Popover2, useTranslation as useTranslation15, List, ListItem, useDefaultValue } from "@dxos/react-ui";
1231
+ import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
1232
+ import { ComplexMap, keyToFallback } from "@dxos/util";
1233
+ var REFRESH_INTERVAL = 5e3;
1234
+ var ACTIVITY_DURATION = 3e4;
1235
+ var noViewers = new ComplexMap(PublicKey.hash);
1236
+ var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
1237
+ var SpacePresence = ({ object, spaceKey }) => {
1238
+ var _effect = _useSignals16();
1239
+ try {
1240
+ const spaceState = useCapability(SpaceCapabilities.MutableState);
1241
+ const client = useClient5();
1242
+ const identity = useIdentity();
1243
+ const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
1244
+ const spaceMembers = useMembers(space?.key);
1245
+ const [_moment, setMoment] = useState8(Date.now());
1246
+ useEffect4(() => {
1247
+ const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
1248
+ return () => clearInterval(interval);
1249
+ }, []);
1250
+ const memberOnline = useCallback9((member) => member.presence === 1, []);
1251
+ const memberIsNotSelf = useCallback9((member) => !identity?.identityKey.equals(member.identity.identityKey), [
1252
+ identity?.identityKey
1253
+ ]);
1254
+ if (!identity || !spaceState || !space) {
1255
+ return null;
1256
+ }
1257
+ const currentObjectViewers = spaceState.viewersByObject[fullyQualifiedId3(object)] ?? noViewers;
1258
+ const membersForObject = spaceMembers.filter((member) => memberOnline(member) && memberIsNotSelf(member)).filter((member) => currentObjectViewers.has(member.identity.identityKey)).map((member) => {
1259
+ const objectView = currentObjectViewers.get(member.identity.identityKey);
1260
+ const lastSeen = objectView?.lastSeen ?? -Infinity;
1261
+ const currentlyAttended = objectView?.currentlyAttended ?? false;
1262
+ return {
1263
+ ...member,
1264
+ currentlyAttended,
1265
+ lastSeen
1266
+ };
1267
+ }).toSorted((a, b) => a.lastSeen - b.lastSeen);
1268
+ return /* @__PURE__ */ React16.createElement(FullPresence, {
1269
+ members: membersForObject
1270
+ });
1271
+ } finally {
1272
+ _effect.f();
1273
+ }
1274
+ };
1275
+ var FullPresence = (props) => {
1276
+ var _effect = _useSignals16();
1277
+ try {
1278
+ const { size = 9, onMemberClick } = props;
1279
+ const members = useDefaultValue(props.members, () => []);
1280
+ if (members.length === 0) {
1281
+ return null;
1282
+ }
1283
+ return /* @__PURE__ */ React16.createElement("div", {
1284
+ className: "dx-avatar-group",
1285
+ "data-testid": "spacePlugin.presence"
1286
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1287
+ key: member.identity.identityKey.toHex(),
1288
+ side: "bottom",
1289
+ content: getName(member.identity),
1290
+ className: "grid focus:outline-none"
1291
+ }, /* @__PURE__ */ React16.createElement(PresenceAvatar, {
1292
+ identity: member.identity,
1293
+ match: member.currentlyAttended,
1294
+ index: members.length - i,
1295
+ onClick: () => onMemberClick?.(member),
1296
+ size
1297
+ }))), members.length > 3 && /* @__PURE__ */ React16.createElement(Popover2.Root, null, /* @__PURE__ */ React16.createElement(Popover2.Trigger, {
1298
+ className: "grid focus:outline-none"
1299
+ }, /* @__PURE__ */ React16.createElement(Avatar.Root, null, /* @__PURE__ */ React16.createElement(Avatar.Content, {
1300
+ status: "inactive",
1301
+ style: {
1302
+ zIndex: members.length - 4
1303
+ },
1304
+ fallback: `+${members.length - 3}`,
1305
+ size
1306
+ }))), /* @__PURE__ */ React16.createElement(Popover2.Portal, null, /* @__PURE__ */ React16.createElement(Popover2.Content, {
1307
+ side: "bottom"
1308
+ }, /* @__PURE__ */ React16.createElement(Popover2.Arrow, null), /* @__PURE__ */ React16.createElement(List, {
1309
+ classNames: "max-h-56 overflow-y-auto"
1310
+ }, members.map((member) => /* @__PURE__ */ React16.createElement(ListItem.Root, {
1311
+ key: member.identity.identityKey.toHex(),
1312
+ classNames: "flex gap-2 items-center cursor-pointer mbe-2",
1313
+ onClick: () => onMemberClick?.(member),
1314
+ "data-testid": "identity-list-item"
1315
+ }, /* @__PURE__ */ React16.createElement(PresenceAvatar, {
1316
+ identity: member.identity,
1317
+ size,
1318
+ showName: true,
1319
+ match: member.currentlyAttended
1320
+ }))))))));
1321
+ } finally {
1322
+ _effect.f();
1323
+ }
1324
+ };
1325
+ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
1326
+ var _effect = _useSignals16();
1327
+ try {
1328
+ const status = match ? "current" : "active";
1329
+ const fallbackValue = keyToFallback(identity.identityKey);
1330
+ return /* @__PURE__ */ React16.createElement(Avatar.Root, null, /* @__PURE__ */ React16.createElement(Avatar.Content, {
1331
+ status,
1332
+ hue: identity.profile?.data?.hue || fallbackValue.hue,
1333
+ "data-testid": "spacePlugin.presence.member",
1334
+ "data-status": status,
1335
+ size,
1336
+ ...index ? {
1337
+ style: {
1338
+ zIndex: index
1339
+ }
1340
+ } : {},
1341
+ onClick,
1342
+ fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
1343
+ ref: forwardedRef
1344
+ }), /* @__PURE__ */ React16.createElement(Avatar.Label, {
1345
+ classNames: showName ? "text-sm truncate pli-2" : "sr-only"
1346
+ }, getName(identity)));
1347
+ } finally {
1348
+ _effect.f();
1349
+ }
1350
+ });
1351
+ var SmallPresenceLive = ({ id, open, viewers }) => {
1352
+ var _effect = _useSignals16();
1353
+ try {
1354
+ const { hasAttention, isAncestor, isRelated } = useAttention(id);
1355
+ const isAttended = hasAttention || isAncestor || isRelated;
1356
+ const { graph } = useAppGraph2();
1357
+ const attended = useAttended();
1358
+ const startOfAttention = attended.at(-1);
1359
+ const path = usePath(graph, startOfAttention);
1360
+ const containsAttended = !open && !isAttended && id && Option.isSome(path) ? path.value.includes(id) : false;
1361
+ const getActiveViewers = (viewers2) => {
1362
+ const moment = Date.now();
1363
+ return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
1364
+ };
1365
+ const [activeViewers, setActiveViewers] = useState8(viewers ? getActiveViewers(viewers) : []);
1366
+ useEffect4(() => {
1367
+ if (viewers) {
1368
+ setActiveViewers(getActiveViewers(viewers));
1369
+ const interval = setInterval(() => {
1370
+ setActiveViewers(getActiveViewers(viewers));
1371
+ }, REFRESH_INTERVAL);
1372
+ return () => clearInterval(interval);
1373
+ }
1374
+ }, [
1375
+ viewers
1376
+ ]);
1377
+ return /* @__PURE__ */ React16.createElement(SmallPresence, {
1378
+ count: activeViewers.length,
1379
+ attended: isAttended,
1380
+ containsAttended
1381
+ });
1382
+ } finally {
1383
+ _effect.f();
1384
+ }
1385
+ };
1386
+ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1387
+ var _effect = _useSignals16();
1388
+ try {
1389
+ const { t } = useTranslation15(SPACE_PLUGIN);
1390
+ return /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1391
+ asChild: true,
1392
+ content: t("presence label", {
1393
+ count
1394
+ }),
1395
+ side: "bottom"
1396
+ }, /* @__PURE__ */ React16.createElement(AttentionGlyph, {
1397
+ attended,
1398
+ containsAttended,
1399
+ presence: count > 1 ? "many" : count === 1 ? "one" : "none",
1400
+ classNames: "self-center mie-1"
1401
+ }));
1402
+ } finally {
1403
+ _effect.f();
1404
+ }
1405
+ };
1406
+
1407
+ // packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
1408
+ import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
1409
+ import React17 from "react";
1410
+ import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
1411
+ import { useClient as useClient6 } from "@dxos/react-client";
1412
+ import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
1413
+ import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as useTranslation16, List as List2, ListItem as ListItem2, Button as Button7 } from "@dxos/react-ui";
1414
+ import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
1415
+ var SpacePluginSettings = ({ settings }) => {
1416
+ var _effect = _useSignals17();
1417
+ try {
1418
+ const { t } = useTranslation16(SPACE_PLUGIN);
1419
+ const { dispatchPromise: dispatch } = useIntentDispatcher8();
1420
+ const client = useClient6();
1421
+ const spaces = useSpaces2({
1422
+ all: settings.showHidden
1423
+ });
1424
+ return /* @__PURE__ */ React17.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1425
+ label: t("show hidden spaces label")
1426
+ }, /* @__PURE__ */ React17.createElement(Input5.Switch, {
1427
+ checked: settings.showHidden,
1428
+ onCheckedChange: (checked) => settings.showHidden = !!checked
1429
+ })), /* @__PURE__ */ React17.createElement("div", {
1430
+ role: "none"
1431
+ }, /* @__PURE__ */ React17.createElement("h2", {
1432
+ className: "text-xl my-4"
1433
+ }, "Space Settings"), /* @__PURE__ */ React17.createElement(List2, {
1434
+ classNames: "max-w-md mx-auto"
1435
+ }, spaces.map((space) => /* @__PURE__ */ React17.createElement(ListItem2.Root, {
1436
+ key: space.id
1437
+ }, /* @__PURE__ */ React17.createElement(ListItem2.Heading, {
1438
+ classNames: "flex flex-col grow truncate mbe-2"
1439
+ }, toLocalizedString3(getSpaceDisplayName(space, {
1440
+ personal: space === client.spaces.default
1441
+ }), t)), /* @__PURE__ */ React17.createElement(ListItem2.Endcap, null, /* @__PURE__ */ React17.createElement(Button7, {
1442
+ onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
1443
+ space
1444
+ }))
1445
+ }, t("open space settings label"))))))));
1446
+ } finally {
1447
+ _effect.f();
1448
+ }
1449
+ };
1450
+
1451
+ // packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx
1452
+ import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
1453
+ import { pipe as pipe2, Schema } from "effect";
1454
+ import React18, { useCallback as useCallback10, useMemo as useMemo3, useState as useState9 } from "react";
1455
+ import { chain as chain2, createIntent as createIntent9, LayoutAction as LayoutAction7, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
1456
+ import { log as log3 } from "@dxos/log";
1457
+ import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1458
+ import { useClient as useClient7 } from "@dxos/react-client";
1459
+ import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
1460
+ import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as useTranslation17 } from "@dxos/react-ui";
1461
+ import { Form as Form3, ControlItem, ControlItemInput as ControlItemInput2, ControlSection as ControlSection3, ControlPage as ControlPage3 } from "@dxos/react-ui-form";
1462
+ import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
1463
+ import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
1464
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
1465
+ var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
1466
+ archived: Schema.Boolean.annotations({
1467
+ title: "Archive space"
1468
+ })
1469
+ })));
1470
+ var SpaceSettingsContainer = ({ space }) => {
1471
+ var _effect = _useSignals18();
1472
+ try {
1473
+ const { t } = useTranslation17(SPACE_PLUGIN);
1474
+ const { dispatchPromise: dispatch } = useIntentDispatcher9();
1475
+ const client = useClient7();
1476
+ const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
1477
+ const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1478
+ const toggleEdgeReplication = useCallback10(async (next) => {
1479
+ setEdgeReplication(next);
1480
+ await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
1481
+ log3.catch(err, void 0, {
1482
+ F: __dxlog_file5,
1483
+ L: 51,
1484
+ S: void 0,
1485
+ C: (f, a) => f(...a)
1486
+ });
1487
+ setEdgeReplication(!next);
1488
+ });
1489
+ }, [
1490
+ space
1491
+ ]);
1492
+ const handleSave = useCallback10((properties) => {
1493
+ void toggleEdgeReplication(properties.edgeReplication);
1494
+ if (properties.name !== space.properties.name) {
1495
+ space.properties.name = properties.name;
1496
+ }
1497
+ if (properties.icon !== space.properties.icon) {
1498
+ space.properties.icon = properties.icon;
1499
+ }
1500
+ if (properties.hue !== space.properties.hue) {
1501
+ space.properties.hue = properties.hue;
1502
+ }
1503
+ if (properties.archived && !archived) {
1504
+ void dispatch(pipe2(createIntent9(SpaceAction.Close, {
1505
+ space
1506
+ }), chain2(LayoutAction7.SwitchWorkspace, {
1507
+ part: "workspace",
1508
+ subject: client.spaces.default.id
1509
+ })));
1510
+ } else if (!properties.archived && archived) {
1511
+ void dispatch(createIntent9(SpaceAction.Open, {
1512
+ space
1513
+ }));
1514
+ }
1515
+ }, [
1516
+ space,
1517
+ toggleEdgeReplication,
1518
+ archived
1519
+ ]);
1520
+ const values = useMemo3(() => ({
1521
+ name: space.properties.name,
1522
+ icon: space.properties.icon,
1523
+ hue: space.properties.hue,
1524
+ edgeReplication,
1525
+ archived
1526
+ }), [
1527
+ space.properties.name,
1528
+ space.properties.icon,
1529
+ space.properties.hue,
1530
+ edgeReplication,
1531
+ archived
1532
+ ]);
1533
+ const customElements = useMemo3(() => ({
1534
+ name: ({ type, label, getValue, onValueChange }) => {
1535
+ const handleChange = useCallback10(({ target: { value } }) => onValueChange(type, value), [
1536
+ onValueChange,
1537
+ type
1538
+ ]);
1539
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1540
+ title: label,
1541
+ description: t("display name description")
1542
+ }, /* @__PURE__ */ React18.createElement(Input6.TextInput, {
1543
+ value: getValue(),
1544
+ onChange: handleChange,
1545
+ placeholder: t("display name input placeholder"),
1546
+ classNames: "min-is-64"
1547
+ }));
1548
+ },
1549
+ icon: ({ type, label, getValue, onValueChange }) => {
1550
+ const handleChange = useCallback10((nextEmoji) => onValueChange(type, nextEmoji), [
1551
+ onValueChange,
1552
+ type
1553
+ ]);
1554
+ const handleEmojiReset = useCallback10(() => onValueChange(type, void 0), [
1555
+ onValueChange,
1556
+ type
1557
+ ]);
1558
+ return /* @__PURE__ */ React18.createElement(ControlItem, {
1559
+ title: label,
1560
+ description: t("icon description")
1561
+ }, /* @__PURE__ */ React18.createElement(IconPicker, {
1562
+ value: getValue(),
1563
+ onChange: handleChange,
1564
+ onReset: handleEmojiReset,
1565
+ classNames: "justify-self-end",
1566
+ iconSize: 5
1567
+ }));
1568
+ },
1569
+ hue: ({ type, label, getValue, onValueChange }) => {
1570
+ const handleChange = useCallback10((nextHue) => onValueChange(type, nextHue), [
1571
+ onValueChange,
1572
+ type
1573
+ ]);
1574
+ const handleHueReset = useCallback10(() => onValueChange(type, void 0), [
1575
+ onValueChange,
1576
+ type
1577
+ ]);
1578
+ return /* @__PURE__ */ React18.createElement(ControlItem, {
1579
+ title: label,
1580
+ description: t("hue description")
1581
+ }, /* @__PURE__ */ React18.createElement(HuePicker, {
1582
+ value: getValue(),
1583
+ onChange: handleChange,
1584
+ onReset: handleHueReset,
1585
+ classNames: "[--hue-preview-size:1.25rem] justify-self-end"
1586
+ }));
1587
+ },
1588
+ edgeReplication: ({ type, label, getValue, onValueChange }) => {
1589
+ const handleChange = useCallback10((checked) => onValueChange(type, checked), [
1590
+ onValueChange,
1591
+ type
1592
+ ]);
1593
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1594
+ title: label,
1595
+ description: t("edge replication description")
1596
+ }, /* @__PURE__ */ React18.createElement(Input6.Switch, {
1597
+ checked: getValue(),
1598
+ onCheckedChange: handleChange,
1599
+ classNames: "justify-self-end"
1600
+ }));
1601
+ },
1602
+ archived: ({ type, label, getValue, onValueChange }) => {
1603
+ const handleChange = useCallback10(() => onValueChange(type, !getValue()), [
1604
+ onValueChange,
1605
+ type,
1606
+ getValue
1607
+ ]);
1608
+ return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1609
+ title: label,
1610
+ description: t("archive space description")
1611
+ }, /* @__PURE__ */ React18.createElement(Button8, {
1612
+ disabled: space === client.spaces.default,
1613
+ onClick: handleChange
1614
+ }, getValue() ? t("unarchive space label") : t("archive space label")));
1615
+ }
1616
+ }), [
1617
+ t,
1618
+ space
1619
+ ]);
1620
+ return /* @__PURE__ */ React18.createElement(StackItem4.Content, {
1621
+ classNames: "block overflow-y-auto pli-2"
1622
+ }, /* @__PURE__ */ React18.createElement(ControlPage3, null, /* @__PURE__ */ React18.createElement(ControlSection3, {
1623
+ title: t("space properties settings verbose label", {
1624
+ ns: SPACE_PLUGIN
1625
+ }),
1626
+ description: t("space properties settings description", {
1627
+ ns: SPACE_PLUGIN
1628
+ })
1629
+ }, /* @__PURE__ */ React18.createElement(Form3, {
1630
+ schema: FormSchema,
1631
+ values,
1632
+ autoSave: true,
1633
+ onSave: handleSave,
1634
+ Custom: customElements,
1635
+ classNames: 'p-0 container-max-width [&_[role="form"]]:grid [&_[role="form"]]:grid-cols-1 md:[&_[role="form"]]:grid-cols-[1fr_min-content] [&_[role="form"]]:gap-4'
1636
+ }))));
1637
+ } finally {
1638
+ _effect.f();
1639
+ }
1640
+ };
1641
+
1642
+ // packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
1643
+ import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
1644
+ import { Option as Option2 } from "effect";
1645
+ import React19, { useEffect as useEffect5, useState as useState10 } from "react";
1646
+ import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1647
+ import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
1648
+ import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1649
+ import { useClient as useClient8 } from "@dxos/react-client";
1650
+ import { useSpaceSyncState } from "@dxos/react-client/echo";
1651
+ import { Tooltip as Tooltip3, useTranslation as useTranslation18 } from "@dxos/react-ui";
1652
+ import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1653
+ var useEdgeStatus = () => {
1654
+ const [status, setStatus] = useState10(EdgeStatus.NOT_CONNECTED);
1655
+ const client = useClient8();
1656
+ useEffect5(() => {
1657
+ client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
1658
+ setStatus(status2);
1659
+ });
1660
+ }, [
1661
+ client
1662
+ ]);
1663
+ return status;
1664
+ };
1665
+ var InlineSyncStatus = ({ space, open }) => {
1666
+ var _effect = _useSignals19();
1667
+ try {
1668
+ const { t } = useTranslation18(SPACE_PLUGIN);
1669
+ const id = space.id;
1670
+ const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1671
+ const isAttended = hasAttention || isAncestor || isRelated;
1672
+ const { graph } = useAppGraph3();
1673
+ const attended = useAttended2();
1674
+ const startOfAttention = attended.at(-1);
1675
+ const path = usePath(graph, startOfAttention);
1676
+ const containsAttended = !open && !isAttended && id && Option2.isSome(path) ? path.value.includes(id) : false;
1677
+ const connectedToEdge = useEdgeStatus() === EdgeStatus.CONNECTED;
1678
+ const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
1679
+ const syncState = useSpaceSyncState(space);
1680
+ const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
1681
+ return /* @__PURE__ */ React19.createElement(Tooltip3.Trigger, {
1682
+ asChild: true,
1683
+ content: t("syncing label"),
1684
+ side: "bottom"
1685
+ }, /* @__PURE__ */ React19.createElement(AttentionGlyph2, {
1686
+ syncing,
1687
+ attended: isAttended,
1688
+ containsAttended,
1689
+ classNames: "self-center mie-1"
1690
+ }));
1691
+ } finally {
1692
+ _effect.f();
1693
+ }
1694
+ };
1695
+
1696
+ // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1697
+ import { useSignals as _useSignals20 } from "@preact-signals/safe-react/tracking";
1698
+ import React20, { useEffect as useEffect6, useState as useState11 } from "react";
1699
+ import { StatusBar } from "@dxos/plugin-status-bar";
1700
+ import { useClient as useClient9 } from "@dxos/react-client";
1701
+ import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
1702
+ import { Icon as Icon5, useTranslation as useTranslation19 } from "@dxos/react-ui";
1703
+
1704
+ // packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
1705
+ import { Context } from "@dxos/context";
1706
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
1707
+ var createClientSaveTracker = (client, cb) => {
1708
+ const CleanupFns = {};
1709
+ const state = {};
1710
+ const install = (spaces) => {
1711
+ for (const space of spaces) {
1712
+ if (state[space.id]) {
1713
+ continue;
1714
+ }
1715
+ state[space.id] = "saved";
1716
+ CleanupFns[space.id] = createSpaceSaveTracker(space, (s) => {
1717
+ state[space.id] = s;
1718
+ cb(Object.values(state).some((s2) => s2 === "saving") ? "saving" : "saved");
1719
+ });
1720
+ }
1721
+ };
1722
+ client.spaces.subscribe((spaces) => {
1723
+ install(spaces);
1724
+ });
1725
+ install(client.spaces.get());
1726
+ return () => {
1727
+ for (const unsubscribe of Object.values(CleanupFns)) {
1728
+ unsubscribe();
1729
+ }
1730
+ };
1731
+ };
1732
+ var createSpaceSaveTracker = (space, cb) => {
1733
+ const ctx = new Context(void 0, {
1734
+ F: __dxlog_file6,
1735
+ L: 40
1736
+ });
1737
+ void space.waitUntilReady().then(() => {
1738
+ if (ctx.disposed) {
1739
+ return;
1740
+ }
1741
+ let hasUnsavedChanges = false;
1742
+ let lastFlushPromise;
1743
+ space.crud.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
1744
+ hasUnsavedChanges = unsavedDocuments.length > 0;
1745
+ });
1746
+ space.crud.saveStateChanged.debounce(500).on(ctx, () => {
1747
+ if (hasUnsavedChanges) {
1748
+ lastFlushPromise = void 0;
1749
+ cb("saving");
1750
+ } else {
1751
+ const flushPromise = space.crud.flush();
1752
+ lastFlushPromise = flushPromise;
1753
+ void flushPromise.then(() => {
1754
+ if (lastFlushPromise === flushPromise) {
1755
+ cb("saved");
1756
+ }
1757
+ });
1758
+ }
1759
+ });
1760
+ });
1761
+ return () => {
1762
+ void ctx.dispose();
1763
+ };
1764
+ };
1765
+
1766
+ // packages/plugins/plugin-space/src/components/SyncStatus/status.ts
1767
+ var getStatus = ({ offline, saved, needsToUpload, needsToDownload }) => {
1768
+ if (!saved) {
1769
+ return "saving locally";
1770
+ } else if (!offline && needsToDownload) {
1771
+ return "downloading";
1772
+ } else if (!offline && needsToUpload) {
1773
+ return "uploading";
1774
+ } else if (offline && !needsToUpload && !needsToDownload) {
1775
+ return "offline persisted";
1776
+ } else {
1777
+ return "remote synced";
1778
+ }
1779
+ };
1780
+ var getIcon = (status) => {
1781
+ switch (status) {
1782
+ case "saving locally":
1783
+ return "ph--download--regular";
1784
+ case "downloading":
1785
+ return "ph--cloud-arrow-down--regular";
1786
+ case "uploading":
1787
+ return "ph--cloud-arrow-up--regular";
1788
+ case "offline persisted":
1789
+ return "ph--check-circle--regular";
1790
+ case "remote synced":
1791
+ return "ph--cloud-check--regular";
1792
+ }
1793
+ };
1794
+
1795
+ // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1796
+ var SYNC_STALLED_TIMEOUT = 5e3;
1797
+ var SyncStatus = () => {
1798
+ var _effect = _useSignals20();
1799
+ try {
1800
+ const client = useClient9();
1801
+ const state = useSyncState();
1802
+ const [saved, setSaved] = useState11(true);
1803
+ useEffect6(() => {
1804
+ return createClientSaveTracker(client, (state2) => {
1805
+ setSaved(state2 === "saved");
1806
+ });
1807
+ }, []);
1808
+ return /* @__PURE__ */ React20.createElement(SyncStatusIndicator, {
1809
+ state,
1810
+ saved
1811
+ });
1812
+ } finally {
1813
+ _effect.f();
1814
+ }
1815
+ };
1816
+ var SyncStatusIndicator = ({ state, saved }) => {
1817
+ var _effect = _useSignals20();
1818
+ try {
1819
+ const { t } = useTranslation19(SPACE_PLUGIN);
1820
+ const summary = getSyncSummary(state);
1821
+ const offline = Object.values(state).length === 0;
1822
+ const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
1823
+ const needsToDownload = summary.differentDocuments > 0 || summary.missingOnLocal > 0;
1824
+ const status = getStatus({
1825
+ offline,
1826
+ saved,
1827
+ needsToUpload,
1828
+ needsToDownload
1829
+ });
1830
+ const [classNames, setClassNames] = useState11();
1831
+ useEffect6(() => {
1832
+ setClassNames(void 0);
1833
+ if (offline || !needsToUpload && !needsToDownload) {
1834
+ return;
1835
+ }
1836
+ const t2 = setTimeout(() => {
1837
+ setClassNames("text-orange-500");
1838
+ }, SYNC_STALLED_TIMEOUT);
1839
+ return () => clearTimeout(t2);
1840
+ }, [
1841
+ offline,
1842
+ needsToUpload,
1843
+ needsToDownload
1844
+ ]);
1845
+ const title = t(`${status} label`);
1846
+ const icon = /* @__PURE__ */ React20.createElement(Icon5, {
1847
+ icon: getIcon(status),
1848
+ size: 4,
1849
+ classNames
1850
+ });
1851
+ return /* @__PURE__ */ React20.createElement(StatusBar.Item, {
1852
+ title
1853
+ }, icon);
1854
+ } finally {
1855
+ _effect.f();
1856
+ }
1857
+ };
1858
+
1859
+ export {
1860
+ AwaitingObject,
1861
+ CREATE_OBJECT_DIALOG,
1862
+ CreateObjectDialog,
1863
+ CREATE_SPACE_DIALOG,
1864
+ CreateSpaceDialog,
1865
+ CollectionMain,
1866
+ CollectionSection,
1867
+ JOIN_DIALOG,
1868
+ JoinDialog,
1869
+ MembersContainer,
1870
+ MenuFooter,
1871
+ ObjectSettingsContainer,
1872
+ PersistenceStatus,
1873
+ POPOVER_RENAME_OBJECT,
1874
+ PopoverRenameObject,
1875
+ POPOVER_RENAME_SPACE,
1876
+ PopoverRenameSpace,
1877
+ useQuerySpaceSchemas,
1878
+ SchemaContainer,
1879
+ SpacePresence,
1880
+ FullPresence,
1881
+ SmallPresenceLive,
1882
+ SmallPresence,
1883
+ SpacePluginSettings,
1884
+ SpaceSettingsContainer,
1885
+ InlineSyncStatus,
1886
+ SyncStatus,
1887
+ SyncStatusIndicator,
1888
+ AppGraphBuilder,
1889
+ AppGraphSerializer,
1890
+ IdentityCreated,
1891
+ IntentResolver,
1892
+ ReactRoot,
1893
+ ReactSurface,
1894
+ SchemaDefs,
1895
+ SchemaTools,
1896
+ SpaceSettings,
1897
+ SpaceState,
1898
+ SpacesReady
1899
+ };
1900
+ //# sourceMappingURL=chunk-Q4BTFH2P.mjs.map