@dxos/plugin-space 0.9.0 → 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/{CollectionArticle-S3OF5KJ7.mjs → CollectionArticle-BMH7SZ7Q.mjs} +9 -12
- package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs.map +7 -0
- package/dist/lib/neutral/{CollectionSection-A5WRHE5Z.mjs → CollectionSection-BLYTGOKH.mjs} +2 -2
- package/dist/lib/neutral/{CollectionSection-A5WRHE5Z.mjs.map → CollectionSection-BLYTGOKH.mjs.map} +3 -3
- package/dist/lib/neutral/{CreateObjectDialog-66R3K6I3.mjs → CreateObjectDialog-5454N3FJ.mjs} +29 -14
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +7 -0
- package/dist/lib/neutral/{CreateSpaceDialog-CDGSEIJB.mjs → CreateSpaceDialog-WWNUTLVK.mjs} +6 -6
- package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs.map +7 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +58 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +7 -0
- package/dist/lib/neutral/{ImportSpaceDialog-7GKV4OTF.mjs → ImportSpaceDialog-CSSRTFAO.mjs} +4 -4
- package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs.map +7 -0
- package/dist/lib/neutral/{InlineSyncStatus-TBJKZCH7.mjs → InlineSyncStatus-UOUTAPCU.mjs} +4 -4
- package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-SSFKRFTJ.mjs → JoinDialog-ATNUCNL2.mjs} +13 -30
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +7 -0
- package/dist/lib/neutral/{MembersContainer-KMCQDWCS.mjs → MembersContainer-C4ZTP6ZW.mjs} +13 -9
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +7 -0
- package/dist/lib/neutral/{MenuFooter-5JT7V5FZ.mjs → MenuFooter-FWE5LFM4.mjs} +6 -6
- package/dist/lib/neutral/MenuFooter-FWE5LFM4.mjs.map +7 -0
- package/dist/lib/neutral/{ObjectCardStack-IXNU3HEN.mjs → ObjectCardStack-DHVDRNRK.mjs} +4 -4
- package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs.map +7 -0
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs +102 -0
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs.map +7 -0
- package/dist/lib/neutral/{RelatedArticle-YDNGUDAJ.mjs → RelatedArticle-Z777WVDW.mjs} +11 -10
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +7 -0
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs +104 -0
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +7 -0
- package/dist/lib/neutral/{SchemaContainer-Q4BP6X2M.mjs → SchemaContainer-4GJKQBXM.mjs} +9 -5
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +7 -0
- package/dist/lib/neutral/{SmallPresenceLive-GUF4WLUC.mjs → SmallPresenceLive-FW3AMEY5.mjs} +2 -2
- package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs +78 -0
- package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs.map +7 -0
- package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs +89 -0
- package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs.map +7 -0
- package/dist/lib/neutral/SpacePlugin.mjs +1 -1
- package/dist/lib/neutral/SpacePlugin.node.mjs +4 -4
- package/dist/lib/neutral/SpacePlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/{SpacePresence-ACEXUS3N.mjs → SpacePresence-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-IB34TEOB.mjs → SpaceSettingsContainer-72CJWELM.mjs} +44 -41
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +7 -0
- package/dist/lib/neutral/{SyncStatus-CWOXWDDZ.mjs → SyncStatus-J7CHLO5O.mjs} +3 -3
- package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs.map +7 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +143 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +7 -0
- package/dist/lib/neutral/{add-object-QYOMCBJA.mjs → add-object-H2N4AOQJ.mjs} +16 -16
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +7 -0
- package/dist/lib/neutral/{add-relation-HV3VCMJG.mjs → add-relation-BGTLART5.mjs} +3 -3
- package/dist/lib/neutral/{add-type-CZVKSEIW.mjs → add-type-JIDLRANR.mjs} +3 -3
- package/dist/lib/neutral/{add-type-CZVKSEIW.mjs.map → add-type-JIDLRANR.mjs.map} +1 -1
- package/dist/lib/neutral/{app-graph-builder-SQGCUCDO.mjs → app-graph-builder-7H2KOD4B.mjs} +284 -203
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +14 -16
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/capabilities/node.mjs +3 -3
- package/dist/lib/neutral/{chunk-7WUJENBF.mjs → chunk-52ASDNRA.mjs} +5 -6
- package/dist/lib/neutral/chunk-52ASDNRA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs +46 -0
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-C2ULK22J.mjs +17 -0
- package/dist/lib/neutral/chunk-C2ULK22J.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-K34BPPQE.mjs → chunk-F5KLUP2P.mjs} +35 -18
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-JHZGRYGS.mjs → chunk-G2KHP7FX.mjs} +2 -2
- package/dist/lib/neutral/{chunk-JHZGRYGS.mjs.map → chunk-G2KHP7FX.mjs.map} +2 -2
- package/dist/lib/neutral/{chunk-YY62663T.mjs → chunk-LMUG6PEJ.mjs} +4 -5
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-EEXRKYOD.mjs → chunk-RAAHDTVF.mjs} +9 -5
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BBQR23DW.mjs → chunk-SPWAMXNR.mjs} +105 -128
- package/dist/lib/neutral/chunk-SPWAMXNR.mjs.map +7 -0
- 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-FGQN37PK.mjs → close-5WEQZRNK.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +22 -23
- 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 +29 -23
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-EPIFSRJA.mjs → create-QZ47FHQU.mjs} +7 -7
- package/dist/lib/neutral/create-QZ47FHQU.mjs.map +7 -0
- 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-LIA5M3WI.mjs → delete-SPCU2VFM.mjs} +3 -3
- package/dist/lib/neutral/{delete-field-ZIGFXFHY.mjs → delete-field-TAKJVEAD.mjs} +3 -3
- package/dist/lib/neutral/{duplicate-object-X37FM6PW.mjs → duplicate-object-BUPZOO6S.mjs} +3 -3
- package/dist/lib/neutral/{export-space-VWJHVXWF.mjs → export-space-S5SCAL4M.mjs} +3 -3
- package/dist/lib/neutral/{get-share-link-3LEA5FSK.mjs → get-share-link-CLM5IQRL.mjs} +4 -4
- package/dist/lib/neutral/hooks/index.mjs +16 -4
- package/dist/lib/neutral/hooks/index.mjs.map +3 -3
- package/dist/lib/neutral/{identity-created-57RML5XT.mjs → identity-created-BEYMLBK4.mjs} +5 -5
- package/dist/lib/neutral/identity-created-BEYMLBK4.mjs.map +7 -0
- package/dist/lib/neutral/{import-space-Y5L3QE3C.mjs → import-space-LJQK3KT7.mjs} +3 -3
- package/dist/lib/neutral/index.mjs +16 -6
- 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/meta.mjs +1 -1
- package/dist/lib/neutral/{migrate-G7I52UKD.mjs → migrate-WHM6LU7L.mjs} +4 -4
- package/dist/lib/neutral/{migrate-G7I52UKD.mjs.map → migrate-WHM6LU7L.mjs.map} +3 -3
- package/dist/lib/neutral/{navigation-handler-QQJYEMAS.mjs → navigation-handler-ZF7MV2HL.mjs} +16 -10
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +7 -0
- package/dist/lib/neutral/{navigation-resolver-IFVQRCGU.mjs → navigation-resolver-KBESOSWU.mjs} +11 -11
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +7 -0
- package/dist/lib/neutral/{open-CPWVZSI4.mjs → open-JCXTL3SK.mjs} +3 -3
- package/dist/lib/neutral/{open-create-object-4LN4PR6N.mjs → open-create-object-WAIAU7TA.mjs} +6 -6
- package/dist/lib/neutral/{open-create-space-VPAW3F2T.mjs → open-create-space-VU47FWPZ.mjs} +6 -6
- package/dist/lib/neutral/{open-import-space-VLQ5V55H.mjs → open-import-space-GUHIEWYB.mjs} +6 -6
- package/dist/lib/neutral/{open-members-BEXOSSBS.mjs → open-members-MLLBHKUU.mjs} +6 -6
- package/dist/lib/neutral/open-members-MLLBHKUU.mjs.map +7 -0
- package/dist/lib/neutral/{open-settings-RHDBW2K5.mjs → open-settings-DTPZF4U4.mjs} +6 -6
- package/dist/lib/neutral/open-settings-DTPZF4U4.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +3 -3
- package/dist/lib/neutral/plugin.mjs +4 -4
- package/dist/lib/neutral/{react-root-2DJPZQT4.mjs → react-root-YLYRCSAZ.mjs} +2 -2
- package/dist/lib/neutral/{react-root-2DJPZQT4.mjs.map → react-root-YLYRCSAZ.mjs.map} +3 -3
- package/dist/lib/neutral/{react-surface-LYCTOQLY.mjs → react-surface-LRA7GIFN.mjs} +77 -80
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +7 -0
- package/dist/lib/neutral/{remove-objects-OWDMA4IF.mjs → remove-objects-WEO66EDS.mjs} +5 -5
- package/dist/lib/neutral/remove-objects-WEO66EDS.mjs.map +7 -0
- package/dist/lib/neutral/{rename-SR6BBSPU.mjs → rename-Q6UNCBIM.mjs} +9 -8
- package/dist/lib/neutral/rename-Q6UNCBIM.mjs.map +7 -0
- package/dist/lib/neutral/{rename-object-5H6E5AOX.mjs → rename-object-2UCEGU7U.mjs} +9 -8
- package/dist/lib/neutral/rename-object-2UCEGU7U.mjs.map +7 -0
- package/dist/lib/neutral/{repair-PSYRVSJ6.mjs → repair-HMH476U3.mjs} +3 -3
- package/dist/lib/neutral/repair-HMH476U3.mjs.map +7 -0
- package/dist/lib/neutral/{restore-field-UHDG2ZQM.mjs → restore-field-6CQAFOXY.mjs} +3 -3
- package/dist/lib/neutral/{restore-objects-2UD5P6OC.mjs → restore-objects-3VINLP7C.mjs} +3 -3
- package/dist/lib/neutral/{settings-Q32EQCHX.mjs → settings-5IBSYBVU.mjs} +3 -3
- package/dist/lib/neutral/{settings-Q32EQCHX.mjs.map → settings-5IBSYBVU.mjs.map} +3 -3
- package/dist/lib/neutral/{share-5Y4NZA75.mjs → share-A4WPILNF.mjs} +3 -3
- package/dist/lib/neutral/{snapshot-H3HKOFVP.mjs → snapshot-HBYMAPA7.mjs} +3 -3
- package/dist/lib/neutral/{spaces-ready-GBF72QJH.mjs → spaces-ready-GWMSU72V.mjs} +12 -12
- package/dist/lib/neutral/spaces-ready-GWMSU72V.mjs.map +7 -0
- package/dist/lib/neutral/{state-DPBOZRAW.mjs → state-KMH2NUAL.mjs} +2 -2
- package/dist/lib/neutral/state-KMH2NUAL.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +18 -8
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +9 -3
- package/dist/lib/neutral/{undo-mappings-OBRQOYN4.mjs → undo-mappings-P43EAUGI.mjs} +5 -5
- package/dist/lib/neutral/{undo-mappings-OBRQOYN4.mjs.map → undo-mappings-P43EAUGI.mjs.map} +3 -3
- package/dist/lib/neutral/{wait-for-object-3TAWUWTP.mjs → wait-for-object-U6P2NNWY.mjs} +3 -3
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +19 -25
- 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 -5
- 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 +29 -4
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -33
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +10 -54
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-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/node.d.ts +3 -33
- package/dist/types/src/capabilities/node.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 +2 -2
- 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/commands/database/add.d.ts.map +1 -1
- package/dist/types/src/commands/queue/query.d.ts.map +1 -1
- package/dist/types/src/components/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/constants.d.ts +1 -2
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +142 -52
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +142 -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 +142 -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/RecordArticle/RecordArticle.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 +16 -0
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -0
- package/dist/types/src/containers/RenamePopover/index.d.ts +3 -0
- package/dist/types/src/containers/RenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts +15 -0
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeArticle/index.d.ts +2 -0
- package/dist/types/src/containers/{ObjectProperties → SpaceHomeArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts +22 -0
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeRecent/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomeRecent/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +142 -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 +143 -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 +142 -52
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +142 -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 +7 -3
- 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/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/useRelatedObjects.d.ts.map +1 -1
- 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 +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-object.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +9 -37
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/helpers.d.ts.map +1 -1
- package/dist/types/src/operations/join.d.ts.map +1 -1
- package/dist/types/src/operations/remove-objects.d.ts.map +1 -1
- package/dist/types/src/operations/rename-object.d.ts.map +1 -1
- package/dist/types/src/operations/rename.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +142 -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/types/events.d.ts.map +1 -1
- package/dist/types/src/types/form.d.ts +7 -1
- package/dist/types/src/types/form.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/surface.d.ts +26 -0
- package/dist/types/src/types/surface.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +7 -0
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +35 -0
- package/package.json +71 -59
- package/src/SpacePlugin.test.ts +1 -1
- package/src/SpacePlugin.ts +4 -10
- package/src/capabilities/app-graph-builder/extensions/collections.ts +82 -69
- package/src/capabilities/app-graph-builder/extensions/companions.ts +6 -5
- package/src/capabilities/app-graph-builder/extensions/database.ts +118 -91
- package/src/capabilities/app-graph-builder/extensions/settings.ts +17 -14
- package/src/capabilities/app-graph-builder/extensions/shared.test.ts +13 -9
- package/src/capabilities/app-graph-builder/extensions/shared.ts +5 -23
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +78 -29
- package/src/capabilities/create-object.ts +0 -5
- package/src/capabilities/identity-created.ts +4 -4
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +14 -4
- package/src/capabilities/navigation-resolver.ts +13 -20
- package/src/capabilities/react-root.tsx +1 -1
- package/src/capabilities/react-surface.tsx +95 -99
- package/src/capabilities/repair.ts +4 -2
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +9 -16
- package/src/capabilities/state.ts +1 -1
- package/src/capabilities/undo-mappings.ts +3 -3
- package/src/commands/database/add.ts +4 -2
- package/src/commands/queue/query.ts +4 -3
- package/src/components/AwaitingObject/AwaitingObject.tsx +1 -1
- package/src/components/CreateObjectPanel/CreateObjectPanel.tsx +2 -2
- package/src/components/ForeignKeys/ForeignKeys.tsx +21 -20
- package/src/components/index.ts +3 -3
- package/src/constants.ts +5 -6
- package/src/containers/CollectionArticle/CollectionArticle.tsx +10 -6
- package/src/containers/CollectionSection/CollectionSection.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +48 -10
- package/src/containers/CreateSpaceDialog/CreateSpaceDialog.tsx +5 -5
- package/src/containers/DefaultProperties/DefaultProperties.tsx +69 -0
- package/src/containers/DefaultProperties/index.ts +5 -0
- package/src/containers/ImportSpaceDialog/ImportSpaceDialog.tsx +3 -3
- package/src/containers/InlineSyncStatus/InlineSyncStatus.tsx +3 -3
- package/src/containers/JoinDialog/JoinDialog.tsx +14 -25
- package/src/containers/MembersContainer/MembersContainer.tsx +42 -38
- package/src/containers/MenuFooter/MenuFooter.tsx +3 -3
- package/src/containers/ObjectCardStack/ObjectCardStack.tsx +3 -3
- package/src/containers/RecordArticle/RecordArticle.tsx +67 -8
- package/src/containers/RelatedArticle/RelatedArticle.tsx +18 -15
- package/src/containers/RenamePopover/RenamePopover.tsx +125 -0
- package/src/containers/RenamePopover/index.ts +6 -0
- package/src/containers/SchemaContainer/SchemaContainer.tsx +22 -18
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +100 -0
- package/src/containers/SpaceHomeArticle/index.ts +5 -0
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +103 -0
- package/src/containers/SpaceHomeRecent/index.ts +5 -0
- package/src/containers/SpacePresence/SpacePresence.tsx +23 -21
- 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 +120 -111
- package/src/containers/SyncStatus/SyncStatus.tsx +2 -2
- 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 +7 -3
- package/src/errors.ts +11 -0
- package/src/hooks/useInputSurfaceLookup.tsx +3 -2
- package/src/hooks/useRelatedObjects.ts +13 -1
- package/src/index.ts +1 -0
- package/src/meta.ts +2 -27
- package/src/operations/add-object.ts +12 -18
- package/src/operations/add-type.ts +1 -1
- package/src/operations/create.ts +4 -4
- package/src/operations/definitions.ts +2 -3
- package/src/operations/helpers.ts +1 -1
- package/src/operations/join.ts +19 -0
- package/src/operations/migrate.ts +1 -1
- package/src/operations/open-members.ts +3 -3
- package/src/operations/open-settings.ts +3 -3
- package/src/operations/remove-objects.ts +3 -2
- package/src/operations/rename-object.ts +3 -2
- package/src/operations/rename.ts +3 -2
- package/src/translations.ts +18 -7
- package/src/types/Settings.ts +10 -1
- package/src/types/capabilities.ts +9 -9
- package/src/types/events.ts +5 -5
- package/src/types/form.ts +5 -1
- package/src/types/index.ts +1 -0
- package/src/types/surface.ts +31 -0
- package/src/types/types.ts +9 -1
- package/src/util.ts +3 -4
- package/dist/lib/neutral/CollectionArticle-S3OF5KJ7.mjs.map +0 -7
- package/dist/lib/neutral/CreateObjectDialog-66R3K6I3.mjs.map +0 -7
- package/dist/lib/neutral/CreateSpaceDialog-CDGSEIJB.mjs.map +0 -7
- package/dist/lib/neutral/EntityRenamePopover-MYSW262F.mjs +0 -59
- package/dist/lib/neutral/EntityRenamePopover-MYSW262F.mjs.map +0 -7
- package/dist/lib/neutral/ImportSpaceDialog-7GKV4OTF.mjs.map +0 -7
- package/dist/lib/neutral/InlineSyncStatus-TBJKZCH7.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-SSFKRFTJ.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-KMCQDWCS.mjs.map +0 -7
- package/dist/lib/neutral/MenuFooter-5JT7V5FZ.mjs.map +0 -7
- package/dist/lib/neutral/ObjectCardStack-IXNU3HEN.mjs.map +0 -7
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs +0 -33
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs.map +0 -7
- package/dist/lib/neutral/RecordArticle-QWGH25NT.mjs +0 -51
- package/dist/lib/neutral/RecordArticle-QWGH25NT.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-YDNGUDAJ.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-Q4BP6X2M.mjs.map +0 -7
- package/dist/lib/neutral/SpaceRenamePopover-KFWL4CTJ.mjs +0 -56
- package/dist/lib/neutral/SpaceRenamePopover-KFWL4CTJ.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-YAHBOY5T.mjs +0 -37
- package/dist/lib/neutral/SpaceSettings-YAHBOY5T.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-IB34TEOB.mjs.map +0 -7
- package/dist/lib/neutral/SyncStatus-CWOXWDDZ.mjs.map +0 -7
- package/dist/lib/neutral/add-object-QYOMCBJA.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-SQGCUCDO.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-serializer-IBPPU5VR.mjs +0 -81
- package/dist/lib/neutral/app-graph-serializer-IBPPU5VR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4RTSNTDC.mjs +0 -37
- package/dist/lib/neutral/chunk-4RTSNTDC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7WUJENBF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B7DBIARR.mjs +0 -8
- package/dist/lib/neutral/chunk-BBQR23DW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EEXRKYOD.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F5MESIRH.mjs +0 -19
- package/dist/lib/neutral/chunk-F5MESIRH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-K34BPPQE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YY62663T.mjs.map +0 -7
- package/dist/lib/neutral/create-EPIFSRJA.mjs.map +0 -7
- package/dist/lib/neutral/create-object-22WUOWZQ.mjs.map +0 -7
- package/dist/lib/neutral/identity-created-57RML5XT.mjs.map +0 -7
- package/dist/lib/neutral/join-Z5K4OAIG.mjs +0 -28
- package/dist/lib/neutral/join-Z5K4OAIG.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-QQJYEMAS.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-IFVQRCGU.mjs.map +0 -7
- package/dist/lib/neutral/open-members-BEXOSSBS.mjs.map +0 -7
- package/dist/lib/neutral/open-settings-RHDBW2K5.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-LYCTOQLY.mjs.map +0 -7
- package/dist/lib/neutral/remove-objects-OWDMA4IF.mjs.map +0 -7
- package/dist/lib/neutral/rename-SR6BBSPU.mjs.map +0 -7
- package/dist/lib/neutral/rename-object-5H6E5AOX.mjs.map +0 -7
- package/dist/lib/neutral/repair-PSYRVSJ6.mjs.map +0 -7
- package/dist/lib/neutral/spaces-ready-GBF72QJH.mjs.map +0 -7
- package/dist/lib/neutral/state-DPBOZRAW.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -5
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts +0 -8
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts.map +0 -1
- package/dist/types/src/containers/EntityRenamePopover/EntityRenamePopover.d.ts +0 -7
- package/dist/types/src/containers/EntityRenamePopover/EntityRenamePopover.d.ts.map +0 -1
- package/dist/types/src/containers/EntityRenamePopover/index.d.ts +0 -2
- package/dist/types/src/containers/EntityRenamePopover/index.d.ts.map +0 -1
- package/dist/types/src/containers/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/SpaceRenamePopover/SpaceRenamePopover.d.ts +0 -7
- package/dist/types/src/containers/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +0 -1
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts +0 -2
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts.map +0 -1
- package/src/capabilities/app-graph-serializer.ts +0 -85
- package/src/components/SpaceSettings/SpaceSettings.tsx +0 -56
- package/src/containers/EntityRenamePopover/EntityRenamePopover.tsx +0 -52
- package/src/containers/EntityRenamePopover/index.ts +0 -5
- package/src/containers/ObjectProperties/ObjectProperties.tsx +0 -32
- package/src/containers/ObjectProperties/index.ts +0 -5
- package/src/containers/SpaceRenamePopover/SpaceRenamePopover.tsx +0 -54
- package/src/containers/SpaceRenamePopover/index.ts +0 -5
- /package/dist/lib/neutral/{SmallPresenceLive-GUF4WLUC.mjs.map → SmallPresenceLive-FW3AMEY5.mjs.map} +0 -0
- /package/dist/lib/neutral/{SpacePresence-ACEXUS3N.mjs.map → SpacePresence-T37WH43Y.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-relation-HV3VCMJG.mjs.map → add-relation-BGTLART5.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-B7DBIARR.mjs.map → chunk-U5WTDOMV.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-FGQN37PK.mjs.map → close-5WEQZRNK.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-LIA5M3WI.mjs.map → delete-SPCU2VFM.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-field-ZIGFXFHY.mjs.map → delete-field-TAKJVEAD.mjs.map} +0 -0
- /package/dist/lib/neutral/{duplicate-object-X37FM6PW.mjs.map → duplicate-object-BUPZOO6S.mjs.map} +0 -0
- /package/dist/lib/neutral/{export-space-VWJHVXWF.mjs.map → export-space-S5SCAL4M.mjs.map} +0 -0
- /package/dist/lib/neutral/{get-share-link-3LEA5FSK.mjs.map → get-share-link-CLM5IQRL.mjs.map} +0 -0
- /package/dist/lib/neutral/{import-space-Y5L3QE3C.mjs.map → import-space-LJQK3KT7.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-CPWVZSI4.mjs.map → open-JCXTL3SK.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-object-4LN4PR6N.mjs.map → open-create-object-WAIAU7TA.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-space-VPAW3F2T.mjs.map → open-create-space-VU47FWPZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-import-space-VLQ5V55H.mjs.map → open-import-space-GUHIEWYB.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-field-UHDG2ZQM.mjs.map → restore-field-6CQAFOXY.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-objects-2UD5P6OC.mjs.map → restore-objects-3VINLP7C.mjs.map} +0 -0
- /package/dist/lib/neutral/{share-5Y4NZA75.mjs.map → share-A4WPILNF.mjs.map} +0 -0
- /package/dist/lib/neutral/{snapshot-H3HKOFVP.mjs.map → snapshot-HBYMAPA7.mjs.map} +0 -0
- /package/dist/lib/neutral/{wait-for-object-3TAWUWTP.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,21 +1,21 @@
|
|
|
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";
|
|
17
17
|
import { Capability } from "@dxos/app-framework";
|
|
18
|
-
import { AppCapabilities,
|
|
18
|
+
import { AppCapabilities, AppNode, AppNodeMatcher, AppSpace, Paths } from "@dxos/app-toolkit";
|
|
19
19
|
import { SpaceState as SpaceState2 } from "@dxos/client/echo";
|
|
20
20
|
import { Operation } from "@dxos/compute";
|
|
21
21
|
import { Filter as Filter2, Obj as Obj2 } from "@dxos/echo";
|
|
@@ -24,26 +24,24 @@ 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
|
-
import { SPACE_TYPE, SpaceCapabilities } from "#types";
|
|
30
|
+
import { SPACE_HOME_NODE_TYPE, SPACE_TYPE, SpaceCapabilities } from "#types";
|
|
30
31
|
|
|
31
32
|
// src/capabilities/app-graph-builder/extensions/shared.ts
|
|
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
|
-
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var TYPE_COLLECTION_TYPE = `${meta.id}.type-collection`;
|
|
42
|
-
var STATIC_SCHEMA_TYPE = `${meta.id}.static-schema`;
|
|
39
|
+
var DATABASE_SECTION_TYPE = `${meta.profile.key}.database`;
|
|
40
|
+
var COLLECTIONS_SECTION_TYPE = `${meta.profile.key}.collections`;
|
|
41
|
+
var STATIC_SCHEMA_TYPE = `${meta.profile.key}.static-schema`;
|
|
43
42
|
var META_NS = {
|
|
44
|
-
ns: meta.
|
|
43
|
+
ns: meta.profile.key
|
|
45
44
|
};
|
|
46
|
-
var BLOCK_REORDER_ABOVE = (_source, instruction) => instruction.type === "reorder-above";
|
|
47
45
|
var CAN_DROP_SPACE = (source) => Obj.isObject(source.item.data) || isSpace(source.item.data);
|
|
48
46
|
var spaceActionsCache = /* @__PURE__ */ new Map();
|
|
49
47
|
var spaceRearrangeCache = /* @__PURE__ */ new Map();
|
|
@@ -71,10 +69,6 @@ var MIGRATE_SPACE_LABEL = [
|
|
|
71
69
|
"migrate-space.label",
|
|
72
70
|
META_NS
|
|
73
71
|
];
|
|
74
|
-
var REMOVE_FROM_COLLECTION_LABEL = [
|
|
75
|
-
"remove-from-collection.label",
|
|
76
|
-
META_NS
|
|
77
|
-
];
|
|
78
72
|
var RENAME_SPACE_LABEL = [
|
|
79
73
|
"rename-space.label",
|
|
80
74
|
META_NS
|
|
@@ -137,12 +131,39 @@ var buildViewIndex = (get, space, schemas) => {
|
|
|
137
131
|
};
|
|
138
132
|
|
|
139
133
|
// src/capabilities/app-graph-builder/extensions/spaces.ts
|
|
134
|
+
var SPACE_HOME_NODE_LABEL = [
|
|
135
|
+
"space-home-node.label",
|
|
136
|
+
{
|
|
137
|
+
ns: meta2.profile.key
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
140
|
var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
141
141
|
const capabilities = yield* Capability.Service;
|
|
142
142
|
return yield* Effect.all([
|
|
143
|
+
GraphBuilder.createExtension({
|
|
144
|
+
id: "spaceHome",
|
|
145
|
+
position: Position.first,
|
|
146
|
+
match: AppNodeMatcher.whenSpace,
|
|
147
|
+
connector: (space) => Effect.succeed([
|
|
148
|
+
{
|
|
149
|
+
id: Paths.SPACE_HOME_SEGMENT,
|
|
150
|
+
type: SPACE_HOME_NODE_TYPE,
|
|
151
|
+
data: SPACE_HOME_NODE_TYPE,
|
|
152
|
+
properties: {
|
|
153
|
+
label: SPACE_HOME_NODE_LABEL,
|
|
154
|
+
icon: "ph--house--regular",
|
|
155
|
+
iconHue: "emerald",
|
|
156
|
+
position: Position.first,
|
|
157
|
+
draggable: false,
|
|
158
|
+
droppable: false,
|
|
159
|
+
space
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
])
|
|
163
|
+
}),
|
|
143
164
|
GraphBuilder.createExtension({
|
|
144
165
|
id: "primaryActions",
|
|
145
|
-
position:
|
|
166
|
+
position: Position.first,
|
|
146
167
|
match: NodeMatcher.whenRoot,
|
|
147
168
|
actions: () => Effect.succeed([
|
|
148
169
|
Node.makeAction({
|
|
@@ -152,7 +173,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
152
173
|
label: [
|
|
153
174
|
"create-space.label",
|
|
154
175
|
{
|
|
155
|
-
ns: meta2.
|
|
176
|
+
ns: meta2.profile.key
|
|
156
177
|
}
|
|
157
178
|
],
|
|
158
179
|
icon: "ph--plus--regular",
|
|
@@ -167,7 +188,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
167
188
|
label: [
|
|
168
189
|
"join-space.label",
|
|
169
190
|
{
|
|
170
|
-
ns: meta2.
|
|
191
|
+
ns: meta2.profile.key
|
|
171
192
|
}
|
|
172
193
|
],
|
|
173
194
|
icon: "ph--sign-in--regular",
|
|
@@ -182,7 +203,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
182
203
|
label: [
|
|
183
204
|
"import-space.label",
|
|
184
205
|
{
|
|
185
|
-
ns: meta2.
|
|
206
|
+
ns: meta2.profile.key
|
|
186
207
|
}
|
|
187
208
|
],
|
|
188
209
|
icon: "ph--upload--regular",
|
|
@@ -193,7 +214,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
193
214
|
id: `${SpaceOperation.ExportSpace.meta.key}.binary`,
|
|
194
215
|
data: Effect.fnUntraced(function* () {
|
|
195
216
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
196
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
217
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
197
218
|
if (space) {
|
|
198
219
|
yield* Operation.invoke(SpaceOperation.ExportSpace, {
|
|
199
220
|
space,
|
|
@@ -205,7 +226,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
205
226
|
label: [
|
|
206
227
|
"export-space-binary.label",
|
|
207
228
|
{
|
|
208
|
-
ns: meta2.
|
|
229
|
+
ns: meta2.profile.key
|
|
209
230
|
}
|
|
210
231
|
],
|
|
211
232
|
icon: "ph--download--regular",
|
|
@@ -216,7 +237,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
216
237
|
id: `${SpaceOperation.ExportSpace.meta.key}.json`,
|
|
217
238
|
data: Effect.fnUntraced(function* () {
|
|
218
239
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
219
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
240
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
220
241
|
if (space) {
|
|
221
242
|
yield* Operation.invoke(SpaceOperation.ExportSpace, {
|
|
222
243
|
space,
|
|
@@ -228,7 +249,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
228
249
|
label: [
|
|
229
250
|
"export-space-json.label",
|
|
230
251
|
{
|
|
231
|
-
ns: meta2.
|
|
252
|
+
ns: meta2.profile.key
|
|
232
253
|
}
|
|
233
254
|
],
|
|
234
255
|
icon: "ph--download--regular",
|
|
@@ -239,7 +260,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
239
260
|
id: SpaceOperation.OpenMembers.meta.key,
|
|
240
261
|
data: Effect.fnUntraced(function* () {
|
|
241
262
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
242
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
263
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
243
264
|
if (space) {
|
|
244
265
|
yield* Operation.invoke(SpaceOperation.OpenMembers, {
|
|
245
266
|
space
|
|
@@ -250,7 +271,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
250
271
|
label: [
|
|
251
272
|
"share-space.label",
|
|
252
273
|
{
|
|
253
|
-
ns: meta2.
|
|
274
|
+
ns: meta2.profile.key
|
|
254
275
|
}
|
|
255
276
|
],
|
|
256
277
|
icon: "ph--users--regular",
|
|
@@ -265,7 +286,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
265
286
|
id: SpaceOperation.OpenSettings.meta.key,
|
|
266
287
|
data: Effect.fnUntraced(function* () {
|
|
267
288
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
268
|
-
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
289
|
+
const space = AppSpace.getActiveSpace(client, capabilities) ?? AppSpace.getPersonalSpace(client);
|
|
269
290
|
if (space) {
|
|
270
291
|
yield* Operation.invoke(SpaceOperation.OpenSettings, {
|
|
271
292
|
space
|
|
@@ -276,7 +297,7 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
276
297
|
label: [
|
|
277
298
|
"open-current-space-settings.label",
|
|
278
299
|
{
|
|
279
|
-
ns: meta2.
|
|
300
|
+
ns: meta2.profile.key
|
|
280
301
|
}
|
|
281
302
|
],
|
|
282
303
|
icon: "ph--faders--regular",
|
|
@@ -292,12 +313,15 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
292
313
|
id: "spaces",
|
|
293
314
|
match: NodeMatcher.whenRoot,
|
|
294
315
|
connector: (_node, get) => {
|
|
295
|
-
const client = capabilities.
|
|
316
|
+
const [client] = capabilities.getAll(ClientCapabilities.Client);
|
|
317
|
+
if (!client) {
|
|
318
|
+
return Effect.succeed([]);
|
|
319
|
+
}
|
|
296
320
|
const stateAtom = capabilities.get(SpaceCapabilities.State);
|
|
297
321
|
const ephemeralAtom = capabilities.get(SpaceCapabilities.EphemeralState);
|
|
298
322
|
const spacesAtom = CreateAtom.fromObservable(client.spaces);
|
|
299
323
|
const spaces = get(spacesAtom);
|
|
300
|
-
const personalSpace = getPersonalSpace(client);
|
|
324
|
+
const personalSpace = AppSpace.getPersonalSpace(client);
|
|
301
325
|
if (!spaces || !personalSpace) {
|
|
302
326
|
return Effect.succeed([]);
|
|
303
327
|
}
|
|
@@ -325,10 +349,10 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
325
349
|
return Effect.succeed([
|
|
326
350
|
...spaces.filter((space) => orderMap.has(space.id)).sort((sortA, sortB) => orderMap.get(sortA.id) - orderMap.get(sortB.id)),
|
|
327
351
|
...spaces.filter((space) => !orderMap.has(space.id))
|
|
328
|
-
].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({
|
|
329
353
|
space,
|
|
330
354
|
navigable: ephemeralState.navigableCollections,
|
|
331
|
-
personal: isPersonalSpace(space),
|
|
355
|
+
personal: AppSpace.isPersonalSpace(space),
|
|
332
356
|
namesCache: state.spaceNames,
|
|
333
357
|
graph,
|
|
334
358
|
spacesOrder
|
|
@@ -338,6 +362,28 @@ var createSpaceExtensions = Effect.fnUntraced(function* () {
|
|
|
338
362
|
}
|
|
339
363
|
}
|
|
340
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
|
+
}),
|
|
341
387
|
GraphBuilder.createExtension({
|
|
342
388
|
id: "actions",
|
|
343
389
|
match: AppNodeMatcher.whenSpace,
|
|
@@ -378,7 +424,7 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, grap
|
|
|
378
424
|
return Node.make({
|
|
379
425
|
id: space.id,
|
|
380
426
|
type: SPACE_TYPE,
|
|
381
|
-
cacheable: CACHEABLE_PROPS,
|
|
427
|
+
cacheable: AppNode.CACHEABLE_PROPS,
|
|
382
428
|
data: space,
|
|
383
429
|
properties: {
|
|
384
430
|
label: getSpaceDisplayName(space, {
|
|
@@ -463,14 +509,15 @@ import * as Effect2 from "effect/Effect";
|
|
|
463
509
|
import * as Match from "effect/Match";
|
|
464
510
|
import * as Option2 from "effect/Option";
|
|
465
511
|
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
466
|
-
import { AppNode, AppNodeMatcher as AppNodeMatcher2, LayoutOperation,
|
|
467
|
-
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";
|
|
468
514
|
import { Operation as Operation2 } from "@dxos/compute";
|
|
469
|
-
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";
|
|
470
516
|
import { HiddenAnnotation } from "@dxos/echo/Annotation";
|
|
471
517
|
import { ClientCapabilities as ClientCapabilities2 } from "@dxos/plugin-client";
|
|
472
|
-
import {
|
|
518
|
+
import { GraphBuilder as GraphBuilder2, Node as Node2 } from "@dxos/plugin-graph";
|
|
473
519
|
import { ViewAnnotation as ViewAnnotation2 } from "@dxos/schema";
|
|
520
|
+
import { isLabel, toLocalizedString } from "@dxos/ui-types/translations";
|
|
474
521
|
import { createFilename, isNonNullable } from "@dxos/util";
|
|
475
522
|
import { meta as meta3 } from "#meta";
|
|
476
523
|
import { SpaceOperation as SpaceOperation2 } from "#operations";
|
|
@@ -478,41 +525,58 @@ import { SpaceCapabilities as SpaceCapabilities2 } from "#types";
|
|
|
478
525
|
var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
479
526
|
const capabilities = yield* Capability2.Service;
|
|
480
527
|
return yield* Effect2.all([
|
|
481
|
-
//
|
|
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.
|
|
482
530
|
GraphBuilder2.createExtension({
|
|
483
|
-
id:
|
|
531
|
+
id: Paths2.GroupSegments.system,
|
|
484
532
|
match: AppNodeMatcher2.whenSpace,
|
|
485
|
-
connector: (space
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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) => {
|
|
490
553
|
return Effect2.succeed([
|
|
491
|
-
|
|
492
|
-
id: Segments.
|
|
493
|
-
type:
|
|
554
|
+
AppNode2.makeSection({
|
|
555
|
+
id: Paths2.Segments.database,
|
|
556
|
+
type: DATABASE_SECTION_TYPE,
|
|
494
557
|
label: [
|
|
495
|
-
"
|
|
558
|
+
"database-section.label",
|
|
496
559
|
{
|
|
497
|
-
ns: meta3.
|
|
560
|
+
ns: meta3.profile.key
|
|
498
561
|
}
|
|
499
562
|
],
|
|
500
563
|
icon: "ph--database--regular",
|
|
501
564
|
space,
|
|
502
|
-
|
|
503
|
-
testId: "spacePlugin.typesSection"
|
|
565
|
+
testId: "spacePlugin.databaseSection"
|
|
504
566
|
})
|
|
505
567
|
]);
|
|
506
568
|
}
|
|
507
569
|
}),
|
|
508
570
|
// Schema nodes under the Types virtual node.
|
|
509
571
|
GraphBuilder2.createExtension({
|
|
510
|
-
id: "
|
|
572
|
+
id: "database",
|
|
511
573
|
match: (node) => {
|
|
512
574
|
const space = isSpace2(node.properties.space) ? node.properties.space : void 0;
|
|
513
|
-
return node.type ===
|
|
575
|
+
return node.type === DATABASE_SECTION_TYPE && space ? Option2.some(space) : Option2.none();
|
|
514
576
|
},
|
|
515
577
|
connector: (space, get) => {
|
|
578
|
+
const settingsAtom = get(capabilities.atom(SpaceCapabilities2.Settings)).at(0);
|
|
579
|
+
const showHidden = settingsAtom ? get(settingsAtom).showHidden : false;
|
|
516
580
|
const allSchemas = get(space.db.query(Query.select(Filter3.type(Type2.Type)).from(Scope.space(), Scope.registry())).atom);
|
|
517
581
|
const userSchemas = allSchemas.filter((type) => {
|
|
518
582
|
if (Type2.isRelation(type)) {
|
|
@@ -522,7 +586,7 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
522
586
|
return false;
|
|
523
587
|
}
|
|
524
588
|
const schema = Type2.getSchema(type);
|
|
525
|
-
if (HiddenAnnotation.get(schema).pipe(Option2.getOrElse(() => false))) {
|
|
589
|
+
if (!showHidden && HiddenAnnotation.get(schema).pipe(Option2.getOrElse(() => false))) {
|
|
526
590
|
return false;
|
|
527
591
|
}
|
|
528
592
|
if (Type2.getTypename(type) === Type2.getTypename(Collection.Collection)) {
|
|
@@ -542,11 +606,19 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
542
606
|
}
|
|
543
607
|
return objects.length > 0 || viewIndex.typeUrisWithViews.has(typeUri);
|
|
544
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
|
+
};
|
|
545
617
|
return Effect2.succeed(visibleSchemas.map((schema) => createSchemaNode({
|
|
546
618
|
schema,
|
|
547
619
|
space,
|
|
548
620
|
get
|
|
549
|
-
})));
|
|
621
|
+
})).toSorted((nodeA, nodeB) => labelOf(nodeA).localeCompare(labelOf(nodeB))));
|
|
550
622
|
}
|
|
551
623
|
}),
|
|
552
624
|
// {All} virtual node + view objects under each schema node.
|
|
@@ -562,75 +634,57 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
562
634
|
connector: ({ space, schema }, get) => {
|
|
563
635
|
const client = get(capabilities.atom(ClientCapabilities2.Client)).at(0);
|
|
564
636
|
const schemas = client ? get(client.graph.registry.query(Filter3.type(Type2.Type)).atom) : [];
|
|
565
|
-
const slug = getTypeSlug(schema);
|
|
566
637
|
const typeUri = Type2.getURI(schema);
|
|
567
|
-
const allNode = Node2.make({
|
|
568
|
-
id: "all",
|
|
569
|
-
type: TYPE_COLLECTION_TYPE,
|
|
570
|
-
data: {
|
|
571
|
-
space,
|
|
572
|
-
typeUri
|
|
573
|
-
},
|
|
574
|
-
properties: {
|
|
575
|
-
label: [
|
|
576
|
-
"type-collection-all.label",
|
|
577
|
-
{
|
|
578
|
-
ns: meta3.id
|
|
579
|
-
}
|
|
580
|
-
],
|
|
581
|
-
icon: "ph--list--regular",
|
|
582
|
-
iconHue: "neutral",
|
|
583
|
-
role: "branch",
|
|
584
|
-
testId: `spacePlugin.typeCollectionAll.${slug}`,
|
|
585
|
-
selectable: false,
|
|
586
|
-
draggable: false,
|
|
587
|
-
droppable: false,
|
|
588
|
-
childrenDroppable: false,
|
|
589
|
-
blockInstruction: BLOCK_REORDER_ABOVE
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
638
|
const viewIndex = buildViewIndex(get, space, schemas);
|
|
593
|
-
const viewNodes = viewIndex.getViewsForTypeUri(typeUri).map((object) =>
|
|
639
|
+
const viewNodes = viewIndex.getViewsForTypeUri(typeUri).map((object) => AppNode2.makeObject({
|
|
640
|
+
get,
|
|
594
641
|
db: space.db,
|
|
595
642
|
object,
|
|
643
|
+
draggable: false,
|
|
596
644
|
droppable: false
|
|
597
645
|
})).filter(isNonNullable);
|
|
598
|
-
return Effect2.succeed(
|
|
599
|
-
allNode,
|
|
600
|
-
...viewNodes
|
|
601
|
-
]);
|
|
646
|
+
return Effect2.succeed(viewNodes);
|
|
602
647
|
}
|
|
603
648
|
}),
|
|
604
|
-
// 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.
|
|
605
652
|
GraphBuilder2.createExtension({
|
|
606
|
-
id: "
|
|
607
|
-
match: (
|
|
608
|
-
|
|
609
|
-
|
|
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;
|
|
610
664
|
}
|
|
611
|
-
return Option2.some({
|
|
612
|
-
space: node.data.space,
|
|
613
|
-
typeUri: node.data.typeUri
|
|
614
|
-
});
|
|
615
|
-
},
|
|
616
|
-
connector: ({ space, typeUri }, get) => {
|
|
617
665
|
const client = get(capabilities.atom(ClientCapabilities2.Client)).at(0);
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
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
|
+
})
|
|
634
688
|
}),
|
|
635
689
|
// Actions for schema nodes.
|
|
636
690
|
GraphBuilder2.createExtension({
|
|
@@ -660,7 +714,7 @@ var createDatabaseExtensions = Effect2.fnUntraced(function* () {
|
|
|
660
714
|
});
|
|
661
715
|
var createSchemaNode = ({ schema, space, get }) => {
|
|
662
716
|
const typename = Type2.getTypename(schema);
|
|
663
|
-
const slug = getTypeSlug(schema);
|
|
717
|
+
const slug = Paths2.getTypeSlug(schema);
|
|
664
718
|
const iconAnnotation = Type2.getDatabase(schema) == null ? Option2.getOrUndefined(Annotation2.IconAnnotation.get(Type2.getSchema(schema))) : void 0;
|
|
665
719
|
const { label, nodeId } = Match.value(schema).pipe(Match.when((value2) => Type2.getDatabase(value2) != null, (mutableSchema) => {
|
|
666
720
|
const snapshot = get(Entity.atom(mutableSchema));
|
|
@@ -674,7 +728,7 @@ var createSchemaNode = ({ schema, space, get }) => {
|
|
|
674
728
|
nodeId: slug
|
|
675
729
|
};
|
|
676
730
|
}), Match.orElse(() => ({
|
|
677
|
-
label: getDynamicLabel("typename.label", typename, {
|
|
731
|
+
label: AppNode2.getDynamicLabel("typename.label", typename, {
|
|
678
732
|
count: 2,
|
|
679
733
|
defaultValue: typename
|
|
680
734
|
}),
|
|
@@ -690,9 +744,11 @@ var createSchemaNode = ({ schema, space, get }) => {
|
|
|
690
744
|
label,
|
|
691
745
|
icon,
|
|
692
746
|
iconHue,
|
|
693
|
-
|
|
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'`).
|
|
694
750
|
testId: `spacePlugin.schemaNode.${typename}`,
|
|
695
|
-
selectable:
|
|
751
|
+
selectable: true,
|
|
696
752
|
draggable: false,
|
|
697
753
|
droppable: false,
|
|
698
754
|
childrenDroppable: false,
|
|
@@ -734,7 +790,7 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
734
790
|
properties: {
|
|
735
791
|
// Static plugin types carry a per-typename `add-object.label` (e.g. "Add event");
|
|
736
792
|
// database types have no such namespace, so fall back to the plugin's generic label.
|
|
737
|
-
label: getDynamicLabel("add-object.label", Type2.getDatabase(type) != null ? meta3.
|
|
793
|
+
label: AppNode2.getDynamicLabel("add-object.label", Type2.getDatabase(type) != null ? meta3.profile.key : typename),
|
|
738
794
|
icon: "ph--plus--regular",
|
|
739
795
|
disposition: "list-item-primary",
|
|
740
796
|
testId: "spacePlugin.createObject"
|
|
@@ -746,8 +802,10 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
746
802
|
data: () => Operation2.invoke(SpaceOperation2.OpenCreateObject, {
|
|
747
803
|
target: space.db,
|
|
748
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.
|
|
749
807
|
initialFormValues: {
|
|
750
|
-
typename: Type2.
|
|
808
|
+
typename: Type2.getURI(type)
|
|
751
809
|
}
|
|
752
810
|
}),
|
|
753
811
|
properties: {
|
|
@@ -764,7 +822,7 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
764
822
|
caller: `${params?.caller}:${params?.parent?.id}`
|
|
765
823
|
}) : Effect2.fail(new Error("Cannot rename immutable schema")),
|
|
766
824
|
properties: {
|
|
767
|
-
label: getDynamicLabel("rename-object.label", Type2.getTypename(Type2.Type)),
|
|
825
|
+
label: AppNode2.getDynamicLabel("rename-object.label", Type2.getTypename(Type2.Type)),
|
|
768
826
|
icon: "ph--pencil-simple-line--regular",
|
|
769
827
|
disabled: Type2.getDatabase(type) == null,
|
|
770
828
|
disposition: "list-item",
|
|
@@ -779,7 +837,7 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
779
837
|
]
|
|
780
838
|
}) : Effect2.succeed(void 0),
|
|
781
839
|
properties: {
|
|
782
|
-
label: getDynamicLabel("delete-object.label", Type2.getTypename(Type2.Type)),
|
|
840
|
+
label: AppNode2.getDynamicLabel("delete-object.label", Type2.getTypename(Type2.Type)),
|
|
783
841
|
icon: "ph--trash--regular",
|
|
784
842
|
disposition: "list-item",
|
|
785
843
|
disabled: !deletable,
|
|
@@ -816,13 +874,13 @@ var createSchemaActions = ({ type, space, deletable, capabilities }) => {
|
|
|
816
874
|
// src/capabilities/app-graph-builder/extensions/collections.ts
|
|
817
875
|
import * as Effect3 from "effect/Effect";
|
|
818
876
|
import * as Option3 from "effect/Option";
|
|
819
|
-
import {
|
|
820
|
-
import { AppCapabilities as
|
|
821
|
-
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";
|
|
822
880
|
import { Operation as Operation3 } from "@dxos/compute";
|
|
823
881
|
import { Annotation as Annotation3, Collection as Collection2, Obj as Obj4, Type as Type3 } from "@dxos/echo";
|
|
824
882
|
import { invariant } from "@dxos/invariant";
|
|
825
|
-
import {
|
|
883
|
+
import { Graph as Graph2, GraphBuilder as GraphBuilder3, Node as Node3 } from "@dxos/plugin-graph";
|
|
826
884
|
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
827
885
|
import { meta as meta4 } from "#meta";
|
|
828
886
|
import { SpaceOperation as SpaceOperation3 } from "#operations";
|
|
@@ -831,41 +889,56 @@ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/capabilitie
|
|
|
831
889
|
var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOrigin }) {
|
|
832
890
|
const capabilities = yield* Capability3.Service;
|
|
833
891
|
return yield* Effect3.all([
|
|
834
|
-
//
|
|
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.
|
|
835
894
|
GraphBuilder3.createExtension({
|
|
836
|
-
id:
|
|
895
|
+
id: Paths3.GroupSegments.content,
|
|
837
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),
|
|
838
916
|
connector: (space, get) => {
|
|
839
|
-
const spaceState = get(CreateAtom3.fromObservable(space.state));
|
|
840
|
-
if (spaceState !== SpaceState4.SPACE_READY) {
|
|
841
|
-
return Effect3.succeed([]);
|
|
842
|
-
}
|
|
843
917
|
get(Obj4.atom(space.properties));
|
|
844
|
-
const collectionRef = Annotation3.get(space.properties, RootCollectionAnnotation).pipe(Option3.getOrUndefined);
|
|
918
|
+
const collectionRef = Annotation3.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option3.getOrUndefined);
|
|
845
919
|
if (collectionRef) {
|
|
846
920
|
get(Obj4.atom(collectionRef));
|
|
847
921
|
}
|
|
848
922
|
const rootCollection = collectionRef?.target;
|
|
849
|
-
const collectionPartials = rootCollection ? getCollectionGraphNodePartials({
|
|
923
|
+
const collectionPartials = rootCollection ? AppNode3.getCollectionGraphNodePartials({
|
|
850
924
|
db: space.db,
|
|
851
925
|
collection: rootCollection
|
|
852
926
|
}) : void 0;
|
|
853
927
|
return Effect3.succeed([
|
|
854
928
|
Node3.make({
|
|
855
|
-
id:
|
|
929
|
+
id: Paths3.Segments.collections,
|
|
856
930
|
type: COLLECTIONS_SECTION_TYPE,
|
|
857
931
|
data: null,
|
|
858
932
|
properties: {
|
|
859
933
|
label: [
|
|
860
934
|
"collections-section.label",
|
|
861
935
|
{
|
|
862
|
-
ns: meta4.
|
|
936
|
+
ns: meta4.profile.key
|
|
863
937
|
}
|
|
864
938
|
],
|
|
865
939
|
icon: "ph--folder--regular",
|
|
866
|
-
iconHue: "
|
|
940
|
+
iconHue: "indigo",
|
|
867
941
|
role: "branch",
|
|
868
|
-
position: "first",
|
|
869
942
|
testId: "spacePlugin.collectionsSection",
|
|
870
943
|
draggable: false,
|
|
871
944
|
droppable: false,
|
|
@@ -887,7 +960,7 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
887
960
|
const ephemeralAtom = capabilities.get(SpaceCapabilities3.EphemeralState);
|
|
888
961
|
const ephemeralState = get(ephemeralAtom);
|
|
889
962
|
get(Obj4.atom(space.properties));
|
|
890
|
-
const collectionRef = Annotation3.get(space.properties, RootCollectionAnnotation).pipe(Option3.getOrUndefined);
|
|
963
|
+
const collectionRef = Annotation3.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option3.getOrUndefined);
|
|
891
964
|
const collection = collectionRef ? get(Obj4.atom(collectionRef)) : void 0;
|
|
892
965
|
if (!collection) {
|
|
893
966
|
return Effect3.succeed([]);
|
|
@@ -897,11 +970,13 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
897
970
|
get(Obj4.atom(ref));
|
|
898
971
|
return ref.target;
|
|
899
972
|
}).filter(isNonNullable2);
|
|
900
|
-
return Effect3.succeed(objects.map((object) =>
|
|
973
|
+
return Effect3.succeed(objects.map((object) => AppNode3.makeObject({
|
|
974
|
+
get,
|
|
901
975
|
db: space.db,
|
|
902
976
|
object,
|
|
903
977
|
navigable: ephemeralState.navigableCollections,
|
|
904
|
-
|
|
978
|
+
canDrop: AppNode3.CAN_DROP_COLLECTION_ITEM,
|
|
979
|
+
onRearrange: collectionRef?.target ? AppNode3.makeCollectionRearrangeCallback(collectionRef.target) : void 0
|
|
905
980
|
})).filter(isNonNullable2));
|
|
906
981
|
}
|
|
907
982
|
}),
|
|
@@ -919,11 +994,13 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
919
994
|
get(Obj4.atom(ref));
|
|
920
995
|
return ref.target;
|
|
921
996
|
}).filter(isNonNullable2);
|
|
922
|
-
return Effect3.succeed(objects.map((object) => db &&
|
|
997
|
+
return Effect3.succeed(objects.map((object) => db && AppNode3.makeObject({
|
|
998
|
+
get,
|
|
923
999
|
object,
|
|
924
1000
|
db,
|
|
925
1001
|
navigable: ephemeralState.navigableCollections,
|
|
926
|
-
|
|
1002
|
+
canDrop: AppNode3.CAN_DROP_COLLECTION_ITEM,
|
|
1003
|
+
onRearrange: AppNode3.makeCollectionRearrangeCallback(collection)
|
|
927
1004
|
})).filter(isNonNullable2));
|
|
928
1005
|
}
|
|
929
1006
|
}),
|
|
@@ -938,7 +1015,7 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
938
1015
|
},
|
|
939
1016
|
actions: ({ object, nodeId }, get) => {
|
|
940
1017
|
const deletable = !Type3.isType(object);
|
|
941
|
-
const [appGraph] = get(capabilities.atom(
|
|
1018
|
+
const [appGraph] = get(capabilities.atom(AppCapabilities3.AppGraph));
|
|
942
1019
|
const ephemeralAtom = capabilities.get(SpaceCapabilities3.EphemeralState);
|
|
943
1020
|
const ephemeralState = get(ephemeralAtom);
|
|
944
1021
|
if (!appGraph) {
|
|
@@ -956,14 +1033,42 @@ var createCollectionExtensions = Effect3.fnUntraced(function* ({ shareableLinkOr
|
|
|
956
1033
|
parentCollection
|
|
957
1034
|
}));
|
|
958
1035
|
}
|
|
1036
|
+
}),
|
|
1037
|
+
// Action on the collections section header to add an object to the space's root collection.
|
|
1038
|
+
GraphBuilder3.createExtension({
|
|
1039
|
+
id: "collectionsSectionActions",
|
|
1040
|
+
match: (node) => {
|
|
1041
|
+
const space = isSpace3(node.properties.space) ? node.properties.space : void 0;
|
|
1042
|
+
return node.type === COLLECTIONS_SECTION_TYPE && space ? Option3.some(space) : Option3.none();
|
|
1043
|
+
},
|
|
1044
|
+
actions: (space) => Effect3.succeed([
|
|
1045
|
+
Node3.makeAction({
|
|
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
|
+
});
|
|
1055
|
+
}),
|
|
1056
|
+
properties: {
|
|
1057
|
+
label: CREATE_OBJECT_IN_COLLECTION_LABEL,
|
|
1058
|
+
icon: "ph--plus--regular",
|
|
1059
|
+
disposition: "list-item-primary",
|
|
1060
|
+
testId: "spacePlugin.createObject"
|
|
1061
|
+
}
|
|
1062
|
+
})
|
|
1063
|
+
])
|
|
959
1064
|
})
|
|
960
1065
|
]);
|
|
961
1066
|
});
|
|
962
1067
|
var constructObjectActions = ({ object, nodeId, deletable = true, navigable = false, shareableLinkOrigin, parentCollection }) => {
|
|
963
1068
|
const db = Obj4.getDatabase(object);
|
|
964
|
-
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'"] });
|
|
965
1070
|
const typename = Obj4.getTypename(object);
|
|
966
|
-
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'"] });
|
|
967
1072
|
const actions = [
|
|
968
1073
|
...Obj4.instanceOf(Collection2.Collection, object) ? [
|
|
969
1074
|
Node3.makeAction({
|
|
@@ -987,7 +1092,7 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
987
1092
|
caller: `${params?.caller}:${params?.parent?.id}`
|
|
988
1093
|
}),
|
|
989
1094
|
properties: {
|
|
990
|
-
label: getDynamicLabel("rename-object.label", typename, {
|
|
1095
|
+
label: AppNode3.getDynamicLabel("rename-object.label", typename, {
|
|
991
1096
|
defaultValue: "Rename"
|
|
992
1097
|
}),
|
|
993
1098
|
icon: "ph--pencil-simple-line--regular",
|
|
@@ -995,34 +1100,6 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
995
1100
|
testId: "spacePlugin.renameObject"
|
|
996
1101
|
}
|
|
997
1102
|
}),
|
|
998
|
-
...parentCollection && !Obj4.instanceOf(Collection2.Collection, object) ? [
|
|
999
|
-
Node3.makeAction({
|
|
1000
|
-
id: "removeFromCollection",
|
|
1001
|
-
data: () => Effect3.gen(function* () {
|
|
1002
|
-
const index = parentCollection.objects.findIndex((ref) => ref.target === object);
|
|
1003
|
-
if (index !== -1) {
|
|
1004
|
-
const layout = yield* Capabilities.getAtomValue(AppCapabilities2.Layout);
|
|
1005
|
-
const isActive = layout.active.includes(nodeId);
|
|
1006
|
-
Obj4.update(parentCollection, (parentCollection2) => {
|
|
1007
|
-
parentCollection2.objects.splice(index, 1);
|
|
1008
|
-
});
|
|
1009
|
-
if (isActive) {
|
|
1010
|
-
yield* Operation3.invoke(LayoutOperation2.Open, {
|
|
1011
|
-
subject: [
|
|
1012
|
-
getObjectPathFromObject(object)
|
|
1013
|
-
]
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
}),
|
|
1018
|
-
properties: {
|
|
1019
|
-
label: REMOVE_FROM_COLLECTION_LABEL,
|
|
1020
|
-
icon: "ph--minus-circle--regular",
|
|
1021
|
-
disposition: "list-item",
|
|
1022
|
-
testId: "spacePlugin.removeFromCollection"
|
|
1023
|
-
}
|
|
1024
|
-
})
|
|
1025
|
-
] : [],
|
|
1026
1103
|
Node3.makeAction({
|
|
1027
1104
|
id: SpaceOperation3.RemoveObjects.meta.key,
|
|
1028
1105
|
data: () => Operation3.invoke(SpaceOperation3.RemoveObjects, {
|
|
@@ -1032,7 +1109,7 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
1032
1109
|
target: parentCollection
|
|
1033
1110
|
}),
|
|
1034
1111
|
properties: {
|
|
1035
|
-
label: getDynamicLabel("delete-object.label", typename, {
|
|
1112
|
+
label: AppNode3.getDynamicLabel("delete-object.label", typename, {
|
|
1036
1113
|
defaultValue: "Delete"
|
|
1037
1114
|
}),
|
|
1038
1115
|
icon: "ph--trash--regular",
|
|
@@ -1045,7 +1122,7 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
1045
1122
|
Node3.makeAction({
|
|
1046
1123
|
id: "copyLink",
|
|
1047
1124
|
data: () => Effect3.promise(async () => {
|
|
1048
|
-
const url = new URL(toUrlPath(nodeId), shareableLinkOrigin);
|
|
1125
|
+
const url = new URL(Paths3.toUrlPath(nodeId), shareableLinkOrigin);
|
|
1049
1126
|
await navigator.clipboard.writeText(url.toString());
|
|
1050
1127
|
}),
|
|
1051
1128
|
properties: {
|
|
@@ -1059,7 +1136,7 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
1059
1136
|
Node3.makeAction({
|
|
1060
1137
|
id: LayoutOperation2.Expose.meta.key,
|
|
1061
1138
|
data: () => Operation3.invoke(LayoutOperation2.Expose, {
|
|
1062
|
-
subject: getObjectPathFromObject(object)
|
|
1139
|
+
subject: Paths3.getObjectPathFromObject(object)
|
|
1063
1140
|
}),
|
|
1064
1141
|
properties: {
|
|
1065
1142
|
label: EXPOSE_OBJECT_LABEL,
|
|
@@ -1075,11 +1152,12 @@ var constructObjectActions = ({ object, nodeId, deletable = true, navigable = fa
|
|
|
1075
1152
|
// src/capabilities/app-graph-builder/extensions/companions.ts
|
|
1076
1153
|
import * as Effect4 from "effect/Effect";
|
|
1077
1154
|
import * as Option4 from "effect/Option";
|
|
1078
|
-
import { AppNode as
|
|
1155
|
+
import { AppNode as AppNode4 } from "@dxos/app-toolkit";
|
|
1079
1156
|
import { Obj as Obj5, Type as Type4 } from "@dxos/echo";
|
|
1080
1157
|
import { GraphBuilder as GraphBuilder4, NodeMatcher as NodeMatcher2 } from "@dxos/plugin-graph";
|
|
1081
1158
|
import { linkedSegment } from "@dxos/react-ui-attention";
|
|
1082
1159
|
import { ViewAnnotation as ViewAnnotation3 } from "@dxos/schema";
|
|
1160
|
+
import { Position as Position2 } from "@dxos/util";
|
|
1083
1161
|
import { meta as meta5 } from "#meta";
|
|
1084
1162
|
var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
1085
1163
|
return yield* Effect4.all([
|
|
@@ -1088,17 +1166,17 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1088
1166
|
id: "settings",
|
|
1089
1167
|
match: NodeMatcher2.whenEchoObjectMatches,
|
|
1090
1168
|
connector: (node) => Effect4.succeed([
|
|
1091
|
-
|
|
1169
|
+
AppNode4.makeCompanion({
|
|
1092
1170
|
id: linkedSegment("settings"),
|
|
1093
1171
|
label: [
|
|
1094
1172
|
"object-properties.label",
|
|
1095
1173
|
{
|
|
1096
|
-
ns: meta5.
|
|
1174
|
+
ns: meta5.profile.key
|
|
1097
1175
|
}
|
|
1098
1176
|
],
|
|
1099
1177
|
icon: "ph--sliders--regular",
|
|
1100
1178
|
data: "settings",
|
|
1101
|
-
position:
|
|
1179
|
+
position: Position2.last
|
|
1102
1180
|
})
|
|
1103
1181
|
])
|
|
1104
1182
|
}),
|
|
@@ -1107,17 +1185,17 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1107
1185
|
id: "related",
|
|
1108
1186
|
match: NodeMatcher2.whenEchoObjectMatches,
|
|
1109
1187
|
connector: (node) => Effect4.succeed([
|
|
1110
|
-
|
|
1188
|
+
AppNode4.makeCompanion({
|
|
1111
1189
|
id: linkedSegment("related"),
|
|
1112
1190
|
label: [
|
|
1113
1191
|
"companion-related.label",
|
|
1114
1192
|
{
|
|
1115
|
-
ns: meta5.
|
|
1193
|
+
ns: meta5.profile.key
|
|
1116
1194
|
}
|
|
1117
1195
|
],
|
|
1118
1196
|
icon: "ph--graph--regular",
|
|
1119
1197
|
data: "related",
|
|
1120
|
-
position:
|
|
1198
|
+
position: Position2.last
|
|
1121
1199
|
})
|
|
1122
1200
|
])
|
|
1123
1201
|
}),
|
|
@@ -1137,12 +1215,12 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1137
1215
|
return Option4.some(node);
|
|
1138
1216
|
},
|
|
1139
1217
|
connector: (node) => Effect4.succeed([
|
|
1140
|
-
|
|
1218
|
+
AppNode4.makeCompanion({
|
|
1141
1219
|
id: linkedSegment("selected-objects"),
|
|
1142
1220
|
label: [
|
|
1143
1221
|
"companion-selected-objects.label",
|
|
1144
1222
|
{
|
|
1145
|
-
ns: meta5.
|
|
1223
|
+
ns: meta5.profile.key
|
|
1146
1224
|
}
|
|
1147
1225
|
],
|
|
1148
1226
|
icon: "ph--tree-view--regular",
|
|
@@ -1155,8 +1233,9 @@ var createCompanionExtensions = Effect4.fnUntraced(function* () {
|
|
|
1155
1233
|
|
|
1156
1234
|
// src/capabilities/app-graph-builder/extensions/settings.ts
|
|
1157
1235
|
import * as Effect5 from "effect/Effect";
|
|
1158
|
-
import { AppNode as
|
|
1236
|
+
import { AppNode as AppNode5, AppNodeMatcher as AppNodeMatcher4, AppSpace as AppSpace2 } from "@dxos/app-toolkit";
|
|
1159
1237
|
import { GraphBuilder as GraphBuilder5, Node as Node4 } from "@dxos/plugin-graph";
|
|
1238
|
+
import { Position as Position3 } from "@dxos/util";
|
|
1160
1239
|
import { meta as meta6 } from "#meta";
|
|
1161
1240
|
import { SETTINGS_SECTION_ID, SETTINGS_SECTION_TYPE } from "#types";
|
|
1162
1241
|
var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
@@ -1164,19 +1243,19 @@ var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
|
1164
1243
|
id: "settingsSection",
|
|
1165
1244
|
match: AppNodeMatcher4.whenSpace,
|
|
1166
1245
|
connector: (space) => Effect5.succeed([
|
|
1167
|
-
|
|
1246
|
+
AppNode5.makeSection({
|
|
1168
1247
|
id: SETTINGS_SECTION_ID,
|
|
1169
1248
|
type: SETTINGS_SECTION_TYPE,
|
|
1170
1249
|
label: [
|
|
1171
1250
|
"settings-section.label",
|
|
1172
1251
|
{
|
|
1173
|
-
ns: meta6.
|
|
1252
|
+
ns: meta6.profile.key
|
|
1174
1253
|
}
|
|
1175
1254
|
],
|
|
1176
1255
|
icon: "ph--sliders--regular",
|
|
1177
|
-
iconHue: "
|
|
1256
|
+
iconHue: "emerald",
|
|
1178
1257
|
space,
|
|
1179
|
-
position:
|
|
1258
|
+
position: Position3.first,
|
|
1180
1259
|
testId: "spacePlugin.settings"
|
|
1181
1260
|
})
|
|
1182
1261
|
])
|
|
@@ -1185,40 +1264,42 @@ var createSettingsExtensions = Effect5.fnUntraced(function* () {
|
|
|
1185
1264
|
id: "settingsSections",
|
|
1186
1265
|
match: AppNodeMatcher4.whenSpaceSettings,
|
|
1187
1266
|
connector: (space) => {
|
|
1188
|
-
const personal =
|
|
1267
|
+
const personal = AppSpace2.isPersonalSpace(space);
|
|
1189
1268
|
return Effect5.succeed([
|
|
1190
1269
|
Node4.make({
|
|
1191
1270
|
id: "general",
|
|
1192
|
-
type: `${meta6.
|
|
1193
|
-
data: `${meta6.
|
|
1271
|
+
type: `${meta6.profile.key}.general`,
|
|
1272
|
+
data: `${meta6.profile.key}.general`,
|
|
1194
1273
|
properties: {
|
|
1195
1274
|
label: [
|
|
1196
1275
|
"space-settings-properties.label",
|
|
1197
1276
|
{
|
|
1198
|
-
ns: meta6.
|
|
1277
|
+
ns: meta6.profile.key
|
|
1199
1278
|
}
|
|
1200
1279
|
],
|
|
1201
1280
|
icon: "ph--brackets-curly--regular",
|
|
1202
|
-
iconHue: "
|
|
1281
|
+
iconHue: "emerald",
|
|
1203
1282
|
space,
|
|
1283
|
+
position: Position3.first,
|
|
1204
1284
|
testId: "spacePlugin.general"
|
|
1205
1285
|
}
|
|
1206
1286
|
}),
|
|
1207
1287
|
...!personal ? [
|
|
1208
1288
|
Node4.make({
|
|
1209
1289
|
id: "members",
|
|
1210
|
-
type: `${meta6.
|
|
1211
|
-
data: `${meta6.
|
|
1290
|
+
type: `${meta6.profile.key}.members`,
|
|
1291
|
+
data: `${meta6.profile.key}.members`,
|
|
1212
1292
|
properties: {
|
|
1213
1293
|
label: [
|
|
1214
1294
|
"members-panel.label",
|
|
1215
1295
|
{
|
|
1216
|
-
ns: meta6.
|
|
1296
|
+
ns: meta6.profile.key
|
|
1217
1297
|
}
|
|
1218
1298
|
],
|
|
1219
1299
|
icon: "ph--users--regular",
|
|
1220
|
-
iconHue: "
|
|
1300
|
+
iconHue: "emerald",
|
|
1221
1301
|
space,
|
|
1302
|
+
position: Position3.first,
|
|
1222
1303
|
testId: "spacePlugin.members"
|
|
1223
1304
|
}
|
|
1224
1305
|
})
|
|
@@ -1243,9 +1324,9 @@ var app_graph_builder_default = Capability4.makeModule(Effect6.fnUntraced(functi
|
|
|
1243
1324
|
}),
|
|
1244
1325
|
createCompanionExtensions()
|
|
1245
1326
|
]);
|
|
1246
|
-
return Capability4.contributes(
|
|
1327
|
+
return Capability4.contributes(AppCapabilities4.AppGraphBuilder, extensions.flat());
|
|
1247
1328
|
}));
|
|
1248
1329
|
export {
|
|
1249
1330
|
app_graph_builder_default as default
|
|
1250
1331
|
};
|
|
1251
|
-
//# sourceMappingURL=app-graph-builder-
|
|
1332
|
+
//# sourceMappingURL=app-graph-builder-7H2KOD4B.mjs.map
|