@dxos/plugin-space 0.9.1-main.c7dcc2e112 → 0.10.0
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 +16 -40
- 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 +10 -3
- 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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSpaceDisplayName,
|
|
3
3
|
makeCreateObjectEntryForDatabaseType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-52ASDNRA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SHARED
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F5KLUP2P.mjs";
|
|
8
8
|
import "./chunk-J5LGTIGS.mjs";
|
|
9
9
|
|
|
10
10
|
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
11
11
|
import * as Effect6 from "effect/Effect";
|
|
12
12
|
import { Capability as Capability4 } from "@dxos/app-framework";
|
|
13
|
-
import { AppCapabilities as
|
|
13
|
+
import { AppCapabilities as AppCapabilities4 } from "@dxos/app-toolkit";
|
|
14
14
|
|
|
15
15
|
// src/capabilities/app-graph-builder/extensions/spaces.ts
|
|
16
16
|
import * as Effect from "effect/Effect";
|
|
@@ -24,6 +24,7 @@ import { ClientCapabilities } from "@dxos/plugin-client";
|
|
|
24
24
|
import { CreateAtom, Graph, GraphBuilder, Node, NodeMatcher } from "@dxos/plugin-graph";
|
|
25
25
|
import { SpaceArchive } from "@dxos/protocols/proto/dxos/client/services";
|
|
26
26
|
import { Expando } from "@dxos/schema";
|
|
27
|
+
import { Position } from "@dxos/util";
|
|
27
28
|
import { meta as meta2 } from "#meta";
|
|
28
29
|
import { SpaceOperation } from "#operations";
|
|
29
30
|
import { SPACE_HOME_NODE_TYPE, SPACE_TYPE, SpaceCapabilities } from "#types";
|
|
@@ -32,17 +33,15 @@ import { SPACE_HOME_NODE_TYPE, SPACE_TYPE, SpaceCapabilities } from "#types";
|
|
|
32
33
|
import * as Option from "effect/Option";
|
|
33
34
|
import { SpaceState, isSpace } from "@dxos/client/echo";
|
|
34
35
|
import { Annotation, Filter, Obj, Type } from "@dxos/echo";
|
|
35
|
-
import {
|
|
36
|
+
import { Migrations, MigrationVersionAnnotation } from "@dxos/migrations";
|
|
36
37
|
import { ViewAnnotation, getTypeURIFromQuery } from "@dxos/schema";
|
|
37
38
|
import { meta } from "#meta";
|
|
38
|
-
var
|
|
39
|
+
var DATABASE_SECTION_TYPE = `${meta.profile.key}.database`;
|
|
39
40
|
var COLLECTIONS_SECTION_TYPE = `${meta.profile.key}.collections`;
|
|
40
|
-
var TYPE_COLLECTION_TYPE = `${meta.profile.key}.type-collection`;
|
|
41
41
|
var STATIC_SCHEMA_TYPE = `${meta.profile.key}.static-schema`;
|
|
42
42
|
var META_NS = {
|
|
43
43
|
ns: meta.profile.key
|
|
44
44
|
};
|
|
45
|
-
var BLOCK_REORDER_ABOVE = (_source, instruction) => instruction.type === "reorder-above";
|
|
46
45
|
var CAN_DROP_SPACE = (source) => Obj.isObject(source.item.data) || isSpace(source.item.data);
|
|
47
46
|
var spaceActionsCache = /* @__PURE__ */ new Map();
|
|
48
47
|
var spaceRearrangeCache = /* @__PURE__ */ new Map();
|
|
@@ -70,10 +69,6 @@ var MIGRATE_SPACE_LABEL = [
|
|
|
70
69
|
"migrate-space.label",
|
|
71
70
|
META_NS
|
|
72
71
|
];
|
|
73
|
-
var REMOVE_FROM_COLLECTION_LABEL = [
|
|
74
|
-
"remove-from-collection.label",
|
|
75
|
-
META_NS
|
|
76
|
-
];
|
|
77
72
|
var RENAME_SPACE_LABEL = [
|
|
78
73
|
"rename-space.label",
|
|
79
74
|
META_NS
|
|
@@ -147,7 +142,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
147
142
|
return yield* Effect.all([
|
|
148
143
|
GraphBuilder.createExtension({
|
|
149
144
|
id: "spaceHome",
|
|
150
|
-
position:
|
|
145
|
+
position: Position.first,
|
|
151
146
|
match: AppNodeMatcher.whenSpace,
|
|
152
147
|
connector: (space) => Effect.succeed([
|
|
153
148
|
{
|
|
@@ -157,8 +152,8 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
157
152
|
properties: {
|
|
158
153
|
label: SPACE_HOME_NODE_LABEL,
|
|
159
154
|
icon: "ph--house--regular",
|
|
160
|
-
iconHue: "
|
|
161
|
-
position:
|
|
155
|
+
iconHue: "emerald",
|
|
156
|
+
position: Position.first,
|
|
162
157
|
draggable: false,
|
|
163
158
|
droppable: false,
|
|
164
159
|
space
|
|
@@ -168,7 +163,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
168
163
|
}),
|
|
169
164
|
GraphBuilder.createExtension({
|
|
170
165
|
id: "primaryActions",
|
|
171
|
-
position:
|
|
166
|
+
position: Position.first,
|
|
172
167
|
match: NodeMatcher.whenRoot,
|
|
173
168
|
actions: () => Effect.succeed([
|
|
174
169
|
Node.makeAction({
|
|
@@ -318,7 +313,10 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
318
313
|
id: "spaces",
|
|
319
314
|
match: NodeMatcher.whenRoot,
|
|
320
315
|
connector: (_node, get) => {
|
|
321
|
-
const client = capabilities.
|
|
316
|
+
const [client] = capabilities.getAll(ClientCapabilities.Client);
|
|
317
|
+
if (!client) {
|
|
318
|
+
return Effect.succeed([]);
|
|
319
|
+
}
|
|
322
320
|
const stateAtom = capabilities.get(SpaceCapabilities.State);
|
|
323
321
|
const ephemeralAtom = capabilities.get(SpaceCapabilities.EphemeralState);
|
|
324
322
|
const spacesAtom = CreateAtom.fromObservable(client.spaces);
|
|
@@ -351,7 +349,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
351
349
|
return Effect.succeed([
|
|
352
350
|
...spaces.filter((space) => orderMap.has(space.id)).sort((sortA, sortB) => orderMap.get(sortA.id) - orderMap.get(sortB.id)),
|
|
353
351
|
...spaces.filter((space) => !orderMap.has(space.id))
|
|
354
|
-
].filter((space, idx) => spaceStates[idx]
|
|
352
|
+
].filter((space, idx) => spaceStates[idx] === SpaceState2.SPACE_READY).filter((space) => space.tags.length === 0 || AppSpace.isPersonalSpace(space) || AppSpace.isExemplarSpace(space)).map((space) => constructSpaceNode({
|
|
355
353
|
space,
|
|
356
354
|
navigable: ephemeralState.navigableCollections,
|
|
357
355
|
personal: AppSpace.isPersonalSpace(space),
|
|
@@ -364,6 +362,28 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
364
362
|
}
|
|
365
363
|
}
|
|
366
364
|
}),
|
|
365
|
+
// Communications section group — no single plugin owns this category; it lives here so the
|
|
366
|
+
// group is always present when the space plugin is active. A more specific plugin (e.g. a
|
|
367
|
+
// future plugin-communications) should own this once one exists.
|
|
368
|
+
// TODO(wittjosiah): Move to a dedicated communications plugin when one exists.
|
|
369
|
+
GraphBuilder.createExtension({
|
|
370
|
+
id: Paths.GroupSegments.communications,
|
|
371
|
+
match: AppNodeMatcher.whenSpace,
|
|
372
|
+
connector: (space) => Effect.succeed([
|
|
373
|
+
AppNode.makeGroup({
|
|
374
|
+
id: Paths.GroupSegments.communications,
|
|
375
|
+
type: Paths.GroupTypes.communications,
|
|
376
|
+
label: [
|
|
377
|
+
"nav-tree-group-comm.label",
|
|
378
|
+
{
|
|
379
|
+
ns: meta2.profile.key
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
space,
|
|
383
|
+
position: 100
|
|
384
|
+
})
|
|
385
|
+
])
|
|
386
|
+
}),
|
|
367
387
|
GraphBuilder.createExtension({
|
|
368
388
|
id: "actions",
|
|
369
389
|
match: AppNodeMatcher.whenSpace,
|
|
@@ -489,14 +509,15 @@ import * as Effect2 from "effect/Effect";
|
|
|
489
509
|
import * as Match from "effect/Match";
|
|
490
510
|
import * as Option2 from "effect/Option";
|
|
491
511
|
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
492
|
-
import { AppNode as AppNode2, AppNodeMatcher as AppNodeMatcher2, LayoutOperation, Paths as Paths2 } from "@dxos/app-toolkit";
|
|
493
|
-
import {
|
|
512
|
+
import { AppCapabilities as AppCapabilities2, AppNode as AppNode2, AppNodeMatcher as AppNodeMatcher2, LayoutOperation, Paths as Paths2 } from "@dxos/app-toolkit";
|
|
513
|
+
import { isSpace as isSpace2 } from "@dxos/client/echo";
|
|
494
514
|
import { Operation as Operation2 } from "@dxos/compute";
|
|
495
|
-
import { Annotation as Annotation2, Collection, Entity, Filter as Filter3, Obj as Obj3, Query, Scope, Type as Type2 } from "@dxos/echo";
|
|
515
|
+
import { Annotation as Annotation2, Collection, Entity, Filter as Filter3, Key, Obj as Obj3, Query, Scope, Type as Type2 } from "@dxos/echo";
|
|
496
516
|
import { HiddenAnnotation } from "@dxos/echo/Annotation";
|
|
497
517
|
import { ClientCapabilities as ClientCapabilities2 } from "@dxos/plugin-client";
|
|
498
|
-
import {
|
|
518
|
+
import { GraphBuilder as GraphBuilder2, Node as Node2 } from "@dxos/plugin-graph";
|
|
499
519
|
import { ViewAnnotation as ViewAnnotation2 } from "@dxos/schema";
|
|
520
|
+
import { isLabel, toLocalizedString } from "@dxos/ui-types/translations";
|
|
500
521
|
import { createFilename, isNonNullable } from "@dxos/util";
|
|
501
522
|
import { meta as meta3 } from "#meta";
|
|
502
523
|
import { SpaceOperation as SpaceOperation2 } from "#operations";
|
|
@@ -504,41 +525,58 @@ import { SpaceCapabilities as SpaceCapabilities2 } from "#types";
|
|
|
504
525
|
var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
505
526
|
const capabilities = yield* Capability2.Service;
|
|
506
527
|
return yield* Effect2.all([
|
|
507
|
-
//
|
|
528
|
+
// System section group — created alongside database/settings so the group always
|
|
529
|
+
// appears when the space plugin is active and hides when there are no children.
|
|
508
530
|
GraphBuilder2.createExtension({
|
|
509
|
-
id:
|
|
531
|
+
id: Paths2.GroupSegments.system,
|
|
510
532
|
match: AppNodeMatcher2.whenSpace,
|
|
511
|
-
connector: (space
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
533
|
+
connector: (space) => Effect2.succeed([
|
|
534
|
+
AppNode2.makeGroup({
|
|
535
|
+
id: Paths2.GroupSegments.system,
|
|
536
|
+
type: Paths2.GroupTypes.system,
|
|
537
|
+
label: [
|
|
538
|
+
"nav-tree-group-system.label",
|
|
539
|
+
{
|
|
540
|
+
ns: meta3.profile.key
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
space,
|
|
544
|
+
position: 900
|
|
545
|
+
})
|
|
546
|
+
])
|
|
547
|
+
}),
|
|
548
|
+
// Types section virtual node under the system group.
|
|
549
|
+
GraphBuilder2.createExtension({
|
|
550
|
+
id: "databaseSection",
|
|
551
|
+
match: AppNodeMatcher2.whenNavTreeGroup(Paths2.GroupTypes.system),
|
|
552
|
+
connector: (space) => {
|
|
516
553
|
return Effect2.succeed([
|
|
517
554
|
AppNode2.makeSection({
|
|
518
|
-
id: Paths2.Segments.
|
|
519
|
-
type:
|
|
555
|
+
id: Paths2.Segments.database,
|
|
556
|
+
type: DATABASE_SECTION_TYPE,
|
|
520
557
|
label: [
|
|
521
|
-
"
|
|
558
|
+
"database-section.label",
|
|
522
559
|
{
|
|
523
560
|
ns: meta3.profile.key
|
|
524
561
|
}
|
|
525
562
|
],
|
|
526
563
|
icon: "ph--database--regular",
|
|
527
564
|
space,
|
|
528
|
-
|
|
529
|
-
testId: "spacePlugin.typesSection"
|
|
565
|
+
testId: "spacePlugin.databaseSection"
|
|
530
566
|
})
|
|
531
567
|
]);
|
|
532
568
|
}
|
|
533
569
|
}),
|
|
534
570
|
// Schema nodes under the Types virtual node.
|
|
535
571
|
GraphBuilder2.createExtension({
|
|
536
|
-
id: "
|
|
572
|
+
id: "database",
|
|
537
573
|
match: (node) => {
|
|
538
574
|
const space = isSpace2(node.properties.space) ? node.properties.space : void 0;
|
|
539
|
-
return node.type ===
|
|
575
|
+
return node.type === DATABASE_SECTION_TYPE && space ? Option2.some(space) : Option2.none();
|
|
540
576
|
},
|
|
541
577
|
connector: (space, get) => {
|
|
578
|
+
const settingsAtom = get(capabilities.atom(SpaceCapabilities2.Settings)).at(0);
|
|
579
|
+
const showHidden = settingsAtom ? get(settingsAtom).showHidden : false;
|
|
542
580
|
const allSchemas = get(space.db.query(Query.select(Filter3.type(Type2.Type)).from(Scope.space(), Scope.registry())).atom);
|
|
543
581
|
const userSchemas = allSchemas.filter((type) => {
|
|
544
582
|
if (Type2.isRelation(type)) {
|
|
@@ -548,7 +586,7 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
548
586
|
return false;
|
|
549
587
|
}
|
|
550
588
|
const schema = Type2.getSchema(type);
|
|
551
|
-
if (HiddenAnnotation.get(schema).pipe(Option2.getOrElse(() => false))) {
|
|
589
|
+
if (!showHidden && HiddenAnnotation.get(schema).pipe(Option2.getOrElse(() => false))) {
|
|
552
590
|
return false;
|
|
553
591
|
}
|
|
554
592
|
if (Type2.getTypename(type) === Type2.getTypename(Collection.Collection)) {
|
|
@@ -568,11 +606,19 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
568
606
|
}
|
|
569
607
|
return objects.length > 0 || viewIndex.typeUrisWithViews.has(typeUri);
|
|
570
608
|
});
|
|
609
|
+
const translator = get(capabilities.atom(AppCapabilities2.Translator)).at(0);
|
|
610
|
+
const labelOf = (node) => {
|
|
611
|
+
const label = node.properties?.label;
|
|
612
|
+
if (translator && isLabel(label)) {
|
|
613
|
+
return toLocalizedString(label, translator.t);
|
|
614
|
+
}
|
|
615
|
+
return node.data ? Type2.getTypename(node.data) : "";
|
|
616
|
+
};
|
|
571
617
|
return Effect2.succeed(visibleSchemas.map((schema) => createSchemaNode({
|
|
572
618
|
schema,
|
|
573
619
|
space,
|
|
574
620
|
get
|
|
575
|
-
})));
|
|
621
|
+
})).toSorted((nodeA, nodeB) => labelOf(nodeA).localeCompare(labelOf(nodeB))));
|
|
576
622
|
}
|
|
577
623
|
}),
|
|
578
624
|
// {All} virtual node + view objects under each schema node.
|
|
@@ -588,77 +634,57 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
588
634
|
connector: ({ space, schema }, get) => {
|
|
589
635
|
const client = get(capabilities.atom(ClientCapabilities2.Client)).at(0);
|
|
590
636
|
const schemas = client ? get(client.graph.registry.query(Filter3.type(Type2.Type)).atom) : [];
|
|
591
|
-
const slug = Paths2.getTypeSlug(schema);
|
|
592
637
|
const typeUri = Type2.getURI(schema);
|
|
593
|
-
const allNode = Node2.make({
|
|
594
|
-
id: "all",
|
|
595
|
-
type: TYPE_COLLECTION_TYPE,
|
|
596
|
-
data: {
|
|
597
|
-
space,
|
|
598
|
-
typeUri
|
|
599
|
-
},
|
|
600
|
-
properties: {
|
|
601
|
-
label: [
|
|
602
|
-
"type-collection-all.label",
|
|
603
|
-
{
|
|
604
|
-
ns: meta3.profile.key
|
|
605
|
-
}
|
|
606
|
-
],
|
|
607
|
-
icon: "ph--list--regular",
|
|
608
|
-
iconHue: "neutral",
|
|
609
|
-
role: "branch",
|
|
610
|
-
testId: `spacePlugin.typeCollectionAll.${slug}`,
|
|
611
|
-
selectable: false,
|
|
612
|
-
draggable: false,
|
|
613
|
-
droppable: false,
|
|
614
|
-
childrenDroppable: false,
|
|
615
|
-
blockInstruction: BLOCK_REORDER_ABOVE
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
638
|
const viewIndex = buildViewIndex(get, space, schemas);
|
|
619
639
|
const viewNodes = viewIndex.getViewsForTypeUri(typeUri).map((object) => AppNode2.makeObject({
|
|
620
640
|
get,
|
|
621
641
|
db: space.db,
|
|
622
642
|
object,
|
|
643
|
+
draggable: false,
|
|
623
644
|
droppable: false
|
|
624
645
|
})).filter(isNonNullable);
|
|
625
|
-
return Effect2.succeed(
|
|
626
|
-
allNode,
|
|
627
|
-
...viewNodes
|
|
628
|
-
]);
|
|
646
|
+
return Effect2.succeed(viewNodes);
|
|
629
647
|
}
|
|
630
648
|
}),
|
|
631
|
-
// Objects of the
|
|
649
|
+
// Objects of a type are not enumerated in the nav tree; navigating directly to the canonical
|
|
650
|
+
// object path resolves the object on demand as a hidden child of its type node. Mirrors the
|
|
651
|
+
// inbox feed-object resolver: a resolver keyed on path shape, not a connector.
|
|
632
652
|
GraphBuilder2.createExtension({
|
|
633
|
-
id: "
|
|
634
|
-
match: (
|
|
635
|
-
|
|
636
|
-
|
|
653
|
+
id: "typeCollectionObject",
|
|
654
|
+
match: () => Option2.none(),
|
|
655
|
+
resolver: (qualifiedId, get) => Effect2.gen(function* () {
|
|
656
|
+
const segments = qualifiedId.split("/");
|
|
657
|
+
if (segments.at(-3) !== Paths2.Segments.database) {
|
|
658
|
+
return null;
|
|
659
|
+
}
|
|
660
|
+
const spaceId = Paths2.getSpaceIdFromPath(qualifiedId);
|
|
661
|
+
const objectId = segments.at(-1);
|
|
662
|
+
if (!spaceId || !objectId || !Key.EntityId.isValid(objectId)) {
|
|
663
|
+
return null;
|
|
637
664
|
}
|
|
638
|
-
return Option2.some({
|
|
639
|
-
space: node.data.space,
|
|
640
|
-
typeUri: node.data.typeUri
|
|
641
|
-
});
|
|
642
|
-
},
|
|
643
|
-
connector: ({ space, typeUri }, get) => {
|
|
644
665
|
const client = get(capabilities.atom(ClientCapabilities2.Client)).at(0);
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
666
|
+
const space = client?.spaces.get(spaceId);
|
|
667
|
+
if (!space) {
|
|
668
|
+
return null;
|
|
669
|
+
}
|
|
670
|
+
const object = get(space.db.query(Filter3.id(objectId)).atom).at(0);
|
|
671
|
+
if (!object) {
|
|
672
|
+
return null;
|
|
673
|
+
}
|
|
674
|
+
get(Obj3.atom(object));
|
|
675
|
+
const node = AppNode2.makeObject({
|
|
676
|
+
get,
|
|
677
|
+
db: space.db,
|
|
678
|
+
object,
|
|
679
|
+
disposition: "hidden",
|
|
680
|
+
draggable: false,
|
|
681
|
+
droppable: false
|
|
682
|
+
});
|
|
683
|
+
return node && {
|
|
684
|
+
...node,
|
|
685
|
+
id: qualifiedId
|
|
686
|
+
};
|
|
687
|
+
})
|
|
662
688
|
}),
|
|
663
689
|
// Actions for schema nodes.
|
|
664
690
|
GraphBuilder2.createExtension({
|
|
@@ -718,9 +744,11 @@ var createSchemaNode = ({ schema, space, get }) => {
|
|
|
718
744
|
label,
|
|
719
745
|
icon,
|
|
720
746
|
iconHue,
|
|
721
|
-
|
|
747
|
+
// Selecting the type node opens a list of every object of this type (see TypeCollectionArticle);
|
|
748
|
+
// objects resolve on demand as hidden children. View objects are its only visible children, so
|
|
749
|
+
// without a view the node is a leaf (no `role: 'branch'`).
|
|
722
750
|
testId: `spacePlugin.schemaNode.${typename}`,
|
|
723
|
-
selectable:
|
|
751
|
+
selectable: true,
|
|
724
752
|
draggable: false,
|
|
725
753
|
droppable: false,
|
|
726
754
|
childrenDroppable: false,
|
|
@@ -774,8 +802,10 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
774
802
|
data: () => Operation2.invoke(SpaceOperation2.OpenCreateObject, {
|
|
775
803
|
target: space.db,
|
|
776
804
|
views: true,
|
|
805
|
+
// The type-picker field value is the type URI (see TypeOptions), so seed the default with
|
|
806
|
+
// the URI — not the bare typename — for the option to be pre-selected.
|
|
777
807
|
initialFormValues: {
|
|
778
|
-
typename: Type2.
|
|
808
|
+
typename: Type2.getURI(type)
|
|
779
809
|
}
|
|
780
810
|
}),
|
|
781
811
|
properties: {
|
|
@@ -844,13 +874,13 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
844
874
|
// src/capabilities/app-graph-builder/extensions/collections.ts
|
|
845
875
|
import * as Effect3 from "effect/Effect";
|
|
846
876
|
import * as Option3 from "effect/Option";
|
|
847
|
-
import {
|
|
848
|
-
import { AppAnnotation, AppCapabilities as
|
|
849
|
-
import {
|
|
877
|
+
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
878
|
+
import { AppAnnotation, AppCapabilities as AppCapabilities3, AppNode as AppNode3, AppNodeMatcher as AppNodeMatcher3, LayoutOperation as LayoutOperation2, Paths as Paths3 } from "@dxos/app-toolkit";
|
|
879
|
+
import { isSpace as isSpace3 } from "@dxos/client/echo";
|
|
850
880
|
import { Operation as Operation3 } from "@dxos/compute";
|
|
851
881
|
import { Annotation as Annotation3, Collection as Collection2, Obj as Obj4, Type as Type3 } from "@dxos/echo";
|
|
852
882
|
import { invariant } from "@dxos/invariant";
|
|
853
|
-
import {
|
|
883
|
+
import { Graph as Graph2, GraphBuilder as GraphBuilder3, Node as Node3 } from "@dxos/plugin-graph";
|
|
854
884
|
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
855
885
|
import { meta as meta4 } from "#meta";
|
|
856
886
|
import { SpaceOperation as SpaceOperation3 } from "#operations";
|
|
@@ -859,15 +889,31 @@ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/capabilitie
|
|
|
859
889
|
var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOrigin }) {
|
|
860
890
|
const capabilities = yield* Capability3.Service;
|
|
861
891
|
return yield* Effect3.all([
|
|
862
|
-
//
|
|
892
|
+
// Content section group — created alongside collections so the group always
|
|
893
|
+
// appears when the space plugin is active and hides when there are no children.
|
|
863
894
|
GraphBuilder3.createExtension({
|
|
864
|
-
id:
|
|
895
|
+
id: Paths3.GroupSegments.content,
|
|
865
896
|
match: AppNodeMatcher3.whenSpace,
|
|
897
|
+
connector: (space) => Effect3.succeed([
|
|
898
|
+
AppNode3.makeGroup({
|
|
899
|
+
id: Paths3.GroupSegments.content,
|
|
900
|
+
type: Paths3.GroupTypes.content,
|
|
901
|
+
label: [
|
|
902
|
+
"nav-tree-group-content.label",
|
|
903
|
+
{
|
|
904
|
+
ns: meta4.profile.key
|
|
905
|
+
}
|
|
906
|
+
],
|
|
907
|
+
space,
|
|
908
|
+
position: 200
|
|
909
|
+
})
|
|
910
|
+
])
|
|
911
|
+
}),
|
|
912
|
+
// Collections section virtual node under the content group.
|
|
913
|
+
GraphBuilder3.createExtension({
|
|
914
|
+
id: "collectionsSection",
|
|
915
|
+
match: AppNodeMatcher3.whenNavTreeGroup(Paths3.GroupTypes.content),
|
|
866
916
|
connector: (space, get) => {
|
|
867
|
-
const spaceState = get(CreateAtom3.fromObservable(space.state));
|
|
868
|
-
if (spaceState !== SpaceState4.SPACE_READY) {
|
|
869
|
-
return Effect3.succeed([]);
|
|
870
|
-
}
|
|
871
917
|
get(Obj4.atom(space.properties));
|
|
872
918
|
const collectionRef = Annotation3.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option3.getOrUndefined);
|
|
873
919
|
if (collectionRef) {
|
|
@@ -891,9 +937,8 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
891
937
|
}
|
|
892
938
|
],
|
|
893
939
|
icon: "ph--folder--regular",
|
|
894
|
-
iconHue: "
|
|
940
|
+
iconHue: "indigo",
|
|
895
941
|
role: "branch",
|
|
896
|
-
position: "first",
|
|
897
942
|
testId: "spacePlugin.collectionsSection",
|
|
898
943
|
draggable: false,
|
|
899
944
|
droppable: false,
|
|
@@ -930,7 +975,8 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
930
975
|
db: space.db,
|
|
931
976
|
object,
|
|
932
977
|
navigable: ephemeralState.navigableCollections,
|
|
933
|
-
|
|
978
|
+
canDrop: AppNode3.CAN_DROP_COLLECTION_ITEM,
|
|
979
|
+
onRearrange: collectionRef?.target ? AppNode3.makeCollectionRearrangeCallback(collectionRef.target) : void 0
|
|
934
980
|
})).filter(isNonNullable2));
|
|
935
981
|
}
|
|
936
982
|
}),
|
|
@@ -953,7 +999,8 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
953
999
|
object,
|
|
954
1000
|
db,
|
|
955
1001
|
navigable: ephemeralState.navigableCollections,
|
|
956
|
-
|
|
1002
|
+
canDrop: AppNode3.CAN_DROP_COLLECTION_ITEM,
|
|
1003
|
+
onRearrange: AppNode3.makeCollectionRearrangeCallback(collection)
|
|
957
1004
|
})).filter(isNonNullable2));
|
|
958
1005
|
}
|
|
959
1006
|
}),
|
|
@@ -968,7 +1015,7 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
968
1015
|
},
|
|
969
1016
|
actions: ({ object, nodeId }, get) => {
|
|
970
1017
|
const deletable = !Type3.isType(object);
|
|
971
|
-
const [appGraph] = get(capabilities.atom(
|
|
1018
|
+
const [appGraph] = get(capabilities.atom(AppCapabilities3.AppGraph));
|
|
972
1019
|
const ephemeralAtom = capabilities.get(SpaceCapabilities3.EphemeralState);
|
|
973
1020
|
const ephemeralState = get(ephemeralAtom);
|
|
974
1021
|
if (!appGraph) {
|
|
@@ -987,7 +1034,7 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
987
1034
|
}));
|
|
988
1035
|
}
|
|
989
1036
|
}),
|
|
990
|
-
// Action on the collections section header to
|
|
1037
|
+
// Action on the collections section header to add an object to the space's root collection.
|
|
991
1038
|
GraphBuilder3.createExtension({
|
|
992
1039
|
id: "collectionsSectionActions",
|
|
993
1040
|
match: (node) => {
|
|
@@ -996,20 +1043,21 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
996
1043
|
},
|
|
997
1044
|
actions: (space) => Effect3.succeed([
|
|
998
1045
|
Node3.makeAction({
|
|
999
|
-
id:
|
|
1000
|
-
data: () =>
|
|
1001
|
-
|
|
1002
|
-
|
|
1046
|
+
id: SpaceOperation3.OpenCreateObject.meta.key,
|
|
1047
|
+
data: () => Effect3.gen(function* () {
|
|
1048
|
+
const rootCollection = Annotation3.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option3.getOrUndefined)?.target;
|
|
1049
|
+
yield* Operation3.invoke(SpaceOperation3.OpenCreateObject, {
|
|
1050
|
+
// Qualified id of the collections section node (root/<spaceId>/collections), so the new
|
|
1051
|
+
// object's navigation path resolves under the section — the bare segment would not.
|
|
1052
|
+
target: rootCollection ?? space.db,
|
|
1053
|
+
targetNodeId: Paths3.getCollectionsPath(space.id)
|
|
1054
|
+
});
|
|
1003
1055
|
}),
|
|
1004
1056
|
properties: {
|
|
1005
|
-
label:
|
|
1006
|
-
"add-object.label",
|
|
1007
|
-
{
|
|
1008
|
-
ns: Type3.getTypename(Collection2.Collection)
|
|
1009
|
-
}
|
|
1010
|
-
],
|
|
1057
|
+
label: CREATE_OBJECT_IN_COLLECTION_LABEL,
|
|
1011
1058
|
icon: "ph--plus--regular",
|
|
1012
|
-
disposition: "list-item-primary"
|
|
1059
|
+
disposition: "list-item-primary",
|
|
1060
|
+
testId: "spacePlugin.createObject"
|
|
1013
1061
|
}
|
|
1014
1062
|
})
|
|
1015
1063
|
])
|
|
@@ -1018,9 +1066,9 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
1018
1066
|
});
|
|
1019
1067
|
var constructObjectActions = ({ object, nodeId, deletable = true, navigable = false, shareableLinkOrigin, parentCollection }) => {
|
|
1020
1068
|
const db = Obj4.getDatabase(object);
|
|
1021
|
-
invariant(db, "Database not found", { "~LogMeta": "~LogMeta", F: __dxlog_file, L:
|
|
1069
|
+
invariant(db, "Database not found", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 206, S: void 0, A: ["db", "'Database not found'"] });
|
|
1022
1070
|
const typename = Obj4.getTypename(object);
|
|
1023
|
-
invariant(typename, "Object has no typename", { "~LogMeta": "~LogMeta", F: __dxlog_file, L:
|
|
1071
|
+
invariant(typename, "Object has no typename", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 208, S: void 0, A: ["typename", "'Object has no typename'"] });
|
|
1024
1072
|
const actions = [
|
|
1025
1073
|
...Obj4.instanceOf(Collection2.Collection, object) ? [
|
|
1026
1074
|
Node3.makeAction({
|
|
@@ -1052,34 +1100,6 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
1052
1100
|
testId: "spacePlugin.renameObject"
|
|
1053
1101
|
}
|
|
1054
1102
|
}),
|
|
1055
|
-
...parentCollection && !Obj4.instanceOf(Collection2.Collection, object) ? [
|
|
1056
|
-
Node3.makeAction({
|
|
1057
|
-
id: "removeFromCollection",
|
|
1058
|
-
data: () => Effect3.gen(function* () {
|
|
1059
|
-
const index = parentCollection.objects.findIndex((ref) => ref.target === object);
|
|
1060
|
-
if (index !== -1) {
|
|
1061
|
-
const layout = yield* Capabilities.getAtomValue(AppCapabilities2.Layout);
|
|
1062
|
-
const isActive = layout.active.includes(nodeId);
|
|
1063
|
-
Obj4.update(parentCollection, (parentCollection2) => {
|
|
1064
|
-
parentCollection2.objects.splice(index, 1);
|
|
1065
|
-
});
|
|
1066
|
-
if (isActive) {
|
|
1067
|
-
yield* Operation3.invoke(LayoutOperation2.Open, {
|
|
1068
|
-
subject: [
|
|
1069
|
-
Paths3.getObjectPathFromObject(object)
|
|
1070
|
-
]
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}),
|
|
1075
|
-
properties: {
|
|
1076
|
-
label: REMOVE_FROM_COLLECTION_LABEL,
|
|
1077
|
-
icon: "ph--minus-circle--regular",
|
|
1078
|
-
disposition: "list-item",
|
|
1079
|
-
testId: "spacePlugin.removeFromCollection"
|
|
1080
|
-
}
|
|
1081
|
-
})
|
|
1082
|
-
] : [],
|
|
1083
1103
|
Node3.makeAction({
|
|
1084
1104
|
id: SpaceOperation3.RemoveObjects.meta.key,
|
|
1085
1105
|
data: () => Operation3.invoke(SpaceOperation3.RemoveObjects, {
|
|
@@ -1137,6 +1157,7 @@ import { Obj as Obj5, Type as Type4 } from "@dxos/echo";
|
|
|
1137
1157
|
import { GraphBuilder as GraphBuilder4, NodeMatcher as NodeMatcher2 } from "@dxos/plugin-graph";
|
|
1138
1158
|
import { linkedSegment } from "@dxos/react-ui-attention";
|
|
1139
1159
|
import { ViewAnnotation as ViewAnnotation3 } from "@dxos/schema";
|
|
1160
|
+
import { Position as Position2 } from "@dxos/util";
|
|
1140
1161
|
import { meta as meta5 } from "#meta";
|
|
1141
1162
|
var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
1142
1163
|
return yield* Effect4.all([
|
|
@@ -1155,7 +1176,7 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1155
1176
|
],
|
|
1156
1177
|
icon: "ph--sliders--regular",
|
|
1157
1178
|
data: "settings",
|
|
1158
|
-
position:
|
|
1179
|
+
position: Position2.last
|
|
1159
1180
|
})
|
|
1160
1181
|
])
|
|
1161
1182
|
}),
|
|
@@ -1174,7 +1195,7 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1174
1195
|
],
|
|
1175
1196
|
icon: "ph--graph--regular",
|
|
1176
1197
|
data: "related",
|
|
1177
|
-
position:
|
|
1198
|
+
position: Position2.last
|
|
1178
1199
|
})
|
|
1179
1200
|
])
|
|
1180
1201
|
}),
|
|
@@ -1214,6 +1235,7 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1214
1235
|
import * as Effect5 from "effect/Effect";
|
|
1215
1236
|
import { AppNode as AppNode5, AppNodeMatcher as AppNodeMatcher4, AppSpace as AppSpace2 } from "@dxos/app-toolkit";
|
|
1216
1237
|
import { GraphBuilder as GraphBuilder5, Node as Node4 } from "@dxos/plugin-graph";
|
|
1238
|
+
import { Position as Position3 } from "@dxos/util";
|
|
1217
1239
|
import { meta as meta6 } from "#meta";
|
|
1218
1240
|
import { SETTINGS_SECTION_ID, SETTINGS_SECTION_TYPE } from "#types";
|
|
1219
1241
|
var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
@@ -1231,9 +1253,9 @@ var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
|
1231
1253
|
}
|
|
1232
1254
|
],
|
|
1233
1255
|
icon: "ph--sliders--regular",
|
|
1234
|
-
iconHue: "
|
|
1256
|
+
iconHue: "emerald",
|
|
1235
1257
|
space,
|
|
1236
|
-
position:
|
|
1258
|
+
position: Position3.first,
|
|
1237
1259
|
testId: "spacePlugin.settings"
|
|
1238
1260
|
})
|
|
1239
1261
|
])
|
|
@@ -1256,8 +1278,9 @@ var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
|
1256
1278
|
}
|
|
1257
1279
|
],
|
|
1258
1280
|
icon: "ph--brackets-curly--regular",
|
|
1259
|
-
iconHue: "
|
|
1281
|
+
iconHue: "emerald",
|
|
1260
1282
|
space,
|
|
1283
|
+
position: Position3.first,
|
|
1261
1284
|
testId: "spacePlugin.general"
|
|
1262
1285
|
}
|
|
1263
1286
|
}),
|
|
@@ -1274,8 +1297,9 @@ var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
|
1274
1297
|
}
|
|
1275
1298
|
],
|
|
1276
1299
|
icon: "ph--users--regular",
|
|
1277
|
-
iconHue: "
|
|
1300
|
+
iconHue: "emerald",
|
|
1278
1301
|
space,
|
|
1302
|
+
position: Position3.first,
|
|
1279
1303
|
testId: "spacePlugin.members"
|
|
1280
1304
|
}
|
|
1281
1305
|
})
|
|
@@ -1300,9 +1324,9 @@ var app_graph_builder_default = Capability4.makeModule(Effect6.fnUntraced(functi
|
|
|
1300
1324
|
}),
|
|
1301
1325
|
createCompanionExtensions()
|
|
1302
1326
|
]);
|
|
1303
|
-
return Capability4.contributes(
|
|
1327
|
+
return Capability4.contributes(AppCapabilities4.AppGraphBuilder, extensions.flat());
|
|
1304
1328
|
}));
|
|
1305
1329
|
export {
|
|
1306
1330
|
app_graph_builder_default as default
|
|
1307
1331
|
};
|
|
1308
|
-
//# sourceMappingURL=app-graph-builder-
|
|
1332
|
+
//# sourceMappingURL=app-graph-builder-7H2KOD4B.mjs.map
|