@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
|
@@ -2,69 +2,70 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { forwardRef, useState } from 'react';
|
|
5
|
+
import React, { forwardRef, useId, useMemo, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { useQuery
|
|
7
|
+
import { type Database, Filter, Type } from '@dxos/echo';
|
|
8
|
+
import { useQuery } from '@dxos/echo-react';
|
|
9
9
|
import { Card, Message, Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { useSelection } from '@dxos/react-ui-attention';
|
|
11
|
+
import { type DndContainerHandler } from '@dxos/react-ui-dnd';
|
|
11
12
|
import { ObjectForm } from '@dxos/react-ui-form';
|
|
12
13
|
import { Mosaic } from '@dxos/react-ui-mosaic';
|
|
13
|
-
import { getTypeURIFromQuery } from '@dxos/schema';
|
|
14
14
|
import { isNonNullable } from '@dxos/util';
|
|
15
15
|
|
|
16
16
|
import { meta } from '#meta';
|
|
17
17
|
|
|
18
18
|
export type ObjectCardStackProps = {
|
|
19
|
-
|
|
19
|
+
db: Database.Database;
|
|
20
|
+
type: Type.AnyEntity;
|
|
20
21
|
objectId: string;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* @deprecated Use Mosaic Board components.
|
|
25
26
|
*/
|
|
26
|
-
export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const typeUri = view.query ? getTypeURIFromQuery(view.query.ast) : undefined;
|
|
30
|
-
const type = useType(db, typeUri);
|
|
27
|
+
export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(
|
|
28
|
+
({ objectId, db, type }, forwardedRef) => {
|
|
29
|
+
const { t } = useTranslation(meta.profile.key);
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
const queriedObjects = useQuery(db, Filter.type(Type.getURI(type)));
|
|
32
|
+
const selectedRows = useSelection(objectId, 'multi');
|
|
33
|
+
const selectedObjects = selectedRows.map((id) => queriedObjects.find((obj) => obj.id === id)).filter(isNonNullable);
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
const [viewport, setViewport] = useState<HTMLElement | null>(null);
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
// Per-instance discriminator so the same object opened twice doesn't collide in the Mosaic registry.
|
|
38
|
+
const instanceId = useId();
|
|
39
|
+
const eventHandler = useMemo<DndContainerHandler>(
|
|
40
|
+
() => ({ id: `object-card-stack:${objectId}:${instanceId}`, canDrop: () => true }),
|
|
41
|
+
[objectId, instanceId],
|
|
42
|
+
);
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
orientation='vertical'
|
|
57
|
-
autoScroll={viewport}
|
|
58
|
-
eventHandler={{ id: objectId, canDrop: () => true }}
|
|
59
|
-
>
|
|
60
|
-
<ScrollArea.Root orientation='vertical'>
|
|
44
|
+
return (
|
|
45
|
+
<Panel.Root ref={forwardedRef}>
|
|
46
|
+
<Panel.Toolbar asChild>
|
|
47
|
+
<Toolbar.Root />
|
|
48
|
+
</Panel.Toolbar>
|
|
49
|
+
<Panel.Content>
|
|
50
|
+
{selectedObjects.length === 0 ? (
|
|
51
|
+
<Message.Root>
|
|
52
|
+
<Message.Content>
|
|
53
|
+
<Message.Title>{t('row-details-no-selection.label')}</Message.Title>
|
|
54
|
+
</Message.Content>
|
|
55
|
+
</Message.Root>
|
|
56
|
+
) : (
|
|
57
|
+
<Mosaic.Container asChild orientation='vertical' autoScroll={viewport} eventHandler={eventHandler}>
|
|
58
|
+
<ScrollArea.Root orientation='vertical' centered padding>
|
|
61
59
|
<ScrollArea.Viewport ref={setViewport}>
|
|
62
60
|
<Mosaic.Stack
|
|
61
|
+
classNames='py-trim-md gap-trim-md'
|
|
62
|
+
draggable={false}
|
|
63
63
|
items={selectedObjects}
|
|
64
64
|
getId={(obj) => obj.id}
|
|
65
65
|
Tile={({ ...props }) => (
|
|
66
66
|
<Mosaic.Tile {...props}>
|
|
67
|
-
|
|
67
|
+
{/* The card's only content is a form, so it takes the form gutter rather than the card's chrome inset. */}
|
|
68
|
+
<Card.Root fullWidth gutter='sm' classNames='pb-form-gap'>
|
|
68
69
|
<ObjectForm object={props.data} type={type} />
|
|
69
70
|
</Card.Root>
|
|
70
71
|
</Mosaic.Tile>
|
|
@@ -73,9 +74,11 @@ export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(
|
|
|
73
74
|
</ScrollArea.Viewport>
|
|
74
75
|
</ScrollArea.Root>
|
|
75
76
|
</Mosaic.Container>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</Panel.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
)}
|
|
78
|
+
</Panel.Content>
|
|
79
|
+
</Panel.Root>
|
|
80
|
+
);
|
|
81
|
+
},
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
ObjectCardStack.displayName = 'ObjectCardStack';
|
|
@@ -10,11 +10,12 @@ import { Capability } from '@dxos/app-framework';
|
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
11
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
12
|
import { Filter } from '@dxos/echo';
|
|
13
|
+
import { useQuery } from '@dxos/echo-react';
|
|
13
14
|
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
14
15
|
import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
15
16
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
16
17
|
import { random } from '@dxos/random';
|
|
17
|
-
import {
|
|
18
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
18
19
|
import { Loading, withLayout } from '@dxos/react-ui/testing';
|
|
19
20
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
20
21
|
import { Organization, Person } from '@dxos/types';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
-
import { AppSurface, useObjectMenuItems } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { AppSurface, useCardPivot, useObjectMenuItems } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { Entity, Obj, Type } from '@dxos/echo';
|
|
10
10
|
import { Card, Icon, IconButton, Input, Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { Masonry } from '@dxos/react-ui-masonry';
|
|
@@ -46,7 +46,7 @@ export const RecordArticle = ({ role, subject }: AppSurface.ObjectArticleProps)
|
|
|
46
46
|
<Panel.Content asChild>
|
|
47
47
|
<ScrollArea.Root orientation='vertical'>
|
|
48
48
|
<ScrollArea.Viewport classNames='p-4 space-y-4'>
|
|
49
|
-
<Card.Root
|
|
49
|
+
<Card.Root fullWidth>
|
|
50
50
|
<Card.Header>
|
|
51
51
|
<Card.Block>
|
|
52
52
|
<Icon icon={icon} />
|
|
@@ -91,11 +91,13 @@ const ObjectCard = ({ data: subject, classNames }: { data: Entity.Unknown; class
|
|
|
91
91
|
const { t } = useTranslation(meta.profile.key);
|
|
92
92
|
const data = useMemo(() => ({ subject }), [subject]);
|
|
93
93
|
const icon = Entity.getIcon(subject)?.icon ?? 'ph--circle-dashed--regular';
|
|
94
|
-
|
|
94
|
+
// The card menu renders in a portal; resolve the origin plank from the card element instead.
|
|
95
|
+
const [cardRef, pivotId] = useCardPivot();
|
|
96
|
+
const menuItems = useObjectMenuItems(subject, pivotId);
|
|
95
97
|
|
|
96
98
|
return (
|
|
97
99
|
<Menu.Root>
|
|
98
|
-
<Card.Root classNames={classNames}>
|
|
100
|
+
<Card.Root ref={cardRef} classNames={classNames}>
|
|
99
101
|
<Card.Header>
|
|
100
102
|
<Card.Block>
|
|
101
103
|
<Icon icon={icon} />
|
|
@@ -120,3 +122,5 @@ const ObjectCard = ({ data: subject, classNames }: { data: Entity.Unknown; class
|
|
|
120
122
|
</Menu.Root>
|
|
121
123
|
);
|
|
122
124
|
};
|
|
125
|
+
|
|
126
|
+
RecordArticle.displayName = 'RecordArticle';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
-
import { AppSurface, useObjectMenuItems } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { AppSurface, useCardPivot, useObjectMenuItems } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { Entity, Obj } from '@dxos/echo';
|
|
10
10
|
import { Card, Icon, IconButton, Panel, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { Masonry } from '@dxos/react-ui-masonry';
|
|
@@ -45,12 +45,14 @@ const ObjectCard = ({ data: subject, classNames }: { data: Entity.Unknown; class
|
|
|
45
45
|
const data = useMemo(() => ({ subject }), [subject]);
|
|
46
46
|
const icon = Entity.getIcon(subject)?.icon ?? 'ph--circle-dashed--regular';
|
|
47
47
|
|
|
48
|
+
// The card menu renders in a portal; resolve the origin plank from the card element instead.
|
|
49
|
+
const [cardRef, pivotId] = useCardPivot();
|
|
48
50
|
// TODO(burdon): BUG: Includes item itself.
|
|
49
|
-
const menuItems = useObjectMenuItems(subject);
|
|
51
|
+
const menuItems = useObjectMenuItems(subject, pivotId);
|
|
50
52
|
|
|
51
53
|
return (
|
|
52
54
|
<Menu.Root>
|
|
53
|
-
<Card.Root classNames={classNames}>
|
|
55
|
+
<Card.Root ref={cardRef} classNames={classNames}>
|
|
54
56
|
<Card.Header>
|
|
55
57
|
<Card.Block>
|
|
56
58
|
<Icon icon={icon} />
|
|
@@ -75,3 +77,5 @@ const ObjectCard = ({ data: subject, classNames }: { data: Entity.Unknown; class
|
|
|
75
77
|
</Menu.Root>
|
|
76
78
|
);
|
|
77
79
|
};
|
|
80
|
+
|
|
81
|
+
RelatedArticle.displayName = 'RelatedArticle';
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
8
|
import { Type } from '@dxos/echo';
|
|
9
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
10
9
|
import { useTranslation } from '@dxos/react-ui';
|
|
11
10
|
import { Form } from '@dxos/react-ui-form';
|
|
12
11
|
import { mx } from '@dxos/ui-theme';
|
|
13
12
|
|
|
14
13
|
import { meta } from '#meta';
|
|
15
14
|
|
|
15
|
+
import { useQuerySpaceTypes } from './use-query-space-types';
|
|
16
|
+
|
|
16
17
|
export const SchemaContainer = ({ space }: AppSurface.SpaceArticleProps) => {
|
|
17
18
|
const { t } = useTranslation(meta.profile.key);
|
|
18
19
|
const types = useQuerySpaceTypes(space);
|
|
@@ -41,18 +42,4 @@ export const SchemaContainer = ({ space }: AppSurface.SpaceArticleProps) => {
|
|
|
41
42
|
);
|
|
42
43
|
};
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
* Subscribe to and retrieve all types from a space's registry.
|
|
46
|
-
*/
|
|
47
|
-
export const useQuerySpaceTypes = (space: Space): Type.AnyEntity[] => {
|
|
48
|
-
const [types, setTypes] = useState<Type.AnyEntity[]>(() => [...space.db.graph.registry.list().filter(Type.isType)]);
|
|
49
|
-
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
setTypes([...space.db.graph.registry.list().filter(Type.isType)]);
|
|
52
|
-
return space.db.graph.registry.changed.on(() => {
|
|
53
|
-
setTypes([...space.db.graph.registry.list().filter(Type.isType)]);
|
|
54
|
-
});
|
|
55
|
-
}, [space]);
|
|
56
|
-
|
|
57
|
-
return types;
|
|
58
|
-
};
|
|
45
|
+
SchemaContainer.displayName = 'SchemaContainer';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Type } from '@dxos/echo';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
+
|
|
10
|
+
// Kept out of `SchemaContainer.tsx`: react-refresh only fast-refreshes a module whose
|
|
11
|
+
// exports are all components, so values exported beside them force a full page reload on
|
|
12
|
+
// every edit.
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Subscribe to and retrieve all types from a space's registry.
|
|
16
|
+
*/
|
|
17
|
+
export const useQuerySpaceTypes = (space: Space): Type.AnyEntity[] => {
|
|
18
|
+
const [types, setTypes] = useState<Type.AnyEntity[]>(() => [...space.db.graph.registry.list().filter(Type.isType)]);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setTypes([...space.db.graph.registry.list().filter(Type.isType)]);
|
|
22
|
+
return space.db.graph.registry.changed.on(() => {
|
|
23
|
+
setTypes([...space.db.graph.registry.list().filter(Type.isType)]);
|
|
24
|
+
});
|
|
25
|
+
}, [space]);
|
|
26
|
+
|
|
27
|
+
return types;
|
|
28
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
11
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
13
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
14
|
+
import { useHomeVisibility } from '@dxos/app-toolkit/ui';
|
|
15
|
+
import { Annotation, DXN, Obj, Type } from '@dxos/echo';
|
|
16
|
+
import { LabelAnnotation } from '@dxos/echo/Annotation';
|
|
17
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
18
|
+
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
19
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
20
|
+
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
21
|
+
|
|
22
|
+
import { SpaceHomeDashboard, SpaceHomeRecent } from '#containers';
|
|
23
|
+
import { translations } from '#translations';
|
|
24
|
+
import { SpaceHomeContent } from '#types';
|
|
25
|
+
|
|
26
|
+
import { SpaceHomeArticle } from './SpaceHomeArticle';
|
|
27
|
+
|
|
28
|
+
class Task extends Type.makeObject<Task>(DXN.make('org.dxos.type.test.task', '0.1.0'))(
|
|
29
|
+
Schema.Struct({
|
|
30
|
+
name: Schema.optional(Schema.String),
|
|
31
|
+
}).pipe(LabelAnnotation.set(['name']), Annotation.IconAnnotation.set({ icon: 'ph--check-square--regular' })),
|
|
32
|
+
) {}
|
|
33
|
+
|
|
34
|
+
class Note extends Type.makeObject<Note>(DXN.make('org.dxos.type.test.note', '0.1.0'))(
|
|
35
|
+
Schema.Struct({
|
|
36
|
+
content: Schema.optional(Schema.String),
|
|
37
|
+
}).pipe(LabelAnnotation.set(['content']), Annotation.IconAnnotation.set({ icon: 'ph--note--regular' })),
|
|
38
|
+
) {}
|
|
39
|
+
|
|
40
|
+
const OBJECT_COUNT = 24;
|
|
41
|
+
|
|
42
|
+
const DefaultStory = () => {
|
|
43
|
+
const spaces = useSpaces();
|
|
44
|
+
const space = spaces[spaces.length - 1];
|
|
45
|
+
if (!space) {
|
|
46
|
+
return <Loading />;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return <SpaceHomeArticle role='article' attendableId='story' space={space} />;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const meta = {
|
|
53
|
+
title: 'plugins/plugin-space/containers/SpaceHomeArticle',
|
|
54
|
+
render: DefaultStory,
|
|
55
|
+
decorators: [
|
|
56
|
+
withTheme(),
|
|
57
|
+
withLayout({ layout: 'fullscreen' }),
|
|
58
|
+
withPluginManager({
|
|
59
|
+
capabilities: [
|
|
60
|
+
Capability.contributes(AppCapabilities.Translations, translations),
|
|
61
|
+
// Registered types feed SpaceHomeRecent's type filter (normally via addSchemaModule).
|
|
62
|
+
Capability.contributes(AppCapabilities.Schema, [Task, Note]),
|
|
63
|
+
// Home-content contributors normally wired by the plugin's react-surface capability,
|
|
64
|
+
// including the per-section visibility gate + close affordance.
|
|
65
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
66
|
+
Surface.create({
|
|
67
|
+
id: 'story.spaceHomeRecent',
|
|
68
|
+
filter: Surface.makeFilter(SpaceHomeContent),
|
|
69
|
+
component: ({ data }) => {
|
|
70
|
+
const { visible, hide } = useHomeVisibility(data.space, 'spaceHomeRecent');
|
|
71
|
+
return visible ? <SpaceHomeRecent space={data.space} onClose={hide} /> : null;
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
Surface.create({
|
|
75
|
+
id: 'story.spaceHomeDashboard',
|
|
76
|
+
filter: Surface.makeFilter(SpaceHomeContent),
|
|
77
|
+
component: ({ data }) => {
|
|
78
|
+
const { visible, hide } = useHomeVisibility(data.space, 'spaceHomeDashboard');
|
|
79
|
+
return visible ? <SpaceHomeDashboard space={data.space} onClose={hide} /> : null;
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
]),
|
|
83
|
+
],
|
|
84
|
+
plugins: [
|
|
85
|
+
...corePlugins(),
|
|
86
|
+
StorybookPlugin({}),
|
|
87
|
+
ClientPlugin({
|
|
88
|
+
types: [Task, Note],
|
|
89
|
+
onClientInitialized: ({ client }) =>
|
|
90
|
+
Effect.gen(function* () {
|
|
91
|
+
yield* Effect.promise(() => client.halo.createIdentity());
|
|
92
|
+
const space = yield* Effect.promise(() => client.spaces.create());
|
|
93
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
94
|
+
|
|
95
|
+
for (let i = 0; i < OBJECT_COUNT; i++) {
|
|
96
|
+
space.db.add(
|
|
97
|
+
i % 2 === 0
|
|
98
|
+
? Obj.make(Task, { name: `Task ${i + 1}` })
|
|
99
|
+
: Obj.make(Note, { content: `Note ${i + 1}` }),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
}),
|
|
104
|
+
],
|
|
105
|
+
}),
|
|
106
|
+
],
|
|
107
|
+
parameters: {
|
|
108
|
+
layout: 'fullscreen',
|
|
109
|
+
},
|
|
110
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
111
|
+
|
|
112
|
+
export default meta;
|
|
113
|
+
|
|
114
|
+
type Story = StoryObj<typeof meta>;
|
|
115
|
+
|
|
116
|
+
export const Default: Story = {};
|
|
@@ -6,7 +6,7 @@ import React, { useCallback } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
import { type AppSurface, useAppGraph } from '@dxos/app-toolkit/ui';
|
|
9
|
-
import { useActionRunner } from '@dxos/plugin-graph';
|
|
9
|
+
import { useActionRunner } from '@dxos/plugin-graph/hooks';
|
|
10
10
|
import { Column, Panel, ScrollArea } from '@dxos/react-ui';
|
|
11
11
|
import {
|
|
12
12
|
type ActionExecutor,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
Menu,
|
|
15
15
|
MenuBuilder,
|
|
16
16
|
graphActions,
|
|
17
|
+
isToolbarAction,
|
|
17
18
|
useMenuBuilder,
|
|
18
19
|
} from '@dxos/react-ui-menu';
|
|
19
20
|
|
|
@@ -24,7 +25,7 @@ export type SpaceHomeArticleProps = AppSurface.SpaceArticleProps;
|
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Per-space Home article shell. Owns only the chrome: a toolbar sourced from graph actions
|
|
27
|
-
* contributed with `disposition: 'toolbar'` (e.g. Start
|
|
28
|
+
* contributed with `disposition: 'toolbar'` (e.g. Start / Hide Welcome from plugin-support),
|
|
28
29
|
* and a Column layout that delegates its body to surface contributors:
|
|
29
30
|
*
|
|
30
31
|
* - `space-home-content`: scrollable region (Welcome panel, recent-objects masonry, starter prompts).
|
|
@@ -81,9 +82,7 @@ const useMenuActions = (
|
|
|
81
82
|
return MenuBuilder.make().build();
|
|
82
83
|
}
|
|
83
84
|
return MenuBuilder.make()
|
|
84
|
-
.subgraph(
|
|
85
|
-
graphActions(graph, get, attendableId, { filter: (action) => action.properties.disposition === 'toolbar' }),
|
|
86
|
-
)
|
|
85
|
+
.subgraph(graphActions(graph, get, attendableId, { filter: isToolbarAction }))
|
|
87
86
|
.build();
|
|
88
87
|
},
|
|
89
88
|
[graph, attendableId],
|
|
@@ -98,3 +97,5 @@ const useMenuActions = (
|
|
|
98
97
|
|
|
99
98
|
return { actions: menuActions, onAction };
|
|
100
99
|
};
|
|
100
|
+
|
|
101
|
+
SpaceHomeArticle.displayName = 'SpaceHomeArticle';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import { Capability } from '@dxos/app-framework';
|
|
11
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
13
|
+
import { Annotation, DXN, Obj, Type } from '@dxos/echo';
|
|
14
|
+
import { LabelAnnotation } from '@dxos/echo/Annotation';
|
|
15
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
16
|
+
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
17
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
18
|
+
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
19
|
+
|
|
20
|
+
import { translations } from '#translations';
|
|
21
|
+
|
|
22
|
+
import { SpaceHomeDashboard, type SpaceStatId } from './SpaceHomeDashboard';
|
|
23
|
+
|
|
24
|
+
class Task extends Type.makeObject<Task>(DXN.make('org.dxos.type.test.task', '0.1.0'))(
|
|
25
|
+
Schema.Struct({
|
|
26
|
+
name: Schema.optional(Schema.String),
|
|
27
|
+
}).pipe(LabelAnnotation.set(['name']), Annotation.IconAnnotation.set({ icon: 'ph--check-square--regular' })),
|
|
28
|
+
) {}
|
|
29
|
+
|
|
30
|
+
class Note extends Type.makeObject<Note>(DXN.make('org.dxos.type.test.note', '0.1.0'))(
|
|
31
|
+
Schema.Struct({
|
|
32
|
+
content: Schema.optional(Schema.String),
|
|
33
|
+
}).pipe(LabelAnnotation.set(['content']), Annotation.IconAnnotation.set({ icon: 'ph--note--regular' })),
|
|
34
|
+
) {}
|
|
35
|
+
|
|
36
|
+
const OBJECT_COUNT = 24;
|
|
37
|
+
|
|
38
|
+
type StoryArgs = {
|
|
39
|
+
stats?: readonly SpaceStatId[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const DefaultStory = ({ stats }: StoryArgs) => {
|
|
43
|
+
const spaces = useSpaces();
|
|
44
|
+
const space = spaces[spaces.length - 1];
|
|
45
|
+
if (!space) {
|
|
46
|
+
return <Loading />;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return <SpaceHomeDashboard space={space} stats={stats} />;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const meta = {
|
|
53
|
+
title: 'plugins/plugin-space/containers/SpaceHomeDashboard',
|
|
54
|
+
render: DefaultStory,
|
|
55
|
+
decorators: [
|
|
56
|
+
withTheme(),
|
|
57
|
+
withLayout({ layout: 'fullscreen', classNames: 'p-4' }),
|
|
58
|
+
withPluginManager({
|
|
59
|
+
capabilities: [Capability.contributes(AppCapabilities.Translations, translations)],
|
|
60
|
+
plugins: [
|
|
61
|
+
...corePlugins(),
|
|
62
|
+
StorybookPlugin({}),
|
|
63
|
+
ClientPlugin({
|
|
64
|
+
types: [Task, Note],
|
|
65
|
+
onClientInitialized: ({ client }) =>
|
|
66
|
+
Effect.gen(function* () {
|
|
67
|
+
yield* Effect.promise(() => client.halo.createIdentity());
|
|
68
|
+
const space = yield* Effect.promise(() => client.spaces.create());
|
|
69
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
70
|
+
|
|
71
|
+
for (let i = 0; i < OBJECT_COUNT; i++) {
|
|
72
|
+
space.db.add(
|
|
73
|
+
i % 2 === 0
|
|
74
|
+
? Obj.make(Task, { name: `Task ${i + 1}` })
|
|
75
|
+
: Obj.make(Note, { content: `Note ${i + 1}` }),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
}),
|
|
80
|
+
],
|
|
81
|
+
}),
|
|
82
|
+
],
|
|
83
|
+
parameters: {
|
|
84
|
+
layout: 'fullscreen',
|
|
85
|
+
},
|
|
86
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
87
|
+
|
|
88
|
+
export default meta;
|
|
89
|
+
|
|
90
|
+
type Story = StoryObj<typeof meta>;
|
|
91
|
+
|
|
92
|
+
export const Default: Story = {};
|
|
93
|
+
|
|
94
|
+
/** Subset of stat cards via the `stats` prop; the default renders all. */
|
|
95
|
+
export const Subset: Story = {
|
|
96
|
+
args: {
|
|
97
|
+
stats: ['objects', 'members'],
|
|
98
|
+
},
|
|
99
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
+
import React, { useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
import { HomeSection, usePluginManager } from '@dxos/app-framework/ui';
|
|
9
|
+
import { Collection, Filter, Obj, Query } from '@dxos/echo';
|
|
10
|
+
import { useQuery } from '@dxos/echo-react';
|
|
11
|
+
import { type Space, useMembers } from '@dxos/react-client/echo';
|
|
12
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
13
|
+
import { type ActivityDatum, Dashboard } from '@dxos/react-ui-dashboard';
|
|
14
|
+
|
|
15
|
+
import { meta } from '#meta';
|
|
16
|
+
|
|
17
|
+
const STAT_IDS = ['objects', 'types', 'collections', 'members', 'active-days', 'plugins'] as const;
|
|
18
|
+
|
|
19
|
+
export type SpaceStatId = (typeof STAT_IDS)[number];
|
|
20
|
+
|
|
21
|
+
type SpaceHomeDashboardProps = {
|
|
22
|
+
space?: Space;
|
|
23
|
+
/** Stat cards to render, in order; defaults to all. */
|
|
24
|
+
stats?: readonly SpaceStatId[];
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Space stats and activity matrix for the Home article. Stats are derived from the object graph
|
|
30
|
+
* (counts of objects, distinct types, collections, members); the matrix buckets objects by the
|
|
31
|
+
* day they were last touched (`updatedAt`, falling back to `createdAt`).
|
|
32
|
+
*
|
|
33
|
+
* NOTE: per-object `updatedAt` only reflects the latest change, so the matrix undercounts busy
|
|
34
|
+
* days in the past.
|
|
35
|
+
* TODO(burdon): Richer stats need sources beyond the object graph:
|
|
36
|
+
* - Edits per day: automerge change graph (echo-pipeline) aggregated into a daily histogram.
|
|
37
|
+
* - Storage size / sync state: client diagnostics (`client.diagnostics()`) or SpaceSyncState.
|
|
38
|
+
* - Relations count: needs a relations query (Query.select over relation types).
|
|
39
|
+
* - Member activity / presence history: EDGE presence feed (only live viewers are exposed today).
|
|
40
|
+
*/
|
|
41
|
+
export const SpaceHomeDashboard = ({ space, stats = STAT_IDS, onClose }: SpaceHomeDashboardProps) => {
|
|
42
|
+
const { t } = useTranslation(meta.profile.key);
|
|
43
|
+
|
|
44
|
+
const query = useMemo(() => Query.select(Filter.everything()), []);
|
|
45
|
+
const members = useMembers(space?.key);
|
|
46
|
+
|
|
47
|
+
const manager = usePluginManager();
|
|
48
|
+
const core = useAtomValue(manager.core);
|
|
49
|
+
const enabled = useAtomValue(manager.enabled);
|
|
50
|
+
const plugins = useMemo(() => enabled.filter((id) => !core.includes(id)).length, [core, enabled]);
|
|
51
|
+
|
|
52
|
+
// TODO(burdon): Can we caches this?
|
|
53
|
+
const objects = useQuery(space ? space.db : undefined, query);
|
|
54
|
+
const { activity, values } = useMemo(() => {
|
|
55
|
+
const typenames = new Set<string>();
|
|
56
|
+
const days = new Set<string>();
|
|
57
|
+
let collections = 0;
|
|
58
|
+
const activity: ActivityDatum[] = [];
|
|
59
|
+
for (const object of objects) {
|
|
60
|
+
const typename = Obj.getTypename(object);
|
|
61
|
+
if (typename) {
|
|
62
|
+
typenames.add(typename);
|
|
63
|
+
}
|
|
64
|
+
if (Obj.instanceOf(Collection.Collection, object)) {
|
|
65
|
+
collections++;
|
|
66
|
+
}
|
|
67
|
+
const objectMeta = Obj.getMeta(object);
|
|
68
|
+
const timestamp = objectMeta.updatedAt ?? objectMeta.createdAt;
|
|
69
|
+
if (timestamp) {
|
|
70
|
+
const date = new Date(timestamp);
|
|
71
|
+
days.add(date.toDateString());
|
|
72
|
+
activity.push({ date, value: 1 });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const values: Record<SpaceStatId, number> = {
|
|
77
|
+
'objects': objects.length,
|
|
78
|
+
'types': typenames.size,
|
|
79
|
+
'collections': collections,
|
|
80
|
+
'members': members.length,
|
|
81
|
+
'active-days': days.size,
|
|
82
|
+
'plugins': plugins,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return { activity, values };
|
|
86
|
+
}, [objects, members, plugins]);
|
|
87
|
+
|
|
88
|
+
if (!space) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<HomeSection.Root>
|
|
94
|
+
<HomeSection.Header title={t('space-home.dashboard.heading')} onClose={onClose} />
|
|
95
|
+
<Dashboard.Stats>
|
|
96
|
+
{stats.map((id) => (
|
|
97
|
+
<Dashboard.Stat key={id}>
|
|
98
|
+
<Dashboard.StatLabel>{t(`space-home.dashboard.${id}.label`)}</Dashboard.StatLabel>
|
|
99
|
+
<Dashboard.StatValue value={values[id]} />
|
|
100
|
+
</Dashboard.Stat>
|
|
101
|
+
))}
|
|
102
|
+
</Dashboard.Stats>
|
|
103
|
+
{/* Smaller cells so a full year fits the 40rem home column without horizontal scroll. */}
|
|
104
|
+
<Dashboard.Activity classNames='[--dx-dashboard-cell:0.75rem]' data={activity} endDate={new Date()} />
|
|
105
|
+
</HomeSection.Root>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
SpaceHomeDashboard.displayName = 'SpaceHomeDashboard';
|