@dxos/plugin-space 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
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/{CreateObjectDialog-4VMOUKM7.mjs → CreateObjectDialog-5454N3FJ.mjs} +22 -7
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +7 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +58 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-QZGNRJ4P.mjs → JoinDialog-ATNUCNL2.mjs} +7 -31
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +7 -0
- package/dist/lib/neutral/{MembersContainer-OWCAMBKS.mjs → MembersContainer-C4ZTP6ZW.mjs} +9 -5
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +7 -0
- package/dist/lib/neutral/{MenuFooter-QCNFUIAO.mjs → MenuFooter-FWE5LFM4.mjs} +3 -3
- package/dist/lib/neutral/{RelatedArticle-YRCRBIYU.mjs → RelatedArticle-Z777WVDW.mjs} +1 -2
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +7 -0
- package/dist/lib/neutral/{RenamePopover-XBZAKNM7.mjs → RenamePopover-AZT2KPOF.mjs} +13 -5
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +7 -0
- package/dist/lib/neutral/{SchemaContainer-2NK5YB5O.mjs → SchemaContainer-4GJKQBXM.mjs} +8 -4
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +7 -0
- package/dist/lib/neutral/{SmallPresenceLive-L4H7WJOA.mjs → SmallPresenceLive-FW3AMEY5.mjs} +2 -2
- package/dist/lib/neutral/{SpaceHomeArticle-ZV7EERLS.mjs → SpaceHomeArticle-Y47TLZ72.mjs} +2 -2
- package/dist/lib/neutral/{SpaceHomeArticle-ZV7EERLS.mjs.map → SpaceHomeArticle-Y47TLZ72.mjs.map} +1 -1
- package/dist/lib/neutral/{SpaceHomeRecent-ZR4LIIUD.mjs → SpaceHomeRecent-S57AO3EV.mjs} +11 -5
- package/dist/lib/neutral/{SpaceHomeRecent-ZR4LIIUD.mjs.map → SpaceHomeRecent-S57AO3EV.mjs.map} +3 -3
- package/dist/lib/neutral/SpacePlugin.mjs +1 -1
- package/dist/lib/neutral/{SpacePresence-PDTEDHDE.mjs → SpacePresence-T37WH43Y.mjs} +2 -2
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs +60 -0
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs.map +7 -0
- package/dist/lib/neutral/{SpaceSettingsContainer-QAFQ4LWC.mjs → SpaceSettingsContainer-72CJWELM.mjs} +39 -36
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +7 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +143 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +7 -0
- package/dist/lib/neutral/{add-object-S64XELC3.mjs → add-object-H2N4AOQJ.mjs} +10 -10
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +7 -0
- package/dist/lib/neutral/{add-relation-GWSE42BU.mjs → add-relation-BGTLART5.mjs} +3 -3
- package/dist/lib/neutral/{add-type-C3KYE6PI.mjs → add-type-JIDLRANR.mjs} +3 -3
- package/dist/lib/neutral/{add-type-C3KYE6PI.mjs.map → add-type-JIDLRANR.mjs.map} +1 -1
- package/dist/lib/neutral/{app-graph-builder-TMAD2ZTH.mjs → app-graph-builder-7H2KOD4B.mjs} +187 -163
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +9 -9
- package/dist/lib/neutral/capabilities/node.mjs +2 -2
- package/dist/lib/neutral/{chunk-PSCIOT7Q.mjs → chunk-52ASDNRA.mjs} +2 -3
- package/dist/lib/neutral/{chunk-PSCIOT7Q.mjs.map → chunk-52ASDNRA.mjs.map} +3 -3
- package/dist/lib/neutral/{chunk-2RPQHHD7.mjs → chunk-C2ULK22J.mjs} +1 -1
- package/dist/lib/neutral/{chunk-DSYEB2UN.mjs → chunk-F5KLUP2P.mjs} +7 -2
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-F2VJ6VBV.mjs → chunk-LMUG6PEJ.mjs} +3 -4
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-2LTGSUGQ.mjs → chunk-RAAHDTVF.mjs} +8 -4
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-LY6XK5MV.mjs → chunk-SPWAMXNR.mjs} +2 -2
- package/dist/lib/neutral/{chunk-LY6XK5MV.mjs.map → chunk-SPWAMXNR.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-U5WTDOMV.mjs +8 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs +9 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs.map +7 -0
- package/dist/lib/neutral/{close-YZHFYPUN.mjs → close-5WEQZRNK.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +18 -19
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/constants.mjs +16 -0
- package/dist/lib/neutral/constants.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +18 -14
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-XKU2W6QC.mjs → create-QZ47FHQU.mjs} +4 -4
- package/dist/lib/neutral/{create-XKU2W6QC.mjs.map → create-QZ47FHQU.mjs.map} +3 -3
- package/dist/lib/neutral/{create-object-22WUOWZQ.mjs → create-object-ZU6FZW5X.mjs} +1 -6
- package/dist/lib/neutral/create-object-ZU6FZW5X.mjs.map +7 -0
- package/dist/lib/neutral/{delete-EFM7CAVO.mjs → delete-SPCU2VFM.mjs} +3 -3
- package/dist/lib/neutral/{delete-field-ONAPFFO5.mjs → delete-field-TAKJVEAD.mjs} +3 -3
- package/dist/lib/neutral/{duplicate-object-OJRPFV5I.mjs → duplicate-object-BUPZOO6S.mjs} +3 -3
- package/dist/lib/neutral/{export-space-M5RNVUQX.mjs → export-space-S5SCAL4M.mjs} +3 -3
- package/dist/lib/neutral/{get-share-link-FUQBJPSQ.mjs → get-share-link-CLM5IQRL.mjs} +3 -3
- package/dist/lib/neutral/{identity-created-QMV4DANW.mjs → identity-created-BEYMLBK4.mjs} +2 -2
- package/dist/lib/neutral/{identity-created-QMV4DANW.mjs.map → identity-created-BEYMLBK4.mjs.map} +3 -3
- package/dist/lib/neutral/{import-space-L3AUIARM.mjs → import-space-LJQK3KT7.mjs} +3 -3
- package/dist/lib/neutral/index.mjs +7 -3
- package/dist/lib/neutral/join-FSODYIOC.mjs +54 -0
- package/dist/lib/neutral/join-FSODYIOC.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{migrate-WPUISBC4.mjs → migrate-WHM6LU7L.mjs} +4 -4
- package/dist/lib/neutral/{migrate-WPUISBC4.mjs.map → migrate-WHM6LU7L.mjs.map} +3 -3
- package/dist/lib/neutral/{navigation-handler-IKXZGMII.mjs → navigation-handler-ZF7MV2HL.mjs} +16 -10
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +7 -0
- package/dist/lib/neutral/{navigation-resolver-VBPGMFCE.mjs → navigation-resolver-KBESOSWU.mjs} +5 -5
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +7 -0
- package/dist/lib/neutral/{open-RRYULTSY.mjs → open-JCXTL3SK.mjs} +3 -3
- package/dist/lib/neutral/{open-create-object-BRUVFZSY.mjs → open-create-object-WAIAU7TA.mjs} +6 -6
- package/dist/lib/neutral/{open-create-space-ARLQWW65.mjs → open-create-space-VU47FWPZ.mjs} +6 -6
- package/dist/lib/neutral/{open-import-space-65H57JXX.mjs → open-import-space-GUHIEWYB.mjs} +6 -6
- package/dist/lib/neutral/{open-members-677P6KD3.mjs → open-members-MLLBHKUU.mjs} +3 -3
- package/dist/lib/neutral/{open-settings-PRBSGO6D.mjs → open-settings-DTPZF4U4.mjs} +3 -3
- package/dist/lib/neutral/operations/index.mjs +3 -3
- package/dist/lib/neutral/plugin.mjs +3 -3
- package/dist/lib/neutral/{react-surface-5EQ6X4CL.mjs → react-surface-LRA7GIFN.mjs} +33 -14
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +7 -0
- package/dist/lib/neutral/{remove-objects-PWJJI36V.mjs → remove-objects-WEO66EDS.mjs} +3 -3
- package/dist/lib/neutral/{rename-4727PKI4.mjs → rename-Q6UNCBIM.mjs} +6 -6
- package/dist/lib/neutral/{rename-object-FXUAB5FN.mjs → rename-object-2UCEGU7U.mjs} +6 -6
- package/dist/lib/neutral/{restore-field-3ICSIHGA.mjs → restore-field-6CQAFOXY.mjs} +3 -3
- package/dist/lib/neutral/{restore-objects-V2BTEWN3.mjs → restore-objects-3VINLP7C.mjs} +3 -3
- package/dist/lib/neutral/{share-ZOZPAUGI.mjs → share-A4WPILNF.mjs} +3 -3
- package/dist/lib/neutral/{snapshot-ZC5PU55W.mjs → snapshot-HBYMAPA7.mjs} +3 -3
- package/dist/lib/neutral/{spaces-ready-EXPCJD4N.mjs → spaces-ready-GWMSU72V.mjs} +4 -4
- package/dist/lib/neutral/{spaces-ready-EXPCJD4N.mjs.map → spaces-ready-GWMSU72V.mjs.map} +3 -3
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +14 -6
- package/dist/lib/neutral/translations.mjs.map +2 -2
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/lib/neutral/{wait-for-object-WURK2SLQ.mjs → wait-for-object-U6P2NNWY.mjs} +3 -3
- 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 +15 -33
- 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.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts +15 -33
- 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 +3 -2
- 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 +1 -4
- 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 +17 -4
- 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 -33
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -5
- package/dist/types/src/capabilities/react-root.d.ts.map +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 -2
- package/dist/types/src/capabilities/repair.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -3
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -13
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts +2 -3
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
- package/dist/types/src/components/ForeignKeys/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.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 +122 -52
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts +15 -0
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts.map +1 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts +2 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +5 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/index.d.ts +1 -1
- package/dist/types/src/containers/RenamePopover/index.d.ts.map +1 -1
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +122 -52
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts +11 -0
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts +123 -53
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +122 -52
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +122 -52
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts +16 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +33 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +9 -37
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/join.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +122 -52
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +3 -1
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -59
- package/src/SpacePlugin.ts +3 -3
- package/src/capabilities/app-graph-builder/extensions/collections.ts +45 -52
- package/src/capabilities/app-graph-builder/extensions/companions.ts +3 -2
- package/src/capabilities/app-graph-builder/extensions/database.ts +108 -84
- package/src/capabilities/app-graph-builder/extensions/settings.ts +8 -5
- package/src/capabilities/app-graph-builder/extensions/shared.test.ts +13 -9
- package/src/capabilities/app-graph-builder/extensions/shared.ts +2 -5
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +32 -6
- package/src/capabilities/create-object.ts +0 -5
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +14 -4
- package/src/capabilities/navigation-resolver.ts +8 -8
- package/src/capabilities/react-surface.tsx +39 -13
- package/src/capabilities/spaces-ready.ts +1 -1
- package/src/components/ForeignKeys/ForeignKeys.tsx +20 -19
- package/src/components/index.ts +3 -3
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +38 -3
- package/src/containers/DefaultProperties/DefaultProperties.tsx +69 -0
- package/src/containers/DefaultProperties/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +8 -21
- package/src/containers/MembersContainer/MembersContainer.tsx +37 -33
- package/src/containers/RelatedArticle/RelatedArticle.tsx +1 -2
- package/src/containers/RenamePopover/RenamePopover.tsx +18 -5
- package/src/containers/RenamePopover/index.ts +1 -1
- package/src/containers/SchemaContainer/SchemaContainer.tsx +21 -17
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +1 -1
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +12 -10
- package/src/containers/SpacePresence/SpacePresence.tsx +22 -20
- package/src/containers/SpacePresence/index.ts +1 -1
- package/src/{components → containers}/SpaceSettings/SpaceSettings.stories.tsx +1 -1
- package/src/containers/SpaceSettings/SpaceSettings.tsx +75 -0
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +115 -106
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.tsx +116 -0
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.tsx +162 -0
- package/src/containers/TypeCollectionArticle/index.ts +5 -0
- package/src/containers/index.ts +4 -1
- package/src/errors.ts +11 -0
- package/src/index.ts +1 -0
- package/src/operations/add-object.ts +6 -5
- package/src/operations/add-type.ts +1 -1
- package/src/operations/create.ts +2 -2
- package/src/operations/definitions.ts +1 -2
- package/src/operations/join.ts +19 -0
- package/src/operations/migrate.ts +1 -1
- package/src/translations.ts +15 -6
- package/src/types/Settings.ts +10 -1
- package/src/types/capabilities.ts +1 -1
- package/src/util.ts +0 -1
- package/dist/lib/neutral/CreateObjectDialog-4VMOUKM7.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-QZGNRJ4P.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-OWCAMBKS.mjs.map +0 -7
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs +0 -33
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-YRCRBIYU.mjs.map +0 -7
- package/dist/lib/neutral/RenamePopover-XBZAKNM7.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-2NK5YB5O.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs +0 -37
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-QAFQ4LWC.mjs.map +0 -7
- package/dist/lib/neutral/add-object-S64XELC3.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-TMAD2ZTH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-2LTGSUGQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DSYEB2UN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F2VJ6VBV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-I5JXVBXX.mjs +0 -8
- package/dist/lib/neutral/create-object-22WUOWZQ.mjs.map +0 -7
- package/dist/lib/neutral/join-VY3QYBU7.mjs +0 -28
- package/dist/lib/neutral/join-VY3QYBU7.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-IKXZGMII.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-VBPGMFCE.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-5EQ6X4CL.mjs.map +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts +0 -8
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts +0 -10
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/index.d.ts +0 -2
- package/dist/types/src/containers/ObjectProperties/index.d.ts.map +0 -1
- package/src/components/SpaceSettings/SpaceSettings.tsx +0 -56
- package/src/containers/ObjectProperties/ObjectProperties.tsx +0 -32
- package/src/containers/ObjectProperties/index.ts +0 -5
- /package/dist/lib/neutral/{MenuFooter-QCNFUIAO.mjs.map → MenuFooter-FWE5LFM4.mjs.map} +0 -0
- /package/dist/lib/neutral/{SmallPresenceLive-L4H7WJOA.mjs.map → SmallPresenceLive-FW3AMEY5.mjs.map} +0 -0
- /package/dist/lib/neutral/{SpacePresence-PDTEDHDE.mjs.map → SpacePresence-T37WH43Y.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-relation-GWSE42BU.mjs.map → add-relation-BGTLART5.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-2RPQHHD7.mjs.map → chunk-C2ULK22J.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-I5JXVBXX.mjs.map → chunk-U5WTDOMV.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-YZHFYPUN.mjs.map → close-5WEQZRNK.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-EFM7CAVO.mjs.map → delete-SPCU2VFM.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-field-ONAPFFO5.mjs.map → delete-field-TAKJVEAD.mjs.map} +0 -0
- /package/dist/lib/neutral/{duplicate-object-OJRPFV5I.mjs.map → duplicate-object-BUPZOO6S.mjs.map} +0 -0
- /package/dist/lib/neutral/{export-space-M5RNVUQX.mjs.map → export-space-S5SCAL4M.mjs.map} +0 -0
- /package/dist/lib/neutral/{get-share-link-FUQBJPSQ.mjs.map → get-share-link-CLM5IQRL.mjs.map} +0 -0
- /package/dist/lib/neutral/{import-space-L3AUIARM.mjs.map → import-space-LJQK3KT7.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-RRYULTSY.mjs.map → open-JCXTL3SK.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-object-BRUVFZSY.mjs.map → open-create-object-WAIAU7TA.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-space-ARLQWW65.mjs.map → open-create-space-VU47FWPZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-import-space-65H57JXX.mjs.map → open-import-space-GUHIEWYB.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-members-677P6KD3.mjs.map → open-members-MLLBHKUU.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-settings-PRBSGO6D.mjs.map → open-settings-DTPZF4U4.mjs.map} +0 -0
- /package/dist/lib/neutral/{remove-objects-PWJJI36V.mjs.map → remove-objects-WEO66EDS.mjs.map} +0 -0
- /package/dist/lib/neutral/{rename-4727PKI4.mjs.map → rename-Q6UNCBIM.mjs.map} +0 -0
- /package/dist/lib/neutral/{rename-object-FXUAB5FN.mjs.map → rename-object-2UCEGU7U.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-field-3ICSIHGA.mjs.map → restore-field-6CQAFOXY.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-objects-V2BTEWN3.mjs.map → restore-objects-3VINLP7C.mjs.map} +0 -0
- /package/dist/lib/neutral/{share-ZOZPAUGI.mjs.map → share-A4WPILNF.mjs.map} +0 -0
- /package/dist/lib/neutral/{snapshot-ZC5PU55W.mjs.map → snapshot-HBYMAPA7.mjs.map} +0 -0
- /package/dist/lib/neutral/{wait-for-object-WURK2SLQ.mjs.map → wait-for-object-U6P2NNWY.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts +0 -0
- /package/src/{components → containers}/SpaceSettings/index.ts +0 -0
|
@@ -8,15 +8,15 @@ import * as Match from 'effect/Match';
|
|
|
8
8
|
import * as Option from 'effect/Option';
|
|
9
9
|
|
|
10
10
|
import { Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
11
|
-
import { AppNode, AppNodeMatcher, LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
12
|
-
import { type Space,
|
|
11
|
+
import { AppCapabilities, AppNode, AppNodeMatcher, LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
12
|
+
import { type Space, isSpace } from '@dxos/client/echo';
|
|
13
13
|
import { Operation } from '@dxos/compute';
|
|
14
|
-
import { Annotation, Collection, Entity, Filter, Obj, Query, Scope, Type } from '@dxos/echo';
|
|
14
|
+
import { Annotation, Collection, Entity, Filter, Key, Obj, Query, Scope, Type } from '@dxos/echo';
|
|
15
15
|
import { HiddenAnnotation } from '@dxos/echo/Annotation';
|
|
16
|
-
import { type URI } from '@dxos/keys';
|
|
17
16
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
18
|
-
import {
|
|
17
|
+
import { GraphBuilder, Node } from '@dxos/plugin-graph';
|
|
19
18
|
import { ViewAnnotation } from '@dxos/schema';
|
|
19
|
+
import { isLabel, toLocalizedString } from '@dxos/ui-types/translations';
|
|
20
20
|
import { createFilename, isNonNullable } from '@dxos/util';
|
|
21
21
|
|
|
22
22
|
import { meta } from '#meta';
|
|
@@ -26,11 +26,9 @@ import { SpaceCapabilities } from '#types';
|
|
|
26
26
|
import { makeCreateObjectEntryForDatabaseType } from '../../../util';
|
|
27
27
|
import {
|
|
28
28
|
ADD_VIEW_TO_SCHEMA_LABEL,
|
|
29
|
-
|
|
29
|
+
DATABASE_SECTION_TYPE,
|
|
30
30
|
SNAPSHOT_BY_SCHEMA_LABEL,
|
|
31
31
|
STATIC_SCHEMA_TYPE,
|
|
32
|
-
TYPES_SECTION_TYPE,
|
|
33
|
-
TYPE_COLLECTION_TYPE,
|
|
34
32
|
buildViewIndex,
|
|
35
33
|
downloadBlob,
|
|
36
34
|
} from './shared';
|
|
@@ -44,25 +42,36 @@ export const createDatabaseExtensions = Effect.fnUntraced(function* () {
|
|
|
44
42
|
const capabilities = yield* Capability.Service;
|
|
45
43
|
|
|
46
44
|
return yield* Effect.all([
|
|
47
|
-
//
|
|
45
|
+
// System section group — created alongside database/settings so the group always
|
|
46
|
+
// appears when the space plugin is active and hides when there are no children.
|
|
48
47
|
GraphBuilder.createExtension({
|
|
49
|
-
id:
|
|
48
|
+
id: Paths.GroupSegments.system,
|
|
50
49
|
match: AppNodeMatcher.whenSpace,
|
|
51
|
-
connector: (space
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
connector: (space) =>
|
|
51
|
+
Effect.succeed([
|
|
52
|
+
AppNode.makeGroup({
|
|
53
|
+
id: Paths.GroupSegments.system,
|
|
54
|
+
type: Paths.GroupTypes.system,
|
|
55
|
+
label: ['nav-tree-group-system.label', { ns: meta.profile.key }],
|
|
56
|
+
space,
|
|
57
|
+
position: 900,
|
|
58
|
+
}),
|
|
59
|
+
]),
|
|
60
|
+
}),
|
|
56
61
|
|
|
62
|
+
// Types section virtual node under the system group.
|
|
63
|
+
GraphBuilder.createExtension({
|
|
64
|
+
id: 'databaseSection',
|
|
65
|
+
match: AppNodeMatcher.whenNavTreeGroup(Paths.GroupTypes.system),
|
|
66
|
+
connector: (space) => {
|
|
57
67
|
return Effect.succeed([
|
|
58
68
|
AppNode.makeSection({
|
|
59
|
-
id: Paths.Segments.
|
|
60
|
-
type:
|
|
61
|
-
label: ['
|
|
69
|
+
id: Paths.Segments.database,
|
|
70
|
+
type: DATABASE_SECTION_TYPE,
|
|
71
|
+
label: ['database-section.label', { ns: meta.profile.key }],
|
|
62
72
|
icon: 'ph--database--regular',
|
|
63
73
|
space,
|
|
64
|
-
|
|
65
|
-
testId: 'spacePlugin.typesSection',
|
|
74
|
+
testId: 'spacePlugin.databaseSection',
|
|
66
75
|
}),
|
|
67
76
|
]);
|
|
68
77
|
},
|
|
@@ -70,12 +79,16 @@ export const createDatabaseExtensions = Effect.fnUntraced(function* () {
|
|
|
70
79
|
|
|
71
80
|
// Schema nodes under the Types virtual node.
|
|
72
81
|
GraphBuilder.createExtension({
|
|
73
|
-
id: '
|
|
82
|
+
id: 'database',
|
|
74
83
|
match: (node) => {
|
|
75
84
|
const space = isSpace(node.properties.space) ? node.properties.space : undefined;
|
|
76
|
-
return node.type ===
|
|
85
|
+
return node.type === DATABASE_SECTION_TYPE && space ? Option.some(space) : Option.none();
|
|
77
86
|
},
|
|
78
87
|
connector: (space, get) => {
|
|
88
|
+
// Read settings reactively — same pattern as the translator read below.
|
|
89
|
+
const settingsAtom = get(capabilities.atom(SpaceCapabilities.Settings)).at(0);
|
|
90
|
+
const showHidden = settingsAtom ? get(settingsAtom).showHidden : false;
|
|
91
|
+
|
|
79
92
|
// Persisted types live in the space db; static/runtime types live in the shared registry.
|
|
80
93
|
// Fan across both so the space's own types appear without leaking other spaces' types.
|
|
81
94
|
const allSchemas = get(
|
|
@@ -90,7 +103,7 @@ export const createDatabaseExtensions = Effect.fnUntraced(function* () {
|
|
|
90
103
|
return false;
|
|
91
104
|
}
|
|
92
105
|
const schema = Type.getSchema(type);
|
|
93
|
-
if (HiddenAnnotation.get(schema).pipe(Option.getOrElse(() => false))) {
|
|
106
|
+
if (!showHidden && HiddenAnnotation.get(schema).pipe(Option.getOrElse(() => false))) {
|
|
94
107
|
return false;
|
|
95
108
|
}
|
|
96
109
|
if (Type.getTypename(type) === Type.getTypename(Collection.Collection)) {
|
|
@@ -113,7 +126,24 @@ export const createDatabaseExtensions = Effect.fnUntraced(function* () {
|
|
|
113
126
|
return objects.length > 0 || viewIndex.typeUrisWithViews.has(typeUri);
|
|
114
127
|
});
|
|
115
128
|
|
|
116
|
-
|
|
129
|
+
// Sort alphabetically by display name. Static types' labels are `typename.label` translation
|
|
130
|
+
// keys resolved at render; resolve them here via the Translator capability so the order matches
|
|
131
|
+
// what users see. Resolved reactively inside the connector (not at factory setup) so the
|
|
132
|
+
// capability — contributed during startup by the theme plugin — is present when this runs.
|
|
133
|
+
const translator = get(capabilities.atom(AppCapabilities.Translator)).at(0);
|
|
134
|
+
const labelOf = (node: Node.NodeArg<Type.AnyEntity>): string => {
|
|
135
|
+
const label = node.properties?.label;
|
|
136
|
+
if (translator && isLabel(label)) {
|
|
137
|
+
return toLocalizedString(label, translator.t);
|
|
138
|
+
}
|
|
139
|
+
return node.data ? Type.getTypename(node.data) : '';
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
return Effect.succeed(
|
|
143
|
+
visibleSchemas
|
|
144
|
+
.map((schema) => createSchemaNode({ schema, space, get }))
|
|
145
|
+
.toSorted((nodeA, nodeB) => labelOf(nodeA).localeCompare(labelOf(nodeB))),
|
|
146
|
+
);
|
|
117
147
|
},
|
|
118
148
|
}),
|
|
119
149
|
|
|
@@ -127,30 +157,11 @@ export const createDatabaseExtensions = Effect.fnUntraced(function* () {
|
|
|
127
157
|
connector: ({ space, schema }, get) => {
|
|
128
158
|
const client = get(capabilities.atom(ClientCapabilities.Client)).at(0);
|
|
129
159
|
const schemas = client ? get(client.graph.registry.query(Filter.type(Type.Type)).atom) : [];
|
|
130
|
-
|
|
131
|
-
const slug = Paths.getTypeSlug(schema);
|
|
132
160
|
const typeUri = Type.getURI(schema);
|
|
133
161
|
|
|
134
|
-
//
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
type: TYPE_COLLECTION_TYPE,
|
|
138
|
-
data: { space, typeUri },
|
|
139
|
-
properties: {
|
|
140
|
-
label: ['type-collection-all.label', { ns: meta.profile.key }],
|
|
141
|
-
icon: 'ph--list--regular',
|
|
142
|
-
iconHue: 'neutral',
|
|
143
|
-
role: 'branch',
|
|
144
|
-
testId: `spacePlugin.typeCollectionAll.${slug}`,
|
|
145
|
-
selectable: false,
|
|
146
|
-
draggable: false,
|
|
147
|
-
droppable: false,
|
|
148
|
-
childrenDroppable: false,
|
|
149
|
-
blockInstruction: BLOCK_REORDER_ABOVE,
|
|
150
|
-
},
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// View objects for this schema.
|
|
162
|
+
// View objects are the type node's only visible children; objects of the type are resolved
|
|
163
|
+
// on demand as hidden children (see the `typeCollectionObject` resolver). The list of all
|
|
164
|
+
// objects is rendered when the type node is selected (see TypeCollectionArticle).
|
|
154
165
|
const viewIndex = buildViewIndex(get, space, schemas);
|
|
155
166
|
const viewNodes = viewIndex
|
|
156
167
|
.getViewsForTypeUri(typeUri)
|
|
@@ -159,51 +170,60 @@ export const createDatabaseExtensions = Effect.fnUntraced(function* () {
|
|
|
159
170
|
get,
|
|
160
171
|
db: space.db,
|
|
161
172
|
object,
|
|
173
|
+
draggable: false,
|
|
162
174
|
droppable: false,
|
|
163
175
|
}),
|
|
164
176
|
)
|
|
165
177
|
.filter(isNonNullable);
|
|
166
178
|
|
|
167
|
-
return Effect.succeed(
|
|
179
|
+
return Effect.succeed(viewNodes);
|
|
168
180
|
},
|
|
169
181
|
}),
|
|
170
182
|
|
|
171
|
-
// Objects of the
|
|
183
|
+
// Objects of a type are not enumerated in the nav tree; navigating directly to the canonical
|
|
184
|
+
// object path resolves the object on demand as a hidden child of its type node. Mirrors the
|
|
185
|
+
// inbox feed-object resolver: a resolver keyed on path shape, not a connector.
|
|
172
186
|
GraphBuilder.createExtension({
|
|
173
|
-
id: '
|
|
174
|
-
match: (
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
const schemas = client ? get(client.graph.registry.query(Filter.type(Type.Type)).atom) : [];
|
|
183
|
-
const viewIndex = buildViewIndex(get, space, schemas);
|
|
184
|
-
const objects = get(space.db.query(Filter.type(typeUri)).atom).filter(
|
|
185
|
-
(object: Obj.Unknown) => !viewIndex.isView(object) && !Obj.getParent(object),
|
|
186
|
-
);
|
|
187
|
+
id: 'typeCollectionObject',
|
|
188
|
+
match: () => Option.none(),
|
|
189
|
+
resolver: (qualifiedId, get) =>
|
|
190
|
+
Effect.gen(function* () {
|
|
191
|
+
const segments = qualifiedId.split('/');
|
|
192
|
+
// Discriminator: the canonical object path `…/database/<slug>/<objectId>`.
|
|
193
|
+
if (segments.at(-3) !== Paths.Segments.database) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
187
196
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
197
|
+
const spaceId = Paths.getSpaceIdFromPath(qualifiedId);
|
|
198
|
+
const objectId = segments.at(-1);
|
|
199
|
+
if (!spaceId || !objectId || !Key.EntityId.isValid(objectId)) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const client = get(capabilities.atom(ClientCapabilities.Client)).at(0);
|
|
204
|
+
const space = client?.spaces.get(spaceId);
|
|
205
|
+
if (!space) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const object = get(space.db.query(Filter.id(objectId)).atom).at(0);
|
|
210
|
+
if (!object) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
get(Obj.atom(object));
|
|
215
|
+
const node = AppNode.makeObject({
|
|
216
|
+
get,
|
|
217
|
+
db: space.db,
|
|
218
|
+
object,
|
|
219
|
+
disposition: 'hidden',
|
|
220
|
+
draggable: false,
|
|
221
|
+
droppable: false,
|
|
222
|
+
});
|
|
223
|
+
// Resolver nodes are keyed by the requested path (not the local object id) so the parent
|
|
224
|
+
// type node's child edge connects; `makeObject` uses the local id, so override it here.
|
|
225
|
+
return node && { ...node, id: qualifiedId };
|
|
226
|
+
}),
|
|
207
227
|
}),
|
|
208
228
|
|
|
209
229
|
// Actions for schema nodes.
|
|
@@ -290,9 +310,11 @@ const createSchemaNode = ({
|
|
|
290
310
|
label,
|
|
291
311
|
icon,
|
|
292
312
|
iconHue,
|
|
293
|
-
|
|
313
|
+
// Selecting the type node opens a list of every object of this type (see TypeCollectionArticle);
|
|
314
|
+
// objects resolve on demand as hidden children. View objects are its only visible children, so
|
|
315
|
+
// without a view the node is a leaf (no `role: 'branch'`).
|
|
294
316
|
testId: `spacePlugin.schemaNode.${typename}`,
|
|
295
|
-
selectable:
|
|
317
|
+
selectable: true,
|
|
296
318
|
draggable: false,
|
|
297
319
|
droppable: false,
|
|
298
320
|
childrenDroppable: false,
|
|
@@ -368,7 +390,9 @@ const createSchemaActions = ({
|
|
|
368
390
|
Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
369
391
|
target: space.db,
|
|
370
392
|
views: true,
|
|
371
|
-
|
|
393
|
+
// The type-picker field value is the type URI (see TypeOptions), so seed the default with
|
|
394
|
+
// the URI — not the bare typename — for the option to be pre-selected.
|
|
395
|
+
initialFormValues: { typename: Type.getURI(type) },
|
|
372
396
|
}),
|
|
373
397
|
properties: {
|
|
374
398
|
label: ADD_VIEW_TO_SCHEMA_LABEL,
|
|
@@ -6,6 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { AppNode, AppNodeMatcher, AppSpace } from '@dxos/app-toolkit';
|
|
8
8
|
import { GraphBuilder, Node } from '@dxos/plugin-graph';
|
|
9
|
+
import { Position } from '@dxos/util';
|
|
9
10
|
|
|
10
11
|
import { meta } from '#meta';
|
|
11
12
|
import { SETTINGS_SECTION_ID, SETTINGS_SECTION_TYPE } from '#types';
|
|
@@ -17,7 +18,7 @@ import { SETTINGS_SECTION_ID, SETTINGS_SECTION_TYPE } from '#types';
|
|
|
17
18
|
/**
|
|
18
19
|
* Settings section attached directly under each Space node, plus its children.
|
|
19
20
|
*
|
|
20
|
-
* The virtual `settings` section is pinned to the top via `position:
|
|
21
|
+
* The virtual `settings` section is pinned to the top via `position: Position.first`
|
|
21
22
|
* so it sits above the un-positioned middle band (collections, mailboxes,
|
|
22
23
|
* automations, integrations, etc.). It groups the panels contributed by this
|
|
23
24
|
* plugin (general, members) and by other plugins (automation, functions).
|
|
@@ -33,9 +34,9 @@ export const createSettingsExtensions = Effect.fnUntraced(function* () {
|
|
|
33
34
|
type: SETTINGS_SECTION_TYPE,
|
|
34
35
|
label: ['settings-section.label', { ns: meta.profile.key }],
|
|
35
36
|
icon: 'ph--sliders--regular',
|
|
36
|
-
iconHue: '
|
|
37
|
+
iconHue: 'emerald',
|
|
37
38
|
space,
|
|
38
|
-
position:
|
|
39
|
+
position: Position.first,
|
|
39
40
|
testId: 'spacePlugin.settings',
|
|
40
41
|
}),
|
|
41
42
|
]),
|
|
@@ -54,8 +55,9 @@ export const createSettingsExtensions = Effect.fnUntraced(function* () {
|
|
|
54
55
|
properties: {
|
|
55
56
|
label: ['space-settings-properties.label', { ns: meta.profile.key }],
|
|
56
57
|
icon: 'ph--brackets-curly--regular',
|
|
57
|
-
iconHue: '
|
|
58
|
+
iconHue: 'emerald',
|
|
58
59
|
space,
|
|
60
|
+
position: Position.first,
|
|
59
61
|
testId: 'spacePlugin.general',
|
|
60
62
|
},
|
|
61
63
|
}),
|
|
@@ -68,8 +70,9 @@ export const createSettingsExtensions = Effect.fnUntraced(function* () {
|
|
|
68
70
|
properties: {
|
|
69
71
|
label: ['members-panel.label', { ns: meta.profile.key }],
|
|
70
72
|
icon: 'ph--users--regular',
|
|
71
|
-
iconHue: '
|
|
73
|
+
iconHue: 'emerald',
|
|
72
74
|
space,
|
|
75
|
+
position: Position.first,
|
|
73
76
|
testId: 'spacePlugin.members',
|
|
74
77
|
},
|
|
75
78
|
}),
|
|
@@ -10,19 +10,23 @@ import { type Space, SpaceState } from '@dxos/client/echo';
|
|
|
10
10
|
import { Annotation, DXN, Entity, Filter, Obj, Query, Ref, Type, View } from '@dxos/echo';
|
|
11
11
|
import { type EchoDatabase } from '@dxos/echo-client';
|
|
12
12
|
import { EchoTestBuilder } from '@dxos/echo-client/testing';
|
|
13
|
-
import {
|
|
13
|
+
import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
14
14
|
import { ViewAnnotation } from '@dxos/schema';
|
|
15
15
|
|
|
16
16
|
import { buildViewIndex, checkPendingMigration } from './shared';
|
|
17
17
|
|
|
18
|
-
const TestContact =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const TestContact = Type.makeObject(DXN.make('com.example.type.contact', '0.1.0'))(
|
|
19
|
+
Schema.Struct({
|
|
20
|
+
name: Schema.String,
|
|
21
|
+
}),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const TestViewWrapper = Type.makeObject(DXN.make('com.example.type.viewWrapper', '0.1.0'))(
|
|
25
|
+
Schema.Struct({
|
|
26
|
+
name: Schema.optional(Schema.String),
|
|
27
|
+
view: Ref.Ref(View.View),
|
|
28
|
+
}).pipe(ViewAnnotation.set(['view'])),
|
|
29
|
+
);
|
|
26
30
|
|
|
27
31
|
describe('buildViewIndex', () => {
|
|
28
32
|
let testBuilder: EchoTestBuilder;
|
|
@@ -8,7 +8,7 @@ import * as Option from 'effect/Option';
|
|
|
8
8
|
import { type Space, SpaceState, isSpace } from '@dxos/client/echo';
|
|
9
9
|
import { type Operation } from '@dxos/compute';
|
|
10
10
|
import { Annotation, Filter, Obj, Type } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
12
12
|
import { type Node } from '@dxos/plugin-graph';
|
|
13
13
|
import { type TreeData } from '@dxos/react-ui-list';
|
|
14
14
|
import type { EchoViewRefPath } from '@dxos/schema';
|
|
@@ -21,9 +21,8 @@ import { meta } from '#meta';
|
|
|
21
21
|
// Virtual Node Types
|
|
22
22
|
//
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const DATABASE_SECTION_TYPE = `${meta.profile.key}.database`;
|
|
25
25
|
export const COLLECTIONS_SECTION_TYPE = `${meta.profile.key}.collections`;
|
|
26
|
-
export const TYPE_COLLECTION_TYPE = `${meta.profile.key}.type-collection`;
|
|
27
26
|
export const STATIC_SCHEMA_TYPE = `${meta.profile.key}.static-schema`;
|
|
28
27
|
|
|
29
28
|
//
|
|
@@ -37,7 +36,6 @@ export const META_NS: { ns: string } = { ns: meta.profile.key };
|
|
|
37
36
|
// Stable Callbacks
|
|
38
37
|
//
|
|
39
38
|
|
|
40
|
-
export const BLOCK_REORDER_ABOVE = (_source: TreeData, instruction: any) => instruction.type === 'reorder-above';
|
|
41
39
|
export const CAN_DROP_SPACE = (source: TreeData) => Obj.isObject(source.item.data) || isSpace(source.item.data);
|
|
42
40
|
|
|
43
41
|
//
|
|
@@ -66,7 +64,6 @@ export const CREATE_OBJECT_IN_SPACE_LABEL: Label = ['create-object-in-space.labe
|
|
|
66
64
|
export const EXPOSE_OBJECT_LABEL: Label = ['expose-object.label', META_NS];
|
|
67
65
|
export const MIGRATE_SPACE_LABEL: Label = ['migrate-space.label', META_NS];
|
|
68
66
|
export const NEW_TYPE_LABEL: Label = ['new-type.label', META_NS];
|
|
69
|
-
export const REMOVE_FROM_COLLECTION_LABEL: Label = ['remove-from-collection.label', META_NS];
|
|
70
67
|
export const RENAME_SPACE_LABEL: Label = ['rename-space.label', META_NS];
|
|
71
68
|
export const SETTINGS_PANEL_LABEL: Label = ['settings-panel.label', META_NS];
|
|
72
69
|
export const SNAPSHOT_BY_SCHEMA_LABEL: Label = ['snapshot-by-schema.label', META_NS];
|
|
@@ -14,6 +14,7 @@ import { ClientCapabilities } from '@dxos/plugin-client';
|
|
|
14
14
|
import { CreateAtom, Graph, GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
15
15
|
import { SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
|
|
16
16
|
import { Expando } from '@dxos/schema';
|
|
17
|
+
import { Position } from '@dxos/util';
|
|
17
18
|
|
|
18
19
|
import { meta } from '#meta';
|
|
19
20
|
import { SpaceOperation } from '#operations';
|
|
@@ -46,7 +47,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
46
47
|
return yield* Effect.all([
|
|
47
48
|
GraphBuilder.createExtension({
|
|
48
49
|
id: 'spaceHome',
|
|
49
|
-
position:
|
|
50
|
+
position: Position.first,
|
|
50
51
|
match: AppNodeMatcher.whenSpace,
|
|
51
52
|
connector: (space) =>
|
|
52
53
|
Effect.succeed([
|
|
@@ -57,8 +58,8 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
57
58
|
properties: {
|
|
58
59
|
label: SPACE_HOME_NODE_LABEL,
|
|
59
60
|
icon: 'ph--house--regular',
|
|
60
|
-
iconHue: '
|
|
61
|
-
position:
|
|
61
|
+
iconHue: 'emerald',
|
|
62
|
+
position: Position.first,
|
|
62
63
|
draggable: false,
|
|
63
64
|
droppable: false,
|
|
64
65
|
space,
|
|
@@ -69,7 +70,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
69
70
|
|
|
70
71
|
GraphBuilder.createExtension({
|
|
71
72
|
id: 'primaryActions',
|
|
72
|
-
position:
|
|
73
|
+
position: Position.first,
|
|
73
74
|
match: NodeMatcher.whenRoot,
|
|
74
75
|
actions: () =>
|
|
75
76
|
Effect.succeed([
|
|
@@ -176,7 +177,13 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
176
177
|
id: 'spaces',
|
|
177
178
|
match: NodeMatcher.whenRoot,
|
|
178
179
|
connector: (_node, get) => {
|
|
179
|
-
|
|
180
|
+
// This reactive connector can recompute once during the teardown window (e.g. when stories
|
|
181
|
+
// swap plugin managers) after the Client capability has been removed; tolerate its absence
|
|
182
|
+
// via the safe `getAll` lookup rather than the throwing `get`.
|
|
183
|
+
const [client] = capabilities.getAll(ClientCapabilities.Client);
|
|
184
|
+
if (!client) {
|
|
185
|
+
return Effect.succeed([]);
|
|
186
|
+
}
|
|
180
187
|
const stateAtom = capabilities.get(SpaceCapabilities.State);
|
|
181
188
|
const ephemeralAtom = capabilities.get(SpaceCapabilities.EphemeralState);
|
|
182
189
|
const spacesAtom = CreateAtom.fromObservable(client.spaces);
|
|
@@ -216,7 +223,7 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
216
223
|
.sort((sortA, sortB) => orderMap.get(sortA.id)! - orderMap.get(sortB.id)!),
|
|
217
224
|
...spaces.filter((space) => !orderMap.has(space.id)),
|
|
218
225
|
]
|
|
219
|
-
.filter((space, idx) => spaceStates[idx]
|
|
226
|
+
.filter((space, idx) => spaceStates[idx] === SpaceState.SPACE_READY)
|
|
220
227
|
.filter(
|
|
221
228
|
(space) =>
|
|
222
229
|
space.tags.length === 0 || AppSpace.isPersonalSpace(space) || AppSpace.isExemplarSpace(space),
|
|
@@ -240,6 +247,25 @@ export const createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
240
247
|
// resolver: (id, get) => { ... },
|
|
241
248
|
}),
|
|
242
249
|
|
|
250
|
+
// Communications section group — no single plugin owns this category; it lives here so the
|
|
251
|
+
// group is always present when the space plugin is active. A more specific plugin (e.g. a
|
|
252
|
+
// future plugin-communications) should own this once one exists.
|
|
253
|
+
// TODO(wittjosiah): Move to a dedicated communications plugin when one exists.
|
|
254
|
+
GraphBuilder.createExtension({
|
|
255
|
+
id: Paths.GroupSegments.communications,
|
|
256
|
+
match: AppNodeMatcher.whenSpace,
|
|
257
|
+
connector: (space) =>
|
|
258
|
+
Effect.succeed([
|
|
259
|
+
AppNode.makeGroup({
|
|
260
|
+
id: Paths.GroupSegments.communications,
|
|
261
|
+
type: Paths.GroupTypes.communications,
|
|
262
|
+
label: ['nav-tree-group-comm.label', { ns: meta.profile.key }],
|
|
263
|
+
space,
|
|
264
|
+
position: 100,
|
|
265
|
+
}),
|
|
266
|
+
]),
|
|
267
|
+
}),
|
|
268
|
+
|
|
243
269
|
GraphBuilder.createExtension({
|
|
244
270
|
id: 'actions',
|
|
245
271
|
match: AppNodeMatcher.whenSpace,
|
|
@@ -26,7 +26,6 @@ export default Capability.makeModule(
|
|
|
26
26
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
27
27
|
object,
|
|
28
28
|
target: options.target,
|
|
29
|
-
hidden: false,
|
|
30
29
|
targetNodeId: options.targetNodeId,
|
|
31
30
|
});
|
|
32
31
|
}),
|
|
@@ -56,7 +55,6 @@ export default Capability.makeModule(
|
|
|
56
55
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
57
56
|
object,
|
|
58
57
|
target: options.target,
|
|
59
|
-
hidden: true,
|
|
60
58
|
targetNodeId: options.targetNodeId,
|
|
61
59
|
});
|
|
62
60
|
}),
|
|
@@ -69,7 +67,6 @@ export default Capability.makeModule(
|
|
|
69
67
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
70
68
|
object,
|
|
71
69
|
target: options.target,
|
|
72
|
-
hidden: true,
|
|
73
70
|
targetNodeId: options.targetNodeId,
|
|
74
71
|
});
|
|
75
72
|
}),
|
|
@@ -83,7 +80,6 @@ export default Capability.makeModule(
|
|
|
83
80
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
84
81
|
object,
|
|
85
82
|
target: options.target,
|
|
86
|
-
hidden: true,
|
|
87
83
|
targetNodeId: options.targetNodeId,
|
|
88
84
|
});
|
|
89
85
|
}),
|
|
@@ -97,7 +93,6 @@ export default Capability.makeModule(
|
|
|
97
93
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
98
94
|
object,
|
|
99
95
|
target: options.target,
|
|
100
|
-
hidden: true,
|
|
101
96
|
targetNodeId: options.targetNodeId,
|
|
102
97
|
});
|
|
103
98
|
}),
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppAnnotation, AppSpace } from '@dxos/app-toolkit';
|
|
9
9
|
import { Annotation, Collection, Obj, Ref } from '@dxos/echo';
|
|
10
|
-
import {
|
|
10
|
+
import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
11
11
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
12
12
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
13
13
|
import { MembershipPolicy } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
@@ -8,6 +8,7 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
12
|
|
|
12
13
|
import { SpaceOperation } from '../../operations';
|
|
13
14
|
|
|
@@ -23,15 +24,24 @@ export default Capability.makeModule(
|
|
|
23
24
|
Effect.fnUntraced(function* ({ invitationProp = 'spaceInvitationCode' }: NavigationHandlerOptions = {}) {
|
|
24
25
|
const capabilities = yield* Capability.Service;
|
|
25
26
|
const operationService = yield* Capability.get(Capabilities.OperationInvoker);
|
|
27
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
26
28
|
|
|
27
29
|
const handler: AppCapabilities.NavigationHandler = (url: URL) =>
|
|
28
30
|
Effect.gen(function* () {
|
|
29
31
|
const invitationCode = url.searchParams.get(invitationProp);
|
|
30
|
-
if (invitationCode) {
|
|
31
|
-
|
|
32
|
-
removeQueryParam(invitationProp);
|
|
33
|
-
yield* Operation.invoke(SpaceOperation.Join, { invitationCode });
|
|
32
|
+
if (!invitationCode) {
|
|
33
|
+
return;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
// Ignore invitations that arrive before a local identity exists rather than forcing
|
|
37
|
+
// identity creation here, bypassing the normal onboarding flow.
|
|
38
|
+
if (!client.halo.identity.get()) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
log('space invitation received via navigation');
|
|
43
|
+
removeQueryParam(invitationProp);
|
|
44
|
+
yield* Operation.invoke(SpaceOperation.Join, { invitationCode });
|
|
35
45
|
}).pipe(
|
|
36
46
|
Effect.provideService(Capability.Service, capabilities),
|
|
37
47
|
Effect.provideService(Operation.Service, operationService),
|
|
@@ -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 { AppCapabilities,
|
|
9
|
+
import { AppCapabilities, type AppCapabilities as AppCaps, AppSpace, Paths } from '@dxos/app-toolkit';
|
|
10
10
|
import { Database, Entity, Key } from '@dxos/echo';
|
|
11
11
|
import { EID } from '@dxos/keys';
|
|
12
12
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
@@ -22,7 +22,7 @@ export default Capability.makeModule(
|
|
|
22
22
|
// TODO(wittjosiah): Remove cast once NavigationTargetResolver type includes Database.Service.
|
|
23
23
|
const resolver: AppCaps.NavigationTargetResolver = ((query) =>
|
|
24
24
|
Effect.gen(function* () {
|
|
25
|
-
if (!query?.
|
|
25
|
+
if (!query?.uri) {
|
|
26
26
|
return [
|
|
27
27
|
{
|
|
28
28
|
path: getPluginSettingsSectionPath(meta.profile.key),
|
|
@@ -32,13 +32,13 @@ export default Capability.makeModule(
|
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
35
|
+
const eid = EID.tryParse(query.uri);
|
|
36
|
+
if (!eid) {
|
|
37
37
|
return [];
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const { db } = yield* Database.Service;
|
|
41
|
-
const ref = db.makeRef(
|
|
41
|
+
const ref = db.makeRef(eid);
|
|
42
42
|
const object = yield* Database.load(ref).pipe(Effect.catchAll(() => Effect.succeed(null)));
|
|
43
43
|
if (!object) {
|
|
44
44
|
return [];
|
|
@@ -59,9 +59,9 @@ export default Capability.makeModule(
|
|
|
59
59
|
})) as AppCaps.NavigationTargetResolver;
|
|
60
60
|
|
|
61
61
|
// Parse object paths into EIDs (structure only; existence is checked by the caller).
|
|
62
|
-
// Handles canonical
|
|
63
|
-
// and collection paths (root/<spaceId>/collections/<collectionId>/<objectId>): the space
|
|
64
|
-
// is the first segment and the object id the last.
|
|
62
|
+
// Handles canonical database paths (root/<spaceId>/system/database/<typeSlug>/<objectId>)
|
|
63
|
+
// and collection paths (root/<spaceId>/content/collections/<collectionId>/<objectId>): the space
|
|
64
|
+
// id is the first segment and the object id the last, regardless of intervening group segments.
|
|
65
65
|
const pathResolver: AppCaps.NavigationPathResolver = (qualifiedPath) => {
|
|
66
66
|
const segments = qualifiedPath.split('/');
|
|
67
67
|
const spaceId = Paths.getSpaceIdFromPath(qualifiedPath);
|