@dxos/plugin-space 0.8.1-staging.391c573 → 0.8.1-staging.97aedb1
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/browser/{app-graph-builder-MGK5HWPZ.mjs → app-graph-builder-GMFCSOLG.mjs} +33 -6
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-FOWFLYGU.mjs → app-graph-serializer-DSF2U3A5.mjs} +7 -7
- package/dist/lib/browser/{app-graph-serializer-FOWFLYGU.mjs.map → app-graph-serializer-DSF2U3A5.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-UDWHTKB5.mjs → chunk-5BDV575R.mjs} +22 -16
- package/dist/lib/browser/chunk-5BDV575R.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ULA2UQJ4.mjs → chunk-AYW4IDRT.mjs} +15 -65
- package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OWVFWTX4.mjs → chunk-JZXWPMLA.mjs} +853 -588
- package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NU7WDVGN.mjs → chunk-KVRYWFZU.mjs} +3 -3
- package/dist/lib/browser/chunk-KVRYWFZU.mjs.map +7 -0
- package/dist/lib/browser/{chunk-23RVI5FZ.mjs → chunk-LO5UL6RU.mjs} +49 -16
- package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PQXZCNAU.mjs → chunk-PTKYMZWO.mjs} +1 -1
- package/dist/lib/browser/chunk-PTKYMZWO.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-FYGS6TBH.mjs → identity-created-JR7BNXFH.mjs} +3 -3
- package/dist/lib/browser/index.mjs +34 -45
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-7PY5WDYC.mjs → intent-resolver-RKYILWWQ.mjs} +69 -44
- package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-EP4XP4IK.mjs → react-root-6H7NX2M2.mjs} +6 -6
- package/dist/lib/browser/{react-surface-VNNI5POA.mjs → react-surface-7AGLOVMK.mjs} +39 -38
- package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +7 -0
- package/dist/lib/browser/{schema-5W3DSY2E.mjs → schema-FHTA26SW.mjs} +3 -3
- package/dist/lib/browser/{schema-tools-6J5ZEDBC.mjs → schema-tools-YAXPRIXP.mjs} +3 -3
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +7 -0
- package/dist/lib/browser/{settings-PHPCXX33.mjs → settings-PJPTJUPE.mjs} +3 -3
- package/dist/lib/browser/{spaces-ready-K47RR7N2.mjs → spaces-ready-BSSP7HHG.mjs} +8 -8
- package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +7 -0
- package/dist/lib/browser/{state-INJ63O57.mjs → state-X7VLCC6E.mjs} +5 -3
- package/dist/lib/browser/state-X7VLCC6E.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -10
- package/dist/lib/node/{app-graph-builder-ZIUBXRPA.cjs → app-graph-builder-DPY7AUZE.cjs} +73 -46
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-VQOGHKXL.cjs → app-graph-serializer-JELGJUAY.cjs} +21 -21
- package/dist/lib/node/{app-graph-serializer-VQOGHKXL.cjs.map → app-graph-serializer-JELGJUAY.cjs.map} +2 -2
- package/dist/lib/node/{chunk-53J7HLYX.cjs → chunk-3GKCNADA.cjs} +915 -656
- package/dist/lib/node/chunk-3GKCNADA.cjs.map +7 -0
- package/dist/lib/node/{chunk-WZR6OAN3.cjs → chunk-6P2DB4QQ.cjs} +4 -4
- package/dist/lib/node/{chunk-WZR6OAN3.cjs.map → chunk-6P2DB4QQ.cjs.map} +2 -2
- package/dist/lib/node/{chunk-YZKNRFHU.cjs → chunk-IKIDS6XF.cjs} +10 -10
- package/dist/lib/node/chunk-IKIDS6XF.cjs.map +7 -0
- package/dist/lib/node/{chunk-U6DYXAR3.cjs → chunk-PU2EYH4E.cjs} +27 -21
- package/dist/lib/node/chunk-PU2EYH4E.cjs.map +7 -0
- package/dist/lib/node/{chunk-OVGKWJOC.cjs → chunk-TUZWEPGX.cjs} +99 -66
- package/dist/lib/node/chunk-TUZWEPGX.cjs.map +7 -0
- package/dist/lib/node/{chunk-WAJKBO3J.cjs → chunk-WDEIFDTX.cjs} +19 -73
- package/dist/lib/node/chunk-WDEIFDTX.cjs.map +7 -0
- package/dist/lib/node/{identity-created-AXI64BLE.cjs → identity-created-XU4HFV2T.cjs} +7 -7
- package/dist/lib/node/index.cjs +102 -113
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-QEIKJ5FR.cjs → intent-resolver-VJ7YV74L.cjs} +133 -107
- package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-OW5NTN2U.cjs → react-root-TEL5RW3N.cjs} +12 -12
- package/dist/lib/node/{react-surface-JTIQUBHB.cjs → react-surface-2H3S5TY5.cjs} +78 -76
- package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +7 -0
- package/dist/lib/node/{schema-YN7WVFRX.cjs → schema-PPJ5BZ3A.cjs} +7 -7
- package/dist/lib/node/{schema-tools-OZS4OC6X.cjs → schema-tools-BLIMOZYY.cjs} +5 -5
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +7 -0
- package/dist/lib/node/{settings-5QYFWNH7.cjs → settings-WVFP2UEP.cjs} +8 -8
- package/dist/lib/node/{spaces-ready-FQNAKR7G.cjs → spaces-ready-7DNZSUOG.cjs} +16 -16
- package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +7 -0
- package/dist/lib/node/{state-57UE3DYE.cjs → state-5KX6WBJH.cjs} +10 -8
- package/dist/lib/node/state-5KX6WBJH.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +13 -21
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/{app-graph-builder-TERVM2SL.mjs → app-graph-builder-42IGWRPL.mjs} +33 -6
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-GZRSWHEN.mjs → app-graph-serializer-FXONFKOE.mjs} +7 -7
- package/dist/lib/node-esm/{app-graph-serializer-GZRSWHEN.mjs.map → app-graph-serializer-FXONFKOE.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-2TQ2AJEZ.mjs → chunk-3ZOUV4DF.mjs} +22 -16
- package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FDVNOFE3.mjs → chunk-BEWBZ4Q4.mjs} +853 -588
- package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TRNZQEEN.mjs → chunk-FC4UHDPL.mjs} +15 -65
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ICCM4YRJ.mjs → chunk-MSWEFAPD.mjs} +1 -1
- package/dist/lib/node-esm/chunk-MSWEFAPD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6RSVVEPS.mjs → chunk-PIYAWT5N.mjs} +3 -3
- package/dist/lib/node-esm/chunk-PIYAWT5N.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PGH5L7MV.mjs → chunk-ZGLK25WQ.mjs} +49 -16
- package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-3CGEXNPO.mjs → identity-created-WJKAS2PV.mjs} +3 -3
- package/dist/lib/node-esm/index.mjs +34 -45
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-7EYVRN3R.mjs → intent-resolver-ZFNSA4CM.mjs} +69 -44
- package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-RCKGZSZB.mjs → react-root-PRBJMWLQ.mjs} +6 -6
- package/dist/lib/node-esm/{react-surface-WKKBE5V4.mjs → react-surface-RCZG2PNF.mjs} +39 -38
- package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-LOR2EVGY.mjs → schema-OUZKVYM5.mjs} +3 -3
- package/dist/lib/node-esm/{schema-tools-KJVXGDBO.mjs → schema-tools-IU7EX5A5.mjs} +3 -3
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-H6MXTEQM.mjs → settings-FJZPC2TV.mjs} +3 -3
- package/dist/lib/node-esm/{spaces-ready-HKAQG5SA.mjs → spaces-ready-7X5PGB2V.mjs} +8 -8
- package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +7 -0
- package/dist/lib/node-esm/{state-VYA6OFHD.mjs → state-Z6E2YTNC.mjs} +5 -3
- package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -10
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +4 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts +7 -0
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer.stories.d.ts +8 -0
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts +8 -0
- package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts +8 -0
- package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/index.d.ts +2 -0
- package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts +7 -0
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts +7 -0
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +9 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/index.d.ts +2 -2
- package/dist/types/src/components/SpaceSettings/index.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/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -5
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +53 -36
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +92 -197
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +10 -0
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +12 -0
- package/dist/types/src/util.d.ts.map +1 -1
- package/package.json +44 -42
- package/src/SpacePlugin.tsx +6 -11
- package/src/capabilities/app-graph-builder.ts +20 -0
- package/src/capabilities/app-graph-serializer.ts +2 -2
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/intent-resolver.ts +66 -38
- package/src/capabilities/react-surface.tsx +30 -28
- package/src/capabilities/schema-tools.ts +2 -2
- package/src/capabilities/spaces-ready.ts +3 -3
- package/src/capabilities/state.ts +2 -0
- package/src/components/CreateDialog/CreateObjectDialog.tsx +3 -6
- package/src/components/CreateDialog/CreateObjectPanel.tsx +6 -6
- package/src/components/JoinDialog.tsx +43 -27
- package/src/components/MembersContainer.stories.tsx +34 -0
- package/src/components/MembersContainer.tsx +257 -0
- package/src/components/{AdvancedObjectSettings → ObjectSettingsContainer}/AdvancedObjectSettings.tsx +2 -2
- package/src/components/ObjectSettingsContainer/BaseObjectSettings.tsx +47 -0
- package/src/components/ObjectSettingsContainer/ObjectSettingsContainer.tsx +36 -0
- package/src/components/ObjectSettingsContainer/index.ts +5 -0
- package/src/components/PopoverRenameObject.tsx +1 -1
- package/src/components/SpacePresence.tsx +25 -23
- package/src/components/SpaceSettings/{SpaceSettingsPanel.stories.tsx → SpacePropertiesForm.stories.tsx} +6 -6
- package/src/components/SpaceSettings/SpacePropertiesForm.tsx +136 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +63 -0
- package/src/components/SpaceSettings/index.ts +2 -2
- package/src/components/SyncStatus/SyncStatus.tsx +1 -1
- package/src/components/SyncStatus/save-tracker.ts +5 -5
- package/src/components/index.ts +2 -2
- package/src/events.ts +2 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +21 -12
- package/src/types/thread.ts +2 -56
- package/src/types/types.ts +15 -6
- package/src/util.tsx +30 -9
- package/dist/lib/browser/app-graph-builder-MGK5HWPZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-23RVI5FZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NU7WDVGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWVFWTX4.mjs.map +0 -7
- package/dist/lib/browser/chunk-PQXZCNAU.mjs.map +0 -7
- package/dist/lib/browser/chunk-UDWHTKB5.mjs.map +0 -7
- package/dist/lib/browser/chunk-ULA2UQJ4.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-7PY5WDYC.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VNNI5POA.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-6J5ZEDBC.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-K47RR7N2.mjs.map +0 -7
- package/dist/lib/browser/state-INJ63O57.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-ZIUBXRPA.cjs.map +0 -7
- package/dist/lib/node/chunk-53J7HLYX.cjs.map +0 -7
- package/dist/lib/node/chunk-OVGKWJOC.cjs.map +0 -7
- package/dist/lib/node/chunk-U6DYXAR3.cjs.map +0 -7
- package/dist/lib/node/chunk-WAJKBO3J.cjs.map +0 -7
- package/dist/lib/node/chunk-YZKNRFHU.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QEIKJ5FR.cjs.map +0 -7
- package/dist/lib/node/react-surface-JTIQUBHB.cjs.map +0 -7
- package/dist/lib/node/schema-tools-OZS4OC6X.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-FQNAKR7G.cjs.map +0 -7
- package/dist/lib/node/state-57UE3DYE.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TERVM2SL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2TQ2AJEZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6RSVVEPS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FDVNOFE3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ICCM4YRJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PGH5L7MV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TRNZQEEN.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-7EYVRN3R.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WKKBE5V4.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-KJVXGDBO.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-HKAQG5SA.mjs.map +0 -7
- package/dist/lib/node-esm/state-VYA6OFHD.mjs.map +0 -7
- package/dist/types/src/components/AdvancedObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/AdvancedObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/AdvancedObjectSettings/index.d.ts +0 -2
- package/dist/types/src/components/AdvancedObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/BaseObjectSettings.d.ts +0 -7
- package/dist/types/src/components/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts +0 -11
- package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.stories.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.stories.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.stories.d.ts.map +0 -1
- package/src/components/AdvancedObjectSettings/index.ts +0 -5
- package/src/components/BaseObjectSettings.tsx +0 -40
- package/src/components/SpaceSettings/SpaceSettingsDialog.stories.tsx +0 -43
- package/src/components/SpaceSettings/SpaceSettingsDialog.tsx +0 -120
- package/src/components/SpaceSettings/SpaceSettingsPanel.tsx +0 -83
- /package/dist/lib/browser/{identity-created-FYGS6TBH.mjs.map → identity-created-JR7BNXFH.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-EP4XP4IK.mjs.map → react-root-6H7NX2M2.mjs.map} +0 -0
- /package/dist/lib/browser/{schema-5W3DSY2E.mjs.map → schema-FHTA26SW.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-PHPCXX33.mjs.map → settings-PJPTJUPE.mjs.map} +0 -0
- /package/dist/lib/node/{identity-created-AXI64BLE.cjs.map → identity-created-XU4HFV2T.cjs.map} +0 -0
- /package/dist/lib/node/{react-root-OW5NTN2U.cjs.map → react-root-TEL5RW3N.cjs.map} +0 -0
- /package/dist/lib/node/{schema-YN7WVFRX.cjs.map → schema-PPJ5BZ3A.cjs.map} +0 -0
- /package/dist/lib/node/{settings-5QYFWNH7.cjs.map → settings-WVFP2UEP.cjs.map} +0 -0
- /package/dist/lib/node-esm/{identity-created-3CGEXNPO.mjs.map → identity-created-WJKAS2PV.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-RCKGZSZB.mjs.map → react-root-PRBJMWLQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{schema-LOR2EVGY.mjs.map → schema-OUZKVYM5.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-H6MXTEQM.mjs.map → settings-FJZPC2TV.mjs.map} +0 -0
- /package/dist/types/src/components/{AdvancedObjectSettings → ObjectSettingsContainer}/AdvancedObjectSettings.d.ts +0 -0
- /package/dist/types/src/components/{AdvancedObjectSettings → ObjectSettingsContainer}/ForeignKeys.d.ts +0 -0
- /package/src/components/{AdvancedObjectSettings → ObjectSettingsContainer}/ForeignKeys.tsx +0 -0
|
@@ -46,8 +46,8 @@ export default (context: PluginsContext) =>
|
|
|
46
46
|
inputType: CollectionType.typename,
|
|
47
47
|
outputType: DIRECTORY_TYPE,
|
|
48
48
|
serialize: (node) => ({
|
|
49
|
-
name: node.data.name ?? translations[0]['en-US'][
|
|
50
|
-
data: node.data.name ?? translations[0]['en-US'][
|
|
49
|
+
name: node.data.name ?? translations[0]['en-US'][CollectionType.typename]['object name placeholder'],
|
|
50
|
+
data: node.data.name ?? translations[0]['en-US'][CollectionType.typename]['object name placeholder'],
|
|
51
51
|
type: DIRECTORY_TYPE,
|
|
52
52
|
}),
|
|
53
53
|
deserialize: async (data, ancestors) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { defineCapability, type Label } from '@dxos/app-framework';
|
|
6
|
-
import { type DeepReadonly } from '@dxos/util';
|
|
6
|
+
import { type Position, type DeepReadonly } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
import { SPACE_PLUGIN } from '../meta';
|
|
9
9
|
import { type ObjectForm, type PluginState } from '../types';
|
|
@@ -12,8 +12,8 @@ export namespace SpaceCapabilities {
|
|
|
12
12
|
export const State = defineCapability<DeepReadonly<PluginState>>(`${SPACE_PLUGIN}/capability/state`);
|
|
13
13
|
export const MutableState = defineCapability<PluginState>(`${SPACE_PLUGIN}/capability/state`);
|
|
14
14
|
|
|
15
|
-
export type
|
|
16
|
-
export const
|
|
15
|
+
export type SettingsSection = { id: string; label: Label; position?: Position };
|
|
16
|
+
export const SettingsSection = defineCapability<SettingsSection>(`${SPACE_PLUGIN}/capability/settings-section`);
|
|
17
17
|
|
|
18
18
|
export const ObjectForm = defineCapability<ObjectForm<any>>(`${SPACE_PLUGIN}/capability/object-form`);
|
|
19
19
|
}
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { pipe } from 'effect';
|
|
6
|
+
|
|
5
7
|
import {
|
|
6
8
|
Capabilities,
|
|
9
|
+
chain,
|
|
7
10
|
contributes,
|
|
8
11
|
createIntent,
|
|
9
12
|
createResolver,
|
|
@@ -14,8 +17,8 @@ import { type Expando, getTypename, type HasId } from '@dxos/echo-schema';
|
|
|
14
17
|
import { invariant } from '@dxos/invariant';
|
|
15
18
|
import { create, makeRef, type ReactiveObject } from '@dxos/live-object';
|
|
16
19
|
import { Migrations } from '@dxos/migrations';
|
|
17
|
-
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
18
20
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
|
+
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
19
22
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
20
23
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
21
24
|
import { isSpace, getSpace, SpaceState, type Space, fullyQualifiedId, isEchoObject } from '@dxos/react-client/echo';
|
|
@@ -24,8 +27,6 @@ import { SpaceCapabilities } from './capabilities';
|
|
|
24
27
|
import {
|
|
25
28
|
CREATE_SPACE_DIALOG,
|
|
26
29
|
JOIN_DIALOG,
|
|
27
|
-
SPACE_SETTINGS_DIALOG,
|
|
28
|
-
type SpaceSettingsDialogProps,
|
|
29
30
|
type JoinDialogProps,
|
|
30
31
|
POPOVER_RENAME_SPACE,
|
|
31
32
|
CREATE_OBJECT_DIALOG,
|
|
@@ -41,12 +42,11 @@ import { cloneObject, COMPOSER_SPACE_LOCK, getNestedObjects } from '../util';
|
|
|
41
42
|
const SPACE_MAX_OBJECTS = 500;
|
|
42
43
|
|
|
43
44
|
type IntentResolverOptions = {
|
|
44
|
-
createInvitationUrl: (invitationCode: string) => string;
|
|
45
45
|
context: PluginsContext;
|
|
46
46
|
observability?: boolean;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
export default ({
|
|
49
|
+
export default ({ context, observability }: IntentResolverOptions) => {
|
|
50
50
|
const resolve = (typename: string) =>
|
|
51
51
|
context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
52
52
|
|
|
@@ -104,7 +104,7 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
104
104
|
}),
|
|
105
105
|
createResolver({
|
|
106
106
|
intent: SpaceAction.Join,
|
|
107
|
-
resolve: ({ invitationCode }) => ({
|
|
107
|
+
resolve: ({ invitationCode, onDone }) => ({
|
|
108
108
|
intents: [
|
|
109
109
|
createIntent(LayoutAction.UpdateDialog, {
|
|
110
110
|
part: 'dialog',
|
|
@@ -113,6 +113,7 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
113
113
|
blockAlign: 'start',
|
|
114
114
|
props: {
|
|
115
115
|
initialInvitationCode: invitationCode,
|
|
116
|
+
onDone,
|
|
116
117
|
} satisfies Partial<JoinDialogProps>,
|
|
117
118
|
},
|
|
118
119
|
}),
|
|
@@ -123,31 +124,40 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
123
124
|
intent: SpaceAction.Share,
|
|
124
125
|
filter: (data): data is { space: Space } => !data.space.properties[COMPOSER_SPACE_LOCK],
|
|
125
126
|
resolve: ({ space }) => {
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
const layout = context.requestCapability(Capabilities.Layout);
|
|
128
|
+
const id = `${space.id}${ATTENDABLE_PATH_SEPARATOR}members`;
|
|
129
|
+
if (layout.active.includes(id)) {
|
|
130
|
+
return {
|
|
131
|
+
intents: [
|
|
132
|
+
createIntent(LayoutAction.ScrollIntoView, {
|
|
133
|
+
part: 'current',
|
|
134
|
+
subject: id,
|
|
135
|
+
}),
|
|
136
|
+
],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
129
139
|
|
|
130
140
|
return {
|
|
131
141
|
intents: [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
|
|
142
|
+
pipe(
|
|
143
|
+
createIntent(LayoutAction.SwitchWorkspace, {
|
|
144
|
+
part: 'workspace',
|
|
145
|
+
subject: space.id,
|
|
146
|
+
}),
|
|
147
|
+
chain(LayoutAction.Open, {
|
|
148
|
+
part: 'main',
|
|
149
|
+
subject: [space.id],
|
|
150
|
+
options: {
|
|
151
|
+
variant: 'members',
|
|
152
|
+
},
|
|
153
|
+
}),
|
|
154
|
+
),
|
|
145
155
|
...(observability
|
|
146
156
|
? [
|
|
147
157
|
createIntent(ObservabilityAction.SendEvent, {
|
|
148
158
|
name: 'space.share',
|
|
149
159
|
properties: {
|
|
150
|
-
|
|
160
|
+
spaceId: space.id,
|
|
151
161
|
},
|
|
152
162
|
}),
|
|
153
163
|
]
|
|
@@ -233,20 +243,34 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
233
243
|
createResolver({
|
|
234
244
|
intent: SpaceAction.OpenSettings,
|
|
235
245
|
resolve: ({ space }) => {
|
|
246
|
+
const layout = context.requestCapability(Capabilities.Layout);
|
|
247
|
+
const id = `${space.id}${ATTENDABLE_PATH_SEPARATOR}settings`;
|
|
248
|
+
if (layout.active.includes(id)) {
|
|
249
|
+
return {
|
|
250
|
+
intents: [
|
|
251
|
+
createIntent(LayoutAction.ScrollIntoView, {
|
|
252
|
+
part: 'current',
|
|
253
|
+
subject: id,
|
|
254
|
+
}),
|
|
255
|
+
],
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
|
|
236
259
|
return {
|
|
237
260
|
intents: [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
261
|
+
pipe(
|
|
262
|
+
createIntent(LayoutAction.SwitchWorkspace, {
|
|
263
|
+
part: 'workspace',
|
|
264
|
+
subject: space.id,
|
|
265
|
+
}),
|
|
266
|
+
chain(LayoutAction.Open, {
|
|
267
|
+
part: 'main',
|
|
268
|
+
subject: [space.id],
|
|
269
|
+
options: {
|
|
270
|
+
variant: 'settings',
|
|
271
|
+
},
|
|
272
|
+
}),
|
|
273
|
+
),
|
|
250
274
|
],
|
|
251
275
|
};
|
|
252
276
|
},
|
|
@@ -265,7 +289,7 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
265
289
|
}),
|
|
266
290
|
createResolver({
|
|
267
291
|
intent: SpaceAction.Migrate,
|
|
268
|
-
resolve: async ({ space, version }) => {
|
|
292
|
+
resolve: async ({ space, version: targetVersion }) => {
|
|
269
293
|
const state = context.requestCapability(SpaceCapabilities.MutableState);
|
|
270
294
|
|
|
271
295
|
if (space.state.get() === SpaceState.SPACE_REQUIRES_MIGRATION) {
|
|
@@ -273,7 +297,8 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
273
297
|
await space.internal.migrate();
|
|
274
298
|
state.sdkMigrationRunning[space.id] = false;
|
|
275
299
|
}
|
|
276
|
-
const result = await Migrations.migrate(space,
|
|
300
|
+
const result = await Migrations.migrate(space, targetVersion);
|
|
301
|
+
const version = Migrations.versionProperty ? space.properties[Migrations.versionProperty] : undefined;
|
|
277
302
|
return {
|
|
278
303
|
data: result,
|
|
279
304
|
intents: [
|
|
@@ -283,6 +308,7 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
283
308
|
name: 'space.migrate',
|
|
284
309
|
properties: {
|
|
285
310
|
spaceId: space.id,
|
|
311
|
+
targetVersion,
|
|
286
312
|
version,
|
|
287
313
|
},
|
|
288
314
|
}),
|
|
@@ -318,7 +344,7 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
318
344
|
}),
|
|
319
345
|
createResolver({
|
|
320
346
|
intent: SpaceAction.AddObject,
|
|
321
|
-
resolve: async ({ target, object }) => {
|
|
347
|
+
resolve: async ({ target, object, hidden }) => {
|
|
322
348
|
const space = isSpace(target) ? target : getSpace(target);
|
|
323
349
|
invariant(space, 'Space not found.');
|
|
324
350
|
|
|
@@ -356,6 +382,8 @@ export default ({ createInvitationUrl, context, observability }: IntentResolverO
|
|
|
356
382
|
|
|
357
383
|
if (target instanceof CollectionType) {
|
|
358
384
|
target.objects.push(makeRef(object as HasId));
|
|
385
|
+
} else if (isSpace(target) && hidden) {
|
|
386
|
+
space.db.add(object);
|
|
359
387
|
} else if (isSpace(target)) {
|
|
360
388
|
const collection = space.properties[CollectionType.typename]?.target;
|
|
361
389
|
if (collection instanceof CollectionType) {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, createSurface, Surface, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { isInstanceOf } from '@dxos/echo-schema';
|
|
8
9
|
import { SettingsStore } from '@dxos/local-storage';
|
|
9
10
|
import {
|
|
10
11
|
getSpace,
|
|
@@ -19,8 +20,6 @@ import { type JoinPanelProps } from '@dxos/shell/react';
|
|
|
19
20
|
|
|
20
21
|
import { SpaceCapabilities } from './capabilities';
|
|
21
22
|
import {
|
|
22
|
-
AdvancedObjectSettings,
|
|
23
|
-
BaseObjectSettings,
|
|
24
23
|
CollectionMain,
|
|
25
24
|
CollectionSection,
|
|
26
25
|
CREATE_OBJECT_DIALOG,
|
|
@@ -36,16 +35,16 @@ import {
|
|
|
36
35
|
PopoverRenameObject,
|
|
37
36
|
PopoverRenameSpace,
|
|
38
37
|
SmallPresenceLive,
|
|
39
|
-
SPACE_SETTINGS_DIALOG,
|
|
40
38
|
SpacePluginSettings,
|
|
41
39
|
SpacePresence,
|
|
42
|
-
SpaceSettingsDialog,
|
|
43
|
-
SpaceSettingsPanel,
|
|
44
40
|
SyncStatus,
|
|
45
41
|
type CreateObjectDialogProps,
|
|
46
|
-
type SpaceSettingsDialogProps,
|
|
47
42
|
POPOVER_ADD_SPACE,
|
|
48
43
|
PopoverAddSpace,
|
|
44
|
+
SpaceSettingsContainer,
|
|
45
|
+
SpacePropertiesForm,
|
|
46
|
+
MembersContainer,
|
|
47
|
+
ObjectSettingsContainer,
|
|
49
48
|
} from '../components';
|
|
50
49
|
import { SPACE_PLUGIN } from '../meta';
|
|
51
50
|
import { CollectionType, type SpaceSettingsProps } from '../types';
|
|
@@ -74,35 +73,37 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
74
73
|
id: `${SPACE_PLUGIN}/collection-fallback`,
|
|
75
74
|
role: 'article',
|
|
76
75
|
position: 'fallback',
|
|
77
|
-
filter: (data): data is { subject: CollectionType } => data.subject
|
|
76
|
+
filter: (data): data is { subject: CollectionType } => isInstanceOf(CollectionType, data.subject),
|
|
78
77
|
component: ({ data }) => <CollectionMain collection={data.subject} />,
|
|
79
78
|
}),
|
|
80
79
|
createSurface({
|
|
81
|
-
id: `${SPACE_PLUGIN}/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
filter: (data): data is { subject: Space } =>
|
|
85
|
-
|
|
80
|
+
id: `${SPACE_PLUGIN}/members`,
|
|
81
|
+
role: 'article',
|
|
82
|
+
position: 'hoist',
|
|
83
|
+
filter: (data): data is { subject: Space; variant: 'members' } =>
|
|
84
|
+
isSpace(data.subject) && data.variant === 'members',
|
|
85
|
+
component: ({ data }) => <MembersContainer space={data.subject} createInvitationUrl={createInvitationUrl} />,
|
|
86
86
|
}),
|
|
87
87
|
createSurface({
|
|
88
|
-
id: `${SPACE_PLUGIN}/
|
|
89
|
-
role: '
|
|
88
|
+
id: `${SPACE_PLUGIN}/settings`,
|
|
89
|
+
role: 'article',
|
|
90
90
|
position: 'hoist',
|
|
91
|
-
filter: (data): data is { subject:
|
|
92
|
-
|
|
91
|
+
filter: (data): data is { subject: Space; variant: 'settings' } =>
|
|
92
|
+
isSpace(data.subject) && data.variant === 'settings',
|
|
93
|
+
component: ({ data }) => <SpaceSettingsContainer space={data.subject} />,
|
|
93
94
|
}),
|
|
94
95
|
createSurface({
|
|
95
|
-
id: `${SPACE_PLUGIN}/object-settings
|
|
96
|
-
role: '
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
component: ({ data }) => <
|
|
96
|
+
id: `${SPACE_PLUGIN}/companion/object-settings`,
|
|
97
|
+
role: 'article',
|
|
98
|
+
filter: (data): data is { companionTo: ReactiveEchoObject<any> } =>
|
|
99
|
+
isEchoObject(data.companionTo) && data.subject === 'settings',
|
|
100
|
+
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
100
101
|
}),
|
|
101
102
|
createSurface({
|
|
102
|
-
id:
|
|
103
|
-
role: '
|
|
104
|
-
filter: (data): data is {
|
|
105
|
-
component: ({ data }) => <
|
|
103
|
+
id: `${SPACE_PLUGIN}/space-settings--properties`,
|
|
104
|
+
role: 'space-settings--properties',
|
|
105
|
+
filter: (data): data is { subject: Space } => isSpace(data.subject),
|
|
106
|
+
component: ({ data }) => <SpacePropertiesForm space={data.subject} />,
|
|
106
107
|
}),
|
|
107
108
|
createSurface({
|
|
108
109
|
id: JOIN_DIALOG,
|
|
@@ -152,14 +153,15 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
152
153
|
return <SmallPresenceLive id={data.id} open={data.open} viewers={state.viewersByObject[data.id]} />;
|
|
153
154
|
},
|
|
154
155
|
}),
|
|
156
|
+
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
155
157
|
createSurface({
|
|
156
|
-
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
157
158
|
id: `${SPACE_PLUGIN}/navtree-presence-fallback`,
|
|
158
159
|
role: 'navtree-item-end',
|
|
159
160
|
position: 'fallback',
|
|
160
161
|
filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
|
|
161
162
|
component: ({ data }) => <SmallPresenceLive id={data.id} open={data.open} />,
|
|
162
163
|
}),
|
|
164
|
+
// TODO(wittjosiah): Broken?
|
|
163
165
|
createSurface({
|
|
164
166
|
id: `${SPACE_PLUGIN}/navtree-sync-status`,
|
|
165
167
|
role: 'navtree-item-end',
|
|
@@ -186,11 +188,11 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
186
188
|
createSurface({
|
|
187
189
|
id: `${SPACE_PLUGIN}/collection-section`,
|
|
188
190
|
role: 'section',
|
|
189
|
-
filter: (data): data is { subject: CollectionType } => data.subject
|
|
191
|
+
filter: (data): data is { subject: CollectionType } => isInstanceOf(CollectionType, data.subject),
|
|
190
192
|
component: ({ data }) => <CollectionSection collection={data.subject} />,
|
|
191
193
|
}),
|
|
192
194
|
createSurface({
|
|
193
|
-
id: `${SPACE_PLUGIN}/settings`,
|
|
195
|
+
id: `${SPACE_PLUGIN}/plugin-settings`,
|
|
194
196
|
role: 'article',
|
|
195
197
|
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
196
198
|
data.subject instanceof SettingsStore && data.subject.prefix === SPACE_PLUGIN,
|
|
@@ -10,7 +10,7 @@ import { type Space } from '@dxos/client/echo';
|
|
|
10
10
|
import { FormatEnum, FormatEnums, S, SelectOptionSchema, GeoPoint, toJsonSchema } from '@dxos/echo-schema';
|
|
11
11
|
import { invariant } from '@dxos/invariant';
|
|
12
12
|
import { hues } from '@dxos/react-ui-theme';
|
|
13
|
-
import {
|
|
13
|
+
import { getSchemaFromPropertyDefinitions } from '@dxos/schema';
|
|
14
14
|
|
|
15
15
|
// TODO(burdon): Factor out.
|
|
16
16
|
declare global {
|
|
@@ -115,7 +115,7 @@ export default () =>
|
|
|
115
115
|
invariant(extensions?.space, 'No space.');
|
|
116
116
|
const space = extensions.space;
|
|
117
117
|
|
|
118
|
-
const schema =
|
|
118
|
+
const schema = getSchemaFromPropertyDefinitions(typename, properties);
|
|
119
119
|
const [registeredSchema] = await space.db.schemaRegistry.register([schema]);
|
|
120
120
|
|
|
121
121
|
return ToolResult.Success(registeredSchema);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { contributes, createIntent, type PluginsContext, Capabilities, LayoutAction } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { SubscriptionList } from '@dxos/async';
|
|
7
7
|
import { Expando } from '@dxos/echo-schema';
|
|
8
8
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
9
9
|
import { create } from '@dxos/live-object';
|
|
@@ -24,8 +24,8 @@ const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
|
24
24
|
const WAIT_FOR_OBJECT_TIMEOUT = 1000;
|
|
25
25
|
|
|
26
26
|
export default async (context: PluginsContext) => {
|
|
27
|
-
const subscriptions = new
|
|
28
|
-
const spaceSubscriptions = new
|
|
27
|
+
const subscriptions = new SubscriptionList();
|
|
28
|
+
const spaceSubscriptions = new SubscriptionList();
|
|
29
29
|
|
|
30
30
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
31
31
|
const { graph } = context.requestCapability(Capabilities.AppGraph);
|
|
@@ -14,9 +14,11 @@ import { SPACE_PLUGIN } from '../meta';
|
|
|
14
14
|
import { type PluginState } from '../types';
|
|
15
15
|
|
|
16
16
|
export default (context: PluginsContext) => {
|
|
17
|
+
const sections = context.requestCapabilities(SpaceCapabilities.SettingsSection);
|
|
17
18
|
const state = new LocalStorageStore<PluginState>(SPACE_PLUGIN, {
|
|
18
19
|
awaiting: undefined,
|
|
19
20
|
spaceNames: {},
|
|
21
|
+
spaceSettingsOpenSections: sections.map((section) => section.id),
|
|
20
22
|
viewersByObject: {},
|
|
21
23
|
// TODO(wittjosiah): Stop using (Complex)Map inside reactive object.
|
|
22
24
|
viewersByIdentity: new ComplexMap(PublicKey.hash),
|
|
@@ -22,7 +22,7 @@ import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
|
22
22
|
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
23
23
|
import { SpaceCapabilities } from '../../capabilities';
|
|
24
24
|
import { SPACE_PLUGIN } from '../../meta';
|
|
25
|
-
import {
|
|
25
|
+
import { type ObjectForm, SpaceAction } from '../../types';
|
|
26
26
|
|
|
27
27
|
export const CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
28
28
|
|
|
@@ -53,16 +53,13 @@ export const CreateObjectDialog = ({
|
|
|
53
53
|
const handleCreateObject = useCallback(
|
|
54
54
|
async ({
|
|
55
55
|
form,
|
|
56
|
-
target
|
|
56
|
+
target,
|
|
57
57
|
data = {},
|
|
58
58
|
}: {
|
|
59
59
|
form: ObjectForm;
|
|
60
60
|
target: CreateObjectPanelProps['target'];
|
|
61
61
|
data?: Record<string, any>;
|
|
62
62
|
}) => {
|
|
63
|
-
const target = isSpace(_target)
|
|
64
|
-
? (_target.properties[CollectionType.typename]?.target as CollectionType | undefined)
|
|
65
|
-
: _target;
|
|
66
63
|
if (!target) {
|
|
67
64
|
// TODO(wittjosiah): UI feedback.
|
|
68
65
|
return;
|
|
@@ -76,7 +73,7 @@ export const CreateObjectDialog = ({
|
|
|
76
73
|
const result = await dispatch(form.getIntent(data, { space }));
|
|
77
74
|
const object = result.data?.object;
|
|
78
75
|
if (isReactiveObject(object)) {
|
|
79
|
-
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object });
|
|
76
|
+
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object, hidden: form.hidden });
|
|
80
77
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
81
78
|
if (shouldNavigate(object)) {
|
|
82
79
|
await dispatch(pipe(addObjectIntent, chain(LayoutAction.Open, { part: 'main' })));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface, isSurfaceAvailable, usePluginManager } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { getTypeAnnotation, type TypeAnnotation, type S } from '@dxos/echo-schema';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { type SpaceId, type Space } from '@dxos/react-client/echo';
|
|
11
11
|
import { Icon, type ThemedClassName, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
@@ -69,9 +69,9 @@ export const CreateObjectPanel = ({
|
|
|
69
69
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
70
70
|
const [typename, setTypename] = useState<string | undefined>(initialTypename);
|
|
71
71
|
const [target, setTarget] = useState<Space | CollectionType | undefined>(initialTarget);
|
|
72
|
-
const form = forms.find((form) =>
|
|
73
|
-
const options:
|
|
74
|
-
.map((form) =>
|
|
72
|
+
const form = forms.find((form) => getTypeAnnotation(form.objectSchema)?.typename === typename);
|
|
73
|
+
const options: TypeAnnotation[] = forms
|
|
74
|
+
.map((form) => getTypeAnnotation(form.objectSchema))
|
|
75
75
|
.filter(isNonNullable)
|
|
76
76
|
.sort((a, b) => {
|
|
77
77
|
const nameA = t('typename label', { ns: a.typename, defaultValue: a.typename });
|
|
@@ -92,7 +92,7 @@ export const CreateObjectPanel = ({
|
|
|
92
92
|
const handleSetTypename = useCallback(
|
|
93
93
|
async (typename: string) => {
|
|
94
94
|
invariant(target, 'target is required');
|
|
95
|
-
const form = forms.find((form) =>
|
|
95
|
+
const form = forms.find((form) => getTypeAnnotation(form.objectSchema)?.typename === typename);
|
|
96
96
|
if (form && !form.formSchema) {
|
|
97
97
|
await onCreateObject?.({ form, target });
|
|
98
98
|
} else {
|
|
@@ -170,7 +170,7 @@ const SelectSchema = ({
|
|
|
170
170
|
resolve,
|
|
171
171
|
onChange,
|
|
172
172
|
}: {
|
|
173
|
-
options:
|
|
173
|
+
options: TypeAnnotation[];
|
|
174
174
|
onChange: (type: string) => void;
|
|
175
175
|
} & Pick<CreateObjectPanelProps, 'resolve'>) => {
|
|
176
176
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { createIntent, LayoutAction, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { Trigger } from '@dxos/async';
|
|
9
9
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
10
10
|
import { useClient } from '@dxos/react-client';
|
|
11
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
11
12
|
import { type InvitationResult } from '@dxos/react-client/invitations';
|
|
12
13
|
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
13
14
|
import { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';
|
|
@@ -28,34 +29,44 @@ export const JoinDialog = ({ navigableCollections, onDone, ...props }: JoinDialo
|
|
|
28
29
|
|
|
29
30
|
const handleDone = useCallback(
|
|
30
31
|
async (result: InvitationResult | null) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
createIntent(LayoutAction.AddToast, {
|
|
35
|
-
part: 'toast',
|
|
36
|
-
subject: {
|
|
37
|
-
id: `${SPACE_PLUGIN}/join-success`,
|
|
38
|
-
duration: 5_000,
|
|
39
|
-
title: ['join success label', { ns: SPACE_PLUGIN }],
|
|
40
|
-
closeLabel: ['dismiss label', { ns: SPACE_PLUGIN }],
|
|
41
|
-
},
|
|
42
|
-
}),
|
|
43
|
-
),
|
|
44
|
-
dispatch(
|
|
45
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
46
|
-
part: 'dialog',
|
|
47
|
-
options: {
|
|
48
|
-
state: false,
|
|
49
|
-
},
|
|
50
|
-
}),
|
|
51
|
-
),
|
|
52
|
-
]);
|
|
32
|
+
const spaceKey = result?.spaceKey;
|
|
33
|
+
if (!spaceKey) {
|
|
34
|
+
return;
|
|
53
35
|
}
|
|
54
36
|
|
|
55
|
-
|
|
37
|
+
await Promise.all([
|
|
38
|
+
dispatch(
|
|
39
|
+
createIntent(LayoutAction.AddToast, {
|
|
40
|
+
part: 'toast',
|
|
41
|
+
subject: {
|
|
42
|
+
id: `${SPACE_PLUGIN}/join-success`,
|
|
43
|
+
duration: 5_000,
|
|
44
|
+
title: ['join success label', { ns: SPACE_PLUGIN }],
|
|
45
|
+
closeLabel: ['dismiss label', { ns: SPACE_PLUGIN }],
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
),
|
|
49
|
+
dispatch(
|
|
50
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
51
|
+
part: 'dialog',
|
|
52
|
+
options: {
|
|
53
|
+
state: false,
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
),
|
|
57
|
+
]);
|
|
58
|
+
|
|
59
|
+
let space = client.spaces.get(spaceKey);
|
|
56
60
|
if (!space) {
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
// TODO(wittjosiah): Add api to wait for a space.
|
|
62
|
+
const trigger = new Trigger<Space>();
|
|
63
|
+
client.spaces.subscribe(() => {
|
|
64
|
+
const space = client.spaces.get(spaceKey);
|
|
65
|
+
if (space) {
|
|
66
|
+
trigger.wake(space);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
space = await trigger.wait();
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: space.id }));
|
|
@@ -78,7 +89,12 @@ export const JoinDialog = ({ navigableCollections, onDone, ...props }: JoinDialo
|
|
|
78
89
|
|
|
79
90
|
if (space) {
|
|
80
91
|
await dispatch(
|
|
81
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
92
|
+
createIntent(ObservabilityAction.SendEvent, {
|
|
93
|
+
name: 'space.join',
|
|
94
|
+
properties: {
|
|
95
|
+
spaceId: space.id,
|
|
96
|
+
},
|
|
97
|
+
}),
|
|
82
98
|
);
|
|
83
99
|
}
|
|
84
100
|
},
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxos-theme';
|
|
6
|
+
|
|
7
|
+
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
|
+
|
|
9
|
+
import { withClientProvider } from '@dxos/react-client/testing';
|
|
10
|
+
import { osTranslations } from '@dxos/shell/react';
|
|
11
|
+
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
12
|
+
|
|
13
|
+
import { MembersContainer } from './MembersContainer';
|
|
14
|
+
import translations from '../translations';
|
|
15
|
+
|
|
16
|
+
const meta: Meta = {
|
|
17
|
+
title: 'plugins/plugin-space/MembersContainer',
|
|
18
|
+
component: MembersContainer,
|
|
19
|
+
decorators: [
|
|
20
|
+
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
21
|
+
withTheme,
|
|
22
|
+
withLayout({ tooltips: true }),
|
|
23
|
+
],
|
|
24
|
+
parameters: {
|
|
25
|
+
layout: 'fullscreen',
|
|
26
|
+
translations: [...translations, osTranslations],
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default meta;
|
|
31
|
+
|
|
32
|
+
type Story = StoryObj<typeof MembersContainer>;
|
|
33
|
+
|
|
34
|
+
export const Default: Story = {};
|