@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
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import { Capability } from '@dxos/app-framework';
|
|
11
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
+
import { AppAnnotation, AppCapabilities } from '@dxos/app-toolkit';
|
|
13
|
+
import { Annotation, DXN, Obj, Type } from '@dxos/echo';
|
|
14
|
+
import { LabelAnnotation } from '@dxos/echo/Annotation';
|
|
15
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
16
|
+
import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
17
|
+
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
18
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
19
|
+
import { Loading, withLayout } from '@dxos/react-ui/testing';
|
|
20
|
+
|
|
21
|
+
import { translations } from '#translations';
|
|
22
|
+
|
|
23
|
+
import { TypeCollectionArticle } from './TypeCollectionArticle';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Type that opts in to a content preview card via `CardAnnotation`.
|
|
27
|
+
*/
|
|
28
|
+
class CardType extends Type.makeObject<CardType>(DXN.make('org.dxos.type.test.cardType', '0.1.0'))(
|
|
29
|
+
Schema.Struct({
|
|
30
|
+
name: Schema.optional(Schema.String),
|
|
31
|
+
description: Schema.optional(Schema.String),
|
|
32
|
+
}).pipe(
|
|
33
|
+
LabelAnnotation.set(['name']),
|
|
34
|
+
Annotation.IconAnnotation.set({ icon: 'ph--cards--regular', hue: 'emerald' }),
|
|
35
|
+
AppAnnotation.CardAnnotation.set(true),
|
|
36
|
+
),
|
|
37
|
+
) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Type without the annotation; renders as a header-only tile.
|
|
41
|
+
*/
|
|
42
|
+
class PlainType extends Type.makeObject<PlainType>(DXN.make('org.dxos.type.test.plainType', '0.1.0'))(
|
|
43
|
+
Schema.Struct({
|
|
44
|
+
name: Schema.optional(Schema.String),
|
|
45
|
+
description: Schema.optional(Schema.String),
|
|
46
|
+
}).pipe(LabelAnnotation.set(['name']), Annotation.IconAnnotation.set({ icon: 'ph--circle--regular', hue: 'indigo' })),
|
|
47
|
+
) {}
|
|
48
|
+
|
|
49
|
+
const OBJECT_COUNT = 6;
|
|
50
|
+
|
|
51
|
+
type StoryArgs = {
|
|
52
|
+
type: Type.AnyObj;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const DefaultStory = ({ type }: StoryArgs) => {
|
|
56
|
+
const spaces = useSpaces();
|
|
57
|
+
const space = spaces[spaces.length - 1];
|
|
58
|
+
if (!space) {
|
|
59
|
+
return <Loading />;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return <TypeCollectionArticle role='article' space={space} typeUri={Type.getURI(type)} attendableId='story' />;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const meta = {
|
|
66
|
+
title: 'plugins/plugin-space/containers/TypeCollectionArticle',
|
|
67
|
+
render: DefaultStory,
|
|
68
|
+
decorators: [
|
|
69
|
+
withLayout({ layout: 'fullscreen' }),
|
|
70
|
+
withPluginManager({
|
|
71
|
+
capabilities: [Capability.contributes(AppCapabilities.Translations, translations)],
|
|
72
|
+
plugins: [
|
|
73
|
+
...corePlugins(),
|
|
74
|
+
StorybookPlugin({}),
|
|
75
|
+
PreviewPlugin(),
|
|
76
|
+
ClientPlugin({
|
|
77
|
+
types: [CardType, PlainType],
|
|
78
|
+
onClientInitialized: ({ client }) =>
|
|
79
|
+
Effect.gen(function* () {
|
|
80
|
+
yield* Effect.promise(() => client.halo.createIdentity());
|
|
81
|
+
const space = yield* Effect.promise(() => client.spaces.create());
|
|
82
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
83
|
+
|
|
84
|
+
for (let i = 0; i < OBJECT_COUNT; i++) {
|
|
85
|
+
space.db.add(
|
|
86
|
+
Obj.make(CardType, { name: `Card ${i + 1}`, description: `Preview body for card ${i + 1}.` }),
|
|
87
|
+
);
|
|
88
|
+
space.db.add(Obj.make(PlainType, { name: `Plain ${i + 1}`, description: `Plain object ${i + 1}.` }));
|
|
89
|
+
}
|
|
90
|
+
}),
|
|
91
|
+
}),
|
|
92
|
+
],
|
|
93
|
+
}),
|
|
94
|
+
],
|
|
95
|
+
parameters: {
|
|
96
|
+
layout: 'fullscreen',
|
|
97
|
+
},
|
|
98
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
99
|
+
|
|
100
|
+
export default meta;
|
|
101
|
+
|
|
102
|
+
type Story = StoryObj<typeof meta>;
|
|
103
|
+
|
|
104
|
+
/** Collection of objects without the annotation — header-only tiles. */
|
|
105
|
+
export const Default: Story = {
|
|
106
|
+
args: {
|
|
107
|
+
type: PlainType,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** Collection of objects whose type carries `CardAnnotation` — tiles render a preview body. */
|
|
112
|
+
export const WithCardContent: Story = {
|
|
113
|
+
args: {
|
|
114
|
+
type: CardType,
|
|
115
|
+
},
|
|
116
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
|
+
import React, { useCallback, useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Surface, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
|
+
import { AppAnnotation, LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { Filter, Obj, Type } from '@dxos/echo';
|
|
12
|
+
import { type URI } from '@dxos/keys';
|
|
13
|
+
import { type Space, useObject, useQuery } from '@dxos/react-client/echo';
|
|
14
|
+
import { Card, Focus, Icon, Panel, useTranslation } from '@dxos/react-ui';
|
|
15
|
+
import { useSelection } from '@dxos/react-ui-attention';
|
|
16
|
+
import { Empty } from '@dxos/react-ui-list';
|
|
17
|
+
import { Masonry } from '@dxos/react-ui-masonry';
|
|
18
|
+
import { getStyles } from '@dxos/ui-theme';
|
|
19
|
+
|
|
20
|
+
import { meta } from '#meta';
|
|
21
|
+
|
|
22
|
+
export type TypeCollectionArticleProps = {
|
|
23
|
+
role?: string;
|
|
24
|
+
space: Space;
|
|
25
|
+
typeUri: URI.URI;
|
|
26
|
+
attendableId: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List view rendered when a type node is selected: a masonry grid of header-only cards, one per object
|
|
31
|
+
* of the type. Selecting a card navigates to that object, opening it as a sibling plank. Objects are not
|
|
32
|
+
* enumerated in the nav tree; each navigated object becomes a hidden child of the type node resolved on demand.
|
|
33
|
+
*/
|
|
34
|
+
export const TypeCollectionArticle = ({ role, space, typeUri, attendableId }: TypeCollectionArticleProps) => {
|
|
35
|
+
const { t } = useTranslation(meta.profile.key);
|
|
36
|
+
const { invokePromise } = useOperationInvoker();
|
|
37
|
+
const currentId = useSelection(attendableId, 'single');
|
|
38
|
+
|
|
39
|
+
const objects = useQuery(space.db, Filter.type(typeUri));
|
|
40
|
+
|
|
41
|
+
const handleOpen = useCallback(
|
|
42
|
+
(object: Obj.Unknown) => {
|
|
43
|
+
const id = Obj.getURI(object);
|
|
44
|
+
void invokePromise(LayoutOperation.Select, { contextId: attendableId, subject: { mode: 'single', id } });
|
|
45
|
+
void invokePromise(LayoutOperation.Open, {
|
|
46
|
+
subject: [Paths.getObjectPathFromObject(object)],
|
|
47
|
+
pivotId: attendableId,
|
|
48
|
+
navigation: 'immediate',
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
[attendableId, invokePromise],
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const handleDelete = useCallback((object: Obj.Unknown) => {
|
|
55
|
+
Obj.getDatabase(object)?.remove(object);
|
|
56
|
+
}, []);
|
|
57
|
+
|
|
58
|
+
const tileItems = useMemo<TileData[]>(
|
|
59
|
+
() =>
|
|
60
|
+
objects.map((object) => ({
|
|
61
|
+
object,
|
|
62
|
+
current: Obj.getURI(object) === currentId,
|
|
63
|
+
onOpen: handleOpen,
|
|
64
|
+
onDelete: Obj.getParent(object) ? undefined : handleDelete,
|
|
65
|
+
})),
|
|
66
|
+
[objects, currentId, handleOpen, handleDelete],
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<Panel.Root role={role}>
|
|
71
|
+
<Panel.Toolbar />
|
|
72
|
+
<Panel.Content>
|
|
73
|
+
{objects.length === 0 ? (
|
|
74
|
+
<Empty classNames='bs-full' label={t('type-collection-empty.message')} />
|
|
75
|
+
) : (
|
|
76
|
+
<Masonry.Root Tile={TileAdapter}>
|
|
77
|
+
<Masonry.Content classNames='p-trim-md'>
|
|
78
|
+
<Masonry.Viewport getId={(data) => Obj.getURI(data.object)} items={tileItems} />
|
|
79
|
+
</Masonry.Content>
|
|
80
|
+
</Masonry.Root>
|
|
81
|
+
)}
|
|
82
|
+
</Panel.Content>
|
|
83
|
+
</Panel.Root>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
type TileData = {
|
|
88
|
+
object: Obj.Unknown;
|
|
89
|
+
current: boolean;
|
|
90
|
+
onOpen: (object: Obj.Unknown) => void;
|
|
91
|
+
onDelete?: (object: Obj.Unknown) => void;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const TileAdapter = ({ data }: { data: TileData | undefined; index: number }) => {
|
|
95
|
+
if (!data?.object) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<TypeCollectionTile object={data.object} current={data.current} onOpen={data.onOpen} onDelete={data.onDelete} />
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
type TypeCollectionTileProps = TileData;
|
|
105
|
+
|
|
106
|
+
/** Selectable header-only card for a single object. */
|
|
107
|
+
const TypeCollectionTile = ({ object, current, onOpen, onDelete }: TypeCollectionTileProps) => {
|
|
108
|
+
const { t } = useTranslation(meta.profile.key);
|
|
109
|
+
// Subscribe so the label re-renders when the object changes.
|
|
110
|
+
const [live] = useObject(object);
|
|
111
|
+
// Mirror the app-graph label: the object's own label, else the type-scoped placeholder
|
|
112
|
+
// (e.g. "New video" lives in the type's namespace, not the space plugin's).
|
|
113
|
+
const typename = Obj.getTypename(live);
|
|
114
|
+
const label =
|
|
115
|
+
Obj.getLabel(live) ||
|
|
116
|
+
t('object-name.placeholder', { ns: typename ?? meta.profile.key, defaultValue: t('object-name.placeholder') });
|
|
117
|
+
|
|
118
|
+
const iconAnnotation = Obj.getIcon(live);
|
|
119
|
+
const icon = iconAnnotation?.icon ?? 'ph--circle-dashed--regular';
|
|
120
|
+
const iconStyles = iconAnnotation?.hue ? getStyles(iconAnnotation.hue) : undefined;
|
|
121
|
+
|
|
122
|
+
// Render a content preview body only for types that opt in via `CardAnnotation`.
|
|
123
|
+
const type = Obj.getType(object);
|
|
124
|
+
const showCardContent =
|
|
125
|
+
!!type && Option.getOrElse(AppAnnotation.CardAnnotation.get(Type.getSchema(type)), () => false);
|
|
126
|
+
const cardData = useMemo<AppSurface.ObjectCardData>(() => ({ subject: object }), [object]);
|
|
127
|
+
|
|
128
|
+
// `Focus.Item` calls `onCurrentChange` on click and on Enter.
|
|
129
|
+
const handleCurrentChange = useCallback(() => onOpen(object), [onOpen, object]);
|
|
130
|
+
|
|
131
|
+
const menuItems = useMemo(
|
|
132
|
+
() => [
|
|
133
|
+
...(onDelete
|
|
134
|
+
? [
|
|
135
|
+
{
|
|
136
|
+
label: t('delete-object.label', {
|
|
137
|
+
ns: typename ?? meta.profile.key,
|
|
138
|
+
defaultValue: t('delete-object.label'),
|
|
139
|
+
}),
|
|
140
|
+
onClick: () => onDelete?.(object),
|
|
141
|
+
},
|
|
142
|
+
]
|
|
143
|
+
: []),
|
|
144
|
+
],
|
|
145
|
+
[t, typename, onDelete, object],
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<Focus.Item asChild current={current} onCurrentChange={handleCurrentChange}>
|
|
150
|
+
<Card.Root fullWidth classNames={['dx-hover cursor-pointer', current && 'dx-current']}>
|
|
151
|
+
<Card.Header>
|
|
152
|
+
<Card.Block>
|
|
153
|
+
<Icon icon={icon} classNames={iconStyles?.text} />
|
|
154
|
+
</Card.Block>
|
|
155
|
+
<Card.Title>{label}</Card.Title>
|
|
156
|
+
{menuItems.length > 0 && <Card.Menu items={menuItems} />}
|
|
157
|
+
</Card.Header>
|
|
158
|
+
{showCardContent && <Surface.Surface type={AppSurface.CardContent} data={cardData} limit={1} />}
|
|
159
|
+
</Card.Root>
|
|
160
|
+
</Focus.Item>
|
|
161
|
+
);
|
|
162
|
+
};
|
package/src/containers/index.ts
CHANGED
|
@@ -5,25 +5,29 @@
|
|
|
5
5
|
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export type { CreateObjectDialogProps } from './CreateObjectDialog';
|
|
8
|
+
export type { RenameSubject } from './RenamePopover';
|
|
8
9
|
|
|
9
10
|
export const CollectionArticle: ComponentType<any> = lazy(() => import('./CollectionArticle'));
|
|
10
11
|
export const CollectionSection: ComponentType<any> = lazy(() => import('./CollectionSection'));
|
|
11
12
|
export const CreateObjectDialog: ComponentType<any> = lazy(() => import('./CreateObjectDialog'));
|
|
12
13
|
export const CreateSpaceDialog: ComponentType<any> = lazy(() => import('./CreateSpaceDialog'));
|
|
14
|
+
export const DefaultProperties: ComponentType<any> = lazy(() => import('./DefaultProperties'));
|
|
13
15
|
export const ImportSpaceDialog: ComponentType<any> = lazy(() => import('./ImportSpaceDialog'));
|
|
14
16
|
export const InlineSyncStatus: ComponentType<any> = lazy(() => import('./InlineSyncStatus'));
|
|
15
17
|
export const JoinDialog: ComponentType<any> = lazy(() => import('./JoinDialog'));
|
|
16
18
|
export const MembersContainer: ComponentType<any> = lazy(() => import('./MembersContainer'));
|
|
17
19
|
export const MenuFooter: ComponentType<any> = lazy(() => import('./MenuFooter'));
|
|
18
20
|
export const ObjectCardStack: ComponentType<any> = lazy(() => import('./ObjectCardStack'));
|
|
19
|
-
export const ObjectProperties: ComponentType<any> = lazy(() => import('./ObjectProperties'));
|
|
20
|
-
export const EntityRenamePopover: ComponentType<any> = lazy(() => import('./EntityRenamePopover'));
|
|
21
21
|
export const RecordArticle: ComponentType<any> = lazy(() => import('./RecordArticle'));
|
|
22
22
|
export const RelatedArticle: ComponentType<any> = lazy(() => import('./RelatedArticle'));
|
|
23
|
+
export const RenamePopover: ComponentType<any> = lazy(() => import('./RenamePopover'));
|
|
23
24
|
export const SchemaContainer: ComponentType<any> = lazy(() => import('./SchemaContainer'));
|
|
24
25
|
export const SmallPresenceLive: ComponentType<any> = lazy(() => import('./SmallPresenceLive'));
|
|
25
26
|
export const SpacePresence: ComponentType<any> = lazy(() => import('./SpacePresence'));
|
|
26
|
-
export const
|
|
27
|
+
export const SpaceHomeArticle: ComponentType<any> = lazy(() => import('./SpaceHomeArticle'));
|
|
28
|
+
export const SpaceHomeRecent: ComponentType<any> = lazy(() => import('./SpaceHomeRecent'));
|
|
29
|
+
export const SpaceSettings: ComponentType<any> = lazy(() => import('./SpaceSettings'));
|
|
27
30
|
export const SpaceSettingsContainer: ComponentType<any> = lazy(() => import('./SpaceSettingsContainer'));
|
|
28
31
|
export const SyncStatus: ComponentType<any> = lazy(() => import('./SyncStatus'));
|
|
32
|
+
export const TypeCollectionArticle: ComponentType<any> = lazy(() => import('./TypeCollectionArticle'));
|
|
29
33
|
export const ViewEditor: ComponentType<any> = lazy(() => import('./ViewEditor'));
|
package/src/errors.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { BaseError } from '@dxos/errors';
|
|
6
|
+
|
|
7
|
+
/** Space invitations authenticate against a local HALO identity; there is nothing to redeem without one. */
|
|
8
|
+
export class NoIdentityError extends BaseError.extend(
|
|
9
|
+
'NoIdentityError',
|
|
10
|
+
'A local identity is required to accept a space invitation.',
|
|
11
|
+
) {}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface, usePluginManager } from '@dxos/app-framework/ui';
|
|
8
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
9
|
import { type FormFieldProvider } from '@dxos/react-ui-form';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -25,8 +26,8 @@ export const useInputSurfaceLookup = (baseData?: Record<string, any>): FormField
|
|
|
25
26
|
...baseData,
|
|
26
27
|
};
|
|
27
28
|
const { type: _fieldPropertyAstExcluded, ...surfaceFieldProps } = fieldProps as Record<string, any>;
|
|
28
|
-
if (Surface.isAvailable(pluginManager.capabilities, {
|
|
29
|
-
return <Surface.Surface
|
|
29
|
+
if (Surface.isAvailable(pluginManager.capabilities, { type: AppSurface.FormInput, data })) {
|
|
30
|
+
return <Surface.Surface type={AppSurface.FormInput} data={data} {...surfaceFieldProps} />;
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
[pluginManager, baseData],
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
5
6
|
import { useMemo } from 'react';
|
|
6
7
|
|
|
7
|
-
import { type Database, Entity, Filter, Obj, Ref, Relation } from '@dxos/echo';
|
|
8
|
+
import { type Database, Entity, Filter, Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
9
|
+
import { HiddenAnnotation } from '@dxos/echo/Annotation';
|
|
8
10
|
import { useQuery } from '@dxos/react-client/echo';
|
|
9
11
|
import { isNonNullable } from '@dxos/util';
|
|
10
12
|
|
|
@@ -74,6 +76,16 @@ export const useRelatedObjects = (
|
|
|
74
76
|
// TODO(burdon): Configure.
|
|
75
77
|
.filter((obj) => Entity.getTypename(obj) !== 'org.dxos.type.text')
|
|
76
78
|
.filter((obj) => Entity.getTypename(obj) !== 'org.dxos.type.assistant.chat')
|
|
79
|
+
.filter((obj) => {
|
|
80
|
+
if (!Obj.isObject(obj)) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
const typeEntity = Obj.getType(obj);
|
|
84
|
+
if (!typeEntity) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return !HiddenAnnotation.get(Type.getSchema(typeEntity)).pipe(Option.getOrElse(() => false));
|
|
88
|
+
})
|
|
77
89
|
);
|
|
78
90
|
}, [subject, objects, options.references, options.relations]);
|
|
79
91
|
};
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -3,32 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
-
import { trim } from '@dxos/util';
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
key: DXN.make('org.dxos.plugin.space'),
|
|
11
|
-
name: 'Spaces',
|
|
12
|
-
author: 'DXOS',
|
|
13
|
-
spec: 'PLUGIN.mdl',
|
|
14
|
-
description: trim`
|
|
15
|
-
SpacePlugin is the core workspace container for DXOS Composer. It owns the full lifecycle of
|
|
16
|
-
collaborative spaces — creating, joining, opening, closing, and resetting them — and manages
|
|
17
|
-
the membership and invitation system that controls who can access each space.
|
|
7
|
+
import config from '../dx.config';
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
so that opening a space or object updates the layout, and tracks real-time peer presence so
|
|
21
|
-
that the UI can show which collaborators are viewing each object.
|
|
22
|
-
|
|
23
|
-
Object and schema management sit at the heart of SpacePlugin: it registers the canonical DXOS
|
|
24
|
-
schema types (Person, Task, Project, Event, …), provides the create-object dialog that all
|
|
25
|
-
other plugins populate with their own types, and exposes operations for adding, removing,
|
|
26
|
-
restoring, duplicating, and serialising objects. Import/export of space archives and schema
|
|
27
|
-
migrations are also handled here.
|
|
28
|
-
|
|
29
|
-
A full set of undo-aware operations (RemoveObjects/RestoreObjects, DeleteField/RestoreField)
|
|
30
|
-
integrates with the process manager so that destructive edits can be reversed in one step.
|
|
31
|
-
`,
|
|
32
|
-
icon: 'ph--planet--regular',
|
|
33
|
-
tags: ['system'],
|
|
34
|
-
});
|
|
9
|
+
export const meta = Plugin.getMetaFromConfig(config);
|
|
@@ -3,16 +3,9 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
import * as Option from 'effect/Option';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CollectionModel,
|
|
8
|
-
getCollectionsPath,
|
|
9
|
-
getObjectPath,
|
|
10
|
-
getTypePath,
|
|
11
|
-
getTypeSlug,
|
|
12
|
-
getTypeSlugFromUri,
|
|
13
|
-
} from '@dxos/app-toolkit';
|
|
6
|
+
import { AppNode, CollectionModel, Paths } from '@dxos/app-toolkit';
|
|
14
7
|
import { Operation } from '@dxos/compute';
|
|
15
|
-
import {
|
|
8
|
+
import { Database, Filter, Obj, Query, Scope, Type } from '@dxos/echo';
|
|
16
9
|
import { invariant } from '@dxos/invariant';
|
|
17
10
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
18
11
|
import { ViewAnnotation, getTypeURIFromQuery } from '@dxos/schema';
|
|
@@ -30,7 +23,6 @@ const handler: Operation.WithHandler<typeof SpaceOperation.AddObject> = SpaceOpe
|
|
|
30
23
|
yield* CollectionModel.add({
|
|
31
24
|
object,
|
|
32
25
|
target: Database.isDatabase(target) ? undefined : target,
|
|
33
|
-
hidden: input.hidden,
|
|
34
26
|
}).pipe(Effect.provide(Database.layer(db)));
|
|
35
27
|
|
|
36
28
|
const typename = Obj.getTypename(object)!;
|
|
@@ -62,14 +54,15 @@ const handler: Operation.WithHandler<typeof SpaceOperation.AddObject> = SpaceOpe
|
|
|
62
54
|
// Graph type nodes are keyed by a slash-free slug (entity id for stored types, typename for
|
|
63
55
|
// static); resolve the object's own type slug rather than filing it under its (human) typename.
|
|
64
56
|
const objectType = Obj.getType(object);
|
|
65
|
-
const typeSlug = objectType ? getTypeSlug(objectType) : typename;
|
|
57
|
+
const typeSlug = objectType ? Paths.getTypeSlug(objectType) : typename;
|
|
66
58
|
const subject = getSubjectPathForNewObject({
|
|
67
59
|
spaceId: db.spaceId,
|
|
68
60
|
objectId: object.id,
|
|
69
61
|
nodeId: input.targetNodeId,
|
|
62
|
+
object,
|
|
70
63
|
typename,
|
|
71
64
|
typeSlug,
|
|
72
|
-
viewTargetSlug: viewTargetUri ? getTypeSlugFromUri(viewTargetUri) : undefined,
|
|
65
|
+
viewTargetSlug: viewTargetUri ? Paths.getTypeSlugFromUri(viewTargetUri) : undefined,
|
|
73
66
|
});
|
|
74
67
|
|
|
75
68
|
return {
|
|
@@ -86,21 +79,22 @@ const getSubjectPathForNewObject = (props: {
|
|
|
86
79
|
spaceId: string;
|
|
87
80
|
objectId: string;
|
|
88
81
|
nodeId?: string;
|
|
82
|
+
object: Obj.Unknown;
|
|
89
83
|
typename: string;
|
|
90
84
|
/** Slug of the object's own type ({@link getTypeSlug}) — keys the `types/<slug>` node it files under. */
|
|
91
85
|
typeSlug: string;
|
|
92
86
|
/** Slug of the view holder's target type, when the object is a view holder. */
|
|
93
87
|
viewTargetSlug?: string;
|
|
94
88
|
}): string => {
|
|
95
|
-
const { nodeId,
|
|
89
|
+
const { nodeId, object, typeSlug, viewTargetSlug, spaceId, objectId } = props;
|
|
96
90
|
if (typeof nodeId === 'string') {
|
|
97
|
-
return
|
|
91
|
+
return Paths.getCollectionObjectPath(nodeId, objectId);
|
|
98
92
|
}
|
|
99
|
-
if (
|
|
100
|
-
return getCollectionsPath(spaceId, objectId);
|
|
93
|
+
if (AppNode.isCollectionItem(object)) {
|
|
94
|
+
return Paths.getCollectionsPath(spaceId, objectId);
|
|
101
95
|
}
|
|
102
96
|
if (viewTargetSlug) {
|
|
103
|
-
return getTypePath(spaceId, viewTargetSlug, objectId);
|
|
97
|
+
return Paths.getTypePath(spaceId, viewTargetSlug, objectId);
|
|
104
98
|
}
|
|
105
|
-
return getObjectPath(spaceId, typeSlug, objectId);
|
|
99
|
+
return Paths.getObjectPath(spaceId, typeSlug, objectId);
|
|
106
100
|
};
|
|
@@ -7,7 +7,7 @@ import { Operation } from '@dxos/compute';
|
|
|
7
7
|
import { Type } from '@dxos/echo';
|
|
8
8
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { SpaceCapabilities, SpaceEvents } from '../types';
|
|
11
11
|
import { SpaceOperation } from './definitions';
|
|
12
12
|
|
|
13
13
|
const handler: Operation.WithHandler<typeof SpaceOperation.AddType> = SpaceOperation.AddType.pipe(
|
package/src/operations/create.ts
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
5
|
import { Capability, Plugin } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { AppAnnotation } from '@dxos/app-toolkit';
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Annotation, Collection, Obj, Ref } from '@dxos/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
10
10
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
11
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
12
12
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
13
13
|
import { iconValues } from '@dxos/react-ui-pickers/icons';
|
|
14
14
|
import { hues } from '@dxos/ui-theme';
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { SpaceCapabilities, SpaceEvents } from '../types';
|
|
17
17
|
import { SpaceOperation } from './definitions';
|
|
18
18
|
import { SpaceOperationConfig } from './helpers';
|
|
19
19
|
|
|
@@ -37,7 +37,7 @@ const handler: Operation.WithHandler<typeof SpaceOperation.Create> = SpaceOperat
|
|
|
37
37
|
|
|
38
38
|
const collection = Obj.make(Collection.Collection, { objects: [] });
|
|
39
39
|
Obj.update(space.properties, (properties) => {
|
|
40
|
-
Annotation.set(properties, RootCollectionAnnotation, Ref.make(collection));
|
|
40
|
+
Annotation.set(properties, AppAnnotation.RootCollectionAnnotation, Ref.make(collection));
|
|
41
41
|
if (Migrations.targetVersion) {
|
|
42
42
|
Annotation.set(properties, MigrationVersionAnnotation, Migrations.targetVersion);
|
|
43
43
|
}
|
|
@@ -8,7 +8,7 @@ import { Capability, Plugin } from '@dxos/app-framework';
|
|
|
8
8
|
import { SpaceSchema } from '@dxos/client/echo';
|
|
9
9
|
import { CancellableInvitationObservable, Invitation } from '@dxos/client/invitations';
|
|
10
10
|
import { Operation } from '@dxos/compute';
|
|
11
|
-
import { Collection, Database, Entity, Obj, QueryAST, Type, View
|
|
11
|
+
import { Collection, Database, DXN, Entity, Obj, QueryAST, Type, View } from '@dxos/echo';
|
|
12
12
|
import { SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
|
|
13
13
|
|
|
14
14
|
import { meta } from '#meta';
|
|
@@ -30,7 +30,7 @@ export namespace CollectionOperation {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const makeKey = (name: string) => DXN.make(`${meta.
|
|
33
|
+
const makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Operations for the Space plugin.
|
|
@@ -168,7 +168,6 @@ export namespace SpaceOperation {
|
|
|
168
168
|
target: Schema.Union(Database.Database, Type.getSchema(Collection.Collection)).annotations({
|
|
169
169
|
description: 'The database or collection to add to.',
|
|
170
170
|
}),
|
|
171
|
-
hidden: Schema.optional(Schema.Boolean),
|
|
172
171
|
targetNodeId: Schema.optional(
|
|
173
172
|
Schema.String.annotations({ description: 'Qualified graph node ID of the target collection.' }),
|
|
174
173
|
),
|
|
@@ -7,4 +7,4 @@ export type SpaceOperationConfig = {
|
|
|
7
7
|
observability: boolean;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
export const SpaceOperationConfig = Capability.make<SpaceOperationConfig>('org.dxos.plugin.space.
|
|
10
|
+
export const SpaceOperationConfig = Capability.make<SpaceOperationConfig>('org.dxos.plugin.space.operationConfig');
|
package/src/operations/join.ts
CHANGED
|
@@ -2,16 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
5
6
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
6
7
|
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
|
+
|
|
10
|
+
import { meta } from '#meta';
|
|
7
11
|
|
|
8
12
|
import { JOIN_DIALOG } from '../constants';
|
|
9
13
|
import { type JoinDialogProps } from '../containers/JoinDialog';
|
|
14
|
+
import { NoIdentityError } from '../errors';
|
|
10
15
|
import { SpaceOperation } from './definitions';
|
|
11
16
|
|
|
12
17
|
const handler: Operation.WithHandler<typeof SpaceOperation.Join> = SpaceOperation.Join.pipe(
|
|
13
18
|
Operation.withHandler(
|
|
14
19
|
Effect.fnUntraced(function* (input) {
|
|
20
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
21
|
+
if (!client.halo.identity.get()) {
|
|
22
|
+
// Space invitations authenticate against a local identity; there is nothing to redeem without one.
|
|
23
|
+
yield* Effect.ignore(
|
|
24
|
+
Operation.invoke(LayoutOperation.AddToast, {
|
|
25
|
+
id: `${meta.profile.key}.join-no-identity`,
|
|
26
|
+
icon: 'ph--warning--regular',
|
|
27
|
+
title: ['join-no-identity-toast.title', { ns: meta.profile.key }],
|
|
28
|
+
closeLabel: ['dismiss.label', { ns: meta.profile.key }],
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
31
|
+
return yield* Effect.fail(new NoIdentityError());
|
|
32
|
+
}
|
|
33
|
+
|
|
15
34
|
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
16
35
|
subject: JOIN_DIALOG,
|
|
17
36
|
blockAlign: 'start',
|
|
@@ -7,7 +7,7 @@ import { Capabilities } from '@dxos/app-framework';
|
|
|
7
7
|
import { SpaceState } from '@dxos/client/echo';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { Annotation } from '@dxos/echo';
|
|
10
|
-
import {
|
|
10
|
+
import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
11
11
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
12
12
|
|
|
13
13
|
import { SpaceCapabilities } from '../types';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
|
-
import { LayoutOperation,
|
|
5
|
+
import { LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
6
6
|
import { Operation } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
import { SpaceOperation } from './definitions';
|
|
@@ -11,8 +11,8 @@ const handler: Operation.WithHandler<typeof SpaceOperation.OpenMembers> = SpaceO
|
|
|
11
11
|
Operation.withHandler(
|
|
12
12
|
Effect.fnUntraced(function* (input) {
|
|
13
13
|
yield* Operation.invoke(LayoutOperation.Open, {
|
|
14
|
-
subject: [
|
|
15
|
-
workspace: getSpacePath(input.space.id),
|
|
14
|
+
subject: [Paths.getSpacePath(input.space.id, 'settings')],
|
|
15
|
+
workspace: Paths.getSpacePath(input.space.id),
|
|
16
16
|
});
|
|
17
17
|
}),
|
|
18
18
|
),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
|
-
import { LayoutOperation,
|
|
5
|
+
import { LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
6
6
|
import { Operation } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
import { SpaceOperation } from './definitions';
|
|
@@ -11,8 +11,8 @@ const handler: Operation.WithHandler<typeof SpaceOperation.OpenSettings> = Space
|
|
|
11
11
|
Operation.withHandler(
|
|
12
12
|
Effect.fnUntraced(function* (input) {
|
|
13
13
|
yield* Operation.invoke(LayoutOperation.Open, {
|
|
14
|
-
subject: [
|
|
15
|
-
workspace: getSpacePath(input.space.id),
|
|
14
|
+
subject: [Paths.getSpacePath(input.space.id, 'settings', 'general')],
|
|
15
|
+
workspace: Paths.getSpacePath(input.space.id),
|
|
16
16
|
});
|
|
17
17
|
}),
|
|
18
18
|
),
|