@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,150 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { useAtomCapabilityState } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
|
|
9
|
+
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
|
|
12
|
+
import { SpaceCapabilities } from '../../types';
|
|
13
|
+
import { type UseDuplicatesResult, buildMergePreview } from './useDuplicates';
|
|
14
|
+
|
|
15
|
+
export type UseDuplicatesGroupOptions = {
|
|
16
|
+
/** URI of the type under review; scopes the staged preview to this article. */
|
|
17
|
+
typeUri: string;
|
|
18
|
+
typename: string;
|
|
19
|
+
duplicates: UseDuplicatesResult;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Toolbar subgraph for the duplicates review: Merge stages a preview into the companion, Skip and
|
|
24
|
+
* the arrows walk the groups, and the trailing gap separator pushes whatever follows (the layout
|
|
25
|
+
* toggle) to the far end. Merge never writes — it stages a detached preview the companion confirms,
|
|
26
|
+
* so backing out of a review leaves the space untouched.
|
|
27
|
+
*
|
|
28
|
+
* Compose via `MenuBuilder.subgraph(...)` so the whole toolbar is one action graph rather than
|
|
29
|
+
* several nested `Toolbar.Root`s.
|
|
30
|
+
*/
|
|
31
|
+
export const useDuplicatesGroup = ({
|
|
32
|
+
typeUri,
|
|
33
|
+
typename,
|
|
34
|
+
duplicates,
|
|
35
|
+
}: UseDuplicatesGroupOptions): ActionGroupBuilderFn => {
|
|
36
|
+
const [, updateEphemeral] = useAtomCapabilityState(SpaceCapabilities.EphemeralState);
|
|
37
|
+
const { spec, current, position, total, scanning, next, previous, refresh } = duplicates;
|
|
38
|
+
|
|
39
|
+
// Every control that changes which group is under review drops the staged preview: it belongs to
|
|
40
|
+
// the group it was raised from, and leaving it up would show the companion previewing one group
|
|
41
|
+
// while the article shows another.
|
|
42
|
+
const clearPreview = useCallback(
|
|
43
|
+
() => updateEphemeral((state) => ({ ...state, mergePreview: undefined })),
|
|
44
|
+
[updateEphemeral],
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const handleMerge = useCallback(() => {
|
|
48
|
+
const preview = buildMergePreview(spec, current);
|
|
49
|
+
if (!preview) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
updateEphemeral((state) => ({
|
|
53
|
+
...state,
|
|
54
|
+
mergePreview: { typeUri, typename, objectIds: current.map((object) => object.id), preview },
|
|
55
|
+
}));
|
|
56
|
+
}, [updateEphemeral, spec, current, typeUri, typename]);
|
|
57
|
+
|
|
58
|
+
// Skip and the next arrow are the same move — advance past the group without writing.
|
|
59
|
+
const handleAdvance = useCallback(() => {
|
|
60
|
+
clearPreview();
|
|
61
|
+
next();
|
|
62
|
+
}, [clearPreview, next]);
|
|
63
|
+
|
|
64
|
+
const handlePrevious = useCallback(() => {
|
|
65
|
+
clearPreview();
|
|
66
|
+
previous();
|
|
67
|
+
}, [clearPreview, previous]);
|
|
68
|
+
|
|
69
|
+
const handleRefresh = useCallback(() => {
|
|
70
|
+
clearPreview();
|
|
71
|
+
refresh();
|
|
72
|
+
}, [clearPreview, refresh]);
|
|
73
|
+
|
|
74
|
+
return useMemo(
|
|
75
|
+
() => (builder) => {
|
|
76
|
+
builder
|
|
77
|
+
.action(
|
|
78
|
+
'merge',
|
|
79
|
+
{
|
|
80
|
+
label: ['merge-duplicates.label', { ns: meta.profile.key }],
|
|
81
|
+
icon: 'ph--arrows-merge--regular',
|
|
82
|
+
variant: 'primary',
|
|
83
|
+
iconOnly: false,
|
|
84
|
+
disabled: current.length < 2,
|
|
85
|
+
},
|
|
86
|
+
handleMerge,
|
|
87
|
+
)
|
|
88
|
+
.action(
|
|
89
|
+
'skip',
|
|
90
|
+
{
|
|
91
|
+
label: ['skip-duplicates.label', { ns: meta.profile.key }],
|
|
92
|
+
iconOnly: false,
|
|
93
|
+
// Same bound as the next arrow: skipping past the last group left the counter out of range.
|
|
94
|
+
disabled: position >= total,
|
|
95
|
+
},
|
|
96
|
+
handleAdvance,
|
|
97
|
+
)
|
|
98
|
+
.action(
|
|
99
|
+
'rescan',
|
|
100
|
+
{
|
|
101
|
+
label: ['rescan-duplicates.label', { ns: meta.profile.key }],
|
|
102
|
+
icon: 'ph--arrows-clockwise--regular',
|
|
103
|
+
disabled: scanning,
|
|
104
|
+
spin: scanning,
|
|
105
|
+
},
|
|
106
|
+
handleRefresh,
|
|
107
|
+
)
|
|
108
|
+
.subgraph((builder) =>
|
|
109
|
+
total === 0
|
|
110
|
+
? []
|
|
111
|
+
: builder
|
|
112
|
+
.action(
|
|
113
|
+
'previous',
|
|
114
|
+
{
|
|
115
|
+
label: ['previous-duplicate.label', { ns: meta.profile.key }],
|
|
116
|
+
icon: 'ph--caret-left--regular',
|
|
117
|
+
disabled: position <= 1,
|
|
118
|
+
},
|
|
119
|
+
handlePrevious,
|
|
120
|
+
)
|
|
121
|
+
.action(
|
|
122
|
+
'position',
|
|
123
|
+
{
|
|
124
|
+
// The group counter is not an action; `custom` lets the graph carry it so the toolbar stays
|
|
125
|
+
// a single menu rather than a menu plus a hand-rolled toolbar for one label.
|
|
126
|
+
variant: 'custom',
|
|
127
|
+
label: ['duplicates-position.label', { ns: meta.profile.key }],
|
|
128
|
+
render: () => (
|
|
129
|
+
<span className='text-description text-sm tabular-nums'>
|
|
130
|
+
{position} / {total}
|
|
131
|
+
</span>
|
|
132
|
+
),
|
|
133
|
+
},
|
|
134
|
+
() => {},
|
|
135
|
+
)
|
|
136
|
+
.action(
|
|
137
|
+
'next',
|
|
138
|
+
{
|
|
139
|
+
label: ['next-duplicate.label', { ns: meta.profile.key }],
|
|
140
|
+
icon: 'ph--caret-right--regular',
|
|
141
|
+
disabled: position >= total,
|
|
142
|
+
},
|
|
143
|
+
handleAdvance,
|
|
144
|
+
),
|
|
145
|
+
)
|
|
146
|
+
.separator();
|
|
147
|
+
},
|
|
148
|
+
[current.length, position, total, scanning, handleMerge, handleAdvance, handlePrevious, handleRefresh],
|
|
149
|
+
);
|
|
150
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { useAtomCapability, useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { Obj, Type } from '@dxos/echo';
|
|
9
|
+
import { type IdentitySpec, planMerge } from '@dxos/extractor';
|
|
10
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
11
|
+
|
|
12
|
+
import { SpaceOperation } from '../../operations/definitions';
|
|
13
|
+
import { SpaceCapabilities } from '../../types';
|
|
14
|
+
|
|
15
|
+
export type UseDuplicatesProps = {
|
|
16
|
+
space: Space;
|
|
17
|
+
type: Type.AnyEntity;
|
|
18
|
+
/** Live query results, so a group resolves to reactive objects rather than the scan's snapshots. */
|
|
19
|
+
objects: readonly Obj.Unknown[];
|
|
20
|
+
/** Scan only while the duplicates layout is showing. */
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type UseDuplicatesResult = {
|
|
25
|
+
/** `undefined` when no plugin registered an identity rule for this type — the tab is then hidden. */
|
|
26
|
+
spec: IdentitySpec<any> | undefined;
|
|
27
|
+
/** Members of the group under review, or `[]` when the review is finished. */
|
|
28
|
+
current: Obj.Unknown[];
|
|
29
|
+
/** 1-based position of the current group, for the toolbar counter. */
|
|
30
|
+
position: number;
|
|
31
|
+
total: number;
|
|
32
|
+
scanning: boolean;
|
|
33
|
+
next: () => void;
|
|
34
|
+
previous: () => void;
|
|
35
|
+
/** Re-runs the scan (after a merge, or when re-entering the tab). */
|
|
36
|
+
refresh: () => void;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Drives the duplicates review: runs `FindDuplicates` for the type, then walks the returned groups
|
|
41
|
+
* one at a time. Groups are held as ids and resolved against the live query on every render, so a
|
|
42
|
+
* merged-away member disappears from the current group without a rescan.
|
|
43
|
+
*/
|
|
44
|
+
export const useDuplicates = ({ space, type, objects, enabled }: UseDuplicatesProps): UseDuplicatesResult => {
|
|
45
|
+
const { invokePromise } = useOperationInvoker();
|
|
46
|
+
const specs = useCapabilities(SpaceCapabilities.IdentitySpec);
|
|
47
|
+
const typename = Type.getTypename(type);
|
|
48
|
+
const spec = useMemo(
|
|
49
|
+
() => specs.find((candidate) => Type.getTypename(candidate.type) === typename),
|
|
50
|
+
[specs, typename],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const [groups, setGroups] = useState<readonly SpaceOperation.DuplicateGroupResult[]>([]);
|
|
54
|
+
const [index, setIndex] = useState(0);
|
|
55
|
+
const [scanning, setScanning] = useState(false);
|
|
56
|
+
// Rescan is a button a user can hit repeatedly, and a merge triggers its own refresh, so responses
|
|
57
|
+
// can land out of order; only the newest request is allowed to write.
|
|
58
|
+
const request = useRef(0);
|
|
59
|
+
const { lastMergeAt } = useAtomCapability(SpaceCapabilities.EphemeralState);
|
|
60
|
+
|
|
61
|
+
const refresh = useCallback(() => {
|
|
62
|
+
if (!spec) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
setScanning(true);
|
|
66
|
+
const current = ++request.current;
|
|
67
|
+
void invokePromise(SpaceOperation.FindDuplicates, { typename }, { spaceId: space.id })
|
|
68
|
+
.then(({ data }) => {
|
|
69
|
+
if (current !== request.current) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
setGroups(data?.groups ?? []);
|
|
73
|
+
setIndex(0);
|
|
74
|
+
})
|
|
75
|
+
.finally(() => {
|
|
76
|
+
if (current === request.current) {
|
|
77
|
+
setScanning(false);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}, [invokePromise, spec, typename, space.id]);
|
|
81
|
+
|
|
82
|
+
// `lastMergeAt` is a dependency, not a read: a committed merge invalidates the scan.
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
if (enabled) {
|
|
85
|
+
refresh();
|
|
86
|
+
}
|
|
87
|
+
}, [enabled, refresh, lastMergeAt]);
|
|
88
|
+
|
|
89
|
+
const byId = useMemo(() => new Map(objects.map((object) => [object.id, object])), [objects]);
|
|
90
|
+
const current = useMemo(() => {
|
|
91
|
+
const group = groups[index];
|
|
92
|
+
return group ? group.objectIds.flatMap((id) => byId.get(id) ?? []) : [];
|
|
93
|
+
}, [groups, index, byId]);
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
spec,
|
|
97
|
+
current,
|
|
98
|
+
position: groups.length === 0 ? 0 : index + 1,
|
|
99
|
+
total: groups.length,
|
|
100
|
+
scanning,
|
|
101
|
+
// Clamp at the last valid index, not at `groups.length`: `position` is `index + 1`, so one past
|
|
102
|
+
// the end rendered an impossible counter ("4 / 3") when Skip was pressed on the last group.
|
|
103
|
+
next: useCallback(() => setIndex((value) => Math.min(value + 1, Math.max(groups.length - 1, 0))), [groups.length]),
|
|
104
|
+
previous: useCallback(() => setIndex((value) => Math.max(value - 1, 0)), []),
|
|
105
|
+
refresh,
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** Builds the detached preview for the group under review; `undefined` when there is nothing to merge. */
|
|
110
|
+
export const buildMergePreview = (
|
|
111
|
+
spec: IdentitySpec<any> | undefined,
|
|
112
|
+
objects: readonly Obj.Unknown[],
|
|
113
|
+
): Obj.Unknown | undefined => {
|
|
114
|
+
if (!spec || objects.length < 2) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
const { preview } = planMerge(spec, { keys: [], objects });
|
|
118
|
+
return Obj.isObject(preview) ? preview : undefined;
|
|
119
|
+
};
|
|
@@ -8,9 +8,9 @@ import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
|
8
8
|
import { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';
|
|
9
9
|
import { useTypeOptions } from '@dxos/app-toolkit/ui';
|
|
10
10
|
import { EID, Filter, Obj, Query, type QueryAST, Scope, Tag, Type, type View } from '@dxos/echo';
|
|
11
|
+
import { useQuery } from '@dxos/echo-react';
|
|
11
12
|
import { type Mutable } from '@dxos/echo/Obj';
|
|
12
13
|
import { useClient } from '@dxos/react-client';
|
|
13
|
-
import { useQuery } from '@dxos/react-client/echo';
|
|
14
14
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
15
15
|
import { ViewEditor as NaturalViewEditor } from '@dxos/react-ui-form';
|
|
16
16
|
import { ViewModel } from '@dxos/schema';
|
|
@@ -98,3 +98,5 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
98
98
|
/>
|
|
99
99
|
);
|
|
100
100
|
};
|
|
101
|
+
|
|
102
|
+
ViewEditor.displayName = 'ViewEditor';
|
package/src/containers/index.ts
CHANGED
|
@@ -16,7 +16,7 @@ export const ImportSpaceDialog: ComponentType<any> = lazy(() => import('./Import
|
|
|
16
16
|
export const InlineSyncStatus: ComponentType<any> = lazy(() => import('./InlineSyncStatus'));
|
|
17
17
|
export const JoinDialog: ComponentType<any> = lazy(() => import('./JoinDialog'));
|
|
18
18
|
export const MembersContainer: ComponentType<any> = lazy(() => import('./MembersContainer'));
|
|
19
|
-
export const
|
|
19
|
+
export const MergePreview: ComponentType<any> = lazy(() => import('./MergePreview'));
|
|
20
20
|
export const ObjectCardStack: ComponentType<any> = lazy(() => import('./ObjectCardStack'));
|
|
21
21
|
export const RecordArticle: ComponentType<any> = lazy(() => import('./RecordArticle'));
|
|
22
22
|
export const RelatedArticle: ComponentType<any> = lazy(() => import('./RelatedArticle'));
|
|
@@ -25,9 +25,10 @@ export const SchemaContainer: ComponentType<any> = lazy(() => import('./SchemaCo
|
|
|
25
25
|
export const SmallPresenceLive: ComponentType<any> = lazy(() => import('./SmallPresenceLive'));
|
|
26
26
|
export const SpacePresence: ComponentType<any> = lazy(() => import('./SpacePresence'));
|
|
27
27
|
export const SpaceHomeArticle: ComponentType<any> = lazy(() => import('./SpaceHomeArticle'));
|
|
28
|
+
export const SpaceHomeDashboard: ComponentType<any> = lazy(() => import('./SpaceHomeDashboard'));
|
|
28
29
|
export const SpaceHomeRecent: ComponentType<any> = lazy(() => import('./SpaceHomeRecent'));
|
|
29
30
|
export const SpaceSettings: ComponentType<any> = lazy(() => import('./SpaceSettings'));
|
|
30
31
|
export const SpaceSettingsContainer: ComponentType<any> = lazy(() => import('./SpaceSettingsContainer'));
|
|
31
32
|
export const SyncStatus: ComponentType<any> = lazy(() => import('./SyncStatus'));
|
|
32
|
-
export const
|
|
33
|
+
export const TypeArticle: ComponentType<any> = lazy(() => import('./TypeArticle'));
|
|
33
34
|
export const ViewEditor: ComponentType<any> = lazy(() => import('./ViewEditor'));
|
package/src/errors.ts
CHANGED
|
@@ -9,3 +9,9 @@ export class NoIdentityError extends BaseError.extend(
|
|
|
9
9
|
'NoIdentityError',
|
|
10
10
|
'A local identity is required to accept a space invitation.',
|
|
11
11
|
) {}
|
|
12
|
+
|
|
13
|
+
/** The space's properties object never became available, so it cannot be safely used yet. */
|
|
14
|
+
export class SpaceNotReadyError extends BaseError.extend(
|
|
15
|
+
'SpaceNotReadyError',
|
|
16
|
+
'Timed out waiting for the space to finish initializing.',
|
|
17
|
+
) {}
|
package/src/hooks/index.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { log } from '@dxos/log';
|
|
8
|
+
import { EdgeStatus } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
|
+
import { useClient } from '@dxos/react-client';
|
|
10
|
+
|
|
11
|
+
const NOT_CONNECTED: EdgeStatus = {
|
|
12
|
+
state: EdgeStatus.ConnectionState.NOT_CONNECTED,
|
|
13
|
+
rtt: 0,
|
|
14
|
+
uptime: 0,
|
|
15
|
+
rateBytesUp: 0,
|
|
16
|
+
rateBytesDown: 0,
|
|
17
|
+
messagesSent: 0,
|
|
18
|
+
messagesReceived: 0,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Subscribes to the EDGE connection status, which the client refreshes about once a second while connected.
|
|
23
|
+
*/
|
|
24
|
+
export const useEdgeStatus = (): EdgeStatus => {
|
|
25
|
+
const client = useClient();
|
|
26
|
+
const [status, setStatus] = useState<EdgeStatus>(NOT_CONNECTED);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const stream = client.services.services.EdgeAgentService?.queryEdgeStatus();
|
|
29
|
+
stream?.subscribe(
|
|
30
|
+
({ status }) => setStatus(status),
|
|
31
|
+
(err) => err && log.catch(err),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return () => {
|
|
35
|
+
void stream?.close();
|
|
36
|
+
};
|
|
37
|
+
}, [client]);
|
|
38
|
+
|
|
39
|
+
return status;
|
|
40
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { type FormFieldProvider } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ import { type FormFieldProvider } from '@dxos/react-ui-form';
|
|
|
15
15
|
*/
|
|
16
16
|
// TODO(burdon): Factor out?
|
|
17
17
|
export const useInputSurfaceLookup = (baseData?: Record<string, any>): FormFieldProvider => {
|
|
18
|
-
const
|
|
18
|
+
const isSurfaceAvailable = Surface.useIsAvailable();
|
|
19
19
|
return useCallback<FormFieldProvider>(
|
|
20
20
|
({ schema, prop, fieldProps }) => {
|
|
21
21
|
const data = {
|
|
@@ -25,11 +25,12 @@ export const useInputSurfaceLookup = (baseData?: Record<string, any>): FormField
|
|
|
25
25
|
fieldPropertyAst: fieldProps.type,
|
|
26
26
|
...baseData,
|
|
27
27
|
};
|
|
28
|
+
|
|
28
29
|
const { type: _fieldPropertyAstExcluded, ...surfaceFieldProps } = fieldProps as Record<string, any>;
|
|
29
|
-
if (
|
|
30
|
+
if (isSurfaceAvailable({ type: AppSurface.FormInput, data })) {
|
|
30
31
|
return <Surface.Surface type={AppSurface.FormInput} data={data} {...surfaceFieldProps} />;
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
|
-
[
|
|
34
|
+
[isSurfaceAvailable, baseData],
|
|
34
35
|
);
|
|
35
36
|
};
|
|
@@ -6,8 +6,8 @@ import * as Option from 'effect/Option';
|
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type Database, Entity, Filter, Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
9
|
+
import { useQuery } from '@dxos/echo-react';
|
|
9
10
|
import { HiddenAnnotation } from '@dxos/echo/Annotation';
|
|
10
|
-
import { useQuery } from '@dxos/react-client/echo';
|
|
11
11
|
import { isNonNullable } from '@dxos/util';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { log } from '@dxos/log';
|
|
8
|
+
|
|
9
|
+
export const STALLED_TIMEOUT = 5_000;
|
|
10
|
+
|
|
11
|
+
export type UseStalledOptions = {
|
|
12
|
+
/** Whether work is outstanding; the timer only runs while true. */
|
|
13
|
+
active: boolean;
|
|
14
|
+
/** Any change re-arms the timer, so slow-but-advancing work is never reported as stalled. */
|
|
15
|
+
progress: number;
|
|
16
|
+
timeout?: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Reports true once active work has made no progress for `timeout`.
|
|
21
|
+
*/
|
|
22
|
+
export const useStalled = ({ active, progress, timeout = STALLED_TIMEOUT }: UseStalledOptions): boolean => {
|
|
23
|
+
const [stalled, setStalled] = useState(false);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setStalled(false);
|
|
26
|
+
if (!active) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const timer = setTimeout(() => {
|
|
31
|
+
log.warn('stalled', { progress, timeout });
|
|
32
|
+
setStalled(true);
|
|
33
|
+
}, timeout);
|
|
34
|
+
|
|
35
|
+
return () => clearTimeout(timer);
|
|
36
|
+
}, [active, progress, timeout]);
|
|
37
|
+
|
|
38
|
+
return stalled;
|
|
39
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
import * as Option from 'effect/Option';
|
|
5
5
|
|
|
6
|
-
import { AppNode, CollectionModel,
|
|
6
|
+
import { AppNode, CollectionModel, GraphPath } from '@dxos/app-toolkit';
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Database, Filter, Obj, Query, Scope, Type } from '@dxos/echo';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
@@ -54,7 +54,7 @@ const handler: Operation.WithHandler<typeof SpaceOperation.AddObject> = SpaceOpe
|
|
|
54
54
|
// Graph type nodes are keyed by a slash-free slug (entity id for stored types, typename for
|
|
55
55
|
// static); resolve the object's own type slug rather than filing it under its (human) typename.
|
|
56
56
|
const objectType = Obj.getType(object);
|
|
57
|
-
const typeSlug = objectType ?
|
|
57
|
+
const typeSlug = objectType ? GraphPath.getTypeSlug(objectType) : typename;
|
|
58
58
|
const subject = getSubjectPathForNewObject({
|
|
59
59
|
spaceId: db.spaceId,
|
|
60
60
|
objectId: object.id,
|
|
@@ -62,7 +62,7 @@ const handler: Operation.WithHandler<typeof SpaceOperation.AddObject> = SpaceOpe
|
|
|
62
62
|
object,
|
|
63
63
|
typename,
|
|
64
64
|
typeSlug,
|
|
65
|
-
viewTargetSlug: viewTargetUri ?
|
|
65
|
+
viewTargetSlug: viewTargetUri ? GraphPath.getTypeSlugFromUri(viewTargetUri) : undefined,
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
return {
|
|
@@ -88,13 +88,13 @@ const getSubjectPathForNewObject = (props: {
|
|
|
88
88
|
}): string => {
|
|
89
89
|
const { nodeId, object, typeSlug, viewTargetSlug, spaceId, objectId } = props;
|
|
90
90
|
if (typeof nodeId === 'string') {
|
|
91
|
-
return
|
|
91
|
+
return GraphPath.getCollectionObjectPath(nodeId, objectId);
|
|
92
92
|
}
|
|
93
93
|
if (AppNode.isCollectionItem(object)) {
|
|
94
|
-
return
|
|
94
|
+
return GraphPath.getCollectionsPath(spaceId, objectId);
|
|
95
95
|
}
|
|
96
96
|
if (viewTargetSlug) {
|
|
97
|
-
return
|
|
97
|
+
return GraphPath.getTypePath(spaceId, viewTargetSlug, objectId);
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return GraphPath.getObjectPath(spaceId, typeSlug, objectId);
|
|
100
100
|
};
|
package/src/operations/create.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright 2025 DXOS.org
|
|
2
2
|
|
|
3
|
+
import * as Duration from 'effect/Duration';
|
|
3
4
|
import * as Effect from 'effect/Effect';
|
|
4
5
|
|
|
5
6
|
import { Capability, Plugin } from '@dxos/app-framework';
|
|
@@ -10,13 +11,17 @@ import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
|
10
11
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
12
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
12
13
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
14
|
+
import { hues } from '@dxos/ui-types';
|
|
15
|
+
import { iconValues } from '@dxos/ui-types';
|
|
15
16
|
|
|
17
|
+
import { SpaceNotReadyError } from '../errors';
|
|
16
18
|
import { SpaceCapabilities, SpaceEvents } from '../types';
|
|
17
19
|
import { SpaceOperation } from './definitions';
|
|
18
20
|
import { SpaceOperationConfig } from './helpers';
|
|
19
21
|
|
|
22
|
+
/** Bounds how long space creation waits for the new space's properties object to become available. */
|
|
23
|
+
const SPACE_READY_TIMEOUT = Duration.seconds(10);
|
|
24
|
+
|
|
20
25
|
const handler: Operation.WithHandler<typeof SpaceOperation.Create> = SpaceOperation.Create.pipe(
|
|
21
26
|
Operation.withHandler(
|
|
22
27
|
Effect.fnUntraced(function* ({ name, hue: hue_, icon: icon_, edgeReplication }) {
|
|
@@ -33,7 +38,10 @@ const handler: Operation.WithHandler<typeof SpaceOperation.Create> = SpaceOperat
|
|
|
33
38
|
if (edgeReplication) {
|
|
34
39
|
yield* Effect.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
|
|
35
40
|
}
|
|
36
|
-
yield* Effect.
|
|
41
|
+
yield* Effect.tryPromise({
|
|
42
|
+
try: () => space.waitUntilReady(),
|
|
43
|
+
catch: SpaceNotReadyError.wrap(),
|
|
44
|
+
}).pipe(Effect.timeoutFail({ duration: SPACE_READY_TIMEOUT, onTimeout: () => new SpaceNotReadyError() }));
|
|
37
45
|
|
|
38
46
|
const collection = Obj.make(Collection.Collection, { objects: [] });
|
|
39
47
|
Obj.update(space.properties, (properties) => {
|
|
@@ -13,7 +13,9 @@ import { SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
|
|
|
13
13
|
|
|
14
14
|
import { meta } from '#meta';
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
// Direct module import: the `../types` barrel re-exports `capabilities.ts`, which pulls React UI
|
|
17
|
+
// into any worker bundle that registers these operations.
|
|
18
|
+
import { SpaceForm } from '../types/types';
|
|
17
19
|
|
|
18
20
|
const COLLECTION_OPERATION = 'org.dxos.plugin.collection.operation';
|
|
19
21
|
|
|
@@ -519,4 +521,55 @@ export namespace SpaceOperation {
|
|
|
519
521
|
}),
|
|
520
522
|
output: Schema.Void,
|
|
521
523
|
});
|
|
524
|
+
|
|
525
|
+
/** A duplicate tuple, addressed by id so the group crosses the operation boundary. */
|
|
526
|
+
export const DuplicateGroupResult = Schema.Struct({
|
|
527
|
+
keys: Schema.Array(Schema.String).annotations({ description: 'Identity keys shared by the members.' }),
|
|
528
|
+
objectIds: Schema.Array(Schema.String).annotations({ description: 'Members, in EntityId order.' }),
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
export type DuplicateGroupResult = Schema.Schema.Type<typeof DuplicateGroupResult>;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Groups objects of a type that share an identity key. The rule is the `IdentitySpec` the owning
|
|
535
|
+
* plugin contributes for that typename — the same rule the extractor uses to decide create vs
|
|
536
|
+
* merge, so a scan never disagrees with what extraction would have done.
|
|
537
|
+
*/
|
|
538
|
+
export const FindDuplicates = Operation.make({
|
|
539
|
+
meta: {
|
|
540
|
+
key: makeKey('findDuplicates'),
|
|
541
|
+
name: 'Find Duplicates',
|
|
542
|
+
description: 'Group objects of a type that share an identity key (e.g. an email address).',
|
|
543
|
+
icon: 'ph--copy--regular',
|
|
544
|
+
},
|
|
545
|
+
services: [Capability.Service, Database.Service],
|
|
546
|
+
input: Schema.Struct({
|
|
547
|
+
typename: Schema.String.annotations({ description: 'ECHO typename to scan.' }),
|
|
548
|
+
}),
|
|
549
|
+
output: Schema.Struct({
|
|
550
|
+
groups: Schema.Array(DuplicateGroupResult).annotations({ description: 'Largest group first.' }),
|
|
551
|
+
}),
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
/** Merges a duplicate group into its lowest-EntityId member and removes the others. */
|
|
555
|
+
export const MergeDuplicates = Operation.make({
|
|
556
|
+
meta: {
|
|
557
|
+
key: makeKey('mergeDuplicates'),
|
|
558
|
+
name: 'Merge Duplicates',
|
|
559
|
+
description: 'Merge a duplicate group into a single object.',
|
|
560
|
+
icon: 'ph--arrows-merge--regular',
|
|
561
|
+
},
|
|
562
|
+
services: [Capability.Service, Database.Service],
|
|
563
|
+
input: Schema.Struct({
|
|
564
|
+
typename: Schema.String,
|
|
565
|
+
objectIds: Schema.Array(Schema.String).annotations({ description: 'Members of the group to merge.' }),
|
|
566
|
+
overrides: Schema.optional(Obj.Unknown).annotations({
|
|
567
|
+
description: 'User-edited preview; folded in last so confirmed edits win.',
|
|
568
|
+
}),
|
|
569
|
+
}),
|
|
570
|
+
output: Schema.Struct({
|
|
571
|
+
survivorId: Schema.String,
|
|
572
|
+
removedIds: Schema.Array(Schema.String),
|
|
573
|
+
}),
|
|
574
|
+
});
|
|
522
575
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2026 DXOS.org
|
|
2
|
+
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
|
|
5
|
+
import { Operation } from '@dxos/compute';
|
|
6
|
+
import { Database, Filter, Query } from '@dxos/echo';
|
|
7
|
+
import { findDuplicates } from '@dxos/extractor';
|
|
8
|
+
|
|
9
|
+
import { SpaceOperation } from './definitions';
|
|
10
|
+
import { resolveIdentitySpec } from './helpers';
|
|
11
|
+
|
|
12
|
+
const handler: Operation.WithHandler<typeof SpaceOperation.FindDuplicates> = SpaceOperation.FindDuplicates.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fnUntraced(function* ({ typename }) {
|
|
15
|
+
const spec = yield* resolveIdentitySpec(typename);
|
|
16
|
+
if (!spec) {
|
|
17
|
+
return { groups: [] };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Query through the spec's own type entity rather than the bare typename, so the filter uses
|
|
21
|
+
// the same type identity the spec was registered under.
|
|
22
|
+
const objects = yield* Database.query(Query.select(Filter.type(spec.type))).run;
|
|
23
|
+
return {
|
|
24
|
+
groups: findDuplicates(spec, objects).map((group) => ({
|
|
25
|
+
keys: group.keys,
|
|
26
|
+
objectIds: group.objects.map((object) => object.id),
|
|
27
|
+
})),
|
|
28
|
+
};
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export default handler;
|
|
@@ -11,7 +11,7 @@ import { SpaceOperationConfig } from './helpers';
|
|
|
11
11
|
const handler: Operation.WithHandler<typeof SpaceOperation.GetShareLink> = SpaceOperation.GetShareLink.pipe(
|
|
12
12
|
Operation.withHandler(
|
|
13
13
|
Effect.fnUntraced(function* (input) {
|
|
14
|
-
const { Invitation, InvitationEncoder } = yield* Effect.promise(() => import('@dxos/
|
|
14
|
+
const { Invitation, InvitationEncoder } = yield* Effect.promise(() => import('@dxos/client/invitations'));
|
|
15
15
|
|
|
16
16
|
const invitation = yield* Operation.invoke(SpaceOperation.Share, {
|
|
17
17
|
space: input.space,
|