@dxos/plugin-space 0.10.0 → 0.11.1

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 (646) hide show
  1. package/PLUGIN.mdl +11 -0
  2. package/dist/lib/SpacePlugin.mjs +2 -0
  3. package/dist/lib/SpacePlugin.node.mjs +628 -0
  4. package/dist/lib/SpacePlugin.node.mjs.map +1 -0
  5. package/dist/lib/SpacePlugin.workerd.mjs +26 -0
  6. package/dist/lib/SpacePlugin.workerd.mjs.map +1 -0
  7. package/dist/lib/capabilities/node.mjs +10 -0
  8. package/dist/lib/capabilities/node.mjs.map +1 -0
  9. package/dist/lib/capabilities.mjs +24 -0
  10. package/dist/lib/capabilities.mjs.map +1 -0
  11. package/dist/lib/chunk-CollectionArticle.mjs +90 -0
  12. package/dist/lib/chunk-CollectionArticle.mjs.map +1 -0
  13. package/dist/lib/chunk-CollectionSection.mjs +21 -0
  14. package/dist/lib/chunk-CollectionSection.mjs.map +1 -0
  15. package/dist/lib/chunk-CreateObjectDialog.mjs +178 -0
  16. package/dist/lib/chunk-CreateObjectDialog.mjs.map +1 -0
  17. package/dist/lib/chunk-CreateSpaceDialog.mjs +68 -0
  18. package/dist/lib/chunk-CreateSpaceDialog.mjs.map +1 -0
  19. package/dist/lib/chunk-DefaultProperties.mjs +59 -0
  20. package/dist/lib/chunk-DefaultProperties.mjs.map +1 -0
  21. package/dist/lib/chunk-ImportSpaceDialog.mjs +58 -0
  22. package/dist/lib/chunk-ImportSpaceDialog.mjs.map +1 -0
  23. package/dist/lib/chunk-InlineSyncStatus.mjs +37 -0
  24. package/dist/lib/chunk-InlineSyncStatus.mjs.map +1 -0
  25. package/dist/lib/chunk-JoinDialog.mjs +65 -0
  26. package/dist/lib/chunk-JoinDialog.mjs.map +1 -0
  27. package/dist/lib/chunk-MembersContainer.mjs +263 -0
  28. package/dist/lib/chunk-MembersContainer.mjs.map +1 -0
  29. package/dist/lib/chunk-MergePreview.mjs +91 -0
  30. package/dist/lib/chunk-MergePreview.mjs.map +1 -0
  31. package/dist/lib/chunk-ObjectCardStack.mjs +68 -0
  32. package/dist/lib/chunk-ObjectCardStack.mjs.map +1 -0
  33. package/dist/lib/chunk-RecordArticle.mjs +106 -0
  34. package/dist/lib/chunk-RecordArticle.mjs.map +1 -0
  35. package/dist/lib/chunk-RelatedArticle.mjs +71 -0
  36. package/dist/lib/chunk-RelatedArticle.mjs.map +1 -0
  37. package/dist/lib/chunk-RenamePopover.mjs +94 -0
  38. package/dist/lib/chunk-RenamePopover.mjs.map +1 -0
  39. package/dist/lib/chunk-SchemaContainer.mjs +53 -0
  40. package/dist/lib/chunk-SchemaContainer.mjs.map +1 -0
  41. package/dist/lib/chunk-SmallPresenceLive.mjs +2 -0
  42. package/dist/lib/chunk-SpaceHomeArticle.mjs +82 -0
  43. package/dist/lib/chunk-SpaceHomeArticle.mjs.map +1 -0
  44. package/dist/lib/chunk-SpaceHomeDashboard.mjs +96 -0
  45. package/dist/lib/chunk-SpaceHomeDashboard.mjs.map +1 -0
  46. package/dist/lib/chunk-SpaceHomeRecent.mjs +79 -0
  47. package/dist/lib/chunk-SpaceHomeRecent.mjs.map +1 -0
  48. package/dist/lib/chunk-SpacePlugin.mjs +97 -0
  49. package/dist/lib/chunk-SpacePlugin.mjs.map +1 -0
  50. package/dist/lib/chunk-SpacePresence.mjs +155 -0
  51. package/dist/lib/chunk-SpacePresence.mjs.map +1 -0
  52. package/dist/lib/chunk-SpaceSettings.mjs +63 -0
  53. package/dist/lib/chunk-SpaceSettings.mjs.map +1 -0
  54. package/dist/lib/chunk-SpaceSettingsContainer.mjs +278 -0
  55. package/dist/lib/chunk-SpaceSettingsContainer.mjs.map +1 -0
  56. package/dist/lib/chunk-SyncStatus.mjs +166 -0
  57. package/dist/lib/chunk-SyncStatus.mjs.map +1 -0
  58. package/dist/lib/chunk-TypeArticle.mjs +469 -0
  59. package/dist/lib/chunk-TypeArticle.mjs.map +1 -0
  60. package/dist/lib/chunk-ViewEditor.mjs +78 -0
  61. package/dist/lib/chunk-ViewEditor.mjs.map +1 -0
  62. package/dist/lib/chunk-add-object.mjs +74 -0
  63. package/dist/lib/chunk-add-object.mjs.map +1 -0
  64. package/dist/lib/chunk-add-relation.mjs +16 -0
  65. package/dist/lib/chunk-add-relation.mjs.map +1 -0
  66. package/dist/lib/chunk-add-type.mjs +41 -0
  67. package/dist/lib/chunk-add-type.mjs.map +1 -0
  68. package/dist/lib/chunk-app-graph-builder.mjs +1056 -0
  69. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  70. package/dist/lib/chunk-close.mjs +11 -0
  71. package/dist/lib/chunk-close.mjs.map +1 -0
  72. package/dist/lib/chunk-collection-path.mjs +65 -0
  73. package/dist/lib/chunk-collection-path.mjs.map +1 -0
  74. package/dist/lib/chunk-create-object.mjs +80 -0
  75. package/dist/lib/chunk-create-object.mjs.map +1 -0
  76. package/dist/lib/chunk-create.mjs +62 -0
  77. package/dist/lib/chunk-create.mjs.map +1 -0
  78. package/dist/lib/chunk-definitions.mjs +466 -0
  79. package/dist/lib/chunk-definitions.mjs.map +1 -0
  80. package/dist/lib/chunk-delete-field.mjs +52 -0
  81. package/dist/lib/chunk-delete-field.mjs.map +1 -0
  82. package/dist/lib/chunk-delete.mjs +11 -0
  83. package/dist/lib/chunk-delete.mjs.map +1 -0
  84. package/dist/lib/chunk-duplicate-object.mjs +11 -0
  85. package/dist/lib/chunk-duplicate-object.mjs.map +1 -0
  86. package/dist/lib/chunk-errors.mjs +10 -0
  87. package/dist/lib/chunk-errors.mjs.map +1 -0
  88. package/dist/lib/chunk-export-space.mjs +24 -0
  89. package/dist/lib/chunk-export-space.mjs.map +1 -0
  90. package/dist/lib/chunk-find-duplicates.mjs +19 -0
  91. package/dist/lib/chunk-find-duplicates.mjs.map +1 -0
  92. package/dist/lib/chunk-get-share-link.mjs +29 -0
  93. package/dist/lib/chunk-get-share-link.mjs.map +1 -0
  94. package/dist/lib/chunk-helpers.mjs +14 -0
  95. package/dist/lib/chunk-helpers.mjs.map +1 -0
  96. package/dist/lib/chunk-identity-created.mjs +26 -0
  97. package/dist/lib/chunk-identity-created.mjs.map +1 -0
  98. package/dist/lib/chunk-import-space.mjs +16 -0
  99. package/dist/lib/chunk-import-space.mjs.map +1 -0
  100. package/dist/lib/chunk-join.mjs +35 -0
  101. package/dist/lib/chunk-join.mjs.map +1 -0
  102. package/dist/lib/chunk-merge-duplicates.mjs +62 -0
  103. package/dist/lib/chunk-merge-duplicates.mjs.map +1 -0
  104. package/dist/lib/{neutral/chunk-5ZZS3KMK.mjs → chunk-meta.mjs} +15 -24
  105. package/dist/lib/chunk-meta.mjs.map +1 -0
  106. package/dist/lib/chunk-migrate.mjs +45 -0
  107. package/dist/lib/chunk-migrate.mjs.map +1 -0
  108. package/dist/lib/chunk-navigation-handler.mjs +63 -0
  109. package/dist/lib/chunk-navigation-handler.mjs.map +1 -0
  110. package/dist/lib/chunk-navigation-target-resolver.mjs +79 -0
  111. package/dist/lib/chunk-navigation-target-resolver.mjs.map +1 -0
  112. package/dist/lib/chunk-open-create-object.mjs +32 -0
  113. package/dist/lib/chunk-open-create-object.mjs.map +1 -0
  114. package/dist/lib/chunk-open-create-space.mjs +16 -0
  115. package/dist/lib/chunk-open-create-space.mjs.map +1 -0
  116. package/dist/lib/chunk-open-import-space.mjs +16 -0
  117. package/dist/lib/chunk-open-import-space.mjs.map +1 -0
  118. package/dist/lib/chunk-open-members.mjs +15 -0
  119. package/dist/lib/chunk-open-members.mjs.map +1 -0
  120. package/dist/lib/chunk-open-settings.mjs +15 -0
  121. package/dist/lib/chunk-open-settings.mjs.map +1 -0
  122. package/dist/lib/chunk-open.mjs +11 -0
  123. package/dist/lib/chunk-open.mjs.map +1 -0
  124. package/dist/lib/chunk-operation-handler.mjs +13 -0
  125. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  126. package/dist/lib/chunk-react-root.mjs +20 -0
  127. package/dist/lib/chunk-react-root.mjs.map +1 -0
  128. package/dist/lib/chunk-react-surface.mjs +384 -0
  129. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  130. package/dist/lib/chunk-remove-objects.mjs +83 -0
  131. package/dist/lib/chunk-remove-objects.mjs.map +1 -0
  132. package/dist/lib/chunk-rename-object.mjs +18 -0
  133. package/dist/lib/chunk-rename-object.mjs.map +1 -0
  134. package/dist/lib/chunk-rename.mjs +18 -0
  135. package/dist/lib/chunk-rename.mjs.map +1 -0
  136. package/dist/lib/chunk-repair.mjs +28 -0
  137. package/dist/lib/chunk-repair.mjs.map +1 -0
  138. package/dist/lib/chunk-restore-field.mjs +50 -0
  139. package/dist/lib/chunk-restore-field.mjs.map +1 -0
  140. package/dist/lib/chunk-restore-objects.mjs +33 -0
  141. package/dist/lib/chunk-restore-objects.mjs.map +1 -0
  142. package/dist/lib/chunk-settings.mjs +23 -0
  143. package/dist/lib/chunk-settings.mjs.map +1 -0
  144. package/dist/lib/chunk-share.mjs +23 -0
  145. package/dist/lib/chunk-share.mjs.map +1 -0
  146. package/dist/lib/chunk-snapshot.mjs +24 -0
  147. package/dist/lib/chunk-snapshot.mjs.map +1 -0
  148. package/dist/lib/chunk-spaces-ready.mjs +242 -0
  149. package/dist/lib/chunk-spaces-ready.mjs.map +1 -0
  150. package/dist/lib/chunk-state.mjs +48 -0
  151. package/dist/lib/chunk-state.mjs.map +1 -0
  152. package/dist/lib/chunk-types.mjs +56 -0
  153. package/dist/lib/chunk-types.mjs.map +1 -0
  154. package/dist/lib/chunk-undo-mappings.mjs +40 -0
  155. package/dist/lib/chunk-undo-mappings.mjs.map +1 -0
  156. package/dist/lib/chunk-util.mjs +34 -0
  157. package/dist/lib/chunk-util.mjs.map +1 -0
  158. package/dist/lib/chunk-wait-for-object.mjs +16 -0
  159. package/dist/lib/chunk-wait-for-object.mjs.map +1 -0
  160. package/dist/lib/components.mjs +329 -0
  161. package/dist/lib/components.mjs.map +1 -0
  162. package/dist/lib/{neutral/chunk-C2ULK22J.mjs → constants.mjs} +5 -10
  163. package/dist/lib/constants.mjs.map +1 -0
  164. package/dist/lib/containers.mjs +31 -0
  165. package/dist/lib/containers.mjs.map +1 -0
  166. package/dist/lib/hooks.mjs +185 -0
  167. package/dist/lib/hooks.mjs.map +1 -0
  168. package/dist/lib/index.mjs +7 -0
  169. package/dist/lib/meta.mjs +2 -0
  170. package/dist/lib/operations.mjs +8 -0
  171. package/dist/lib/operations.mjs.map +1 -0
  172. package/dist/lib/plugin.mjs +9 -0
  173. package/dist/lib/plugin.mjs.map +1 -0
  174. package/dist/lib/testing.mjs +2 -0
  175. package/dist/lib/translations.mjs +350 -0
  176. package/dist/lib/translations.mjs.map +1 -0
  177. package/dist/lib/types.mjs +60 -0
  178. package/dist/lib/types.mjs.map +1 -0
  179. package/dist/types/src/SpacePlugin.workerd.d.ts.map +1 -1
  180. package/dist/types/src/capabilities/SpaceFormFields.d.ts +10 -0
  181. package/dist/types/src/capabilities/SpaceFormFields.d.ts.map +1 -0
  182. package/dist/types/src/capabilities/SpaceSurfaces.d.ts +50 -0
  183. package/dist/types/src/capabilities/SpaceSurfaces.d.ts.map +1 -0
  184. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
  185. package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +6 -1
  186. package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -1
  187. package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts +1 -1
  188. package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts.map +1 -1
  189. package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts +7 -1
  190. package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts.map +1 -1
  191. package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts +2 -7
  192. package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts.map +1 -1
  193. package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts +3 -2
  194. package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts.map +1 -1
  195. package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts +5 -0
  196. package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
  197. package/dist/types/src/capabilities/create-object.d.ts +1 -1
  198. package/dist/types/src/capabilities/identity-created.d.ts +1 -1
  199. package/dist/types/src/capabilities/index.d.ts +1 -1
  200. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  201. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +3 -1
  202. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
  203. package/dist/types/src/capabilities/navigation-target-resolver.d.ts +5 -0
  204. package/dist/types/src/capabilities/navigation-target-resolver.d.ts.map +1 -0
  205. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  206. package/dist/types/src/capabilities/react-root.d.ts +1 -1
  207. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  208. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  209. package/dist/types/src/capabilities/repair.d.ts +1 -1
  210. package/dist/types/src/capabilities/settings.d.ts +1 -1
  211. package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
  212. package/dist/types/src/capabilities/state.d.ts +1 -1
  213. package/dist/types/src/capabilities/try-get-view.d.ts +7 -0
  214. package/dist/types/src/capabilities/try-get-view.d.ts.map +1 -0
  215. package/dist/types/src/capabilities/undo-mappings.d.ts +1 -1
  216. package/dist/types/src/collection-path.d.ts +28 -0
  217. package/dist/types/src/collection-path.d.ts.map +1 -0
  218. package/dist/types/src/collection-path.test.d.ts +2 -0
  219. package/dist/types/src/collection-path.test.d.ts.map +1 -0
  220. package/dist/types/src/commands/space/export/export.d.ts +23 -0
  221. package/dist/types/src/commands/space/export/export.d.ts.map +1 -0
  222. package/dist/types/src/commands/space/export/export.test.d.ts +2 -0
  223. package/dist/types/src/commands/space/export/export.test.d.ts.map +1 -0
  224. package/dist/types/src/commands/space/export/index.d.ts +2 -0
  225. package/dist/types/src/commands/space/export/index.d.ts.map +1 -0
  226. package/dist/types/src/commands/space/import/import.d.ts +17 -0
  227. package/dist/types/src/commands/space/import/import.d.ts.map +1 -0
  228. package/dist/types/src/commands/space/import/import.test.d.ts +2 -0
  229. package/dist/types/src/commands/space/import/import.test.d.ts.map +1 -0
  230. package/dist/types/src/commands/space/import/index.d.ts +2 -0
  231. package/dist/types/src/commands/space/import/index.d.ts.map +1 -0
  232. package/dist/types/src/commands/space/index.d.ts +8 -1
  233. package/dist/types/src/commands/space/index.d.ts.map +1 -1
  234. package/dist/types/src/components/AwaitingObject/AwaitingObject.d.ts.map +1 -1
  235. package/dist/types/src/components/SyncStatus/status.d.ts +7 -4
  236. package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
  237. package/dist/types/src/components/SyncStatus/status.test.d.ts +2 -0
  238. package/dist/types/src/components/SyncStatus/status.test.d.ts.map +1 -0
  239. package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts +4 -4
  240. package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts.map +1 -1
  241. package/dist/types/src/containers/CollectionSection/CollectionSection.d.ts +4 -1
  242. package/dist/types/src/containers/CollectionSection/CollectionSection.d.ts.map +1 -1
  243. package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts +4 -1
  244. package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
  245. package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +420 -9
  246. package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
  247. package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts +4 -1
  248. package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts.map +1 -1
  249. package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +423 -10
  250. package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
  251. package/dist/types/src/containers/ImportSpaceDialog/ImportSpaceDialog.d.ts +4 -1
  252. package/dist/types/src/containers/ImportSpaceDialog/ImportSpaceDialog.d.ts.map +1 -1
  253. package/dist/types/src/containers/InlineSyncStatus/InlineSyncStatus.d.ts +5 -2
  254. package/dist/types/src/containers/InlineSyncStatus/InlineSyncStatus.d.ts.map +1 -1
  255. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts +4 -1
  256. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
  257. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +423 -10
  258. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
  259. package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts +4 -1
  260. package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -1
  261. package/dist/types/src/containers/MergePreview/MergePreview.d.ts +16 -0
  262. package/dist/types/src/containers/MergePreview/MergePreview.d.ts.map +1 -0
  263. package/dist/types/src/containers/MergePreview/index.d.ts +2 -0
  264. package/dist/types/src/containers/MergePreview/index.d.ts.map +1 -0
  265. package/dist/types/src/containers/ObjectCardStack/ObjectCardStack.d.ts +3 -2
  266. package/dist/types/src/containers/ObjectCardStack/ObjectCardStack.d.ts.map +1 -1
  267. package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts +4 -1
  268. package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts.map +1 -1
  269. package/dist/types/src/containers/RecordArticle/RecordArticle.stories.d.ts.map +1 -1
  270. package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts +4 -1
  271. package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts.map +1 -1
  272. package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +4 -4
  273. package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -1
  274. package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts +4 -7
  275. package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
  276. package/dist/types/src/containers/SchemaContainer/use-query-space-types.d.ts +7 -0
  277. package/dist/types/src/containers/SchemaContainer/use-query-space-types.d.ts.map +1 -0
  278. package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts +4 -11
  279. package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts.map +1 -1
  280. package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.stories.d.ts +14 -0
  281. package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.stories.d.ts.map +1 -0
  282. package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.d.ts +15 -0
  283. package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.d.ts.map +1 -0
  284. package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.stories.d.ts +20 -0
  285. package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.stories.d.ts.map +1 -0
  286. package/dist/types/src/containers/SpaceHomeDashboard/index.d.ts +2 -0
  287. package/dist/types/src/containers/SpaceHomeDashboard/index.d.ts.map +1 -0
  288. package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts +5 -8
  289. package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -1
  290. package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts +7 -4
  291. package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
  292. package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +419 -9
  293. package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
  294. package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts +4 -1
  295. package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts.map +1 -1
  296. package/dist/types/src/containers/SpaceSettings/SpaceSettings.stories.d.ts +423 -10
  297. package/dist/types/src/containers/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
  298. package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +419 -9
  299. package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
  300. package/dist/types/src/containers/SyncStatus/SyncStatus.d.ts +7 -2
  301. package/dist/types/src/containers/SyncStatus/SyncStatus.d.ts.map +1 -1
  302. package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +434 -11
  303. package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
  304. package/dist/types/src/containers/TypeArticle/TypeArticle.d.ts +14 -0
  305. package/dist/types/src/containers/TypeArticle/TypeArticle.d.ts.map +1 -0
  306. package/dist/types/src/containers/TypeArticle/TypeArticle.stories.d.ts +45 -0
  307. package/dist/types/src/containers/TypeArticle/TypeArticle.stories.d.ts.map +1 -0
  308. package/dist/types/src/containers/TypeArticle/duplicatesGroup.d.ts +19 -0
  309. package/dist/types/src/containers/TypeArticle/duplicatesGroup.d.ts.map +1 -0
  310. package/dist/types/src/containers/TypeArticle/index.d.ts +2 -0
  311. package/dist/types/src/containers/TypeArticle/index.d.ts.map +1 -0
  312. package/dist/types/src/containers/TypeArticle/useDuplicates.d.ts +34 -0
  313. package/dist/types/src/containers/TypeArticle/useDuplicates.d.ts.map +1 -0
  314. package/dist/types/src/containers/ViewEditor/ViewEditor.d.ts +4 -1
  315. package/dist/types/src/containers/ViewEditor/ViewEditor.d.ts.map +1 -1
  316. package/dist/types/src/containers/index.d.ts +3 -2
  317. package/dist/types/src/containers/index.d.ts.map +1 -1
  318. package/dist/types/src/errors.d.ts +30 -0
  319. package/dist/types/src/errors.d.ts.map +1 -1
  320. package/dist/types/src/hooks/index.d.ts +2 -0
  321. package/dist/types/src/hooks/index.d.ts.map +1 -1
  322. package/dist/types/src/hooks/useEdgeStatus.d.ts +6 -0
  323. package/dist/types/src/hooks/useEdgeStatus.d.ts.map +1 -0
  324. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
  325. package/dist/types/src/hooks/useStalled.d.ts +13 -0
  326. package/dist/types/src/hooks/useStalled.d.ts.map +1 -0
  327. package/dist/types/src/operations/create.d.ts.map +1 -1
  328. package/dist/types/src/operations/definitions.d.ts +29 -1
  329. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  330. package/dist/types/src/operations/find-duplicates.d.ts +5 -0
  331. package/dist/types/src/operations/find-duplicates.d.ts.map +1 -0
  332. package/dist/types/src/operations/helpers.d.ts +3 -0
  333. package/dist/types/src/operations/helpers.d.ts.map +1 -1
  334. package/dist/types/src/operations/index.d.ts.map +1 -1
  335. package/dist/types/src/operations/join.d.ts.map +1 -1
  336. package/dist/types/src/operations/merge-duplicates.d.ts +5 -0
  337. package/dist/types/src/operations/merge-duplicates.d.ts.map +1 -0
  338. package/dist/types/src/operations/open-settings.d.ts.map +1 -1
  339. package/dist/types/src/operations/remove-objects.d.ts.map +1 -1
  340. package/dist/types/src/translations.d.ts +419 -9
  341. package/dist/types/src/translations.d.ts.map +1 -1
  342. package/dist/types/src/type-section-path.d.ts +22 -0
  343. package/dist/types/src/type-section-path.d.ts.map +1 -0
  344. package/dist/types/src/type-section-path.test.d.ts +2 -0
  345. package/dist/types/src/type-section-path.test.d.ts.map +1 -0
  346. package/dist/types/src/types/capabilities.d.ts +22 -2
  347. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  348. package/dist/types/src/types/surface.d.ts +4 -4
  349. package/dist/types/src/types/surface.d.ts.map +1 -1
  350. package/dist/types/src/types/types.d.ts +6 -0
  351. package/dist/types/src/types/types.d.ts.map +1 -1
  352. package/dist/types/tsconfig.tsbuildinfo +1 -1
  353. package/package.json +87 -72
  354. package/src/SpacePlugin.ts +6 -6
  355. package/src/SpacePlugin.workerd.ts +3 -1
  356. package/src/capabilities/SpaceFormFields.tsx +72 -0
  357. package/src/capabilities/SpaceSurfaces.tsx +219 -0
  358. package/src/capabilities/app-graph-builder/extensions/collections.ts +74 -21
  359. package/src/capabilities/app-graph-builder/extensions/companions.ts +10 -5
  360. package/src/capabilities/app-graph-builder/extensions/database.ts +64 -57
  361. package/src/capabilities/app-graph-builder/extensions/settings.ts +23 -13
  362. package/src/capabilities/app-graph-builder/extensions/shared.ts +3 -2
  363. package/src/capabilities/app-graph-builder/extensions/spaces.ts +6 -7
  364. package/src/capabilities/create-object.ts +1 -14
  365. package/src/capabilities/index.ts +4 -1
  366. package/src/capabilities/navigation-handler/navigation-handler.ts +27 -7
  367. package/src/capabilities/navigation-target-resolver.ts +77 -0
  368. package/src/capabilities/react-surface.ts +274 -0
  369. package/src/capabilities/spaces-ready.ts +31 -18
  370. package/src/capabilities/state.ts +3 -1
  371. package/src/capabilities/try-get-view.ts +24 -0
  372. package/src/collection-path.test.ts +161 -0
  373. package/src/collection-path.ts +97 -0
  374. package/src/commands/space/export/export.test.ts +68 -0
  375. package/src/commands/space/export/export.ts +118 -0
  376. package/src/commands/space/export/index.ts +5 -0
  377. package/src/commands/space/import/import.test.ts +80 -0
  378. package/src/commands/space/import/import.ts +65 -0
  379. package/src/commands/space/import/index.ts +5 -0
  380. package/src/commands/space/index.ts +16 -1
  381. package/src/components/AwaitingObject/AwaitingObject.tsx +10 -4
  382. package/src/components/CreateObjectPanel/CreateObjectPanel.tsx +16 -18
  383. package/src/components/SyncStatus/status.test.ts +49 -0
  384. package/src/components/SyncStatus/status.ts +25 -12
  385. package/src/containers/CollectionArticle/CollectionArticle.tsx +5 -3
  386. package/src/containers/CollectionSection/CollectionSection.tsx +2 -0
  387. package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +18 -4
  388. package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +13 -17
  389. package/src/containers/CreateSpaceDialog/CreateSpaceDialog.tsx +28 -19
  390. package/src/containers/DefaultProperties/DefaultProperties.tsx +4 -2
  391. package/src/containers/ImportSpaceDialog/ImportSpaceDialog.tsx +4 -2
  392. package/src/containers/InlineSyncStatus/InlineSyncStatus.tsx +7 -17
  393. package/src/containers/JoinDialog/JoinDialog.tsx +5 -3
  394. package/src/containers/MembersContainer/MembersContainer.tsx +2 -0
  395. package/src/containers/MergePreview/MergePreview.tsx +90 -0
  396. package/src/containers/MergePreview/index.ts +5 -0
  397. package/src/containers/ObjectCardStack/ObjectCardStack.tsx +46 -43
  398. package/src/containers/RecordArticle/RecordArticle.stories.tsx +2 -1
  399. package/src/containers/RecordArticle/RecordArticle.tsx +8 -4
  400. package/src/containers/RelatedArticle/RelatedArticle.tsx +7 -3
  401. package/src/containers/RenamePopover/RenamePopover.tsx +2 -0
  402. package/src/containers/SchemaContainer/SchemaContainer.tsx +4 -17
  403. package/src/containers/SchemaContainer/use-query-space-types.ts +28 -0
  404. package/src/containers/SpaceHomeArticle/SpaceHomeArticle.stories.tsx +116 -0
  405. package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +6 -5
  406. package/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.stories.tsx +99 -0
  407. package/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.tsx +109 -0
  408. package/src/containers/SpaceHomeDashboard/index.ts +5 -0
  409. package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +17 -15
  410. package/src/containers/SpacePresence/SpacePresence.stories.tsx +4 -4
  411. package/src/containers/SpacePresence/SpacePresence.tsx +37 -36
  412. package/src/containers/SpaceSettings/SpaceSettings.tsx +3 -1
  413. package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +7 -2
  414. package/src/containers/SyncStatus/SyncStatus.stories.tsx +80 -1
  415. package/src/containers/SyncStatus/SyncStatus.tsx +36 -46
  416. package/src/containers/TypeArticle/TypeArticle.stories.tsx +249 -0
  417. package/src/containers/TypeArticle/TypeArticle.tsx +362 -0
  418. package/src/containers/TypeArticle/duplicatesGroup.tsx +150 -0
  419. package/src/containers/TypeArticle/index.ts +5 -0
  420. package/src/containers/TypeArticle/useDuplicates.ts +119 -0
  421. package/src/containers/ViewEditor/ViewEditor.tsx +3 -1
  422. package/src/containers/index.ts +3 -2
  423. package/src/errors.ts +6 -0
  424. package/src/hooks/index.ts +2 -0
  425. package/src/hooks/useEdgeStatus.ts +40 -0
  426. package/src/hooks/useInputSurfaceLookup.tsx +5 -4
  427. package/src/hooks/useRelatedObjects.ts +1 -1
  428. package/src/hooks/useStalled.ts +39 -0
  429. package/src/operations/add-object.ts +7 -7
  430. package/src/operations/create.ts +11 -3
  431. package/src/operations/definitions.ts +54 -1
  432. package/src/operations/find-duplicates.ts +33 -0
  433. package/src/operations/get-share-link.ts +1 -1
  434. package/src/operations/helpers.ts +11 -0
  435. package/src/operations/index.ts +2 -0
  436. package/src/operations/join.ts +6 -5
  437. package/src/operations/merge-duplicates.ts +51 -0
  438. package/src/operations/open-members.ts +3 -3
  439. package/src/operations/open-settings.ts +5 -3
  440. package/src/operations/remove-objects.ts +42 -3
  441. package/src/translations.ts +52 -11
  442. package/src/type-section-path.test.ts +48 -0
  443. package/src/type-section-path.ts +39 -0
  444. package/src/types/capabilities.ts +26 -2
  445. package/src/types/surface.ts +4 -8
  446. package/src/types/types.ts +7 -0
  447. package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs +0 -93
  448. package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs.map +0 -7
  449. package/dist/lib/neutral/CollectionSection-BLYTGOKH.mjs +0 -19
  450. package/dist/lib/neutral/CollectionSection-BLYTGOKH.mjs.map +0 -7
  451. package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs +0 -221
  452. package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +0 -7
  453. package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs +0 -61
  454. package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs.map +0 -7
  455. package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +0 -58
  456. package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +0 -7
  457. package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs +0 -64
  458. package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs.map +0 -7
  459. package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs +0 -49
  460. package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs.map +0 -7
  461. package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs +0 -97
  462. package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +0 -7
  463. package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs +0 -231
  464. package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +0 -7
  465. package/dist/lib/neutral/MenuFooter-FWE5LFM4.mjs +0 -33
  466. package/dist/lib/neutral/MenuFooter-FWE5LFM4.mjs.map +0 -7
  467. package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs +0 -55
  468. package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs.map +0 -7
  469. package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs +0 -102
  470. package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs.map +0 -7
  471. package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs +0 -69
  472. package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +0 -7
  473. package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs +0 -104
  474. package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +0 -7
  475. package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs +0 -53
  476. package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +0 -7
  477. package/dist/lib/neutral/SmallPresenceLive-FW3AMEY5.mjs +0 -8
  478. package/dist/lib/neutral/SmallPresenceLive-FW3AMEY5.mjs.map +0 -7
  479. package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs +0 -78
  480. package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs.map +0 -7
  481. package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs +0 -89
  482. package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs.map +0 -7
  483. package/dist/lib/neutral/SpacePlugin.mjs +0 -10
  484. package/dist/lib/neutral/SpacePlugin.mjs.map +0 -7
  485. package/dist/lib/neutral/SpacePlugin.node.mjs +0 -838
  486. package/dist/lib/neutral/SpacePlugin.node.mjs.map +0 -7
  487. package/dist/lib/neutral/SpacePlugin.workerd.mjs +0 -34
  488. package/dist/lib/neutral/SpacePlugin.workerd.mjs.map +0 -7
  489. package/dist/lib/neutral/SpacePresence-T37WH43Y.mjs +0 -11
  490. package/dist/lib/neutral/SpacePresence-T37WH43Y.mjs.map +0 -7
  491. package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs +0 -60
  492. package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs.map +0 -7
  493. package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs +0 -279
  494. package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +0 -7
  495. package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs +0 -147
  496. package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs.map +0 -7
  497. package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +0 -143
  498. package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +0 -7
  499. package/dist/lib/neutral/ViewEditor-QXRUOKXR.mjs +0 -101
  500. package/dist/lib/neutral/ViewEditor-QXRUOKXR.mjs.map +0 -7
  501. package/dist/lib/neutral/add-object-H2N4AOQJ.mjs +0 -77
  502. package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +0 -7
  503. package/dist/lib/neutral/add-relation-BGTLART5.mjs +0 -26
  504. package/dist/lib/neutral/add-relation-BGTLART5.mjs.map +0 -7
  505. package/dist/lib/neutral/add-type-JIDLRANR.mjs +0 -57
  506. package/dist/lib/neutral/add-type-JIDLRANR.mjs.map +0 -7
  507. package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs +0 -1332
  508. package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +0 -7
  509. package/dist/lib/neutral/capabilities/index.mjs +0 -46
  510. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  511. package/dist/lib/neutral/capabilities/node.mjs +0 -15
  512. package/dist/lib/neutral/capabilities/node.mjs.map +0 -7
  513. package/dist/lib/neutral/chunk-52ASDNRA.mjs +0 -41
  514. package/dist/lib/neutral/chunk-52ASDNRA.mjs.map +0 -7
  515. package/dist/lib/neutral/chunk-5ZZS3KMK.mjs.map +0 -7
  516. package/dist/lib/neutral/chunk-C2ULK22J.mjs.map +0 -7
  517. package/dist/lib/neutral/chunk-F5KLUP2P.mjs +0 -115
  518. package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +0 -7
  519. package/dist/lib/neutral/chunk-G2KHP7FX.mjs +0 -8
  520. package/dist/lib/neutral/chunk-G2KHP7FX.mjs.map +0 -7
  521. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  522. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  523. package/dist/lib/neutral/chunk-LMUG6PEJ.mjs +0 -572
  524. package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +0 -7
  525. package/dist/lib/neutral/chunk-RAAHDTVF.mjs +0 -167
  526. package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +0 -7
  527. package/dist/lib/neutral/chunk-SPWAMXNR.mjs +0 -131
  528. package/dist/lib/neutral/chunk-SPWAMXNR.mjs.map +0 -7
  529. package/dist/lib/neutral/chunk-U5WTDOMV.mjs +0 -8
  530. package/dist/lib/neutral/chunk-U5WTDOMV.mjs.map +0 -7
  531. package/dist/lib/neutral/chunk-V7JALUM3.mjs +0 -9
  532. package/dist/lib/neutral/chunk-V7JALUM3.mjs.map +0 -7
  533. package/dist/lib/neutral/close-5WEQZRNK.mjs +0 -17
  534. package/dist/lib/neutral/close-5WEQZRNK.mjs.map +0 -7
  535. package/dist/lib/neutral/components/index.mjs +0 -401
  536. package/dist/lib/neutral/components/index.mjs.map +0 -7
  537. package/dist/lib/neutral/constants.mjs +0 -16
  538. package/dist/lib/neutral/constants.mjs.map +0 -7
  539. package/dist/lib/neutral/containers/index.mjs +0 -55
  540. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  541. package/dist/lib/neutral/create-QZ47FHQU.mjs +0 -75
  542. package/dist/lib/neutral/create-QZ47FHQU.mjs.map +0 -7
  543. package/dist/lib/neutral/create-object-ZU6FZW5X.mjs +0 -96
  544. package/dist/lib/neutral/create-object-ZU6FZW5X.mjs.map +0 -7
  545. package/dist/lib/neutral/delete-SPCU2VFM.mjs +0 -17
  546. package/dist/lib/neutral/delete-SPCU2VFM.mjs.map +0 -7
  547. package/dist/lib/neutral/delete-field-TAKJVEAD.mjs +0 -42
  548. package/dist/lib/neutral/delete-field-TAKJVEAD.mjs.map +0 -7
  549. package/dist/lib/neutral/duplicate-object-BUPZOO6S.mjs +0 -17
  550. package/dist/lib/neutral/duplicate-object-BUPZOO6S.mjs.map +0 -7
  551. package/dist/lib/neutral/export-space-S5SCAL4M.mjs +0 -34
  552. package/dist/lib/neutral/export-space-S5SCAL4M.mjs.map +0 -7
  553. package/dist/lib/neutral/get-share-link-CLM5IQRL.mjs +0 -41
  554. package/dist/lib/neutral/get-share-link-CLM5IQRL.mjs.map +0 -7
  555. package/dist/lib/neutral/hooks/index.mjs +0 -133
  556. package/dist/lib/neutral/hooks/index.mjs.map +0 -7
  557. package/dist/lib/neutral/identity-created-BEYMLBK4.mjs +0 -32
  558. package/dist/lib/neutral/identity-created-BEYMLBK4.mjs.map +0 -7
  559. package/dist/lib/neutral/import-space-LJQK3KT7.mjs +0 -28
  560. package/dist/lib/neutral/import-space-LJQK3KT7.mjs.map +0 -7
  561. package/dist/lib/neutral/index.mjs +0 -62
  562. package/dist/lib/neutral/index.mjs.map +0 -7
  563. package/dist/lib/neutral/join-FSODYIOC.mjs +0 -54
  564. package/dist/lib/neutral/join-FSODYIOC.mjs.map +0 -7
  565. package/dist/lib/neutral/meta.json +0 -1
  566. package/dist/lib/neutral/meta.mjs +0 -8
  567. package/dist/lib/neutral/meta.mjs.map +0 -7
  568. package/dist/lib/neutral/migrate-WHM6LU7L.mjs +0 -52
  569. package/dist/lib/neutral/migrate-WHM6LU7L.mjs.map +0 -7
  570. package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs +0 -44
  571. package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +0 -7
  572. package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs +0 -82
  573. package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +0 -7
  574. package/dist/lib/neutral/open-JCXTL3SK.mjs +0 -17
  575. package/dist/lib/neutral/open-JCXTL3SK.mjs.map +0 -7
  576. package/dist/lib/neutral/open-create-object-WAIAU7TA.mjs +0 -42
  577. package/dist/lib/neutral/open-create-object-WAIAU7TA.mjs.map +0 -7
  578. package/dist/lib/neutral/open-create-space-VU47FWPZ.mjs +0 -24
  579. package/dist/lib/neutral/open-create-space-VU47FWPZ.mjs.map +0 -7
  580. package/dist/lib/neutral/open-import-space-GUHIEWYB.mjs +0 -24
  581. package/dist/lib/neutral/open-import-space-GUHIEWYB.mjs.map +0 -7
  582. package/dist/lib/neutral/open-members-MLLBHKUU.mjs +0 -23
  583. package/dist/lib/neutral/open-members-MLLBHKUU.mjs.map +0 -7
  584. package/dist/lib/neutral/open-settings-DTPZF4U4.mjs +0 -23
  585. package/dist/lib/neutral/open-settings-DTPZF4U4.mjs.map +0 -7
  586. package/dist/lib/neutral/operation-handler-YPIRQOH2.mjs +0 -13
  587. package/dist/lib/neutral/operation-handler-YPIRQOH2.mjs.map +0 -7
  588. package/dist/lib/neutral/operations/index.mjs +0 -13
  589. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  590. package/dist/lib/neutral/plugin.mjs +0 -18
  591. package/dist/lib/neutral/plugin.mjs.map +0 -7
  592. package/dist/lib/neutral/react-root-YLYRCSAZ.mjs +0 -23
  593. package/dist/lib/neutral/react-root-YLYRCSAZ.mjs.map +0 -7
  594. package/dist/lib/neutral/react-surface-LRA7GIFN.mjs +0 -367
  595. package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +0 -7
  596. package/dist/lib/neutral/remove-objects-WEO66EDS.mjs +0 -55
  597. package/dist/lib/neutral/remove-objects-WEO66EDS.mjs.map +0 -7
  598. package/dist/lib/neutral/rename-Q6UNCBIM.mjs +0 -26
  599. package/dist/lib/neutral/rename-Q6UNCBIM.mjs.map +0 -7
  600. package/dist/lib/neutral/rename-object-2UCEGU7U.mjs +0 -26
  601. package/dist/lib/neutral/rename-object-2UCEGU7U.mjs.map +0 -7
  602. package/dist/lib/neutral/repair-HMH476U3.mjs +0 -32
  603. package/dist/lib/neutral/repair-HMH476U3.mjs.map +0 -7
  604. package/dist/lib/neutral/restore-field-6CQAFOXY.mjs +0 -40
  605. package/dist/lib/neutral/restore-field-6CQAFOXY.mjs.map +0 -7
  606. package/dist/lib/neutral/restore-objects-3VINLP7C.mjs +0 -39
  607. package/dist/lib/neutral/restore-objects-3VINLP7C.mjs.map +0 -7
  608. package/dist/lib/neutral/settings-5IBSYBVU.mjs +0 -28
  609. package/dist/lib/neutral/settings-5IBSYBVU.mjs.map +0 -7
  610. package/dist/lib/neutral/share-A4WPILNF.mjs +0 -31
  611. package/dist/lib/neutral/share-A4WPILNF.mjs.map +0 -7
  612. package/dist/lib/neutral/snapshot-HBYMAPA7.mjs +0 -30
  613. package/dist/lib/neutral/snapshot-HBYMAPA7.mjs.map +0 -7
  614. package/dist/lib/neutral/spaces-ready-GWMSU72V.mjs +0 -281
  615. package/dist/lib/neutral/spaces-ready-GWMSU72V.mjs.map +0 -7
  616. package/dist/lib/neutral/state-KMH2NUAL.mjs +0 -55
  617. package/dist/lib/neutral/state-KMH2NUAL.mjs.map +0 -7
  618. package/dist/lib/neutral/testing.mjs +0 -8
  619. package/dist/lib/neutral/testing.mjs.map +0 -7
  620. package/dist/lib/neutral/translations.mjs +0 -315
  621. package/dist/lib/neutral/translations.mjs.map +0 -7
  622. package/dist/lib/neutral/types/index.mjs +0 -40
  623. package/dist/lib/neutral/types/index.mjs.map +0 -7
  624. package/dist/lib/neutral/undo-mappings-P43EAUGI.mjs +0 -68
  625. package/dist/lib/neutral/undo-mappings-P43EAUGI.mjs.map +0 -7
  626. package/dist/lib/neutral/wait-for-object-U6P2NNWY.mjs +0 -23
  627. package/dist/lib/neutral/wait-for-object-U6P2NNWY.mjs.map +0 -7
  628. package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
  629. package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
  630. package/dist/types/src/containers/MenuFooter/MenuFooter.d.ts +0 -6
  631. package/dist/types/src/containers/MenuFooter/MenuFooter.d.ts.map +0 -1
  632. package/dist/types/src/containers/MenuFooter/index.d.ts +0 -2
  633. package/dist/types/src/containers/MenuFooter/index.d.ts.map +0 -1
  634. package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts +0 -16
  635. package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts.map +0 -1
  636. package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts +0 -21
  637. package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts.map +0 -1
  638. package/dist/types/src/containers/TypeCollectionArticle/index.d.ts +0 -2
  639. package/dist/types/src/containers/TypeCollectionArticle/index.d.ts.map +0 -1
  640. package/src/capabilities/navigation-resolver.ts +0 -94
  641. package/src/capabilities/react-surface.tsx +0 -395
  642. package/src/containers/MenuFooter/MenuFooter.tsx +0 -33
  643. package/src/containers/MenuFooter/index.ts +0 -5
  644. package/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.tsx +0 -116
  645. package/src/containers/TypeCollectionArticle/TypeCollectionArticle.tsx +0 -162
  646. package/src/containers/TypeCollectionArticle/index.ts +0 -5
@@ -0,0 +1,161 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import { afterEach, beforeEach, describe, test } from 'vitest';
7
+
8
+ import { AppAnnotation } from '@dxos/app-toolkit';
9
+ import { SpaceProperties } from '@dxos/client/echo';
10
+ import { Annotation, Collection, Database, Obj, Ref } from '@dxos/echo';
11
+ import { EchoTestBuilder } from '@dxos/echo-client/testing';
12
+ import { EffectEx } from '@dxos/effect';
13
+
14
+ import { resolveCollectionObjectPath, walkCollectionChainToRoot } from './collection-path';
15
+
16
+ describe('walkCollectionChainToRoot', () => {
17
+ let builder: EchoTestBuilder;
18
+
19
+ beforeEach(async () => {
20
+ builder = await new EchoTestBuilder().open();
21
+ });
22
+
23
+ afterEach(async () => {
24
+ await builder.close();
25
+ });
26
+
27
+ const setup = async () => {
28
+ const { db } = await builder.createDatabase({ types: [Collection.Collection] });
29
+ const walk = (objectId: string, rootId: string) =>
30
+ EffectEx.runPromise(walkCollectionChainToRoot({ objectId, rootId }).pipe(Effect.provide(Database.layer(db))));
31
+ return { db, walk };
32
+ };
33
+
34
+ /** A collection holding the given objects, added to the database. */
35
+ const addCollection = (db: Database.Database, objects: Obj.Unknown[]) =>
36
+ db.add(Collection.make({ objects: objects.map((object) => Ref.make(object)) }));
37
+
38
+ test('an object directly in the root collection has an empty chain', async ({ expect }) => {
39
+ const { db, walk } = await setup();
40
+ const leaf = db.add(Collection.make());
41
+ const root = addCollection(db, [leaf]);
42
+ await db.flush({ indexes: true });
43
+
44
+ // Empty rather than null: the object sits directly under `content/collections`, no intermediate ids.
45
+ expect(await walk(leaf.id, root.id)).toEqual([]);
46
+ });
47
+
48
+ test('a nested object yields its ancestors root-to-leaf', async ({ expect }) => {
49
+ const { db, walk } = await setup();
50
+ const leaf = db.add(Collection.make());
51
+ const inner = addCollection(db, [leaf]);
52
+ const outer = addCollection(db, [inner]);
53
+ const root = addCollection(db, [outer]);
54
+ await db.flush({ indexes: true });
55
+
56
+ expect(await walk(leaf.id, root.id)).toEqual([outer.id, inner.id]);
57
+ });
58
+
59
+ test('an object outside the root collection tree has no chain', async ({ expect }) => {
60
+ const { db, walk } = await setup();
61
+ const orphan = db.add(Collection.make());
62
+ const root = addCollection(db, []);
63
+ await db.flush({ indexes: true });
64
+
65
+ expect(await walk(orphan.id, root.id)).toBeNull();
66
+ });
67
+
68
+ test('an object in a collection detached from the root has no chain', async ({ expect }) => {
69
+ const { db, walk } = await setup();
70
+ const leaf = db.add(Collection.make());
71
+ addCollection(db, [leaf]);
72
+ const root = addCollection(db, []);
73
+ await db.flush({ indexes: true });
74
+
75
+ // The leaf has a parent, but walking up never reaches the root collection.
76
+ expect(await walk(leaf.id, root.id)).toBeNull();
77
+ });
78
+
79
+ test('a cycle terminates instead of looping', async ({ expect }) => {
80
+ const { db, walk } = await setup();
81
+ const first = db.add(Collection.make());
82
+ const second = addCollection(db, [first]);
83
+ Obj.update(first, (first) => {
84
+ first.objects = [Ref.make(second)];
85
+ });
86
+ const root = addCollection(db, []);
87
+ await db.flush({ indexes: true });
88
+
89
+ expect(await walk(first.id, root.id)).toBeNull();
90
+ });
91
+ });
92
+
93
+ describe('resolveCollectionObjectPath', () => {
94
+ let builder: EchoTestBuilder;
95
+
96
+ beforeEach(async () => {
97
+ builder = await new EchoTestBuilder().open();
98
+ });
99
+
100
+ afterEach(async () => {
101
+ await builder.close();
102
+ });
103
+
104
+ const setup = async () => {
105
+ const { db } = await builder.createDatabase({ types: [Collection.Collection, SpaceProperties] });
106
+ const resolve = (objectId: string) =>
107
+ EffectEx.runPromise(resolveCollectionObjectPath({ objectId }).pipe(Effect.provide(Database.layer(db))));
108
+ return { db, resolve };
109
+ };
110
+
111
+ /** A collection holding the given objects, added to the database. */
112
+ const addCollection = (db: Database.Database, objects: Obj.Unknown[]) =>
113
+ db.add(Collection.make({ objects: objects.map((object) => Ref.make(object)) }));
114
+
115
+ /** Declare `root` the space's root collection, the way space provisioning does. */
116
+ const setRootCollection = (db: Database.Database, root: Collection.Collection) => {
117
+ const properties = db.add(Obj.make(SpaceProperties, {}));
118
+ Obj.update(properties, (properties) => {
119
+ Annotation.set(properties, AppAnnotation.RootCollectionAnnotation, Ref.make(root));
120
+ });
121
+ };
122
+
123
+ test('assembles the nested chain into a collections path, root to leaf', async ({ expect }) => {
124
+ const { db, resolve } = await setup();
125
+ const leaf = db.add(Collection.make());
126
+ const inner = addCollection(db, [leaf]);
127
+ const outer = addCollection(db, [inner]);
128
+ setRootCollection(db, addCollection(db, [outer]));
129
+ await db.flush({ indexes: true });
130
+
131
+ expect(await resolve(leaf.id)).toBe(`root/${db.spaceId}/content/collections/${outer.id}/${inner.id}/${leaf.id}`);
132
+ });
133
+
134
+ test('an object directly in the root collection sits directly under the section', async ({ expect }) => {
135
+ const { db, resolve } = await setup();
136
+ const leaf = db.add(Collection.make());
137
+ setRootCollection(db, addCollection(db, [leaf]));
138
+ await db.flush({ indexes: true });
139
+
140
+ expect(await resolve(leaf.id)).toBe(`root/${db.spaceId}/content/collections/${leaf.id}`);
141
+ });
142
+
143
+ test('resolves nothing without a root-collection annotation', async ({ expect }) => {
144
+ const { db, resolve } = await setup();
145
+ const leaf = db.add(Collection.make());
146
+ // Space properties exist but declare no root collection — a space before provisioning.
147
+ db.add(Obj.make(SpaceProperties, {}));
148
+ await db.flush({ indexes: true });
149
+
150
+ expect(await resolve(leaf.id)).toBeUndefined();
151
+ });
152
+
153
+ test('resolves nothing for an object outside the collection tree', async ({ expect }) => {
154
+ const { db, resolve } = await setup();
155
+ const orphan = db.add(Collection.make());
156
+ setRootCollection(db, addCollection(db, []));
157
+ await db.flush({ indexes: true });
158
+
159
+ expect(await resolve(orphan.id)).toBeUndefined();
160
+ });
161
+ });
@@ -0,0 +1,97 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Option from 'effect/Option';
7
+
8
+ import { AppAnnotation, GraphPath } from '@dxos/app-toolkit';
9
+ import { SpaceProperties } from '@dxos/client/echo';
10
+ import { Annotation, Collection, Database, Filter } from '@dxos/echo';
11
+ import { EID } from '@dxos/keys';
12
+
13
+ /** Depth cap for the collection-ancestry walk; the composer nav tree is shallow, this only guards bad data. */
14
+ const COLLECTION_WALK_MAX_DEPTH = 32;
15
+
16
+ /**
17
+ * The path under which the nav tree shows an object, when it lives in the space's collection tree:
18
+ * `content/collections/<ancestors…>/<objectId>`. This is an object's canonical home — the database
19
+ * path (`system/database/<type>/<objectId>`) exists for every object but names a hidden node — so both
20
+ * URL resolution and navigation-target resolution answer with this when it exists.
21
+ *
22
+ * Returns undefined for an object outside the collection tree (one reachable only via its type
23
+ * section or the database subtree).
24
+ */
25
+ export const resolveCollectionObjectPath = ({
26
+ objectId,
27
+ }: {
28
+ objectId: string;
29
+ }): Effect.Effect<string | undefined, never, Database.Service> =>
30
+ Effect.gen(function* () {
31
+ const { db } = yield* Database.Service;
32
+ const [properties] = yield* Database.query(Filter.type(SpaceProperties)).run;
33
+ const rootRef = properties
34
+ ? Annotation.get(properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)
35
+ : undefined;
36
+ if (!rootRef) {
37
+ return undefined;
38
+ }
39
+
40
+ const rootCollection = yield* Database.load(rootRef).pipe(Effect.orElseSucceed(() => undefined));
41
+ if (!rootCollection) {
42
+ return undefined;
43
+ }
44
+
45
+ const chain = yield* walkCollectionChainToRoot({ objectId, rootId: rootCollection.id });
46
+ return chain ? GraphPath.getCollectionsPath(db.spaceId, ...chain, objectId) : undefined;
47
+ });
48
+
49
+ /**
50
+ * Walk up a space's collection tree from `objectId` to the root collection. A single query loads the
51
+ * space's collections — each already carries its child refs — so the ancestry is a pure in-memory walk
52
+ * of a child→parent index rather than a query per step. The composer ontology guarantees a tree (an
53
+ * object lives in one collection, no cycles); on bad data the first indexed parent wins, and a
54
+ * visited-set plus depth cap stop a cycle from looping. Returns the intermediate collection ids in
55
+ * root→leaf order (excluding the root collection, whose objects sit directly under
56
+ * `content/collections`), or null if no path to the root exists.
57
+ */
58
+ export const walkCollectionChainToRoot = ({
59
+ objectId,
60
+ rootId,
61
+ }: {
62
+ objectId: string;
63
+ rootId: string;
64
+ }): Effect.Effect<string[] | null, never, Database.Service> =>
65
+ Effect.gen(function* () {
66
+ const collections = yield* Database.query(Filter.type(Collection.Collection)).run;
67
+ const parentOf = new Map<string, string>();
68
+ for (const collection of collections) {
69
+ for (const ref of collection.objects ?? []) {
70
+ const childId = EID.isEID(ref.uri) ? EID.getEntityId(ref.uri) : undefined;
71
+ if (childId && !parentOf.has(childId)) {
72
+ parentOf.set(childId, collection.id);
73
+ }
74
+ }
75
+ }
76
+
77
+ const visited = new Set<string>([objectId]);
78
+ // Built leaf→root on the way up; the node id wants root→leaf.
79
+ const chain: string[] = [];
80
+ let current = objectId;
81
+ for (let depth = 0; depth < COLLECTION_WALK_MAX_DEPTH; depth++) {
82
+ const parent = parentOf.get(current);
83
+ if (!parent) {
84
+ return null;
85
+ }
86
+ if (parent === rootId) {
87
+ return chain.reverse();
88
+ }
89
+ if (visited.has(parent)) {
90
+ return null;
91
+ }
92
+ visited.add(parent);
93
+ chain.push(parent);
94
+ current = parent;
95
+ }
96
+ return null;
97
+ });
@@ -0,0 +1,68 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as NodeContext from '@effect/platform-node/NodeContext';
6
+ import * as FileSystem from '@effect/platform/FileSystem';
7
+ import { describe, expect, it } from '@effect/vitest';
8
+ import * as Effect from 'effect/Effect';
9
+ import * as Layer from 'effect/Layer';
10
+ import * as Option from 'effect/Option';
11
+
12
+ import { TestConsole, TestLayer } from '@dxos/cli-util/testing';
13
+ import { ClientService } from '@dxos/client';
14
+ import { EffectEx } from '@dxos/effect';
15
+
16
+ import { handler } from './export';
17
+
18
+ const ExportTestLayer = Layer.mergeAll(TestLayer, NodeContext.layer);
19
+
20
+ type ExportOutput = { spaceId: string; format: string; path: string; size: number };
21
+
22
+ describe('space export', () => {
23
+ it('should write a json export into an output directory', () =>
24
+ Effect.gen(function* () {
25
+ const fs = yield* FileSystem.FileSystem;
26
+ const space = yield* createSpace();
27
+
28
+ const outputDir = yield* fs.makeTempDirectoryScoped();
29
+ yield* handler({ spaceId: Option.some(space.id), output: Option.some(outputDir), format: 'json' });
30
+
31
+ const { spaceId, format, path, size } = yield* lastOutput();
32
+ expect(spaceId).toEqual(space.id);
33
+ expect(format).toEqual('json');
34
+ expect(path.startsWith(outputDir)).toBe(true);
35
+ expect(path.endsWith('.dx.json')).toBe(true);
36
+ expect(size).toBeGreaterThan(0);
37
+
38
+ const contents = JSON.parse(yield* fs.readFileString(path));
39
+ expect(contents.originalSpaceId).toEqual(space.id);
40
+ }).pipe(Effect.provide(ExportTestLayer), Effect.scoped, EffectEx.runAndForwardErrors));
41
+
42
+ it('should write a binary export to an explicit file path', () =>
43
+ Effect.gen(function* () {
44
+ const fs = yield* FileSystem.FileSystem;
45
+ const space = yield* createSpace();
46
+
47
+ const outputPath = `${yield* fs.makeTempDirectoryScoped()}/nested/space.tar`;
48
+ yield* handler({ spaceId: Option.some(space.id), output: Option.some(outputPath), format: 'binary' });
49
+
50
+ const { format, path } = yield* lastOutput();
51
+ expect(format).toEqual('binary');
52
+ expect(path).toEqual(outputPath);
53
+ expect((yield* fs.stat(outputPath)).type).toEqual('File');
54
+ }).pipe(Effect.provide(ExportTestLayer), Effect.scoped, EffectEx.runAndForwardErrors));
55
+ });
56
+
57
+ const createSpace = Effect.fn(function* () {
58
+ const client = yield* ClientService;
59
+ yield* Effect.tryPromise(() => client.halo.createIdentity());
60
+ const space = yield* Effect.tryPromise(() => client.spaces.create());
61
+ yield* Effect.tryPromise(() => space.waitUntilReady());
62
+ return space;
63
+ });
64
+
65
+ const lastOutput = Effect.fn(function* () {
66
+ const logger = yield* TestConsole.TestConsole;
67
+ return TestConsole.parseJson<ExportOutput>(logger.logs[logger.logs.length - 1]);
68
+ });
@@ -0,0 +1,118 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Command from '@effect/cli/Command';
6
+ import * as Options from '@effect/cli/Options';
7
+ import * as FileSystem from '@effect/platform/FileSystem';
8
+ import * as Path from '@effect/platform/Path';
9
+ import * as Console from 'effect/Console';
10
+ import * as Duration from 'effect/Duration';
11
+ import * as Effect from 'effect/Effect';
12
+ import * as Match from 'effect/Match';
13
+ import * as Option from 'effect/Option';
14
+
15
+ import {
16
+ CommandConfig,
17
+ Common,
18
+ FormBuilder,
19
+ formatBytes,
20
+ getSpace,
21
+ print,
22
+ spaceIdWithDefault,
23
+ withTimeout,
24
+ } from '@dxos/cli-util';
25
+ import { type Key } from '@dxos/echo';
26
+ import { SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
27
+
28
+ import { SpaceNotReadyError } from '../../../errors';
29
+
30
+ const SPACE_READY_TIMEOUT = Duration.seconds(30);
31
+
32
+ // TODO(wittjosiah): Upstream as SpaceArchive.Formats/SpaceArchive.Format, replacing the proto enum.
33
+ export const Formats = ['binary', 'json'] as const;
34
+
35
+ export type Format = (typeof Formats)[number];
36
+
37
+ export type ExportArgs = {
38
+ spaceId: Option.Option<Key.SpaceId>;
39
+ output: Option.Option<string>;
40
+ format: Format;
41
+ };
42
+
43
+ /** Exports a space in the given archive format and writes it to disk. */
44
+ export const handler = Effect.fn(function* ({ spaceId, output, format }: ExportArgs) {
45
+ const { json } = yield* CommandConfig;
46
+ const fs = yield* FileSystem.FileSystem;
47
+ const path = yield* Path.Path;
48
+
49
+ const resolvedSpaceId = yield* spaceIdWithDefault(spaceId);
50
+ const space = yield* getSpace(resolvedSpaceId);
51
+
52
+ // Export reads the epoch root, and a closed space never becomes ready — so cap the wait.
53
+ yield* Effect.tryPromise(() => space.waitUntilReady()).pipe(
54
+ Effect.timeoutFail({
55
+ duration: SPACE_READY_TIMEOUT,
56
+ onTimeout: () => new SpaceNotReadyError({ context: { spaceId: resolvedSpaceId } }),
57
+ }),
58
+ );
59
+
60
+ const archive = yield* Effect.tryPromise(() =>
61
+ space.internal.export({
62
+ format: Match.value(format).pipe(
63
+ Match.when('binary', () => SpaceArchive.Format.BINARY),
64
+ Match.when('json', () => SpaceArchive.Format.JSON),
65
+ Match.exhaustive,
66
+ ),
67
+ }),
68
+ );
69
+ const outputPath = yield* resolveOutputPath(output, archive.filename);
70
+ yield* fs.makeDirectory(path.dirname(outputPath), { recursive: true });
71
+ yield* fs.writeFile(outputPath, archive.contents);
72
+
73
+ if (json) {
74
+ yield* Console.log(
75
+ JSON.stringify({ spaceId: resolvedSpaceId, format, path: outputPath, size: archive.contents.length }, null, 2),
76
+ );
77
+ } else {
78
+ const builder = FormBuilder.make({ title: 'Exported Space' }).pipe(
79
+ FormBuilder.set('spaceId', resolvedSpaceId),
80
+ FormBuilder.set('format', format),
81
+ FormBuilder.set('path', outputPath),
82
+ FormBuilder.set('size', formatBytes(archive.contents.length)),
83
+ );
84
+ yield* Console.log(print(FormBuilder.build(builder)));
85
+ }
86
+ });
87
+
88
+ export const exportSpace = Command.make(
89
+ 'export',
90
+ {
91
+ spaceId: Common.spaceId.pipe(Options.optional),
92
+ format: Options.choice('format', Formats).pipe(
93
+ Options.withDescription(
94
+ 'Archive format: binary is a direct dump of the underlying storage and includes document history; json contains current object state only.',
95
+ ),
96
+ Options.withDefault('binary' as const),
97
+ ),
98
+ output: Options.text('output').pipe(
99
+ Options.withAlias('o'),
100
+ Options.withDescription('Output file, or a directory to write the generated filename into.'),
101
+ Options.optional,
102
+ ),
103
+ },
104
+ (args) => handler(args).pipe(withTimeout),
105
+ ).pipe(Command.withDescription('Export a space archive to disk.'));
106
+
107
+ const resolveOutputPath = Effect.fn(function* (output: Option.Option<string>, filename: string) {
108
+ const fs = yield* FileSystem.FileSystem;
109
+ const path = yield* Path.Path;
110
+ if (Option.isNone(output)) {
111
+ return path.resolve(filename);
112
+ }
113
+
114
+ // An existing directory target keeps the generated space-scoped, timestamped filename.
115
+ const info = yield* fs.stat(output.value).pipe(Effect.option);
116
+ const isDirectory = Option.isSome(info) && info.value.type === 'Directory';
117
+ return path.resolve(isDirectory ? path.join(output.value, filename) : output.value);
118
+ });
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export * from './export';
@@ -0,0 +1,80 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as NodeContext from '@effect/platform-node/NodeContext';
6
+ import * as FileSystem from '@effect/platform/FileSystem';
7
+ import { describe, expect, it } from '@effect/vitest';
8
+ import * as Effect from 'effect/Effect';
9
+ import * as Layer from 'effect/Layer';
10
+ import * as Option from 'effect/Option';
11
+
12
+ import { TestConsole, TestLayer } from '@dxos/cli-util/testing';
13
+ import { ClientService } from '@dxos/client';
14
+ import { Obj } from '@dxos/echo';
15
+ import { EffectEx } from '@dxos/effect';
16
+
17
+ import { type Format, handler as exportSpace } from '../export';
18
+ import { handler as importSpace } from './import';
19
+
20
+ const ImportTestLayer = Layer.mergeAll(TestLayer, NodeContext.layer);
21
+
22
+ describe('space import', () => {
23
+ it('should import a json archive as a new space', () =>
24
+ Effect.gen(function* () {
25
+ const client = yield* ClientService;
26
+ const { space, path } = yield* exportFixture('json');
27
+
28
+ yield* importSpace({ file: path, tags: [] });
29
+
30
+ const imported = yield* lastOutput();
31
+ expect(imported.spaceId).not.toEqual(space.id);
32
+ expect(client.spaces.get().some(({ id }) => id === imported.spaceId)).toBe(true);
33
+ expect(imported.name).toEqual('original');
34
+ }).pipe(Effect.provide(ImportTestLayer), Effect.scoped, EffectEx.runAndForwardErrors));
35
+
36
+ it('should import a binary archive as a new space', () =>
37
+ Effect.gen(function* () {
38
+ const client = yield* ClientService;
39
+ const { space, path } = yield* exportFixture('binary');
40
+
41
+ yield* importSpace({ file: path, tags: [] });
42
+
43
+ const imported = yield* lastOutput();
44
+ expect(imported.spaceId).not.toEqual(space.id);
45
+ expect(client.spaces.get().some(({ id }) => id === imported.spaceId)).toBe(true);
46
+ }).pipe(Effect.provide(ImportTestLayer), Effect.scoped, EffectEx.runAndForwardErrors));
47
+
48
+ it('should apply tags to the imported space', () =>
49
+ Effect.gen(function* () {
50
+ const { path } = yield* exportFixture('json');
51
+
52
+ yield* importSpace({ file: path, tags: ['imported'] });
53
+
54
+ expect((yield* lastOutput()).tags).toContain('imported');
55
+ }).pipe(Effect.provide(ImportTestLayer), Effect.scoped, EffectEx.runAndForwardErrors));
56
+ });
57
+
58
+ const lastOutput = Effect.fn(function* () {
59
+ const logger = yield* TestConsole.TestConsole;
60
+ return TestConsole.parseJson<{ spaceId: string; name?: string; tags: string[]; path: string }>(
61
+ logger.logs[logger.logs.length - 1],
62
+ );
63
+ });
64
+
65
+ /** Exports a named space and returns the archive path, so import has a real archive to read. */
66
+ const exportFixture = Effect.fn(function* (format: Format) {
67
+ const fs = yield* FileSystem.FileSystem;
68
+ const client = yield* ClientService;
69
+ yield* Effect.tryPromise(() => client.halo.createIdentity());
70
+ const space = yield* Effect.tryPromise(() => client.spaces.create());
71
+ yield* Effect.tryPromise(() => space.waitUntilReady());
72
+ Obj.update(space.properties, (obj) => {
73
+ obj.name = 'original';
74
+ });
75
+ yield* Effect.tryPromise(() => space.db.flush());
76
+
77
+ const outputDir = yield* fs.makeTempDirectoryScoped();
78
+ yield* exportSpace({ spaceId: Option.some(space.id), output: Option.some(outputDir), format });
79
+ return { space, path: (yield* lastOutput()).path };
80
+ });
@@ -0,0 +1,65 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Args from '@effect/cli/Args';
6
+ import * as Command from '@effect/cli/Command';
7
+ import * as Options from '@effect/cli/Options';
8
+ import * as FileSystem from '@effect/platform/FileSystem';
9
+ import * as Path from '@effect/platform/Path';
10
+ import * as Console from 'effect/Console';
11
+ import * as Effect from 'effect/Effect';
12
+
13
+ import { CommandConfig, FormBuilder, formatBytes, print, withTimeout } from '@dxos/cli-util';
14
+ import { ClientService } from '@dxos/client';
15
+ import { type SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
16
+
17
+ export type ImportArgs = {
18
+ file: string;
19
+ tags: ReadonlyArray<string>;
20
+ };
21
+
22
+ /** Reads an archive of either format from disk and creates a new space from it. */
23
+ export const handler = Effect.fn(function* ({ file, tags }: ImportArgs) {
24
+ const { json } = yield* CommandConfig;
25
+ const client = yield* ClientService;
26
+ const fs = yield* FileSystem.FileSystem;
27
+ const path = yield* Path.Path;
28
+
29
+ const contents = yield* fs.readFile(file);
30
+ // Format is left unset so the host detects it from the extension, falling back to sniffing contents.
31
+ const archive: SpaceArchive = { filename: path.basename(file), contents };
32
+ const space = yield* Effect.tryPromise(() =>
33
+ client.spaces.import(archive, tags.length > 0 ? { tags: [...tags] } : undefined),
34
+ );
35
+
36
+ if (json) {
37
+ yield* Console.log(
38
+ JSON.stringify(
39
+ { spaceId: space.id, name: space.properties.name, tags: space.tags, size: contents.length },
40
+ null,
41
+ 2,
42
+ ),
43
+ );
44
+ } else {
45
+ const builder = FormBuilder.make({ title: 'Imported Space' }).pipe(
46
+ FormBuilder.set('spaceId', space.id),
47
+ FormBuilder.set('name', space.properties.name ?? '<none>'),
48
+ FormBuilder.set('tags', space.tags.length > 0 ? space.tags.join(', ') : '<none>'),
49
+ FormBuilder.set('size', formatBytes(contents.length)),
50
+ );
51
+ yield* Console.log(print(FormBuilder.build(builder)));
52
+ }
53
+ });
54
+
55
+ export const importSpace = Command.make(
56
+ 'import',
57
+ {
58
+ file: Args.file({ name: 'file' }).pipe(Args.withDescription('Archive to import, in either binary or json format.')),
59
+ tags: Options.text('tag').pipe(
60
+ Options.withDescription('Immutable tag to set on the new space. Repeat to set several.'),
61
+ Options.repeated,
62
+ ),
63
+ },
64
+ (args) => handler(args).pipe(withTimeout),
65
+ ).pipe(Command.withDescription('Import a space archive as a new space.'));
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export * from './import';
@@ -6,6 +6,8 @@ import * as Command from '@effect/cli/Command';
6
6
 
7
7
  import { close } from './close';
8
8
  import { create } from './create';
9
+ import { exportSpace } from './export';
10
+ import { importSpace } from './import';
9
11
  import { info } from './info';
10
12
  import { join } from './join';
11
13
  import { list } from './list';
@@ -17,5 +19,18 @@ import { sync } from './sync';
17
19
 
18
20
  export const space = Command.make('space').pipe(
19
21
  Command.withDescription('Manage ECHO spaces.'),
20
- Command.withSubcommands([close, create, info, join, list, members, open, schema, share, sync]),
22
+ Command.withSubcommands([
23
+ close,
24
+ create,
25
+ exportSpace,
26
+ importSpace,
27
+ info,
28
+ join,
29
+ list,
30
+ members,
31
+ open,
32
+ schema,
33
+ share,
34
+ sync,
35
+ ]),
21
36
  );
@@ -2,14 +2,15 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import React, { useCallback, useEffect, useState } from 'react';
5
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
6
6
 
7
7
  import { useOperationInvoker } from '@dxos/app-framework/ui';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
9
  import { useLayout } from '@dxos/app-toolkit/ui';
10
- import { Filter, Obj } from '@dxos/echo';
10
+ import { Filter, Obj, Query } from '@dxos/echo';
11
+ import { useQuery } from '@dxos/echo-react';
11
12
  import { useClient } from '@dxos/react-client';
12
- import { useQuery } from '@dxos/react-client/echo';
13
+ import { useSpaces } from '@dxos/react-client/echo';
13
14
  import { Button, Icon, Toast, useTranslation } from '@dxos/react-ui';
14
15
  import { osTranslations } from '@dxos/ui-theme';
15
16
 
@@ -28,7 +29,12 @@ export const AwaitingObject = ({ id }: { id: string }) => {
28
29
  const layout = useLayout();
29
30
 
30
31
  const client = useClient();
31
- const objects = useQuery(client.spaces, Filter.everything());
32
+ // The awaited object may land in any space, so this queries the whole graph — which, unlike
33
+ // `db.query`, does not scope itself: an unscoped query reaches the planner and throws
34
+ // ("Query must be scoped with a from() clause"), killing whatever rendered this toast.
35
+ const spaces = useSpaces();
36
+ const query = useMemo(() => Query.select(Filter.everything()).from(spaces.map((space) => space.db)), [spaces]);
37
+ const objects = useQuery(client.spaces, query);
32
38
 
33
39
  useEffect(() => {
34
40
  if (!id) {