@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
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Check, X } from '@phosphor-icons/react';
|
|
6
|
-
import React, { type Dispatch, type SetStateAction, useMemo, useState } from 'react';
|
|
6
|
+
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import { QR } from 'react-qr-rounded';
|
|
8
8
|
|
|
9
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
11
|
import { useConfig } from '@dxos/react-client';
|
|
11
12
|
import { fullyQualifiedId, useSpaceInvitations, type Space } from '@dxos/react-client/echo';
|
|
12
13
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
13
|
-
import { Button, Clipboard, Icon, useId, useTranslation } from '@dxos/react-ui';
|
|
14
|
-
import { ControlSection, ControlFrame, ControlFrameItem } from '@dxos/react-ui-form';
|
|
14
|
+
import { Button, Clipboard, Icon, Input, useId, useTranslation } from '@dxos/react-ui';
|
|
15
|
+
import { ControlPage, ControlSection, ControlFrame, ControlFrameItem, ControlItemInput } from '@dxos/react-ui-form';
|
|
15
16
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
16
17
|
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
17
18
|
import {
|
|
@@ -27,7 +28,8 @@ import {
|
|
|
27
28
|
import { hexToEmoji } from '@dxos/util';
|
|
28
29
|
|
|
29
30
|
import { SPACE_PLUGIN } from '../meta';
|
|
30
|
-
import { CollectionType } from '../types';
|
|
31
|
+
import { CollectionType, SpaceAction } from '../types';
|
|
32
|
+
import { COMPOSER_SPACE_LOCK } from '../util';
|
|
31
33
|
|
|
32
34
|
// TODO(wittjosiah): Copied from Shell.
|
|
33
35
|
const activeActionKey = 'dxos:react-shell/space-manager/active-action';
|
|
@@ -47,8 +49,9 @@ export const MembersContainer = ({
|
|
|
47
49
|
space: Space;
|
|
48
50
|
createInvitationUrl: (invitationCode: string) => string;
|
|
49
51
|
}) => {
|
|
50
|
-
const { t } = useTranslation(
|
|
52
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
51
53
|
const config = useConfig();
|
|
54
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
52
55
|
const invitations = useSpaceInvitations(space.key);
|
|
53
56
|
const visibleInvitations = invitations?.filter(
|
|
54
57
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -64,20 +67,28 @@ export const MembersContainer = ({
|
|
|
64
67
|
// TODO(wittjosiah): Track which was the most recently viewed object.
|
|
65
68
|
const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
|
|
66
69
|
|
|
70
|
+
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
71
|
+
const handleChangeLocked = useCallback(() => {
|
|
72
|
+
space.properties[COMPOSER_SPACE_LOCK] = !locked;
|
|
73
|
+
}, [locked, space]);
|
|
74
|
+
|
|
67
75
|
const inviteActions = useMemo(
|
|
68
76
|
(): Record<string, ActionMenuItem> => ({
|
|
69
77
|
inviteOne: {
|
|
70
|
-
label: t('invite one label'),
|
|
71
|
-
description: t('invite one description'),
|
|
78
|
+
label: t('invite one label', { ns: 'os' }),
|
|
79
|
+
description: t('invite one description', { ns: 'os' }),
|
|
72
80
|
icon: () => <Icon icon='ph--user-plus--regular' size={5} />,
|
|
73
81
|
testId: 'membersContainer.inviteOne',
|
|
74
|
-
onClick: () => {
|
|
75
|
-
const invitation =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
onClick: async () => {
|
|
83
|
+
const { data: invitation } = await dispatch(
|
|
84
|
+
createIntent(SpaceAction.Share, {
|
|
85
|
+
space,
|
|
86
|
+
type: Invitation.Type.INTERACTIVE,
|
|
87
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
88
|
+
multiUse: false,
|
|
89
|
+
target: target && fullyQualifiedId(target),
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
81
92
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
82
93
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
83
94
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -86,17 +97,20 @@ export const MembersContainer = ({
|
|
|
86
97
|
},
|
|
87
98
|
},
|
|
88
99
|
inviteMany: {
|
|
89
|
-
label: t('invite many label'),
|
|
90
|
-
description: t('invite many description'),
|
|
100
|
+
label: t('invite many label', { ns: 'os' }),
|
|
101
|
+
description: t('invite many description', { ns: 'os' }),
|
|
91
102
|
icon: () => <Icon icon='ph--users-three--regular' size={5} />,
|
|
92
103
|
testId: 'membersContainer.inviteMany',
|
|
93
|
-
onClick: () => {
|
|
94
|
-
const invitation =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
onClick: async () => {
|
|
105
|
+
const { data: invitation } = await dispatch(
|
|
106
|
+
createIntent(SpaceAction.Share, {
|
|
107
|
+
space,
|
|
108
|
+
type: Invitation.Type.DELEGATED,
|
|
109
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
110
|
+
multiUse: true,
|
|
111
|
+
target: target && fullyQualifiedId(target),
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
100
114
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
101
115
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
102
116
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -118,38 +132,50 @@ export const MembersContainer = ({
|
|
|
118
132
|
|
|
119
133
|
return (
|
|
120
134
|
<Clipboard.Provider>
|
|
121
|
-
<StackItem.Content classNames='
|
|
122
|
-
<
|
|
123
|
-
title={t('members verbose label'
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
<StackItem.Content classNames='block overflow-y-auto'>
|
|
136
|
+
<ControlPage>
|
|
137
|
+
<ControlSection title={t('members verbose label')} description={t('members description')}>
|
|
138
|
+
<ControlFrame>
|
|
139
|
+
<ControlFrameItem title={t('members label')}>
|
|
140
|
+
<SpaceMemberList spaceKey={space.key} includeSelf />
|
|
141
|
+
</ControlFrameItem>
|
|
142
|
+
{locked && (
|
|
143
|
+
<ControlFrameItem title={t('invitations label')}>
|
|
144
|
+
<p className='text-description mbe-2'>{t('locked space description')}</p>
|
|
145
|
+
</ControlFrameItem>
|
|
146
|
+
)}
|
|
147
|
+
{!locked && (
|
|
148
|
+
<ControlFrameItem title={t('invitations label')}>
|
|
149
|
+
{selectedInvitation && <InvitationSection {...selectedInvitation} onBack={handleBack} />}
|
|
150
|
+
{!selectedInvitation && (
|
|
151
|
+
<>
|
|
152
|
+
<p className='text-description mbe-2'>{t('space invitation description')}</p>
|
|
153
|
+
<InvitationList
|
|
154
|
+
className='mb-2'
|
|
155
|
+
send={handleSend}
|
|
156
|
+
invitations={visibleInvitations ?? []}
|
|
157
|
+
onClickRemove={(invitation) => invitation.cancel()}
|
|
158
|
+
createInvitationUrl={createInvitationUrl}
|
|
159
|
+
/>
|
|
160
|
+
<BifurcatedAction
|
|
161
|
+
actions={inviteActions}
|
|
162
|
+
activeAction={activeAction}
|
|
163
|
+
onChangeActiveAction={setActiveAction as Dispatch<SetStateAction<string>>}
|
|
164
|
+
data-testid='membersContainer.createInvitation'
|
|
165
|
+
/>
|
|
166
|
+
</>
|
|
167
|
+
)}
|
|
168
|
+
</ControlFrameItem>
|
|
149
169
|
)}
|
|
150
|
-
</
|
|
151
|
-
|
|
152
|
-
|
|
170
|
+
</ControlFrame>
|
|
171
|
+
{/* TODO(wittjosiah): Make ControlItemInput & ControlFrame compatible. */}
|
|
172
|
+
<div className='justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
173
|
+
<ControlItemInput title={t('space locked label')} description={t('space locked description')}>
|
|
174
|
+
<Input.Switch checked={locked} onCheckedChange={handleChangeLocked} classNames='justify-self-end' />
|
|
175
|
+
</ControlItemInput>
|
|
176
|
+
</div>
|
|
177
|
+
</ControlSection>
|
|
178
|
+
</ControlPage>
|
|
153
179
|
</StackItem.Content>
|
|
154
180
|
</Clipboard.Provider>
|
|
155
181
|
);
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { Planet } from '@phosphor-icons/react';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { type
|
|
8
|
+
import { type AnyLiveObject, getSpace } from '@dxos/client/echo';
|
|
9
9
|
import { useClient } from '@dxos/react-client';
|
|
10
10
|
import { DropdownMenu, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
|
|
12
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
13
13
|
import { getSpaceDisplayName } from '../util';
|
|
14
14
|
|
|
15
|
-
export const MenuFooter = ({ object }: { object:
|
|
15
|
+
export const MenuFooter = ({ object }: { object: AnyLiveObject<any> }) => {
|
|
16
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
17
|
const client = useClient();
|
|
18
18
|
const space = getSpace(object);
|
package/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.tsx
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ForeignKey, ForeignKeySchema } from '@dxos/echo-schema';
|
|
8
|
-
import { getMeta, type
|
|
8
|
+
import { getMeta, type AnyLiveObject } from '@dxos/react-client/echo';
|
|
9
9
|
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ const initialValues = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export type AdvancedObjectSettingsProps = {
|
|
21
|
-
object:
|
|
21
|
+
object: AnyLiveObject<any>;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const AdvancedObjectSettings = ({ object }: AdvancedObjectSettingsProps) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type AnyLiveObject } from '@dxos/react-client/echo';
|
|
8
8
|
import { Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ import { meta } from '../../meta';
|
|
|
12
12
|
|
|
13
13
|
export type BaseObjectSettingsProps = ThemedClassName<
|
|
14
14
|
PropsWithChildren<{
|
|
15
|
-
object:
|
|
15
|
+
object: AnyLiveObject<any>;
|
|
16
16
|
}>
|
|
17
17
|
>;
|
|
18
18
|
|
package/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.tsx
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework';
|
|
8
|
-
import { type
|
|
8
|
+
import { type AnyLiveObject } from '@dxos/react-client/echo';
|
|
9
9
|
import { Clipboard } from '@dxos/react-ui';
|
|
10
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ import { AdvancedObjectSettings } from './AdvancedObjectSettings';
|
|
|
13
13
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
14
14
|
|
|
15
15
|
export type ObjectSettingsContainerProps = {
|
|
16
|
-
object:
|
|
16
|
+
object: AnyLiveObject<any>;
|
|
17
17
|
role: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -16,7 +16,7 @@ export const PopoverAddSpace = () => {
|
|
|
16
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
17
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
18
18
|
return (
|
|
19
|
-
<div role='none' className='grid grid-cols-1 gap-1 [&>button]:justify-start'>
|
|
19
|
+
<div role='none' className='p-1 grid grid-cols-1 gap-1 [&>button]:justify-start'>
|
|
20
20
|
<IconButton
|
|
21
21
|
variant='ghost'
|
|
22
22
|
label={t('create space label')}
|
|
@@ -24,7 +24,10 @@ export const PopoverAddSpace = () => {
|
|
|
24
24
|
onClick={() => {
|
|
25
25
|
void dispatch(createIntent(SpaceAction.OpenCreateSpace));
|
|
26
26
|
void dispatch(
|
|
27
|
-
createIntent(LayoutAction.UpdatePopover, {
|
|
27
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
28
|
+
part: 'popover',
|
|
29
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
30
|
+
}),
|
|
28
31
|
);
|
|
29
32
|
}}
|
|
30
33
|
data-testid='spacePlugin.createSpace'
|
|
@@ -36,7 +39,10 @@ export const PopoverAddSpace = () => {
|
|
|
36
39
|
onClick={() => {
|
|
37
40
|
void dispatch(createIntent(SpaceAction.Join));
|
|
38
41
|
void dispatch(
|
|
39
|
-
createIntent(LayoutAction.UpdatePopover, {
|
|
42
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
43
|
+
part: 'popover',
|
|
44
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
45
|
+
}),
|
|
40
46
|
);
|
|
41
47
|
}}
|
|
42
48
|
data-testid='spacePlugin.joinSpace'
|
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { type Live } from '@dxos/live-object';
|
|
8
9
|
import { log } from '@dxos/log';
|
|
9
|
-
import { Button, Input,
|
|
10
|
+
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
10
11
|
|
|
11
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
12
13
|
|
|
13
14
|
export const POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
14
15
|
|
|
15
|
-
export const PopoverRenameObject = ({ object: obj }: { object:
|
|
16
|
+
export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
16
17
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
18
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
18
19
|
// TODO(wittjosiah): Use schema here.
|
|
19
20
|
const object = obj as any;
|
|
20
21
|
// TODO(burdon): Field should not be hardcoded field.
|
|
21
22
|
const [name, setName] = useState(object.name || object.title || '');
|
|
23
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
22
24
|
|
|
23
25
|
const handleDone = useCallback(() => {
|
|
24
26
|
try {
|
|
@@ -30,6 +32,12 @@ export const PopoverRenameObject = ({ object: obj }: { object: ReactiveObject<an
|
|
|
30
32
|
log.error('Failed to rename object', { err });
|
|
31
33
|
}
|
|
32
34
|
}
|
|
35
|
+
void dispatch(
|
|
36
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
37
|
+
part: 'popover',
|
|
38
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
33
41
|
}, [object, name]);
|
|
34
42
|
|
|
35
43
|
return (
|
|
@@ -46,11 +54,9 @@ export const PopoverRenameObject = ({ object: obj }: { object: ReactiveObject<an
|
|
|
46
54
|
/>
|
|
47
55
|
</Input.Root>
|
|
48
56
|
</div>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</Button>
|
|
53
|
-
</Popover.Close>
|
|
57
|
+
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
58
|
+
{t('done label', { ns: 'os' })}
|
|
59
|
+
</Button>
|
|
54
60
|
</div>
|
|
55
61
|
);
|
|
56
62
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
7
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
8
9
|
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
9
10
|
|
|
@@ -15,9 +16,16 @@ export const PopoverRenameSpace = ({ space }: { space: Space }) => {
|
|
|
15
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
16
17
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
17
18
|
const [name, setName] = useState(space.properties.name ?? '');
|
|
19
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
18
20
|
|
|
19
21
|
const handleDone = useCallback(() => {
|
|
20
22
|
space.properties.name = name;
|
|
23
|
+
void dispatch(
|
|
24
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
25
|
+
part: 'popover',
|
|
26
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
21
29
|
}, [space, name]);
|
|
22
30
|
|
|
23
31
|
// TODO(thure): Why does the input value need to be uncontrolled to work?
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type EchoSchema } from '@dxos/echo-schema';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { controlItemClasses, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
11
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
12
|
+
|
|
13
|
+
import { SPACE_PLUGIN } from '../meta';
|
|
14
|
+
|
|
15
|
+
type SchemaPanelProps = { space: Space };
|
|
16
|
+
|
|
17
|
+
// TODO(ZaymonFC):
|
|
18
|
+
// - Support deleting Schema. This should tie in to some sort of
|
|
19
|
+
// 'DangerZone™️' / 'Are you really sure?' / 'this might have consequences' component.
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe to and retrieve all schemas from a space's schema registry.
|
|
23
|
+
*/
|
|
24
|
+
export const useQuerySpaceSchemas = (space: Space): EchoSchema[] => {
|
|
25
|
+
const [schemas, setSchemas] = useState<EchoSchema[]>([]);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const query = space.db.schemaRegistry.query();
|
|
29
|
+
const initialResults = query.runSync();
|
|
30
|
+
setSchemas(initialResults);
|
|
31
|
+
|
|
32
|
+
const unsubscribe = query.subscribe(() => setSchemas(query.results));
|
|
33
|
+
return () => unsubscribe();
|
|
34
|
+
}, [space]);
|
|
35
|
+
|
|
36
|
+
return schemas;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const SchemaContainer = ({ space }: SchemaPanelProps) => {
|
|
40
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
41
|
+
const schemas = useQuerySpaceSchemas(space);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<StackItem.Content classNames='block overflow-y-auto'>
|
|
45
|
+
<ControlPage>
|
|
46
|
+
<ControlSection title={t('schema verbose label')} description={t('schema description')}>
|
|
47
|
+
<div role='none' className={controlItemClasses}>
|
|
48
|
+
{schemas.length === 0 && <div className='text-center plb-4'>{t('no schemas found message')}</div>}
|
|
49
|
+
{schemas.map((schema) => (
|
|
50
|
+
<div key={schema.id}>
|
|
51
|
+
<div>{schema.typename}</div>
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
</ControlSection>
|
|
56
|
+
</ControlPage>
|
|
57
|
+
</StackItem.Content>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -4,20 +4,45 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { useClient } from '@dxos/react-client';
|
|
9
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
10
|
+
import { Input, toLocalizedString, useTranslation, List, ListItem, Button } from '@dxos/react-ui';
|
|
8
11
|
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
9
12
|
|
|
10
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
11
|
-
import { type SpaceSettingsProps } from '../types';
|
|
14
|
+
import { SpaceAction, type SpaceSettingsProps } from '../types';
|
|
15
|
+
import { getSpaceDisplayName } from '../util';
|
|
12
16
|
|
|
13
17
|
export const SpacePluginSettings = ({ settings }: { settings: SpaceSettingsProps }) => {
|
|
14
18
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
19
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
+
const client = useClient();
|
|
21
|
+
const spaces = useSpaces({ all: settings.showHidden });
|
|
15
22
|
|
|
23
|
+
// TODO(wittjosiah): Migrate to new form container.
|
|
16
24
|
return (
|
|
17
25
|
<DeprecatedFormContainer>
|
|
18
26
|
<DeprecatedFormInput label={t('show hidden spaces label')}>
|
|
19
27
|
<Input.Switch checked={settings.showHidden} onCheckedChange={(checked) => (settings.showHidden = !!checked)} />
|
|
20
28
|
</DeprecatedFormInput>
|
|
29
|
+
<div role='none'>
|
|
30
|
+
<h2 className='text-xl my-4'>Space Settings</h2>
|
|
31
|
+
<List classNames='max-w-md mx-auto'>
|
|
32
|
+
{spaces.map((space) => (
|
|
33
|
+
<ListItem.Root key={space.id}>
|
|
34
|
+
<ListItem.Heading classNames='flex flex-col grow truncate mbe-2'>
|
|
35
|
+
{toLocalizedString(getSpaceDisplayName(space, { personal: space === client.spaces.default }), t)}
|
|
36
|
+
</ListItem.Heading>
|
|
37
|
+
<ListItem.Endcap>
|
|
38
|
+
<Button onClick={() => dispatch(createIntent(SpaceAction.OpenSettings, { space }))}>
|
|
39
|
+
{t('open space settings label')}
|
|
40
|
+
</Button>
|
|
41
|
+
</ListItem.Endcap>
|
|
42
|
+
</ListItem.Root>
|
|
43
|
+
))}
|
|
44
|
+
</List>
|
|
45
|
+
</div>
|
|
21
46
|
</DeprecatedFormContainer>
|
|
22
47
|
);
|
|
23
48
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
|
+
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { generateName } from '@dxos/display-name';
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
List,
|
|
21
21
|
ListItem,
|
|
22
22
|
useDefaultValue,
|
|
23
|
+
type DxAvatar,
|
|
23
24
|
} from '@dxos/react-ui';
|
|
24
25
|
import { AttentionGlyph, useAttended, useAttention, type AttentionGlyphProps } from '@dxos/react-ui-attention';
|
|
25
26
|
import { ComplexMap, keyToFallback } from '@dxos/util';
|
|
@@ -115,8 +116,8 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
115
116
|
<div className='dx-avatar-group' data-testid='spacePlugin.presence'>
|
|
116
117
|
{members.slice(0, 3).map((member, i) => (
|
|
117
118
|
<Tooltip.Root key={member.identity.identityKey.toHex()}>
|
|
118
|
-
<Tooltip.Trigger>
|
|
119
|
-
<
|
|
119
|
+
<Tooltip.Trigger className='grid focus:outline-none'>
|
|
120
|
+
<PresenceAvatar
|
|
120
121
|
identity={member.identity}
|
|
121
122
|
match={member.currentlyAttended} // TODO(Zan): Match always true now we're showing 'members viewing current object'.
|
|
122
123
|
index={members.length - i}
|
|
@@ -135,13 +136,14 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
135
136
|
|
|
136
137
|
{members.length > 3 && (
|
|
137
138
|
<Tooltip.Root>
|
|
138
|
-
<Tooltip.Trigger>
|
|
139
|
+
<Tooltip.Trigger className='grid focus:outline-none'>
|
|
139
140
|
<Avatar.Root>
|
|
140
141
|
{/* TODO(wittjosiah): Make text fit. */}
|
|
141
142
|
<Avatar.Content
|
|
142
143
|
status='inactive'
|
|
143
144
|
style={{ zIndex: members.length - 4 }}
|
|
144
145
|
fallback={`+${members.length - 3}`}
|
|
146
|
+
size={size}
|
|
145
147
|
/>
|
|
146
148
|
</Avatar.Root>
|
|
147
149
|
</Tooltip.Trigger>
|
|
@@ -157,7 +159,7 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
157
159
|
data-testid='identity-list-item'
|
|
158
160
|
>
|
|
159
161
|
{/* TODO(Zan): Match always true now we're showing 'members viewing current object'. */}
|
|
160
|
-
<
|
|
162
|
+
<PresenceAvatar identity={member.identity} size={size} showName match={member.currentlyAttended} />
|
|
161
163
|
</ListItem.Root>
|
|
162
164
|
))}
|
|
163
165
|
</List>
|
|
@@ -177,26 +179,28 @@ type PresenceAvatarProps = Pick<AvatarContentProps, 'size'> & {
|
|
|
177
179
|
onClick?: () => void;
|
|
178
180
|
};
|
|
179
181
|
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<Avatar.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
182
|
+
const PresenceAvatar = forwardRef<DxAvatar, PresenceAvatarProps>(
|
|
183
|
+
({ identity, showName, match, index, onClick, size }, forwardedRef) => {
|
|
184
|
+
const status = match ? 'current' : 'active';
|
|
185
|
+
const fallbackValue = keyToFallback(identity.identityKey);
|
|
186
|
+
return (
|
|
187
|
+
<Avatar.Root>
|
|
188
|
+
<Avatar.Content
|
|
189
|
+
status={status}
|
|
190
|
+
hue={identity.profile?.data?.hue || fallbackValue.hue}
|
|
191
|
+
data-testid='spacePlugin.presence.member'
|
|
192
|
+
data-status={status}
|
|
193
|
+
size={size}
|
|
194
|
+
{...(index ? { style: { zIndex: index } } : {})}
|
|
195
|
+
onClick={onClick}
|
|
196
|
+
fallback={identity.profile?.data?.emoji || fallbackValue.emoji}
|
|
197
|
+
ref={forwardedRef}
|
|
198
|
+
/>
|
|
199
|
+
<Avatar.Label classNames={showName ? 'text-sm truncate pli-2' : 'sr-only'}>{getName(identity)}</Avatar.Label>
|
|
200
|
+
</Avatar.Root>
|
|
201
|
+
);
|
|
202
|
+
},
|
|
203
|
+
);
|
|
200
204
|
|
|
201
205
|
export type SmallPresenceLiveProps = {
|
|
202
206
|
id?: string;
|
|
@@ -10,21 +10,21 @@ import React from 'react';
|
|
|
10
10
|
import { useClientProvider, withClientProvider } from '@dxos/react-client/testing';
|
|
11
11
|
import { withTheme } from '@dxos/storybook-utils';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { SpaceSettingsContainer, type SpaceSettingsContainerProps } from './SpaceSettingsContainer';
|
|
14
14
|
import translations from '../../translations';
|
|
15
15
|
|
|
16
|
-
const Story = (args: Partial<
|
|
16
|
+
const Story = (args: Partial<SpaceSettingsContainerProps>) => {
|
|
17
17
|
const { space } = useClientProvider();
|
|
18
18
|
return (
|
|
19
19
|
<div role='none' className='p-2 border border-primary-500 rounded'>
|
|
20
|
-
<
|
|
20
|
+
<SpaceSettingsContainer {...args} space={space!} />
|
|
21
21
|
</div>
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const meta: Meta = {
|
|
26
|
-
title: 'plugins/plugin-space/
|
|
27
|
-
component:
|
|
26
|
+
title: 'plugins/plugin-space/SpaceSettingsContainer',
|
|
27
|
+
component: SpaceSettingsContainer,
|
|
28
28
|
render: Story,
|
|
29
29
|
decorators: [withClientProvider({ createIdentity: true, createSpace: true }), withTheme],
|
|
30
30
|
parameters: {
|
|
@@ -35,4 +35,4 @@ const meta: Meta = {
|
|
|
35
35
|
|
|
36
36
|
export default meta;
|
|
37
37
|
|
|
38
|
-
export const Default: StoryObj<typeof
|
|
38
|
+
export const Default: StoryObj<typeof SpaceSettingsContainer> = {};
|