@dxos/plugin-space 0.8.1 → 0.8.2-main.2f9c567
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-GMFCSOLG.mjs → app-graph-builder-I2BU35J5.mjs} +61 -7
- package/dist/lib/browser/app-graph-builder-I2BU35J5.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-DSF2U3A5.mjs → app-graph-serializer-HPYDOKA5.mjs} +8 -8
- package/dist/lib/browser/app-graph-serializer-HPYDOKA5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5BDV575R.mjs → chunk-OS5QKO4Z.mjs} +20 -8
- package/dist/lib/browser/chunk-OS5QKO4Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-LO5UL6RU.mjs → chunk-RERTVPBV.mjs} +60 -141
- package/dist/lib/browser/chunk-RERTVPBV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JZXWPMLA.mjs → chunk-TSX67XGX.mjs} +526 -670
- package/dist/lib/browser/chunk-TSX67XGX.mjs.map +7 -0
- package/dist/lib/browser/chunk-YQNBTJI4.mjs +308 -0
- package/dist/lib/browser/chunk-YQNBTJI4.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-JR7BNXFH.mjs → identity-created-DWFKBGOA.mjs} +4 -4
- package/dist/lib/browser/identity-created-DWFKBGOA.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +19 -40
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-RKYILWWQ.mjs → intent-resolver-GKDCJ4H2.mjs} +92 -82
- package/dist/lib/browser/intent-resolver-GKDCJ4H2.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-6H7NX2M2.mjs → react-root-667IZ2Q4.mjs} +4 -4
- package/dist/lib/browser/{react-surface-7AGLOVMK.mjs → react-surface-I4RNTGGN.mjs} +121 -47
- package/dist/lib/browser/react-surface-I4RNTGGN.mjs.map +7 -0
- package/dist/lib/browser/{schema-FHTA26SW.mjs → schema-defs-FLFEUSLB.mjs} +4 -4
- package/dist/lib/browser/{schema-FHTA26SW.mjs.map → schema-defs-FLFEUSLB.mjs.map} +2 -2
- package/dist/lib/browser/{schema-tools-YAXPRIXP.mjs → schema-tools-MYC4LTQD.mjs} +22 -22
- package/dist/lib/browser/schema-tools-MYC4LTQD.mjs.map +7 -0
- package/dist/lib/browser/{settings-PJPTJUPE.mjs → settings-ILGGNYJ7.mjs} +4 -4
- package/dist/lib/browser/settings-ILGGNYJ7.mjs.map +7 -0
- package/dist/lib/browser/{spaces-ready-BSSP7HHG.mjs → spaces-ready-IXZF3RWW.mjs} +5 -5
- package/dist/lib/browser/spaces-ready-IXZF3RWW.mjs.map +7 -0
- package/dist/lib/browser/{state-X7VLCC6E.mjs → state-CYV6QCTN.mjs} +1 -3
- package/dist/lib/browser/state-CYV6QCTN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -1
- package/dist/lib/node/{app-graph-builder-DPY7AUZE.cjs → app-graph-builder-H7MDHM3X.cjs} +83 -30
- package/dist/lib/node/app-graph-builder-H7MDHM3X.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-JELGJUAY.cjs → app-graph-serializer-G7UYFWG6.cjs} +20 -20
- package/dist/lib/node/app-graph-serializer-G7UYFWG6.cjs.map +7 -0
- package/dist/lib/node/chunk-AR3JHVCY.cjs +336 -0
- package/dist/lib/node/chunk-AR3JHVCY.cjs.map +7 -0
- package/dist/lib/node/{chunk-TUZWEPGX.cjs → chunk-EG3WAZLA.cjs} +84 -167
- package/dist/lib/node/chunk-EG3WAZLA.cjs.map +7 -0
- package/dist/lib/node/{chunk-3GKCNADA.cjs → chunk-HD4C6KKO.cjs} +517 -659
- package/dist/lib/node/chunk-HD4C6KKO.cjs.map +7 -0
- package/dist/lib/node/{chunk-PU2EYH4E.cjs → chunk-NCSFM6RA.cjs} +24 -12
- package/dist/lib/node/chunk-NCSFM6RA.cjs.map +7 -0
- package/dist/lib/node/{identity-created-XU4HFV2T.cjs → identity-created-YLGVEWAJ.cjs} +6 -6
- package/dist/lib/node/identity-created-YLGVEWAJ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +73 -94
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VJ7YV74L.cjs → intent-resolver-V7UJKLE7.cjs} +141 -131
- package/dist/lib/node/intent-resolver-V7UJKLE7.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-TEL5RW3N.cjs → react-root-I3SSFA5O.cjs} +8 -8
- package/dist/lib/node/{react-surface-2H3S5TY5.cjs → react-surface-OLMQCCYD.cjs} +146 -74
- package/dist/lib/node/react-surface-OLMQCCYD.cjs.map +7 -0
- package/dist/lib/node/{schema-PPJ5BZ3A.cjs → schema-defs-PKZVL52M.cjs} +6 -6
- package/dist/lib/node/{schema-PPJ5BZ3A.cjs.map → schema-defs-PKZVL52M.cjs.map} +2 -2
- package/dist/lib/node/{schema-tools-BLIMOZYY.cjs → schema-tools-OE3MFYYH.cjs} +24 -24
- package/dist/lib/node/schema-tools-OE3MFYYH.cjs.map +7 -0
- package/dist/lib/node/{settings-WVFP2UEP.cjs → settings-7TC55JP4.cjs} +7 -7
- package/dist/lib/node/settings-7TC55JP4.cjs.map +7 -0
- package/dist/lib/node/{spaces-ready-7DNZSUOG.cjs → spaces-ready-4H3Q46GV.cjs} +12 -12
- package/dist/lib/node/spaces-ready-4H3Q46GV.cjs.map +7 -0
- package/dist/lib/node/{state-5KX6WBJH.cjs → state-JLN7TGRR.cjs} +4 -6
- package/dist/lib/node/state-JLN7TGRR.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +18 -12
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/{app-graph-builder-42IGWRPL.mjs → app-graph-builder-NI7X6W3Q.mjs} +61 -7
- package/dist/lib/node-esm/app-graph-builder-NI7X6W3Q.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-FXONFKOE.mjs → app-graph-serializer-CVPYWWW3.mjs} +8 -8
- package/dist/lib/node-esm/app-graph-serializer-CVPYWWW3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZGLK25WQ.mjs → chunk-B2P24Q5R.mjs} +60 -141
- package/dist/lib/node-esm/chunk-B2P24Q5R.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BEWBZ4Q4.mjs → chunk-BU6F7ZU4.mjs} +526 -670
- package/dist/lib/node-esm/chunk-BU6F7ZU4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3ZOUV4DF.mjs → chunk-FUH5OODY.mjs} +20 -8
- package/dist/lib/node-esm/chunk-FUH5OODY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RUWTHAV7.mjs +309 -0
- package/dist/lib/node-esm/chunk-RUWTHAV7.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-WJKAS2PV.mjs → identity-created-7NHGER3Q.mjs} +4 -4
- package/dist/lib/node-esm/identity-created-7NHGER3Q.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +19 -40
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-ZFNSA4CM.mjs → intent-resolver-IL63YTIT.mjs} +92 -82
- package/dist/lib/node-esm/intent-resolver-IL63YTIT.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-PRBJMWLQ.mjs → react-root-JEGVIVVK.mjs} +4 -4
- package/dist/lib/node-esm/{react-surface-RCZG2PNF.mjs → react-surface-DRRXIJBE.mjs} +121 -47
- package/dist/lib/node-esm/react-surface-DRRXIJBE.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-OUZKVYM5.mjs → schema-defs-IIEQR7B3.mjs} +4 -4
- package/dist/lib/node-esm/{schema-OUZKVYM5.mjs.map → schema-defs-IIEQR7B3.mjs.map} +2 -2
- package/dist/lib/node-esm/{schema-tools-IU7EX5A5.mjs → schema-tools-YTJLA3NQ.mjs} +22 -22
- package/dist/lib/node-esm/schema-tools-YTJLA3NQ.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-FJZPC2TV.mjs → settings-CXMV2AFR.mjs} +4 -4
- package/dist/lib/node-esm/settings-CXMV2AFR.mjs.map +7 -0
- package/dist/lib/node-esm/{spaces-ready-7X5PGB2V.mjs → spaces-ready-QMXLQ4QV.mjs} +5 -5
- package/dist/lib/node-esm/spaces-ready-QMXLQ4QV.mjs.map +7 -0
- package/dist/lib/node-esm/{state-Z6E2YTNC.mjs → state-YZPY5T5A.mjs} +1 -3
- package/dist/lib/node-esm/state-YZPY5T5A.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -1
- 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/index.d.ts +3 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -1
- 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/{schema.d.ts → schema-defs.d.ts} +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-tools.d.ts +2 -2
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +2 -2
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/PopoverAddSpace.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts +13 -0
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +0 -2
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +7 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/index.d.ts +0 -1
- package/dist/types/src/components/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -8
- package/dist/types/src/components/SyncStatus/SyncStatus.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/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +14 -0
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +45 -9
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/collection.d.ts +9 -8
- package/dist/types/src/types/collection.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +329 -110
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +167 -140
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +31 -9
- package/dist/types/src/util.d.ts.map +1 -1
- package/package.json +46 -44
- package/src/SpacePlugin.tsx +11 -20
- package/src/capabilities/app-graph-builder.ts +47 -8
- package/src/capabilities/app-graph-serializer.ts +4 -4
- package/src/capabilities/identity-created.ts +2 -2
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/intent-resolver.ts +87 -84
- package/src/capabilities/react-surface.tsx +111 -42
- package/src/capabilities/schema-tool.test.ts +2 -3
- package/src/capabilities/schema-tools.ts +25 -25
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +2 -2
- package/src/capabilities/state.ts +0 -2
- package/src/components/CollectionMain.tsx +2 -5
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +2 -2
- package/src/components/CreateDialog/CreateObjectDialog.tsx +3 -3
- package/src/components/CreateDialog/CreateObjectPanel.tsx +3 -25
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +6 -3
- package/src/components/MembersContainer.tsx +80 -54
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.tsx +2 -2
- package/src/components/PopoverAddSpace.tsx +9 -3
- package/src/components/PopoverRenameObject.tsx +14 -8
- package/src/components/PopoverRenameSpace.tsx +8 -0
- package/src/components/SchemaContainer.tsx +59 -0
- package/src/components/SpacePluginSettings.tsx +27 -2
- package/src/components/SpacePresence.tsx +29 -25
- package/src/components/SpaceSettings/{SpacePropertiesForm.stories.tsx → SpaceSettingsContainer.stories.tsx} +6 -6
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +159 -39
- package/src/components/SpaceSettings/index.ts +0 -1
- package/src/components/SyncStatus/InlineSyncStatus.tsx +5 -7
- package/src/components/SyncStatus/SyncStatus.tsx +6 -69
- package/src/components/index.ts +2 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useInputSurfaceLookup.tsx +31 -0
- package/src/translations.ts +18 -5
- package/src/types/collection.ts +6 -4
- package/src/types/thread.ts +14 -8
- package/src/types/types.ts +128 -101
- package/src/util.tsx +52 -112
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-DSF2U3A5.mjs.map +0 -7
- package/dist/lib/browser/chunk-5BDV575R.mjs.map +0 -7
- package/dist/lib/browser/chunk-AYW4IDRT.mjs +0 -275
- package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +0 -7
- package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +0 -7
- package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +0 -7
- package/dist/lib/browser/identity-created-JR7BNXFH.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
- package/dist/lib/browser/settings-PJPTJUPE.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +0 -7
- package/dist/lib/browser/state-X7VLCC6E.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-JELGJUAY.cjs.map +0 -7
- package/dist/lib/node/chunk-3GKCNADA.cjs.map +0 -7
- package/dist/lib/node/chunk-PU2EYH4E.cjs.map +0 -7
- package/dist/lib/node/chunk-TUZWEPGX.cjs.map +0 -7
- package/dist/lib/node/chunk-WDEIFDTX.cjs +0 -300
- package/dist/lib/node/chunk-WDEIFDTX.cjs.map +0 -7
- package/dist/lib/node/identity-created-XU4HFV2T.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +0 -7
- package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +0 -7
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
- package/dist/lib/node/settings-WVFP2UEP.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +0 -7
- package/dist/lib/node/state-5KX6WBJH.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-FXONFKOE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs +0 -276
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-WJKAS2PV.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
- package/dist/lib/node-esm/settings-FJZPC2TV.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +0 -7
- package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +0 -7
- package/dist/types/src/capabilities/schema.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/ShareSpaceButton.d.ts +0 -9
- package/dist/types/src/components/ShareSpaceButton.d.ts.map +0 -1
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts +0 -10
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/Space.d.ts +0 -13
- package/dist/types/src/components/SyncStatus/Space.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts +0 -9
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/sync-state.d.ts +0 -18
- package/dist/types/src/components/SyncStatus/sync-state.d.ts.map +0 -1
- package/src/components/ShareSpaceButton.stories.tsx +0 -27
- package/src/components/ShareSpaceButton.tsx +0 -32
- package/src/components/SpaceSettings/SpacePropertiesForm.tsx +0 -136
- package/src/components/SyncStatus/Space.tsx +0 -133
- package/src/components/SyncStatus/SyncStatusDetail.stories.tsx +0 -89
- package/src/components/SyncStatus/sync-state.ts +0 -101
- /package/dist/lib/browser/{react-root-6H7NX2M2.mjs.map → react-root-667IZ2Q4.mjs.map} +0 -0
- /package/dist/lib/node/{react-root-TEL5RW3N.cjs.map → react-root-I3SSFA5O.cjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-PRBJMWLQ.mjs.map → react-root-JEGVIVVK.mjs.map} +0 -0
- /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.d.ts +0 -0
- /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/index.d.ts +0 -0
- /package/src/capabilities/{schema.ts → schema-defs.ts} +0 -0
- /package/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.tsx +0 -0
- /package/src/components/{ObjectSettingsContainer → ObjectSettings}/index.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-space",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-main.2f9c567",
|
|
4
4
|
"description": "DXOS Surface plugin for DXOS ECHO Spaces",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -34,49 +34,50 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
|
-
"effect": "3.
|
|
37
|
+
"effect": "3.14.21",
|
|
38
38
|
"jszip": "^3.10.1",
|
|
39
39
|
"localforage": "^1.10.0",
|
|
40
40
|
"lodash.get": "^4.4.2",
|
|
41
41
|
"react-drag-drop-files": "^2.3.8",
|
|
42
42
|
"react-is": "~18.2.0",
|
|
43
43
|
"react-qr-rounded": "^1.0.0",
|
|
44
|
-
"@dxos/app-framework": "0.8.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/automerge": "0.8.
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/echo-signals": "0.8.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/plugin-
|
|
62
|
-
"@dxos/plugin-observability": "0.8.
|
|
63
|
-
"@dxos/plugin-
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/react-
|
|
68
|
-
"@dxos/react-
|
|
69
|
-
"@dxos/react-ui-
|
|
70
|
-
"@dxos/react-ui-
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/react-ui-list": "0.8.
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/react-ui-
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
44
|
+
"@dxos/app-framework": "0.8.2-main.2f9c567",
|
|
45
|
+
"@dxos/artifact": "0.8.2-main.2f9c567",
|
|
46
|
+
"@dxos/async": "0.8.2-main.2f9c567",
|
|
47
|
+
"@dxos/context": "0.8.2-main.2f9c567",
|
|
48
|
+
"@dxos/automerge": "0.8.2-main.2f9c567",
|
|
49
|
+
"@dxos/display-name": "0.8.2-main.2f9c567",
|
|
50
|
+
"@dxos/client": "0.8.2-main.2f9c567",
|
|
51
|
+
"@dxos/echo-schema": "0.8.2-main.2f9c567",
|
|
52
|
+
"@dxos/echo-signals": "0.8.2-main.2f9c567",
|
|
53
|
+
"@dxos/effect": "0.8.2-main.2f9c567",
|
|
54
|
+
"@dxos/invariant": "0.8.2-main.2f9c567",
|
|
55
|
+
"@dxos/keys": "0.8.2-main.2f9c567",
|
|
56
|
+
"@dxos/live-object": "0.8.2-main.2f9c567",
|
|
57
|
+
"@dxos/local-storage": "0.8.2-main.2f9c567",
|
|
58
|
+
"@dxos/log": "0.8.2-main.2f9c567",
|
|
59
|
+
"@dxos/plugin-client": "0.8.2-main.2f9c567",
|
|
60
|
+
"@dxos/migrations": "0.8.2-main.2f9c567",
|
|
61
|
+
"@dxos/plugin-deck": "0.8.2-main.2f9c567",
|
|
62
|
+
"@dxos/plugin-observability": "0.8.2-main.2f9c567",
|
|
63
|
+
"@dxos/plugin-graph": "0.8.2-main.2f9c567",
|
|
64
|
+
"@dxos/plugin-attention": "0.8.2-main.2f9c567",
|
|
65
|
+
"@dxos/protocols": "0.8.2-main.2f9c567",
|
|
66
|
+
"@dxos/plugin-status-bar": "0.8.2-main.2f9c567",
|
|
67
|
+
"@dxos/react-client": "0.8.2-main.2f9c567",
|
|
68
|
+
"@dxos/react-ui-attention": "0.8.2-main.2f9c567",
|
|
69
|
+
"@dxos/react-ui-form": "0.8.2-main.2f9c567",
|
|
70
|
+
"@dxos/react-ui-editor": "0.8.2-main.2f9c567",
|
|
71
|
+
"@dxos/react-ui-pickers": "0.8.2-main.2f9c567",
|
|
72
|
+
"@dxos/react-ui-list": "0.8.2-main.2f9c567",
|
|
73
|
+
"@dxos/react-ui-searchlist": "0.8.2-main.2f9c567",
|
|
74
|
+
"@dxos/react-ui-stack": "0.8.2-main.2f9c567",
|
|
75
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.2f9c567",
|
|
76
|
+
"@dxos/react-ui-tabs": "0.8.2-main.2f9c567",
|
|
77
|
+
"@dxos/react-ui-theme": "0.8.2-main.2f9c567",
|
|
78
|
+
"@dxos/schema": "0.8.2-main.2f9c567",
|
|
79
|
+
"@dxos/shell": "0.8.2-main.2f9c567",
|
|
80
|
+
"@dxos/util": "0.8.2-main.2f9c567"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"@babel/core": "^7.18.13",
|
|
@@ -87,17 +88,18 @@
|
|
|
87
88
|
"react": "~18.2.0",
|
|
88
89
|
"react-dom": "~18.2.0",
|
|
89
90
|
"vite": "5.4.7",
|
|
90
|
-
"@dxos/random": "0.8.
|
|
91
|
-
"@dxos/react-ui
|
|
92
|
-
"@dxos/react-ui": "0.8.
|
|
93
|
-
"@dxos/storybook-utils": "0.8.
|
|
91
|
+
"@dxos/random": "0.8.2-main.2f9c567",
|
|
92
|
+
"@dxos/react-ui": "0.8.2-main.2f9c567",
|
|
93
|
+
"@dxos/react-ui-theme": "0.8.2-main.2f9c567",
|
|
94
|
+
"@dxos/storybook-utils": "0.8.2-main.2f9c567"
|
|
94
95
|
},
|
|
95
96
|
"peerDependencies": {
|
|
96
97
|
"@phosphor-icons/react": "^2.1.5",
|
|
98
|
+
"effect": "^3.13.3",
|
|
97
99
|
"react": "~18.2.0",
|
|
98
100
|
"react-dom": "~18.2.0",
|
|
99
|
-
"@dxos/react-ui
|
|
100
|
-
"@dxos/react-ui": "0.8.
|
|
101
|
+
"@dxos/react-ui": "0.8.2-main.2f9c567",
|
|
102
|
+
"@dxos/react-ui-theme": "0.8.2-main.2f9c567"
|
|
101
103
|
},
|
|
102
104
|
"publishConfig": {
|
|
103
105
|
"access": "public"
|
package/src/SpacePlugin.tsx
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
|
|
5
7
|
import {
|
|
6
8
|
allOf,
|
|
7
9
|
Capabilities,
|
|
@@ -12,10 +14,9 @@ import {
|
|
|
12
14
|
Events,
|
|
13
15
|
oneOf,
|
|
14
16
|
} from '@dxos/app-framework';
|
|
15
|
-
import { S } from '@dxos/echo-schema';
|
|
16
|
-
import { RefArray } from '@dxos/live-object';
|
|
17
17
|
import { AttentionEvents } from '@dxos/plugin-attention';
|
|
18
18
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
19
|
+
import { RefArray } from '@dxos/react-client/echo';
|
|
19
20
|
import { osTranslations } from '@dxos/shell/react';
|
|
20
21
|
|
|
21
22
|
import {
|
|
@@ -25,15 +26,15 @@ import {
|
|
|
25
26
|
IntentResolver,
|
|
26
27
|
ReactRoot,
|
|
27
28
|
ReactSurface,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
SchemaDefs,
|
|
30
|
+
SchemaTools,
|
|
30
31
|
SpaceCapabilities,
|
|
31
32
|
SpaceSettings,
|
|
32
33
|
SpacesReady,
|
|
33
34
|
SpaceState,
|
|
34
35
|
} from './capabilities';
|
|
35
36
|
import { SpaceEvents } from './events';
|
|
36
|
-
import { meta
|
|
37
|
+
import { meta } from './meta';
|
|
37
38
|
import translations from './translations';
|
|
38
39
|
import { CollectionAction, CollectionType, defineObjectForm } from './types';
|
|
39
40
|
|
|
@@ -57,7 +58,7 @@ export type SpacePluginOptions = {
|
|
|
57
58
|
export const SpacePlugin = ({
|
|
58
59
|
invitationUrl = window.location.origin,
|
|
59
60
|
invitationParam = 'spaceInvitationCode',
|
|
60
|
-
observability =
|
|
61
|
+
observability = false,
|
|
61
62
|
}: SpacePluginOptions = {}) => {
|
|
62
63
|
const createInvitationUrl = (invitationCode: string) => {
|
|
63
64
|
const baseUrl = new URL(invitationUrl);
|
|
@@ -107,26 +108,16 @@ export const SpacePlugin = ({
|
|
|
107
108
|
SpaceCapabilities.ObjectForm,
|
|
108
109
|
defineObjectForm({
|
|
109
110
|
objectSchema: CollectionType,
|
|
110
|
-
formSchema:
|
|
111
|
+
formSchema: Schema.Struct({ name: Schema.optional(Schema.String) }),
|
|
111
112
|
getIntent: (props) => createIntent(CollectionAction.Create, props),
|
|
112
113
|
}),
|
|
113
114
|
),
|
|
114
115
|
}),
|
|
115
|
-
defineModule({
|
|
116
|
-
id: `${meta.id}/module/space-settings`,
|
|
117
|
-
activatesOn: SpaceEvents.SetupSettingsPanel,
|
|
118
|
-
activate: () =>
|
|
119
|
-
contributes(SpaceCapabilities.SettingsSection, {
|
|
120
|
-
id: 'properties',
|
|
121
|
-
label: ['space settings properties label', { ns: SPACE_PLUGIN }],
|
|
122
|
-
position: 'hoist',
|
|
123
|
-
}),
|
|
124
|
-
}),
|
|
125
116
|
defineModule({
|
|
126
117
|
id: `${meta.id}/module/schema`,
|
|
127
118
|
activatesOn: ClientEvents.ClientReady,
|
|
128
119
|
activatesBefore: [ClientEvents.SetupSchema],
|
|
129
|
-
activate:
|
|
120
|
+
activate: SchemaDefs,
|
|
130
121
|
}),
|
|
131
122
|
defineModule({
|
|
132
123
|
id: `${meta.id}/module/react-root`,
|
|
@@ -143,7 +134,7 @@ export const SpacePlugin = ({
|
|
|
143
134
|
defineModule({
|
|
144
135
|
id: `${meta.id}/module/intent-resolver`,
|
|
145
136
|
activatesOn: Events.SetupIntentResolver,
|
|
146
|
-
activate: (context) => IntentResolver({ context, observability }),
|
|
137
|
+
activate: (context) => IntentResolver({ context, createInvitationUrl, observability }),
|
|
147
138
|
}),
|
|
148
139
|
defineModule({
|
|
149
140
|
id: `${meta.id}/module/app-graph-builder`,
|
|
@@ -177,7 +168,7 @@ export const SpacePlugin = ({
|
|
|
177
168
|
defineModule({
|
|
178
169
|
id: `${meta.id}/module/tools`,
|
|
179
170
|
activatesOn: Events.SetupArtifactDefinition,
|
|
180
|
-
activate:
|
|
171
|
+
activate: SchemaTools,
|
|
181
172
|
}),
|
|
182
173
|
]);
|
|
183
174
|
};
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
FQ_ID_LENGTH,
|
|
10
10
|
getSpace,
|
|
11
11
|
isEchoObject,
|
|
12
|
-
isSpace,
|
|
13
12
|
OBJECT_ID_LENGTH,
|
|
14
|
-
type
|
|
13
|
+
type AnyLiveObject,
|
|
15
14
|
SPACE_ID_LENGTH,
|
|
16
15
|
SpaceState,
|
|
17
16
|
type Space,
|
|
17
|
+
parseId,
|
|
18
18
|
} from '@dxos/client/echo';
|
|
19
19
|
import { isDeleted } from '@dxos/live-object';
|
|
20
20
|
import { log } from '@dxos/log';
|
|
@@ -25,7 +25,7 @@ import { isNonNullable } from '@dxos/util';
|
|
|
25
25
|
|
|
26
26
|
import { SpaceCapabilities } from './capabilities';
|
|
27
27
|
import { SPACE_PLUGIN } from '../meta';
|
|
28
|
-
import { CollectionType, SpaceAction, type SpaceSettingsProps } from '../types';
|
|
28
|
+
import { CollectionType, SPACE_TYPE, SpaceAction, type SpaceSettingsProps } from '../types';
|
|
29
29
|
import {
|
|
30
30
|
constructObjectActions,
|
|
31
31
|
constructSpaceActions,
|
|
@@ -98,6 +98,45 @@ export default (context: PluginsContext) => {
|
|
|
98
98
|
position: 'fallback',
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
|
+
{
|
|
102
|
+
id: SpaceAction.OpenMembers._tag,
|
|
103
|
+
data: async () => {
|
|
104
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
105
|
+
const layout = context.requestCapability(Capabilities.Layout);
|
|
106
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
107
|
+
const { spaceId } = parseId(layout.workspace);
|
|
108
|
+
const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;
|
|
109
|
+
await dispatch(createIntent(SpaceAction.OpenMembers, { space }));
|
|
110
|
+
},
|
|
111
|
+
properties: {
|
|
112
|
+
label: ['share space label', { ns: SPACE_PLUGIN }],
|
|
113
|
+
icon: 'ph--users--regular',
|
|
114
|
+
testId: 'spacePlugin.shareSpace',
|
|
115
|
+
keyBinding: {
|
|
116
|
+
macos: 'meta+.',
|
|
117
|
+
windows: 'alt+.',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: SpaceAction.OpenSettings._tag,
|
|
123
|
+
data: async () => {
|
|
124
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
125
|
+
const layout = context.requestCapability(Capabilities.Layout);
|
|
126
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
127
|
+
const { spaceId } = parseId(layout.workspace);
|
|
128
|
+
const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;
|
|
129
|
+
await dispatch(createIntent(SpaceAction.OpenSettings, { space }));
|
|
130
|
+
},
|
|
131
|
+
properties: {
|
|
132
|
+
label: ['open current space settings label', { ns: SPACE_PLUGIN }],
|
|
133
|
+
icon: 'ph--faders--regular',
|
|
134
|
+
keyBinding: {
|
|
135
|
+
macos: 'meta+shift+,',
|
|
136
|
+
windows: 'ctrl+shift+,',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
101
140
|
],
|
|
102
141
|
}),
|
|
103
142
|
|
|
@@ -203,7 +242,7 @@ export default (context: PluginsContext) => {
|
|
|
203
242
|
// Create space actions.
|
|
204
243
|
createExtension({
|
|
205
244
|
id: `${SPACE_PLUGIN}/actions`,
|
|
206
|
-
filter: (node): node is Node<Space> =>
|
|
245
|
+
filter: (node): node is Node<Space> => node.type === SPACE_TYPE,
|
|
207
246
|
actions: ({ node }) => {
|
|
208
247
|
const space = node.data;
|
|
209
248
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
@@ -221,7 +260,7 @@ export default (context: PluginsContext) => {
|
|
|
221
260
|
// Create nodes for objects in the root collection of a space.
|
|
222
261
|
createExtension({
|
|
223
262
|
id: `${SPACE_PLUGIN}/root-collection`,
|
|
224
|
-
filter: (node): node is Node<Space> =>
|
|
263
|
+
filter: (node): node is Node<Space> => node.type === SPACE_TYPE,
|
|
225
264
|
connector: ({ node }) => {
|
|
226
265
|
const space = node.data;
|
|
227
266
|
const spaceState = toSignal(
|
|
@@ -309,7 +348,7 @@ export default (context: PluginsContext) => {
|
|
|
309
348
|
// Create collection actions and action groups.
|
|
310
349
|
createExtension({
|
|
311
350
|
id: `${SPACE_PLUGIN}/object-actions`,
|
|
312
|
-
filter: (node): node is Node<
|
|
351
|
+
filter: (node): node is Node<AnyLiveObject<any>> => isEchoObject(node.data),
|
|
313
352
|
actions: ({ node }) => {
|
|
314
353
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
315
354
|
const state = context.requestCapability(SpaceCapabilities.State);
|
|
@@ -320,7 +359,7 @@ export default (context: PluginsContext) => {
|
|
|
320
359
|
// Object settings plank companion.
|
|
321
360
|
createExtension({
|
|
322
361
|
id: `${SPACE_PLUGIN}/settings`,
|
|
323
|
-
filter: (node): node is Node<
|
|
362
|
+
filter: (node): node is Node<AnyLiveObject<any>> => isEchoObject(node.data),
|
|
324
363
|
connector: ({ node }) => [
|
|
325
364
|
{
|
|
326
365
|
id: [node.id, 'settings'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
@@ -330,7 +369,7 @@ export default (context: PluginsContext) => {
|
|
|
330
369
|
label: ['object settings label', { ns: SPACE_PLUGIN }],
|
|
331
370
|
icon: 'ph--sliders--regular',
|
|
332
371
|
disposition: 'hidden',
|
|
333
|
-
position: '
|
|
372
|
+
position: 'fallback',
|
|
334
373
|
},
|
|
335
374
|
},
|
|
336
375
|
],
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, createIntent, type PluginsContext } from '@dxos/app-framework';
|
|
6
6
|
import { isSpace } from '@dxos/client/echo';
|
|
7
|
-
import {
|
|
7
|
+
import { live } from '@dxos/live-object';
|
|
8
8
|
|
|
9
9
|
import { SPACE_PLUGIN } from '../meta';
|
|
10
10
|
import translations from '../translations';
|
|
11
|
-
import { CollectionType, SpaceAction } from '../types';
|
|
12
|
-
import { SPACES
|
|
11
|
+
import { CollectionType, SpaceAction, SPACE_TYPE } from '../types';
|
|
12
|
+
import { SPACES } from '../util';
|
|
13
13
|
|
|
14
14
|
// https://stackoverflow.com/a/19016910
|
|
15
15
|
const DIRECTORY_TYPE = 'text/directory';
|
|
@@ -63,7 +63,7 @@ export default (context: PluginsContext) =>
|
|
|
63
63
|
const result = await dispatch(
|
|
64
64
|
createIntent(SpaceAction.AddObject, {
|
|
65
65
|
target: collection,
|
|
66
|
-
object:
|
|
66
|
+
object: live(CollectionType, { name: data.name, objects: [], views: {} }),
|
|
67
67
|
}),
|
|
68
68
|
);
|
|
69
69
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { contributes, type PluginsContext, Capabilities } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { live, makeRef } from '@dxos/live-object';
|
|
7
7
|
import { Migrations } from '@dxos/migrations';
|
|
8
8
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ export default async (context: PluginsContext) => {
|
|
|
17
17
|
await defaultSpace.waitUntilReady();
|
|
18
18
|
|
|
19
19
|
// Create root collection structure.
|
|
20
|
-
defaultSpace.properties[CollectionType.typename] = makeRef(
|
|
20
|
+
defaultSpace.properties[CollectionType.typename] = makeRef(live(CollectionType, { objects: [], views: {} }));
|
|
21
21
|
if (Migrations.versionProperty) {
|
|
22
22
|
defaultSpace.properties[Migrations.versionProperty] = Migrations.targetVersion;
|
|
23
23
|
}
|
|
@@ -10,8 +10,8 @@ export const IdentityCreated = lazy(() => import('./identity-created'));
|
|
|
10
10
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
11
11
|
export const ReactRoot = lazy(() => import('./react-root'));
|
|
12
12
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
13
|
+
export const SchemaDefs = lazy(() => import('./schema-defs'));
|
|
14
|
+
export const SchemaTools = lazy(() => import('./schema-tools'));
|
|
15
15
|
export const SpaceSettings = lazy(() => import('./settings'));
|
|
16
16
|
export const SpaceState = lazy(() => import('./state'));
|
|
17
17
|
export const SpacesReady = lazy(() => import('./spaces-ready'));
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Effect } from 'effect';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
Capabilities,
|
|
9
|
-
chain,
|
|
10
9
|
contributes,
|
|
11
10
|
createIntent,
|
|
12
11
|
createResolver,
|
|
@@ -15,13 +14,14 @@ import {
|
|
|
15
14
|
} from '@dxos/app-framework';
|
|
16
15
|
import { type Expando, getTypename, type HasId } from '@dxos/echo-schema';
|
|
17
16
|
import { invariant } from '@dxos/invariant';
|
|
18
|
-
import {
|
|
17
|
+
import { live, makeRef, type Live } from '@dxos/live-object';
|
|
19
18
|
import { Migrations } from '@dxos/migrations';
|
|
20
19
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
|
-
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
22
20
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
23
21
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
24
|
-
import { isSpace, getSpace, SpaceState,
|
|
22
|
+
import { isSpace, getSpace, SpaceState, fullyQualifiedId, isEchoObject } from '@dxos/react-client/echo';
|
|
23
|
+
import { Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
24
|
+
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
|
|
25
25
|
|
|
26
26
|
import { SpaceCapabilities } from './capabilities';
|
|
27
27
|
import {
|
|
@@ -43,10 +43,11 @@ const SPACE_MAX_OBJECTS = 500;
|
|
|
43
43
|
|
|
44
44
|
type IntentResolverOptions = {
|
|
45
45
|
context: PluginsContext;
|
|
46
|
+
createInvitationUrl: (invitationCode: string) => string;
|
|
46
47
|
observability?: boolean;
|
|
47
48
|
};
|
|
48
49
|
|
|
49
|
-
export default ({ context, observability }: IntentResolverOptions) => {
|
|
50
|
+
export default ({ context, observability, createInvitationUrl }: IntentResolverOptions) => {
|
|
50
51
|
const resolve = (typename: string) =>
|
|
51
52
|
context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
52
53
|
|
|
@@ -67,14 +68,14 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
67
68
|
}),
|
|
68
69
|
createResolver({
|
|
69
70
|
intent: SpaceAction.Create,
|
|
70
|
-
resolve: async ({ name, edgeReplication }) => {
|
|
71
|
+
resolve: async ({ name, hue, icon, edgeReplication }) => {
|
|
71
72
|
const client = context.requestCapability(ClientCapabilities.Client);
|
|
72
|
-
const space = await client.spaces.create({ name });
|
|
73
|
+
const space = await client.spaces.create({ name, hue, icon });
|
|
73
74
|
if (edgeReplication) {
|
|
74
75
|
await space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED);
|
|
75
76
|
}
|
|
76
77
|
await space.waitUntilReady();
|
|
77
|
-
const collection =
|
|
78
|
+
const collection = live(CollectionType, { objects: [], views: {} });
|
|
78
79
|
space.properties[CollectionType.typename] = makeRef(collection);
|
|
79
80
|
|
|
80
81
|
if (Migrations.versionProperty) {
|
|
@@ -120,52 +121,74 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
120
121
|
],
|
|
121
122
|
}),
|
|
122
123
|
}),
|
|
124
|
+
createResolver({
|
|
125
|
+
intent: SpaceAction.OpenMembers,
|
|
126
|
+
resolve: ({ space }) => ({
|
|
127
|
+
intents: [
|
|
128
|
+
createIntent(LayoutAction.Open, {
|
|
129
|
+
part: 'main',
|
|
130
|
+
subject: [`members-settings${ATTENDABLE_PATH_SEPARATOR}${space.id}`],
|
|
131
|
+
options: {
|
|
132
|
+
workspace: space.id,
|
|
133
|
+
},
|
|
134
|
+
}),
|
|
135
|
+
],
|
|
136
|
+
}),
|
|
137
|
+
}),
|
|
123
138
|
createResolver({
|
|
124
139
|
intent: SpaceAction.Share,
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
}
|
|
139
|
-
|
|
140
|
+
resolve: ({ space, type, authMethod, multiUse, target }) => {
|
|
141
|
+
const invitation = space.share({ type, authMethod, multiUse, target });
|
|
140
142
|
return {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
),
|
|
155
|
-
...(observability
|
|
156
|
-
? [
|
|
157
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
158
|
-
name: 'space.share',
|
|
159
|
-
properties: {
|
|
160
|
-
spaceId: space.id,
|
|
161
|
-
},
|
|
162
|
-
}),
|
|
163
|
-
]
|
|
164
|
-
: []),
|
|
165
|
-
],
|
|
143
|
+
data: invitation,
|
|
144
|
+
intents: observability
|
|
145
|
+
? [
|
|
146
|
+
createIntent(ObservabilityAction.SendEvent, {
|
|
147
|
+
name: 'space.share',
|
|
148
|
+
properties: {
|
|
149
|
+
spaceId: space.id,
|
|
150
|
+
},
|
|
151
|
+
}),
|
|
152
|
+
]
|
|
153
|
+
: [],
|
|
166
154
|
};
|
|
167
155
|
},
|
|
168
156
|
}),
|
|
157
|
+
createResolver({
|
|
158
|
+
intent: SpaceAction.GetShareLink,
|
|
159
|
+
resolve: ({ space, target, copyToClipboard }) =>
|
|
160
|
+
Effect.gen(function* () {
|
|
161
|
+
const { dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
162
|
+
const invitation = yield* dispatch(
|
|
163
|
+
createIntent(SpaceAction.Share, {
|
|
164
|
+
space,
|
|
165
|
+
type: Invitation.Type.DELEGATED,
|
|
166
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
167
|
+
multiUse: true,
|
|
168
|
+
target,
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
// TODO(wittjosiah): Better api to for this.
|
|
173
|
+
// NOTE: Delegated invitations are invalid until the connecting state when keys are filled in.
|
|
174
|
+
const invitationCode = yield* Effect.tryPromise(
|
|
175
|
+
() =>
|
|
176
|
+
new Promise<string>((resolve) => {
|
|
177
|
+
invitation.subscribe((invitation) => {
|
|
178
|
+
if (invitation.state === Invitation.State.CONNECTING) {
|
|
179
|
+
resolve(InvitationEncoder.encode(invitation));
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}),
|
|
183
|
+
);
|
|
184
|
+
const url = createInvitationUrl(invitationCode);
|
|
185
|
+
if (copyToClipboard) {
|
|
186
|
+
yield* Effect.tryPromise(() => navigator.clipboard.writeText(url));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return { data: url };
|
|
190
|
+
}),
|
|
191
|
+
}),
|
|
169
192
|
createResolver({
|
|
170
193
|
intent: SpaceAction.Lock,
|
|
171
194
|
resolve: ({ space }) => {
|
|
@@ -232,6 +255,7 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
232
255
|
part: 'popover',
|
|
233
256
|
subject: POPOVER_ADD_SPACE,
|
|
234
257
|
options: {
|
|
258
|
+
variant: 'react',
|
|
235
259
|
anchorId: SpaceAction.AddSpace._tag,
|
|
236
260
|
side: 'right',
|
|
237
261
|
},
|
|
@@ -242,38 +266,17 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
242
266
|
}),
|
|
243
267
|
createResolver({
|
|
244
268
|
intent: SpaceAction.OpenSettings,
|
|
245
|
-
resolve: ({ space }) => {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return {
|
|
260
|
-
intents: [
|
|
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
|
-
),
|
|
274
|
-
],
|
|
275
|
-
};
|
|
276
|
-
},
|
|
269
|
+
resolve: ({ space }) => ({
|
|
270
|
+
intents: [
|
|
271
|
+
createIntent(LayoutAction.Open, {
|
|
272
|
+
part: 'main',
|
|
273
|
+
subject: [`properties-settings${ATTENDABLE_PATH_SEPARATOR}${space.id}`],
|
|
274
|
+
options: {
|
|
275
|
+
workspace: space.id,
|
|
276
|
+
},
|
|
277
|
+
}),
|
|
278
|
+
],
|
|
279
|
+
}),
|
|
277
280
|
}),
|
|
278
281
|
createResolver({
|
|
279
282
|
intent: SpaceAction.Open,
|
|
@@ -333,7 +336,7 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
333
336
|
props: {
|
|
334
337
|
target,
|
|
335
338
|
shouldNavigate: navigable
|
|
336
|
-
? (object:
|
|
339
|
+
? (object: Live<any>) => !(object instanceof CollectionType) || state.navigableCollections
|
|
337
340
|
: () => false,
|
|
338
341
|
} satisfies Partial<CreateObjectDialogProps>,
|
|
339
342
|
},
|
|
@@ -390,7 +393,7 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
390
393
|
collection.objects.push(makeRef(object as HasId));
|
|
391
394
|
} else {
|
|
392
395
|
// TODO(wittjosiah): Can't add non-echo objects by including in a collection because of types.
|
|
393
|
-
const collection =
|
|
396
|
+
const collection = live(CollectionType, { objects: [makeRef(object as HasId)], views: {} });
|
|
394
397
|
space.properties[CollectionType.typename] = makeRef(collection);
|
|
395
398
|
}
|
|
396
399
|
}
|
|
@@ -557,7 +560,7 @@ export default ({ context, observability }: IntentResolverOptions) => {
|
|
|
557
560
|
createResolver({
|
|
558
561
|
intent: CollectionAction.Create,
|
|
559
562
|
resolve: async ({ name }) => ({
|
|
560
|
-
data: { object:
|
|
563
|
+
data: { object: live(CollectionType, { name, objects: [], views: {} }) },
|
|
561
564
|
}),
|
|
562
565
|
}),
|
|
563
566
|
]);
|