@dxos/plugin-space 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d

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 (357) hide show
  1. package/dist/lib/browser/{CollectionMain-D2B75XBS.mjs → CollectionArticle-WTHWY4YS.mjs} +10 -10
  2. package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +7 -0
  3. package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs +141 -0
  4. package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs.map +7 -0
  5. package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs +144 -0
  6. package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs.map +7 -0
  7. package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs +116 -0
  8. package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs.map +7 -0
  9. package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs +517 -0
  10. package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs.map +7 -0
  11. package/dist/lib/browser/{app-graph-serializer-3A6KBYWT.mjs → app-graph-serializer-G3VFEGTN.mjs} +19 -19
  12. package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-6A3NWBB6.mjs +392 -0
  14. package/dist/lib/browser/chunk-6A3NWBB6.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-C6DAPIFF.mjs +20 -0
  16. package/dist/lib/browser/chunk-C6DAPIFF.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-DCY3W36E.mjs → chunk-GJOZILGC.mjs} +210 -142
  18. package/dist/lib/browser/chunk-GJOZILGC.mjs.map +7 -0
  19. package/dist/lib/browser/{chunk-J6YZG77T.mjs → chunk-KCZ527AM.mjs} +641 -500
  20. package/dist/lib/browser/chunk-KCZ527AM.mjs.map +7 -0
  21. package/dist/lib/browser/{chunk-ELJDGQTO.mjs → chunk-P25R3AOK.mjs} +35 -5
  22. package/dist/lib/browser/chunk-P25R3AOK.mjs.map +7 -0
  23. package/dist/lib/browser/{chunk-WAXS2ZVX.mjs → chunk-POFUXISV.mjs} +69 -62
  24. package/dist/lib/browser/chunk-POFUXISV.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-VZBIIYFM.mjs +16 -0
  26. package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-WJXU4GKV.mjs +19 -0
  28. package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +7 -0
  29. package/dist/lib/browser/{identity-created-T6ZNVE7S.mjs → identity-created-NAXTPQXE.mjs} +5 -5
  30. package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +7 -0
  31. package/dist/lib/browser/index.mjs +88 -131
  32. package/dist/lib/browser/index.mjs.map +3 -3
  33. package/dist/lib/browser/{intent-resolver-7E3IZIJS.mjs → intent-resolver-RZEWNJ2K.mjs} +105 -100
  34. package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs.map +7 -0
  35. package/dist/lib/browser/meta.json +1 -1
  36. package/dist/lib/browser/react-root-JCRD74GI.mjs +30 -0
  37. package/dist/lib/browser/react-root-JCRD74GI.mjs.map +7 -0
  38. package/dist/lib/browser/{react-surface-GL4CE2F4.mjs → react-surface-VOETEAG3.mjs} +91 -111
  39. package/dist/lib/browser/react-surface-VOETEAG3.mjs.map +7 -0
  40. package/dist/lib/browser/repair-CNLE35NF.mjs +44 -0
  41. package/dist/lib/browser/repair-CNLE35NF.mjs.map +7 -0
  42. package/dist/lib/browser/{settings-B6MMHLPS.mjs → settings-TRLI52I5.mjs} +5 -5
  43. package/dist/lib/browser/{settings-B6MMHLPS.mjs.map → settings-TRLI52I5.mjs.map} +1 -1
  44. package/dist/lib/browser/{spaces-ready-QVABOCO3.mjs → spaces-ready-OHGCWZHQ.mjs} +22 -15
  45. package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs.map +7 -0
  46. package/dist/lib/browser/{state-2RGW7FQG.mjs → state-C7N6EDDZ.mjs} +7 -7
  47. package/dist/lib/browser/state-C7N6EDDZ.mjs.map +7 -0
  48. package/dist/lib/browser/types/index.mjs +10 -4
  49. package/dist/lib/node-esm/{CollectionMain-ZJIFCWKZ.mjs → CollectionArticle-KHXYT3SH.mjs} +10 -10
  50. package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +7 -0
  51. package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs +142 -0
  52. package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs.map +7 -0
  53. package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs +145 -0
  54. package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs.map +7 -0
  55. package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs +117 -0
  56. package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs.map +7 -0
  57. package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs +518 -0
  58. package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs.map +7 -0
  59. package/dist/lib/node-esm/{app-graph-serializer-M45TH5LR.mjs → app-graph-serializer-2NLWWFUB.mjs} +19 -19
  60. package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-Q6AAQLQG.mjs → chunk-7EV4SN47.mjs} +34 -5
  62. package/dist/lib/node-esm/chunk-7EV4SN47.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-HYIZVPOA.mjs → chunk-AX3UGL5D.mjs} +69 -62
  64. package/dist/lib/node-esm/chunk-AX3UGL5D.mjs.map +7 -0
  65. package/dist/lib/node-esm/chunk-BDEFTL6K.mjs +18 -0
  66. package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +7 -0
  67. package/dist/lib/node-esm/chunk-H4JILUJK.mjs +20 -0
  68. package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +7 -0
  69. package/dist/lib/node-esm/{chunk-AUQ3SKL2.mjs → chunk-I6FZP42D.mjs} +210 -142
  70. package/dist/lib/node-esm/chunk-I6FZP42D.mjs.map +7 -0
  71. package/dist/lib/node-esm/{chunk-ZCEH2VYE.mjs → chunk-JAMGJUFU.mjs} +641 -500
  72. package/dist/lib/node-esm/chunk-JAMGJUFU.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-WWGV5FJM.mjs +21 -0
  74. package/dist/lib/node-esm/chunk-WWGV5FJM.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-X34VDVMY.mjs +393 -0
  76. package/dist/lib/node-esm/chunk-X34VDVMY.mjs.map +7 -0
  77. package/dist/lib/node-esm/{identity-created-AL7NNCKH.mjs → identity-created-OXLKCJE3.mjs} +5 -5
  78. package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +7 -0
  79. package/dist/lib/node-esm/index.mjs +88 -131
  80. package/dist/lib/node-esm/index.mjs.map +3 -3
  81. package/dist/lib/node-esm/{intent-resolver-UVO4MKWX.mjs → intent-resolver-4PHJWDXW.mjs} +105 -100
  82. package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs.map +7 -0
  83. package/dist/lib/node-esm/meta.json +1 -1
  84. package/dist/lib/node-esm/{react-root-5EKYI66P.mjs → react-root-O5I5CDJ7.mjs} +13 -12
  85. package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs.map +7 -0
  86. package/dist/lib/node-esm/{react-surface-IOC6YSVQ.mjs → react-surface-J3XDMU2D.mjs} +91 -111
  87. package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs.map +7 -0
  88. package/dist/lib/node-esm/repair-EHZS6MFY.mjs +45 -0
  89. package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +7 -0
  90. package/dist/lib/node-esm/{settings-IOFU6EAS.mjs → settings-MNQTKHL7.mjs} +5 -5
  91. package/dist/lib/node-esm/{settings-IOFU6EAS.mjs.map → settings-MNQTKHL7.mjs.map} +1 -1
  92. package/dist/lib/node-esm/{spaces-ready-MS6GHPFR.mjs → spaces-ready-ZPU24DA2.mjs} +22 -15
  93. package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs.map +7 -0
  94. package/dist/lib/node-esm/{state-7VBVBGNS.mjs → state-45TXZQJ6.mjs} +7 -7
  95. package/dist/lib/node-esm/state-45TXZQJ6.mjs.map +7 -0
  96. package/dist/lib/node-esm/types/index.mjs +10 -4
  97. package/dist/types/src/SpacePlugin.d.ts +1 -1
  98. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  100. package/dist/types/src/capabilities/capabilities.d.ts +13 -7
  101. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  102. package/dist/types/src/capabilities/index.d.ts +1 -1
  103. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  104. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  105. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  106. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/repair.d.ts +4 -0
  108. package/dist/types/src/capabilities/repair.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
  110. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  111. package/dist/types/src/components/CollectionArticle.d.ts +6 -0
  112. package/dist/types/src/components/CollectionArticle.d.ts.map +1 -0
  113. package/dist/types/src/components/CollectionSection.d.ts +3 -4
  114. package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
  115. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +1 -1
  116. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  117. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +218 -215
  118. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
  119. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +16 -9
  120. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  121. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts +1 -1
  122. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  123. package/dist/types/src/components/{JoinDialog.d.ts → JoinDialog/JoinDialog.d.ts} +1 -1
  124. package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -0
  125. package/dist/types/src/components/JoinDialog/index.d.ts +2 -0
  126. package/dist/types/src/components/JoinDialog/index.d.ts.map +1 -0
  127. package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -0
  128. package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +1591 -0
  129. package/dist/types/src/components/{MembersContainer.stories.d.ts.map → MembersContainer/MembersContainer.stories.d.ts.map} +1 -1
  130. package/dist/types/src/components/MembersContainer/index.d.ts +2 -0
  131. package/dist/types/src/components/MembersContainer/index.d.ts.map +1 -0
  132. package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +9 -0
  133. package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +1 -0
  134. package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts +10 -0
  135. package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +1 -0
  136. package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +3 -0
  137. package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +1 -0
  138. package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +7 -0
  139. package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -0
  140. package/dist/types/src/components/ObjectRenamePopover/index.d.ts +2 -0
  141. package/dist/types/src/components/ObjectRenamePopover/index.d.ts.map +1 -0
  142. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
  143. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts +2 -2
  144. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
  145. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.stories.d.ts +1424 -0
  146. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.stories.d.ts.map +1 -0
  147. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts +3 -3
  148. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -1
  149. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
  150. package/dist/types/src/components/ObjectSettings/index.d.ts +2 -1
  151. package/dist/types/src/components/ObjectSettings/index.d.ts.map +1 -1
  152. package/dist/types/src/components/RecordArticle.d.ts +5 -0
  153. package/dist/types/src/components/RecordArticle.d.ts.map +1 -0
  154. package/dist/types/src/components/{MembersContainer.stories.d.ts → RecordArticle.stories.d.ts} +219 -216
  155. package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -0
  156. package/dist/types/src/components/SchemaContainer.d.ts +2 -2
  157. package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
  158. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  159. package/dist/types/src/components/{SpacePresence.d.ts → SpacePresence/SpacePresence.d.ts} +6 -5
  160. package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -0
  161. package/dist/types/src/components/{SpacePresence.stories.d.ts → SpacePresence/SpacePresence.stories.d.ts} +220 -217
  162. package/dist/types/src/components/{SpacePresence.stories.d.ts.map → SpacePresence/SpacePresence.stories.d.ts.map} +1 -1
  163. package/dist/types/src/components/SpacePresence/index.d.ts +2 -0
  164. package/dist/types/src/components/SpacePresence/index.d.ts.map +1 -0
  165. package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts +7 -0
  166. package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -0
  167. package/dist/types/src/components/SpaceRenamePopover/index.d.ts +2 -0
  168. package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +1 -0
  169. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  170. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +218 -215
  171. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
  172. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  173. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +219 -216
  174. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
  175. package/dist/types/src/components/ViewEditor.d.ts +3 -4
  176. package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
  177. package/dist/types/src/components/index.d.ts +10 -17
  178. package/dist/types/src/components/index.d.ts.map +1 -1
  179. package/dist/types/src/events.d.ts.map +1 -1
  180. package/dist/types/src/helpers/index.d.ts +2 -0
  181. package/dist/types/src/helpers/index.d.ts.map +1 -0
  182. package/dist/types/src/helpers/query.d.ts +8 -0
  183. package/dist/types/src/helpers/query.d.ts.map +1 -0
  184. package/dist/types/src/helpers/query.test.d.ts +2 -0
  185. package/dist/types/src/helpers/query.test.d.ts.map +1 -0
  186. package/dist/types/src/hooks/index.d.ts +1 -0
  187. package/dist/types/src/hooks/index.d.ts.map +1 -1
  188. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
  189. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +1 -1
  190. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
  191. package/dist/types/src/hooks/usePath.d.ts +1 -1
  192. package/dist/types/src/hooks/usePath.d.ts.map +1 -1
  193. package/dist/types/src/hooks/useTypeOptions.d.ts +10 -0
  194. package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -0
  195. package/dist/types/src/index.d.ts +1 -0
  196. package/dist/types/src/index.d.ts.map +1 -1
  197. package/dist/types/src/meta.d.ts +0 -1
  198. package/dist/types/src/meta.d.ts.map +1 -1
  199. package/dist/types/src/translations.d.ts +1261 -67
  200. package/dist/types/src/translations.d.ts.map +1 -1
  201. package/dist/types/src/types/form.d.ts +24 -0
  202. package/dist/types/src/types/form.d.ts.map +1 -0
  203. package/dist/types/src/types/index.d.ts +1 -0
  204. package/dist/types/src/types/index.d.ts.map +1 -1
  205. package/dist/types/src/types/types.d.ts +82 -142
  206. package/dist/types/src/types/types.d.ts.map +1 -1
  207. package/dist/types/src/util.d.ts +21 -34
  208. package/dist/types/src/util.d.ts.map +1 -1
  209. package/dist/types/tsconfig.tsbuildinfo +1 -1
  210. package/package.json +68 -59
  211. package/src/SpacePlugin.ts +181 -215
  212. package/src/capabilities/app-graph-builder.ts +205 -267
  213. package/src/capabilities/app-graph-serializer.ts +12 -12
  214. package/src/capabilities/capabilities.ts +26 -16
  215. package/src/capabilities/identity-created.ts +2 -2
  216. package/src/capabilities/index.ts +1 -1
  217. package/src/capabilities/intent-resolver.ts +78 -75
  218. package/src/capabilities/react-root.tsx +4 -3
  219. package/src/capabilities/react-surface.tsx +95 -145
  220. package/src/capabilities/repair.ts +57 -0
  221. package/src/capabilities/spaces-ready.ts +15 -6
  222. package/src/capabilities/state.ts +2 -2
  223. package/src/components/AwaitingObject.tsx +12 -14
  224. package/src/components/{CollectionMain.tsx → CollectionArticle.tsx} +7 -6
  225. package/src/components/CollectionSection.tsx +8 -6
  226. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +11 -11
  227. package/src/components/CreateDialog/CreateObjectDialog.tsx +63 -43
  228. package/src/components/CreateDialog/CreateObjectPanel.tsx +38 -31
  229. package/src/components/CreateDialog/CreateSpaceDialog.tsx +30 -11
  230. package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +26 -10
  231. package/src/components/JoinDialog/index.ts +5 -0
  232. package/src/components/{MembersContainer.stories.tsx → MembersContainer/MembersContainer.stories.tsx} +7 -6
  233. package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +16 -14
  234. package/src/components/MembersContainer/index.ts +5 -0
  235. package/src/components/MenuFooter.tsx +2 -2
  236. package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +51 -0
  237. package/src/components/ObjectDetailsPanel/ObjectForm.tsx +72 -0
  238. package/src/components/ObjectDetailsPanel/index.ts +7 -0
  239. package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx} +6 -6
  240. package/src/components/ObjectRenamePopover/index.ts +5 -0
  241. package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +6 -7
  242. package/src/components/ObjectSettings/BaseObjectSettings.stories.tsx +63 -0
  243. package/src/components/ObjectSettings/BaseObjectSettings.tsx +90 -26
  244. package/src/components/ObjectSettings/ForeignKeys.tsx +8 -8
  245. package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -3
  246. package/src/components/ObjectSettings/index.ts +3 -1
  247. package/src/components/RecordArticle.stories.tsx +115 -0
  248. package/src/components/RecordArticle.tsx +114 -0
  249. package/src/components/SchemaContainer.tsx +24 -27
  250. package/src/components/SpacePluginSettings.tsx +10 -4
  251. package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +23 -25
  252. package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +16 -11
  253. package/src/components/SpacePresence/index.ts +5 -0
  254. package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +7 -6
  255. package/src/components/SpaceRenamePopover/index.ts +5 -0
  256. package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +9 -4
  257. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +63 -23
  258. package/src/components/SyncStatus/InlineSyncStatus.tsx +8 -8
  259. package/src/components/SyncStatus/SyncStatus.stories.tsx +4 -5
  260. package/src/components/SyncStatus/SyncStatus.tsx +107 -11
  261. package/src/components/ViewEditor.tsx +57 -23
  262. package/src/components/index.ts +7 -8
  263. package/src/events.ts +6 -6
  264. package/src/helpers/index.ts +5 -0
  265. package/src/helpers/query.test.ts +24 -0
  266. package/src/helpers/query.ts +158 -0
  267. package/src/hooks/index.ts +1 -0
  268. package/src/hooks/useActiveSpace.ts +2 -1
  269. package/src/hooks/useInputSurfaceLookup.tsx +8 -3
  270. package/src/hooks/usePath.ts +1 -1
  271. package/src/hooks/useTypeOptions.ts +27 -0
  272. package/src/index.ts +1 -0
  273. package/src/meta.ts +6 -3
  274. package/src/translations.ts +68 -58
  275. package/src/types/form.ts +75 -0
  276. package/src/types/index.ts +1 -0
  277. package/src/types/types.ts +44 -50
  278. package/src/util.tsx +216 -143
  279. package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +0 -7
  280. package/dist/lib/browser/ObjectDetailsPanel-SY6FYTYC.mjs +0 -88
  281. package/dist/lib/browser/ObjectDetailsPanel-SY6FYTYC.mjs.map +0 -7
  282. package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +0 -68
  283. package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +0 -7
  284. package/dist/lib/browser/app-graph-builder-FLF7XMQO.mjs +0 -516
  285. package/dist/lib/browser/app-graph-builder-FLF7XMQO.mjs.map +0 -7
  286. package/dist/lib/browser/app-graph-serializer-3A6KBYWT.mjs.map +0 -7
  287. package/dist/lib/browser/chunk-CBYL62HG.mjs +0 -19
  288. package/dist/lib/browser/chunk-CBYL62HG.mjs.map +0 -7
  289. package/dist/lib/browser/chunk-DCY3W36E.mjs.map +0 -7
  290. package/dist/lib/browser/chunk-ELJDGQTO.mjs.map +0 -7
  291. package/dist/lib/browser/chunk-FBCGT5YY.mjs +0 -13
  292. package/dist/lib/browser/chunk-FBCGT5YY.mjs.map +0 -7
  293. package/dist/lib/browser/chunk-J6YZG77T.mjs.map +0 -7
  294. package/dist/lib/browser/chunk-RQVV4XVF.mjs +0 -343
  295. package/dist/lib/browser/chunk-RQVV4XVF.mjs.map +0 -7
  296. package/dist/lib/browser/chunk-TUQZO5P4.mjs +0 -20
  297. package/dist/lib/browser/chunk-TUQZO5P4.mjs.map +0 -7
  298. package/dist/lib/browser/chunk-WAXS2ZVX.mjs.map +0 -7
  299. package/dist/lib/browser/identity-created-T6ZNVE7S.mjs.map +0 -7
  300. package/dist/lib/browser/intent-resolver-7E3IZIJS.mjs.map +0 -7
  301. package/dist/lib/browser/react-root-RWMT2RCK.mjs +0 -29
  302. package/dist/lib/browser/react-root-RWMT2RCK.mjs.map +0 -7
  303. package/dist/lib/browser/react-surface-GL4CE2F4.mjs.map +0 -7
  304. package/dist/lib/browser/schema-defs-YDPFZELA.mjs +0 -26
  305. package/dist/lib/browser/schema-defs-YDPFZELA.mjs.map +0 -7
  306. package/dist/lib/browser/spaces-ready-QVABOCO3.mjs.map +0 -7
  307. package/dist/lib/browser/state-2RGW7FQG.mjs.map +0 -7
  308. package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs.map +0 -7
  309. package/dist/lib/node-esm/ObjectDetailsPanel-3MYLTMXN.mjs +0 -89
  310. package/dist/lib/node-esm/ObjectDetailsPanel-3MYLTMXN.mjs.map +0 -7
  311. package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +0 -70
  312. package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +0 -7
  313. package/dist/lib/node-esm/app-graph-builder-D5YPOJS5.mjs +0 -517
  314. package/dist/lib/node-esm/app-graph-builder-D5YPOJS5.mjs.map +0 -7
  315. package/dist/lib/node-esm/app-graph-serializer-M45TH5LR.mjs.map +0 -7
  316. package/dist/lib/node-esm/chunk-AUQ3SKL2.mjs.map +0 -7
  317. package/dist/lib/node-esm/chunk-FJZNSJC4.mjs +0 -20
  318. package/dist/lib/node-esm/chunk-FJZNSJC4.mjs.map +0 -7
  319. package/dist/lib/node-esm/chunk-HC677WUJ.mjs +0 -21
  320. package/dist/lib/node-esm/chunk-HC677WUJ.mjs.map +0 -7
  321. package/dist/lib/node-esm/chunk-HWNG4MEU.mjs +0 -15
  322. package/dist/lib/node-esm/chunk-HWNG4MEU.mjs.map +0 -7
  323. package/dist/lib/node-esm/chunk-HYIZVPOA.mjs.map +0 -7
  324. package/dist/lib/node-esm/chunk-Q6AAQLQG.mjs.map +0 -7
  325. package/dist/lib/node-esm/chunk-WKQTO37U.mjs +0 -344
  326. package/dist/lib/node-esm/chunk-WKQTO37U.mjs.map +0 -7
  327. package/dist/lib/node-esm/chunk-ZCEH2VYE.mjs.map +0 -7
  328. package/dist/lib/node-esm/identity-created-AL7NNCKH.mjs.map +0 -7
  329. package/dist/lib/node-esm/intent-resolver-UVO4MKWX.mjs.map +0 -7
  330. package/dist/lib/node-esm/react-root-5EKYI66P.mjs.map +0 -7
  331. package/dist/lib/node-esm/react-surface-IOC6YSVQ.mjs.map +0 -7
  332. package/dist/lib/node-esm/schema-defs-OYBCWKAS.mjs +0 -27
  333. package/dist/lib/node-esm/schema-defs-OYBCWKAS.mjs.map +0 -7
  334. package/dist/lib/node-esm/spaces-ready-MS6GHPFR.mjs.map +0 -7
  335. package/dist/lib/node-esm/state-7VBVBGNS.mjs.map +0 -7
  336. package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
  337. package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
  338. package/dist/types/src/components/CollectionMain.d.ts +0 -7
  339. package/dist/types/src/components/CollectionMain.d.ts.map +0 -1
  340. package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
  341. package/dist/types/src/components/MembersContainer.d.ts.map +0 -1
  342. package/dist/types/src/components/ObjectDetailsPanel.d.ts +0 -9
  343. package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +0 -1
  344. package/dist/types/src/components/PersistenceStatus.d.ts +0 -6
  345. package/dist/types/src/components/PersistenceStatus.d.ts.map +0 -1
  346. package/dist/types/src/components/PopoverRenameObject.d.ts +0 -7
  347. package/dist/types/src/components/PopoverRenameObject.d.ts.map +0 -1
  348. package/dist/types/src/components/PopoverRenameSpace.d.ts +0 -7
  349. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +0 -1
  350. package/dist/types/src/components/RecordMain.d.ts +0 -7
  351. package/dist/types/src/components/RecordMain.d.ts.map +0 -1
  352. package/dist/types/src/components/SpacePresence.d.ts.map +0 -1
  353. package/src/capabilities/schema-defs.ts +0 -31
  354. package/src/components/ObjectDetailsPanel.tsx +0 -77
  355. package/src/components/PersistenceStatus.tsx +0 -83
  356. package/src/components/RecordMain.tsx +0 -43
  357. /package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +0 -0
@@ -1,41 +1,43 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  useInputSurfaceLookup,
4
- usePath
5
- } from "./chunk-Q6AAQLQG.mjs";
4
+ usePath,
5
+ useTypeOptions
6
+ } from "./chunk-7EV4SN47.mjs";
6
7
  import {
7
8
  SpaceCapabilities
8
- } from "./chunk-HC677WUJ.mjs";
9
+ } from "./chunk-WWGV5FJM.mjs";
9
10
  import {
10
11
  COMPOSER_SPACE_LOCK,
11
12
  getSpaceDisplayName
12
- } from "./chunk-AUQ3SKL2.mjs";
13
+ } from "./chunk-I6FZP42D.mjs";
13
14
  import {
14
15
  SpaceAction,
15
16
  SpaceForm
16
- } from "./chunk-WKQTO37U.mjs";
17
+ } from "./chunk-X34VDVMY.mjs";
17
18
  import {
18
- SPACE_PLUGIN,
19
19
  meta
20
- } from "./chunk-HWNG4MEU.mjs";
20
+ } from "./chunk-BDEFTL6K.mjs";
21
21
 
22
22
  // src/components/AwaitingObject.tsx
23
23
  import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
24
24
  import React, { useCallback, useEffect, useState } from "react";
25
- import { LayoutAction, createIntent, useIntentDispatcher, useLayout } from "@dxos/app-framework";
25
+ import { LayoutAction, createIntent } from "@dxos/app-framework";
26
+ import { useIntentDispatcher, useLayout } from "@dxos/app-framework/react";
27
+ import { Obj } from "@dxos/echo";
26
28
  import { useClient } from "@dxos/react-client";
27
- import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
29
+ import { Filter, useQuery } from "@dxos/react-client/echo";
28
30
  import { Button, Icon, Toast, useTranslation } from "@dxos/react-ui";
29
- var WAIT_FOR_OBJECT_TIMEOUT = 18e4;
30
- var TOAST_TIMEOUT = 24e4;
31
+ var WAIT_FOR_OBJECT_TIMEOUT = 3 * 60 * 1e3;
32
+ var TOAST_TIMEOUT = 4 * 60 * 1e3;
31
33
  var AwaitingObject = ({ id }) => {
32
34
  var _effect = _useSignals();
33
35
  try {
36
+ const { t } = useTranslation(meta.id);
37
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
34
38
  const [open, setOpen] = useState(true);
35
39
  const [waiting, setWaiting] = useState(true);
36
40
  const [found, setFound] = useState(false);
37
- const { t } = useTranslation(SPACE_PLUGIN);
38
- const { dispatchPromise: dispatch } = useIntentDispatcher();
39
41
  const layout = useLayout();
40
42
  const client = useClient();
41
43
  const objects = useQuery(client.spaces, Filter.everything());
@@ -43,15 +45,13 @@ var AwaitingObject = ({ id }) => {
43
45
  if (!id) {
44
46
  return;
45
47
  }
46
- const timeout = setTimeout(() => {
47
- setWaiting(false);
48
- }, WAIT_FOR_OBJECT_TIMEOUT);
49
- () => clearTimeout(timeout);
48
+ const timeout = setTimeout(() => setWaiting(false), WAIT_FOR_OBJECT_TIMEOUT);
49
+ return () => clearTimeout(timeout);
50
50
  }, [
51
51
  id
52
52
  ]);
53
53
  useEffect(() => {
54
- if (objects.findIndex((object) => fullyQualifiedId(object) === id) > -1) {
54
+ if (objects.findIndex((object) => Obj.getDXN(object).toString() === id) > -1) {
55
55
  setFound(true);
56
56
  if (layout.active.includes(id)) {
57
57
  setOpen(false);
@@ -122,55 +122,44 @@ var AwaitingObject = ({ id }) => {
122
122
 
123
123
  // src/components/CreateDialog/CreateObjectDialog.tsx
124
124
  import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
125
- import { Effect, pipe } from "effect";
126
- import React3, { useCallback as useCallback3, useRef, useState as useState2 } from "react";
127
- import { Capabilities, LayoutAction as LayoutAction2, chain, createIntent as createIntent2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework";
128
- import { Obj, Query, Type as Type2 } from "@dxos/echo";
125
+ import * as Effect from "effect/Effect";
126
+ import * as Function2 from "effect/Function";
127
+ import * as Option2 from "effect/Option";
128
+ import React3, { useCallback as useCallback3, useMemo, useRef, useState as useState2 } from "react";
129
+ import { Capabilities, LayoutAction as LayoutAction2, chain, createIntent as createIntent2 } from "@dxos/app-framework";
130
+ import { useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework/react";
131
+ import { Obj as Obj2, Type } from "@dxos/echo";
132
+ import { EntityKind, SystemTypeAnnotation, getTypeAnnotation as getTypeAnnotation2 } from "@dxos/echo/internal";
129
133
  import { invariant } from "@dxos/invariant";
130
134
  import { useClient as useClient2 } from "@dxos/react-client";
131
- import { getSpace, isLiveObject, isSpace, useQuery as useQuery2, useSpaces } from "@dxos/react-client/echo";
132
- import { Button as Button2, Dialog, Icon as Icon3, useTranslation as useTranslation3 } from "@dxos/react-ui";
135
+ import { getSpace, isLiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
136
+ import { Dialog, IconButton, useTranslation as useTranslation3 } from "@dxos/react-ui";
133
137
  import { cardDialogContent, cardDialogHeader } from "@dxos/react-ui-stack";
134
- import { DataType } from "@dxos/schema";
135
- import { isNonNullable as isNonNullable2 } from "@dxos/util";
136
-
137
- // src/capabilities/index.ts
138
- import { lazy } from "@dxos/app-framework";
139
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-D5YPOJS5.mjs"));
140
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-M45TH5LR.mjs"));
141
- var IdentityCreated = lazy(() => import("./identity-created-AL7NNCKH.mjs"));
142
- var IntentResolver = lazy(() => import("./intent-resolver-UVO4MKWX.mjs"));
143
- var ReactRoot = lazy(() => import("./react-root-5EKYI66P.mjs"));
144
- var ReactSurface = lazy(() => import("./react-surface-IOC6YSVQ.mjs"));
145
- var SchemaDefs = lazy(() => import("./schema-defs-OYBCWKAS.mjs"));
146
- var SpaceSettings = lazy(() => import("./settings-IOFU6EAS.mjs"));
147
- var SpaceState = lazy(() => import("./state-7VBVBGNS.mjs"));
148
- var SpacesReady = lazy(() => import("./spaces-ready-MS6GHPFR.mjs"));
149
138
 
150
139
  // src/components/CreateDialog/CreateObjectPanel.tsx
151
140
  import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
152
- import { Option } from "effect";
141
+ import * as Option from "effect/Option";
153
142
  import React2, { useCallback as useCallback2 } from "react";
154
- import { Type } from "@dxos/echo";
155
- import { ViewAnnotation, getTypeAnnotation } from "@dxos/echo-schema";
143
+ import { getTypeAnnotation } from "@dxos/echo/internal";
156
144
  import { Icon as Icon2, toLocalizedString, useDefaultValue, useTranslation as useTranslation2 } from "@dxos/react-ui";
157
145
  import { Form } from "@dxos/react-ui-form";
158
146
  import { SearchList } from "@dxos/react-ui-searchlist";
159
147
  import { cardDialogOverflow, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
148
+ import { ViewAnnotation } from "@dxos/schema";
160
149
  import { isNonNullable } from "@dxos/util";
161
- var CreateObjectPanel = ({ forms, spaces, typename, target, views, initialFormValues: _initialFormValues, defaultSpaceId, resolve, onTargetChange, onTypenameChange, onCreateObject }) => {
150
+ var CreateObjectPanel = ({ schemas, spaces, typename, target, views, initialFormValues: _initialFormValues, defaultSpaceId, resolve, onTargetChange, onTypenameChange, onCreateObject }) => {
162
151
  var _effect = _useSignals2();
163
152
  try {
164
- const { t } = useTranslation2(SPACE_PLUGIN);
153
+ const { t } = useTranslation2(meta.id);
165
154
  const initialFormValues = useDefaultValue(_initialFormValues, () => ({}));
166
- const form = forms.find((form2) => Type.getTypename(form2.objectSchema) === typename);
167
- const options = forms.filter((form2) => {
155
+ const metadata = typename && resolve?.(typename);
156
+ const options = schemas.filter((schema) => {
168
157
  if (views == null) {
169
158
  return true;
170
159
  } else {
171
- return views === ViewAnnotation.get(form2.objectSchema).pipe(Option.getOrElse(() => false));
160
+ return views === ViewAnnotation.get(schema).pipe(Option.getOrElse(() => false));
172
161
  }
173
- }).map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
162
+ }).map((schema) => getTypeAnnotation(schema)).filter(isNonNullable).sort((a, b) => {
174
163
  const nameA = t("typename label", {
175
164
  ns: a.typename,
176
165
  defaultValue: a.typename
@@ -182,34 +171,34 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, views, initialFormVa
182
171
  return nameA.localeCompare(nameB);
183
172
  });
184
173
  const handleCreateObject = useCallback2(async (props) => {
185
- if (!form) {
174
+ if (!metadata) {
186
175
  return;
187
176
  }
188
177
  await onCreateObject?.({
189
- form,
178
+ metadata,
190
179
  data: props
191
180
  });
192
181
  }, [
193
182
  onCreateObject,
194
- form
183
+ metadata
195
184
  ]);
196
185
  const handleSetTypename = useCallback2(async (typename2) => {
197
- const form2 = forms.find((form3) => getTypeAnnotation(form3.objectSchema)?.typename === typename2);
198
- if (form2 && !form2.formSchema) {
186
+ const metadata2 = resolve?.(typename2);
187
+ if (metadata2 && !metadata2.inputSchema) {
199
188
  await onCreateObject?.({
200
- form: form2
189
+ metadata: metadata2
201
190
  });
202
191
  } else {
203
192
  onTypenameChange?.(typename2);
204
193
  }
205
194
  }, [
206
- forms,
195
+ resolve,
207
196
  onCreateObject
208
197
  ]);
209
198
  const inputSurfaceLookup = useInputSurfaceLookup({
210
199
  target
211
200
  });
212
- return !form ? /* @__PURE__ */ React2.createElement(SelectSchema, {
201
+ return !metadata ? /* @__PURE__ */ React2.createElement(SelectSchema, {
213
202
  options,
214
203
  resolve,
215
204
  onChange: handleSetTypename
@@ -217,13 +206,13 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, views, initialFormVa
217
206
  spaces,
218
207
  defaultSpaceId,
219
208
  onChange: onTargetChange
220
- }) : form.formSchema ? /* @__PURE__ */ React2.createElement("div", {
209
+ }) : metadata.inputSchema ? /* @__PURE__ */ React2.createElement("div", {
221
210
  role: "none",
222
211
  className: cardDialogOverflow
223
212
  }, /* @__PURE__ */ React2.createElement(Form, {
224
213
  autoFocus: true,
225
214
  values: initialFormValues,
226
- schema: form.formSchema,
215
+ schema: metadata.inputSchema,
227
216
  testId: "create-object-form",
228
217
  onSave: handleCreateObject,
229
218
  lookupComponent: inputSurfaceLookup,
@@ -236,7 +225,7 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, views, initialFormVa
236
225
  var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
237
226
  var _effect = _useSignals2();
238
227
  try {
239
- const { t } = useTranslation2(SPACE_PLUGIN);
228
+ const { t } = useTranslation2(meta.id);
240
229
  return /* @__PURE__ */ React2.createElement(SearchList.Root, {
241
230
  label: t("space input label"),
242
231
  classNames: cardDialogSearchListRoot
@@ -276,7 +265,7 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
276
265
  var SelectSchema = ({ options, resolve, onChange }) => {
277
266
  var _effect = _useSignals2();
278
267
  try {
279
- const { t } = useTranslation2(SPACE_PLUGIN);
268
+ const { t } = useTranslation2(meta.id);
280
269
  return /* @__PURE__ */ React2.createElement(SearchList.Root, {
281
270
  label: t("schema input label"),
282
271
  classNames: cardDialogSearchListRoot
@@ -297,7 +286,7 @@ var SelectSchema = ({ options, resolve, onChange }) => {
297
286
  }, /* @__PURE__ */ React2.createElement("span", {
298
287
  className: "flex gap-2 items-center grow truncate"
299
288
  }, /* @__PURE__ */ React2.createElement(Icon2, {
300
- icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
289
+ icon: resolve?.(option.typename)?.icon ?? "ph--placeholder--regular",
301
290
  size: 5
302
291
  }), t("typename label", {
303
292
  ns: option.typename,
@@ -310,26 +299,34 @@ var SelectSchema = ({ options, resolve, onChange }) => {
310
299
 
311
300
  // src/components/CreateDialog/CreateObjectDialog.tsx
312
301
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
313
- var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
302
+ var CREATE_OBJECT_DIALOG = `${meta.id}/CreateObjectDialog`;
314
303
  var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, views, initialFormValues, onCreateObject, shouldNavigate: _shouldNavigate }) => {
315
304
  var _effect = _useSignals3();
316
305
  try {
317
- const closeRef = useRef(null);
318
306
  const manager = usePluginManager();
319
- const { t } = useTranslation3(SPACE_PLUGIN);
320
- const client = useClient2();
321
- const spaces = useSpaces();
307
+ const { t } = useTranslation3(meta.id);
322
308
  const { dispatch } = useIntentDispatcher2();
323
- const forms = useCapabilities(SpaceCapabilities.ObjectForm);
324
309
  const [target, setTarget] = useState2(initialTarget);
325
310
  const [typename, setTypename] = useState2(initialTypename);
326
- const space = isSpace(target) ? target : getSpace(target);
327
- const queryCollections = useQuery2(space, Query.type(DataType.QueryCollection));
328
- const hiddenTypenames = queryCollections.map((collection) => collection.query.typename).filter(isNonNullable2);
329
- const resolve = useCallback3((typename2) => manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
311
+ const client = useClient2();
312
+ const spaces = useSpaces();
313
+ const closeRef = useRef(null);
314
+ const resolve = useCallback3((typename2) => {
315
+ const metadata = manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata;
316
+ return metadata?.createObjectIntent ? metadata : void 0;
317
+ }, [
330
318
  manager
331
319
  ]);
332
- const handleCreateObject = useCallback3(({ form, data = {} }) => Effect.gen(function* () {
320
+ const space = isSpace(target) ? target : getSpace(target);
321
+ const schemas = space?.db.schemaRegistry.query({
322
+ location: [
323
+ "runtime"
324
+ ]
325
+ }).runSync();
326
+ const userSchemas = useMemo(() => schemas?.filter((schema) => getTypeAnnotation2(schema)?.kind !== EntityKind.Relation).filter((schema) => !!resolve(Type.getTypename(schema))).filter((schema) => !SystemTypeAnnotation.get(schema).pipe(Option2.getOrElse(() => false))) ?? [], [
327
+ schemas
328
+ ]);
329
+ const handleCreateObject = useCallback3(({ metadata, data = {} }) => Effect.gen(function* () {
333
330
  if (!target) {
334
331
  return;
335
332
  }
@@ -337,18 +334,18 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
337
334
  const space2 = isSpace(target) ? target : getSpace(target);
338
335
  invariant(space2, "Missing space", {
339
336
  F: __dxlog_file,
340
- L: 81,
337
+ L: 87,
341
338
  S: this,
342
339
  A: [
343
340
  "space",
344
341
  "'Missing space'"
345
342
  ]
346
343
  });
347
- const { object } = yield* dispatch(form.getIntent(data, {
344
+ const { object } = yield* dispatch(metadata.createObjectIntent(data, {
348
345
  space: space2
349
346
  }));
350
- if (isLiveObject(object) && !Obj.instanceOf(DataType.StoredSchema, object)) {
351
- const hidden = form.hidden || hiddenTypenames.includes(Type2.getTypename(form.objectSchema));
347
+ if (isLiveObject(object) && !Obj2.instanceOf(Type.PersistentType, object)) {
348
+ const hidden = !metadata.addToCollectionOnCreate;
352
349
  const addObjectIntent = createIntent2(SpaceAction.AddObject, {
353
350
  target,
354
351
  object,
@@ -356,7 +353,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
356
353
  });
357
354
  const shouldNavigate = _shouldNavigate ?? (() => true);
358
355
  if (shouldNavigate(object)) {
359
- yield* dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
356
+ yield* dispatch(Function2.pipe(addObjectIntent, chain(LayoutAction2.Open, {
360
357
  part: "main"
361
358
  })));
362
359
  } else {
@@ -368,7 +365,6 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
368
365
  dispatch,
369
366
  target,
370
367
  resolve,
371
- hiddenTypenames,
372
368
  _shouldNavigate
373
369
  ]);
374
370
  return (
@@ -382,20 +378,21 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
382
378
  }, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("create object dialog title", {
383
379
  object: t("typename label", {
384
380
  ns: typename,
385
- defaultValue: views ? "View" : "Item"
381
+ defaultValue: views ? "View" : "Object"
386
382
  })
387
383
  })), /* @__PURE__ */ React3.createElement(Dialog.Close, {
388
384
  asChild: true
389
- }, /* @__PURE__ */ React3.createElement(Button2, {
385
+ }, /* @__PURE__ */ React3.createElement(IconButton, {
390
386
  ref: closeRef,
387
+ icon: "ph--x--regular",
388
+ size: 4,
389
+ label: "Close",
390
+ iconOnly: true,
391
391
  density: "fine",
392
392
  variant: "ghost",
393
393
  autoFocus: true
394
- }, /* @__PURE__ */ React3.createElement(Icon3, {
395
- icon: "ph--x--regular",
396
- size: 4
397
- })))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
398
- forms,
394
+ }))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
395
+ schemas: userSchemas,
399
396
  spaces,
400
397
  target,
401
398
  views,
@@ -415,13 +412,14 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
415
412
 
416
413
  // src/components/CreateDialog/CreateSpaceDialog.tsx
417
414
  import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
418
- import { Effect as Effect2 } from "effect";
415
+ import * as Effect2 from "effect/Effect";
419
416
  import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
420
- import { LayoutAction as LayoutAction3, createIntent as createIntent3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
421
- import { Button as Button3, Dialog as Dialog2, Icon as Icon4, useTranslation as useTranslation4 } from "@dxos/react-ui";
417
+ import { LayoutAction as LayoutAction3, createIntent as createIntent3 } from "@dxos/app-framework";
418
+ import { useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework/react";
419
+ import { Dialog as Dialog2, IconButton as IconButton2, useTranslation as useTranslation4 } from "@dxos/react-ui";
422
420
  import { Form as Form2 } from "@dxos/react-ui-form";
423
421
  import { cardDialogContent as cardDialogContent2, cardDialogHeader as cardDialogHeader2 } from "@dxos/react-ui-stack";
424
- var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
422
+ var CREATE_SPACE_DIALOG = `${meta.id}/CreateSpaceDialog`;
425
423
  var initialValues = {
426
424
  edgeReplication: true
427
425
  };
@@ -429,7 +427,7 @@ var CreateSpaceDialog = () => {
429
427
  var _effect = _useSignals4();
430
428
  try {
431
429
  const closeRef = useRef2(null);
432
- const { t } = useTranslation4(SPACE_PLUGIN);
430
+ const { t } = useTranslation4(meta.id);
433
431
  const { dispatch } = useIntentDispatcher3();
434
432
  const inputSurfaceLookup = useInputSurfaceLookup();
435
433
  const handleCreateSpace = useCallback4(async (data) => {
@@ -460,15 +458,16 @@ var CreateSpaceDialog = () => {
460
458
  className: cardDialogHeader2
461
459
  }, /* @__PURE__ */ React4.createElement(Dialog2.Title, null, t("create space dialog title")), /* @__PURE__ */ React4.createElement(Dialog2.Close, {
462
460
  asChild: true
463
- }, /* @__PURE__ */ React4.createElement(Button3, {
461
+ }, /* @__PURE__ */ React4.createElement(IconButton2, {
464
462
  ref: closeRef,
463
+ icon: "ph--x--regular",
464
+ size: 4,
465
+ label: "Close",
466
+ iconOnly: true,
465
467
  density: "fine",
466
468
  variant: "ghost",
467
469
  autoFocus: true
468
- }, /* @__PURE__ */ React4.createElement(Icon4, {
469
- icon: "ph--x--regular",
470
- size: 4
471
- })))), /* @__PURE__ */ React4.createElement("div", {
470
+ }))), /* @__PURE__ */ React4.createElement("div", {
472
471
  role: "none",
473
472
  className: "contents"
474
473
  }, /* @__PURE__ */ React4.createElement(Form2, {
@@ -490,37 +489,39 @@ var CreateSpaceDialog = () => {
490
489
  import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
491
490
  import React5 from "react";
492
491
  import { useTranslation as useTranslation5 } from "@dxos/react-ui";
493
- var CollectionSection = ({ collection }) => {
492
+ var CollectionSection = ({ role, subject }) => {
494
493
  var _effect = _useSignals5();
495
494
  try {
496
- const { t } = useTranslation5(SPACE_PLUGIN);
495
+ const { t } = useTranslation5(meta.id);
497
496
  return /* @__PURE__ */ React5.createElement("div", {
497
+ role,
498
498
  className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
499
499
  }, /* @__PURE__ */ React5.createElement("span", {
500
500
  className: "truncate"
501
- }, collection.name ?? t("unnamed collection label")));
501
+ }, subject.name ?? t("unnamed collection label")));
502
502
  } finally {
503
503
  _effect.f();
504
504
  }
505
505
  };
506
506
 
507
- // src/components/JoinDialog.tsx
507
+ // src/components/JoinDialog/JoinDialog.tsx
508
508
  import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
509
509
  import React6, { useCallback as useCallback5 } from "react";
510
- import { LayoutAction as LayoutAction4, createIntent as createIntent4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
510
+ import { LayoutAction as LayoutAction4, createIntent as createIntent4 } from "@dxos/app-framework";
511
+ import { useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework/react";
511
512
  import { Trigger } from "@dxos/async";
512
513
  import { ObservabilityAction } from "@dxos/plugin-observability/types";
513
514
  import { useClient as useClient3 } from "@dxos/react-client";
514
515
  import { Dialog as Dialog3, useTranslation as useTranslation6 } from "@dxos/react-ui";
515
516
  import { JoinPanel } from "@dxos/shell/react";
516
- var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
517
+ var JOIN_DIALOG = `${meta.id}/JoinDialog`;
517
518
  var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
518
519
  var _effect = _useSignals6();
519
520
  try {
520
521
  const { dispatchPromise: dispatch } = useIntentDispatcher4();
521
522
  const client = useClient3();
522
523
  const { graph } = useAppGraph();
523
- const { t } = useTranslation6(SPACE_PLUGIN);
524
+ const { t } = useTranslation6(meta.id);
524
525
  const handleDone = useCallback5(async (result) => {
525
526
  const spaceKey = result?.spaceKey;
526
527
  if (!spaceKey) {
@@ -530,18 +531,18 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
530
531
  dispatch(createIntent4(LayoutAction4.AddToast, {
531
532
  part: "toast",
532
533
  subject: {
533
- id: `${SPACE_PLUGIN}/join-success`,
534
+ id: `${meta.id}/join-success`,
534
535
  duration: 5e3,
535
536
  title: [
536
537
  "join success label",
537
538
  {
538
- ns: SPACE_PLUGIN
539
+ ns: meta.id
539
540
  }
540
541
  ],
541
542
  closeLabel: [
542
543
  "dismiss label",
543
544
  {
544
- ns: SPACE_PLUGIN
545
+ ns: meta.id
545
546
  }
546
547
  ]
547
548
  }
@@ -620,22 +621,24 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
620
621
  }
621
622
  };
622
623
 
623
- // src/components/MembersContainer.tsx
624
+ // src/components/MembersContainer/MembersContainer.tsx
624
625
  import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
625
- import React7, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
626
+ import React7, { useCallback as useCallback6, useMemo as useMemo2, useState as useState3 } from "react";
626
627
  import { QR } from "react-qr-rounded";
627
- import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
628
+ import { createIntent as createIntent5 } from "@dxos/app-framework";
629
+ import { useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework/react";
630
+ import { Obj as Obj3 } from "@dxos/echo";
628
631
  import { log } from "@dxos/log";
629
632
  import { useConfig } from "@dxos/react-client";
630
- import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
633
+ import { useSpaceInvitations } from "@dxos/react-client/echo";
631
634
  import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
632
- import { Button as Button4, Clipboard, Icon as Icon5, Input, useId, useTranslation as useTranslation7 } from "@dxos/react-ui";
635
+ import { Button as Button2, Clipboard, Icon as Icon3, Input, useId, useTranslation as useTranslation7 } from "@dxos/react-ui";
633
636
  import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
634
637
  import { StackItem } from "@dxos/react-ui-stack";
635
- import { DataType as DataType2 } from "@dxos/schema";
638
+ import { Collection } from "@dxos/schema";
636
639
  import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport } from "@dxos/shell/react";
637
640
  import { hexToEmoji } from "@dxos/util";
638
- var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer.tsx";
641
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer/MembersContainer.tsx";
639
642
  var activeActionKey = "dxos:react-shell/space-manager/active-action";
640
643
  var handleInvitationEvent = (invitation, subscription) => {
641
644
  const invitationCode = InvitationEncoder.encode(invitation);
@@ -645,7 +648,7 @@ var handleInvitationEvent = (invitation, subscription) => {
645
648
  authCode: invitation.authCode
646
649
  }), void 0, {
647
650
  F: __dxlog_file2,
648
- L: 39,
651
+ L: 41,
649
652
  S: void 0,
650
653
  C: (f, a) => f(...a)
651
654
  });
@@ -655,7 +658,7 @@ var handleInvitationEvent = (invitation, subscription) => {
655
658
  var MembersContainer = ({ space, createInvitationUrl }) => {
656
659
  var _effect = _useSignals7();
657
660
  try {
658
- const { t } = useTranslation7(SPACE_PLUGIN);
661
+ const { t } = useTranslation7(meta.id);
659
662
  const config = useConfig();
660
663
  const { dispatchPromise: dispatch } = useIntentDispatcher5();
661
664
  const invitations = useSpaceInvitations(space.key);
@@ -667,7 +670,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
667
670
  setInternalActiveAction(nextAction);
668
671
  localStorage.setItem(activeActionKey, nextAction);
669
672
  };
670
- const target = space.properties[DataType2.Collection.typename]?.target?.objects[0]?.target;
673
+ const target = space.properties[Collection.Collection.typename]?.target?.objects[0]?.target;
671
674
  const locked = space.properties[COMPOSER_SPACE_LOCK];
672
675
  const handleChangeLocked = useCallback6(() => {
673
676
  space.properties[COMPOSER_SPACE_LOCK] = !locked;
@@ -675,7 +678,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
675
678
  locked,
676
679
  space
677
680
  ]);
678
- const inviteActions = useMemo(() => ({
681
+ const inviteActions = useMemo2(() => ({
679
682
  inviteOne: {
680
683
  label: t("invite one label", {
681
684
  ns: "os"
@@ -683,10 +686,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
683
686
  description: t("invite one description", {
684
687
  ns: "os"
685
688
  }),
686
- icon: () => /* @__PURE__ */ React7.createElement(Icon5, {
687
- icon: "ph--user-plus--regular",
688
- size: 5
689
- }),
689
+ icon: "ph--user-plus--regular",
690
690
  testId: "membersContainer.inviteOne",
691
691
  onClick: async () => {
692
692
  const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
@@ -694,7 +694,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
694
694
  type: Invitation.Type.INTERACTIVE,
695
695
  authMethod: Invitation.AuthMethod.SHARED_SECRET,
696
696
  multiUse: false,
697
- target: target && fullyQualifiedId2(target)
697
+ target: target && Obj3.getDXN(target).toString()
698
698
  }));
699
699
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
700
700
  const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
@@ -708,10 +708,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
708
708
  description: t("invite many description", {
709
709
  ns: "os"
710
710
  }),
711
- icon: () => /* @__PURE__ */ React7.createElement(Icon5, {
712
- icon: "ph--users-three--regular",
713
- size: 5
714
- }),
711
+ icon: "ph--users-three--regular",
715
712
  testId: "membersContainer.inviteMany",
716
713
  onClick: async () => {
717
714
  const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
@@ -719,7 +716,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
719
716
  type: Invitation.Type.DELEGATED,
720
717
  authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
721
718
  multiUse: true,
722
- target: target && fullyQualifiedId2(target)
719
+ target: target && Obj3.getDXN(target).toString()
723
720
  }));
724
721
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
725
722
  const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
@@ -739,7 +736,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
739
736
  setSelectedInvitation(null);
740
737
  };
741
738
  return /* @__PURE__ */ React7.createElement(Clipboard.Provider, null, /* @__PURE__ */ React7.createElement(StackItem.Content, {
742
- classNames: "block overflow-y-auto"
739
+ scrollable: true
743
740
  }, /* @__PURE__ */ React7.createElement(ControlPage, null, /* @__PURE__ */ React7.createElement(ControlSection, {
744
741
  title: t("members verbose label"),
745
742
  description: t("members description")
@@ -822,7 +819,7 @@ var InvitationQR = ({ id, url, onCancel }) => {
822
819
  return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
823
820
  className: "text-description"
824
821
  }, t("qr code description", {
825
- ns: SPACE_PLUGIN
822
+ ns: meta.id
826
823
  })), /* @__PURE__ */ React7.createElement("div", {
827
824
  role: "group",
828
825
  className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
@@ -843,7 +840,7 @@ var InvitationQR = ({ id, url, onCancel }) => {
843
840
  className: "sr-only"
844
841
  }, t("qr label")), /* @__PURE__ */ React7.createElement(Clipboard.Button, {
845
842
  value: url ?? "never"
846
- })), /* @__PURE__ */ React7.createElement(Button4, {
843
+ })), /* @__PURE__ */ React7.createElement(Button2, {
847
844
  variant: "ghost",
848
845
  onClick: onCancel
849
846
  }, t("cancel label")));
@@ -867,7 +864,7 @@ var InvitationAuthCode = ({ id, code, onCancel }) => {
867
864
  code,
868
865
  large: true,
869
866
  classNames: "mli-auto mlb-2 text-center grow"
870
- }), /* @__PURE__ */ React7.createElement(Button4, {
867
+ }), /* @__PURE__ */ React7.createElement(Button2, {
871
868
  variant: "ghost",
872
869
  onClick: onCancel
873
870
  }, t("cancel label")));
@@ -878,11 +875,11 @@ var InvitationAuthCode = ({ id, code, onCancel }) => {
878
875
  var InvitationComplete = ({ statusValue }) => {
879
876
  var _effect = _useSignals7();
880
877
  try {
881
- return statusValue > 0 ? /* @__PURE__ */ React7.createElement(Icon5, {
878
+ return statusValue > 0 ? /* @__PURE__ */ React7.createElement(Icon3, {
882
879
  icon: "ph--check--regular",
883
880
  size: 6,
884
881
  classNames: "m-1.5"
885
- }) : /* @__PURE__ */ React7.createElement(Icon5, {
882
+ }) : /* @__PURE__ */ React7.createElement(Icon3, {
886
883
  icon: "ph--x--regular",
887
884
  size: 6,
888
885
  classNames: "m-1.5"
@@ -897,11 +894,11 @@ import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking"
897
894
  import React8 from "react";
898
895
  import { getSpace as getSpace2 } from "@dxos/client/echo";
899
896
  import { useClient as useClient4 } from "@dxos/react-client";
900
- import { DropdownMenu, Icon as Icon6, toLocalizedString as toLocalizedString2, useTranslation as useTranslation8 } from "@dxos/react-ui";
897
+ import { DropdownMenu, Icon as Icon4, toLocalizedString as toLocalizedString2, useTranslation as useTranslation8 } from "@dxos/react-ui";
901
898
  var MenuFooter = ({ object }) => {
902
899
  var _effect = _useSignals8();
903
900
  try {
904
- const { t } = useTranslation8(SPACE_PLUGIN);
901
+ const { t } = useTranslation8(meta.id);
905
902
  const client = useClient4();
906
903
  const space = getSpace2(object);
907
904
  const spaceName = space ? getSpaceDisplayName(space, {
@@ -913,7 +910,7 @@ var MenuFooter = ({ object }) => {
913
910
  className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
914
911
  }, t("location label")), /* @__PURE__ */ React8.createElement("dd", {
915
912
  className: "line-clamp-3"
916
- }, /* @__PURE__ */ React8.createElement(Icon6, {
913
+ }, /* @__PURE__ */ React8.createElement(Icon4, {
917
914
  icon: "ph--planet--regular",
918
915
  classNames: "inline-block mie-1"
919
916
  }), toLocalizedString2(spaceName, t)))) : null;
@@ -922,153 +919,26 @@ var MenuFooter = ({ object }) => {
922
919
  }
923
920
  };
924
921
 
925
- // src/components/ObjectSettings/ObjectSettingsContainer.tsx
926
- import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
927
- import React10, { useMemo as useMemo2 } from "react";
928
- import { Surface } from "@dxos/app-framework";
929
- import { Clipboard as Clipboard2 } from "@dxos/react-ui";
930
- import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
931
-
932
- // src/components/ObjectSettings/BaseObjectSettings.tsx
922
+ // src/components/ObjectRenamePopover/ObjectRenamePopover.tsx
933
923
  import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
934
- import React9, { useRef as useRef3 } from "react";
935
- import { Input as Input2, useTranslation as useTranslation9 } from "@dxos/react-ui";
936
- var BaseObjectSettings = ({ classNames, children, object }) => {
924
+ import React9, { useCallback as useCallback7, useRef as useRef3, useState as useState4 } from "react";
925
+ import { LayoutAction as LayoutAction5, createIntent as createIntent6 } from "@dxos/app-framework";
926
+ import { useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework/react";
927
+ import { Obj as Obj4 } from "@dxos/echo";
928
+ import { log as log2 } from "@dxos/log";
929
+ import { Button as Button3, Input as Input2, useTranslation as useTranslation9 } from "@dxos/react-ui";
930
+ var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx";
931
+ var OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
932
+ var ObjectRenamePopover = ({ object }) => {
937
933
  var _effect = _useSignals9();
938
934
  try {
939
935
  const { t } = useTranslation9(meta.id);
940
- const inputRef = useRef3(null);
941
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Input2.Root, null, /* @__PURE__ */ React9.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React9.createElement(Input2.TextInput, {
942
- ref: inputRef,
943
- placeholder: t("name placeholder"),
944
- // TODO(burdon): Use annotation to get the name field.
945
- value: object.name ?? "",
946
- onChange: (event) => {
947
- object.name = event.target.value;
948
- },
949
- onKeyDown: (event) => {
950
- if (event.key === "Enter") {
951
- inputRef.current?.blur();
952
- }
953
- }
954
- })), children);
955
- } finally {
956
- _effect.f();
957
- }
958
- };
959
-
960
- // src/components/ObjectSettings/ObjectSettingsContainer.tsx
961
- var ObjectSettingsContainer = ({ object, role }) => {
962
- var _effect = _useSignals10();
963
- try {
964
- const data = useMemo2(() => ({
965
- subject: object
966
- }), [
967
- object
968
- ]);
969
- return /* @__PURE__ */ React10.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React10.createElement(StackItem2.Content, {
970
- toolbar: false
971
- }, /* @__PURE__ */ React10.createElement("div", {
972
- role: "none",
973
- className: "overflow-y-auto pli-cardSpacingInline plb-cardSpacingBlock"
974
- }, /* @__PURE__ */ React10.createElement(BaseObjectSettings, {
975
- object
976
- }, /* @__PURE__ */ React10.createElement(Surface, {
977
- role: "base-object-settings",
978
- data
979
- })), /* @__PURE__ */ React10.createElement(Surface, {
980
- role: "object-settings",
981
- data
982
- }))));
983
- } finally {
984
- _effect.f();
985
- }
986
- };
987
-
988
- // src/components/PersistenceStatus.tsx
989
- import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
990
- import React11, { useEffect as useEffect2, useState as useState4 } from "react";
991
- import { debounce } from "@dxos/async";
992
- import { Icon as Icon7, Tooltip, useTranslation as useTranslation10 } from "@dxos/react-ui";
993
- import { mx, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
994
- var PersistenceStatus = ({ db }) => {
995
- var _effect = _useSignals11();
996
- try {
997
- const { t } = useTranslation10(SPACE_PLUGIN);
998
- const [displayMessage, setDisplayMessage] = useState4(false);
999
- const [status, naturalSetStatus] = useState4(0);
1000
- const [prevStatus, setPrevStatus] = useState4(0);
1001
- const _setStatus = debounce(naturalSetStatus, 500);
1002
- useEffect2(() => {
1003
- setPrevStatus(status);
1004
- if (prevStatus !== status && status === 0) {
1005
- setDisplayMessage(true);
1006
- const timeout = setTimeout(() => setDisplayMessage(false), 5e3);
1007
- return () => clearTimeout(timeout);
1008
- }
1009
- }, [
1010
- status
1011
- ]);
1012
- switch (status) {
1013
- case 2:
1014
- return /* @__PURE__ */ React11.createElement("div", {
1015
- className: "flex items-center"
1016
- }, /* @__PURE__ */ React11.createElement(Icon7, {
1017
- icon: "ph--warning--regular",
1018
- size: 4,
1019
- classNames: "me-1"
1020
- }), /* @__PURE__ */ React11.createElement("span", {
1021
- className: mx("text-sm", warningText)
1022
- }, t("persistence error label")));
1023
- case 1:
1024
- return /* @__PURE__ */ React11.createElement("div", {
1025
- className: "flex items-center"
1026
- }, /* @__PURE__ */ React11.createElement(Icon7, {
1027
- icon: "ph--arrows-counter-clockwise--regular",
1028
- size: 4,
1029
- classNames: "me-1"
1030
- }), /* @__PURE__ */ React11.createElement("span", {
1031
- className: mx("text-sm", staticPlaceholderText)
1032
- }, t("persistence pending label")));
1033
- case 0:
1034
- default:
1035
- return /* @__PURE__ */ React11.createElement(Tooltip.Trigger, {
1036
- delayDuration: 400,
1037
- role: "status",
1038
- content: t("persisted locally message"),
1039
- className: "flex items-center"
1040
- }, /* @__PURE__ */ React11.createElement(Icon7, {
1041
- icon: "ph--check-circle--regular",
1042
- size: 4,
1043
- classNames: "me-1"
1044
- }), displayMessage && /* @__PURE__ */ React11.createElement("span", {
1045
- className: mx("text-sm", staticPlaceholderText)
1046
- }, t("persisted locally label")));
1047
- }
1048
- } finally {
1049
- _effect.f();
1050
- }
1051
- };
1052
-
1053
- // src/components/PopoverRenameObject.tsx
1054
- import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
1055
- import React12, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
1056
- import { LayoutAction as LayoutAction5, createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1057
- import { Obj as Obj2 } from "@dxos/echo";
1058
- import { log as log2 } from "@dxos/log";
1059
- import { Button as Button5, Input as Input3, useTranslation as useTranslation11 } from "@dxos/react-ui";
1060
- var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
1061
- var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
1062
- var PopoverRenameObject = ({ object }) => {
1063
- var _effect = _useSignals12();
1064
- try {
1065
- const { t } = useTranslation11(SPACE_PLUGIN);
1066
- const doneButton = useRef4(null);
1067
- const [name, setName] = useState5(Obj2.getLabel(object));
936
+ const doneButton = useRef3(null);
937
+ const [name, setName] = useState4(Obj4.getLabel(object));
1068
938
  const { dispatchPromise: dispatch } = useIntentDispatcher6();
1069
939
  const handleDone = useCallback7(() => {
1070
940
  try {
1071
- name && Obj2.setLabel(object, name);
941
+ name && Obj4.setLabel(object, name);
1072
942
  } catch (err) {
1073
943
  log2.error("Failed to rename object", {
1074
944
  err
@@ -1091,21 +961,21 @@ var PopoverRenameObject = ({ object }) => {
1091
961
  object,
1092
962
  name
1093
963
  ]);
1094
- return /* @__PURE__ */ React12.createElement("div", {
964
+ return /* @__PURE__ */ React9.createElement("div", {
1095
965
  role: "none",
1096
966
  className: "p-2 flex gap-2"
1097
- }, /* @__PURE__ */ React12.createElement("div", {
967
+ }, /* @__PURE__ */ React9.createElement("div", {
1098
968
  role: "none",
1099
969
  className: "flex-1"
1100
- }, /* @__PURE__ */ React12.createElement(Input3.Root, null, /* @__PURE__ */ React12.createElement(Input3.Label, {
970
+ }, /* @__PURE__ */ React9.createElement(Input2.Root, null, /* @__PURE__ */ React9.createElement(Input2.Label, {
1101
971
  srOnly: true
1102
- }, t("object name label")), /* @__PURE__ */ React12.createElement(Input3.TextInput, {
972
+ }, t("object name label")), /* @__PURE__ */ React9.createElement(Input2.TextInput, {
1103
973
  placeholder: t("object placeholder"),
1104
974
  value: name,
1105
975
  "data-testid": "spacePlugin.renameObject.input",
1106
- onChange: ({ target: { value } }) => setName(value),
976
+ onChange: ({ target: { value: value2 } }) => setName(value2),
1107
977
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1108
- }))), /* @__PURE__ */ React12.createElement(Button5, {
978
+ }))), /* @__PURE__ */ React9.createElement(Button3, {
1109
979
  ref: doneButton,
1110
980
  classNames: "self-stretch",
1111
981
  onClick: handleDone
@@ -1117,18 +987,19 @@ var PopoverRenameObject = ({ object }) => {
1117
987
  }
1118
988
  };
1119
989
 
1120
- // src/components/PopoverRenameSpace.tsx
1121
- import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
1122
- import React13, { useCallback as useCallback8, useRef as useRef5, useState as useState6 } from "react";
1123
- import { LayoutAction as LayoutAction6, createIntent as createIntent7, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
1124
- import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation12 } from "@dxos/react-ui";
1125
- var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1126
- var PopoverRenameSpace = ({ space }) => {
1127
- var _effect = _useSignals13();
990
+ // src/components/SpaceRenamePopover/SpaceRenamePopover.tsx
991
+ import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
992
+ import React10, { useCallback as useCallback8, useRef as useRef4, useState as useState5 } from "react";
993
+ import { LayoutAction as LayoutAction6, createIntent as createIntent7 } from "@dxos/app-framework";
994
+ import { useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework/react";
995
+ import { Button as Button4, Input as Input3, Popover, useTranslation as useTranslation10 } from "@dxos/react-ui";
996
+ var SPACE_RENAME_POPOVER = `${meta.id}/SpaceRenamePopover`;
997
+ var SpaceRenamePopover = ({ space }) => {
998
+ var _effect = _useSignals10();
1128
999
  try {
1129
- const { t } = useTranslation12(SPACE_PLUGIN);
1130
- const doneButton = useRef5(null);
1131
- const [name, setName] = useState6(space.properties.name ?? "");
1000
+ const { t } = useTranslation10(meta.id);
1001
+ const doneButton = useRef4(null);
1002
+ const [name, setName] = useState5(space.properties.name ?? "");
1132
1003
  const { dispatchPromise: dispatch } = useIntentDispatcher7();
1133
1004
  const handleDone = useCallback8(() => {
1134
1005
  space.properties.name = name;
@@ -1144,24 +1015,24 @@ var PopoverRenameSpace = ({ space }) => {
1144
1015
  space,
1145
1016
  name
1146
1017
  ]);
1147
- return /* @__PURE__ */ React13.createElement("div", {
1018
+ return /* @__PURE__ */ React10.createElement("div", {
1148
1019
  role: "none",
1149
1020
  className: "p-2 flex gap-2"
1150
- }, /* @__PURE__ */ React13.createElement("div", {
1021
+ }, /* @__PURE__ */ React10.createElement("div", {
1151
1022
  role: "none",
1152
1023
  className: "flex-1"
1153
- }, /* @__PURE__ */ React13.createElement(Input4.Root, null, /* @__PURE__ */ React13.createElement(Input4.Label, {
1024
+ }, /* @__PURE__ */ React10.createElement(Input3.Root, null, /* @__PURE__ */ React10.createElement(Input3.Label, {
1154
1025
  srOnly: true
1155
- }, t("space name label")), /* @__PURE__ */ React13.createElement(Input4.TextInput, {
1026
+ }, t("space name label")), /* @__PURE__ */ React10.createElement(Input3.TextInput, {
1156
1027
  defaultValue: space.properties.name ?? "",
1157
1028
  placeholder: t("unnamed space label"),
1158
- onChange: ({ target: { value } }) => setName(value),
1029
+ onChange: ({ target: { value: value2 } }) => setName(value2),
1159
1030
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
1160
1031
  // Currently this is not possible because Radix does not expose the popover context.
1161
1032
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1162
- }))), /* @__PURE__ */ React13.createElement(Popover.Close, {
1033
+ }))), /* @__PURE__ */ React10.createElement(Popover.Close, {
1163
1034
  asChild: true
1164
- }, /* @__PURE__ */ React13.createElement(Button6, {
1035
+ }, /* @__PURE__ */ React10.createElement(Button4, {
1165
1036
  ref: doneButton,
1166
1037
  classNames: "self-stretch",
1167
1038
  onClick: handleDone
@@ -1174,73 +1045,90 @@ var PopoverRenameSpace = ({ space }) => {
1174
1045
  };
1175
1046
 
1176
1047
  // src/components/SchemaContainer.tsx
1177
- import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
1178
- import React14, { useEffect as useEffect3, useState as useState7 } from "react";
1179
- import { useTranslation as useTranslation13 } from "@dxos/react-ui";
1048
+ import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
1049
+ import React11, { useEffect as useEffect2, useState as useState6 } from "react";
1050
+ import { useTranslation as useTranslation11 } from "@dxos/react-ui";
1180
1051
  import { ControlPage as ControlPage2, ControlSection as ControlSection2, controlItemClasses } from "@dxos/react-ui-form";
1181
- import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
1182
- var useQuerySpaceSchemas = (space) => {
1183
- const [schemas, setSchemas] = useState7([]);
1184
- useEffect3(() => {
1185
- const query = space.db.schemaRegistry.query();
1186
- const initialResults = query.runSync();
1187
- setSchemas(initialResults);
1188
- const unsubscribe = query.subscribe(() => setSchemas(query.results));
1189
- return () => unsubscribe();
1190
- }, [
1191
- space
1192
- ]);
1193
- return schemas;
1194
- };
1052
+ import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
1195
1053
  var SchemaContainer = ({ space }) => {
1196
- var _effect = _useSignals14();
1054
+ var _effect = _useSignals11();
1197
1055
  try {
1198
- const { t } = useTranslation13(SPACE_PLUGIN);
1056
+ const { t } = useTranslation11(meta.id);
1199
1057
  const schemas = useQuerySpaceSchemas(space);
1200
- return /* @__PURE__ */ React14.createElement(StackItem3.Content, {
1201
- classNames: "block overflow-y-auto"
1202
- }, /* @__PURE__ */ React14.createElement(ControlPage2, null, /* @__PURE__ */ React14.createElement(ControlSection2, {
1058
+ return /* @__PURE__ */ React11.createElement(StackItem2.Content, {
1059
+ scrollable: true
1060
+ }, /* @__PURE__ */ React11.createElement(ControlPage2, null, /* @__PURE__ */ React11.createElement(ControlSection2, {
1203
1061
  title: t("schema verbose label"),
1204
1062
  description: t("schema description")
1205
- }, /* @__PURE__ */ React14.createElement("div", {
1063
+ }, /* @__PURE__ */ React11.createElement("div", {
1206
1064
  role: "none",
1207
1065
  className: controlItemClasses
1208
- }, schemas.length === 0 && /* @__PURE__ */ React14.createElement("div", {
1066
+ }, schemas.length === 0 && /* @__PURE__ */ React11.createElement("div", {
1209
1067
  className: "text-center plb-4"
1210
- }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React14.createElement("div", {
1068
+ }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React11.createElement("div", {
1069
+ role: "none",
1211
1070
  key: schema.id
1212
- }, /* @__PURE__ */ React14.createElement("div", null, schema.typename)))))));
1071
+ }, schema.typename))))));
1213
1072
  } finally {
1214
1073
  _effect.f();
1215
1074
  }
1216
1075
  };
1076
+ var useQuerySpaceSchemas = (space) => {
1077
+ const [schemas, setSchemas] = useState6([]);
1078
+ useEffect2(() => {
1079
+ const query = space.db.schemaRegistry.query();
1080
+ const initialResults = query.runSync();
1081
+ setSchemas(initialResults);
1082
+ const unsubscribe = query.subscribe(() => setSchemas(query.results));
1083
+ return () => unsubscribe();
1084
+ }, [
1085
+ space
1086
+ ]);
1087
+ return schemas;
1088
+ };
1217
1089
 
1218
- // src/components/SpacePresence.tsx
1219
- import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
1220
- import { Option as Option2 } from "effect";
1221
- import React15, { forwardRef, useCallback as useCallback9, useEffect as useEffect4, useState as useState8 } from "react";
1222
- import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
1090
+ // src/components/SpacePresence/SpacePresence.tsx
1091
+ import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
1092
+ import * as Option3 from "effect/Option";
1093
+ import React12, { forwardRef, useCallback as useCallback9, useEffect as useEffect3, useState as useState7 } from "react";
1094
+ import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework/react";
1223
1095
  import { generateName } from "@dxos/display-name";
1096
+ import { Obj as Obj5 } from "@dxos/echo";
1224
1097
  import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
1225
- import { fullyQualifiedId as fullyQualifiedId3, getSpace as getSpace3, useMembers } from "@dxos/react-client/echo";
1098
+ import { getSpace as getSpace3, useMembers } from "@dxos/react-client/echo";
1226
1099
  import { useIdentity } from "@dxos/react-client/halo";
1227
- import { Avatar, List, ListItem, Popover as Popover2, Tooltip as Tooltip2, useDefaultValue as useDefaultValue2, useTranslation as useTranslation14 } from "@dxos/react-ui";
1100
+ import { Avatar, List, ListItem, Popover as Popover2, Tooltip, useDefaultValue as useDefaultValue2, useTranslation as useTranslation12 } from "@dxos/react-ui";
1228
1101
  import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
1229
1102
  import { ComplexMap, keyToFallback } from "@dxos/util";
1103
+
1104
+ // src/capabilities/index.ts
1105
+ import { lazy } from "@dxos/app-framework";
1106
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-T6VJKIOA.mjs"));
1107
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-2NLWWFUB.mjs"));
1108
+ var IdentityCreated = lazy(() => import("./identity-created-OXLKCJE3.mjs"));
1109
+ var IntentResolver = lazy(() => import("./intent-resolver-4PHJWDXW.mjs"));
1110
+ var ReactRoot = lazy(() => import("./react-root-O5I5CDJ7.mjs"));
1111
+ var ReactSurface = lazy(() => import("./react-surface-J3XDMU2D.mjs"));
1112
+ var Repair = lazy(() => import("./repair-EHZS6MFY.mjs"));
1113
+ var SpaceSettings = lazy(() => import("./settings-MNQTKHL7.mjs"));
1114
+ var SpaceState = lazy(() => import("./state-45TXZQJ6.mjs"));
1115
+ var SpacesReady = lazy(() => import("./spaces-ready-ZPU24DA2.mjs"));
1116
+
1117
+ // src/components/SpacePresence/SpacePresence.tsx
1230
1118
  var REFRESH_INTERVAL = 5e3;
1231
1119
  var ACTIVITY_DURATION = 3e4;
1232
1120
  var noViewers = new ComplexMap(PublicKey.hash);
1233
1121
  var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
1234
1122
  var SpacePresence = ({ object, spaceKey }) => {
1235
- var _effect = _useSignals15();
1123
+ var _effect = _useSignals12();
1236
1124
  try {
1237
1125
  const spaceState = useCapability(SpaceCapabilities.MutableState);
1238
1126
  const client = useClient5();
1239
1127
  const identity = useIdentity();
1240
1128
  const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
1241
1129
  const spaceMembers = useMembers(space?.key);
1242
- const [_moment, setMoment] = useState8(Date.now());
1243
- useEffect4(() => {
1130
+ const [_moment, setMoment] = useState7(Date.now());
1131
+ useEffect3(() => {
1244
1132
  const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
1245
1133
  return () => clearInterval(interval);
1246
1134
  }, []);
@@ -1251,7 +1139,7 @@ var SpacePresence = ({ object, spaceKey }) => {
1251
1139
  if (!identity || !spaceState || !space) {
1252
1140
  return null;
1253
1141
  }
1254
- const currentObjectViewers = spaceState.viewersByObject[fullyQualifiedId3(object)] ?? noViewers;
1142
+ const currentObjectViewers = spaceState.viewersByObject[Obj5.getDXN(object).toString()] ?? noViewers;
1255
1143
  const membersForObject = spaceMembers.filter((member) => memberOnline(member) && memberIsNotSelf(member)).filter((member) => currentObjectViewers.has(member.identity.identityKey)).map((member) => {
1256
1144
  const objectView = currentObjectViewers.get(member.identity.identityKey);
1257
1145
  const lastSeen = objectView?.lastSeen ?? -Infinity;
@@ -1262,7 +1150,7 @@ var SpacePresence = ({ object, spaceKey }) => {
1262
1150
  lastSeen
1263
1151
  };
1264
1152
  }).toSorted((a, b) => a.lastSeen - b.lastSeen);
1265
- return /* @__PURE__ */ React15.createElement(FullPresence, {
1153
+ return /* @__PURE__ */ React12.createElement(FullPresence, {
1266
1154
  members: membersForObject
1267
1155
  });
1268
1156
  } finally {
@@ -1270,46 +1158,46 @@ var SpacePresence = ({ object, spaceKey }) => {
1270
1158
  }
1271
1159
  };
1272
1160
  var FullPresence = (props) => {
1273
- var _effect = _useSignals15();
1161
+ var _effect = _useSignals12();
1274
1162
  try {
1275
1163
  const { size = 9, onMemberClick } = props;
1276
1164
  const members = useDefaultValue2(props.members, () => []);
1277
1165
  if (members.length === 0) {
1278
1166
  return null;
1279
1167
  }
1280
- return /* @__PURE__ */ React15.createElement("div", {
1168
+ return /* @__PURE__ */ React12.createElement("div", {
1281
1169
  className: "dx-avatar-group",
1282
1170
  "data-testid": "spacePlugin.presence"
1283
- }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
1171
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
1284
1172
  key: member.identity.identityKey.toHex(),
1285
1173
  side: "bottom",
1286
1174
  content: getName(member.identity),
1287
1175
  className: "grid focus:outline-none"
1288
- }, /* @__PURE__ */ React15.createElement(PresenceAvatar, {
1176
+ }, /* @__PURE__ */ React12.createElement(PresenceAvatar, {
1289
1177
  identity: member.identity,
1290
1178
  match: member.currentlyAttended,
1291
1179
  index: members.length - i,
1292
1180
  onClick: () => onMemberClick?.(member),
1293
1181
  size
1294
- }))), members.length > 3 && /* @__PURE__ */ React15.createElement(Popover2.Root, null, /* @__PURE__ */ React15.createElement(Popover2.Trigger, {
1182
+ }))), members.length > 3 && /* @__PURE__ */ React12.createElement(Popover2.Root, null, /* @__PURE__ */ React12.createElement(Popover2.Trigger, {
1295
1183
  className: "grid focus:outline-none"
1296
- }, /* @__PURE__ */ React15.createElement(Avatar.Root, null, /* @__PURE__ */ React15.createElement(Avatar.Content, {
1184
+ }, /* @__PURE__ */ React12.createElement(Avatar.Root, null, /* @__PURE__ */ React12.createElement(Avatar.Content, {
1297
1185
  status: "inactive",
1298
1186
  style: {
1299
1187
  zIndex: members.length - 4
1300
1188
  },
1301
1189
  fallback: `+${members.length - 3}`,
1302
1190
  size
1303
- }))), /* @__PURE__ */ React15.createElement(Popover2.Portal, null, /* @__PURE__ */ React15.createElement(Popover2.Content, {
1191
+ }))), /* @__PURE__ */ React12.createElement(Popover2.Portal, null, /* @__PURE__ */ React12.createElement(Popover2.Content, {
1304
1192
  side: "bottom"
1305
- }, /* @__PURE__ */ React15.createElement(Popover2.Arrow, null), /* @__PURE__ */ React15.createElement(Popover2.Viewport, {
1193
+ }, /* @__PURE__ */ React12.createElement(Popover2.Arrow, null), /* @__PURE__ */ React12.createElement(Popover2.Viewport, {
1306
1194
  classNames: "max-bs-56"
1307
- }, /* @__PURE__ */ React15.createElement(List, null, members.map((member) => /* @__PURE__ */ React15.createElement(ListItem.Root, {
1195
+ }, /* @__PURE__ */ React12.createElement(List, null, members.map((member) => /* @__PURE__ */ React12.createElement(ListItem.Root, {
1308
1196
  key: member.identity.identityKey.toHex(),
1309
1197
  classNames: "flex gap-2 items-center cursor-pointer mbe-2",
1310
1198
  onClick: () => onMemberClick?.(member),
1311
1199
  "data-testid": "identity-list-item"
1312
- }, /* @__PURE__ */ React15.createElement(PresenceAvatar, {
1200
+ }, /* @__PURE__ */ React12.createElement(PresenceAvatar, {
1313
1201
  identity: member.identity,
1314
1202
  size,
1315
1203
  showName: true,
@@ -1319,12 +1207,12 @@ var FullPresence = (props) => {
1319
1207
  _effect.f();
1320
1208
  }
1321
1209
  };
1322
- var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
1323
- var _effect = _useSignals15();
1210
+ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match: match2, index, onClick, size }, forwardedRef) => {
1211
+ var _effect = _useSignals12();
1324
1212
  try {
1325
- const status = match ? "current" : "active";
1213
+ const status = match2 ? "current" : "active";
1326
1214
  const fallbackValue = keyToFallback(identity.identityKey);
1327
- return /* @__PURE__ */ React15.createElement(Avatar.Root, null, /* @__PURE__ */ React15.createElement(Avatar.Content, {
1215
+ return /* @__PURE__ */ React12.createElement(Avatar.Root, null, /* @__PURE__ */ React12.createElement(Avatar.Content, {
1328
1216
  status,
1329
1217
  hue: identity.profile?.data?.hue || fallbackValue.hue,
1330
1218
  "data-testid": "spacePlugin.presence.member",
@@ -1338,7 +1226,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
1338
1226
  onClick,
1339
1227
  fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
1340
1228
  ref: forwardedRef
1341
- }), /* @__PURE__ */ React15.createElement(Avatar.Label, {
1229
+ }), /* @__PURE__ */ React12.createElement(Avatar.Label, {
1342
1230
  classNames: showName ? "text-sm truncate pli-2" : "sr-only"
1343
1231
  }, getName(identity)));
1344
1232
  } finally {
@@ -1346,7 +1234,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
1346
1234
  }
1347
1235
  });
1348
1236
  var SmallPresenceLive = ({ id, open, viewers }) => {
1349
- var _effect = _useSignals15();
1237
+ var _effect = _useSignals12();
1350
1238
  try {
1351
1239
  const { hasAttention, isAncestor, isRelated } = useAttention(id);
1352
1240
  const isAttended = hasAttention || isAncestor || isRelated;
@@ -1354,13 +1242,13 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1354
1242
  const attended = useAttended();
1355
1243
  const startOfAttention = attended.at(-1);
1356
1244
  const path = usePath(graph, startOfAttention);
1357
- const containsAttended = !open && !isAttended && id && Option2.isSome(path) ? path.value.includes(id) : false;
1245
+ const containsAttended = !open && !isAttended && id && Option3.isSome(path) ? path.value.includes(id) : false;
1358
1246
  const getActiveViewers = (viewers2) => {
1359
1247
  const moment = Date.now();
1360
1248
  return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
1361
1249
  };
1362
- const [activeViewers, setActiveViewers] = useState8(viewers ? getActiveViewers(viewers) : []);
1363
- useEffect4(() => {
1250
+ const [activeViewers, setActiveViewers] = useState7(viewers ? getActiveViewers(viewers) : []);
1251
+ useEffect3(() => {
1364
1252
  if (viewers) {
1365
1253
  setActiveViewers(getActiveViewers(viewers));
1366
1254
  const interval = setInterval(() => {
@@ -1371,7 +1259,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1371
1259
  }, [
1372
1260
  viewers
1373
1261
  ]);
1374
- return /* @__PURE__ */ React15.createElement(SmallPresence, {
1262
+ return /* @__PURE__ */ React12.createElement(SmallPresence, {
1375
1263
  count: activeViewers.length,
1376
1264
  attended: isAttended,
1377
1265
  containsAttended
@@ -1381,16 +1269,16 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1381
1269
  }
1382
1270
  };
1383
1271
  var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1384
- var _effect = _useSignals15();
1272
+ var _effect = _useSignals12();
1385
1273
  try {
1386
- const { t } = useTranslation14(SPACE_PLUGIN);
1387
- return /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
1274
+ const { t } = useTranslation12(meta.id);
1275
+ return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
1388
1276
  asChild: true,
1389
1277
  content: t("presence label", {
1390
1278
  count
1391
1279
  }),
1392
1280
  side: "bottom"
1393
- }, /* @__PURE__ */ React15.createElement(AttentionGlyph, {
1281
+ }, /* @__PURE__ */ React12.createElement(AttentionGlyph, {
1394
1282
  attended,
1395
1283
  containsAttended,
1396
1284
  presence: count > 1 ? "many" : count === 1 ? "one" : "none",
@@ -1402,43 +1290,44 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1402
1290
  };
1403
1291
 
1404
1292
  // src/components/SpacePluginSettings.tsx
1405
- import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
1406
- import React16 from "react";
1407
- import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
1293
+ import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
1294
+ import React13 from "react";
1295
+ import { createIntent as createIntent8 } from "@dxos/app-framework";
1296
+ import { useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework/react";
1408
1297
  import { useClient as useClient6 } from "@dxos/react-client";
1409
1298
  import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
1410
- import { IconButton, Input as Input5, List as List2, ListItem as ListItem2, toLocalizedString as toLocalizedString3, useTranslation as useTranslation15 } from "@dxos/react-ui";
1299
+ import { IconButton as IconButton3, Input as Input4, List as List2, ListItem as ListItem2, toLocalizedString as toLocalizedString3, useTranslation as useTranslation13 } from "@dxos/react-ui";
1411
1300
  import { ControlGroup, ControlItemInput as ControlItemInput2, ControlPage as ControlPage3, ControlSection as ControlSection3, controlItemClasses as controlItemClasses2 } from "@dxos/react-ui-form";
1412
1301
  var SpacePluginSettings = ({ settings }) => {
1413
- var _effect = _useSignals16();
1302
+ var _effect = _useSignals13();
1414
1303
  try {
1415
- const { t } = useTranslation15(SPACE_PLUGIN);
1304
+ const { t } = useTranslation13(meta.id);
1416
1305
  const client = useClient6();
1417
1306
  const spaces = useSpaces2({
1418
1307
  all: settings.showHidden
1419
1308
  });
1420
1309
  const { dispatchPromise: dispatch } = useIntentDispatcher8();
1421
- return /* @__PURE__ */ React16.createElement(ControlPage3, null, /* @__PURE__ */ React16.createElement(ControlSection3, {
1310
+ return /* @__PURE__ */ React13.createElement(ControlPage3, null, /* @__PURE__ */ React13.createElement(ControlSection3, {
1422
1311
  title: t("space settings label"),
1423
1312
  description: t("space settings description")
1424
- }, /* @__PURE__ */ React16.createElement(ControlGroup, null, /* @__PURE__ */ React16.createElement(ControlItemInput2, {
1313
+ }, /* @__PURE__ */ React13.createElement(ControlGroup, null, /* @__PURE__ */ React13.createElement(ControlItemInput2, {
1425
1314
  title: t("show hidden spaces label")
1426
- }, /* @__PURE__ */ React16.createElement(Input5.Switch, {
1315
+ }, /* @__PURE__ */ React13.createElement(Input4.Switch, {
1427
1316
  checked: settings.showHidden,
1428
1317
  onCheckedChange: (checked) => settings.showHidden = !!checked
1429
- }))), /* @__PURE__ */ React16.createElement(List2, {
1318
+ }))), /* @__PURE__ */ React13.createElement(List2, {
1430
1319
  classNames: [
1431
1320
  controlItemClasses2,
1432
1321
  "flex flex-col gap-trimSm"
1433
1322
  ]
1434
- }, spaces.map((space) => /* @__PURE__ */ React16.createElement(ListItem2.Root, {
1323
+ }, spaces.map((space) => /* @__PURE__ */ React13.createElement(ListItem2.Root, {
1435
1324
  key: space.id,
1436
1325
  classNames: "is-full items-center"
1437
- }, /* @__PURE__ */ React16.createElement(ListItem2.Heading, {
1326
+ }, /* @__PURE__ */ React13.createElement(ListItem2.Heading, {
1438
1327
  classNames: "grow truncate !min-bs-0"
1439
1328
  }, toLocalizedString3(getSpaceDisplayName(space, {
1440
1329
  personal: space === client.spaces.default
1441
- }), t)), /* @__PURE__ */ React16.createElement(IconButton, {
1330
+ }), t)), /* @__PURE__ */ React13.createElement(IconButton3, {
1442
1331
  icon: "ph--faders--regular",
1443
1332
  onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
1444
1333
  space
@@ -1451,38 +1340,40 @@ var SpacePluginSettings = ({ settings }) => {
1451
1340
  };
1452
1341
 
1453
1342
  // src/components/SpaceSettings/SpaceSettingsContainer.tsx
1454
- import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
1455
- import { Schema, pipe as pipe2 } from "effect";
1456
- import React17, { useCallback as useCallback10, useMemo as useMemo3, useState as useState9 } from "react";
1457
- import { LayoutAction as LayoutAction7, chain as chain2, createIntent as createIntent9, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
1343
+ import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
1344
+ import * as Function3 from "effect/Function";
1345
+ import * as Schema from "effect/Schema";
1346
+ import React14, { useCallback as useCallback10, useMemo as useMemo3, useState as useState8 } from "react";
1347
+ import { LayoutAction as LayoutAction7, chain as chain2, createIntent as createIntent9 } from "@dxos/app-framework";
1348
+ import { useCapabilities, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework/react";
1458
1349
  import { log as log3 } from "@dxos/log";
1459
1350
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1460
1351
  import { useClient as useClient7 } from "@dxos/react-client";
1461
1352
  import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
1462
- import { Button as Button7, Input as Input6, useMulticastObservable, useTranslation as useTranslation16 } from "@dxos/react-ui";
1353
+ import { Button as Button5, Input as Input5, useFileDownload, useMulticastObservable, useTranslation as useTranslation14 } from "@dxos/react-ui";
1463
1354
  import { ControlItem, ControlItemInput as ControlItemInput3, ControlPage as ControlPage4, ControlSection as ControlSection4, Form as Form3 } from "@dxos/react-ui-form";
1464
1355
  import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
1465
- import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
1356
+ import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
1466
1357
  var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
1467
1358
  var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
1468
1359
  archived: Schema.Boolean.annotations({
1469
- title: "Archive space"
1360
+ title: "Archive Space"
1470
1361
  })
1471
1362
  })));
1472
1363
  var SpaceSettingsContainer = ({ space }) => {
1473
- var _effect = _useSignals17();
1364
+ var _effect = _useSignals14();
1474
1365
  try {
1475
- const { t } = useTranslation16(SPACE_PLUGIN);
1366
+ const { t } = useTranslation14(meta.id);
1476
1367
  const { dispatchPromise: dispatch } = useIntentDispatcher9();
1477
1368
  const client = useClient7();
1478
1369
  const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
1479
- const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1370
+ const [edgeReplication, setEdgeReplication] = useState8(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
1480
1371
  const toggleEdgeReplication = useCallback10(async (next) => {
1481
1372
  setEdgeReplication(next);
1482
1373
  await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
1483
1374
  log3.catch(err, void 0, {
1484
1375
  F: __dxlog_file4,
1485
- L: 51,
1376
+ L: 58,
1486
1377
  S: void 0,
1487
1378
  C: (f, a) => f(...a)
1488
1379
  });
@@ -1503,7 +1394,7 @@ var SpaceSettingsContainer = ({ space }) => {
1503
1394
  space.properties.hue = properties.hue;
1504
1395
  }
1505
1396
  if (properties.archived && !archived) {
1506
- void dispatch(pipe2(createIntent9(SpaceAction.Close, {
1397
+ void dispatch(Function3.pipe(createIntent9(SpaceAction.Close, {
1507
1398
  space
1508
1399
  }), chain2(LayoutAction7.SwitchWorkspace, {
1509
1400
  part: "workspace",
@@ -1534,14 +1425,14 @@ var SpaceSettingsContainer = ({ space }) => {
1534
1425
  ]);
1535
1426
  const customElements = useMemo3(() => ({
1536
1427
  name: ({ type, label, getValue, onValueChange }) => {
1537
- const handleChange = useCallback10(({ target: { value } }) => onValueChange(type, value), [
1428
+ const handleChange = useCallback10(({ target: { value: value2 } }) => onValueChange(type, value2), [
1538
1429
  onValueChange,
1539
1430
  type
1540
1431
  ]);
1541
- return /* @__PURE__ */ React17.createElement(ControlItemInput3, {
1432
+ return /* @__PURE__ */ React14.createElement(ControlItemInput3, {
1542
1433
  title: label,
1543
1434
  description: t("display name description")
1544
- }, /* @__PURE__ */ React17.createElement(Input6.TextInput, {
1435
+ }, /* @__PURE__ */ React14.createElement(Input5.TextInput, {
1545
1436
  value: getValue(),
1546
1437
  onChange: handleChange,
1547
1438
  placeholder: t("display name input placeholder"),
@@ -1549,23 +1440,22 @@ var SpaceSettingsContainer = ({ space }) => {
1549
1440
  }));
1550
1441
  },
1551
1442
  icon: ({ type, label, getValue, onValueChange }) => {
1552
- const handleChange = useCallback10((nextEmoji) => onValueChange(type, nextEmoji), [
1443
+ const handleChange = useCallback10((icon) => onValueChange(type, icon), [
1553
1444
  onValueChange,
1554
1445
  type
1555
1446
  ]);
1556
- const handleEmojiReset = useCallback10(() => onValueChange(type, void 0), [
1447
+ const handleReset = useCallback10(() => onValueChange(type, void 0), [
1557
1448
  onValueChange,
1558
1449
  type
1559
1450
  ]);
1560
- return /* @__PURE__ */ React17.createElement(ControlItem, {
1451
+ return /* @__PURE__ */ React14.createElement(ControlItem, {
1561
1452
  title: label,
1562
1453
  description: t("icon description")
1563
- }, /* @__PURE__ */ React17.createElement(IconPicker, {
1454
+ }, /* @__PURE__ */ React14.createElement(IconPicker, {
1564
1455
  value: getValue(),
1565
1456
  onChange: handleChange,
1566
- onReset: handleEmojiReset,
1567
- classNames: "justify-self-end",
1568
- iconSize: 5
1457
+ onReset: handleReset,
1458
+ classNames: "justify-self-end"
1569
1459
  }));
1570
1460
  },
1571
1461
  hue: ({ type, label, getValue, onValueChange }) => {
@@ -1573,18 +1463,18 @@ var SpaceSettingsContainer = ({ space }) => {
1573
1463
  onValueChange,
1574
1464
  type
1575
1465
  ]);
1576
- const handleHueReset = useCallback10(() => onValueChange(type, void 0), [
1466
+ const handleReset = useCallback10(() => onValueChange(type, void 0), [
1577
1467
  onValueChange,
1578
1468
  type
1579
1469
  ]);
1580
- return /* @__PURE__ */ React17.createElement(ControlItem, {
1470
+ return /* @__PURE__ */ React14.createElement(ControlItem, {
1581
1471
  title: label,
1582
1472
  description: t("hue description")
1583
- }, /* @__PURE__ */ React17.createElement(HuePicker, {
1473
+ }, /* @__PURE__ */ React14.createElement(HuePicker, {
1584
1474
  value: getValue(),
1585
1475
  onChange: handleChange,
1586
- onReset: handleHueReset,
1587
- classNames: "[--hue-preview-size:1.25rem] justify-self-end"
1476
+ onReset: handleReset,
1477
+ classNames: "justify-self-end"
1588
1478
  }));
1589
1479
  },
1590
1480
  edgeReplication: ({ type, label, getValue, onValueChange }) => {
@@ -1592,10 +1482,10 @@ var SpaceSettingsContainer = ({ space }) => {
1592
1482
  onValueChange,
1593
1483
  type
1594
1484
  ]);
1595
- return /* @__PURE__ */ React17.createElement(ControlItemInput3, {
1485
+ return /* @__PURE__ */ React14.createElement(ControlItemInput3, {
1596
1486
  title: label,
1597
1487
  description: t("edge replication description")
1598
- }, /* @__PURE__ */ React17.createElement(Input6.Switch, {
1488
+ }, /* @__PURE__ */ React14.createElement(Input5.Switch, {
1599
1489
  checked: getValue(),
1600
1490
  onCheckedChange: handleChange,
1601
1491
  classNames: "justify-self-end"
@@ -1607,11 +1497,12 @@ var SpaceSettingsContainer = ({ space }) => {
1607
1497
  type,
1608
1498
  getValue
1609
1499
  ]);
1610
- return /* @__PURE__ */ React17.createElement(ControlItemInput3, {
1500
+ return /* @__PURE__ */ React14.createElement(ControlItemInput3, {
1611
1501
  title: label,
1612
1502
  description: t("archive space description")
1613
- }, /* @__PURE__ */ React17.createElement(Button7, {
1503
+ }, /* @__PURE__ */ React14.createElement(Button5, {
1614
1504
  disabled: space === client.spaces.default,
1505
+ variant: getValue() ? "default" : "destructive",
1615
1506
  onClick: handleChange
1616
1507
  }, getValue() ? t("unarchive space label") : t("archive space label")));
1617
1508
  }
@@ -1619,16 +1510,37 @@ var SpaceSettingsContainer = ({ space }) => {
1619
1510
  t,
1620
1511
  space
1621
1512
  ]);
1622
- return /* @__PURE__ */ React17.createElement(StackItem4.Content, {
1623
- classNames: "block overflow-y-auto"
1624
- }, /* @__PURE__ */ React17.createElement(ControlPage4, null, /* @__PURE__ */ React17.createElement(ControlSection4, {
1513
+ const download = useFileDownload();
1514
+ const handleBackup = useCallback10(async () => {
1515
+ const archive = await space.internal.export();
1516
+ download(new Blob([
1517
+ archive.contents
1518
+ ]), archive.filename);
1519
+ }, [
1520
+ space,
1521
+ download
1522
+ ]);
1523
+ const repairs = useCapabilities(SpaceCapabilities.Repair);
1524
+ const handleRepair = useCallback10(async () => {
1525
+ await Promise.all(repairs.map((repair) => repair({
1526
+ space,
1527
+ isDefault: client.spaces.default === space
1528
+ })));
1529
+ }, [
1530
+ client,
1531
+ space,
1532
+ repairs
1533
+ ]);
1534
+ return /* @__PURE__ */ React14.createElement(StackItem3.Content, {
1535
+ scrollable: true
1536
+ }, /* @__PURE__ */ React14.createElement(ControlPage4, null, /* @__PURE__ */ React14.createElement(ControlSection4, {
1625
1537
  title: t("space properties settings verbose label", {
1626
- ns: SPACE_PLUGIN
1538
+ ns: meta.id
1627
1539
  }),
1628
1540
  description: t("space properties settings description", {
1629
- ns: SPACE_PLUGIN
1541
+ ns: meta.id
1630
1542
  })
1631
- }, /* @__PURE__ */ React17.createElement(Form3, {
1543
+ }, /* @__PURE__ */ React14.createElement(Form3, {
1632
1544
  schema: FormSchema,
1633
1545
  values,
1634
1546
  autoSave: true,
@@ -1636,29 +1548,57 @@ var SpaceSettingsContainer = ({ space }) => {
1636
1548
  Custom: customElements,
1637
1549
  outerSpacing: false,
1638
1550
  classNames: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
1639
- }))));
1551
+ })), /* @__PURE__ */ React14.createElement(ControlSection4, {
1552
+ title: t("space controls title", {
1553
+ ns: meta.id
1554
+ }),
1555
+ description: t("space controls description", {
1556
+ ns: meta.id
1557
+ })
1558
+ }, /* @__PURE__ */ React14.createElement("div", {
1559
+ role: "none",
1560
+ className: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
1561
+ }, /* @__PURE__ */ React14.createElement(ControlItemInput3, {
1562
+ title: t("backup space title", {
1563
+ ns: meta.id
1564
+ }),
1565
+ description: t("backup space description", {
1566
+ ns: meta.id
1567
+ })
1568
+ }, /* @__PURE__ */ React14.createElement(Button5, {
1569
+ onClick: handleBackup
1570
+ }, t("download backup label"))), /* @__PURE__ */ React14.createElement(ControlItemInput3, {
1571
+ title: t("repair space title", {
1572
+ ns: meta.id
1573
+ }),
1574
+ description: t("repair space description", {
1575
+ ns: meta.id
1576
+ })
1577
+ }, /* @__PURE__ */ React14.createElement(Button5, {
1578
+ onClick: handleRepair
1579
+ }, t("repair space label")))))));
1640
1580
  } finally {
1641
1581
  _effect.f();
1642
1582
  }
1643
1583
  };
1644
1584
 
1645
1585
  // src/components/SyncStatus/InlineSyncStatus.tsx
1646
- import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
1647
- import { Option as Option3 } from "effect";
1648
- import React18, { useEffect as useEffect5, useState as useState10 } from "react";
1649
- import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1586
+ import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
1587
+ import * as Option4 from "effect/Option";
1588
+ import React15, { useEffect as useEffect4, useState as useState9 } from "react";
1589
+ import { useAppGraph as useAppGraph3 } from "@dxos/app-framework/react";
1650
1590
  import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
1651
1591
  import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1652
1592
  import { useClient as useClient8 } from "@dxos/react-client";
1653
1593
  import { useSpaceSyncState } from "@dxos/react-client/echo";
1654
- import { Tooltip as Tooltip3, useTranslation as useTranslation17 } from "@dxos/react-ui";
1594
+ import { Tooltip as Tooltip2, useTranslation as useTranslation15 } from "@dxos/react-ui";
1655
1595
  import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1656
1596
  var useEdgeStatus = () => {
1657
- const [status, setStatus] = useState10(EdgeStatus.NOT_CONNECTED);
1597
+ const [status, setStatus] = useState9(EdgeStatus.ConnectionState.NOT_CONNECTED);
1658
1598
  const client = useClient8();
1659
- useEffect5(() => {
1599
+ useEffect4(() => {
1660
1600
  client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
1661
- setStatus(status2);
1601
+ setStatus(status2.state);
1662
1602
  });
1663
1603
  }, [
1664
1604
  client
@@ -1666,9 +1606,9 @@ var useEdgeStatus = () => {
1666
1606
  return status;
1667
1607
  };
1668
1608
  var InlineSyncStatus = ({ space, open }) => {
1669
- var _effect = _useSignals18();
1609
+ var _effect = _useSignals15();
1670
1610
  try {
1671
- const { t } = useTranslation17(SPACE_PLUGIN);
1611
+ const { t } = useTranslation15(meta.id);
1672
1612
  const id = space.id;
1673
1613
  const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1674
1614
  const isAttended = hasAttention || isAncestor || isRelated;
@@ -1676,16 +1616,16 @@ var InlineSyncStatus = ({ space, open }) => {
1676
1616
  const attended = useAttended2();
1677
1617
  const startOfAttention = attended.at(-1);
1678
1618
  const path = usePath(graph, startOfAttention);
1679
- const containsAttended = !open && !isAttended && id && Option3.isSome(path) ? path.value.includes(id) : false;
1680
- const connectedToEdge = useEdgeStatus() === EdgeStatus.CONNECTED;
1619
+ const containsAttended = !open && !isAttended && id && Option4.isSome(path) ? path.value.includes(id) : false;
1620
+ const connectedToEdge = useEdgeStatus() === EdgeStatus.ConnectionState.CONNECTED;
1681
1621
  const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
1682
1622
  const syncState = useSpaceSyncState(space);
1683
1623
  const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
1684
- return /* @__PURE__ */ React18.createElement(Tooltip3.Trigger, {
1624
+ return /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
1685
1625
  asChild: true,
1686
1626
  content: t("syncing label"),
1687
1627
  side: "bottom"
1688
- }, /* @__PURE__ */ React18.createElement(AttentionGlyph2, {
1628
+ }, /* @__PURE__ */ React15.createElement(AttentionGlyph2, {
1689
1629
  syncing,
1690
1630
  attended: isAttended,
1691
1631
  containsAttended,
@@ -1697,12 +1637,16 @@ var InlineSyncStatus = ({ space, open }) => {
1697
1637
  };
1698
1638
 
1699
1639
  // src/components/SyncStatus/SyncStatus.tsx
1700
- import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
1701
- import React19, { useEffect as useEffect6, useState as useState11 } from "react";
1640
+ import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
1641
+ import React16, { useEffect as useEffect5, useState as useState10 } from "react";
1702
1642
  import { StatusBar } from "@dxos/plugin-status-bar";
1643
+ import { EdgeStatus as EdgeStatus2 } from "@dxos/protocols/proto/dxos/client/services";
1703
1644
  import { useClient as useClient9 } from "@dxos/react-client";
1645
+ import { useStream } from "@dxos/react-client/devtools";
1704
1646
  import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
1705
- import { Icon as Icon8, useTranslation as useTranslation18 } from "@dxos/react-ui";
1647
+ import { Icon as Icon5, Popover as Popover3, useTranslation as useTranslation16 } from "@dxos/react-ui";
1648
+ import { mx } from "@dxos/react-ui-theme";
1649
+ import { Unit } from "@dxos/util";
1706
1650
 
1707
1651
  // src/components/SyncStatus/save-tracker.ts
1708
1652
  import { Context } from "@dxos/context";
@@ -1798,17 +1742,13 @@ var getIcon = (status) => {
1798
1742
  // src/components/SyncStatus/SyncStatus.tsx
1799
1743
  var SYNC_STALLED_TIMEOUT = 5e3;
1800
1744
  var SyncStatus = () => {
1801
- var _effect = _useSignals19();
1745
+ var _effect = _useSignals16();
1802
1746
  try {
1803
1747
  const client = useClient9();
1804
1748
  const state = useSyncState();
1805
- const [saved, setSaved] = useState11(true);
1806
- useEffect6(() => {
1807
- return createClientSaveTracker(client, (state2) => {
1808
- setSaved(state2 === "saved");
1809
- });
1810
- }, []);
1811
- return /* @__PURE__ */ React19.createElement(SyncStatusIndicator, {
1749
+ const [saved, setSaved] = useState10(true);
1750
+ useEffect5(() => createClientSaveTracker(client, (state2) => setSaved(state2 === "saved")), []);
1751
+ return /* @__PURE__ */ React16.createElement(SyncStatusIndicator, {
1812
1752
  state,
1813
1753
  saved
1814
1754
  });
@@ -1817,9 +1757,9 @@ var SyncStatus = () => {
1817
1757
  }
1818
1758
  };
1819
1759
  var SyncStatusIndicator = ({ state, saved }) => {
1820
- var _effect = _useSignals19();
1760
+ var _effect = _useSignals16();
1821
1761
  try {
1822
- const { t } = useTranslation18(SPACE_PLUGIN);
1762
+ const { t } = useTranslation16(meta.id);
1823
1763
  const summary = getSyncSummary(state);
1824
1764
  const offline = Object.values(state).length === 0;
1825
1765
  const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
@@ -1830,8 +1770,8 @@ var SyncStatusIndicator = ({ state, saved }) => {
1830
1770
  needsToUpload,
1831
1771
  needsToDownload
1832
1772
  });
1833
- const [classNames, setClassNames] = useState11();
1834
- useEffect6(() => {
1773
+ const [classNames, setClassNames] = useState10();
1774
+ useEffect5(() => {
1835
1775
  setClassNames(void 0);
1836
1776
  if (offline || !needsToUpload && !needsToDownload) {
1837
1777
  return;
@@ -1846,67 +1786,262 @@ var SyncStatusIndicator = ({ state, saved }) => {
1846
1786
  needsToDownload
1847
1787
  ]);
1848
1788
  const title = t(`${status} label`);
1849
- const icon = /* @__PURE__ */ React19.createElement(Icon8, {
1789
+ const icon = /* @__PURE__ */ React16.createElement(Icon5, {
1850
1790
  icon: getIcon(status),
1851
- size: 4,
1852
1791
  classNames
1853
1792
  });
1854
- return /* @__PURE__ */ React19.createElement(StatusBar.Item, {
1793
+ return /* @__PURE__ */ React16.createElement(Popover3.Root, null, /* @__PURE__ */ React16.createElement(Popover3.Trigger, {
1794
+ asChild: true
1795
+ }, /* @__PURE__ */ React16.createElement(StatusBar.Item, {
1855
1796
  title
1856
- }, icon);
1797
+ }, icon)), /* @__PURE__ */ React16.createElement(Popover3.Portal, null, /* @__PURE__ */ React16.createElement(Popover3.Content, null, /* @__PURE__ */ React16.createElement(EdgeConnectionPopover, null), /* @__PURE__ */ React16.createElement(Popover3.Arrow, null))));
1798
+ } finally {
1799
+ _effect.f();
1800
+ }
1801
+ };
1802
+ var useEdgeStatus2 = () => {
1803
+ const client = useClient9();
1804
+ const { status } = useStream(() => client.services.services.EdgeAgentService.queryEdgeStatus(), {});
1805
+ return status;
1806
+ };
1807
+ var EdgeConnectionPopover = () => {
1808
+ var _effect = _useSignals16();
1809
+ try {
1810
+ const status = useEdgeStatus2();
1811
+ const { t } = useTranslation16(meta.id);
1812
+ const isConnected = status?.state === EdgeStatus2.ConnectionState.CONNECTED;
1813
+ return /* @__PURE__ */ React16.createElement("div", {
1814
+ className: "min-is-[240px] p-2"
1815
+ }, /* @__PURE__ */ React16.createElement("div", {
1816
+ className: "flex items-center gap-2 mbe-2"
1817
+ }, /* @__PURE__ */ React16.createElement(Icon5, {
1818
+ icon: isConnected ? "ph--check-circle--regular" : "ph--warning-circle--regular",
1819
+ classNames: mx(isConnected ? "text-successText" : "text-errorText animate-pulse")
1820
+ }), /* @__PURE__ */ React16.createElement("span", {
1821
+ className: "font-medium text-sm"
1822
+ }, isConnected ? t("sync edge connected label") : t("sync edge disconnected label"))), status?.state === EdgeStatus2.ConnectionState.NOT_CONNECTED && /* @__PURE__ */ React16.createElement("div", {
1823
+ className: "flex items-center gap-2 text-sm text-description"
1824
+ }, /* @__PURE__ */ React16.createElement(Icon5, {
1825
+ icon: "ph--cloud-x--regular"
1826
+ }), /* @__PURE__ */ React16.createElement("span", null, t("sync no connection label"))), status?.state === EdgeStatus2.ConnectionState.CONNECTED && /* @__PURE__ */ React16.createElement("div", {
1827
+ className: "space-y-2"
1828
+ }, /* @__PURE__ */ React16.createElement("div", {
1829
+ className: "flex items-center justify-between text-sm"
1830
+ }, /* @__PURE__ */ React16.createElement("div", {
1831
+ className: "flex items-center gap-2 text-description"
1832
+ }, /* @__PURE__ */ React16.createElement(Icon5, {
1833
+ icon: "ph--timer--regular"
1834
+ }), /* @__PURE__ */ React16.createElement("span", null, t("sync latency label"))), /* @__PURE__ */ React16.createElement(UnitValue, {
1835
+ value: status.rtt,
1836
+ format: Unit.Millisecond
1837
+ })), /* @__PURE__ */ React16.createElement("div", {
1838
+ className: "flex items-center justify-between text-sm"
1839
+ }, /* @__PURE__ */ React16.createElement("div", {
1840
+ className: "flex items-center gap-2 text-description"
1841
+ }, /* @__PURE__ */ React16.createElement(Icon5, {
1842
+ icon: "ph--arrow-up--regular"
1843
+ }), /* @__PURE__ */ React16.createElement("span", null, t("sync upload label"))), /* @__PURE__ */ React16.createElement(UnitValue, {
1844
+ value: status.rateBytesUp,
1845
+ format: Unit.Kilobyte,
1846
+ suffix: "/s"
1847
+ })), /* @__PURE__ */ React16.createElement("div", {
1848
+ className: "flex items-center justify-between text-sm"
1849
+ }, /* @__PURE__ */ React16.createElement("div", {
1850
+ className: "flex items-center gap-2 text-sm text-description"
1851
+ }, /* @__PURE__ */ React16.createElement(Icon5, {
1852
+ icon: "ph--arrow-down--regular"
1853
+ }), /* @__PURE__ */ React16.createElement("span", null, t("sync download label"))), /* @__PURE__ */ React16.createElement(UnitValue, {
1854
+ value: status.rateBytesDown,
1855
+ format: Unit.Kilobyte,
1856
+ suffix: "/s"
1857
+ }))));
1858
+ } finally {
1859
+ _effect.f();
1860
+ }
1861
+ };
1862
+ var UnitValue = ({ value: input, format, suffix }) => {
1863
+ var _effect = _useSignals16();
1864
+ try {
1865
+ const { formattedValue, unit } = format(input);
1866
+ return /* @__PURE__ */ React16.createElement("span", {
1867
+ className: "font-mono"
1868
+ }, formattedValue, /* @__PURE__ */ React16.createElement("span", {
1869
+ className: "mis-1 text-subdued"
1870
+ }, unit.symbol, suffix));
1857
1871
  } finally {
1858
1872
  _effect.f();
1859
1873
  }
1860
1874
  };
1861
1875
 
1876
+ // src/helpers/query.ts
1877
+ import * as Array2 from "effect/Array";
1878
+ import * as Effect3 from "effect/Effect";
1879
+ import * as EffectFunction from "effect/Function";
1880
+ import * as Match from "effect/Match";
1881
+ import * as Option5 from "effect/Option";
1882
+ import * as SchemaAST from "effect/SchemaAST";
1883
+ import { DXN, Filter as Filter2, Query } from "@dxos/echo";
1884
+ import { ReferenceAnnotationId, getTypeAnnotation as getTypeAnnotation3, unwrapOptional } from "@dxos/echo/internal";
1885
+ import { log as log4 } from "@dxos/log";
1886
+ import { Person } from "@dxos/types";
1887
+ var __dxlog_file6 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/helpers/query.ts";
1888
+ var evalQuery = (queryString) => {
1889
+ const globals = {
1890
+ Query,
1891
+ Filter: Filter2,
1892
+ Person
1893
+ };
1894
+ try {
1895
+ return new Function(...Object.keys(globals), `return ${queryString}`)(...Object.values(globals));
1896
+ } catch (err) {
1897
+ log4.catch(err, void 0, {
1898
+ F: __dxlog_file6,
1899
+ L: 33,
1900
+ S: void 0,
1901
+ C: (f, a) => f(...a)
1902
+ });
1903
+ return Query.select(Filter2.nothing());
1904
+ }
1905
+ };
1906
+ var resolveSchemaWithClientAndSpace = (client, space, query) => {
1907
+ const resolve = Effect3.fn(function* (dxn) {
1908
+ const typename = DXN.parse(dxn).asTypeDXN()?.type;
1909
+ if (!typename) {
1910
+ return Option5.none();
1911
+ }
1912
+ const staticSchema = client.graph.schemaRegistry.getSchema(typename);
1913
+ if (staticSchema) {
1914
+ return Option5.some(staticSchema);
1915
+ }
1916
+ const query2 = space.db.schemaRegistry.query({
1917
+ typename
1918
+ });
1919
+ const schemas = yield* Effect3.promise(() => query2.run());
1920
+ return Array2.head(schemas);
1921
+ });
1922
+ return resolveSchema(query, resolve).pipe(Effect3.map((schema) => Option5.getOrUndefined(schema)), Effect3.runPromise);
1923
+ };
1924
+ var resolveSchema = (query, resolve) => {
1925
+ return Match.value(query).pipe(
1926
+ Match.withReturnType(),
1927
+ // TODO(wittjosiah): Reconcile with filter match?
1928
+ Match.when({
1929
+ type: "select"
1930
+ }, ({ filter }) => typenameFromFilter(filter).pipe(Option5.map((typename) => resolve(typename)), Option5.getOrElse(() => Effect3.succeed(Option5.none())))),
1931
+ Match.when({
1932
+ type: "filter"
1933
+ }, ({ filter }) => typenameFromFilter(filter).pipe(Option5.map((typename) => resolve(typename)), Option5.getOrElse(() => Effect3.succeed(Option5.none())))),
1934
+ Match.when({
1935
+ type: "reference-traversal"
1936
+ }, ({ anchor, property }) => resolveSchema(anchor, resolve).pipe(Effect3.map((base) => base.pipe(Option5.map((schema) => SchemaAST.getPropertySignatures(schema.ast)), Option5.flatMap((properties) => Array2.findFirst(properties, (p) => p.name === property)), Option5.flatMap((property2) => SchemaAST.getAnnotation(ReferenceAnnotationId)(unwrapOptional(property2))), Option5.map((annotation) => annotation.typename))), Effect3.flatMap(Option5.match({
1937
+ onNone: () => Effect3.succeed(Option5.none()),
1938
+ onSome: (typename) => resolve(DXN.fromTypename(typename).toString())
1939
+ })))),
1940
+ Match.when({
1941
+ type: "relation",
1942
+ filter: Match.defined
1943
+ }, ({ filter }) => typenameFromFilter(filter).pipe(Option5.map((typename) => resolve(typename)), Option5.getOrElse(() => Effect3.succeed(Option5.none())))),
1944
+ Match.when({
1945
+ type: "relation-traversal"
1946
+ }, ({ anchor, direction }) => resolveSchema(anchor, resolve).pipe(Effect3.map((base) => base.pipe(Option5.map((schema) => getTypeAnnotation3(schema)), Option5.flatMap((annotation) => Option5.fromNullable(direction === "source" ? annotation?.sourceSchema : annotation?.targetSchema)))), Effect3.flatMap(Option5.match({
1947
+ onNone: () => Effect3.succeed(Option5.none()),
1948
+ onSome: (typename) => resolve(typename)
1949
+ })))),
1950
+ Match.when({
1951
+ type: "options"
1952
+ }, ({ query: query2 }) => resolveSchema(query2, resolve)),
1953
+ Match.orElse((_q) => {
1954
+ return Effect3.succeed(Option5.none());
1955
+ })
1956
+ );
1957
+ };
1958
+ var typenameFromFilter = (filter) => Match.value(filter).pipe(Match.withReturnType(), Match.when({
1959
+ type: "object"
1960
+ }, ({ typename }) => Option5.fromNullable(typename)), Match.when({
1961
+ type: "and"
1962
+ }, ({ filters }) => EffectFunction.pipe(filters, Array2.map(typenameFromFilter), Array2.findFirst(Option5.isSome), Option5.flatten)), Match.when({
1963
+ type: "or"
1964
+ }, ({ filters }) => EffectFunction.pipe(filters, Array2.map(typenameFromFilter), Array2.findFirst(Option5.isSome), Option5.flatten)), Match.orElse(() => Option5.none()));
1965
+ var getQueryTarget = (query, space) => {
1966
+ return Match.value(query).pipe(Match.when({
1967
+ type: "options"
1968
+ }, ({ options }) => {
1969
+ return Option5.fromNullable(options.queues).pipe(Option5.flatMap((queues) => Array2.head(queues)), Option5.flatMap((queueDxn) => Option5.fromNullable(DXN.tryParse(queueDxn))), Option5.flatMap((queueDxn) => Option5.fromNullable(space?.queues.get(queueDxn))), Option5.getOrElse(() => space));
1970
+ }), Match.orElse(() => space));
1971
+ };
1972
+
1862
1973
  // src/components/ViewEditor.tsx
1863
- import { useSignals as _useSignals20 } from "@preact-signals/safe-react/tracking";
1864
- import React20, { useCallback as useCallback11, useMemo as useMemo4 } from "react";
1865
- import { createIntent as createIntent10, useIntentDispatcher as useIntentDispatcher10 } from "@dxos/app-framework";
1866
- import { Type as Type3 } from "@dxos/echo";
1867
- import { invariant as invariant2 } from "@dxos/invariant";
1974
+ import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
1975
+ import * as Schema2 from "effect/Schema";
1976
+ import React17, { useCallback as useCallback11, useState as useState11 } from "react";
1977
+ import { createIntent as createIntent10 } from "@dxos/app-framework";
1978
+ import { useIntentDispatcher as useIntentDispatcher10 } from "@dxos/app-framework/react";
1979
+ import { DXN as DXN2, Filter as Filter3, Obj as Obj6, Query as Query2, Tag, Type as Type2 } from "@dxos/echo";
1868
1980
  import { useClient as useClient10 } from "@dxos/react-client";
1869
- import { Filter as Filter2, getSpace as getSpace4, useQuery as useQuery3, useSchema } from "@dxos/react-client/echo";
1870
- import { ViewEditor as NativeViewEditor } from "@dxos/react-ui-form";
1871
- import { DataType as DataType3 } from "@dxos/schema";
1872
- var __dxlog_file6 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ViewEditor.tsx";
1981
+ import { getSpace as getSpace4, useQuery as useQuery2 } from "@dxos/react-client/echo";
1982
+ import { useAsyncEffect } from "@dxos/react-ui";
1983
+ import { ViewEditor as NaturalViewEditor } from "@dxos/react-ui-form";
1984
+ import { View } from "@dxos/schema";
1873
1985
  var ViewEditor = ({ view }) => {
1874
- var _effect = _useSignals20();
1986
+ var _effect = _useSignals17();
1875
1987
  try {
1876
1988
  const { dispatchPromise: dispatch } = useIntentDispatcher10();
1877
1989
  const client = useClient10();
1878
1990
  const space = getSpace4(view);
1879
- const schema = useSchema(client, space, view.query.typename);
1880
- const views = useQuery3(space, Filter2.type(DataType3.View));
1881
- const currentTypename = useMemo4(() => view.query?.typename, [
1882
- view.query?.typename
1883
- ]);
1884
- const handleUpdateTypename = useCallback11((typename) => {
1885
- invariant2(schema, void 0, {
1886
- F: __dxlog_file6,
1887
- L: 30,
1888
- S: void 0,
1889
- A: [
1890
- "schema",
1891
- ""
1991
+ const [schema, setSchema] = useState11(() => Schema2.Struct({}));
1992
+ const tags = useQuery2(space, Filter3.type(Tag.Tag));
1993
+ const types = useTypeOptions({
1994
+ space,
1995
+ annotation: {
1996
+ location: [
1997
+ "database",
1998
+ "runtime"
1999
+ ],
2000
+ kind: [
2001
+ "user"
2002
+ ],
2003
+ registered: [
2004
+ "registered"
1892
2005
  ]
1893
- });
1894
- invariant2(Type3.isMutable(schema), void 0, {
1895
- F: __dxlog_file6,
1896
- L: 31,
1897
- S: void 0,
1898
- A: [
1899
- "Type.isMutable(schema)",
1900
- ""
2006
+ }
2007
+ });
2008
+ useAsyncEffect(async () => {
2009
+ if (!view?.query || !space) {
2010
+ return;
2011
+ }
2012
+ const foundSchema = await resolveSchemaWithClientAndSpace(client, space, view.query.ast);
2013
+ if (foundSchema && foundSchema !== schema) {
2014
+ setSchema(() => foundSchema);
2015
+ }
2016
+ }, [
2017
+ client,
2018
+ space,
2019
+ view,
2020
+ schema
2021
+ ]);
2022
+ const handleQueryChanged = useCallback11(async (newQuery, target) => {
2023
+ if (!view || !space) {
2024
+ return;
2025
+ }
2026
+ const queue = target && DXN2.tryParse(target) ? target : void 0;
2027
+ const query = queue ? Query2.fromAst(newQuery).options({
2028
+ queues: [
2029
+ queue
1901
2030
  ]
1902
- });
1903
- const matchingViews = views.filter((view2) => view2.query.typename === currentTypename);
1904
- for (const view2 of matchingViews) {
1905
- view2.query.typename = typename;
2031
+ }) : Query2.fromAst(newQuery);
2032
+ view.query.ast = query.ast;
2033
+ const newSchema = await resolveSchemaWithClientAndSpace(client, space, query.ast);
2034
+ if (!newSchema) {
2035
+ return;
1906
2036
  }
1907
- schema.updateTypename(typename);
2037
+ const newView = View.make({
2038
+ query,
2039
+ jsonSchema: Type2.toJsonSchema(newSchema)
2040
+ });
2041
+ view.projection = Obj6.getSnapshot(newView).projection;
2042
+ setSchema(() => newSchema);
1908
2043
  }, [
1909
- views,
2044
+ view,
1910
2045
  schema
1911
2046
  ]);
1912
2047
  const handleDelete = useCallback11((fieldId) => {
@@ -1921,13 +2056,16 @@ var ViewEditor = ({ view }) => {
1921
2056
  if (!space || !schema) {
1922
2057
  return null;
1923
2058
  }
1924
- return /* @__PURE__ */ React20.createElement(NativeViewEditor, {
2059
+ return /* @__PURE__ */ React17.createElement(NaturalViewEditor, {
1925
2060
  registry: space.db.schemaRegistry,
1926
2061
  schema,
1927
2062
  view,
1928
- onTypenameChanged: Type3.isMutable(schema) ? handleUpdateTypename : void 0,
1929
- onDelete: Type3.isMutable(schema) ? handleDelete : void 0,
1930
- outerSpacing: false
2063
+ mode: "tag",
2064
+ outerSpacing: false,
2065
+ tags,
2066
+ types,
2067
+ onQueryChanged: handleQueryChanged,
2068
+ onDelete: Type2.isMutable(schema) ? handleDelete : void 0
1931
2069
  });
1932
2070
  } finally {
1933
2071
  _effect.f();
@@ -1936,9 +2074,10 @@ var ViewEditor = ({ view }) => {
1936
2074
 
1937
2075
  // src/components/index.ts
1938
2076
  import { lazy as lazy2 } from "react";
1939
- var CollectionMain = lazy2(() => import("./CollectionMain-ZJIFCWKZ.mjs"));
1940
- var ObjectDetailsPanel = lazy2(() => import("./ObjectDetailsPanel-3MYLTMXN.mjs"));
1941
- var RecordMain = lazy2(() => import("./RecordMain-WLYJMYER.mjs"));
2077
+ var CollectionArticle = lazy2(() => import("./CollectionArticle-KHXYT3SH.mjs"));
2078
+ var ObjectDetailsPanel = lazy2(() => import("./ObjectDetailsPanel-6OFTT3GG.mjs"));
2079
+ var ObjectSettingsContainer = lazy2(() => import("./ObjectSettings-YXPJQMJ5.mjs"));
2080
+ var RecordArticle = lazy2(() => import("./RecordArticle-SSJ7PULS.mjs"));
1942
2081
 
1943
2082
  export {
1944
2083
  AwaitingObject,
@@ -1951,14 +2090,12 @@ export {
1951
2090
  JoinDialog,
1952
2091
  MembersContainer,
1953
2092
  MenuFooter,
1954
- ObjectSettingsContainer,
1955
- PersistenceStatus,
1956
- POPOVER_RENAME_OBJECT,
1957
- PopoverRenameObject,
1958
- POPOVER_RENAME_SPACE,
1959
- PopoverRenameSpace,
1960
- useQuerySpaceSchemas,
2093
+ OBJECT_RENAME_POPOVER,
2094
+ ObjectRenamePopover,
2095
+ SPACE_RENAME_POPOVER,
2096
+ SpaceRenamePopover,
1961
2097
  SchemaContainer,
2098
+ useQuerySpaceSchemas,
1962
2099
  SpacePresence,
1963
2100
  FullPresence,
1964
2101
  SmallPresenceLive,
@@ -1968,19 +2105,23 @@ export {
1968
2105
  InlineSyncStatus,
1969
2106
  SyncStatus,
1970
2107
  SyncStatusIndicator,
2108
+ evalQuery,
2109
+ resolveSchemaWithClientAndSpace,
2110
+ getQueryTarget,
1971
2111
  ViewEditor,
1972
- CollectionMain,
2112
+ CollectionArticle,
1973
2113
  ObjectDetailsPanel,
1974
- RecordMain,
2114
+ ObjectSettingsContainer,
2115
+ RecordArticle,
1975
2116
  AppGraphBuilder,
1976
2117
  AppGraphSerializer,
1977
2118
  IdentityCreated,
1978
2119
  IntentResolver,
1979
2120
  ReactRoot,
1980
2121
  ReactSurface,
1981
- SchemaDefs,
2122
+ Repair,
1982
2123
  SpaceSettings,
1983
2124
  SpaceState,
1984
2125
  SpacesReady
1985
2126
  };
1986
- //# sourceMappingURL=chunk-ZCEH2VYE.mjs.map
2127
+ //# sourceMappingURL=chunk-JAMGJUFU.mjs.map