@dxos/plugin-space 0.8.1 → 0.8.2-main.2f9c567

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 (279) hide show
  1. package/dist/lib/browser/{app-graph-builder-GMFCSOLG.mjs → app-graph-builder-I2BU35J5.mjs} +61 -7
  2. package/dist/lib/browser/app-graph-builder-I2BU35J5.mjs.map +7 -0
  3. package/dist/lib/browser/{app-graph-serializer-DSF2U3A5.mjs → app-graph-serializer-HPYDOKA5.mjs} +8 -8
  4. package/dist/lib/browser/app-graph-serializer-HPYDOKA5.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-5BDV575R.mjs → chunk-OS5QKO4Z.mjs} +20 -8
  6. package/dist/lib/browser/chunk-OS5QKO4Z.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-LO5UL6RU.mjs → chunk-RERTVPBV.mjs} +60 -141
  8. package/dist/lib/browser/chunk-RERTVPBV.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-JZXWPMLA.mjs → chunk-TSX67XGX.mjs} +526 -670
  10. package/dist/lib/browser/chunk-TSX67XGX.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-YQNBTJI4.mjs +308 -0
  12. package/dist/lib/browser/chunk-YQNBTJI4.mjs.map +7 -0
  13. package/dist/lib/browser/{identity-created-JR7BNXFH.mjs → identity-created-DWFKBGOA.mjs} +4 -4
  14. package/dist/lib/browser/identity-created-DWFKBGOA.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +19 -40
  16. package/dist/lib/browser/index.mjs.map +3 -3
  17. package/dist/lib/browser/{intent-resolver-RKYILWWQ.mjs → intent-resolver-GKDCJ4H2.mjs} +92 -82
  18. package/dist/lib/browser/intent-resolver-GKDCJ4H2.mjs.map +7 -0
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/{react-root-6H7NX2M2.mjs → react-root-667IZ2Q4.mjs} +4 -4
  21. package/dist/lib/browser/{react-surface-7AGLOVMK.mjs → react-surface-I4RNTGGN.mjs} +121 -47
  22. package/dist/lib/browser/react-surface-I4RNTGGN.mjs.map +7 -0
  23. package/dist/lib/browser/{schema-FHTA26SW.mjs → schema-defs-FLFEUSLB.mjs} +4 -4
  24. package/dist/lib/browser/{schema-FHTA26SW.mjs.map → schema-defs-FLFEUSLB.mjs.map} +2 -2
  25. package/dist/lib/browser/{schema-tools-YAXPRIXP.mjs → schema-tools-MYC4LTQD.mjs} +22 -22
  26. package/dist/lib/browser/schema-tools-MYC4LTQD.mjs.map +7 -0
  27. package/dist/lib/browser/{settings-PJPTJUPE.mjs → settings-ILGGNYJ7.mjs} +4 -4
  28. package/dist/lib/browser/settings-ILGGNYJ7.mjs.map +7 -0
  29. package/dist/lib/browser/{spaces-ready-BSSP7HHG.mjs → spaces-ready-IXZF3RWW.mjs} +5 -5
  30. package/dist/lib/browser/spaces-ready-IXZF3RWW.mjs.map +7 -0
  31. package/dist/lib/browser/{state-X7VLCC6E.mjs → state-CYV6QCTN.mjs} +1 -3
  32. package/dist/lib/browser/state-CYV6QCTN.mjs.map +7 -0
  33. package/dist/lib/browser/types/index.mjs +7 -1
  34. package/dist/lib/node/{app-graph-builder-DPY7AUZE.cjs → app-graph-builder-H7MDHM3X.cjs} +83 -30
  35. package/dist/lib/node/app-graph-builder-H7MDHM3X.cjs.map +7 -0
  36. package/dist/lib/node/{app-graph-serializer-JELGJUAY.cjs → app-graph-serializer-G7UYFWG6.cjs} +20 -20
  37. package/dist/lib/node/app-graph-serializer-G7UYFWG6.cjs.map +7 -0
  38. package/dist/lib/node/chunk-AR3JHVCY.cjs +336 -0
  39. package/dist/lib/node/chunk-AR3JHVCY.cjs.map +7 -0
  40. package/dist/lib/node/{chunk-TUZWEPGX.cjs → chunk-EG3WAZLA.cjs} +84 -167
  41. package/dist/lib/node/chunk-EG3WAZLA.cjs.map +7 -0
  42. package/dist/lib/node/{chunk-3GKCNADA.cjs → chunk-HD4C6KKO.cjs} +517 -659
  43. package/dist/lib/node/chunk-HD4C6KKO.cjs.map +7 -0
  44. package/dist/lib/node/{chunk-PU2EYH4E.cjs → chunk-NCSFM6RA.cjs} +24 -12
  45. package/dist/lib/node/chunk-NCSFM6RA.cjs.map +7 -0
  46. package/dist/lib/node/{identity-created-XU4HFV2T.cjs → identity-created-YLGVEWAJ.cjs} +6 -6
  47. package/dist/lib/node/identity-created-YLGVEWAJ.cjs.map +7 -0
  48. package/dist/lib/node/index.cjs +73 -94
  49. package/dist/lib/node/index.cjs.map +3 -3
  50. package/dist/lib/node/{intent-resolver-VJ7YV74L.cjs → intent-resolver-V7UJKLE7.cjs} +141 -131
  51. package/dist/lib/node/intent-resolver-V7UJKLE7.cjs.map +7 -0
  52. package/dist/lib/node/meta.json +1 -1
  53. package/dist/lib/node/{react-root-TEL5RW3N.cjs → react-root-I3SSFA5O.cjs} +8 -8
  54. package/dist/lib/node/{react-surface-2H3S5TY5.cjs → react-surface-OLMQCCYD.cjs} +146 -74
  55. package/dist/lib/node/react-surface-OLMQCCYD.cjs.map +7 -0
  56. package/dist/lib/node/{schema-PPJ5BZ3A.cjs → schema-defs-PKZVL52M.cjs} +6 -6
  57. package/dist/lib/node/{schema-PPJ5BZ3A.cjs.map → schema-defs-PKZVL52M.cjs.map} +2 -2
  58. package/dist/lib/node/{schema-tools-BLIMOZYY.cjs → schema-tools-OE3MFYYH.cjs} +24 -24
  59. package/dist/lib/node/schema-tools-OE3MFYYH.cjs.map +7 -0
  60. package/dist/lib/node/{settings-WVFP2UEP.cjs → settings-7TC55JP4.cjs} +7 -7
  61. package/dist/lib/node/settings-7TC55JP4.cjs.map +7 -0
  62. package/dist/lib/node/{spaces-ready-7DNZSUOG.cjs → spaces-ready-4H3Q46GV.cjs} +12 -12
  63. package/dist/lib/node/spaces-ready-4H3Q46GV.cjs.map +7 -0
  64. package/dist/lib/node/{state-5KX6WBJH.cjs → state-JLN7TGRR.cjs} +4 -6
  65. package/dist/lib/node/state-JLN7TGRR.cjs.map +7 -0
  66. package/dist/lib/node/types/index.cjs +18 -12
  67. package/dist/lib/node/types/index.cjs.map +2 -2
  68. package/dist/lib/node-esm/{app-graph-builder-42IGWRPL.mjs → app-graph-builder-NI7X6W3Q.mjs} +61 -7
  69. package/dist/lib/node-esm/app-graph-builder-NI7X6W3Q.mjs.map +7 -0
  70. package/dist/lib/node-esm/{app-graph-serializer-FXONFKOE.mjs → app-graph-serializer-CVPYWWW3.mjs} +8 -8
  71. package/dist/lib/node-esm/app-graph-serializer-CVPYWWW3.mjs.map +7 -0
  72. package/dist/lib/node-esm/{chunk-ZGLK25WQ.mjs → chunk-B2P24Q5R.mjs} +60 -141
  73. package/dist/lib/node-esm/chunk-B2P24Q5R.mjs.map +7 -0
  74. package/dist/lib/node-esm/{chunk-BEWBZ4Q4.mjs → chunk-BU6F7ZU4.mjs} +526 -670
  75. package/dist/lib/node-esm/chunk-BU6F7ZU4.mjs.map +7 -0
  76. package/dist/lib/node-esm/{chunk-3ZOUV4DF.mjs → chunk-FUH5OODY.mjs} +20 -8
  77. package/dist/lib/node-esm/chunk-FUH5OODY.mjs.map +7 -0
  78. package/dist/lib/node-esm/chunk-RUWTHAV7.mjs +309 -0
  79. package/dist/lib/node-esm/chunk-RUWTHAV7.mjs.map +7 -0
  80. package/dist/lib/node-esm/{identity-created-WJKAS2PV.mjs → identity-created-7NHGER3Q.mjs} +4 -4
  81. package/dist/lib/node-esm/identity-created-7NHGER3Q.mjs.map +7 -0
  82. package/dist/lib/node-esm/index.mjs +19 -40
  83. package/dist/lib/node-esm/index.mjs.map +3 -3
  84. package/dist/lib/node-esm/{intent-resolver-ZFNSA4CM.mjs → intent-resolver-IL63YTIT.mjs} +92 -82
  85. package/dist/lib/node-esm/intent-resolver-IL63YTIT.mjs.map +7 -0
  86. package/dist/lib/node-esm/meta.json +1 -1
  87. package/dist/lib/node-esm/{react-root-PRBJMWLQ.mjs → react-root-JEGVIVVK.mjs} +4 -4
  88. package/dist/lib/node-esm/{react-surface-RCZG2PNF.mjs → react-surface-DRRXIJBE.mjs} +121 -47
  89. package/dist/lib/node-esm/react-surface-DRRXIJBE.mjs.map +7 -0
  90. package/dist/lib/node-esm/{schema-OUZKVYM5.mjs → schema-defs-IIEQR7B3.mjs} +4 -4
  91. package/dist/lib/node-esm/{schema-OUZKVYM5.mjs.map → schema-defs-IIEQR7B3.mjs.map} +2 -2
  92. package/dist/lib/node-esm/{schema-tools-IU7EX5A5.mjs → schema-tools-YTJLA3NQ.mjs} +22 -22
  93. package/dist/lib/node-esm/schema-tools-YTJLA3NQ.mjs.map +7 -0
  94. package/dist/lib/node-esm/{settings-FJZPC2TV.mjs → settings-CXMV2AFR.mjs} +4 -4
  95. package/dist/lib/node-esm/settings-CXMV2AFR.mjs.map +7 -0
  96. package/dist/lib/node-esm/{spaces-ready-7X5PGB2V.mjs → spaces-ready-QMXLQ4QV.mjs} +5 -5
  97. package/dist/lib/node-esm/spaces-ready-QMXLQ4QV.mjs.map +7 -0
  98. package/dist/lib/node-esm/{state-Z6E2YTNC.mjs → state-YZPY5T5A.mjs} +1 -3
  99. package/dist/lib/node-esm/state-YZPY5T5A.mjs.map +7 -0
  100. package/dist/lib/node-esm/types/index.mjs +7 -1
  101. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  102. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/index.d.ts +3 -2
  104. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  105. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -1
  106. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  108. package/dist/types/src/capabilities/{schema.d.ts → schema-defs.d.ts} +1 -1
  109. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
  110. package/dist/types/src/capabilities/schema-tools.d.ts +2 -2
  111. package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
  112. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  113. package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
  114. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
  115. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  116. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  117. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  118. package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
  119. package/dist/types/src/components/MenuFooter.d.ts +2 -2
  120. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  121. package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.d.ts +2 -2
  122. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -0
  123. package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.d.ts +2 -2
  124. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -0
  125. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -0
  126. package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.d.ts +2 -2
  127. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -0
  128. package/dist/types/src/components/ObjectSettings/index.d.ts.map +1 -0
  129. package/dist/types/src/components/PopoverAddSpace.d.ts.map +1 -1
  130. package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
  131. package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
  132. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
  133. package/dist/types/src/components/SchemaContainer.d.ts +13 -0
  134. package/dist/types/src/components/SchemaContainer.d.ts.map +1 -0
  135. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  136. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  137. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +0 -2
  138. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  139. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +7 -0
  140. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -0
  141. package/dist/types/src/components/SpaceSettings/index.d.ts +0 -1
  142. package/dist/types/src/components/SpaceSettings/index.d.ts.map +1 -1
  143. package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
  144. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -8
  145. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  146. package/dist/types/src/components/index.d.ts +2 -2
  147. package/dist/types/src/components/index.d.ts.map +1 -1
  148. package/dist/types/src/hooks/index.d.ts +1 -0
  149. package/dist/types/src/hooks/index.d.ts.map +1 -1
  150. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +14 -0
  151. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -0
  152. package/dist/types/src/translations.d.ts +45 -9
  153. package/dist/types/src/translations.d.ts.map +1 -1
  154. package/dist/types/src/types/collection.d.ts +9 -8
  155. package/dist/types/src/types/collection.d.ts.map +1 -1
  156. package/dist/types/src/types/thread.d.ts +329 -110
  157. package/dist/types/src/types/thread.d.ts.map +1 -1
  158. package/dist/types/src/types/types.d.ts +167 -140
  159. package/dist/types/src/types/types.d.ts.map +1 -1
  160. package/dist/types/src/util.d.ts +31 -9
  161. package/dist/types/src/util.d.ts.map +1 -1
  162. package/package.json +46 -44
  163. package/src/SpacePlugin.tsx +11 -20
  164. package/src/capabilities/app-graph-builder.ts +47 -8
  165. package/src/capabilities/app-graph-serializer.ts +4 -4
  166. package/src/capabilities/identity-created.ts +2 -2
  167. package/src/capabilities/index.ts +2 -2
  168. package/src/capabilities/intent-resolver.ts +87 -84
  169. package/src/capabilities/react-surface.tsx +111 -42
  170. package/src/capabilities/schema-tool.test.ts +2 -3
  171. package/src/capabilities/schema-tools.ts +25 -25
  172. package/src/capabilities/settings.ts +2 -2
  173. package/src/capabilities/spaces-ready.ts +2 -2
  174. package/src/capabilities/state.ts +0 -2
  175. package/src/components/CollectionMain.tsx +2 -5
  176. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +2 -2
  177. package/src/components/CreateDialog/CreateObjectDialog.tsx +3 -3
  178. package/src/components/CreateDialog/CreateObjectPanel.tsx +3 -25
  179. package/src/components/CreateDialog/CreateSpaceDialog.tsx +6 -3
  180. package/src/components/MembersContainer.tsx +80 -54
  181. package/src/components/MenuFooter.tsx +2 -2
  182. package/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.tsx +2 -2
  183. package/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.tsx +2 -2
  184. package/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.tsx +2 -2
  185. package/src/components/PopoverAddSpace.tsx +9 -3
  186. package/src/components/PopoverRenameObject.tsx +14 -8
  187. package/src/components/PopoverRenameSpace.tsx +8 -0
  188. package/src/components/SchemaContainer.tsx +59 -0
  189. package/src/components/SpacePluginSettings.tsx +27 -2
  190. package/src/components/SpacePresence.tsx +29 -25
  191. package/src/components/SpaceSettings/{SpacePropertiesForm.stories.tsx → SpaceSettingsContainer.stories.tsx} +6 -6
  192. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +159 -39
  193. package/src/components/SpaceSettings/index.ts +0 -1
  194. package/src/components/SyncStatus/InlineSyncStatus.tsx +5 -7
  195. package/src/components/SyncStatus/SyncStatus.tsx +6 -69
  196. package/src/components/index.ts +2 -2
  197. package/src/hooks/index.ts +1 -0
  198. package/src/hooks/useInputSurfaceLookup.tsx +31 -0
  199. package/src/translations.ts +18 -5
  200. package/src/types/collection.ts +6 -4
  201. package/src/types/thread.ts +14 -8
  202. package/src/types/types.ts +128 -101
  203. package/src/util.tsx +52 -112
  204. package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +0 -7
  205. package/dist/lib/browser/app-graph-serializer-DSF2U3A5.mjs.map +0 -7
  206. package/dist/lib/browser/chunk-5BDV575R.mjs.map +0 -7
  207. package/dist/lib/browser/chunk-AYW4IDRT.mjs +0 -275
  208. package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +0 -7
  209. package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +0 -7
  210. package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +0 -7
  211. package/dist/lib/browser/identity-created-JR7BNXFH.mjs.map +0 -7
  212. package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +0 -7
  213. package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +0 -7
  214. package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
  215. package/dist/lib/browser/settings-PJPTJUPE.mjs.map +0 -7
  216. package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +0 -7
  217. package/dist/lib/browser/state-X7VLCC6E.mjs.map +0 -7
  218. package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +0 -7
  219. package/dist/lib/node/app-graph-serializer-JELGJUAY.cjs.map +0 -7
  220. package/dist/lib/node/chunk-3GKCNADA.cjs.map +0 -7
  221. package/dist/lib/node/chunk-PU2EYH4E.cjs.map +0 -7
  222. package/dist/lib/node/chunk-TUZWEPGX.cjs.map +0 -7
  223. package/dist/lib/node/chunk-WDEIFDTX.cjs +0 -300
  224. package/dist/lib/node/chunk-WDEIFDTX.cjs.map +0 -7
  225. package/dist/lib/node/identity-created-XU4HFV2T.cjs.map +0 -7
  226. package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +0 -7
  227. package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +0 -7
  228. package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
  229. package/dist/lib/node/settings-WVFP2UEP.cjs.map +0 -7
  230. package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +0 -7
  231. package/dist/lib/node/state-5KX6WBJH.cjs.map +0 -7
  232. package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +0 -7
  233. package/dist/lib/node-esm/app-graph-serializer-FXONFKOE.mjs.map +0 -7
  234. package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +0 -7
  235. package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +0 -7
  236. package/dist/lib/node-esm/chunk-FC4UHDPL.mjs +0 -276
  237. package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +0 -7
  238. package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +0 -7
  239. package/dist/lib/node-esm/identity-created-WJKAS2PV.mjs.map +0 -7
  240. package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +0 -7
  241. package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +0 -7
  242. package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
  243. package/dist/lib/node-esm/settings-FJZPC2TV.mjs.map +0 -7
  244. package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +0 -7
  245. package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +0 -7
  246. package/dist/types/src/capabilities/schema.d.ts.map +0 -1
  247. package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +0 -1
  248. package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts.map +0 -1
  249. package/dist/types/src/components/ObjectSettingsContainer/ForeignKeys.d.ts.map +0 -1
  250. package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +0 -1
  251. package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +0 -1
  252. package/dist/types/src/components/ShareSpaceButton.d.ts +0 -9
  253. package/dist/types/src/components/ShareSpaceButton.d.ts.map +0 -1
  254. package/dist/types/src/components/ShareSpaceButton.stories.d.ts +0 -10
  255. package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +0 -1
  256. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts +0 -7
  257. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts.map +0 -1
  258. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts +0 -7
  259. package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts.map +0 -1
  260. package/dist/types/src/components/SyncStatus/Space.d.ts +0 -13
  261. package/dist/types/src/components/SyncStatus/Space.d.ts.map +0 -1
  262. package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts +0 -9
  263. package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts.map +0 -1
  264. package/dist/types/src/components/SyncStatus/sync-state.d.ts +0 -18
  265. package/dist/types/src/components/SyncStatus/sync-state.d.ts.map +0 -1
  266. package/src/components/ShareSpaceButton.stories.tsx +0 -27
  267. package/src/components/ShareSpaceButton.tsx +0 -32
  268. package/src/components/SpaceSettings/SpacePropertiesForm.tsx +0 -136
  269. package/src/components/SyncStatus/Space.tsx +0 -133
  270. package/src/components/SyncStatus/SyncStatusDetail.stories.tsx +0 -89
  271. package/src/components/SyncStatus/sync-state.ts +0 -101
  272. /package/dist/lib/browser/{react-root-6H7NX2M2.mjs.map → react-root-667IZ2Q4.mjs.map} +0 -0
  273. /package/dist/lib/node/{react-root-TEL5RW3N.cjs.map → react-root-I3SSFA5O.cjs.map} +0 -0
  274. /package/dist/lib/node-esm/{react-root-PRBJMWLQ.mjs.map → react-root-JEGVIVVK.mjs.map} +0 -0
  275. /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.d.ts +0 -0
  276. /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/index.d.ts +0 -0
  277. /package/src/capabilities/{schema.ts → schema-defs.ts} +0 -0
  278. /package/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.tsx +0 -0
  279. /package/src/components/{ObjectSettingsContainer → ObjectSettings}/index.ts +0 -0
@@ -2,62 +2,182 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import React, { useCallback, useMemo } from 'react';
5
+ import { pipe, Schema } from 'effect';
6
+ import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
6
7
 
7
- import { Surface, useCapabilities, useCapability } from '@dxos/app-framework';
8
- import { type Space } from '@dxos/react-client/echo';
9
- import { toLocalizedString, useTranslation } from '@dxos/react-ui';
10
- import { ControlSectionHeading } from '@dxos/react-ui-form';
11
- import { Accordion } from '@dxos/react-ui-list';
8
+ import { chain, createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
9
+ import { log } from '@dxos/log';
10
+ import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
11
+ import { useClient } from '@dxos/react-client';
12
+ import { SpaceState, type Space } from '@dxos/react-client/echo';
13
+ import { Button, Input, useMulticastObservable, useTranslation } from '@dxos/react-ui';
14
+ import {
15
+ Form,
16
+ type InputComponent,
17
+ ControlItem,
18
+ ControlItemInput,
19
+ ControlSection,
20
+ ControlPage,
21
+ } from '@dxos/react-ui-form';
22
+ import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
12
23
  import { StackItem } from '@dxos/react-ui-stack';
13
- import { byPosition } from '@dxos/util';
14
24
 
15
- import { SpaceCapabilities } from '../../capabilities';
16
25
  import { SPACE_PLUGIN } from '../../meta';
26
+ import { SpaceAction, SpaceForm } from '../../types';
17
27
 
18
- export const SPACE_SETTINGS_DIALOG = `${SPACE_PLUGIN}/SpaceSettingsDialog`;
19
-
20
- export type SpaceSettingsTab = 'members' | 'settings';
28
+ const FormSchema = SpaceForm.pipe(
29
+ Schema.extend(Schema.Struct({ archived: Schema.Boolean.annotations({ title: 'Archive space' }) })),
30
+ );
21
31
 
22
32
  export type SpaceSettingsContainerProps = {
23
33
  space: Space;
24
34
  };
25
35
 
36
+ // TODO(wittjosiah): Handle space migrations here?
26
37
  export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) => {
27
38
  const { t } = useTranslation(SPACE_PLUGIN);
28
- const state = useCapability(SpaceCapabilities.MutableState);
29
- const items = useCapabilities(SpaceCapabilities.SettingsSection).toSorted(byPosition);
30
- const data = useMemo(() => ({ subject: space }), [space]);
39
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
40
+ const client = useClient();
41
+ const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
42
+ const [edgeReplication, setEdgeReplication] = useState(
43
+ space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED,
44
+ );
45
+ const toggleEdgeReplication = useCallback(
46
+ async (next: boolean) => {
47
+ setEdgeReplication(next);
48
+ await space?.internal
49
+ .setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED)
50
+ .catch((err: unknown) => {
51
+ log.catch(err);
52
+ setEdgeReplication(!next);
53
+ });
54
+ },
55
+ [space],
56
+ );
31
57
 
32
- const handleOpenSectionChange = useCallback(
33
- (sections: string[]) => {
34
- state.spaceSettingsOpenSections.splice(0, state.spaceSettingsOpenSections.length, ...sections);
58
+ const handleSave = useCallback(
59
+ (properties: Schema.Schema.Type<typeof FormSchema>) => {
60
+ void toggleEdgeReplication(properties.edgeReplication);
61
+ if (properties.name !== space.properties.name) {
62
+ space.properties.name = properties.name;
63
+ }
64
+ if (properties.icon !== space.properties.icon) {
65
+ space.properties.icon = properties.icon;
66
+ }
67
+ if (properties.hue !== space.properties.hue) {
68
+ space.properties.hue = properties.hue;
69
+ }
70
+ if (properties.archived && !archived) {
71
+ void dispatch(
72
+ pipe(
73
+ createIntent(SpaceAction.Close, { space }),
74
+ chain(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: client.spaces.default.id }),
75
+ ),
76
+ );
77
+ } else if (!properties.archived && archived) {
78
+ void dispatch(createIntent(SpaceAction.Open, { space }));
79
+ }
35
80
  },
36
- [state],
81
+ [space, toggleEdgeReplication, archived],
82
+ );
83
+
84
+ const values = useMemo(
85
+ () => ({
86
+ name: space.properties.name,
87
+ icon: space.properties.icon,
88
+ hue: space.properties.hue,
89
+ edgeReplication,
90
+ archived,
91
+ }),
92
+ [space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
93
+ );
94
+
95
+ const customElements: Partial<Record<string, InputComponent>> = useMemo(
96
+ () => ({
97
+ name: ({ type, label, getValue, onValueChange }) => {
98
+ const handleChange = useCallback(
99
+ ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
100
+ [onValueChange, type],
101
+ );
102
+ return (
103
+ <ControlItemInput title={label} description={t('display name description')}>
104
+ <Input.TextInput
105
+ value={getValue()}
106
+ onChange={handleChange}
107
+ placeholder={t('display name input placeholder')}
108
+ classNames='min-is-64'
109
+ />
110
+ </ControlItemInput>
111
+ );
112
+ },
113
+ icon: ({ type, label, getValue, onValueChange }) => {
114
+ const handleChange = useCallback((nextEmoji: string) => onValueChange(type, nextEmoji), [onValueChange, type]);
115
+ const handleEmojiReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
116
+ return (
117
+ <ControlItem title={label} description={t('icon description')}>
118
+ <IconPicker
119
+ value={getValue()}
120
+ onChange={handleChange}
121
+ onReset={handleEmojiReset}
122
+ classNames='justify-self-end'
123
+ iconSize={5}
124
+ />
125
+ </ControlItem>
126
+ );
127
+ },
128
+ hue: ({ type, label, getValue, onValueChange }) => {
129
+ const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
130
+ const handleHueReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
131
+ return (
132
+ <ControlItem title={label} description={t('hue description')}>
133
+ <HuePicker
134
+ value={getValue()}
135
+ onChange={handleChange}
136
+ onReset={handleHueReset}
137
+ classNames='[--hue-preview-size:1.25rem] justify-self-end'
138
+ />
139
+ </ControlItem>
140
+ );
141
+ },
142
+ edgeReplication: ({ type, label, getValue, onValueChange }) => {
143
+ const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
144
+ return (
145
+ <ControlItemInput title={label} description={t('edge replication description')}>
146
+ <Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
147
+ </ControlItemInput>
148
+ );
149
+ },
150
+ archived: ({ type, label, getValue, onValueChange }) => {
151
+ const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
152
+ return (
153
+ <ControlItemInput title={label} description={t('archive space description')}>
154
+ <Button disabled={space === client.spaces.default} onClick={handleChange}>
155
+ {getValue() ? t('unarchive space label') : t('archive space label')}
156
+ </Button>
157
+ </ControlItemInput>
158
+ );
159
+ },
160
+ }),
161
+ [t, space],
37
162
  );
38
163
 
39
164
  return (
40
- <StackItem.Content classNames='p-2 block overflow-y-auto'>
41
- <Accordion.Root<SpaceCapabilities.SettingsSection>
42
- items={items}
43
- value={state.spaceSettingsOpenSections}
44
- onValueChange={handleOpenSectionChange}
45
- >
46
- {({ items }) => (
47
- <>
48
- {items.map((item) => (
49
- <Accordion.Item key={item.id} item={item} classNames='container-max-width'>
50
- <Accordion.ItemHeader classNames='pie-6' asChild>
51
- <ControlSectionHeading title={toLocalizedString(item.label, t)} />
52
- </Accordion.ItemHeader>
53
- <Accordion.ItemBody>
54
- <Surface role={`space-settings--${item.id}`} data={data} />
55
- </Accordion.ItemBody>
56
- </Accordion.Item>
57
- ))}
58
- </>
59
- )}
60
- </Accordion.Root>
165
+ <StackItem.Content classNames='block overflow-y-auto pli-2'>
166
+ <ControlPage>
167
+ <ControlSection
168
+ title={t('space properties settings verbose label', { ns: SPACE_PLUGIN })}
169
+ description={t('space properties settings description', { ns: SPACE_PLUGIN })}
170
+ >
171
+ <Form
172
+ schema={FormSchema}
173
+ values={values}
174
+ autoSave
175
+ onSave={handleSave}
176
+ Custom={customElements}
177
+ 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'
178
+ />
179
+ </ControlSection>
180
+ </ControlPage>
61
181
  </StackItem.Content>
62
182
  );
63
183
  };
@@ -2,5 +2,4 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- export * from './SpacePropertiesForm';
6
5
  export * from './SpaceSettingsContainer';
@@ -5,21 +5,19 @@
5
5
  import React, { useEffect, useState } from 'react';
6
6
 
7
7
  import { useAppGraph } from '@dxos/app-framework';
8
- import { QueryEdgeStatusResponse } from '@dxos/protocols/proto/dxos/client/services';
8
+ import { EdgeStatus } from '@dxos/protocols/proto/dxos/client/services';
9
9
  import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
10
10
  import { useClient } from '@dxos/react-client';
11
- import { type Space } from '@dxos/react-client/echo';
11
+ import { type Space, useSpaceSyncState } from '@dxos/react-client/echo';
12
12
  import { Tooltip, useTranslation } from '@dxos/react-ui';
13
13
  import { AttentionGlyph, useAttended, useAttention } from '@dxos/react-ui-attention';
14
14
 
15
- import { useSpaceSyncState } from './sync-state';
16
15
  import { usePath } from '../../hooks';
17
16
  import { SPACE_PLUGIN } from '../../meta';
18
17
 
19
- const useEdgeStatus = (): QueryEdgeStatusResponse.EdgeStatus => {
20
- const [status, setStatus] = useState(QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED);
18
+ const useEdgeStatus = (): EdgeStatus => {
19
+ const [status, setStatus] = useState(EdgeStatus.NOT_CONNECTED);
21
20
  const client = useClient();
22
-
23
21
  useEffect(() => {
24
22
  client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status }) => {
25
23
  setStatus(status);
@@ -44,7 +42,7 @@ export const InlineSyncStatus = ({ space, open }: { space: Space; open?: boolean
44
42
  const path = usePath(graph, startOfAttention);
45
43
  const containsAttended = !open && !isAttended && id && path ? path.includes(id) : false;
46
44
 
47
- const connectedToEdge = useEdgeStatus() === QueryEdgeStatusResponse.EdgeStatus.CONNECTED;
45
+ const connectedToEdge = useEdgeStatus() === EdgeStatus.CONNECTED;
48
46
  // TODO(wittjosiah): This is not reactive.
49
47
  const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED;
50
48
  const syncState = useSpaceSyncState(space);
@@ -2,22 +2,19 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import React, { useCallback, useEffect, useState } from 'react';
5
+ import React, { useEffect, useState } from 'react';
6
6
 
7
7
  import { StatusBar } from '@dxos/plugin-status-bar';
8
8
  import { useClient } from '@dxos/react-client';
9
- import { type SpaceId } from '@dxos/react-client/echo';
10
- import { Icon, Input, Popover, useTranslation } from '@dxos/react-ui';
11
- import { type ThemedClassName } from '@dxos/react-ui';
12
- import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
13
- import { mx } from '@dxos/react-ui-theme';
9
+ import { getSyncSummary, type SpaceSyncStateMap, useSyncState } from '@dxos/react-client/echo';
10
+ import { Icon, useTranslation } from '@dxos/react-ui';
14
11
 
15
- import { SpaceRowContainer, SYNC_STALLED_TIMEOUT } from './Space';
16
12
  import { createClientSaveTracker } from './save-tracker';
17
13
  import { getIcon, getStatus } from './status';
18
- import { type PeerSyncState, type SpaceSyncStateMap, getSyncSummary, useSyncState } from './sync-state';
19
14
  import { SPACE_PLUGIN } from '../../meta';
20
15
 
16
+ const SYNC_STALLED_TIMEOUT = 5_000;
17
+
21
18
  export const SyncStatus = () => {
22
19
  const client = useClient();
23
20
  const state = useSyncState();
@@ -57,65 +54,5 @@ export const SyncStatusIndicator = ({ state, saved }: { state: SpaceSyncStateMap
57
54
  const title = t(`${status} label`);
58
55
  const icon = <Icon icon={getIcon(status)} size={4} classNames={classNames} />;
59
56
 
60
- if (offline) {
61
- return <StatusBar.Item title={title}>{icon}</StatusBar.Item>;
62
- } else {
63
- return (
64
- <Popover.Root>
65
- <Popover.Trigger asChild>
66
- <StatusBar.Button title={title}>{icon}</StatusBar.Button>
67
- </Popover.Trigger>
68
- <Popover.Portal>
69
- <Popover.Content>
70
- <SyncStatusDetail state={state} summary={summary} debug={false} />
71
- <Popover.Arrow />
72
- </Popover.Content>
73
- </Popover.Portal>
74
- </Popover.Root>
75
- );
76
- }
77
- };
78
-
79
- export type SyncStatusDetailProps = ThemedClassName<{
80
- state: SpaceSyncStateMap;
81
- summary: PeerSyncState;
82
- debug?: boolean;
83
- }>;
84
-
85
- // TODO(wittjosiah): This currently does not show `differentDocuments` at all.
86
- export const SyncStatusDetail = ({ classNames, state, summary, debug }: SyncStatusDetailProps) => {
87
- const [showAll, setShowAll] = useState(false);
88
- const { t } = useTranslation(SPACE_PLUGIN);
89
- const entries = Object.entries(state)
90
- .filter(([_, value]) => showAll || value.missingOnLocal + value.missingOnRemote > 0)
91
- .toSorted(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0));
92
-
93
- const handleCheckedChange = useCallback((state: boolean) => setShowAll(state), [setShowAll]);
94
-
95
- // TODO(burdon): Normalize to max document count?
96
- return (
97
- <div className={mx('flex flex-col gap-3 p-2 text-xs min-w-[400px]', classNames)}>
98
- <div role='none' className='flex items-center'>
99
- <h1 className='flex-1'>{t('sync status title')}</h1>
100
- <div className='flex items-center gap-2'>
101
- <Input.Root>
102
- <Input.Label classNames='text-xs'>{t('show all label')}</Input.Label>
103
- <Input.Checkbox checked={showAll} onCheckedChange={handleCheckedChange} />
104
- </Input.Root>
105
- </div>
106
- </div>
107
- <div className='flex flex-col gap-2'>
108
- {entries.length === 0 && (
109
- <div role='none' className='flex justify-center'>
110
- {/* TODO(wittjosiah): This text should be updated once status includes different documents. */}
111
- {t('no sync status label')}
112
- </div>
113
- )}
114
- {entries.map(([spaceId, state]) => (
115
- <SpaceRowContainer key={spaceId} spaceId={spaceId as SpaceId} state={state} />
116
- ))}
117
- </div>
118
- {debug && <SyntaxHighlighter language='json'>{JSON.stringify(summary, null, 2)}</SyntaxHighlighter>}
119
- </div>
120
- );
57
+ return <StatusBar.Item title={title}>{icon}</StatusBar.Item>;
121
58
  };
@@ -9,12 +9,12 @@ export * from './CollectionSection';
9
9
  export * from './JoinDialog';
10
10
  export * from './MembersContainer';
11
11
  export * from './MenuFooter';
12
- export * from './ObjectSettingsContainer';
12
+ export * from './ObjectSettings';
13
13
  export * from './PersistenceStatus';
14
14
  export * from './PopoverAddSpace';
15
15
  export * from './PopoverRenameObject';
16
16
  export * from './PopoverRenameSpace';
17
- export * from './ShareSpaceButton';
17
+ export * from './SchemaContainer';
18
18
  export * from './SpacePresence';
19
19
  export * from './SpacePluginSettings';
20
20
  export * from './SpaceSettings';
@@ -2,4 +2,5 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ export * from './useInputSurfaceLookup';
5
6
  export * from './usePath';
@@ -0,0 +1,31 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Schema } from 'effect';
6
+ import React, { useCallback } from 'react';
7
+
8
+ import { usePluginManager, isSurfaceAvailable, Surface } from '@dxos/app-framework';
9
+ import { type InputProps } from '@dxos/react-ui-form';
10
+
11
+ // TODO(ZaymonFC): Move this if you find yourself needing it elsewhere.
12
+ /**
13
+ * Creates a surface input component based on plugin context.
14
+ * @param baseData Additional data that will be merged with form data and passed to the surface.
15
+ * This allows providing more context to the surface than what's available from the form itself.
16
+ */
17
+ export const useInputSurfaceLookup = (baseData?: Record<string, any>) => {
18
+ const pluginManager = usePluginManager();
19
+
20
+ return useCallback(
21
+ ({ prop, schema, inputProps }: { prop: string; schema: Schema.Schema<any>; inputProps: InputProps }) => {
22
+ const composedData = { prop, schema, ...baseData };
23
+ if (!isSurfaceAvailable(pluginManager.context, { role: 'form-input', data: composedData })) {
24
+ return undefined;
25
+ }
26
+
27
+ return <Surface role='form-input' data={composedData} {...inputProps} />;
28
+ },
29
+ [pluginManager, baseData],
30
+ );
31
+ };
@@ -34,7 +34,7 @@ export default [
34
34
  'export data label': 'Export data',
35
35
  'import data label': 'Import data',
36
36
  'migrate space label': 'Migrate space',
37
- 'share space': 'Share space',
37
+ 'share space label': 'Share current space',
38
38
  'save space to disk label': 'Save to disk',
39
39
  'load space from disk label': 'Load from disk',
40
40
  'confirm restore title': 'Overwrite files in this space?',
@@ -43,7 +43,7 @@ export default [
43
43
  'object placeholder': 'Type a title here…',
44
44
  'personal space label': 'Personal Space',
45
45
  'spaces label': 'Spaces',
46
- 'show hidden spaces label': 'Show closed spaces',
46
+ 'show hidden spaces label': 'Show archived spaces',
47
47
  'save files to directory label': 'Save files to disk',
48
48
  'select path label': 'Select path',
49
49
  'rename collection label': 'Rename collection',
@@ -67,7 +67,6 @@ export default [
67
67
  'The requested object has not been found yet. Ensure there are enough peers online in the space with an updated copy.',
68
68
  'create object in space label': 'Add to space',
69
69
  'create object in collection label': 'Add to collection',
70
- 'share space label': 'Share',
71
70
  'space members label': 'Space members',
72
71
  'active space members heading': 'Online ({{count}})',
73
72
  'inactive space members heading': 'Offline ({{count}})',
@@ -118,6 +117,7 @@ export default [
118
117
  'advanced settings label': 'Advanced',
119
118
  'foreign keys': 'Foreign Keys',
120
119
  'add key': 'Add Key',
120
+ 'open space settings label': 'Open',
121
121
 
122
122
  'members panel label': 'Members',
123
123
  'members verbose label': 'Manage space members',
@@ -126,16 +126,29 @@ export default [
126
126
  'invitations label': 'Invitations',
127
127
  'space invitation description': 'Manage invitations to the space.',
128
128
  'qr code description': 'Share this QR code, or copy the URL and share it with the person you want to invite.',
129
+ 'locked space description': 'This space is locked, unlock it to invite new members.',
130
+ 'space locked label': 'Lock space',
131
+ 'space locked description': 'Locking a space prevents new members from being invited to the space.',
129
132
 
130
133
  'settings panel label': 'Space Settings',
131
- 'open space settings label': 'Space Settings',
132
- 'space settings properties label': 'General',
134
+ 'open current space settings label': 'Open current space settings',
135
+ 'space settings properties label': 'General settings',
136
+ 'space properties settings verbose label': 'Manage space properties',
137
+ 'space properties settings description': 'You can configure how this space is displayed in the app here.',
138
+ 'space settings schema label': 'Schema',
139
+ 'schema verbose label': 'Manage schema',
140
+ 'schema description': 'You can manage all of the schema stored within this space here.',
141
+ 'no schemas found message': 'No schemas found',
133
142
  'display name input placeholder': 'Space name',
134
143
  'display name description': 'Name of the space as it appears in the app.',
135
144
  'icon description': 'Icon used to represent the space in the app.',
136
145
  'hue description': 'Color used to represent the space in the app.',
137
146
  'edge replication description':
138
147
  "Only change this if you know what you're doing. Disabling this will prevent the space from replicating through Composer's EDGE services, and relies solely on peer-to-peer sync.",
148
+ 'archive space description':
149
+ 'Archiving a space will remove it from the sidebar and stop replicating updates, but will not delete the data. You can unarchive it by enabling archived spaces in the app settings.',
150
+ 'archive space label': 'Archive',
151
+ 'unarchive space label': 'Unarchive',
139
152
  },
140
153
  },
141
154
  },
@@ -2,15 +2,17 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Expando, Ref, S, TypedObject } from '@dxos/echo-schema';
5
+ import { Schema } from 'effect';
6
+
7
+ import { Expando, Ref, TypedObject } from '@dxos/echo-schema';
6
8
 
7
9
  export class CollectionType extends TypedObject({ typename: 'dxos.org/type/Collection', version: '0.1.0' })({
8
- name: S.optional(S.String),
9
- objects: S.mutable(S.Array(Ref(Expando))),
10
+ name: Schema.optional(Schema.String),
11
+ objects: Schema.mutable(Schema.Array(Ref(Expando))),
10
12
  // Key is schema typename and value is reference to a view object of the associated schema.
11
13
  // Having collection reference the views rather than vice versa ensures that the state converges to a single view per key (i.e. type).
12
14
  // This also leaves open a future where this key could be changed to allow for multiple stack views per section.
13
15
  // TODO(wittjosiah): Any way to make this more type safe?
14
16
  // TODO(wittjosiah): Should the views be separate objects or just be schemas for view data in this record?
15
- views: S.mutable(S.Record({ key: S.String, value: Ref(Expando) })),
17
+ views: Schema.mutable(Schema.Record({ key: Schema.String, value: Ref(Expando) })),
16
18
  }) {}
@@ -2,23 +2,29 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Expando, Ref, S, TypedObject } from '@dxos/echo-schema';
6
- import { MessageType } from '@dxos/schema';
5
+ import { Schema } from 'effect';
6
+
7
+ import { Expando, Ref, TypedObject } from '@dxos/echo-schema';
8
+ import { DataType } from '@dxos/schema';
7
9
 
8
10
  // TODO(wittjosiah): These types were placed here rather than in @dxos/plugin-thread
9
11
  // in order to avoid a circular dependency between threads and other objects that use threads.
10
12
 
11
- export const ThreadStatus = S.Union(S.Literal('staged'), S.Literal('active'), S.Literal('resolved'));
13
+ export const ThreadStatus = Schema.Union(
14
+ Schema.Literal('staged'),
15
+ Schema.Literal('active'),
16
+ Schema.Literal('resolved'),
17
+ );
12
18
 
13
19
  export class ThreadType extends TypedObject({ typename: 'dxos.org/type/Thread', version: '0.1.0' })({
14
- name: S.optional(S.String),
20
+ name: Schema.optional(Schema.String),
15
21
  /** AM cursor-range: 'from:to'. */
16
- anchor: S.optional(S.String),
17
- status: S.optional(ThreadStatus),
18
- messages: S.mutable(S.Array(Ref(MessageType))),
22
+ anchor: Schema.optional(Schema.String),
23
+ status: Schema.optional(ThreadStatus),
24
+ messages: Schema.mutable(Schema.Array(Ref(DataType.Message))),
19
25
  }) {}
20
26
 
21
27
  export class ChannelType extends TypedObject({ typename: 'dxos.org/type/Channel', version: '0.1.0' })({
22
- name: S.optional(S.String),
28
+ name: Schema.optional(Schema.String),
23
29
  queue: Ref(Expando),
24
30
  }) {}