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