@dxos/plugin-space 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/{CreateObjectDialog-4VMOUKM7.mjs → CreateObjectDialog-5454N3FJ.mjs} +22 -7
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +7 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +58 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-QZGNRJ4P.mjs → JoinDialog-ATNUCNL2.mjs} +7 -31
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +7 -0
- package/dist/lib/neutral/{MembersContainer-OWCAMBKS.mjs → MembersContainer-C4ZTP6ZW.mjs} +9 -5
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +7 -0
- package/dist/lib/neutral/{MenuFooter-QCNFUIAO.mjs → MenuFooter-FWE5LFM4.mjs} +3 -3
- package/dist/lib/neutral/{RelatedArticle-YRCRBIYU.mjs → RelatedArticle-Z777WVDW.mjs} +1 -2
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +7 -0
- package/dist/lib/neutral/{RenamePopover-XBZAKNM7.mjs → RenamePopover-AZT2KPOF.mjs} +13 -5
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +7 -0
- package/dist/lib/neutral/{SchemaContainer-2NK5YB5O.mjs → SchemaContainer-4GJKQBXM.mjs} +8 -4
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +7 -0
- package/dist/lib/neutral/{SmallPresenceLive-L4H7WJOA.mjs → SmallPresenceLive-FW3AMEY5.mjs} +2 -2
- package/dist/lib/neutral/{SpaceHomeArticle-ZV7EERLS.mjs → SpaceHomeArticle-Y47TLZ72.mjs} +2 -2
- package/dist/lib/neutral/{SpaceHomeArticle-ZV7EERLS.mjs.map → SpaceHomeArticle-Y47TLZ72.mjs.map} +1 -1
- package/dist/lib/neutral/{SpaceHomeRecent-ZR4LIIUD.mjs → SpaceHomeRecent-S57AO3EV.mjs} +11 -5
- package/dist/lib/neutral/{SpaceHomeRecent-ZR4LIIUD.mjs.map → SpaceHomeRecent-S57AO3EV.mjs.map} +3 -3
- package/dist/lib/neutral/SpacePlugin.mjs +1 -1
- package/dist/lib/neutral/{SpacePresence-PDTEDHDE.mjs → SpacePresence-T37WH43Y.mjs} +2 -2
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs +60 -0
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs.map +7 -0
- package/dist/lib/neutral/{SpaceSettingsContainer-QAFQ4LWC.mjs → SpaceSettingsContainer-72CJWELM.mjs} +39 -36
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +7 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +143 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +7 -0
- package/dist/lib/neutral/{add-object-S64XELC3.mjs → add-object-H2N4AOQJ.mjs} +10 -10
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +7 -0
- package/dist/lib/neutral/{add-relation-GWSE42BU.mjs → add-relation-BGTLART5.mjs} +3 -3
- package/dist/lib/neutral/{add-type-C3KYE6PI.mjs → add-type-JIDLRANR.mjs} +3 -3
- package/dist/lib/neutral/{add-type-C3KYE6PI.mjs.map → add-type-JIDLRANR.mjs.map} +1 -1
- package/dist/lib/neutral/{app-graph-builder-TMAD2ZTH.mjs → app-graph-builder-7H2KOD4B.mjs} +187 -163
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +9 -9
- package/dist/lib/neutral/capabilities/node.mjs +2 -2
- package/dist/lib/neutral/{chunk-PSCIOT7Q.mjs → chunk-52ASDNRA.mjs} +2 -3
- package/dist/lib/neutral/{chunk-PSCIOT7Q.mjs.map → chunk-52ASDNRA.mjs.map} +3 -3
- package/dist/lib/neutral/{chunk-2RPQHHD7.mjs → chunk-C2ULK22J.mjs} +1 -1
- package/dist/lib/neutral/{chunk-DSYEB2UN.mjs → chunk-F5KLUP2P.mjs} +7 -2
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-F2VJ6VBV.mjs → chunk-LMUG6PEJ.mjs} +3 -4
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-2LTGSUGQ.mjs → chunk-RAAHDTVF.mjs} +8 -4
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-LY6XK5MV.mjs → chunk-SPWAMXNR.mjs} +2 -2
- package/dist/lib/neutral/{chunk-LY6XK5MV.mjs.map → chunk-SPWAMXNR.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-U5WTDOMV.mjs +8 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs +9 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs.map +7 -0
- package/dist/lib/neutral/{close-YZHFYPUN.mjs → close-5WEQZRNK.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +18 -19
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/constants.mjs +16 -0
- package/dist/lib/neutral/constants.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +18 -14
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-XKU2W6QC.mjs → create-QZ47FHQU.mjs} +4 -4
- package/dist/lib/neutral/{create-XKU2W6QC.mjs.map → create-QZ47FHQU.mjs.map} +3 -3
- package/dist/lib/neutral/{create-object-22WUOWZQ.mjs → create-object-ZU6FZW5X.mjs} +1 -6
- package/dist/lib/neutral/create-object-ZU6FZW5X.mjs.map +7 -0
- package/dist/lib/neutral/{delete-EFM7CAVO.mjs → delete-SPCU2VFM.mjs} +3 -3
- package/dist/lib/neutral/{delete-field-ONAPFFO5.mjs → delete-field-TAKJVEAD.mjs} +3 -3
- package/dist/lib/neutral/{duplicate-object-OJRPFV5I.mjs → duplicate-object-BUPZOO6S.mjs} +3 -3
- package/dist/lib/neutral/{export-space-M5RNVUQX.mjs → export-space-S5SCAL4M.mjs} +3 -3
- package/dist/lib/neutral/{get-share-link-FUQBJPSQ.mjs → get-share-link-CLM5IQRL.mjs} +3 -3
- package/dist/lib/neutral/{identity-created-QMV4DANW.mjs → identity-created-BEYMLBK4.mjs} +2 -2
- package/dist/lib/neutral/{identity-created-QMV4DANW.mjs.map → identity-created-BEYMLBK4.mjs.map} +3 -3
- package/dist/lib/neutral/{import-space-L3AUIARM.mjs → import-space-LJQK3KT7.mjs} +3 -3
- package/dist/lib/neutral/index.mjs +7 -3
- package/dist/lib/neutral/join-FSODYIOC.mjs +54 -0
- package/dist/lib/neutral/join-FSODYIOC.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{migrate-WPUISBC4.mjs → migrate-WHM6LU7L.mjs} +4 -4
- package/dist/lib/neutral/{migrate-WPUISBC4.mjs.map → migrate-WHM6LU7L.mjs.map} +3 -3
- package/dist/lib/neutral/{navigation-handler-IKXZGMII.mjs → navigation-handler-ZF7MV2HL.mjs} +16 -10
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +7 -0
- package/dist/lib/neutral/{navigation-resolver-VBPGMFCE.mjs → navigation-resolver-KBESOSWU.mjs} +5 -5
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +7 -0
- package/dist/lib/neutral/{open-RRYULTSY.mjs → open-JCXTL3SK.mjs} +3 -3
- package/dist/lib/neutral/{open-create-object-BRUVFZSY.mjs → open-create-object-WAIAU7TA.mjs} +6 -6
- package/dist/lib/neutral/{open-create-space-ARLQWW65.mjs → open-create-space-VU47FWPZ.mjs} +6 -6
- package/dist/lib/neutral/{open-import-space-65H57JXX.mjs → open-import-space-GUHIEWYB.mjs} +6 -6
- package/dist/lib/neutral/{open-members-677P6KD3.mjs → open-members-MLLBHKUU.mjs} +3 -3
- package/dist/lib/neutral/{open-settings-PRBSGO6D.mjs → open-settings-DTPZF4U4.mjs} +3 -3
- package/dist/lib/neutral/operations/index.mjs +3 -3
- package/dist/lib/neutral/plugin.mjs +3 -3
- package/dist/lib/neutral/{react-surface-5EQ6X4CL.mjs → react-surface-LRA7GIFN.mjs} +33 -14
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +7 -0
- package/dist/lib/neutral/{remove-objects-PWJJI36V.mjs → remove-objects-WEO66EDS.mjs} +3 -3
- package/dist/lib/neutral/{rename-4727PKI4.mjs → rename-Q6UNCBIM.mjs} +6 -6
- package/dist/lib/neutral/{rename-object-FXUAB5FN.mjs → rename-object-2UCEGU7U.mjs} +6 -6
- package/dist/lib/neutral/{restore-field-3ICSIHGA.mjs → restore-field-6CQAFOXY.mjs} +3 -3
- package/dist/lib/neutral/{restore-objects-V2BTEWN3.mjs → restore-objects-3VINLP7C.mjs} +3 -3
- package/dist/lib/neutral/{share-ZOZPAUGI.mjs → share-A4WPILNF.mjs} +3 -3
- package/dist/lib/neutral/{snapshot-ZC5PU55W.mjs → snapshot-HBYMAPA7.mjs} +3 -3
- package/dist/lib/neutral/{spaces-ready-EXPCJD4N.mjs → spaces-ready-GWMSU72V.mjs} +4 -4
- package/dist/lib/neutral/{spaces-ready-EXPCJD4N.mjs.map → spaces-ready-GWMSU72V.mjs.map} +3 -3
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +14 -6
- package/dist/lib/neutral/translations.mjs.map +2 -2
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/lib/neutral/{wait-for-object-WURK2SLQ.mjs → wait-for-object-U6P2NNWY.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +15 -33
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts +15 -33
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts +3 -2
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts +1 -4
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts +17 -4
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -33
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -5
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +1 -2
- package/dist/types/src/capabilities/repair.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -3
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -13
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts +2 -3
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
- package/dist/types/src/components/ForeignKeys/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts +15 -0
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts.map +1 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts +2 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +5 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/index.d.ts +1 -1
- package/dist/types/src/containers/RenamePopover/index.d.ts.map +1 -1
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +122 -52
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts +11 -0
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts +123 -53
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +122 -52
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +122 -52
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts +16 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +33 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +9 -37
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/join.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +122 -52
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +3 -1
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -59
- package/src/SpacePlugin.ts +3 -3
- package/src/capabilities/app-graph-builder/extensions/collections.ts +45 -52
- package/src/capabilities/app-graph-builder/extensions/companions.ts +3 -2
- package/src/capabilities/app-graph-builder/extensions/database.ts +108 -84
- package/src/capabilities/app-graph-builder/extensions/settings.ts +8 -5
- package/src/capabilities/app-graph-builder/extensions/shared.test.ts +13 -9
- package/src/capabilities/app-graph-builder/extensions/shared.ts +2 -5
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +32 -6
- package/src/capabilities/create-object.ts +0 -5
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +14 -4
- package/src/capabilities/navigation-resolver.ts +8 -8
- package/src/capabilities/react-surface.tsx +39 -13
- package/src/capabilities/spaces-ready.ts +1 -1
- package/src/components/ForeignKeys/ForeignKeys.tsx +20 -19
- package/src/components/index.ts +3 -3
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +38 -3
- package/src/containers/DefaultProperties/DefaultProperties.tsx +69 -0
- package/src/containers/DefaultProperties/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +8 -21
- package/src/containers/MembersContainer/MembersContainer.tsx +37 -33
- package/src/containers/RelatedArticle/RelatedArticle.tsx +1 -2
- package/src/containers/RenamePopover/RenamePopover.tsx +18 -5
- package/src/containers/RenamePopover/index.ts +1 -1
- package/src/containers/SchemaContainer/SchemaContainer.tsx +21 -17
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +1 -1
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +12 -10
- package/src/containers/SpacePresence/SpacePresence.tsx +22 -20
- package/src/containers/SpacePresence/index.ts +1 -1
- package/src/{components → containers}/SpaceSettings/SpaceSettings.stories.tsx +1 -1
- package/src/containers/SpaceSettings/SpaceSettings.tsx +75 -0
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +115 -106
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.tsx +116 -0
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.tsx +162 -0
- package/src/containers/TypeCollectionArticle/index.ts +5 -0
- package/src/containers/index.ts +4 -1
- package/src/errors.ts +11 -0
- package/src/index.ts +1 -0
- package/src/operations/add-object.ts +6 -5
- package/src/operations/add-type.ts +1 -1
- package/src/operations/create.ts +2 -2
- package/src/operations/definitions.ts +1 -2
- package/src/operations/join.ts +19 -0
- package/src/operations/migrate.ts +1 -1
- package/src/translations.ts +15 -6
- package/src/types/Settings.ts +10 -1
- package/src/types/capabilities.ts +1 -1
- package/src/util.ts +0 -1
- package/dist/lib/neutral/CreateObjectDialog-4VMOUKM7.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-QZGNRJ4P.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-OWCAMBKS.mjs.map +0 -7
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs +0 -33
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-YRCRBIYU.mjs.map +0 -7
- package/dist/lib/neutral/RenamePopover-XBZAKNM7.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-2NK5YB5O.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs +0 -37
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-QAFQ4LWC.mjs.map +0 -7
- package/dist/lib/neutral/add-object-S64XELC3.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-TMAD2ZTH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-2LTGSUGQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DSYEB2UN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F2VJ6VBV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-I5JXVBXX.mjs +0 -8
- package/dist/lib/neutral/create-object-22WUOWZQ.mjs.map +0 -7
- package/dist/lib/neutral/join-VY3QYBU7.mjs +0 -28
- package/dist/lib/neutral/join-VY3QYBU7.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-IKXZGMII.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-VBPGMFCE.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-5EQ6X4CL.mjs.map +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts +0 -8
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts +0 -10
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/index.d.ts +0 -2
- package/dist/types/src/containers/ObjectProperties/index.d.ts.map +0 -1
- package/src/components/SpaceSettings/SpaceSettings.tsx +0 -56
- package/src/containers/ObjectProperties/ObjectProperties.tsx +0 -32
- package/src/containers/ObjectProperties/index.ts +0 -5
- /package/dist/lib/neutral/{MenuFooter-QCNFUIAO.mjs.map → MenuFooter-FWE5LFM4.mjs.map} +0 -0
- /package/dist/lib/neutral/{SmallPresenceLive-L4H7WJOA.mjs.map → SmallPresenceLive-FW3AMEY5.mjs.map} +0 -0
- /package/dist/lib/neutral/{SpacePresence-PDTEDHDE.mjs.map → SpacePresence-T37WH43Y.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-relation-GWSE42BU.mjs.map → add-relation-BGTLART5.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-2RPQHHD7.mjs.map → chunk-C2ULK22J.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-I5JXVBXX.mjs.map → chunk-U5WTDOMV.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-YZHFYPUN.mjs.map → close-5WEQZRNK.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-EFM7CAVO.mjs.map → delete-SPCU2VFM.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-field-ONAPFFO5.mjs.map → delete-field-TAKJVEAD.mjs.map} +0 -0
- /package/dist/lib/neutral/{duplicate-object-OJRPFV5I.mjs.map → duplicate-object-BUPZOO6S.mjs.map} +0 -0
- /package/dist/lib/neutral/{export-space-M5RNVUQX.mjs.map → export-space-S5SCAL4M.mjs.map} +0 -0
- /package/dist/lib/neutral/{get-share-link-FUQBJPSQ.mjs.map → get-share-link-CLM5IQRL.mjs.map} +0 -0
- /package/dist/lib/neutral/{import-space-L3AUIARM.mjs.map → import-space-LJQK3KT7.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-RRYULTSY.mjs.map → open-JCXTL3SK.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-object-BRUVFZSY.mjs.map → open-create-object-WAIAU7TA.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-space-ARLQWW65.mjs.map → open-create-space-VU47FWPZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-import-space-65H57JXX.mjs.map → open-import-space-GUHIEWYB.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-members-677P6KD3.mjs.map → open-members-MLLBHKUU.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-settings-PRBSGO6D.mjs.map → open-settings-DTPZF4U4.mjs.map} +0 -0
- /package/dist/lib/neutral/{remove-objects-PWJJI36V.mjs.map → remove-objects-WEO66EDS.mjs.map} +0 -0
- /package/dist/lib/neutral/{rename-4727PKI4.mjs.map → rename-Q6UNCBIM.mjs.map} +0 -0
- /package/dist/lib/neutral/{rename-object-FXUAB5FN.mjs.map → rename-object-2UCEGU7U.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-field-3ICSIHGA.mjs.map → restore-field-6CQAFOXY.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-objects-V2BTEWN3.mjs.map → restore-objects-3VINLP7C.mjs.map} +0 -0
- /package/dist/lib/neutral/{share-ZOZPAUGI.mjs.map → share-A4WPILNF.mjs.map} +0 -0
- /package/dist/lib/neutral/{snapshot-ZC5PU55W.mjs.map → snapshot-HBYMAPA7.mjs.map} +0 -0
- /package/dist/lib/neutral/{wait-for-object-WURK2SLQ.mjs.map → wait-for-object-U6P2NNWY.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts +0 -0
- /package/src/{components → containers}/SpaceSettings/index.ts +0 -0
|
@@ -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,18 +5,19 @@
|
|
|
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
21
|
export const RecordArticle: ComponentType<any> = lazy(() => import('./RecordArticle'));
|
|
21
22
|
export const RelatedArticle: ComponentType<any> = lazy(() => import('./RelatedArticle'));
|
|
22
23
|
export const RenamePopover: ComponentType<any> = lazy(() => import('./RenamePopover'));
|
|
@@ -25,6 +26,8 @@ export const SmallPresenceLive: ComponentType<any> = lazy(() => import('./SmallP
|
|
|
25
26
|
export const SpacePresence: ComponentType<any> = lazy(() => import('./SpacePresence'));
|
|
26
27
|
export const SpaceHomeArticle: ComponentType<any> = lazy(() => import('./SpaceHomeArticle'));
|
|
27
28
|
export const SpaceHomeRecent: ComponentType<any> = lazy(() => import('./SpaceHomeRecent'));
|
|
29
|
+
export const SpaceSettings: ComponentType<any> = lazy(() => import('./SpaceSettings'));
|
|
28
30
|
export const SpaceSettingsContainer: ComponentType<any> = lazy(() => import('./SpaceSettingsContainer'));
|
|
29
31
|
export const SyncStatus: ComponentType<any> = lazy(() => import('./SyncStatus'));
|
|
32
|
+
export const TypeCollectionArticle: ComponentType<any> = lazy(() => import('./TypeCollectionArticle'));
|
|
30
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
|
+
) {}
|
package/src/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
import * as Option from 'effect/Option';
|
|
5
5
|
|
|
6
|
-
import { CollectionModel, Paths } from '@dxos/app-toolkit';
|
|
6
|
+
import { AppNode, CollectionModel, Paths } from '@dxos/app-toolkit';
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
|
-
import {
|
|
8
|
+
import { Database, Filter, Obj, Query, Scope, Type } from '@dxos/echo';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
11
|
import { ViewAnnotation, getTypeURIFromQuery } from '@dxos/schema';
|
|
@@ -23,7 +23,6 @@ const handler: Operation.WithHandler<typeof SpaceOperation.AddObject> = SpaceOpe
|
|
|
23
23
|
yield* CollectionModel.add({
|
|
24
24
|
object,
|
|
25
25
|
target: Database.isDatabase(target) ? undefined : target,
|
|
26
|
-
hidden: input.hidden,
|
|
27
26
|
}).pipe(Effect.provide(Database.layer(db)));
|
|
28
27
|
|
|
29
28
|
const typename = Obj.getTypename(object)!;
|
|
@@ -60,6 +59,7 @@ const handler: Operation.WithHandler<typeof SpaceOperation.AddObject> = SpaceOpe
|
|
|
60
59
|
spaceId: db.spaceId,
|
|
61
60
|
objectId: object.id,
|
|
62
61
|
nodeId: input.targetNodeId,
|
|
62
|
+
object,
|
|
63
63
|
typename,
|
|
64
64
|
typeSlug,
|
|
65
65
|
viewTargetSlug: viewTargetUri ? Paths.getTypeSlugFromUri(viewTargetUri) : undefined,
|
|
@@ -79,17 +79,18 @@ const getSubjectPathForNewObject = (props: {
|
|
|
79
79
|
spaceId: string;
|
|
80
80
|
objectId: string;
|
|
81
81
|
nodeId?: string;
|
|
82
|
+
object: Obj.Unknown;
|
|
82
83
|
typename: string;
|
|
83
84
|
/** Slug of the object's own type ({@link getTypeSlug}) — keys the `types/<slug>` node it files under. */
|
|
84
85
|
typeSlug: string;
|
|
85
86
|
/** Slug of the view holder's target type, when the object is a view holder. */
|
|
86
87
|
viewTargetSlug?: string;
|
|
87
88
|
}): string => {
|
|
88
|
-
const { nodeId,
|
|
89
|
+
const { nodeId, object, typeSlug, viewTargetSlug, spaceId, objectId } = props;
|
|
89
90
|
if (typeof nodeId === 'string') {
|
|
90
91
|
return Paths.getCollectionObjectPath(nodeId, objectId);
|
|
91
92
|
}
|
|
92
|
-
if (
|
|
93
|
+
if (AppNode.isCollectionItem(object)) {
|
|
93
94
|
return Paths.getCollectionsPath(spaceId, objectId);
|
|
94
95
|
}
|
|
95
96
|
if (viewTargetSlug) {
|
|
@@ -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
|
@@ -6,14 +6,14 @@ import { Capability, Plugin } from '@dxos/app-framework';
|
|
|
6
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
|
|
|
@@ -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';
|
|
@@ -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
|
),
|
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';
|
package/src/translations.ts
CHANGED
|
@@ -148,7 +148,7 @@ export const translations = [
|
|
|
148
148
|
'object.placeholder': 'Type a title here…',
|
|
149
149
|
'personal-space.label': 'Personal Space',
|
|
150
150
|
'spaces.label': 'Spaces',
|
|
151
|
-
'space-settings.label': '
|
|
151
|
+
'space-settings.label': 'Your spaces',
|
|
152
152
|
'space-settings.description':
|
|
153
153
|
'Per-space settings for properties, membership, integrations, and other space-specific objects.',
|
|
154
154
|
'save-files-to-directory.label': 'Save files to disk',
|
|
@@ -156,6 +156,7 @@ export const translations = [
|
|
|
156
156
|
'snapshot-by-schema.label': 'Snapshot of objects',
|
|
157
157
|
'rename-collection.label': 'Rename collection',
|
|
158
158
|
'rename-object.label': 'Rename object',
|
|
159
|
+
'delete-object.label': 'Delete object',
|
|
159
160
|
'duplicate-object.label': 'Duplicate object',
|
|
160
161
|
'object-deleted.label': 'Object deleted',
|
|
161
162
|
'objects-deleted.label': 'Objects deleted',
|
|
@@ -203,6 +204,7 @@ export const translations = [
|
|
|
203
204
|
'sync-status.title': 'Sync status',
|
|
204
205
|
'dismiss.label': 'Dismiss',
|
|
205
206
|
'join-success.label': 'Successfully joined space',
|
|
207
|
+
'join-no-identity-toast.title': 'Log in to accept this invitation',
|
|
206
208
|
'name.label': 'Name',
|
|
207
209
|
'name.placeholder': 'Name',
|
|
208
210
|
'object-properties.label': 'Properties',
|
|
@@ -227,7 +229,11 @@ export const translations = [
|
|
|
227
229
|
'expose-object.label': 'Expose in navtree',
|
|
228
230
|
'add-tag.label': 'Add tag',
|
|
229
231
|
'advanced-settings.label': 'Advanced',
|
|
232
|
+
'settings.show-hidden.label': 'Show hidden types',
|
|
233
|
+
'settings.show-hidden.description':
|
|
234
|
+
'Include types annotated as hidden (e.g. Tag, View, Feed) in the database section.',
|
|
230
235
|
'settings.space-list.label': 'Spaces',
|
|
236
|
+
'settings.space-list.description': 'Settings for each space you belong to.',
|
|
231
237
|
'settings.open-settings.label': 'Open settings',
|
|
232
238
|
'settings-panel.label': 'Open settings',
|
|
233
239
|
'related-actions.label': 'Related Actions',
|
|
@@ -264,9 +270,9 @@ export const translations = [
|
|
|
264
270
|
'hue.description': 'Color used to represent the space in the app.',
|
|
265
271
|
'edge-replication.description':
|
|
266
272
|
"Only change this if you know what you're doing. Disabling this will prevent the space from replicating through Composer's EDGE services, and relies solely on peer-to-peer sync.",
|
|
267
|
-
'space-
|
|
268
|
-
'space-
|
|
269
|
-
'copy-space-
|
|
273
|
+
'space-id.title': 'Space ID',
|
|
274
|
+
'space-id.description': 'The unique identifier for this space. Use this to connect external services.',
|
|
275
|
+
'copy-space-id.label': 'Copy space ID',
|
|
270
276
|
|
|
271
277
|
'space-controls.title': 'Space Controls',
|
|
272
278
|
'space-controls.description': 'Advanced controls for this space.',
|
|
@@ -299,9 +305,12 @@ export const translations = [
|
|
|
299
305
|
'sync-upload.label': 'Upload',
|
|
300
306
|
'sync-download.label': 'Download',
|
|
301
307
|
|
|
302
|
-
'
|
|
308
|
+
'nav-tree-group-content.label': 'Content',
|
|
309
|
+
'nav-tree-group-comm.label': 'Communications',
|
|
310
|
+
'nav-tree-group-system.label': 'System',
|
|
311
|
+
'database-section.label': 'Database',
|
|
303
312
|
'collections-section.label': 'Collections',
|
|
304
|
-
'type-collection-
|
|
313
|
+
'type-collection-empty.message': 'No objects of this type yet.',
|
|
305
314
|
|
|
306
315
|
'search.placeholder': 'Search…',
|
|
307
316
|
'auth-code.message': 'Authorization code',
|
package/src/types/Settings.ts
CHANGED
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
|
-
export const Settings = Schema.mutable(
|
|
9
|
+
export const Settings = Schema.mutable(
|
|
10
|
+
Schema.Struct({
|
|
11
|
+
showHidden: Schema.optional(
|
|
12
|
+
Schema.Boolean.annotations({
|
|
13
|
+
title: 'Show hidden types',
|
|
14
|
+
description: 'Include types annotated as hidden (e.g. Tag, View, Feed) in the database section.',
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
10
19
|
|
|
11
20
|
export interface Settings extends Schema.Schema.Type<typeof Settings> {}
|
|
@@ -50,7 +50,7 @@ export namespace SpaceCapabilities {
|
|
|
50
50
|
`${meta.profile.key}.capability.ephemeral-state`,
|
|
51
51
|
);
|
|
52
52
|
|
|
53
|
-
export type SettingsSection = { id: string; label: Label; position?: Position };
|
|
53
|
+
export type SettingsSection = { id: string; label: Label; position?: Position.Position };
|
|
54
54
|
export const SettingsSection = Capability.make<SettingsSection>(`${meta.profile.key}.capability.settings-section`);
|
|
55
55
|
|
|
56
56
|
export type OnCreateSpace = (params: {
|
package/src/util.ts
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/CreateObjectDialog/CreateObjectDialog.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';\nimport { AppSpace, LayoutOperation, TypeOptions } from '@dxos/app-toolkit';\nimport { PluginRegistryButton, useLayout } from '@dxos/app-toolkit/ui';\nimport { Operation } from '@dxos/compute';\nimport { Annotation, Collection, Database, Obj, Type } from '@dxos/echo';\nimport { EffectEx } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { useClient } from '@dxos/react-client';\nimport { useQuery, useSpaces } from '@dxos/react-client/echo';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { ViewAnnotation } from '@dxos/schema';\n\nimport { makeCreateObjectEntryForDatabaseType } from '#capabilities';\nimport { type CreateObjectOption, CreateObjectPanel, type CreateObjectPanelProps } from '#components';\nimport { meta } from '#meta';\nimport { SpaceCapabilities } from '#types';\n\nimport { getSpaceDisplayName } from '../../util';\n\nexport const CREATE_OBJECT_DIALOG = `${meta.profile.key}.CreateObjectDialog`;\n\nexport type CreateObjectDialogProps = Pick<CreateObjectPanelProps, 'target' | 'typename' | 'initialFormValues'> & {\n views?: boolean;\n onCreateObject?: (object: Obj.Unknown) => void;\n shouldNavigate?: (object: Obj.Unknown) => boolean;\n targetNodeId?: string;\n};\n\nexport const CreateObjectDialog = ({\n target: initialTarget,\n typename: initialTypename,\n views,\n initialFormValues,\n onCreateObject,\n shouldNavigate: _shouldNavigate,\n targetNodeId,\n}: CreateObjectDialogProps) => {\n const { t } = useTranslation(meta.profile.key);\n const manager = usePluginManager();\n const operationInvoker = useOperationInvoker();\n const { invoke } = operationInvoker;\n const [target, setTarget] = useState<Database.Database | Collection.Collection | undefined>(initialTarget);\n const [typename, setTypename] = useState<string | undefined>(initialTypename);\n const client = useClient();\n const spaces = useSpaces();\n const layout = useLayout();\n const closeRef = useRef<HTMLButtonElement | null>(null);\n\n const db = Database.isDatabase(target) ? target : target && Obj.getDatabase(target);\n const allTypes = useQuery(db, TypeOptions.allTypesQuery);\n const space = useMemo(() => spaces.find((s) => s.db === db), [spaces, db]);\n const spaceLabel = useMemo(\n () =>\n space &&\n toLocalizedString(\n getSpaceDisplayName(space, { personal: space.id === AppSpace.getPersonalSpace(client)?.id }),\n t,\n ),\n [space, client, t],\n );\n\n // Index all types by typename for label/icon lookups.\n const typeByTypename = useMemo(() => {\n const map = new Map<string, Type.AnyEntity>();\n for (const type of allTypes) {\n map.set(Type.getTypename(type), type);\n }\n return map;\n }, [allTypes]);\n\n const entriesByModule = useAtomValue(manager.capabilities.atomByModule(SpaceCapabilities.CreateObjectEntry));\n\n const { capabilityEntries, pluginNameByEntryId } = useMemo(() => {\n const entries: SpaceCapabilities.CreateObjectEntry[] = [];\n const pluginByEntryId = new Map<string, string>();\n const plugins = manager.getPlugins();\n for (const [moduleId, contributions] of Object.entries(entriesByModule)) {\n const owningPlugin = plugins.find((plugin) => plugin.modules.some((module) => module.id === moduleId));\n for (const entry of contributions) {\n entries.push(entry);\n if (owningPlugin) {\n pluginByEntryId.set(entry.id, owningPlugin.meta.profile.name);\n }\n }\n }\n return { capabilityEntries: entries, pluginNameByEntryId: pluginByEntryId };\n }, [entriesByModule, manager]);\n\n // Synthesize entries for database-persisted object schemas that have no registered capability.\n const createObjectEntries = useMemo(() => {\n const registeredIds = new Set(capabilityEntries.map((e) => e.id));\n // allTypesQuery returns meta-schema entities which may be any entity kind at runtime,\n // but the query's TypeScript type is conservatively AnyType[]; widen to enable kind narrowing below.\n const dbEntries = (allTypes as Type.AnyEntity[])\n .filter((type): type is Type.AnyObj => Type.isObject(type) && Type.getDatabase(type) != null)\n .filter((type) => !registeredIds.has(Type.getTypename(type)))\n .map((type) => makeCreateObjectEntryForDatabaseType(type));\n return [...capabilityEntries, ...dbEntries];\n }, [capabilityEntries, allTypes]);\n\n const resolve = useCallback<NonNullable<CreateObjectPanelProps['resolve']>>(\n (id) => createObjectEntries.find((entry) => entry.id === id),\n [createObjectEntries],\n );\n\n // The type selector is shown while no type has been resolved; the registry button is only relevant then.\n const showTypeSelector = !(typename && resolve(typename));\n\n const viewTypenames = useMemo(() => {\n const set = new Set<string>();\n for (const [name, type] of typeByTypename) {\n if (ViewAnnotation.has(type)) {\n set.add(name);\n }\n }\n return set;\n }, [typeByTypename]);\n\n const options = useMemo<CreateObjectOption[]>(\n () =>\n createObjectEntries\n .filter((entry) => (views === true ? viewTypenames.has(entry.id) : true))\n .map((entry) => {\n const type = typeByTypename.get(entry.id);\n const schema = type && Type.getSchema(type);\n const iconAnnotation = schema ? Annotation.IconAnnotation.get(schema).pipe(Option.getOrUndefined) : undefined;\n const isDatabase = type ? Type.getDatabase(type) != null : false;\n return {\n id: entry.id,\n label:\n (isDatabase && type ? Type.getLabel(type) : undefined) ??\n t('typename.label', { ns: entry.id, defaultValue: entry.id }),\n icon: iconAnnotation?.icon,\n iconHue: iconAnnotation?.hue,\n plugin: pluginNameByEntryId.get(entry.id),\n description: isDatabase ? spaceLabel : undefined,\n };\n }),\n [createObjectEntries, views, viewTypenames, typeByTypename, t, pluginNameByEntryId, spaceLabel],\n );\n\n const handleCreateObject = useCallback<NonNullable<CreateObjectPanelProps['onCreateObject']>>(\n ({ metadata, data = {} }) =>\n Effect.gen(function* () {\n if (!target) {\n // TODO(wittjosiah): UI feedback.\n return;\n }\n\n // NOTE: Must close before navigating or attention won't follow object.\n closeRef.current?.click();\n\n const db = Database.isDatabase(target) ? target : target && Obj.getDatabase(target);\n invariant(db, 'Missing database');\n const result = yield* metadata.createObject(data, { db, target, targetNodeId });\n const shouldNavigate = _shouldNavigate ?? (() => true);\n if (result.subject.length > 0 && shouldNavigate(result.object)) {\n if (layout.mode === 'multi') {\n yield* invoke(LayoutOperation.Set, {\n subject: [...result.subject],\n });\n yield* invoke(LayoutOperation.Expose, {\n subject: result.subject[0],\n });\n } else {\n yield* invoke(LayoutOperation.Open, {\n subject: [...result.subject],\n navigation: 'immediate',\n });\n }\n }\n\n onCreateObject?.(result.object);\n }).pipe(\n Effect.provideService(Capability.Service, manager.capabilities),\n Effect.provideService(Operation.Service, operationInvoker),\n EffectEx.runAndForwardErrors,\n ),\n [target, _shouldNavigate, onCreateObject, manager.capabilities, invoke, layout.mode],\n );\n\n return (\n <Dialog.Content>\n <Dialog.Header>\n <Dialog.Title>\n {t('create-object-dialog.title', {\n object: t('typename.label', { ns: typename, defaultValue: views ? 'View' : 'Object' }),\n })}\n </Dialog.Title>\n <Dialog.Close asChild>\n <Dialog.ActionIconButton action='close' ref={closeRef} />\n </Dialog.Close>\n </Dialog.Header>\n <Dialog.Body>\n <CreateObjectPanel\n options={options}\n spaces={spaces}\n target={target}\n typename={typename}\n initialFormValues={initialFormValues}\n defaultSpaceId={AppSpace.getPersonalSpace(client)?.id ?? client.spaces.get()[0]?.id}\n resolve={resolve}\n onCreateObject={handleCreateObject}\n onTargetChange={setTarget}\n onTypenameChange={setTypename}\n />\n </Dialog.Body>\n {showTypeSelector && (\n <Dialog.ActionBar>\n <Dialog.Close asChild>\n <PluginRegistryButton />\n </Dialog.Close>\n </Dialog.ActionBar>\n )}\n </Dialog.Content>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,oBAAoB;AAC7B,YAAYC,YAAY;AACxB,YAAYC,YAAY;AACxB,OAAOC,SAASC,aAAaC,SAASC,QAAQC,gBAAgB;AAE9D,SAASC,kBAAkB;AAC3B,SAASC,qBAAqBC,wBAAwB;AACtD,SAASC,UAAUC,iBAAiBC,mBAAmB;AACvD,SAASC,sBAAsBC,iBAAiB;AAChD,SAASC,iBAAiB;AAC1B,SAASC,YAAwBC,UAAUC,KAAKC,YAAY;AAC5D,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,iBAAiB;AACpC,SAASC,QAAQC,mBAAmBC,sBAAsB;AAC1D,SAASC,sBAAsB;AAE/B,SAASC,4CAA4C;AACrD,SAAkCC,yBAAsD;AACxF,SAASC,YAAY;AACrB,SAASC,yBAAyB;AAIlC,IAAA,eAAaC;AAkBX,IAAS,uBAAoBC,GAAKC,KAAAA,QAAW,GAAA;AAC7C,IAAMC,qBAAUC,CAAAA,EAAAA,QAA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;;sBACeA,gBAAc,MAAA;mBAAC;YAC5BO,GAAAA,OAAY;UACd;UACF,YAAA;QACF,CAAA;MAEAC;IACCC;AAKJP,qBAAAA,OAAAA,MAAAA;EAAQQ,CAAAA,EAAAA,KAAAA,sBAAAA,WAAAA,SAAAA,QAAAA,YAAAA,GAAAA,sBAAAA,UAAAA,SAAAA,gBAAAA,GAAAA,SAAAA,mBAAAA,GAAAA;IAAiBF;IAAgBtE;IAAsBkE;IAAQvD,QAAO8D;IAAK;IAGtF,OAAA;;SAK4CpE,sBAAAA,cAAAA,OAAAA,SAAAA,MAAAA,sBAAAA,cAAAA,OAAAA,QAAAA,MAAAA,sBAAAA,cAAAA,OAAAA,OAAAA,MAAAA,EAAAA,8BAAAA;YAAU+C,EAAAA,kBAAsB;MAAkB,IAAA;MACtF,cAEF,QAAA,SAACsB;IAAaC,CAAAA;OACZ,sBAAA,cAACD,OAAOE,OAAAA;IAAiBC,SAAO;KAAahE,sBAAAA,cAAAA,OAAAA,kBAAAA;;IAK7CiE,KAAAA;QACQrE,sBAAAA,cAAAA,OAAAA,MAAAA,MAAAA,sBAAAA,cAAAA,mBAAAA;IACRuD;IACA3D;IACA0E;IACAC;IACAC;IACAX,gBAAgBY,SAAAA,iBAAAA,MAAAA,GAAAA,MAAAA,OAAAA,OAAAA,IAAAA,EAAAA,CAAAA,GAAAA;IAChBC;IACAC,gBAAAA;oBAGHC;IAEiBV,kBAAAA;2BACXW,sBAAAA,cAAAA,OAAAA,WAAAA,MAAAA,sBAAAA,cAAAA,OAAAA,OAAAA;IAMX,SAAA;;;",
|
|
6
|
-
"names": ["useAtomValue", "Effect", "Option", "React", "useCallback", "useMemo", "useRef", "useState", "Capability", "useOperationInvoker", "usePluginManager", "AppSpace", "LayoutOperation", "TypeOptions", "PluginRegistryButton", "useLayout", "Operation", "Annotation", "Database", "Obj", "Type", "EffectEx", "invariant", "useClient", "useQuery", "useSpaces", "Dialog", "toLocalizedString", "useTranslation", "ViewAnnotation", "makeCreateObjectEntryForDatabaseType", "CreateObjectPanel", "meta", "SpaceCapabilities", "CREATE_OBJECT_DIALOG", "meta", "profile", "manager", "usePluginManager", "operationInvoker", "useOperationInvoker", "initialTarget", "typename", "setTypename", "client", "useClient", "spaces", "useSpaces", "layout", "useLayout", "closeRef", "db", "Database", "isDatabase", "allTypes", "useQuery", "space", "useMemo", "s", "t", "map", "Type", "getTypename", "pluginByEntryId", "Map", "plugins", "contributions", "owningPlugin", "find", "entry", "entries", "pluginNameByEntryId", "entriesByModule", "capabilityEntries", "dbEntries", "Set", "type", "typeByTypename", "ViewAnnotation", "set", "add", "name", "schema", "iconAnnotation", "Annotation", "getDatabase", "id", "label", "ns", "defaultValue", "icon", "iconHue", "plugin", "description", "createObjectEntries", "views", "viewTypenames", "spaceLabel", "invariant", "result", "createObject", "target", "targetNodeId", "invoke", "LayoutOperation", "subject", "navigation", "onCreateObject", "pipe", "_shouldNavigate", "mode", "Dialog", "asChild", "ActionIconButton", "action", "options", "initialFormValues", "defaultSpaceId", "resolve", "handleCreateObject", "onTargetChange", "onTypenameChange", "showTypeSelector", "PluginRegistryButton"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/JoinDialog/JoinDialog.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation, Paths } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Trigger } from '@dxos/async';\nimport { Graph } from '@dxos/plugin-graph';\nimport { ObservabilityOperation } from '@dxos/plugin-observability';\nimport { useClient } from '@dxos/react-client';\nimport { type Space } from '@dxos/react-client/echo';\nimport { type InvitationResult } from '@dxos/react-client/invitations';\nimport { Dialog, useTranslation } from '@dxos/react-ui';\nimport { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';\nimport { osTranslations } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\n\nexport const JOIN_DIALOG = `${meta.profile.key}.JoinDialog`;\n\nexport type JoinDialogProps = JoinPanelProps & {\n navigableCollections?: boolean;\n};\n\nexport const JoinDialog = ({ navigableCollections, onDone, ...props }: JoinDialogProps) => {\n const { invokePromise } = useOperationInvoker();\n const client = useClient();\n const { graph } = useAppGraph();\n const { t } = useTranslation(meta.profile.key);\n\n const handleDone = useCallback(\n async (result: InvitationResult | null) => {\n const spaceKey = result?.spaceKey;\n if (!spaceKey) {\n return;\n }\n\n await Promise.all([\n invokePromise(LayoutOperation.AddToast, {\n id: `${meta.profile.key}.join-success`,\n duration: 5_000,\n title: ['join-success.label', { ns: meta.profile.key }],\n closeLabel: ['dismiss.label', { ns: meta.profile.key }],\n }),\n invokePromise(LayoutOperation.UpdateDialog, { state: false }),\n ]);\n\n let space = client.spaces.get(spaceKey);\n if (!space) {\n // TODO(wittjosiah): Add api to wait for a space.\n const trigger = new Trigger<Space>();\n client.spaces.subscribe(() => {\n const space = client.spaces.get(spaceKey);\n if (space) {\n trigger.wake(space);\n }\n });\n space = await trigger.wait();\n }\n\n await invokePromise(LayoutOperation.SwitchWorkspace, { subject: Paths.getSpacePath(space.id) });\n\n const target = result?.target;\n if (target) {\n // Wait before navigating to the target node.\n // If the target has not yet replicated, this will trigger a loading toast.\n await Graph.waitForPath(graph, { target }).catch(() => {});\n await Promise.all([\n invokePromise(LayoutOperation.Open, { subject: [target] }),\n invokePromise(LayoutOperation.Expose, { subject: target }),\n ]);\n } else {\n await invokePromise(LayoutOperation.Open, {\n subject: [Paths.getSpaceHomePath(space.id)],\n workspace: Paths.getSpacePath(space.id),\n });\n }\n\n onDone?.(result);\n\n if (space) {\n await invokePromise(ObservabilityOperation.SendEvent, {\n name: 'space.join',\n properties: {\n spaceId: space.id,\n },\n });\n }\n },\n [invokePromise, client, graph, navigableCollections, onDone],\n );\n\n // TODO(burdon): Move JoinHeading into Dialog.Heading.\n return (\n <Dialog.Content>\n <Dialog.Title classNames='sr-only'>{t('join-space.label', { ns: osTranslations })}</Dialog.Title>\n <Dialog.Body>\n <JoinPanel\n {...props}\n exitActionParent={<Dialog.Close asChild />}\n doneActionParent={<Dialog.Close asChild />}\n onDone={handleDone}\n />\n </Dialog.Body>\n </Dialog.Content>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,OAAOA,SAASC,mBAAmB;AAEnC,SAASC,2BAA2B;AACpC,SAASC,iBAAiBC,aAAa;AACvC,SAASC,mBAAmB;AAC5B,SAASC,eAAe;AACxB,SAASC,aAAa;AACtB,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAG1B,SAASC,QAAQC,sBAAsB;AACvC,SAASC,iBAAsC;AAC/C,SAASC,sBAAsB;AAE/B,SAASC,YAAY;AAEd,IAAMC,cAAc,GAAGD,KAAKE,QAAQC,GAAG;AAMvC,IAAMC,aAAa,CAAC,EAAEC,sBAAsBC,QAAQ,GAAGC,MAAAA,MAAwB;AACpF,QAAM,EAAEC,cAAa,IAAKpB,oBAAAA;AAC1B,QAAMqB,SAASd,UAAAA;AACf,QAAM,EAAEe,MAAK,IAAKnB,YAAAA;AAClB,QAAM,EAAEoB,EAAC,IAAKd,eAAeG,KAAKE,QAAQC,GAAG;AAE7C,QAAMS,aAAazB,YACjB,OAAO0B,WAAAA;AACL,UAAMC,WAAWD,QAAQC;AACzB,QAAI,CAACA,UAAU;AACb;IACF;AAEA,UAAMC,QAAQC,IAAI;MAChBR,cAAcnB,gBAAgB4B,UAAU;QACtCC,IAAI,GAAGlB,KAAKE,QAAQC,GAAG;QACvBgB,UAAU;QACVC,OAAO;UAAC;UAAsB;YAAEC,IAAIrB,KAAKE,QAAQC;UAAI;;QACrDmB,YAAY;UAAC;UAAiB;YAAED,IAAIrB,KAAKE,QAAQC;UAAI;;MACvD,CAAA;MACAK,cAAcnB,gBAAgBkC,cAAc;QAAEC,OAAO;MAAM,CAAA;K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,OAAOqD,MAAI,MACV,sBAAA,cAACnD,WAAAA;IACE,GAAGS;IACJ2C,kBAAkB,sBAAA,cAACtD,OAAOuD,OAAK;MAACC,SAAAA;;IAChCC,kBAAkB,sBAAA,cAACzD,OAAOuD,OAAK;MAACC,SAAAA;;IAChC9C,QAAQM;;AAKlB;",
|
|
6
|
-
"names": ["React", "useCallback", "useOperationInvoker", "LayoutOperation", "Paths", "useAppGraph", "Trigger", "Graph", "ObservabilityOperation", "useClient", "Dialog", "useTranslation", "JoinPanel", "osTranslations", "meta", "JOIN_DIALOG", "profile", "key", "JoinDialog", "navigableCollections", "onDone", "props", "invokePromise", "client", "graph", "t", "handleDone", "result", "spaceKey", "Promise", "all", "AddToast", "id", "duration", "title", "ns", "closeLabel", "UpdateDialog", "state", "space", "spaces", "get", "trigger", "subscribe", "wake", "wait", "SwitchWorkspace", "subject", "getSpacePath", "target", "waitForPath", "catch", "Open", "Expose", "getSpaceHomePath", "workspace", "SendEvent", "name", "properties", "spaceId", "Content", "Title", "classNames", "Body", "exitActionParent", "Close", "asChild", "doneActionParent"]
|
|
7
|
-
}
|