@dxos/plugin-space 0.9.0 → 0.9.1-main.c7dcc2e112
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/dist/lib/neutral/{CollectionArticle-S3OF5KJ7.mjs → CollectionArticle-BMH7SZ7Q.mjs} +9 -12
- package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs.map +7 -0
- package/dist/lib/neutral/{CollectionSection-A5WRHE5Z.mjs → CollectionSection-BLYTGOKH.mjs} +2 -2
- package/dist/lib/neutral/{CollectionSection-A5WRHE5Z.mjs.map → CollectionSection-BLYTGOKH.mjs.map} +3 -3
- package/dist/lib/neutral/{CreateObjectDialog-66R3K6I3.mjs → CreateObjectDialog-4VMOUKM7.mjs} +10 -10
- package/dist/lib/neutral/CreateObjectDialog-4VMOUKM7.mjs.map +7 -0
- package/dist/lib/neutral/{CreateSpaceDialog-CDGSEIJB.mjs → CreateSpaceDialog-WWNUTLVK.mjs} +6 -6
- package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs.map +7 -0
- package/dist/lib/neutral/{ImportSpaceDialog-7GKV4OTF.mjs → ImportSpaceDialog-CSSRTFAO.mjs} +4 -4
- package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs.map +7 -0
- package/dist/lib/neutral/{InlineSyncStatus-TBJKZCH7.mjs → InlineSyncStatus-UOUTAPCU.mjs} +4 -4
- package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-SSFKRFTJ.mjs → JoinDialog-QZGNRJ4P.mjs} +16 -9
- package/dist/lib/neutral/JoinDialog-QZGNRJ4P.mjs.map +7 -0
- package/dist/lib/neutral/{MembersContainer-KMCQDWCS.mjs → MembersContainer-OWCAMBKS.mjs} +5 -5
- package/dist/lib/neutral/MembersContainer-OWCAMBKS.mjs.map +7 -0
- package/dist/lib/neutral/{MenuFooter-5JT7V5FZ.mjs → MenuFooter-QCNFUIAO.mjs} +6 -6
- package/dist/lib/neutral/MenuFooter-QCNFUIAO.mjs.map +7 -0
- package/dist/lib/neutral/{ObjectCardStack-IXNU3HEN.mjs → ObjectCardStack-DHVDRNRK.mjs} +4 -4
- package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs.map +7 -0
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs +102 -0
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs.map +7 -0
- package/dist/lib/neutral/{RelatedArticle-YDNGUDAJ.mjs → RelatedArticle-YRCRBIYU.mjs} +11 -9
- package/dist/lib/neutral/RelatedArticle-YRCRBIYU.mjs.map +7 -0
- package/dist/lib/neutral/RenamePopover-XBZAKNM7.mjs +96 -0
- package/dist/lib/neutral/RenamePopover-XBZAKNM7.mjs.map +7 -0
- package/dist/lib/neutral/{SchemaContainer-Q4BP6X2M.mjs → SchemaContainer-2NK5YB5O.mjs} +2 -2
- package/dist/lib/neutral/SchemaContainer-2NK5YB5O.mjs.map +7 -0
- package/dist/lib/neutral/{SmallPresenceLive-GUF4WLUC.mjs → SmallPresenceLive-L4H7WJOA.mjs} +2 -2
- package/dist/lib/neutral/SpaceHomeArticle-ZV7EERLS.mjs +78 -0
- package/dist/lib/neutral/SpaceHomeArticle-ZV7EERLS.mjs.map +7 -0
- package/dist/lib/neutral/SpaceHomeRecent-ZR4LIIUD.mjs +83 -0
- package/dist/lib/neutral/SpaceHomeRecent-ZR4LIIUD.mjs.map +7 -0
- package/dist/lib/neutral/SpacePlugin.mjs +1 -1
- package/dist/lib/neutral/SpacePlugin.node.mjs +4 -4
- package/dist/lib/neutral/SpacePlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/{SpacePresence-ACEXUS3N.mjs → SpacePresence-PDTEDHDE.mjs} +2 -2
- package/dist/lib/neutral/{SpaceSettings-YAHBOY5T.mjs → SpaceSettings-IVTCSLNT.mjs} +6 -6
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs.map +7 -0
- package/dist/lib/neutral/{SpaceSettingsContainer-IB34TEOB.mjs → SpaceSettingsContainer-QAFQ4LWC.mjs} +8 -8
- package/dist/lib/neutral/SpaceSettingsContainer-QAFQ4LWC.mjs.map +7 -0
- package/dist/lib/neutral/{SyncStatus-CWOXWDDZ.mjs → SyncStatus-J7CHLO5O.mjs} +3 -3
- package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs.map +7 -0
- package/dist/lib/neutral/{add-object-QYOMCBJA.mjs → add-object-S64XELC3.mjs} +10 -10
- package/dist/lib/neutral/add-object-S64XELC3.mjs.map +7 -0
- package/dist/lib/neutral/{add-relation-HV3VCMJG.mjs → add-relation-GWSE42BU.mjs} +3 -3
- package/dist/lib/neutral/{add-type-CZVKSEIW.mjs → add-type-C3KYE6PI.mjs} +3 -3
- package/dist/lib/neutral/{app-graph-builder-SQGCUCDO.mjs → app-graph-builder-TMAD2ZTH.mjs} +128 -71
- package/dist/lib/neutral/app-graph-builder-TMAD2ZTH.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +13 -15
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/capabilities/node.mjs +2 -2
- package/dist/lib/neutral/{chunk-EEXRKYOD.mjs → chunk-2LTGSUGQ.mjs} +2 -2
- package/dist/lib/neutral/{chunk-EEXRKYOD.mjs.map → chunk-2LTGSUGQ.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-2RPQHHD7.mjs +17 -0
- package/dist/lib/neutral/chunk-2RPQHHD7.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs +46 -0
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-K34BPPQE.mjs → chunk-DSYEB2UN.mjs} +29 -17
- package/dist/lib/neutral/chunk-DSYEB2UN.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-YY62663T.mjs → chunk-F2VJ6VBV.mjs} +3 -3
- package/dist/lib/neutral/chunk-F2VJ6VBV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-JHZGRYGS.mjs → chunk-G2KHP7FX.mjs} +2 -2
- package/dist/lib/neutral/{chunk-JHZGRYGS.mjs.map → chunk-G2KHP7FX.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-I5JXVBXX.mjs +8 -0
- package/dist/lib/neutral/{chunk-BBQR23DW.mjs → chunk-LY6XK5MV.mjs} +105 -128
- package/dist/lib/neutral/chunk-LY6XK5MV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-7WUJENBF.mjs → chunk-PSCIOT7Q.mjs} +4 -4
- package/dist/lib/neutral/chunk-PSCIOT7Q.mjs.map +7 -0
- package/dist/lib/neutral/{close-FGQN37PK.mjs → close-YZHFYPUN.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +7 -7
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/containers/index.mjs +23 -21
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-EPIFSRJA.mjs → create-XKU2W6QC.mjs} +6 -6
- package/dist/lib/neutral/create-XKU2W6QC.mjs.map +7 -0
- package/dist/lib/neutral/{delete-LIA5M3WI.mjs → delete-EFM7CAVO.mjs} +3 -3
- package/dist/lib/neutral/{delete-field-ZIGFXFHY.mjs → delete-field-ONAPFFO5.mjs} +3 -3
- package/dist/lib/neutral/{duplicate-object-X37FM6PW.mjs → duplicate-object-OJRPFV5I.mjs} +3 -3
- package/dist/lib/neutral/{export-space-VWJHVXWF.mjs → export-space-M5RNVUQX.mjs} +3 -3
- package/dist/lib/neutral/{get-share-link-3LEA5FSK.mjs → get-share-link-FUQBJPSQ.mjs} +4 -4
- package/dist/lib/neutral/hooks/index.mjs +16 -4
- package/dist/lib/neutral/hooks/index.mjs.map +3 -3
- package/dist/lib/neutral/{identity-created-57RML5XT.mjs → identity-created-QMV4DANW.mjs} +4 -4
- package/dist/lib/neutral/identity-created-QMV4DANW.mjs.map +7 -0
- package/dist/lib/neutral/{import-space-Y5L3QE3C.mjs → import-space-L3AUIARM.mjs} +3 -3
- package/dist/lib/neutral/index.mjs +12 -6
- package/dist/lib/neutral/{join-Z5K4OAIG.mjs → join-VY3QYBU7.mjs} +4 -4
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{migrate-G7I52UKD.mjs → migrate-WPUISBC4.mjs} +3 -3
- package/dist/lib/neutral/{navigation-handler-QQJYEMAS.mjs → navigation-handler-IKXZGMII.mjs} +4 -4
- package/dist/lib/neutral/{navigation-resolver-IFVQRCGU.mjs → navigation-resolver-VBPGMFCE.mjs} +7 -7
- package/dist/lib/neutral/navigation-resolver-VBPGMFCE.mjs.map +7 -0
- package/dist/lib/neutral/{open-CPWVZSI4.mjs → open-RRYULTSY.mjs} +3 -3
- package/dist/lib/neutral/{open-create-object-4LN4PR6N.mjs → open-create-object-BRUVFZSY.mjs} +4 -4
- package/dist/lib/neutral/{open-create-space-VPAW3F2T.mjs → open-create-space-ARLQWW65.mjs} +4 -4
- package/dist/lib/neutral/{open-import-space-VLQ5V55H.mjs → open-import-space-65H57JXX.mjs} +4 -4
- package/dist/lib/neutral/{open-members-BEXOSSBS.mjs → open-members-677P6KD3.mjs} +6 -6
- package/dist/lib/neutral/open-members-677P6KD3.mjs.map +7 -0
- package/dist/lib/neutral/{open-settings-RHDBW2K5.mjs → open-settings-PRBSGO6D.mjs} +6 -6
- package/dist/lib/neutral/open-settings-PRBSGO6D.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +3 -3
- package/dist/lib/neutral/plugin.mjs +4 -4
- package/dist/lib/neutral/{react-root-2DJPZQT4.mjs → react-root-YLYRCSAZ.mjs} +2 -2
- package/dist/lib/neutral/{react-root-2DJPZQT4.mjs.map → react-root-YLYRCSAZ.mjs.map} +3 -3
- package/dist/lib/neutral/{react-surface-LYCTOQLY.mjs → react-surface-5EQ6X4CL.mjs} +48 -70
- package/dist/lib/neutral/react-surface-5EQ6X4CL.mjs.map +7 -0
- package/dist/lib/neutral/{remove-objects-OWDMA4IF.mjs → remove-objects-PWJJI36V.mjs} +5 -5
- package/dist/lib/neutral/remove-objects-PWJJI36V.mjs.map +7 -0
- package/dist/lib/neutral/{rename-SR6BBSPU.mjs → rename-4727PKI4.mjs} +8 -7
- package/dist/lib/neutral/rename-4727PKI4.mjs.map +7 -0
- package/dist/lib/neutral/{rename-object-5H6E5AOX.mjs → rename-object-FXUAB5FN.mjs} +8 -7
- package/dist/lib/neutral/rename-object-FXUAB5FN.mjs.map +7 -0
- package/dist/lib/neutral/{repair-PSYRVSJ6.mjs → repair-HMH476U3.mjs} +3 -3
- package/dist/lib/neutral/repair-HMH476U3.mjs.map +7 -0
- package/dist/lib/neutral/{restore-field-UHDG2ZQM.mjs → restore-field-3ICSIHGA.mjs} +3 -3
- package/dist/lib/neutral/{restore-objects-2UD5P6OC.mjs → restore-objects-V2BTEWN3.mjs} +3 -3
- package/dist/lib/neutral/{settings-Q32EQCHX.mjs → settings-5IBSYBVU.mjs} +3 -3
- package/dist/lib/neutral/{settings-Q32EQCHX.mjs.map → settings-5IBSYBVU.mjs.map} +3 -3
- package/dist/lib/neutral/{share-5Y4NZA75.mjs → share-ZOZPAUGI.mjs} +3 -3
- package/dist/lib/neutral/{snapshot-H3HKOFVP.mjs → snapshot-ZC5PU55W.mjs} +3 -3
- package/dist/lib/neutral/{spaces-ready-GBF72QJH.mjs → spaces-ready-EXPCJD4N.mjs} +11 -11
- package/dist/lib/neutral/spaces-ready-EXPCJD4N.mjs.map +7 -0
- package/dist/lib/neutral/{state-DPBOZRAW.mjs → state-KMH2NUAL.mjs} +2 -2
- package/dist/lib/neutral/state-KMH2NUAL.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +4 -2
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +9 -3
- package/dist/lib/neutral/{undo-mappings-OBRQOYN4.mjs → undo-mappings-P43EAUGI.mjs} +5 -5
- package/dist/lib/neutral/{undo-mappings-OBRQOYN4.mjs.map → undo-mappings-P43EAUGI.mjs.map} +3 -3
- package/dist/lib/neutral/{wait-for-object-3TAWUWTP.mjs → wait-for-object-WURK2SLQ.mjs} +3 -3
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +12 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -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/shared.d.ts +0 -1
- 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 +13 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +10 -54
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +3 -33
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/commands/database/add.d.ts.map +1 -1
- package/dist/types/src/commands/queue/query.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettings.stories.d.ts +20 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +1 -2
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +20 -0
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +20 -0
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +20 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts +1 -1
- package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +12 -0
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -0
- package/dist/types/src/containers/RenamePopover/index.d.ts +3 -0
- package/dist/types/src/containers/RenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts +15 -0
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomeArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts +22 -0
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeRecent/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomeRecent/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +20 -0
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +20 -0
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +20 -0
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.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/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/useRelatedObjects.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +28 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-object.d.ts.map +1 -1
- package/dist/types/src/operations/helpers.d.ts.map +1 -1
- package/dist/types/src/operations/remove-objects.d.ts.map +1 -1
- package/dist/types/src/operations/rename-object.d.ts.map +1 -1
- package/dist/types/src/operations/rename.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +20 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/form.d.ts +7 -1
- package/dist/types/src/types/form.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/surface.d.ts +26 -0
- package/dist/types/src/types/surface.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +7 -0
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +35 -0
- package/package.json +51 -50
- package/src/SpacePlugin.test.ts +1 -1
- package/src/SpacePlugin.ts +1 -7
- package/src/capabilities/app-graph-builder/extensions/collections.ts +44 -24
- package/src/capabilities/app-graph-builder/extensions/companions.ts +3 -3
- package/src/capabilities/app-graph-builder/extensions/database.ts +17 -14
- package/src/capabilities/app-graph-builder/extensions/settings.ts +9 -9
- package/src/capabilities/app-graph-builder/extensions/shared.ts +5 -20
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +49 -26
- package/src/capabilities/identity-created.ts +3 -3
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/navigation-resolver.ts +6 -13
- package/src/capabilities/react-root.tsx +1 -1
- package/src/capabilities/react-surface.tsx +58 -88
- package/src/capabilities/repair.ts +4 -2
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +8 -15
- package/src/capabilities/state.ts +1 -1
- package/src/capabilities/undo-mappings.ts +3 -3
- package/src/commands/database/add.ts +4 -2
- package/src/commands/queue/query.ts +4 -3
- package/src/components/AwaitingObject/AwaitingObject.tsx +1 -1
- package/src/components/CreateObjectPanel/CreateObjectPanel.tsx +2 -2
- package/src/components/ForeignKeys/ForeignKeys.tsx +1 -1
- package/src/components/SpaceSettings/SpaceSettings.tsx +3 -3
- package/src/constants.ts +5 -6
- package/src/containers/CollectionArticle/CollectionArticle.tsx +10 -6
- package/src/containers/CollectionSection/CollectionSection.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +10 -7
- package/src/containers/CreateSpaceDialog/CreateSpaceDialog.tsx +5 -5
- package/src/containers/ImportSpaceDialog/ImportSpaceDialog.tsx +3 -3
- package/src/containers/InlineSyncStatus/InlineSyncStatus.tsx +3 -3
- package/src/containers/JoinDialog/JoinDialog.tsx +13 -11
- package/src/containers/MembersContainer/MembersContainer.tsx +5 -5
- package/src/containers/MenuFooter/MenuFooter.tsx +3 -3
- package/src/containers/ObjectCardStack/ObjectCardStack.tsx +3 -3
- package/src/containers/RecordArticle/RecordArticle.tsx +67 -8
- package/src/containers/RelatedArticle/RelatedArticle.tsx +17 -13
- package/src/containers/RenamePopover/RenamePopover.tsx +112 -0
- package/src/containers/RenamePopover/index.ts +6 -0
- package/src/containers/SchemaContainer/SchemaContainer.tsx +1 -1
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +100 -0
- package/src/containers/SpaceHomeArticle/index.ts +5 -0
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +101 -0
- package/src/containers/SpaceHomeRecent/index.ts +5 -0
- package/src/containers/SpacePresence/SpacePresence.tsx +1 -1
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +7 -7
- package/src/containers/SyncStatus/SyncStatus.tsx +2 -2
- package/src/containers/index.ts +3 -2
- package/src/hooks/useInputSurfaceLookup.tsx +3 -2
- package/src/hooks/useRelatedObjects.ts +13 -1
- package/src/meta.ts +2 -27
- package/src/operations/add-object.ts +7 -14
- package/src/operations/create.ts +2 -2
- package/src/operations/definitions.ts +1 -1
- package/src/operations/helpers.ts +1 -1
- package/src/operations/open-members.ts +3 -3
- package/src/operations/open-settings.ts +3 -3
- package/src/operations/remove-objects.ts +3 -2
- package/src/operations/rename-object.ts +3 -2
- package/src/operations/rename.ts +3 -2
- package/src/translations.ts +3 -1
- package/src/types/capabilities.ts +8 -8
- package/src/types/events.ts +5 -5
- package/src/types/form.ts +5 -1
- package/src/types/index.ts +1 -0
- package/src/types/surface.ts +31 -0
- package/src/types/types.ts +9 -1
- package/src/util.ts +3 -3
- package/dist/lib/neutral/CollectionArticle-S3OF5KJ7.mjs.map +0 -7
- package/dist/lib/neutral/CreateObjectDialog-66R3K6I3.mjs.map +0 -7
- package/dist/lib/neutral/CreateSpaceDialog-CDGSEIJB.mjs.map +0 -7
- package/dist/lib/neutral/EntityRenamePopover-MYSW262F.mjs +0 -59
- package/dist/lib/neutral/EntityRenamePopover-MYSW262F.mjs.map +0 -7
- package/dist/lib/neutral/ImportSpaceDialog-7GKV4OTF.mjs.map +0 -7
- package/dist/lib/neutral/InlineSyncStatus-TBJKZCH7.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-SSFKRFTJ.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-KMCQDWCS.mjs.map +0 -7
- package/dist/lib/neutral/MenuFooter-5JT7V5FZ.mjs.map +0 -7
- package/dist/lib/neutral/ObjectCardStack-IXNU3HEN.mjs.map +0 -7
- package/dist/lib/neutral/RecordArticle-QWGH25NT.mjs +0 -51
- package/dist/lib/neutral/RecordArticle-QWGH25NT.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-YDNGUDAJ.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-Q4BP6X2M.mjs.map +0 -7
- package/dist/lib/neutral/SpaceRenamePopover-KFWL4CTJ.mjs +0 -56
- package/dist/lib/neutral/SpaceRenamePopover-KFWL4CTJ.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-YAHBOY5T.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-IB34TEOB.mjs.map +0 -7
- package/dist/lib/neutral/SyncStatus-CWOXWDDZ.mjs.map +0 -7
- package/dist/lib/neutral/add-object-QYOMCBJA.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-SQGCUCDO.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-serializer-IBPPU5VR.mjs +0 -81
- package/dist/lib/neutral/app-graph-serializer-IBPPU5VR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4RTSNTDC.mjs +0 -37
- package/dist/lib/neutral/chunk-4RTSNTDC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7WUJENBF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B7DBIARR.mjs +0 -8
- package/dist/lib/neutral/chunk-BBQR23DW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F5MESIRH.mjs +0 -19
- package/dist/lib/neutral/chunk-F5MESIRH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-K34BPPQE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YY62663T.mjs.map +0 -7
- package/dist/lib/neutral/create-EPIFSRJA.mjs.map +0 -7
- package/dist/lib/neutral/identity-created-57RML5XT.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-IFVQRCGU.mjs.map +0 -7
- package/dist/lib/neutral/open-members-BEXOSSBS.mjs.map +0 -7
- package/dist/lib/neutral/open-settings-RHDBW2K5.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-LYCTOQLY.mjs.map +0 -7
- package/dist/lib/neutral/remove-objects-OWDMA4IF.mjs.map +0 -7
- package/dist/lib/neutral/rename-SR6BBSPU.mjs.map +0 -7
- package/dist/lib/neutral/rename-object-5H6E5AOX.mjs.map +0 -7
- package/dist/lib/neutral/repair-PSYRVSJ6.mjs.map +0 -7
- package/dist/lib/neutral/spaces-ready-GBF72QJH.mjs.map +0 -7
- package/dist/lib/neutral/state-DPBOZRAW.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -5
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/containers/EntityRenamePopover/EntityRenamePopover.d.ts +0 -7
- package/dist/types/src/containers/EntityRenamePopover/EntityRenamePopover.d.ts.map +0 -1
- package/dist/types/src/containers/EntityRenamePopover/index.d.ts +0 -2
- package/dist/types/src/containers/EntityRenamePopover/index.d.ts.map +0 -1
- package/dist/types/src/containers/SpaceRenamePopover/SpaceRenamePopover.d.ts +0 -7
- package/dist/types/src/containers/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +0 -1
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts +0 -2
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts.map +0 -1
- package/src/capabilities/app-graph-serializer.ts +0 -85
- package/src/containers/EntityRenamePopover/EntityRenamePopover.tsx +0 -52
- package/src/containers/EntityRenamePopover/index.ts +0 -5
- package/src/containers/SpaceRenamePopover/SpaceRenamePopover.tsx +0 -54
- package/src/containers/SpaceRenamePopover/index.ts +0 -5
- /package/dist/lib/neutral/{SmallPresenceLive-GUF4WLUC.mjs.map → SmallPresenceLive-L4H7WJOA.mjs.map} +0 -0
- /package/dist/lib/neutral/{SpacePresence-ACEXUS3N.mjs.map → SpacePresence-PDTEDHDE.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-relation-HV3VCMJG.mjs.map → add-relation-GWSE42BU.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-type-CZVKSEIW.mjs.map → add-type-C3KYE6PI.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-B7DBIARR.mjs.map → chunk-I5JXVBXX.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-FGQN37PK.mjs.map → close-YZHFYPUN.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-LIA5M3WI.mjs.map → delete-EFM7CAVO.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-field-ZIGFXFHY.mjs.map → delete-field-ONAPFFO5.mjs.map} +0 -0
- /package/dist/lib/neutral/{duplicate-object-X37FM6PW.mjs.map → duplicate-object-OJRPFV5I.mjs.map} +0 -0
- /package/dist/lib/neutral/{export-space-VWJHVXWF.mjs.map → export-space-M5RNVUQX.mjs.map} +0 -0
- /package/dist/lib/neutral/{get-share-link-3LEA5FSK.mjs.map → get-share-link-FUQBJPSQ.mjs.map} +0 -0
- /package/dist/lib/neutral/{import-space-Y5L3QE3C.mjs.map → import-space-L3AUIARM.mjs.map} +0 -0
- /package/dist/lib/neutral/{join-Z5K4OAIG.mjs.map → join-VY3QYBU7.mjs.map} +0 -0
- /package/dist/lib/neutral/{migrate-G7I52UKD.mjs.map → migrate-WPUISBC4.mjs.map} +0 -0
- /package/dist/lib/neutral/{navigation-handler-QQJYEMAS.mjs.map → navigation-handler-IKXZGMII.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-CPWVZSI4.mjs.map → open-RRYULTSY.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-object-4LN4PR6N.mjs.map → open-create-object-BRUVFZSY.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-space-VPAW3F2T.mjs.map → open-create-space-ARLQWW65.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-import-space-VLQ5V55H.mjs.map → open-import-space-65H57JXX.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-field-UHDG2ZQM.mjs.map → restore-field-3ICSIHGA.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-objects-2UD5P6OC.mjs.map → restore-objects-V2BTEWN3.mjs.map} +0 -0
- /package/dist/lib/neutral/{share-5Y4NZA75.mjs.map → share-ZOZPAUGI.mjs.map} +0 -0
- /package/dist/lib/neutral/{snapshot-H3HKOFVP.mjs.map → snapshot-ZC5PU55W.mjs.map} +0 -0
- /package/dist/lib/neutral/{wait-for-object-3TAWUWTP.mjs.map → wait-for-object-WURK2SLQ.mjs.map} +0 -0
|
@@ -5,14 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
9
|
-
AppCapabilities,
|
|
10
|
-
AppNodeMatcher,
|
|
11
|
-
getActiveSpace,
|
|
12
|
-
getPersonalSpace,
|
|
13
|
-
isExemplarSpace,
|
|
14
|
-
isPersonalSpace,
|
|
15
|
-
} from '@dxos/app-toolkit';
|
|
8
|
+
import { AppCapabilities, AppNode, AppNodeMatcher, AppSpace, Paths } from '@dxos/app-toolkit';
|
|
16
9
|
import { type Space, SpaceState } from '@dxos/client/echo';
|
|
17
10
|
import { Operation } from '@dxos/compute';
|
|
18
11
|
import { Filter, Obj } from '@dxos/echo';
|
|
@@ -24,11 +17,10 @@ import { Expando } from '@dxos/schema';
|
|
|
24
17
|
|
|
25
18
|
import { meta } from '#meta';
|
|
26
19
|
import { SpaceOperation } from '#operations';
|
|
27
|
-
import { SPACE_TYPE, SpaceCapabilities } from '#types';
|
|
20
|
+
import { SPACE_HOME_NODE_TYPE, SPACE_TYPE, SpaceCapabilities } from '#types';
|
|
28
21
|
|
|
29
22
|
import { SHARED, getSpaceDisplayName } from '../../../util';
|
|
30
23
|
import {
|
|
31
|
-
CACHEABLE_PROPS,
|
|
32
24
|
CAN_DROP_SPACE,
|
|
33
25
|
CREATE_OBJECT_IN_SPACE_LABEL,
|
|
34
26
|
MIGRATE_SPACE_LABEL,
|
|
@@ -42,11 +34,39 @@ import {
|
|
|
42
34
|
// Extension Factory
|
|
43
35
|
//
|
|
44
36
|
|
|
45
|
-
|
|
37
|
+
// The label tuple must be a module-level singleton: connectors re-evaluate whenever the matched
|
|
38
|
+
// node emits, and a tuple rebuilt inline each time creates a new array reference, causing the graph
|
|
39
|
+
// to re-emit the node and remount the Home article on every evaluation.
|
|
40
|
+
const SPACE_HOME_NODE_LABEL = ['space-home-node.label', { ns: meta.profile.key }] as const;
|
|
41
|
+
|
|
42
|
+
/** Creates space-related extensions: primary actions, space nodes, space actions, and the Home node. */
|
|
46
43
|
export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
47
44
|
const capabilities = yield* Capability.Service;
|
|
48
45
|
|
|
49
46
|
return yield* Effect.all([
|
|
47
|
+
GraphBuilder.createExtension({
|
|
48
|
+
id: 'spaceHome',
|
|
49
|
+
position: 'first',
|
|
50
|
+
match: AppNodeMatcher.whenSpace,
|
|
51
|
+
connector: (space) =>
|
|
52
|
+
Effect.succeed([
|
|
53
|
+
{
|
|
54
|
+
id: Paths.SPACE_HOME_SEGMENT,
|
|
55
|
+
type: SPACE_HOME_NODE_TYPE,
|
|
56
|
+
data: SPACE_HOME_NODE_TYPE,
|
|
57
|
+
properties: {
|
|
58
|
+
label: SPACE_HOME_NODE_LABEL,
|
|
59
|
+
icon: 'ph--house--regular',
|
|
60
|
+
iconHue: 'cyan',
|
|
61
|
+
position: 'first',
|
|
62
|
+
draggable: false,
|
|
63
|
+
droppable: false,
|
|
64
|
+
space,
|
|
65
|
+
},
|
|
66
|
+
} satisfies Node.NodeArg<typeof SPACE_HOME_NODE_TYPE>,
|
|
67
|
+
]),
|
|
68
|
+
}),
|
|
69
|
+
|
|
50
70
|
GraphBuilder.createExtension({
|
|
51
71
|
id: 'primaryActions',
|
|
52
72
|
position: 'first',
|
|
@@ -57,7 +77,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
57
77
|
id: SpaceOperation.OpenCreateSpace.meta.key,
|
|
58
78
|
data: () => Operation.invoke(SpaceOperation.OpenCreateSpace),
|
|
59
79
|
properties: {
|
|
60
|
-
label: ['create-space.label', { ns: meta.
|
|
80
|
+
label: ['create-space.label', { ns: meta.profile.key }],
|
|
61
81
|
icon: 'ph--plus--regular',
|
|
62
82
|
testId: 'spacePlugin.createSpace',
|
|
63
83
|
disposition: 'menu',
|
|
@@ -67,7 +87,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
67
87
|
id: SpaceOperation.Join.meta.key,
|
|
68
88
|
data: () => Operation.invoke(SpaceOperation.Join, {}),
|
|
69
89
|
properties: {
|
|
70
|
-
label: ['join-space.label', { ns: meta.
|
|
90
|
+
label: ['join-space.label', { ns: meta.profile.key }],
|
|
71
91
|
icon: 'ph--sign-in--regular',
|
|
72
92
|
testId: 'spacePlugin.joinSpace',
|
|
73
93
|
disposition: 'menu',
|
|
@@ -77,7 +97,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
77
97
|
id: SpaceOperation.OpenImportSpace.meta.key,
|
|
78
98
|
data: () => Operation.invoke(SpaceOperation.OpenImportSpace),
|
|
79
99
|
properties: {
|
|
80
|
-
label: ['import-space.label', { ns: meta.
|
|
100
|
+
label: ['import-space.label', { ns: meta.profile.key }],
|
|
81
101
|
icon: 'ph--upload--regular',
|
|
82
102
|
testId: 'spacePlugin.importSpace',
|
|
83
103
|
},
|
|
@@ -86,13 +106,13 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
86
106
|
id: `${SpaceOperation.ExportSpace.meta.key}.binary`,
|
|
87
107
|
data: Effect.fnUntraced(function* () {
|
|
88
108
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
89
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
109
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
90
110
|
if (space) {
|
|
91
111
|
yield* Operation.invoke(SpaceOperation.ExportSpace, { space, format: SpaceArchive.Format.BINARY });
|
|
92
112
|
}
|
|
93
113
|
}),
|
|
94
114
|
properties: {
|
|
95
|
-
label: ['export-space-binary.label', { ns: meta.
|
|
115
|
+
label: ['export-space-binary.label', { ns: meta.profile.key }],
|
|
96
116
|
icon: 'ph--download--regular',
|
|
97
117
|
testId: 'spacePlugin.exportSpaceBinary',
|
|
98
118
|
},
|
|
@@ -101,13 +121,13 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
101
121
|
id: `${SpaceOperation.ExportSpace.meta.key}.json`,
|
|
102
122
|
data: Effect.fnUntraced(function* () {
|
|
103
123
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
104
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
124
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
105
125
|
if (space) {
|
|
106
126
|
yield* Operation.invoke(SpaceOperation.ExportSpace, { space, format: SpaceArchive.Format.JSON });
|
|
107
127
|
}
|
|
108
128
|
}),
|
|
109
129
|
properties: {
|
|
110
|
-
label: ['export-space-json.label', { ns: meta.
|
|
130
|
+
label: ['export-space-json.label', { ns: meta.profile.key }],
|
|
111
131
|
icon: 'ph--download--regular',
|
|
112
132
|
testId: 'spacePlugin.exportSpaceJson',
|
|
113
133
|
},
|
|
@@ -116,13 +136,13 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
116
136
|
id: SpaceOperation.OpenMembers.meta.key,
|
|
117
137
|
data: Effect.fnUntraced(function* () {
|
|
118
138
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
119
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
139
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
120
140
|
if (space) {
|
|
121
141
|
yield* Operation.invoke(SpaceOperation.OpenMembers, { space });
|
|
122
142
|
}
|
|
123
143
|
}),
|
|
124
144
|
properties: {
|
|
125
|
-
label: ['share-space.label', { ns: meta.
|
|
145
|
+
label: ['share-space.label', { ns: meta.profile.key }],
|
|
126
146
|
icon: 'ph--users--regular',
|
|
127
147
|
testId: 'spacePlugin.shareSpace',
|
|
128
148
|
keyBinding: {
|
|
@@ -135,13 +155,13 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
135
155
|
id: SpaceOperation.OpenSettings.meta.key,
|
|
136
156
|
data: Effect.fnUntraced(function* () {
|
|
137
157
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
138
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
158
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
139
159
|
if (space) {
|
|
140
160
|
yield* Operation.invoke(SpaceOperation.OpenSettings, { space });
|
|
141
161
|
}
|
|
142
162
|
}),
|
|
143
163
|
properties: {
|
|
144
|
-
label: ['open-current-space-settings.label', { ns: meta.
|
|
164
|
+
label: ['open-current-space-settings.label', { ns: meta.profile.key }],
|
|
145
165
|
icon: 'ph--faders--regular',
|
|
146
166
|
keyBinding: {
|
|
147
167
|
macos: 'meta+shift+,',
|
|
@@ -162,7 +182,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
162
182
|
const spacesAtom = CreateAtom.fromObservable(client.spaces);
|
|
163
183
|
|
|
164
184
|
const spaces = get(spacesAtom);
|
|
165
|
-
const personalSpace = getPersonalSpace(client);
|
|
185
|
+
const personalSpace = AppSpace.getPersonalSpace(client);
|
|
166
186
|
|
|
167
187
|
if (!spaces || !personalSpace) {
|
|
168
188
|
return Effect.succeed([]);
|
|
@@ -197,12 +217,15 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
197
217
|
...spaces.filter((space) => !orderMap.has(space.id)),
|
|
198
218
|
]
|
|
199
219
|
.filter((space, idx) => spaceStates[idx] !== SpaceState.SPACE_INACTIVE)
|
|
200
|
-
.filter(
|
|
220
|
+
.filter(
|
|
221
|
+
(space) =>
|
|
222
|
+
space.tags.length === 0 || AppSpace.isPersonalSpace(space) || AppSpace.isExemplarSpace(space),
|
|
223
|
+
)
|
|
201
224
|
.map((space) =>
|
|
202
225
|
constructSpaceNode({
|
|
203
226
|
space,
|
|
204
227
|
navigable: ephemeralState.navigableCollections,
|
|
205
|
-
personal: isPersonalSpace(space),
|
|
228
|
+
personal: AppSpace.isPersonalSpace(space),
|
|
206
229
|
namesCache: state.spaceNames,
|
|
207
230
|
graph,
|
|
208
231
|
spacesOrder,
|
|
@@ -291,7 +314,7 @@ const constructSpaceNode = ({
|
|
|
291
314
|
return Node.make({
|
|
292
315
|
id: space.id,
|
|
293
316
|
type: SPACE_TYPE,
|
|
294
|
-
cacheable: CACHEABLE_PROPS,
|
|
317
|
+
cacheable: AppNode.CACHEABLE_PROPS,
|
|
295
318
|
data: space,
|
|
296
319
|
properties: {
|
|
297
320
|
label: getSpaceDisplayName(space, { personal, namesCache }),
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { AppAnnotation, AppSpace } from '@dxos/app-toolkit';
|
|
9
9
|
import { Annotation, Collection, Obj, Ref } from '@dxos/echo';
|
|
10
10
|
import { MigrationVersionAnnotation, Migrations } from '@dxos/migrations';
|
|
11
11
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
@@ -17,14 +17,14 @@ export default Capability.makeModule(
|
|
|
17
17
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
18
18
|
|
|
19
19
|
const personalSpace = yield* Effect.tryPromise(() =>
|
|
20
|
-
client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG], membershipPolicy: MembershipPolicy.LOCKED }),
|
|
20
|
+
client.spaces.create({}, { tags: [AppSpace.PERSONAL_SPACE_TAG], membershipPolicy: MembershipPolicy.LOCKED }),
|
|
21
21
|
);
|
|
22
22
|
yield* Effect.tryPromise(() => personalSpace.waitUntilReady());
|
|
23
23
|
|
|
24
24
|
// Create root collection structure.
|
|
25
25
|
yield* Effect.tryPromise(() => personalSpace.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
|
|
26
26
|
Obj.update(personalSpace.properties, (properties) => {
|
|
27
|
-
Annotation.set(properties, RootCollectionAnnotation, Ref.make(Collection.make()));
|
|
27
|
+
Annotation.set(properties, AppAnnotation.RootCollectionAnnotation, Ref.make(Collection.make()));
|
|
28
28
|
if (Migrations.targetVersion) {
|
|
29
29
|
Annotation.set(properties, MigrationVersionAnnotation, Migrations.targetVersion);
|
|
30
30
|
}
|
|
@@ -8,7 +8,6 @@ import { OperationHandlerSet } from '@dxos/compute';
|
|
|
8
8
|
export * from './app-graph-builder';
|
|
9
9
|
export { makeCreateObjectEntryForDatabaseType } from '../util';
|
|
10
10
|
|
|
11
|
-
export const AppGraphSerializer = Capability.lazy('AppGraphSerializer', () => import('./app-graph-serializer'));
|
|
12
11
|
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
13
12
|
export const IdentityCreated = Capability.lazy('IdentityCreated', () => import('./identity-created'));
|
|
14
13
|
export { NavigationHandler } from './navigation-handler';
|
|
@@ -6,18 +6,11 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Option from 'effect/Option';
|
|
7
7
|
|
|
8
8
|
import { Capability } from '@dxos/app-framework';
|
|
9
|
-
import {
|
|
10
|
-
AppCapabilities,
|
|
11
|
-
getActiveSpace,
|
|
12
|
-
getObjectPath,
|
|
13
|
-
getSpaceIdFromPath,
|
|
14
|
-
getSpacePath,
|
|
15
|
-
type AppCapabilities as AppCaps,
|
|
16
|
-
} from '@dxos/app-toolkit';
|
|
9
|
+
import { AppCapabilities, AppSpace, Paths, type AppCapabilities as AppCaps } from '@dxos/app-toolkit';
|
|
17
10
|
import { Database, Entity, Key } from '@dxos/echo';
|
|
18
11
|
import { EID } from '@dxos/keys';
|
|
19
12
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
20
|
-
import {
|
|
13
|
+
import { getPluginSettingsSectionPath } from '@dxos/plugin-settings';
|
|
21
14
|
|
|
22
15
|
import { meta } from '#meta';
|
|
23
16
|
|
|
@@ -32,7 +25,7 @@ export default Capability.makeModule(
|
|
|
32
25
|
if (!query?.dxn) {
|
|
33
26
|
return [
|
|
34
27
|
{
|
|
35
|
-
path:
|
|
28
|
+
path: getPluginSettingsSectionPath(meta.profile.key),
|
|
36
29
|
label: 'Spaces settings',
|
|
37
30
|
type: 'settings',
|
|
38
31
|
},
|
|
@@ -58,7 +51,7 @@ export default Capability.makeModule(
|
|
|
58
51
|
|
|
59
52
|
return [
|
|
60
53
|
{
|
|
61
|
-
path: getObjectPath(db.spaceId, typename, object.id),
|
|
54
|
+
path: Paths.getObjectPath(db.spaceId, typename, object.id),
|
|
62
55
|
label: Entity.getLabel(object) ?? '',
|
|
63
56
|
type: typename,
|
|
64
57
|
},
|
|
@@ -71,7 +64,7 @@ export default Capability.makeModule(
|
|
|
71
64
|
// is the first segment and the object id the last.
|
|
72
65
|
const pathResolver: AppCaps.NavigationPathResolver = (qualifiedPath) => {
|
|
73
66
|
const segments = qualifiedPath.split('/');
|
|
74
|
-
const spaceId = getSpaceIdFromPath(qualifiedPath);
|
|
67
|
+
const spaceId = Paths.getSpaceIdFromPath(qualifiedPath);
|
|
75
68
|
const objectId = segments[segments.length - 1];
|
|
76
69
|
if (!spaceId || !objectId || !Key.EntityId.isValid(objectId)) {
|
|
77
70
|
return Effect.succeed(Option.none());
|
|
@@ -85,7 +78,7 @@ export default Capability.makeModule(
|
|
|
85
78
|
if (path.includes('/') || !Key.EntityId.isValid(path)) {
|
|
86
79
|
return Effect.succeed(Option.none());
|
|
87
80
|
}
|
|
88
|
-
const space = getActiveSpace(client, capabilities);
|
|
81
|
+
const space = AppSpace.getActiveSpace(client, capabilities);
|
|
89
82
|
if (!space) {
|
|
90
83
|
return Effect.succeed(Option.none());
|
|
91
84
|
}
|
|
@@ -15,7 +15,7 @@ import { SpaceCapabilities } from '#types';
|
|
|
15
15
|
export default Capability.makeModule(() =>
|
|
16
16
|
Effect.succeed(
|
|
17
17
|
Capability.contributes(Capabilities.ReactRoot, {
|
|
18
|
-
id: meta.
|
|
18
|
+
id: meta.profile.key,
|
|
19
19
|
root: () => {
|
|
20
20
|
const ephemeral = useAtomCapability(SpaceCapabilities.EphemeralState);
|
|
21
21
|
return ephemeral.awaiting ? <AwaitingObject id={ephemeral.awaiting} /> : null;
|
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import * as Option from 'effect/Option';
|
|
7
|
-
import type * as Schema from 'effect/Schema';
|
|
8
|
-
import * as SchemaAST from 'effect/SchemaAST';
|
|
9
7
|
import React, { type ComponentProps, useCallback } from 'react';
|
|
10
8
|
|
|
11
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
12
10
|
import { Surface, useAtomCapability, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
13
|
-
import {
|
|
11
|
+
import { AppAnnotation } from '@dxos/app-toolkit';
|
|
14
12
|
import { AppSurface, useActiveSpace, useTypeOptions } from '@dxos/app-toolkit/ui';
|
|
15
13
|
import { Annotation, Collection, Database, Entity, Obj, Type } from '@dxos/echo';
|
|
16
14
|
import { SchemaEx } from '@dxos/effect';
|
|
17
15
|
import { type Space, SpaceState, getSpace, isSpace, useSpaces } from '@dxos/react-client/echo';
|
|
18
16
|
import { Input } from '@dxos/react-ui';
|
|
19
|
-
import { type
|
|
17
|
+
import { type FormFieldRendererProps, SelectField } from '@dxos/react-ui-form';
|
|
20
18
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
21
19
|
import { ViewAnnotation } from '@dxos/schema';
|
|
22
20
|
|
|
@@ -31,15 +29,16 @@ import {
|
|
|
31
29
|
JoinDialog,
|
|
32
30
|
MembersContainer,
|
|
33
31
|
MenuFooter,
|
|
34
|
-
EntityRenamePopover,
|
|
35
32
|
ObjectCardStack,
|
|
36
33
|
ObjectProperties,
|
|
37
34
|
RecordArticle,
|
|
38
35
|
RelatedArticle,
|
|
36
|
+
RenamePopover,
|
|
39
37
|
SchemaContainer,
|
|
40
38
|
SmallPresenceLive,
|
|
39
|
+
SpaceHomeArticle,
|
|
40
|
+
SpaceHomeRecent,
|
|
41
41
|
SpacePresence,
|
|
42
|
-
SpaceRenamePopover,
|
|
43
42
|
SpaceSettingsContainer,
|
|
44
43
|
SyncStatus,
|
|
45
44
|
ViewEditor,
|
|
@@ -50,6 +49,8 @@ import {
|
|
|
50
49
|
HueAnnotationId,
|
|
51
50
|
IconAnnotationId,
|
|
52
51
|
SpaceCapabilities,
|
|
52
|
+
SpaceHomeContent,
|
|
53
|
+
SPACE_HOME_NODE_TYPE,
|
|
53
54
|
type TypeInputOptions,
|
|
54
55
|
TypeInputOptionsAnnotationId,
|
|
55
56
|
} from '#types';
|
|
@@ -59,8 +60,7 @@ import {
|
|
|
59
60
|
CREATE_SPACE_DIALOG,
|
|
60
61
|
IMPORT_SPACE_DIALOG,
|
|
61
62
|
JOIN_DIALOG,
|
|
62
|
-
|
|
63
|
-
SPACE_RENAME_POPOVER,
|
|
63
|
+
RENAME_POPOVER,
|
|
64
64
|
} from '../constants';
|
|
65
65
|
|
|
66
66
|
type ReactSurfaceOptions = {
|
|
@@ -70,6 +70,18 @@ type ReactSurfaceOptions = {
|
|
|
70
70
|
export default Capability.makeModule(
|
|
71
71
|
Effect.fnUntraced(function* ({ createInvitationUrl }: ReactSurfaceOptions) {
|
|
72
72
|
return Capability.contributes(Capabilities.ReactSurface, [
|
|
73
|
+
Surface.create({
|
|
74
|
+
id: 'spaceHome',
|
|
75
|
+
filter: AppSurface.literal(AppSurface.Article, SPACE_HOME_NODE_TYPE),
|
|
76
|
+
component: ({ data, role }) => (
|
|
77
|
+
<SpaceHomeArticle role={role} attendableId={data.attendableId} space={data.properties?.space} />
|
|
78
|
+
),
|
|
79
|
+
}),
|
|
80
|
+
Surface.create({
|
|
81
|
+
id: 'spaceHomeRecent',
|
|
82
|
+
filter: Surface.makeFilter(SpaceHomeContent),
|
|
83
|
+
component: ({ data }) => <SpaceHomeRecent space={data.space} />,
|
|
84
|
+
}),
|
|
73
85
|
Surface.create({
|
|
74
86
|
id: 'collectionFallback',
|
|
75
87
|
position: 'last',
|
|
@@ -84,7 +96,7 @@ export default Capability.makeModule(
|
|
|
84
96
|
}),
|
|
85
97
|
Surface.create({
|
|
86
98
|
id: 'pluginSettings',
|
|
87
|
-
filter: AppSurface.settings(AppSurface.Article, meta.
|
|
99
|
+
filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
|
|
88
100
|
component: () => {
|
|
89
101
|
const spaces = useSpaces();
|
|
90
102
|
const { invokePromise } = useOperationInvoker();
|
|
@@ -114,7 +126,7 @@ export default Capability.makeModule(
|
|
|
114
126
|
}),
|
|
115
127
|
Surface.create({
|
|
116
128
|
id: 'spaceSettingsProperties',
|
|
117
|
-
filter: AppSurface.literal(AppSurface.Article, `${meta.
|
|
129
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.general`),
|
|
118
130
|
component: ({ ref }) => {
|
|
119
131
|
const space = useActiveSpace();
|
|
120
132
|
if (!space) {
|
|
@@ -127,7 +139,7 @@ export default Capability.makeModule(
|
|
|
127
139
|
Surface.create({
|
|
128
140
|
id: 'spaceSettingsMembers',
|
|
129
141
|
position: 'first',
|
|
130
|
-
filter: AppSurface.literal(AppSurface.Article, `${meta.
|
|
142
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.members`),
|
|
131
143
|
component: () => {
|
|
132
144
|
const space = useActiveSpace();
|
|
133
145
|
if (!space) {
|
|
@@ -139,7 +151,7 @@ export default Capability.makeModule(
|
|
|
139
151
|
}),
|
|
140
152
|
Surface.create({
|
|
141
153
|
id: 'spaceSettingsSchema',
|
|
142
|
-
filter: AppSurface.literal(AppSurface.Article, `${meta.
|
|
154
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.schema`),
|
|
143
155
|
component: () => {
|
|
144
156
|
const space = useActiveSpace();
|
|
145
157
|
if (!space) {
|
|
@@ -151,19 +163,10 @@ export default Capability.makeModule(
|
|
|
151
163
|
}),
|
|
152
164
|
Surface.create({
|
|
153
165
|
id: 'selectedObjects',
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const type = Obj.getType(data.companionTo);
|
|
161
|
-
const path = type
|
|
162
|
-
? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => [] as readonly string[])
|
|
163
|
-
: [];
|
|
164
|
-
const viewTarget = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.companionTo, path) : undefined;
|
|
165
|
-
return !!viewTarget;
|
|
166
|
-
},
|
|
166
|
+
filter: AppSurface.allOf(
|
|
167
|
+
AppSurface.literal(AppSurface.Article, 'selected-objects'),
|
|
168
|
+
AppSurface.companion(AppSurface.Article, Obj.isObject),
|
|
169
|
+
),
|
|
167
170
|
// TODO(burdon): Replace with mosaic.
|
|
168
171
|
component: ({ data, ref }) => {
|
|
169
172
|
const type = Obj.getType(data.companionTo);
|
|
@@ -210,18 +213,14 @@ export default Capability.makeModule(
|
|
|
210
213
|
}),
|
|
211
214
|
Surface.create({
|
|
212
215
|
id: 'createInitialSpaceFormHue',
|
|
213
|
-
|
|
214
|
-
filter: (data): data is { prop: string; schema: Schema.Schema<any>; fieldPropertyAst?: SchemaAST.AST } => {
|
|
215
|
-
const annotation = SchemaEx.findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
216
|
-
return !!annotation;
|
|
217
|
-
},
|
|
216
|
+
filter: AppSurface.formInputBySchema((ast) => !!SchemaEx.findAnnotation<boolean>(ast, HueAnnotationId)),
|
|
218
217
|
component: ({ data, ...inputProps }) => {
|
|
219
218
|
const ast = data.fieldPropertyAst;
|
|
220
219
|
if (!ast) {
|
|
221
220
|
return null;
|
|
222
221
|
}
|
|
223
222
|
|
|
224
|
-
const { label, readonly, getValue, onValueChange } = inputProps as any as
|
|
223
|
+
const { label, readonly, getValue, onValueChange } = inputProps as any as FormFieldRendererProps;
|
|
225
224
|
const handleChange = useCallback((nextHue: string) => onValueChange(ast, nextHue), [ast, onValueChange]);
|
|
226
225
|
const handleReset = useCallback(() => onValueChange(ast, undefined), [ast, onValueChange]);
|
|
227
226
|
return (
|
|
@@ -234,18 +233,14 @@ export default Capability.makeModule(
|
|
|
234
233
|
}),
|
|
235
234
|
Surface.create({
|
|
236
235
|
id: 'createInitialSpaceFormIcon',
|
|
237
|
-
|
|
238
|
-
filter: (data): data is { prop: string; schema: Schema.Schema<any>; fieldPropertyAst?: SchemaAST.AST } => {
|
|
239
|
-
const annotation = SchemaEx.findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
240
|
-
return !!annotation;
|
|
241
|
-
},
|
|
236
|
+
filter: AppSurface.formInputBySchema((ast) => !!SchemaEx.findAnnotation<boolean>(ast, IconAnnotationId)),
|
|
242
237
|
component: ({ data, ...inputProps }) => {
|
|
243
238
|
const ast = data.fieldPropertyAst;
|
|
244
239
|
if (!ast) {
|
|
245
240
|
return null;
|
|
246
241
|
}
|
|
247
242
|
|
|
248
|
-
const { label, readonly, getValue, onValueChange } = inputProps as any as
|
|
243
|
+
const { label, readonly, getValue, onValueChange } = inputProps as any as FormFieldRendererProps;
|
|
249
244
|
const handleChange = useCallback((nextIcon: string) => onValueChange(ast, nextIcon), [ast, onValueChange]);
|
|
250
245
|
const handleReset = useCallback(() => onValueChange(ast, undefined), [ast, onValueChange]);
|
|
251
246
|
return (
|
|
@@ -263,34 +258,20 @@ export default Capability.makeModule(
|
|
|
263
258
|
}),
|
|
264
259
|
Surface.create({
|
|
265
260
|
id: 'typenameFormInput',
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
target: Database.Database | Collection.Collection | undefined;
|
|
273
|
-
fieldPropertyAst?: SchemaAST.AST;
|
|
274
|
-
} => {
|
|
275
|
-
if (data.prop !== 'typename') {
|
|
276
|
-
return false;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
const annotation = SchemaEx.findAnnotation(
|
|
280
|
-
(data.schema as Schema.Schema.All).ast,
|
|
281
|
-
TypeInputOptionsAnnotationId,
|
|
282
|
-
);
|
|
283
|
-
return !!annotation;
|
|
284
|
-
},
|
|
285
|
-
component: ({ data: { schema, target, fieldPropertyAst }, ...inputProps }) => {
|
|
286
|
-
const ast = fieldPropertyAst;
|
|
261
|
+
filter: AppSurface.formInput(
|
|
262
|
+
(data) =>
|
|
263
|
+
data.prop === 'typename' && !!SchemaEx.findAnnotation(data.schema.ast, TypeInputOptionsAnnotationId),
|
|
264
|
+
),
|
|
265
|
+
component: ({ data, ...inputProps }) => {
|
|
266
|
+
const ast = data.fieldPropertyAst;
|
|
287
267
|
if (!ast) {
|
|
288
268
|
return null;
|
|
289
269
|
}
|
|
290
270
|
|
|
291
|
-
const props = { ...inputProps, type: ast } as any as
|
|
292
|
-
const
|
|
293
|
-
const
|
|
271
|
+
const props = { ...inputProps, type: ast } as any as FormFieldRendererProps;
|
|
272
|
+
const target = data.target;
|
|
273
|
+
const db = Database.isDatabase(target) ? target : Obj.isObject(target) ? Obj.getDatabase(target) : undefined;
|
|
274
|
+
const annotation = SchemaEx.findAnnotation<TypeInputOptions>(data.schema.ast, TypeInputOptionsAnnotationId)!;
|
|
294
275
|
const options = useTypeOptions({ db, annotation });
|
|
295
276
|
|
|
296
277
|
return <SelectField {...props} options={options} />;
|
|
@@ -298,26 +279,23 @@ export default Capability.makeModule(
|
|
|
298
279
|
}),
|
|
299
280
|
Surface.create({
|
|
300
281
|
id: 'objectProperties',
|
|
301
|
-
|
|
302
|
-
filter: (data): data is { subject: Obj.Unknown } => {
|
|
282
|
+
filter: Surface.makeFilter(AppSurface.ObjectProperties, (data) => {
|
|
303
283
|
if (!Obj.isObject(data.subject)) {
|
|
304
284
|
return false;
|
|
305
285
|
}
|
|
306
|
-
|
|
307
286
|
const type = Obj.getType(data.subject);
|
|
308
287
|
const path = type
|
|
309
288
|
? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => [] as readonly string[])
|
|
310
289
|
: [];
|
|
311
290
|
const viewTarget = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.subject, path) : undefined;
|
|
312
291
|
return !!viewTarget;
|
|
313
|
-
},
|
|
292
|
+
}),
|
|
314
293
|
component: ({ data }) => {
|
|
315
294
|
const type = Obj.getType(data.subject);
|
|
316
295
|
const path = type
|
|
317
296
|
? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => [] as readonly string[])
|
|
318
297
|
: [];
|
|
319
298
|
const view = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.subject, path) : undefined;
|
|
320
|
-
|
|
321
299
|
if (!view) {
|
|
322
300
|
return null;
|
|
323
301
|
}
|
|
@@ -326,17 +304,9 @@ export default Capability.makeModule(
|
|
|
326
304
|
},
|
|
327
305
|
}),
|
|
328
306
|
Surface.create({
|
|
329
|
-
id:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
component: ({ data }) => <SpaceRenamePopover space={data.props} />,
|
|
333
|
-
}),
|
|
334
|
-
Surface.create({
|
|
335
|
-
id: ENTITY_RENAME_POPOVER,
|
|
336
|
-
role: 'popover',
|
|
337
|
-
filter: (data): data is { props: Entity.Unknown } =>
|
|
338
|
-
data.component === ENTITY_RENAME_POPOVER && Entity.isEntity(data.props),
|
|
339
|
-
component: ({ data }) => <EntityRenamePopover entity={data.props} />,
|
|
307
|
+
id: RENAME_POPOVER,
|
|
308
|
+
filter: AppSurface.component<Space | Entity.Unknown>(AppSurface.Popover, RENAME_POPOVER),
|
|
309
|
+
component: ({ data }) => <RenamePopover subject={data.props} />,
|
|
340
310
|
}),
|
|
341
311
|
Surface.create({
|
|
342
312
|
id: 'menuFooter',
|
|
@@ -345,9 +315,7 @@ export default Capability.makeModule(
|
|
|
345
315
|
}),
|
|
346
316
|
Surface.create({
|
|
347
317
|
id: 'navtreePresence',
|
|
348
|
-
|
|
349
|
-
filter: (data): data is { id: string; subject: Obj.Unknown; open?: boolean } =>
|
|
350
|
-
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
318
|
+
filter: AppSurface.subject(AppSurface.NavtreeItemEnd, Obj.isObject),
|
|
351
319
|
component: ({ data }) => {
|
|
352
320
|
const ephemeral = useAtomCapability(SpaceCapabilities.EphemeralState);
|
|
353
321
|
return <SmallPresenceLive id={data.id} open={data.open} viewers={ephemeral.viewersByObject[data.id]} />;
|
|
@@ -356,28 +324,30 @@ export default Capability.makeModule(
|
|
|
356
324
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
357
325
|
Surface.create({
|
|
358
326
|
id: 'navtreePresenceFallback',
|
|
359
|
-
role: 'navtree-item-end',
|
|
360
327
|
position: 'last',
|
|
361
|
-
filter: (
|
|
328
|
+
filter: Surface.makeFilter(AppSurface.NavtreeItemEnd),
|
|
362
329
|
component: ({ data }) => <SmallPresenceLive id={data.id} open={data.open} />,
|
|
363
330
|
}),
|
|
364
331
|
// TODO(wittjosiah): Broken?
|
|
365
332
|
Surface.create({
|
|
366
333
|
id: 'navtreeSyncStatus',
|
|
367
|
-
|
|
368
|
-
filter: (data): data is { subject: Space; open?: boolean } => isSpace(data.subject),
|
|
334
|
+
filter: AppSurface.subject(AppSurface.NavtreeItemEnd, isSpace),
|
|
369
335
|
component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,
|
|
370
336
|
}),
|
|
371
337
|
Surface.create({
|
|
372
338
|
id: 'navbarPresence',
|
|
373
|
-
role: 'navbar-end',
|
|
374
339
|
position: 'first',
|
|
375
|
-
filter:
|
|
340
|
+
filter: AppSurface.subject(
|
|
341
|
+
AppSurface.NavbarEnd,
|
|
342
|
+
(value): value is Space | Obj.Unknown => isSpace(value) || Obj.isObject(value),
|
|
343
|
+
),
|
|
376
344
|
component: ({ data }) => {
|
|
377
345
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
378
346
|
const object = isSpace(data.subject)
|
|
379
347
|
? data.subject.state.get() === SpaceState.SPACE_READY
|
|
380
|
-
? space &&
|
|
348
|
+
? space &&
|
|
349
|
+
Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)
|
|
350
|
+
?.target
|
|
381
351
|
: undefined
|
|
382
352
|
: data.subject;
|
|
383
353
|
|
|
@@ -391,7 +361,7 @@ export default Capability.makeModule(
|
|
|
391
361
|
}),
|
|
392
362
|
Surface.create({
|
|
393
363
|
id: 'syncStatus',
|
|
394
|
-
|
|
364
|
+
filter: Surface.makeFilter(AppSurface.StatusIndicator),
|
|
395
365
|
component: () => <SyncStatus />,
|
|
396
366
|
}),
|
|
397
367
|
]);
|
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Option from 'effect/Option';
|
|
7
7
|
|
|
8
8
|
import { Capability } from '@dxos/app-framework';
|
|
9
|
-
import {
|
|
9
|
+
import { AppAnnotation } from '@dxos/app-toolkit';
|
|
10
10
|
import { Annotation, Collection, Obj, Ref } from '@dxos/echo';
|
|
11
11
|
import { type Space } from '@dxos/react-client/echo';
|
|
12
12
|
|
|
@@ -24,7 +24,9 @@ export default Capability.makeModule(() =>
|
|
|
24
24
|
* Remove all existing query collections from the root collection.
|
|
25
25
|
*/
|
|
26
26
|
const removeQueryCollections = async (space: Space) => {
|
|
27
|
-
const rootCollectionRef = Annotation.get(space.properties, RootCollectionAnnotation).pipe(
|
|
27
|
+
const rootCollectionRef = Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(
|
|
28
|
+
Option.getOrUndefined,
|
|
29
|
+
);
|
|
28
30
|
const rootCollection: Collection.Collection | undefined = await rootCollectionRef?.load();
|
|
29
31
|
if (!rootCollection) {
|
|
30
32
|
return;
|
|
@@ -14,7 +14,7 @@ import { Settings, SpaceCapabilities } from '#types';
|
|
|
14
14
|
export default Capability.makeModule(() =>
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const settingsAtom = createKvsStore({
|
|
17
|
-
key: meta.
|
|
17
|
+
key: meta.profile.key,
|
|
18
18
|
schema: Settings.Settings,
|
|
19
19
|
defaultValue: () => ({}),
|
|
20
20
|
});
|
|
@@ -22,7 +22,7 @@ export default Capability.makeModule(() =>
|
|
|
22
22
|
return [
|
|
23
23
|
Capability.contributes(SpaceCapabilities.Settings, settingsAtom),
|
|
24
24
|
Capability.contributes(AppCapabilities.Settings, {
|
|
25
|
-
prefix: meta.
|
|
25
|
+
prefix: meta.profile.key,
|
|
26
26
|
schema: Settings.Settings,
|
|
27
27
|
atom: settingsAtom,
|
|
28
28
|
}),
|