@dxos/plugin-space 0.8.4-main.66e292d → 0.8.4-main.69d29f4

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 (563) hide show
  1. package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs +129 -0
  2. package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs.map +7 -0
  3. package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +148 -0
  4. package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +7 -0
  5. package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +142 -0
  6. package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +7 -0
  7. package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +107 -0
  8. package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +7 -0
  9. package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +523 -0
  10. package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +7 -0
  11. package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +84 -0
  12. package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-3X2EA2OA.mjs +1898 -0
  14. package/dist/lib/browser/chunk-3X2EA2OA.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-P25R3AOK.mjs → chunk-4WZUGLQQ.mjs} +49 -56
  16. package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-ASV6DYFH.mjs +19 -0
  18. package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-AWVAX26X.mjs +13 -0
  20. package/dist/lib/browser/chunk-AWVAX26X.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-CCRSHECL.mjs +714 -0
  22. package/dist/lib/browser/chunk-CCRSHECL.mjs.map +7 -0
  23. package/dist/lib/browser/{chunk-VZBIIYFM.mjs → chunk-HSMQFM57.mjs} +1 -1
  24. package/dist/lib/browser/chunk-HSMQFM57.mjs.map +7 -0
  25. package/dist/lib/browser/{chunk-GJOZILGC.mjs → chunk-SUI34XSA.mjs} +204 -200
  26. package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
  27. package/dist/lib/browser/{chunk-POFUXISV.mjs → chunk-ZT2VPYRM.mjs} +4 -3
  28. package/dist/lib/browser/{chunk-POFUXISV.mjs.map → chunk-ZT2VPYRM.mjs.map} +2 -2
  29. package/dist/lib/browser/cli/index.mjs +849 -0
  30. package/dist/lib/browser/cli/index.mjs.map +7 -0
  31. package/dist/lib/browser/identity-created-VCFYLSBB.mjs +23 -0
  32. package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +7 -0
  33. package/dist/lib/browser/index.mjs +213 -192
  34. package/dist/lib/browser/index.mjs.map +4 -4
  35. package/dist/lib/browser/meta.json +1 -1
  36. package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +827 -0
  37. package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +7 -0
  38. package/dist/lib/browser/react-root-PI7VTZUZ.mjs +30 -0
  39. package/dist/lib/browser/react-root-PI7VTZUZ.mjs.map +7 -0
  40. package/dist/lib/browser/react-surface-BPE7VWI7.mjs +382 -0
  41. package/dist/lib/browser/react-surface-BPE7VWI7.mjs.map +7 -0
  42. package/dist/lib/browser/{repair-CNLE35NF.mjs → repair-CJG26D52.mjs} +16 -10
  43. package/dist/lib/browser/repair-CJG26D52.mjs.map +7 -0
  44. package/dist/lib/browser/settings-ZS2AQ73E.mjs +33 -0
  45. package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +7 -0
  46. package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +242 -0
  47. package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +7 -0
  48. package/dist/lib/browser/state-7YZQB2KY.mjs +58 -0
  49. package/dist/lib/browser/state-7YZQB2KY.mjs.map +7 -0
  50. package/dist/lib/browser/types/index.mjs +10 -8
  51. package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs +130 -0
  52. package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs.map +7 -0
  53. package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +149 -0
  54. package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +7 -0
  55. package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +143 -0
  56. package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +7 -0
  57. package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +108 -0
  58. package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +7 -0
  59. package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +524 -0
  60. package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +7 -0
  61. package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +85 -0
  62. package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs → chunk-2SW6S2BB.mjs} +4 -3
  64. package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs.map → chunk-2SW6S2BB.mjs.map} +2 -2
  65. package/dist/lib/node-esm/{chunk-I6FZP42D.mjs → chunk-7KMYUWSR.mjs} +204 -200
  66. package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +7 -0
  67. package/dist/lib/node-esm/chunk-CVXULIYC.mjs +20 -0
  68. package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +7 -0
  69. package/dist/lib/node-esm/chunk-EYS3L2NO.mjs +1899 -0
  70. package/dist/lib/node-esm/chunk-EYS3L2NO.mjs.map +7 -0
  71. package/dist/lib/node-esm/chunk-HREWB23G.mjs +15 -0
  72. package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +7 -0
  73. package/dist/lib/node-esm/{chunk-7EV4SN47.mjs → chunk-JOBIWCBC.mjs} +49 -56
  74. package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +715 -0
  76. package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +7 -0
  77. package/dist/lib/node-esm/{chunk-BDEFTL6K.mjs → chunk-SL4BJSUG.mjs} +1 -1
  78. package/dist/lib/node-esm/chunk-SL4BJSUG.mjs.map +7 -0
  79. package/dist/lib/node-esm/cli/index.mjs +850 -0
  80. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  81. package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +25 -0
  82. package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +7 -0
  83. package/dist/lib/node-esm/index.mjs +213 -192
  84. package/dist/lib/node-esm/index.mjs.map +4 -4
  85. package/dist/lib/node-esm/meta.json +1 -1
  86. package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs +828 -0
  87. package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +7 -0
  88. package/dist/lib/node-esm/react-root-KUXM33JI.mjs +31 -0
  89. package/dist/lib/node-esm/react-root-KUXM33JI.mjs.map +7 -0
  90. package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs +383 -0
  91. package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs.map +7 -0
  92. package/dist/lib/node-esm/{repair-EHZS6MFY.mjs → repair-G3ZW3VG3.mjs} +16 -10
  93. package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +7 -0
  94. package/dist/lib/node-esm/settings-PVI2VG56.mjs +34 -0
  95. package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +7 -0
  96. package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +243 -0
  97. package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +7 -0
  98. package/dist/lib/node-esm/state-XE5YGPHM.mjs +59 -0
  99. package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +7 -0
  100. package/dist/lib/node-esm/types/index.mjs +10 -8
  101. package/dist/types/src/SpacePlugin.d.ts +3 -15
  102. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  104. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  106. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +5 -0
  108. package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +3 -0
  110. package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/identity-created/identity-created.d.ts +5 -0
  112. package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/identity-created/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/identity-created/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/index.d.ts +10 -20
  116. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  117. package/dist/types/src/capabilities/operation-resolver/index.d.ts +6 -0
  118. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +9 -0
  120. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  121. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  122. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  124. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  125. package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
  126. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +8 -0
  128. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/repair/index.d.ts +3 -0
  130. package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
  132. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/settings/index.d.ts +7 -0
  134. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  135. package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
  136. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  137. package/dist/types/src/capabilities/spaces-ready/index.d.ts +3 -0
  138. package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +1 -0
  139. package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +5 -0
  140. package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -0
  141. package/dist/types/src/capabilities/state/index.d.ts +13 -0
  142. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  143. package/dist/types/src/capabilities/state/state.d.ts +17 -0
  144. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  145. package/dist/types/src/cli/commands/database/add.d.ts +17 -0
  146. package/dist/types/src/cli/commands/database/add.d.ts.map +1 -0
  147. package/dist/types/src/cli/commands/database/index.d.ts +3 -0
  148. package/dist/types/src/cli/commands/database/index.d.ts.map +1 -0
  149. package/dist/types/src/cli/commands/database/query/index.d.ts +2 -0
  150. package/dist/types/src/cli/commands/database/query/index.d.ts.map +1 -0
  151. package/dist/types/src/cli/commands/database/query/query.d.ts +13 -0
  152. package/dist/types/src/cli/commands/database/query/query.d.ts.map +1 -0
  153. package/dist/types/src/cli/commands/database/query/query.test.d.ts +2 -0
  154. package/dist/types/src/cli/commands/database/query/query.test.d.ts.map +1 -0
  155. package/dist/types/src/cli/commands/database/remove.d.ts +9 -0
  156. package/dist/types/src/cli/commands/database/remove.d.ts.map +1 -0
  157. package/dist/types/src/cli/commands/database/stats.d.ts +6 -0
  158. package/dist/types/src/cli/commands/database/stats.d.ts.map +1 -0
  159. package/dist/types/src/cli/commands/database/util.d.ts +14 -0
  160. package/dist/types/src/cli/commands/database/util.d.ts.map +1 -0
  161. package/dist/types/src/cli/commands/index.d.ts +4 -0
  162. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  163. package/dist/types/src/cli/commands/queue/index.d.ts +7 -0
  164. package/dist/types/src/cli/commands/queue/index.d.ts.map +1 -0
  165. package/dist/types/src/cli/commands/queue/query.d.ts +8 -0
  166. package/dist/types/src/cli/commands/queue/query.d.ts.map +1 -0
  167. package/dist/types/src/cli/commands/queue/util.d.ts +6 -0
  168. package/dist/types/src/cli/commands/queue/util.d.ts.map +1 -0
  169. package/dist/types/src/cli/commands/space/close/close.d.ts +12 -0
  170. package/dist/types/src/cli/commands/space/close/close.d.ts.map +1 -0
  171. package/dist/types/src/cli/commands/space/close/index.d.ts +2 -0
  172. package/dist/types/src/cli/commands/space/close/index.d.ts.map +1 -0
  173. package/dist/types/src/cli/commands/space/create/create.d.ts +12 -0
  174. package/dist/types/src/cli/commands/space/create/create.d.ts.map +1 -0
  175. package/dist/types/src/cli/commands/space/create/create.test.d.ts +2 -0
  176. package/dist/types/src/cli/commands/space/create/create.test.d.ts.map +1 -0
  177. package/dist/types/src/cli/commands/space/create/index.d.ts +2 -0
  178. package/dist/types/src/cli/commands/space/create/index.d.ts.map +1 -0
  179. package/dist/types/src/cli/commands/space/index.d.ts +31 -0
  180. package/dist/types/src/cli/commands/space/index.d.ts.map +1 -0
  181. package/dist/types/src/cli/commands/space/info/index.d.ts +2 -0
  182. package/dist/types/src/cli/commands/space/info/index.d.ts.map +1 -0
  183. package/dist/types/src/cli/commands/space/info/info.d.ts +13 -0
  184. package/dist/types/src/cli/commands/space/info/info.d.ts.map +1 -0
  185. package/dist/types/src/cli/commands/space/info/info.test.d.ts +2 -0
  186. package/dist/types/src/cli/commands/space/info/info.test.d.ts.map +1 -0
  187. package/dist/types/src/cli/commands/space/join/index.d.ts +2 -0
  188. package/dist/types/src/cli/commands/space/join/index.d.ts.map +1 -0
  189. package/dist/types/src/cli/commands/space/join/join.d.ts +14 -0
  190. package/dist/types/src/cli/commands/space/join/join.d.ts.map +1 -0
  191. package/dist/types/src/cli/commands/space/join/util.d.ts +17 -0
  192. package/dist/types/src/cli/commands/space/join/util.d.ts.map +1 -0
  193. package/dist/types/src/cli/commands/space/list/index.d.ts +2 -0
  194. package/dist/types/src/cli/commands/space/list/index.d.ts.map +1 -0
  195. package/dist/types/src/cli/commands/space/list/list.d.ts +7 -0
  196. package/dist/types/src/cli/commands/space/list/list.d.ts.map +1 -0
  197. package/dist/types/src/cli/commands/space/list/list.test.d.ts +2 -0
  198. package/dist/types/src/cli/commands/space/list/list.test.d.ts.map +1 -0
  199. package/dist/types/src/cli/commands/space/members/index.d.ts +2 -0
  200. package/dist/types/src/cli/commands/space/members/index.d.ts.map +1 -0
  201. package/dist/types/src/cli/commands/space/members/members.d.ts +13 -0
  202. package/dist/types/src/cli/commands/space/members/members.d.ts.map +1 -0
  203. package/dist/types/src/cli/commands/space/members/members.test.d.ts +2 -0
  204. package/dist/types/src/cli/commands/space/members/members.test.d.ts.map +1 -0
  205. package/dist/types/src/cli/commands/space/members/util.d.ts +9 -0
  206. package/dist/types/src/cli/commands/space/members/util.d.ts.map +1 -0
  207. package/dist/types/src/cli/commands/space/open/index.d.ts +2 -0
  208. package/dist/types/src/cli/commands/space/open/index.d.ts.map +1 -0
  209. package/dist/types/src/cli/commands/space/open/open.d.ts +12 -0
  210. package/dist/types/src/cli/commands/space/open/open.d.ts.map +1 -0
  211. package/dist/types/src/cli/commands/space/schema/index.d.ts +8 -0
  212. package/dist/types/src/cli/commands/space/schema/index.d.ts.map +1 -0
  213. package/dist/types/src/cli/commands/space/schema/list/index.d.ts +2 -0
  214. package/dist/types/src/cli/commands/space/schema/list/index.d.ts.map +1 -0
  215. package/dist/types/src/cli/commands/space/schema/list/list.d.ts +15 -0
  216. package/dist/types/src/cli/commands/space/schema/list/list.d.ts.map +1 -0
  217. package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts +2 -0
  218. package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts.map +1 -0
  219. package/dist/types/src/cli/commands/space/schema/list/util.d.ts +15 -0
  220. package/dist/types/src/cli/commands/space/schema/list/util.d.ts.map +1 -0
  221. package/dist/types/src/cli/commands/space/share/index.d.ts +2 -0
  222. package/dist/types/src/cli/commands/space/share/index.d.ts.map +1 -0
  223. package/dist/types/src/cli/commands/space/share/share.d.ts +19 -0
  224. package/dist/types/src/cli/commands/space/share/share.d.ts.map +1 -0
  225. package/dist/types/src/cli/commands/space/sync/index.d.ts +2 -0
  226. package/dist/types/src/cli/commands/space/sync/index.d.ts.map +1 -0
  227. package/dist/types/src/cli/commands/space/sync/sync.d.ts +6 -0
  228. package/dist/types/src/cli/commands/space/sync/sync.d.ts.map +1 -0
  229. package/dist/types/src/cli/commands/space/sync/sync.test.d.ts +2 -0
  230. package/dist/types/src/cli/commands/space/sync/sync.test.d.ts.map +1 -0
  231. package/dist/types/src/cli/index.d.ts +2 -0
  232. package/dist/types/src/cli/index.d.ts.map +1 -0
  233. package/dist/types/src/cli/plugin.d.ts +4 -0
  234. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  235. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  236. package/dist/types/src/components/CollectionArticle.d.ts +5 -2
  237. package/dist/types/src/components/CollectionArticle.d.ts.map +1 -1
  238. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
  239. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  240. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +16 -6
  241. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
  242. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -4
  243. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  244. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  245. package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -1
  246. package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -1
  247. package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +10 -1
  248. package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts.map +1 -1
  249. package/dist/types/src/components/MenuFooter.d.ts +1 -1
  250. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  251. package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts +8 -0
  252. package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
  253. package/dist/types/src/components/{ObjectDetailsPanel → ObjectCardStack}/ObjectForm.d.ts +2 -3
  254. package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -0
  255. package/dist/types/src/components/ObjectCardStack/index.d.ts +3 -0
  256. package/dist/types/src/components/ObjectCardStack/index.d.ts.map +1 -0
  257. package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.d.ts +1 -1
  258. package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
  259. package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts +9 -0
  260. package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
  261. package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts.map +1 -0
  262. package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +9 -0
  263. package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -0
  264. package/dist/types/src/components/ObjectDetails/index.d.ts +3 -0
  265. package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -0
  266. package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +1 -1
  267. package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -1
  268. package/dist/types/src/components/RecordArticle.d.ts +1 -1
  269. package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
  270. package/dist/types/src/components/RecordArticle.stories.d.ts +10 -1
  271. package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
  272. package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
  273. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  274. package/dist/types/src/components/SpacePresence/SpacePresence.d.ts +4 -4
  275. package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -1
  276. package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +9 -0
  277. package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
  278. package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -1
  279. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +1 -1
  280. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  281. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +10 -1
  282. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
  283. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +9 -0
  284. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
  285. package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
  286. package/dist/types/src/components/index.d.ts +14 -10
  287. package/dist/types/src/components/index.d.ts.map +1 -1
  288. package/dist/types/src/constants.d.ts +6 -0
  289. package/dist/types/src/constants.d.ts.map +1 -0
  290. package/dist/types/src/helpers/query.d.ts +3 -4
  291. package/dist/types/src/helpers/query.d.ts.map +1 -1
  292. package/dist/types/src/hooks/useActiveSpace.d.ts +2 -2
  293. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
  294. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -8
  295. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
  296. package/dist/types/src/hooks/usePath.d.ts +2 -2
  297. package/dist/types/src/hooks/usePath.d.ts.map +1 -1
  298. package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -1
  299. package/dist/types/src/index.d.ts +1 -2
  300. package/dist/types/src/index.d.ts.map +1 -1
  301. package/dist/types/src/meta.d.ts +2 -2
  302. package/dist/types/src/meta.d.ts.map +1 -1
  303. package/dist/types/src/translations.d.ts +9 -0
  304. package/dist/types/src/translations.d.ts.map +1 -1
  305. package/dist/types/src/types/capabilities.d.ts +71 -0
  306. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  307. package/dist/types/src/types/events.d.ts +9 -0
  308. package/dist/types/src/types/events.d.ts.map +1 -0
  309. package/dist/types/src/types/form.d.ts +1 -3
  310. package/dist/types/src/types/form.d.ts.map +1 -1
  311. package/dist/types/src/types/index.d.ts +2 -0
  312. package/dist/types/src/types/index.d.ts.map +1 -1
  313. package/dist/types/src/types/types.d.ts +638 -355
  314. package/dist/types/src/types/types.d.ts.map +1 -1
  315. package/dist/types/src/util.d.ts +35 -31
  316. package/dist/types/src/util.d.ts.map +1 -1
  317. package/dist/types/tsconfig.tsbuildinfo +1 -1
  318. package/package.json +82 -69
  319. package/src/SpacePlugin.ts +153 -192
  320. package/src/capabilities/app-graph-builder/app-graph-builder.ts +617 -0
  321. package/src/capabilities/app-graph-builder/index.ts +7 -0
  322. package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +82 -0
  323. package/src/capabilities/app-graph-serializer/index.ts +7 -0
  324. package/src/capabilities/identity-created/identity-created.ts +29 -0
  325. package/src/capabilities/identity-created/index.ts +7 -0
  326. package/src/capabilities/index.ts +10 -14
  327. package/src/capabilities/operation-resolver/index.ts +7 -0
  328. package/src/capabilities/operation-resolver/operation-resolver.ts +760 -0
  329. package/src/capabilities/react-root/index.ts +7 -0
  330. package/src/capabilities/react-root/react-root.tsx +25 -0
  331. package/src/capabilities/react-surface/index.ts +7 -0
  332. package/src/capabilities/react-surface/react-surface.tsx +375 -0
  333. package/src/capabilities/repair/index.ts +7 -0
  334. package/src/capabilities/{repair.ts → repair/repair.ts} +21 -11
  335. package/src/capabilities/settings/index.ts +7 -0
  336. package/src/capabilities/settings/settings.ts +32 -0
  337. package/src/capabilities/spaces-ready/index.ts +7 -0
  338. package/src/capabilities/spaces-ready/spaces-ready.ts +289 -0
  339. package/src/capabilities/state/index.ts +7 -0
  340. package/src/capabilities/state/state.ts +64 -0
  341. package/src/cli/commands/database/add.ts +116 -0
  342. package/src/cli/commands/database/index.ts +16 -0
  343. package/src/cli/commands/database/query/index.ts +5 -0
  344. package/src/cli/commands/database/query/query.test.ts +55 -0
  345. package/src/cli/commands/database/query/query.ts +44 -0
  346. package/src/cli/commands/database/remove.ts +51 -0
  347. package/src/cli/commands/database/stats.ts +44 -0
  348. package/src/cli/commands/database/util.ts +32 -0
  349. package/src/cli/commands/index.ts +7 -0
  350. package/src/cli/commands/queue/index.ts +12 -0
  351. package/src/cli/commands/queue/query.ts +45 -0
  352. package/src/cli/commands/queue/util.ts +19 -0
  353. package/src/cli/commands/space/close/close.ts +40 -0
  354. package/src/cli/commands/space/close/index.ts +5 -0
  355. package/src/cli/commands/space/create/create.test.ts +67 -0
  356. package/src/cli/commands/space/create/create.ts +61 -0
  357. package/src/cli/commands/space/create/index.ts +5 -0
  358. package/src/cli/commands/space/index.ts +21 -0
  359. package/src/cli/commands/space/info/index.ts +5 -0
  360. package/src/cli/commands/space/info/info.test.ts +47 -0
  361. package/src/cli/commands/space/info/info.ts +37 -0
  362. package/src/cli/commands/space/join/index.ts +5 -0
  363. package/src/cli/commands/space/join/join.ts +122 -0
  364. package/src/cli/commands/space/join/util.ts +82 -0
  365. package/src/cli/commands/space/list/index.ts +5 -0
  366. package/src/cli/commands/space/list/list.test.ts +36 -0
  367. package/src/cli/commands/space/list/list.ts +30 -0
  368. package/src/cli/commands/space/members/index.ts +5 -0
  369. package/src/cli/commands/space/members/members.test.ts +46 -0
  370. package/src/cli/commands/space/members/members.ts +40 -0
  371. package/src/cli/commands/space/members/util.ts +29 -0
  372. package/src/cli/commands/space/open/index.ts +5 -0
  373. package/src/cli/commands/space/open/open.ts +39 -0
  374. package/src/cli/commands/space/schema/index.ts +12 -0
  375. package/src/cli/commands/space/schema/list/index.ts +5 -0
  376. package/src/cli/commands/space/schema/list/list.test.ts +42 -0
  377. package/src/cli/commands/space/schema/list/list.ts +64 -0
  378. package/src/cli/commands/space/schema/list/util.ts +39 -0
  379. package/src/cli/commands/space/share/index.ts +5 -0
  380. package/src/cli/commands/space/share/share.ts +112 -0
  381. package/src/cli/commands/space/sync/index.ts +5 -0
  382. package/src/cli/commands/space/sync/sync.test.ts +12 -0
  383. package/src/cli/commands/space/sync/sync.ts +33 -0
  384. package/src/cli/index.ts +5 -0
  385. package/src/cli/plugin.ts +81 -0
  386. package/src/components/AwaitingObject.tsx +13 -10
  387. package/src/components/CollectionArticle.tsx +144 -19
  388. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +27 -21
  389. package/src/components/CreateDialog/CreateObjectDialog.tsx +39 -47
  390. package/src/components/CreateDialog/CreateObjectPanel.tsx +125 -70
  391. package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -47
  392. package/src/components/JoinDialog/JoinDialog.tsx +25 -52
  393. package/src/components/MembersContainer/MembersContainer.stories.tsx +2 -2
  394. package/src/components/MembersContainer/MembersContainer.tsx +35 -37
  395. package/src/components/MenuFooter.tsx +1 -1
  396. package/src/components/ObjectCardStack/ObjectCardStack.tsx +67 -0
  397. package/src/components/ObjectCardStack/ObjectForm.tsx +97 -0
  398. package/src/components/ObjectCardStack/index.ts +7 -0
  399. package/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.tsx +4 -4
  400. package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
  401. package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
  402. package/src/components/ObjectDetails/index.ts +7 -0
  403. package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +9 -13
  404. package/src/components/RecordArticle.stories.tsx +12 -12
  405. package/src/components/RecordArticle.tsx +26 -18
  406. package/src/components/SchemaContainer.tsx +3 -3
  407. package/src/components/SpacePluginSettings.tsx +11 -7
  408. package/src/components/SpacePresence/SpacePresence.tsx +14 -16
  409. package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +11 -12
  410. package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
  411. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +180 -184
  412. package/src/components/SyncStatus/SyncStatus.tsx +1 -1
  413. package/src/components/SyncStatus/save-tracker.ts +2 -2
  414. package/src/components/ViewEditor.tsx +16 -13
  415. package/src/components/index.ts +5 -5
  416. package/src/constants.ts +11 -0
  417. package/src/helpers/query.ts +7 -12
  418. package/src/hooks/useActiveSpace.ts +6 -4
  419. package/src/hooks/useInputSurfaceLookup.tsx +8 -17
  420. package/src/hooks/usePath.ts +4 -4
  421. package/src/hooks/useTypeOptions.ts +1 -3
  422. package/src/index.ts +1 -2
  423. package/src/meta.ts +2 -2
  424. package/src/translations.ts +2 -0
  425. package/src/types/capabilities.ts +73 -0
  426. package/src/types/events.ts +15 -0
  427. package/src/types/form.ts +26 -32
  428. package/src/types/index.ts +2 -0
  429. package/src/types/types.ts +528 -247
  430. package/src/util.tsx +219 -231
  431. package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs +0 -31
  432. package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +0 -7
  433. package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs +0 -141
  434. package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs.map +0 -7
  435. package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs +0 -144
  436. package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs.map +0 -7
  437. package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs +0 -116
  438. package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs.map +0 -7
  439. package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs +0 -517
  440. package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs.map +0 -7
  441. package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs +0 -80
  442. package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs.map +0 -7
  443. package/dist/lib/browser/chunk-6A3NWBB6.mjs +0 -392
  444. package/dist/lib/browser/chunk-6A3NWBB6.mjs.map +0 -7
  445. package/dist/lib/browser/chunk-C6DAPIFF.mjs +0 -20
  446. package/dist/lib/browser/chunk-C6DAPIFF.mjs.map +0 -7
  447. package/dist/lib/browser/chunk-GJOZILGC.mjs.map +0 -7
  448. package/dist/lib/browser/chunk-KCZ527AM.mjs +0 -2126
  449. package/dist/lib/browser/chunk-KCZ527AM.mjs.map +0 -7
  450. package/dist/lib/browser/chunk-P25R3AOK.mjs.map +0 -7
  451. package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +0 -7
  452. package/dist/lib/browser/chunk-WJXU4GKV.mjs +0 -19
  453. package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +0 -7
  454. package/dist/lib/browser/identity-created-NAXTPQXE.mjs +0 -23
  455. package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +0 -7
  456. package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs +0 -773
  457. package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs.map +0 -7
  458. package/dist/lib/browser/react-root-JCRD74GI.mjs +0 -30
  459. package/dist/lib/browser/react-root-JCRD74GI.mjs.map +0 -7
  460. package/dist/lib/browser/react-surface-VOETEAG3.mjs +0 -365
  461. package/dist/lib/browser/react-surface-VOETEAG3.mjs.map +0 -7
  462. package/dist/lib/browser/repair-CNLE35NF.mjs.map +0 -7
  463. package/dist/lib/browser/settings-TRLI52I5.mjs +0 -24
  464. package/dist/lib/browser/settings-TRLI52I5.mjs.map +0 -7
  465. package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs +0 -208
  466. package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs.map +0 -7
  467. package/dist/lib/browser/state-C7N6EDDZ.mjs +0 -47
  468. package/dist/lib/browser/state-C7N6EDDZ.mjs.map +0 -7
  469. package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs +0 -32
  470. package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +0 -7
  471. package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs +0 -142
  472. package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs.map +0 -7
  473. package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs +0 -145
  474. package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs.map +0 -7
  475. package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs +0 -117
  476. package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs.map +0 -7
  477. package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs +0 -518
  478. package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs.map +0 -7
  479. package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs +0 -81
  480. package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs.map +0 -7
  481. package/dist/lib/node-esm/chunk-7EV4SN47.mjs.map +0 -7
  482. package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
  483. package/dist/lib/node-esm/chunk-H4JILUJK.mjs +0 -20
  484. package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +0 -7
  485. package/dist/lib/node-esm/chunk-I6FZP42D.mjs.map +0 -7
  486. package/dist/lib/node-esm/chunk-JAMGJUFU.mjs +0 -2127
  487. package/dist/lib/node-esm/chunk-JAMGJUFU.mjs.map +0 -7
  488. package/dist/lib/node-esm/chunk-WWGV5FJM.mjs +0 -21
  489. package/dist/lib/node-esm/chunk-WWGV5FJM.mjs.map +0 -7
  490. package/dist/lib/node-esm/chunk-X34VDVMY.mjs +0 -393
  491. package/dist/lib/node-esm/chunk-X34VDVMY.mjs.map +0 -7
  492. package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs +0 -25
  493. package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +0 -7
  494. package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs +0 -774
  495. package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs.map +0 -7
  496. package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs +0 -31
  497. package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs.map +0 -7
  498. package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs +0 -366
  499. package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs.map +0 -7
  500. package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +0 -7
  501. package/dist/lib/node-esm/settings-MNQTKHL7.mjs +0 -25
  502. package/dist/lib/node-esm/settings-MNQTKHL7.mjs.map +0 -7
  503. package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs +0 -209
  504. package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs.map +0 -7
  505. package/dist/lib/node-esm/state-45TXZQJ6.mjs +0 -48
  506. package/dist/lib/node-esm/state-45TXZQJ6.mjs.map +0 -7
  507. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  508. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  509. package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -4
  510. package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
  511. package/dist/types/src/capabilities/capabilities.d.ts +0 -34
  512. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  513. package/dist/types/src/capabilities/identity-created.d.ts +0 -4
  514. package/dist/types/src/capabilities/identity-created.d.ts.map +0 -1
  515. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -9
  516. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  517. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  518. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  519. package/dist/types/src/capabilities/react-surface.d.ts +0 -7
  520. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  521. package/dist/types/src/capabilities/repair.d.ts +0 -4
  522. package/dist/types/src/capabilities/repair.d.ts.map +0 -1
  523. package/dist/types/src/capabilities/settings.d.ts +0 -4
  524. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  525. package/dist/types/src/capabilities/spaces-ready.d.ts +0 -4
  526. package/dist/types/src/capabilities/spaces-ready.d.ts.map +0 -1
  527. package/dist/types/src/capabilities/state.d.ts +0 -5
  528. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  529. package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +0 -9
  530. package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +0 -1
  531. package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +0 -1
  532. package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +0 -3
  533. package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +0 -1
  534. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +0 -7
  535. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
  536. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
  537. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
  538. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +0 -8
  539. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
  540. package/dist/types/src/components/ObjectSettings/index.d.ts +0 -3
  541. package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
  542. package/dist/types/src/events.d.ts +0 -8
  543. package/dist/types/src/events.d.ts.map +0 -1
  544. package/src/capabilities/app-graph-builder.ts +0 -689
  545. package/src/capabilities/app-graph-serializer.ts +0 -76
  546. package/src/capabilities/capabilities.ts +0 -40
  547. package/src/capabilities/identity-created.ts +0 -25
  548. package/src/capabilities/intent-resolver.ts +0 -706
  549. package/src/capabilities/react-root.tsx +0 -22
  550. package/src/capabilities/react-surface.tsx +0 -350
  551. package/src/capabilities/settings.ts +0 -21
  552. package/src/capabilities/spaces-ready.ts +0 -243
  553. package/src/capabilities/state.ts +0 -46
  554. package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -51
  555. package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -72
  556. package/src/components/ObjectDetailsPanel/index.ts +0 -7
  557. package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -80
  558. package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -111
  559. package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
  560. package/src/components/ObjectSettings/index.ts +0 -7
  561. package/src/events.ts +0 -15
  562. /package/dist/types/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.d.ts +0 -0
  563. /package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +0 -0
@@ -2,12 +2,12 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import * as Function from 'effect/Function';
6
5
  import * as Schema from 'effect/Schema';
7
- import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
6
+ import React, { type ChangeEvent, forwardRef, useCallback, useMemo, useState } from 'react';
8
7
 
9
- import { LayoutAction, chain, createIntent } from '@dxos/app-framework';
10
- import { useCapabilities, useIntentDispatcher } from '@dxos/app-framework/react';
8
+ import { Common } from '@dxos/app-framework';
9
+ import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/react';
10
+ import { Obj } from '@dxos/echo';
11
11
  import { log } from '@dxos/log';
12
12
  import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
13
13
  import { useClient } from '@dxos/react-client';
@@ -19,16 +19,15 @@ import {
19
19
  ControlPage,
20
20
  ControlSection,
21
21
  Form,
22
- type InputComponent,
22
+ type FormFieldMap,
23
23
  } from '@dxos/react-ui-form';
24
+ import { Layout } from '@dxos/react-ui-mosaic';
24
25
  import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
25
- import { StackItem } from '@dxos/react-ui-stack';
26
26
 
27
- import { SpaceCapabilities } from '../../capabilities';
28
27
  import { meta } from '../../meta';
29
- import { SpaceAction, SpaceForm } from '../../types';
28
+ import { SpaceCapabilities, SpaceForm, SpaceOperation } from '../../types';
30
29
 
31
- const FormSchema = SpaceForm.pipe(
30
+ const SpaceFormSchema = SpaceForm.pipe(
32
31
  Schema.extend(
33
32
  Schema.Struct({
34
33
  archived: Schema.Boolean.annotations({ title: 'Archive Space' }),
@@ -41,184 +40,181 @@ export type SpaceSettingsContainerProps = {
41
40
  };
42
41
 
43
42
  // TODO(wittjosiah): Handle space migrations here?
44
- export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) => {
45
- const { t } = useTranslation(meta.id);
46
- const { dispatchPromise: dispatch } = useIntentDispatcher();
47
- const client = useClient();
48
- const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
49
- const [edgeReplication, setEdgeReplication] = useState(
50
- space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED,
51
- );
52
- const toggleEdgeReplication = useCallback(
53
- async (next: boolean) => {
54
- setEdgeReplication(next);
55
- await space?.internal
56
- .setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED)
57
- .catch((err: unknown) => {
58
- log.catch(err);
59
- setEdgeReplication(!next);
60
- });
61
- },
62
- [space],
63
- );
64
-
65
- const handleSave = useCallback(
66
- (properties: Schema.Schema.Type<typeof FormSchema>) => {
67
- void toggleEdgeReplication(properties.edgeReplication);
68
- if (properties.name !== space.properties.name) {
69
- space.properties.name = properties.name;
70
- }
71
- if (properties.icon !== space.properties.icon) {
72
- space.properties.icon = properties.icon;
73
- }
74
- if (properties.hue !== space.properties.hue) {
75
- space.properties.hue = properties.hue;
76
- }
77
- if (properties.archived && !archived) {
78
- void dispatch(
79
- Function.pipe(
80
- createIntent(SpaceAction.Close, { space }),
81
- chain(LayoutAction.SwitchWorkspace, {
82
- part: 'workspace',
83
- subject: client.spaces.default.id,
84
- }),
85
- ),
86
- );
87
- } else if (!properties.archived && archived) {
88
- void dispatch(createIntent(SpaceAction.Open, { space }));
89
- }
90
- },
91
- [space, toggleEdgeReplication, archived],
92
- );
93
-
94
- const values = useMemo(
95
- () => ({
96
- name: space.properties.name,
97
- icon: space.properties.icon,
98
- hue: space.properties.hue,
99
- edgeReplication,
100
- archived,
101
- }),
102
- [space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
103
- );
104
-
105
- const customElements: Partial<Record<string, InputComponent>> = useMemo(
106
- () => ({
107
- name: ({ type, label, getValue, onValueChange }) => {
108
- const handleChange = useCallback(
109
- ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
110
- [onValueChange, type],
111
- );
112
- return (
113
- <ControlItemInput title={label} description={t('display name description')}>
114
- <Input.TextInput
115
- value={getValue()}
116
- onChange={handleChange}
117
- placeholder={t('display name input placeholder')}
118
- classNames='min-is-64'
119
- />
120
- </ControlItemInput>
121
- );
122
- },
123
- icon: ({ type, label, getValue, onValueChange }) => {
124
- const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
125
- const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
126
- return (
127
- <ControlItem title={label} description={t('icon description')}>
128
- <IconPicker
129
- value={getValue()}
130
- onChange={handleChange}
131
- onReset={handleReset}
132
- classNames='justify-self-end'
133
- />
134
- </ControlItem>
135
- );
43
+ export const SpaceSettingsContainer = forwardRef<HTMLDivElement, SpaceSettingsContainerProps>(
44
+ ({ space }, forwardedRef) => {
45
+ const { t } = useTranslation(meta.id);
46
+ const { invokePromise } = useOperationInvoker();
47
+ const client = useClient();
48
+ const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
49
+ const [edgeReplication, setEdgeReplication] = useState(
50
+ space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED,
51
+ );
52
+ const toggleEdgeReplication = useCallback(
53
+ async (next: boolean) => {
54
+ setEdgeReplication(next);
55
+ await space?.internal
56
+ .setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED)
57
+ .catch((err: unknown) => {
58
+ log.catch(err);
59
+ setEdgeReplication(!next);
60
+ });
136
61
  },
137
- hue: ({ type, label, getValue, onValueChange }) => {
138
- const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
139
- const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
140
- return (
141
- <ControlItem title={label} description={t('hue description')}>
142
- <HuePicker value={getValue()} onChange={handleChange} onReset={handleReset} classNames='justify-self-end' />
143
- </ControlItem>
144
- );
145
- },
146
- edgeReplication: ({ type, label, getValue, onValueChange }) => {
147
- const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
148
- return (
149
- <ControlItemInput title={label} description={t('edge replication description')}>
150
- <Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
151
- </ControlItemInput>
152
- );
153
- },
154
- archived: ({ type, label, getValue, onValueChange }) => {
155
- const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
156
- return (
157
- <ControlItemInput title={label} description={t('archive space description')}>
158
- <Button
159
- disabled={space === client.spaces.default}
160
- variant={getValue() ? 'default' : 'destructive'}
161
- onClick={handleChange}
162
- >
163
- {getValue() ? t('unarchive space label') : t('archive space label')}
164
- </Button>
165
- </ControlItemInput>
166
- );
167
- },
168
- }),
169
- [t, space],
170
- );
62
+ [space],
63
+ );
171
64
 
172
- const download = useFileDownload();
173
- const handleBackup = useCallback(async () => {
174
- const archive = await space.internal.export();
175
- download(new Blob([archive.contents as Uint8Array<ArrayBuffer>]), archive.filename);
176
- }, [space, download]);
65
+ const handleSave = useCallback(
66
+ (properties: Schema.Schema.Type<typeof SpaceFormSchema>) => {
67
+ void toggleEdgeReplication(properties.edgeReplication ?? false);
68
+ const nameChanged = properties.name !== space.properties.name;
69
+ const iconChanged = properties.icon !== space.properties.icon;
70
+ const hueChanged = properties.hue !== space.properties.hue;
71
+ if (nameChanged || iconChanged || hueChanged) {
72
+ Obj.change(space.properties, (p) => {
73
+ if (nameChanged) {
74
+ p.name = properties.name;
75
+ }
76
+ if (iconChanged) {
77
+ p.icon = properties.icon;
78
+ }
79
+ if (hueChanged) {
80
+ p.hue = properties.hue;
81
+ }
82
+ });
83
+ }
84
+ if (properties.archived && !archived) {
85
+ void (async () => {
86
+ await invokePromise(SpaceOperation.Close, { space });
87
+ await invokePromise(Common.LayoutOperation.SwitchWorkspace, { subject: client.spaces.default.id });
88
+ })();
89
+ } else if (!properties.archived && archived) {
90
+ void invokePromise(SpaceOperation.Open, { space });
91
+ }
92
+ },
93
+ [space, toggleEdgeReplication, archived],
94
+ );
177
95
 
178
- const repairs = useCapabilities(SpaceCapabilities.Repair);
179
- const handleRepair = useCallback(async () => {
180
- await Promise.all(repairs.map((repair) => repair({ space, isDefault: client.spaces.default === space })));
181
- }, [client, space, repairs]);
96
+ const values = useMemo(
97
+ () => ({
98
+ name: space.properties.name,
99
+ icon: space.properties.icon,
100
+ hue: space.properties.hue,
101
+ edgeReplication,
102
+ archived,
103
+ }),
104
+ [space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
105
+ );
182
106
 
183
- return (
184
- <StackItem.Content scrollable>
185
- <ControlPage>
186
- <ControlSection
187
- title={t('space properties settings verbose label', { ns: meta.id })}
188
- description={t('space properties settings description', {
189
- ns: meta.id,
190
- })}
191
- >
192
- <Form
193
- schema={FormSchema}
194
- values={values}
195
- autoSave
196
- onSave={handleSave}
197
- Custom={customElements}
198
- outerSpacing={false}
199
- classNames='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'
200
- />
201
- </ControlSection>
202
- <ControlSection
203
- title={t('space controls title', { ns: meta.id })}
204
- description={t('space controls description', { ns: meta.id })}
205
- >
206
- <div role='none' className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
207
- <ControlItemInput
208
- title={t('backup space title', { ns: meta.id })}
209
- description={t('backup space description', { ns: meta.id })}
210
- >
211
- <Button onClick={handleBackup}>{t('download backup label')}</Button>
107
+ const fieldMap = useMemo<FormFieldMap>(
108
+ () => ({
109
+ name: ({ type, label, getValue, onValueChange }) => {
110
+ const handleChange = useCallback(
111
+ ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
112
+ [onValueChange, type],
113
+ );
114
+ return (
115
+ <ControlItemInput title={label} description={t('display name description')}>
116
+ <Input.TextInput
117
+ value={getValue()}
118
+ onChange={handleChange}
119
+ placeholder={t('display name input placeholder')}
120
+ classNames='min-is-64'
121
+ />
212
122
  </ControlItemInput>
213
- <ControlItemInput
214
- title={t('repair space title', { ns: meta.id })}
215
- description={t('repair space description', { ns: meta.id })}
216
- >
217
- <Button onClick={handleRepair}>{t('repair space label')}</Button>
123
+ );
124
+ },
125
+ icon: ({ type, label, getValue, onValueChange }) => {
126
+ const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
127
+ const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
128
+ return (
129
+ <ControlItem title={label} description={t('icon description')}>
130
+ <IconPicker
131
+ value={getValue()}
132
+ onChange={handleChange}
133
+ onReset={handleReset}
134
+ classNames='justify-self-end'
135
+ />
136
+ </ControlItem>
137
+ );
138
+ },
139
+ hue: ({ type, label, getValue, onValueChange }) => {
140
+ const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
141
+ const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
142
+ return (
143
+ <ControlItem title={label} description={t('hue description')}>
144
+ <HuePicker
145
+ value={getValue()}
146
+ onChange={handleChange}
147
+ onReset={handleReset}
148
+ classNames='justify-self-end'
149
+ />
150
+ </ControlItem>
151
+ );
152
+ },
153
+ edgeReplication: ({ type, label, getValue, onValueChange }) => {
154
+ const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
155
+ return (
156
+ <ControlItemInput title={label} description={t('edge replication description')}>
157
+ <Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
218
158
  </ControlItemInput>
219
- </div>
220
- </ControlSection>
221
- </ControlPage>
222
- </StackItem.Content>
223
- );
224
- };
159
+ );
160
+ },
161
+ archived: ({ type, label, getValue, onValueChange }) => {
162
+ const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
163
+ return (
164
+ <ControlItemInput title={label} description={t('archive space description')}>
165
+ <Button
166
+ disabled={space === client.spaces.default}
167
+ variant={getValue() ? 'default' : 'destructive'}
168
+ onClick={handleChange}
169
+ >
170
+ {getValue() ? t('unarchive space label') : t('archive space label')}
171
+ </Button>
172
+ </ControlItemInput>
173
+ );
174
+ },
175
+ }),
176
+ [t, space],
177
+ );
178
+
179
+ const download = useFileDownload();
180
+ const handleBackup = useCallback(async () => {
181
+ const archive = await space.internal.export();
182
+ download(new Blob([archive.contents as Uint8Array<ArrayBuffer>]), archive.filename);
183
+ }, [space, download]);
184
+
185
+ const repairs = useCapabilities(SpaceCapabilities.Repair);
186
+ const handleRepair = useCallback(async () => {
187
+ await Promise.all(repairs.map((repair) => repair({ space, isDefault: client.spaces.default === space })));
188
+ }, [client, space, repairs]);
189
+
190
+ return (
191
+ <Layout.Container scrollable ref={forwardedRef}>
192
+ <ControlPage>
193
+ <ControlSection
194
+ title={t('space properties settings verbose label')}
195
+ description={t('space properties settings description', {
196
+ ns: meta.id,
197
+ })}
198
+ >
199
+ <Form.Root fieldMap={fieldMap} schema={SpaceFormSchema} values={values} autoSave onSave={handleSave}>
200
+ <Form.FieldSet />
201
+ </Form.Root>
202
+ </ControlSection>
203
+
204
+ <ControlSection title={t('space controls title')} description={t('space controls description')}>
205
+ <div role='none' className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
206
+ <ControlItemInput title={t('backup space title')} description={t('backup space description')}>
207
+ <Button onClick={handleBackup}>{t('download backup label')}</Button>
208
+ </ControlItemInput>
209
+ <ControlItemInput title={t('repair space title')} description={t('repair space description')}>
210
+ <Button onClick={handleRepair}>{t('repair space label')}</Button>
211
+ </ControlItemInput>
212
+ </div>
213
+ </ControlSection>
214
+ </ControlPage>
215
+ </Layout.Container>
216
+ );
217
+ },
218
+ );
219
+
220
+ SpaceSettingsContainer.displayName = 'SpaceSettingsContainer';
@@ -11,7 +11,7 @@ import { useClient } from '@dxos/react-client';
11
11
  import { useStream } from '@dxos/react-client/devtools';
12
12
  import { type SpaceSyncStateMap, getSyncSummary, useSyncState } from '@dxos/react-client/echo';
13
13
  import { Icon, Popover, useTranslation } from '@dxos/react-ui';
14
- import { mx } from '@dxos/react-ui-theme';
14
+ import { mx } from '@dxos/ui-theme';
15
15
  import { Unit, type UnitFormat } from '@dxos/util';
16
16
 
17
17
  import { meta } from '../../meta';
@@ -46,10 +46,10 @@ const createSpaceSaveTracker = (space: Space, cb: (state: 'saved' | 'saving') =>
46
46
 
47
47
  let hasUnsavedChanges = false;
48
48
  let lastFlushPromise: Promise<void> | undefined;
49
- space.db.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
49
+ space.internal.db.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
50
50
  hasUnsavedChanges = unsavedDocuments.length > 0;
51
51
  });
52
- space.db.saveStateChanged.debounce(500).on(ctx, () => {
52
+ space.internal.db.saveStateChanged.debounce(500).on(ctx, () => {
53
53
  if (hasUnsavedChanges) {
54
54
  lastFlushPromise = undefined;
55
55
  cb('saving');
@@ -5,27 +5,27 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import React, { useCallback, useState } from 'react';
7
7
 
8
- import { createIntent } from '@dxos/app-framework';
9
- import { useIntentDispatcher } from '@dxos/app-framework/react';
8
+ import { useOperationInvoker } from '@dxos/app-framework/react';
10
9
  import { DXN, Filter, Obj, Query, type QueryAST, Tag, Type } from '@dxos/echo';
10
+ import { type Mutable } from '@dxos/echo/internal';
11
11
  import { useClient } from '@dxos/react-client';
12
12
  import { getSpace, useQuery } from '@dxos/react-client/echo';
13
13
  import { useAsyncEffect } from '@dxos/react-ui';
14
14
  import { ViewEditor as NaturalViewEditor } from '@dxos/react-ui-form';
15
15
  import { View } from '@dxos/schema';
16
16
 
17
- import { resolveSchemaWithClientAndSpace } from '../helpers';
17
+ import { resolveSchemaWithRegistry } from '../helpers';
18
18
  import { useTypeOptions } from '../hooks';
19
- import { SpaceAction } from '../types';
19
+ import { SpaceOperation } from '../types';
20
20
 
21
21
  export type ViewEditorProps = { view: View.View };
22
22
 
23
23
  export const ViewEditor = ({ view }: ViewEditorProps) => {
24
- const { dispatchPromise: dispatch } = useIntentDispatcher();
24
+ const { invokePromise } = useOperationInvoker();
25
25
  const client = useClient();
26
26
  const space = getSpace(view);
27
27
  const [schema, setSchema] = useState<Schema.Schema.AnyNoContext>(() => Schema.Struct({}));
28
- const tags = useQuery(space, Filter.type(Tag.Tag));
28
+ const tags = useQuery(space?.db, Filter.type(Tag.Tag));
29
29
  const types = useTypeOptions({
30
30
  space,
31
31
  annotation: {
@@ -40,7 +40,7 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
40
40
  return;
41
41
  }
42
42
 
43
- const foundSchema = await resolveSchemaWithClientAndSpace(client, space, view.query.ast);
43
+ const foundSchema = await resolveSchemaWithRegistry(space.db.schemaRegistry, view.query.ast);
44
44
  if (foundSchema && foundSchema !== schema) {
45
45
  setSchema(() => foundSchema);
46
46
  }
@@ -54,8 +54,10 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
54
54
 
55
55
  const queue = target && DXN.tryParse(target) ? target : undefined;
56
56
  const query = queue ? Query.fromAst(newQuery).options({ queues: [queue] }) : Query.fromAst(newQuery);
57
- view.query.ast = query.ast;
58
- const newSchema = await resolveSchemaWithClientAndSpace(client, space, query.ast);
57
+ Obj.change(view, (v) => {
58
+ v.query.ast = query.ast as Mutable<typeof query.ast>;
59
+ });
60
+ const newSchema = await resolveSchemaWithRegistry(space.db.schemaRegistry, query.ast);
59
61
  if (!newSchema) {
60
62
  return;
61
63
  }
@@ -64,7 +66,9 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
64
66
  query,
65
67
  jsonSchema: Type.toJsonSchema(newSchema),
66
68
  });
67
- view.projection = Obj.getSnapshot(newView).projection;
69
+ Obj.change(view, (v) => {
70
+ v.projection = Obj.getSnapshot(newView).projection as Mutable<typeof v.projection>;
71
+ });
68
72
 
69
73
  setSchema(() => newSchema);
70
74
  },
@@ -73,9 +77,9 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
73
77
 
74
78
  const handleDelete = useCallback(
75
79
  (fieldId: string) => {
76
- void dispatch(createIntent(SpaceAction.DeleteField, { view, fieldId }));
80
+ void invokePromise(SpaceOperation.DeleteField, { view, fieldId });
77
81
  },
78
- [dispatch, view],
82
+ [invokePromise, view],
79
83
  );
80
84
 
81
85
  if (!space || !schema) {
@@ -88,7 +92,6 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
88
92
  schema={schema}
89
93
  view={view}
90
94
  mode='tag'
91
- outerSpacing={false}
92
95
  tags={tags}
93
96
  types={types}
94
97
  onQueryChanged={handleQueryChanged}
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type ComponentType, lazy } from 'react';
5
+ import { lazy } from 'react';
6
6
 
7
7
  export * from './AwaitingObject';
8
8
  export * from './CreateDialog';
@@ -11,15 +11,15 @@ export * from './JoinDialog';
11
11
  export * from './MembersContainer';
12
12
  export * from './MenuFooter';
13
13
  export * from './ObjectRenamePopover';
14
- export * from './SpaceRenamePopover';
15
14
  export * from './SchemaContainer';
16
- export * from './SpacePresence';
17
15
  export * from './SpacePluginSettings';
16
+ export * from './SpacePresence';
17
+ export * from './SpaceRenamePopover';
18
18
  export * from './SpaceSettings';
19
19
  export * from './SyncStatus';
20
20
  export * from './ViewEditor';
21
21
 
22
22
  export const CollectionArticle = lazy(() => import('./CollectionArticle'));
23
- export const ObjectDetailsPanel: ComponentType<any> = lazy(() => import('./ObjectDetailsPanel'));
24
- export const ObjectSettingsContainer = lazy(() => import('./ObjectSettings'));
23
+ export const ObjectCardStack = lazy(() => import('./ObjectCardStack'));
24
+ export const ObjectDetails = lazy(() => import('./ObjectDetails'));
25
25
  export const RecordArticle = lazy(() => import('./RecordArticle'));
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { meta } from './meta';
6
+
7
+ export const CREATE_OBJECT_DIALOG = `${meta.id}/CreateObjectDialog`;
8
+ export const CREATE_SPACE_DIALOG = `${meta.id}/CreateSpaceDialog`;
9
+ export const JOIN_DIALOG = `${meta.id}/JoinDialog`;
10
+ export const OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
11
+ export const SPACE_RENAME_POPOVER = `${meta.id}/SpaceRenamePopover`;
@@ -10,15 +10,15 @@ import * as Option from 'effect/Option';
10
10
  import type * as Schema from 'effect/Schema';
11
11
  import * as SchemaAST from 'effect/SchemaAST';
12
12
 
13
- import { DXN, Filter, Query, type QueryAST } from '@dxos/echo';
13
+ import { DXN, Filter, Query, type QueryAST, type SchemaRegistry } from '@dxos/echo';
14
14
  import {
15
15
  ReferenceAnnotationId,
16
16
  type ReferenceAnnotationValue,
17
17
  getTypeAnnotation,
18
18
  unwrapOptional,
19
19
  } from '@dxos/echo/internal';
20
+ import { runAndForwardErrors } from '@dxos/effect';
20
21
  import { log } from '@dxos/log';
21
- import { type Client } from '@dxos/react-client';
22
22
  import { type Space } from '@dxos/react-client/echo';
23
23
  import { Person } from '@dxos/types';
24
24
 
@@ -35,26 +35,21 @@ export const evalQuery = (queryString: string): Query.Any => {
35
35
  }
36
36
  };
37
37
 
38
- export const resolveSchemaWithClientAndSpace = (client: Client, space: Space, query: QueryAST.Query) => {
38
+ export const resolveSchemaWithRegistry = (registry: SchemaRegistry.SchemaRegistry, query: QueryAST.Query) => {
39
39
  const resolve = Effect.fn(function* (dxn: string) {
40
40
  const typename = DXN.parse(dxn).asTypeDXN()?.type;
41
41
  if (!typename) {
42
42
  return Option.none();
43
43
  }
44
44
 
45
- const staticSchema = client.graph.schemaRegistry.getSchema(typename);
46
- if (staticSchema) {
47
- return Option.some(staticSchema);
48
- }
49
-
50
- const query = space.db.schemaRegistry.query({ typename });
45
+ const query = registry.query({ typename, location: ['database', 'runtime'] });
51
46
  const schemas = yield* Effect.promise(() => query.run());
52
47
  return Array.head(schemas);
53
48
  });
54
49
 
55
50
  return resolveSchema(query, resolve).pipe(
56
51
  Effect.map((schema) => Option.getOrUndefined(schema)),
57
- Effect.runPromise,
52
+ runAndForwardErrors,
58
53
  );
59
54
  };
60
55
 
@@ -150,9 +145,9 @@ export const getQueryTarget = (query: QueryAST.Query, space?: Space) => {
150
145
  Option.flatMap((queues) => Array.head(queues)),
151
146
  Option.flatMap((queueDxn) => Option.fromNullable(DXN.tryParse(queueDxn))),
152
147
  Option.flatMap((queueDxn) => Option.fromNullable(space?.queues.get(queueDxn))),
153
- Option.getOrElse(() => space),
148
+ Option.getOrElse(() => space?.db),
154
149
  );
155
150
  }),
156
- Match.orElse(() => space),
151
+ Match.orElse(() => space?.db),
157
152
  );
158
153
  };
@@ -2,14 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, type PluginContext } from '@dxos/app-framework';
5
+ import { type CapabilityManager, Common } from '@dxos/app-framework';
6
6
  import { useLayout } from '@dxos/app-framework/react';
7
7
  import { ClientCapabilities } from '@dxos/plugin-client';
8
8
  import { parseId, useSpace } from '@dxos/react-client/echo';
9
9
 
10
- export const getActiveSpace = (context: PluginContext) => {
11
- const client = context.getCapability(ClientCapabilities.Client);
12
- const layout = context.getCapability(Capabilities.Layout);
10
+ export const getActiveSpace = (capabilities: CapabilityManager.CapabilityManager) => {
11
+ const client = capabilities.get(ClientCapabilities.Client);
12
+ const registry = capabilities.get(Common.Capability.AtomRegistry);
13
+ const layoutAtom = capabilities.get(Common.Capability.Layout);
14
+ const layout = registry.get(layoutAtom);
13
15
  const { spaceId } = parseId(layout.workspace);
14
16
  return spaceId ? client.spaces.get(spaceId) : undefined;
15
17
  };