@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.
- package/PLUGIN.mdl +11 -0
- package/dist/lib/SpacePlugin.mjs +2 -0
- package/dist/lib/SpacePlugin.node.mjs +628 -0
- package/dist/lib/SpacePlugin.node.mjs.map +1 -0
- package/dist/lib/SpacePlugin.workerd.mjs +26 -0
- package/dist/lib/SpacePlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities/node.mjs +10 -0
- package/dist/lib/capabilities/node.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +24 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-CollectionArticle.mjs +90 -0
- package/dist/lib/chunk-CollectionArticle.mjs.map +1 -0
- package/dist/lib/chunk-CollectionSection.mjs +21 -0
- package/dist/lib/chunk-CollectionSection.mjs.map +1 -0
- package/dist/lib/chunk-CreateObjectDialog.mjs +178 -0
- package/dist/lib/chunk-CreateObjectDialog.mjs.map +1 -0
- package/dist/lib/chunk-CreateSpaceDialog.mjs +68 -0
- package/dist/lib/chunk-CreateSpaceDialog.mjs.map +1 -0
- package/dist/lib/chunk-DefaultProperties.mjs +59 -0
- package/dist/lib/chunk-DefaultProperties.mjs.map +1 -0
- package/dist/lib/chunk-ImportSpaceDialog.mjs +58 -0
- package/dist/lib/chunk-ImportSpaceDialog.mjs.map +1 -0
- package/dist/lib/chunk-InlineSyncStatus.mjs +37 -0
- package/dist/lib/chunk-InlineSyncStatus.mjs.map +1 -0
- package/dist/lib/chunk-JoinDialog.mjs +65 -0
- package/dist/lib/chunk-JoinDialog.mjs.map +1 -0
- package/dist/lib/chunk-MembersContainer.mjs +263 -0
- package/dist/lib/chunk-MembersContainer.mjs.map +1 -0
- package/dist/lib/chunk-MergePreview.mjs +91 -0
- package/dist/lib/chunk-MergePreview.mjs.map +1 -0
- package/dist/lib/chunk-ObjectCardStack.mjs +68 -0
- package/dist/lib/chunk-ObjectCardStack.mjs.map +1 -0
- package/dist/lib/chunk-RecordArticle.mjs +106 -0
- package/dist/lib/chunk-RecordArticle.mjs.map +1 -0
- package/dist/lib/chunk-RelatedArticle.mjs +71 -0
- package/dist/lib/chunk-RelatedArticle.mjs.map +1 -0
- package/dist/lib/chunk-RenamePopover.mjs +94 -0
- package/dist/lib/chunk-RenamePopover.mjs.map +1 -0
- package/dist/lib/chunk-SchemaContainer.mjs +53 -0
- package/dist/lib/chunk-SchemaContainer.mjs.map +1 -0
- package/dist/lib/chunk-SmallPresenceLive.mjs +2 -0
- package/dist/lib/chunk-SpaceHomeArticle.mjs +82 -0
- package/dist/lib/chunk-SpaceHomeArticle.mjs.map +1 -0
- package/dist/lib/chunk-SpaceHomeDashboard.mjs +96 -0
- package/dist/lib/chunk-SpaceHomeDashboard.mjs.map +1 -0
- package/dist/lib/chunk-SpaceHomeRecent.mjs +79 -0
- package/dist/lib/chunk-SpaceHomeRecent.mjs.map +1 -0
- package/dist/lib/chunk-SpacePlugin.mjs +97 -0
- package/dist/lib/chunk-SpacePlugin.mjs.map +1 -0
- package/dist/lib/chunk-SpacePresence.mjs +155 -0
- package/dist/lib/chunk-SpacePresence.mjs.map +1 -0
- package/dist/lib/chunk-SpaceSettings.mjs +63 -0
- package/dist/lib/chunk-SpaceSettings.mjs.map +1 -0
- package/dist/lib/chunk-SpaceSettingsContainer.mjs +278 -0
- package/dist/lib/chunk-SpaceSettingsContainer.mjs.map +1 -0
- package/dist/lib/chunk-SyncStatus.mjs +166 -0
- package/dist/lib/chunk-SyncStatus.mjs.map +1 -0
- package/dist/lib/chunk-TypeArticle.mjs +469 -0
- package/dist/lib/chunk-TypeArticle.mjs.map +1 -0
- package/dist/lib/chunk-ViewEditor.mjs +78 -0
- package/dist/lib/chunk-ViewEditor.mjs.map +1 -0
- package/dist/lib/chunk-add-object.mjs +74 -0
- package/dist/lib/chunk-add-object.mjs.map +1 -0
- package/dist/lib/chunk-add-relation.mjs +16 -0
- package/dist/lib/chunk-add-relation.mjs.map +1 -0
- package/dist/lib/chunk-add-type.mjs +41 -0
- package/dist/lib/chunk-add-type.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +1056 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-close.mjs +11 -0
- package/dist/lib/chunk-close.mjs.map +1 -0
- package/dist/lib/chunk-collection-path.mjs +65 -0
- package/dist/lib/chunk-collection-path.mjs.map +1 -0
- package/dist/lib/chunk-create-object.mjs +80 -0
- package/dist/lib/chunk-create-object.mjs.map +1 -0
- package/dist/lib/chunk-create.mjs +62 -0
- package/dist/lib/chunk-create.mjs.map +1 -0
- package/dist/lib/chunk-definitions.mjs +466 -0
- package/dist/lib/chunk-definitions.mjs.map +1 -0
- package/dist/lib/chunk-delete-field.mjs +52 -0
- package/dist/lib/chunk-delete-field.mjs.map +1 -0
- package/dist/lib/chunk-delete.mjs +11 -0
- package/dist/lib/chunk-delete.mjs.map +1 -0
- package/dist/lib/chunk-duplicate-object.mjs +11 -0
- package/dist/lib/chunk-duplicate-object.mjs.map +1 -0
- package/dist/lib/chunk-errors.mjs +10 -0
- package/dist/lib/chunk-errors.mjs.map +1 -0
- package/dist/lib/chunk-export-space.mjs +24 -0
- package/dist/lib/chunk-export-space.mjs.map +1 -0
- package/dist/lib/chunk-find-duplicates.mjs +19 -0
- package/dist/lib/chunk-find-duplicates.mjs.map +1 -0
- package/dist/lib/chunk-get-share-link.mjs +29 -0
- package/dist/lib/chunk-get-share-link.mjs.map +1 -0
- package/dist/lib/chunk-helpers.mjs +14 -0
- package/dist/lib/chunk-helpers.mjs.map +1 -0
- package/dist/lib/chunk-identity-created.mjs +26 -0
- package/dist/lib/chunk-identity-created.mjs.map +1 -0
- package/dist/lib/chunk-import-space.mjs +16 -0
- package/dist/lib/chunk-import-space.mjs.map +1 -0
- package/dist/lib/chunk-join.mjs +35 -0
- package/dist/lib/chunk-join.mjs.map +1 -0
- package/dist/lib/chunk-merge-duplicates.mjs +62 -0
- package/dist/lib/chunk-merge-duplicates.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-5ZZS3KMK.mjs → chunk-meta.mjs} +15 -24
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-migrate.mjs +45 -0
- package/dist/lib/chunk-migrate.mjs.map +1 -0
- package/dist/lib/chunk-navigation-handler.mjs +63 -0
- package/dist/lib/chunk-navigation-handler.mjs.map +1 -0
- package/dist/lib/chunk-navigation-target-resolver.mjs +79 -0
- package/dist/lib/chunk-navigation-target-resolver.mjs.map +1 -0
- package/dist/lib/chunk-open-create-object.mjs +32 -0
- package/dist/lib/chunk-open-create-object.mjs.map +1 -0
- package/dist/lib/chunk-open-create-space.mjs +16 -0
- package/dist/lib/chunk-open-create-space.mjs.map +1 -0
- package/dist/lib/chunk-open-import-space.mjs +16 -0
- package/dist/lib/chunk-open-import-space.mjs.map +1 -0
- package/dist/lib/chunk-open-members.mjs +15 -0
- package/dist/lib/chunk-open-members.mjs.map +1 -0
- package/dist/lib/chunk-open-settings.mjs +15 -0
- package/dist/lib/chunk-open-settings.mjs.map +1 -0
- package/dist/lib/chunk-open.mjs +11 -0
- package/dist/lib/chunk-open.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +13 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-react-root.mjs +20 -0
- package/dist/lib/chunk-react-root.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +384 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-remove-objects.mjs +83 -0
- package/dist/lib/chunk-remove-objects.mjs.map +1 -0
- package/dist/lib/chunk-rename-object.mjs +18 -0
- package/dist/lib/chunk-rename-object.mjs.map +1 -0
- package/dist/lib/chunk-rename.mjs +18 -0
- package/dist/lib/chunk-rename.mjs.map +1 -0
- package/dist/lib/chunk-repair.mjs +28 -0
- package/dist/lib/chunk-repair.mjs.map +1 -0
- package/dist/lib/chunk-restore-field.mjs +50 -0
- package/dist/lib/chunk-restore-field.mjs.map +1 -0
- package/dist/lib/chunk-restore-objects.mjs +33 -0
- package/dist/lib/chunk-restore-objects.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +23 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-share.mjs +23 -0
- package/dist/lib/chunk-share.mjs.map +1 -0
- package/dist/lib/chunk-snapshot.mjs +24 -0
- package/dist/lib/chunk-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-spaces-ready.mjs +242 -0
- package/dist/lib/chunk-spaces-ready.mjs.map +1 -0
- package/dist/lib/chunk-state.mjs +48 -0
- package/dist/lib/chunk-state.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +56 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-undo-mappings.mjs +40 -0
- package/dist/lib/chunk-undo-mappings.mjs.map +1 -0
- package/dist/lib/chunk-util.mjs +34 -0
- package/dist/lib/chunk-util.mjs.map +1 -0
- package/dist/lib/chunk-wait-for-object.mjs +16 -0
- package/dist/lib/chunk-wait-for-object.mjs.map +1 -0
- package/dist/lib/components.mjs +329 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-C2ULK22J.mjs → constants.mjs} +5 -10
- package/dist/lib/constants.mjs.map +1 -0
- package/dist/lib/containers.mjs +31 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/hooks.mjs +185 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +7 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +8 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/testing.mjs +2 -0
- package/dist/lib/translations.mjs +350 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +60 -0
- package/dist/lib/types.mjs.map +1 -0
- package/dist/types/src/SpacePlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/SpaceFormFields.d.ts +10 -0
- package/dist/types/src/capabilities/SpaceFormFields.d.ts.map +1 -0
- package/dist/types/src/capabilities/SpaceSurfaces.d.ts +50 -0
- package/dist/types/src/capabilities/SpaceSurfaces.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +6 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts +7 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts +2 -7
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts +3 -2
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +3 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-target-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/navigation-target-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/capabilities/try-get-view.d.ts +7 -0
- package/dist/types/src/capabilities/try-get-view.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +1 -1
- package/dist/types/src/collection-path.d.ts +28 -0
- package/dist/types/src/collection-path.d.ts.map +1 -0
- package/dist/types/src/collection-path.test.d.ts +2 -0
- package/dist/types/src/collection-path.test.d.ts.map +1 -0
- package/dist/types/src/commands/space/export/export.d.ts +23 -0
- package/dist/types/src/commands/space/export/export.d.ts.map +1 -0
- package/dist/types/src/commands/space/export/export.test.d.ts +2 -0
- package/dist/types/src/commands/space/export/export.test.d.ts.map +1 -0
- package/dist/types/src/commands/space/export/index.d.ts +2 -0
- package/dist/types/src/commands/space/export/index.d.ts.map +1 -0
- package/dist/types/src/commands/space/import/import.d.ts +17 -0
- package/dist/types/src/commands/space/import/import.d.ts.map +1 -0
- package/dist/types/src/commands/space/import/import.test.d.ts +2 -0
- package/dist/types/src/commands/space/import/import.test.d.ts.map +1 -0
- package/dist/types/src/commands/space/import/index.d.ts +2 -0
- package/dist/types/src/commands/space/import/index.d.ts.map +1 -0
- package/dist/types/src/commands/space/index.d.ts +8 -1
- package/dist/types/src/commands/space/index.d.ts.map +1 -1
- package/dist/types/src/components/AwaitingObject/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts +7 -4
- package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.test.d.ts +2 -0
- package/dist/types/src/components/SyncStatus/status.test.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts +4 -4
- package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionSection/CollectionSection.d.ts +4 -1
- package/dist/types/src/containers/CollectionSection/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts +4 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +420 -9
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts +4 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +423 -10
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ImportSpaceDialog/ImportSpaceDialog.d.ts +4 -1
- package/dist/types/src/containers/ImportSpaceDialog/ImportSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/containers/InlineSyncStatus/InlineSyncStatus.d.ts +5 -2
- package/dist/types/src/containers/InlineSyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts +4 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +423 -10
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts +4 -1
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/containers/MergePreview/MergePreview.d.ts +16 -0
- package/dist/types/src/containers/MergePreview/MergePreview.d.ts.map +1 -0
- package/dist/types/src/containers/MergePreview/index.d.ts +2 -0
- package/dist/types/src/containers/MergePreview/index.d.ts.map +1 -0
- package/dist/types/src/containers/ObjectCardStack/ObjectCardStack.d.ts +3 -2
- package/dist/types/src/containers/ObjectCardStack/ObjectCardStack.d.ts.map +1 -1
- package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts +4 -1
- package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RecordArticle/RecordArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts +4 -1
- package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +4 -4
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -1
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts +4 -7
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SchemaContainer/use-query-space-types.d.ts +7 -0
- package/dist/types/src/containers/SchemaContainer/use-query-space-types.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts +4 -11
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.stories.d.ts +14 -0
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.d.ts +15 -0
- package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.stories.d.ts +20 -0
- package/dist/types/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeDashboard/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomeDashboard/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts +5 -8
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts +7 -4
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +419 -9
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts +4 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.stories.d.ts +423 -10
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +419 -9
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.d.ts +7 -2
- package/dist/types/src/containers/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +434 -11
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TypeArticle/TypeArticle.d.ts +14 -0
- package/dist/types/src/containers/TypeArticle/TypeArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TypeArticle/TypeArticle.stories.d.ts +45 -0
- package/dist/types/src/containers/TypeArticle/TypeArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TypeArticle/duplicatesGroup.d.ts +19 -0
- package/dist/types/src/containers/TypeArticle/duplicatesGroup.d.ts.map +1 -0
- package/dist/types/src/containers/TypeArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TypeArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/TypeArticle/useDuplicates.d.ts +34 -0
- package/dist/types/src/containers/TypeArticle/useDuplicates.d.ts.map +1 -0
- package/dist/types/src/containers/ViewEditor/ViewEditor.d.ts +4 -1
- package/dist/types/src/containers/ViewEditor/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +3 -2
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +30 -0
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useEdgeStatus.d.ts +6 -0
- package/dist/types/src/hooks/useEdgeStatus.d.ts.map +1 -0
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/useStalled.d.ts +13 -0
- package/dist/types/src/hooks/useStalled.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +29 -1
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/find-duplicates.d.ts +5 -0
- package/dist/types/src/operations/find-duplicates.d.ts.map +1 -0
- package/dist/types/src/operations/helpers.d.ts +3 -0
- package/dist/types/src/operations/helpers.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/join.d.ts.map +1 -1
- package/dist/types/src/operations/merge-duplicates.d.ts +5 -0
- package/dist/types/src/operations/merge-duplicates.d.ts.map +1 -0
- package/dist/types/src/operations/open-settings.d.ts.map +1 -1
- package/dist/types/src/operations/remove-objects.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +419 -9
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/type-section-path.d.ts +22 -0
- package/dist/types/src/type-section-path.d.ts.map +1 -0
- package/dist/types/src/type-section-path.test.d.ts +2 -0
- package/dist/types/src/type-section-path.test.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +22 -2
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/surface.d.ts +4 -4
- package/dist/types/src/types/surface.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +6 -0
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +87 -72
- package/src/SpacePlugin.ts +6 -6
- package/src/SpacePlugin.workerd.ts +3 -1
- package/src/capabilities/SpaceFormFields.tsx +72 -0
- package/src/capabilities/SpaceSurfaces.tsx +219 -0
- package/src/capabilities/app-graph-builder/extensions/collections.ts +74 -21
- package/src/capabilities/app-graph-builder/extensions/companions.ts +10 -5
- package/src/capabilities/app-graph-builder/extensions/database.ts +64 -57
- package/src/capabilities/app-graph-builder/extensions/settings.ts +23 -13
- package/src/capabilities/app-graph-builder/extensions/shared.ts +3 -2
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +6 -7
- package/src/capabilities/create-object.ts +1 -14
- package/src/capabilities/index.ts +4 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +27 -7
- package/src/capabilities/navigation-target-resolver.ts +77 -0
- package/src/capabilities/react-surface.ts +274 -0
- package/src/capabilities/spaces-ready.ts +31 -18
- package/src/capabilities/state.ts +3 -1
- package/src/capabilities/try-get-view.ts +24 -0
- package/src/collection-path.test.ts +161 -0
- package/src/collection-path.ts +97 -0
- package/src/commands/space/export/export.test.ts +68 -0
- package/src/commands/space/export/export.ts +118 -0
- package/src/commands/space/export/index.ts +5 -0
- package/src/commands/space/import/import.test.ts +80 -0
- package/src/commands/space/import/import.ts +65 -0
- package/src/commands/space/import/index.ts +5 -0
- package/src/commands/space/index.ts +16 -1
- package/src/components/AwaitingObject/AwaitingObject.tsx +10 -4
- package/src/components/CreateObjectPanel/CreateObjectPanel.tsx +16 -18
- package/src/components/SyncStatus/status.test.ts +49 -0
- package/src/components/SyncStatus/status.ts +25 -12
- package/src/containers/CollectionArticle/CollectionArticle.tsx +5 -3
- package/src/containers/CollectionSection/CollectionSection.tsx +2 -0
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +18 -4
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +13 -17
- package/src/containers/CreateSpaceDialog/CreateSpaceDialog.tsx +28 -19
- package/src/containers/DefaultProperties/DefaultProperties.tsx +4 -2
- package/src/containers/ImportSpaceDialog/ImportSpaceDialog.tsx +4 -2
- package/src/containers/InlineSyncStatus/InlineSyncStatus.tsx +7 -17
- package/src/containers/JoinDialog/JoinDialog.tsx +5 -3
- package/src/containers/MembersContainer/MembersContainer.tsx +2 -0
- package/src/containers/MergePreview/MergePreview.tsx +90 -0
- package/src/containers/MergePreview/index.ts +5 -0
- package/src/containers/ObjectCardStack/ObjectCardStack.tsx +46 -43
- package/src/containers/RecordArticle/RecordArticle.stories.tsx +2 -1
- package/src/containers/RecordArticle/RecordArticle.tsx +8 -4
- package/src/containers/RelatedArticle/RelatedArticle.tsx +7 -3
- package/src/containers/RenamePopover/RenamePopover.tsx +2 -0
- package/src/containers/SchemaContainer/SchemaContainer.tsx +4 -17
- package/src/containers/SchemaContainer/use-query-space-types.ts +28 -0
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.stories.tsx +116 -0
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +6 -5
- package/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.stories.tsx +99 -0
- package/src/containers/SpaceHomeDashboard/SpaceHomeDashboard.tsx +109 -0
- package/src/containers/SpaceHomeDashboard/index.ts +5 -0
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +17 -15
- package/src/containers/SpacePresence/SpacePresence.stories.tsx +4 -4
- package/src/containers/SpacePresence/SpacePresence.tsx +37 -36
- package/src/containers/SpaceSettings/SpaceSettings.tsx +3 -1
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +7 -2
- package/src/containers/SyncStatus/SyncStatus.stories.tsx +80 -1
- package/src/containers/SyncStatus/SyncStatus.tsx +36 -46
- package/src/containers/TypeArticle/TypeArticle.stories.tsx +249 -0
- package/src/containers/TypeArticle/TypeArticle.tsx +362 -0
- package/src/containers/TypeArticle/duplicatesGroup.tsx +150 -0
- package/src/containers/TypeArticle/index.ts +5 -0
- package/src/containers/TypeArticle/useDuplicates.ts +119 -0
- package/src/containers/ViewEditor/ViewEditor.tsx +3 -1
- package/src/containers/index.ts +3 -2
- package/src/errors.ts +6 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useEdgeStatus.ts +40 -0
- package/src/hooks/useInputSurfaceLookup.tsx +5 -4
- package/src/hooks/useRelatedObjects.ts +1 -1
- package/src/hooks/useStalled.ts +39 -0
- package/src/operations/add-object.ts +7 -7
- package/src/operations/create.ts +11 -3
- package/src/operations/definitions.ts +54 -1
- package/src/operations/find-duplicates.ts +33 -0
- package/src/operations/get-share-link.ts +1 -1
- package/src/operations/helpers.ts +11 -0
- package/src/operations/index.ts +2 -0
- package/src/operations/join.ts +6 -5
- package/src/operations/merge-duplicates.ts +51 -0
- package/src/operations/open-members.ts +3 -3
- package/src/operations/open-settings.ts +5 -3
- package/src/operations/remove-objects.ts +42 -3
- package/src/translations.ts +52 -11
- package/src/type-section-path.test.ts +48 -0
- package/src/type-section-path.ts +39 -0
- package/src/types/capabilities.ts +26 -2
- package/src/types/surface.ts +4 -8
- package/src/types/types.ts +7 -0
- package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs +0 -93
- package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs.map +0 -7
- package/dist/lib/neutral/CollectionSection-BLYTGOKH.mjs +0 -19
- package/dist/lib/neutral/CollectionSection-BLYTGOKH.mjs.map +0 -7
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs +0 -221
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +0 -7
- package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs +0 -61
- package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs.map +0 -7
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +0 -58
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +0 -7
- package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs +0 -64
- package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs.map +0 -7
- package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs +0 -49
- package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs +0 -97
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs +0 -231
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +0 -7
- package/dist/lib/neutral/MenuFooter-FWE5LFM4.mjs +0 -33
- package/dist/lib/neutral/MenuFooter-FWE5LFM4.mjs.map +0 -7
- package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs +0 -55
- package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs.map +0 -7
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs +0 -102
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs +0 -69
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +0 -7
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs +0 -104
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs +0 -53
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +0 -7
- package/dist/lib/neutral/SmallPresenceLive-FW3AMEY5.mjs +0 -8
- package/dist/lib/neutral/SmallPresenceLive-FW3AMEY5.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs +0 -78
- package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs +0 -89
- package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs.map +0 -7
- package/dist/lib/neutral/SpacePlugin.mjs +0 -10
- package/dist/lib/neutral/SpacePlugin.mjs.map +0 -7
- package/dist/lib/neutral/SpacePlugin.node.mjs +0 -838
- package/dist/lib/neutral/SpacePlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/SpacePlugin.workerd.mjs +0 -34
- package/dist/lib/neutral/SpacePlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/SpacePresence-T37WH43Y.mjs +0 -11
- package/dist/lib/neutral/SpacePresence-T37WH43Y.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs +0 -60
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs +0 -279
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +0 -7
- package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs +0 -147
- package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs.map +0 -7
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +0 -143
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +0 -7
- package/dist/lib/neutral/ViewEditor-QXRUOKXR.mjs +0 -101
- package/dist/lib/neutral/ViewEditor-QXRUOKXR.mjs.map +0 -7
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs +0 -77
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +0 -7
- package/dist/lib/neutral/add-relation-BGTLART5.mjs +0 -26
- package/dist/lib/neutral/add-relation-BGTLART5.mjs.map +0 -7
- package/dist/lib/neutral/add-type-JIDLRANR.mjs +0 -57
- package/dist/lib/neutral/add-type-JIDLRANR.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs +0 -1332
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -46
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/node.mjs +0 -15
- package/dist/lib/neutral/capabilities/node.mjs.map +0 -7
- package/dist/lib/neutral/chunk-52ASDNRA.mjs +0 -41
- package/dist/lib/neutral/chunk-52ASDNRA.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs.map +0 -7
- package/dist/lib/neutral/chunk-C2ULK22J.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs +0 -115
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +0 -7
- package/dist/lib/neutral/chunk-G2KHP7FX.mjs +0 -8
- package/dist/lib/neutral/chunk-G2KHP7FX.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs +0 -572
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs +0 -167
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-SPWAMXNR.mjs +0 -131
- package/dist/lib/neutral/chunk-SPWAMXNR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-U5WTDOMV.mjs +0 -8
- package/dist/lib/neutral/chunk-U5WTDOMV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-V7JALUM3.mjs +0 -9
- package/dist/lib/neutral/chunk-V7JALUM3.mjs.map +0 -7
- package/dist/lib/neutral/close-5WEQZRNK.mjs +0 -17
- package/dist/lib/neutral/close-5WEQZRNK.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -401
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/constants.mjs +0 -16
- package/dist/lib/neutral/constants.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -55
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/create-QZ47FHQU.mjs +0 -75
- package/dist/lib/neutral/create-QZ47FHQU.mjs.map +0 -7
- package/dist/lib/neutral/create-object-ZU6FZW5X.mjs +0 -96
- package/dist/lib/neutral/create-object-ZU6FZW5X.mjs.map +0 -7
- package/dist/lib/neutral/delete-SPCU2VFM.mjs +0 -17
- package/dist/lib/neutral/delete-SPCU2VFM.mjs.map +0 -7
- package/dist/lib/neutral/delete-field-TAKJVEAD.mjs +0 -42
- package/dist/lib/neutral/delete-field-TAKJVEAD.mjs.map +0 -7
- package/dist/lib/neutral/duplicate-object-BUPZOO6S.mjs +0 -17
- package/dist/lib/neutral/duplicate-object-BUPZOO6S.mjs.map +0 -7
- package/dist/lib/neutral/export-space-S5SCAL4M.mjs +0 -34
- package/dist/lib/neutral/export-space-S5SCAL4M.mjs.map +0 -7
- package/dist/lib/neutral/get-share-link-CLM5IQRL.mjs +0 -41
- package/dist/lib/neutral/get-share-link-CLM5IQRL.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -133
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/identity-created-BEYMLBK4.mjs +0 -32
- package/dist/lib/neutral/identity-created-BEYMLBK4.mjs.map +0 -7
- package/dist/lib/neutral/import-space-LJQK3KT7.mjs +0 -28
- package/dist/lib/neutral/import-space-LJQK3KT7.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -62
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/join-FSODYIOC.mjs +0 -54
- package/dist/lib/neutral/join-FSODYIOC.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -8
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/migrate-WHM6LU7L.mjs +0 -52
- package/dist/lib/neutral/migrate-WHM6LU7L.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs +0 -44
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs +0 -82
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +0 -7
- package/dist/lib/neutral/open-JCXTL3SK.mjs +0 -17
- package/dist/lib/neutral/open-JCXTL3SK.mjs.map +0 -7
- package/dist/lib/neutral/open-create-object-WAIAU7TA.mjs +0 -42
- package/dist/lib/neutral/open-create-object-WAIAU7TA.mjs.map +0 -7
- package/dist/lib/neutral/open-create-space-VU47FWPZ.mjs +0 -24
- package/dist/lib/neutral/open-create-space-VU47FWPZ.mjs.map +0 -7
- package/dist/lib/neutral/open-import-space-GUHIEWYB.mjs +0 -24
- package/dist/lib/neutral/open-import-space-GUHIEWYB.mjs.map +0 -7
- package/dist/lib/neutral/open-members-MLLBHKUU.mjs +0 -23
- package/dist/lib/neutral/open-members-MLLBHKUU.mjs.map +0 -7
- package/dist/lib/neutral/open-settings-DTPZF4U4.mjs +0 -23
- package/dist/lib/neutral/open-settings-DTPZF4U4.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-YPIRQOH2.mjs +0 -13
- package/dist/lib/neutral/operation-handler-YPIRQOH2.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -13
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -18
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-root-YLYRCSAZ.mjs +0 -23
- package/dist/lib/neutral/react-root-YLYRCSAZ.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs +0 -367
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +0 -7
- package/dist/lib/neutral/remove-objects-WEO66EDS.mjs +0 -55
- package/dist/lib/neutral/remove-objects-WEO66EDS.mjs.map +0 -7
- package/dist/lib/neutral/rename-Q6UNCBIM.mjs +0 -26
- package/dist/lib/neutral/rename-Q6UNCBIM.mjs.map +0 -7
- package/dist/lib/neutral/rename-object-2UCEGU7U.mjs +0 -26
- package/dist/lib/neutral/rename-object-2UCEGU7U.mjs.map +0 -7
- package/dist/lib/neutral/repair-HMH476U3.mjs +0 -32
- package/dist/lib/neutral/repair-HMH476U3.mjs.map +0 -7
- package/dist/lib/neutral/restore-field-6CQAFOXY.mjs +0 -40
- package/dist/lib/neutral/restore-field-6CQAFOXY.mjs.map +0 -7
- package/dist/lib/neutral/restore-objects-3VINLP7C.mjs +0 -39
- package/dist/lib/neutral/restore-objects-3VINLP7C.mjs.map +0 -7
- package/dist/lib/neutral/settings-5IBSYBVU.mjs +0 -28
- package/dist/lib/neutral/settings-5IBSYBVU.mjs.map +0 -7
- package/dist/lib/neutral/share-A4WPILNF.mjs +0 -31
- package/dist/lib/neutral/share-A4WPILNF.mjs.map +0 -7
- package/dist/lib/neutral/snapshot-HBYMAPA7.mjs +0 -30
- package/dist/lib/neutral/snapshot-HBYMAPA7.mjs.map +0 -7
- package/dist/lib/neutral/spaces-ready-GWMSU72V.mjs +0 -281
- package/dist/lib/neutral/spaces-ready-GWMSU72V.mjs.map +0 -7
- package/dist/lib/neutral/state-KMH2NUAL.mjs +0 -55
- package/dist/lib/neutral/state-KMH2NUAL.mjs.map +0 -7
- package/dist/lib/neutral/testing.mjs +0 -8
- package/dist/lib/neutral/testing.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -315
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -40
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/lib/neutral/undo-mappings-P43EAUGI.mjs +0 -68
- package/dist/lib/neutral/undo-mappings-P43EAUGI.mjs.map +0 -7
- package/dist/lib/neutral/wait-for-object-U6P2NNWY.mjs +0 -23
- package/dist/lib/neutral/wait-for-object-U6P2NNWY.mjs.map +0 -7
- package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
- package/dist/types/src/containers/MenuFooter/MenuFooter.d.ts +0 -6
- package/dist/types/src/containers/MenuFooter/MenuFooter.d.ts.map +0 -1
- package/dist/types/src/containers/MenuFooter/index.d.ts +0 -2
- package/dist/types/src/containers/MenuFooter/index.d.ts.map +0 -1
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts +0 -16
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts.map +0 -1
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts +0 -21
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts.map +0 -1
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts +0 -2
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts.map +0 -1
- package/src/capabilities/navigation-resolver.ts +0 -94
- package/src/capabilities/react-surface.tsx +0 -395
- package/src/containers/MenuFooter/MenuFooter.tsx +0 -33
- package/src/containers/MenuFooter/index.ts +0 -5
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.tsx +0 -116
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.tsx +0 -162
- 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,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.'));
|
|
@@ -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([
|
|
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 {
|
|
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
|
-
|
|
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) {
|