@dxos/plugin-space 0.8.1-main.ba2dec9 → 0.8.1-staging.31c3ee1
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-PCEP3KQY.mjs → chunk-DVZEJGCK.mjs} +854 -587
- package/dist/lib/browser/chunk-DVZEJGCK.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 +40 -45
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-GPNAQ2SG.mjs → intent-resolver-OG62I5IL.mjs} +69 -44
- package/dist/lib/browser/intent-resolver-OG62I5IL.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-4CCSD7TZ.mjs → react-root-VPSIJ6EU.mjs} +6 -6
- package/dist/lib/browser/{react-surface-FKMRI3WV.mjs → react-surface-KOSYP574.mjs} +39 -38
- package/dist/lib/browser/react-surface-KOSYP574.mjs.map +7 -0
- package/dist/lib/browser/{schema-5W3DSY2E.mjs → schema-FHTA26SW.mjs} +3 -3
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs +123 -0
- 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-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-QE4GVR6C.cjs → chunk-APYLLIMY.cjs} +919 -657
- package/dist/lib/node/chunk-APYLLIMY.cjs.map +7 -0
- 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 +105 -111
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-ICHHI6I6.cjs → intent-resolver-UMF6MLOH.cjs} +133 -107
- package/dist/lib/node/intent-resolver-UMF6MLOH.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-TCBTUOOJ.cjs → react-root-ZRFHMM7R.cjs} +12 -12
- package/dist/lib/node/{react-surface-JSCCIZS5.cjs → react-surface-72U57CIU.cjs} +78 -76
- package/dist/lib/node/react-surface-72U57CIU.cjs.map +7 -0
- package/dist/lib/node/{schema-YN7WVFRX.cjs → schema-PPJ5BZ3A.cjs} +7 -7
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs +146 -0
- 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-TRNZQEEN.mjs → chunk-FC4UHDPL.mjs} +15 -65
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HJCEJNW3.mjs → chunk-HMCIZ7G7.mjs} +854 -587
- package/dist/lib/node-esm/chunk-HMCIZ7G7.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 +40 -45
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-VR42K5GE.mjs → intent-resolver-67C5MOIE.mjs} +69 -44
- package/dist/lib/node-esm/intent-resolver-67C5MOIE.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-THJBSTQS.mjs → react-root-XPRWMZGT.mjs} +6 -6
- package/dist/lib/node-esm/{react-surface-Z3BBQ5HX.mjs → react-surface-MUE6M34Y.mjs} +39 -38
- package/dist/lib/node-esm/react-surface-MUE6M34Y.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-LOR2EVGY.mjs → schema-OUZKVYM5.mjs} +3 -3
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs +125 -0
- 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 +1 -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/schema-tool.test.d.ts +2 -0
- package/dist/types/src/capabilities/schema-tool.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-tools.d.ts +13 -0
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -0
- 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 -39
- package/src/SpacePlugin.tsx +12 -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/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +66 -38
- package/src/capabilities/react-surface.tsx +30 -28
- package/src/capabilities/schema-tool.test.ts +45 -0
- package/src/capabilities/schema-tools.ts +124 -0
- 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 +255 -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-PCEP3KQY.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-GPNAQ2SG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FKMRI3WV.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-OVGKWJOC.cjs.map +0 -7
- package/dist/lib/node/chunk-QE4GVR6C.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-ICHHI6I6.cjs.map +0 -7
- package/dist/lib/node/react-surface-JSCCIZS5.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-HJCEJNW3.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-VR42K5GE.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-Z3BBQ5HX.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-4CCSD7TZ.mjs.map → react-root-VPSIJ6EU.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-TCBTUOOJ.cjs.map → react-root-ZRFHMM7R.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-THJBSTQS.mjs.map → react-root-XPRWMZGT.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
|
@@ -1,129 +1,35 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
SpaceCapabilities
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PIYAWT5N.mjs";
|
|
5
5
|
import {
|
|
6
|
-
COMPOSER_SPACE_LOCK,
|
|
7
6
|
getSpaceDisplayName
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZGLK25WQ.mjs";
|
|
9
8
|
import {
|
|
10
9
|
CollectionType,
|
|
11
10
|
SpaceAction,
|
|
12
11
|
SpaceForm
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FC4UHDPL.mjs";
|
|
14
13
|
import {
|
|
15
|
-
SPACE_PLUGIN
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// packages/plugins/plugin-space/src/components/AdvancedObjectSettings/AdvancedObjectSettings.tsx
|
|
19
|
-
import React2, { useCallback as useCallback2, useState } from "react";
|
|
20
|
-
import { ForeignKeySchema } from "@dxos/echo-schema";
|
|
21
|
-
import { getMeta } from "@dxos/react-client/echo";
|
|
22
|
-
import { IconButton as IconButton2, useTranslation as useTranslation2, Separator } from "@dxos/react-ui";
|
|
23
|
-
import { Form } from "@dxos/react-ui-form";
|
|
24
|
-
|
|
25
|
-
// packages/plugins/plugin-space/src/components/AdvancedObjectSettings/ForeignKeys.tsx
|
|
26
|
-
import React, { useCallback } from "react";
|
|
27
|
-
import { IconButton, List, ListItem, useTranslation } from "@dxos/react-ui";
|
|
28
|
-
var ForeignKeys = ({ keys, onDelete }) => {
|
|
29
|
-
return /* @__PURE__ */ React.createElement(List, {
|
|
30
|
-
classNames: "flex flex-col gap-2"
|
|
31
|
-
}, keys.map((key) => /* @__PURE__ */ React.createElement(KeyItem, {
|
|
32
|
-
key: key.id,
|
|
33
|
-
forignKey: key,
|
|
34
|
-
onDelete
|
|
35
|
-
})));
|
|
36
|
-
};
|
|
37
|
-
var KeyItem = ({ forignKey, onDelete }) => {
|
|
38
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
39
|
-
const handleDelete = useCallback(() => {
|
|
40
|
-
onDelete?.(forignKey);
|
|
41
|
-
}, [
|
|
42
|
-
forignKey,
|
|
43
|
-
onDelete
|
|
44
|
-
]);
|
|
45
|
-
return /* @__PURE__ */ React.createElement(ListItem.Root, {
|
|
46
|
-
classNames: "px-2"
|
|
47
|
-
}, /* @__PURE__ */ React.createElement(ListItem.Heading, {
|
|
48
|
-
classNames: "flex flex-col grow truncate"
|
|
49
|
-
}, /* @__PURE__ */ React.createElement("div", null, forignKey.source), /* @__PURE__ */ React.createElement("div", {
|
|
50
|
-
className: "text-description text-sm truncate"
|
|
51
|
-
}, forignKey.id)), /* @__PURE__ */ React.createElement(ListItem.Endcap, null, /* @__PURE__ */ React.createElement(IconButton, {
|
|
52
|
-
iconOnly: true,
|
|
53
|
-
icon: "ph--x--regular",
|
|
54
|
-
variant: "ghost",
|
|
55
|
-
label: t("delete key"),
|
|
56
|
-
onClick: handleDelete
|
|
57
|
-
})));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// packages/plugins/plugin-space/src/components/AdvancedObjectSettings/AdvancedObjectSettings.tsx
|
|
61
|
-
var initialValues = {
|
|
62
|
-
source: "",
|
|
63
|
-
id: ""
|
|
64
|
-
};
|
|
65
|
-
var AdvancedObjectSettings = ({ object }) => {
|
|
66
|
-
const { t } = useTranslation2(SPACE_PLUGIN);
|
|
67
|
-
const [adding, setAdding] = useState(false);
|
|
68
|
-
const keys = getMeta(object).keys;
|
|
69
|
-
const handleNew = useCallback2(() => setAdding(true), []);
|
|
70
|
-
const handleCancel = useCallback2(() => setAdding(false), []);
|
|
71
|
-
const handleSave = useCallback2((key) => {
|
|
72
|
-
const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
|
|
73
|
-
if (index === -1) {
|
|
74
|
-
keys.push(key);
|
|
75
|
-
}
|
|
76
|
-
setAdding(false);
|
|
77
|
-
}, [
|
|
78
|
-
keys
|
|
79
|
-
]);
|
|
80
|
-
const handleDelete = useCallback2((key) => {
|
|
81
|
-
const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
|
|
82
|
-
if (index !== -1) {
|
|
83
|
-
keys.splice(index, 1);
|
|
84
|
-
}
|
|
85
|
-
}, [
|
|
86
|
-
keys
|
|
87
|
-
]);
|
|
88
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Separator, null), /* @__PURE__ */ React2.createElement("div", {
|
|
89
|
-
className: "p-2 flex flex-col gap-4"
|
|
90
|
-
}, /* @__PURE__ */ React2.createElement("h2", null, t("advanced settings label")), /* @__PURE__ */ React2.createElement("div", {
|
|
91
|
-
className: "flex items-center"
|
|
92
|
-
}, /* @__PURE__ */ React2.createElement("h3", {
|
|
93
|
-
className: "text-sm font-semibold"
|
|
94
|
-
}, t("foreign keys")), /* @__PURE__ */ React2.createElement("div", {
|
|
95
|
-
className: "grow"
|
|
96
|
-
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
97
|
-
classNames: adding && "invisible",
|
|
98
|
-
icon: "ph--plus--regular",
|
|
99
|
-
label: t("add key"),
|
|
100
|
-
onClick: handleNew
|
|
101
|
-
})), !adding && /* @__PURE__ */ React2.createElement(ForeignKeys, {
|
|
102
|
-
keys,
|
|
103
|
-
onDelete: handleDelete
|
|
104
|
-
})), adding && /* @__PURE__ */ React2.createElement(Form, {
|
|
105
|
-
schema: ForeignKeySchema,
|
|
106
|
-
values: initialValues,
|
|
107
|
-
onSave: handleSave,
|
|
108
|
-
onCancel: handleCancel
|
|
109
|
-
}));
|
|
110
|
-
};
|
|
14
|
+
SPACE_PLUGIN,
|
|
15
|
+
meta
|
|
16
|
+
} from "./chunk-MSWEFAPD.mjs";
|
|
111
17
|
|
|
112
18
|
// packages/plugins/plugin-space/src/components/AwaitingObject.tsx
|
|
113
19
|
import { CheckCircle, CircleDashed, CircleNotch } from "@phosphor-icons/react";
|
|
114
|
-
import
|
|
20
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
115
21
|
import { createIntent, LayoutAction, useIntentDispatcher, useLayout } from "@dxos/app-framework";
|
|
116
22
|
import { useClient } from "@dxos/react-client";
|
|
117
23
|
import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
|
|
118
|
-
import { Button, Toast, useTranslation
|
|
24
|
+
import { Button, Toast, useTranslation } from "@dxos/react-ui";
|
|
119
25
|
import { getSize, mx } from "@dxos/react-ui-theme";
|
|
120
26
|
var WAIT_FOR_OBJECT_TIMEOUT = 18e4;
|
|
121
27
|
var TOAST_TIMEOUT = 24e4;
|
|
122
28
|
var AwaitingObject = ({ id }) => {
|
|
123
|
-
const [open, setOpen] =
|
|
124
|
-
const [waiting, setWaiting] =
|
|
125
|
-
const [found, setFound] =
|
|
126
|
-
const { t } =
|
|
29
|
+
const [open, setOpen] = useState(true);
|
|
30
|
+
const [waiting, setWaiting] = useState(true);
|
|
31
|
+
const [found, setFound] = useState(false);
|
|
32
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
127
33
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
128
34
|
const layout = useLayout();
|
|
129
35
|
const client = useClient();
|
|
@@ -151,12 +57,12 @@ var AwaitingObject = ({ id }) => {
|
|
|
151
57
|
objects,
|
|
152
58
|
layout
|
|
153
59
|
]);
|
|
154
|
-
const handleClose =
|
|
60
|
+
const handleClose = useCallback(async () => dispatch(createIntent(SpaceAction.WaitForObject, {
|
|
155
61
|
id: void 0
|
|
156
62
|
})), [
|
|
157
63
|
dispatch
|
|
158
64
|
]);
|
|
159
|
-
const handleNavigate =
|
|
65
|
+
const handleNavigate = useCallback(() => {
|
|
160
66
|
void dispatch(createIntent(LayoutAction.Open, {
|
|
161
67
|
part: "main",
|
|
162
68
|
subject: [
|
|
@@ -169,86 +75,62 @@ var AwaitingObject = ({ id }) => {
|
|
|
169
75
|
handleClose,
|
|
170
76
|
dispatch
|
|
171
77
|
]);
|
|
172
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ React.createElement(Toast.Root, {
|
|
173
79
|
open,
|
|
174
80
|
duration: TOAST_TIMEOUT,
|
|
175
81
|
onOpenChange: setOpen
|
|
176
|
-
}, /* @__PURE__ */
|
|
82
|
+
}, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
|
|
177
83
|
classNames: "flex items-center gap-2"
|
|
178
|
-
}, found ? /* @__PURE__ */
|
|
84
|
+
}, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CheckCircle, {
|
|
179
85
|
className: getSize(5)
|
|
180
|
-
}), /* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("found object label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CircleNotch, {
|
|
181
87
|
className: mx(getSize(5), "animate-spin")
|
|
182
|
-
}), /* @__PURE__ */
|
|
88
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("waiting for object label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CircleDashed, {
|
|
183
89
|
className: getSize(5)
|
|
184
|
-
}), /* @__PURE__ */
|
|
90
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("object not found label")))), /* @__PURE__ */ React.createElement(Toast.Description, null, t(found ? "found object description" : waiting ? "waiting for object description" : "object not found description"))), /* @__PURE__ */ React.createElement(Toast.Actions, null, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Toast.Action, {
|
|
185
91
|
altText: t("go to object alt"),
|
|
186
92
|
asChild: true
|
|
187
|
-
}, /* @__PURE__ */
|
|
93
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
188
94
|
variant: "primary",
|
|
189
95
|
onClick: handleNavigate
|
|
190
|
-
}, t("go to object label"))), /* @__PURE__ */
|
|
96
|
+
}, t("go to object label"))), /* @__PURE__ */ React.createElement(Toast.Close, {
|
|
191
97
|
asChild: true
|
|
192
|
-
}, /* @__PURE__ */
|
|
98
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
193
99
|
onClick: handleClose
|
|
194
100
|
}, t("close label", {
|
|
195
101
|
ns: "appkit"
|
|
196
|
-
})))) : /* @__PURE__ */
|
|
102
|
+
})))) : /* @__PURE__ */ React.createElement(Toast.Close, {
|
|
197
103
|
asChild: true
|
|
198
|
-
}, /* @__PURE__ */
|
|
104
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
199
105
|
onClick: handleClose
|
|
200
106
|
}, t(waiting ? "close label" : "confirm label", {
|
|
201
107
|
ns: "appkit"
|
|
202
108
|
})))));
|
|
203
109
|
};
|
|
204
110
|
|
|
205
|
-
// packages/plugins/plugin-space/src/components/BaseObjectSettings.tsx
|
|
206
|
-
import React4 from "react";
|
|
207
|
-
import { Input, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
208
|
-
var BaseObjectSettings = ({ object }) => {
|
|
209
|
-
const { t } = useTranslation4(SPACE_PLUGIN);
|
|
210
|
-
const inputRef = React4.useRef(null);
|
|
211
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
212
|
-
role: "form",
|
|
213
|
-
className: "flex flex-col w-full p-2 gap-1"
|
|
214
|
-
}, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React4.createElement(Input.TextInput, {
|
|
215
|
-
ref: inputRef,
|
|
216
|
-
placeholder: t("name placeholder"),
|
|
217
|
-
value: object.name ?? "",
|
|
218
|
-
onChange: (event) => {
|
|
219
|
-
object.name = event.target.value;
|
|
220
|
-
},
|
|
221
|
-
onKeyDown: (event) => {
|
|
222
|
-
if (event.key === "Enter") {
|
|
223
|
-
inputRef.current?.blur();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
})));
|
|
227
|
-
};
|
|
228
|
-
|
|
229
111
|
// packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
|
|
230
112
|
import { pipe } from "effect";
|
|
231
|
-
import
|
|
113
|
+
import React3, { useCallback as useCallback3, useRef } from "react";
|
|
232
114
|
import { Capabilities, chain, createIntent as createIntent2, LayoutAction as LayoutAction2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager as usePluginManager2 } from "@dxos/app-framework";
|
|
233
115
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
234
116
|
import { useClient as useClient2 } from "@dxos/react-client";
|
|
235
117
|
import { getSpace, isReactiveObject, isSpace, useSpaces } from "@dxos/react-client/echo";
|
|
236
|
-
import { Button as Button2, Dialog, Icon as Icon2, useTranslation as
|
|
118
|
+
import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
237
119
|
|
|
238
120
|
// packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx
|
|
239
|
-
import
|
|
121
|
+
import React2, { useCallback as useCallback2, useState as useState2 } from "react";
|
|
240
122
|
import { Surface, isSurfaceAvailable, usePluginManager } from "@dxos/app-framework";
|
|
241
|
-
import {
|
|
123
|
+
import { getTypeAnnotation } from "@dxos/echo-schema";
|
|
242
124
|
import { invariant } from "@dxos/invariant";
|
|
243
|
-
import { Icon, toLocalizedString, useTranslation as
|
|
244
|
-
import { Form
|
|
125
|
+
import { Icon, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
126
|
+
import { Form } from "@dxos/react-ui-form";
|
|
245
127
|
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
246
128
|
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
247
129
|
import { isNonNullable } from "@dxos/util";
|
|
248
130
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectPanel.tsx";
|
|
249
131
|
var useInputSurfaceLookup = (baseData) => {
|
|
250
132
|
const pluginManager = usePluginManager();
|
|
251
|
-
return
|
|
133
|
+
return useCallback2(({ prop, schema, inputProps }) => {
|
|
252
134
|
const composedData = {
|
|
253
135
|
prop,
|
|
254
136
|
schema,
|
|
@@ -260,7 +142,7 @@ var useInputSurfaceLookup = (baseData) => {
|
|
|
260
142
|
})) {
|
|
261
143
|
return void 0;
|
|
262
144
|
}
|
|
263
|
-
return /* @__PURE__ */
|
|
145
|
+
return /* @__PURE__ */ React2.createElement(Surface, {
|
|
264
146
|
role: "form-input",
|
|
265
147
|
data: composedData,
|
|
266
148
|
...inputProps
|
|
@@ -271,11 +153,11 @@ var useInputSurfaceLookup = (baseData) => {
|
|
|
271
153
|
]);
|
|
272
154
|
};
|
|
273
155
|
var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
|
|
274
|
-
const { t } =
|
|
275
|
-
const [typename, setTypename] =
|
|
276
|
-
const [target, setTarget] =
|
|
277
|
-
const form = forms.find((form2) =>
|
|
278
|
-
const options = forms.map((form2) =>
|
|
156
|
+
const { t } = useTranslation2(SPACE_PLUGIN);
|
|
157
|
+
const [typename, setTypename] = useState2(initialTypename);
|
|
158
|
+
const [target, setTarget] = useState2(initialTarget);
|
|
159
|
+
const form = forms.find((form2) => getTypeAnnotation(form2.objectSchema)?.typename === typename);
|
|
160
|
+
const options = forms.map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
|
|
279
161
|
const nameA = t("typename label", {
|
|
280
162
|
ns: a.typename,
|
|
281
163
|
defaultValue: a.typename
|
|
@@ -286,7 +168,7 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
|
|
|
286
168
|
});
|
|
287
169
|
return nameA.localeCompare(nameB);
|
|
288
170
|
});
|
|
289
|
-
const handleCreateObject =
|
|
171
|
+
const handleCreateObject = useCallback2(async (props) => {
|
|
290
172
|
if (!form || !target) {
|
|
291
173
|
return;
|
|
292
174
|
}
|
|
@@ -300,7 +182,7 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
|
|
|
300
182
|
form,
|
|
301
183
|
target
|
|
302
184
|
]);
|
|
303
|
-
const handleSetTypename =
|
|
185
|
+
const handleSetTypename = useCallback2(async (typename2) => {
|
|
304
186
|
invariant(target, "target is required", {
|
|
305
187
|
F: __dxlog_file,
|
|
306
188
|
L: 94,
|
|
@@ -310,7 +192,7 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
|
|
|
310
192
|
"'target is required'"
|
|
311
193
|
]
|
|
312
194
|
});
|
|
313
|
-
const form2 = forms.find((form3) =>
|
|
195
|
+
const form2 = forms.find((form3) => getTypeAnnotation(form3.objectSchema)?.typename === typename2);
|
|
314
196
|
if (form2 && !form2.formSchema) {
|
|
315
197
|
await onCreateObject?.({
|
|
316
198
|
form: form2,
|
|
@@ -327,18 +209,18 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
|
|
|
327
209
|
const inputSurfaceLookup = useInputSurfaceLookup({
|
|
328
210
|
target
|
|
329
211
|
});
|
|
330
|
-
return /* @__PURE__ */
|
|
212
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
331
213
|
role: "form",
|
|
332
214
|
className: mx2("flex flex-col gap-2", classNames)
|
|
333
|
-
}, !form ? /* @__PURE__ */
|
|
215
|
+
}, !form ? /* @__PURE__ */ React2.createElement(SelectSchema, {
|
|
334
216
|
options,
|
|
335
217
|
resolve,
|
|
336
218
|
onChange: handleSetTypename
|
|
337
|
-
}) : !target ? /* @__PURE__ */
|
|
219
|
+
}) : !target ? /* @__PURE__ */ React2.createElement(SelectSpace, {
|
|
338
220
|
spaces,
|
|
339
221
|
defaultSpaceId,
|
|
340
222
|
onChange: setTarget
|
|
341
|
-
}) : form.formSchema ? /* @__PURE__ */
|
|
223
|
+
}) : form.formSchema ? /* @__PURE__ */ React2.createElement(Form, {
|
|
342
224
|
classNames: "!p-0",
|
|
343
225
|
autoFocus: true,
|
|
344
226
|
values: {
|
|
@@ -351,16 +233,16 @@ var CreateObjectPanel = ({ classNames, forms, spaces, typename: initialTypename,
|
|
|
351
233
|
}) : void 0);
|
|
352
234
|
};
|
|
353
235
|
var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
354
|
-
const { t } =
|
|
355
|
-
return /* @__PURE__ */
|
|
236
|
+
const { t } = useTranslation2(SPACE_PLUGIN);
|
|
237
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
356
238
|
label: t("space input label"),
|
|
357
239
|
classNames: "flex flex-col grow overflow-hidden"
|
|
358
|
-
}, /* @__PURE__ */
|
|
240
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
359
241
|
autoFocus: true,
|
|
360
242
|
"data-testid": "create-object-form.space-input",
|
|
361
243
|
placeholder: t("space input placeholder"),
|
|
362
244
|
classNames: "px-1 my-2"
|
|
363
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ React2.createElement(SearchList.Content, {
|
|
364
246
|
classNames: "max-bs-[24rem] overflow-auto"
|
|
365
247
|
}, spaces.sort((a, b) => {
|
|
366
248
|
const aName = toLocalizedString(getSpaceDisplayName(a, {
|
|
@@ -370,32 +252,32 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
|
370
252
|
personal: b.id === defaultSpaceId
|
|
371
253
|
}), t);
|
|
372
254
|
return aName.localeCompare(bName);
|
|
373
|
-
}).map((space) => /* @__PURE__ */
|
|
255
|
+
}).map((space) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
374
256
|
key: space.id,
|
|
375
257
|
value: toLocalizedString(getSpaceDisplayName(space, {
|
|
376
258
|
personal: space.id === defaultSpaceId
|
|
377
259
|
}), t),
|
|
378
260
|
onSelect: () => onChange(space),
|
|
379
261
|
classNames: "flex items-center gap-2"
|
|
380
|
-
}, /* @__PURE__ */
|
|
262
|
+
}, /* @__PURE__ */ React2.createElement("span", {
|
|
381
263
|
className: "grow truncate"
|
|
382
264
|
}, toLocalizedString(getSpaceDisplayName(space, {
|
|
383
265
|
personal: space.id === defaultSpaceId
|
|
384
266
|
}), t))))));
|
|
385
267
|
};
|
|
386
268
|
var SelectSchema = ({ options, resolve, onChange }) => {
|
|
387
|
-
const { t } =
|
|
388
|
-
return /* @__PURE__ */
|
|
269
|
+
const { t } = useTranslation2(SPACE_PLUGIN);
|
|
270
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
389
271
|
label: t("schema input label"),
|
|
390
272
|
classNames: "flex flex-col grow overflow-hidden"
|
|
391
|
-
}, /* @__PURE__ */
|
|
273
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
392
274
|
autoFocus: true,
|
|
393
275
|
"data-testid": "create-object-form.schema-input",
|
|
394
276
|
placeholder: t("schema input placeholder"),
|
|
395
277
|
classNames: "px-1 my-2"
|
|
396
|
-
}), /* @__PURE__ */
|
|
278
|
+
}), /* @__PURE__ */ React2.createElement(SearchList.Content, {
|
|
397
279
|
classNames: "max-bs-[24rem] overflow-auto"
|
|
398
|
-
}, options.map((option) => /* @__PURE__ */
|
|
280
|
+
}, options.map((option) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
399
281
|
key: option.typename,
|
|
400
282
|
value: t("typename label", {
|
|
401
283
|
ns: option.typename,
|
|
@@ -403,9 +285,9 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
403
285
|
}),
|
|
404
286
|
onSelect: () => onChange(option.typename),
|
|
405
287
|
classNames: "flex items-center gap-2"
|
|
406
|
-
}, /* @__PURE__ */
|
|
288
|
+
}, /* @__PURE__ */ React2.createElement("span", {
|
|
407
289
|
className: "flex gap-2 items-center grow truncate"
|
|
408
|
-
}, /* @__PURE__ */
|
|
290
|
+
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
409
291
|
icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
|
|
410
292
|
size: 5
|
|
411
293
|
}), t("typename label", {
|
|
@@ -416,16 +298,17 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
416
298
|
|
|
417
299
|
// packages/plugins/plugin-space/src/capabilities/index.ts
|
|
418
300
|
import { lazy } from "@dxos/app-framework";
|
|
419
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-
|
|
420
|
-
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-
|
|
421
|
-
var IdentityCreated = lazy(() => import("./identity-created-
|
|
422
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
423
|
-
var ReactRoot = lazy(() => import("./react-root-
|
|
424
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
425
|
-
var Schema = lazy(() => import("./schema-
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
301
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-42IGWRPL.mjs"));
|
|
302
|
+
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-FXONFKOE.mjs"));
|
|
303
|
+
var IdentityCreated = lazy(() => import("./identity-created-WJKAS2PV.mjs"));
|
|
304
|
+
var IntentResolver = lazy(() => import("./intent-resolver-67C5MOIE.mjs"));
|
|
305
|
+
var ReactRoot = lazy(() => import("./react-root-XPRWMZGT.mjs"));
|
|
306
|
+
var ReactSurface = lazy(() => import("./react-surface-MUE6M34Y.mjs"));
|
|
307
|
+
var Schema = lazy(() => import("./schema-OUZKVYM5.mjs"));
|
|
308
|
+
var Tools = lazy(() => import("./schema-tools-IU7EX5A5.mjs"));
|
|
309
|
+
var SpaceSettings = lazy(() => import("./settings-FJZPC2TV.mjs"));
|
|
310
|
+
var SpaceState = lazy(() => import("./state-Z6E2YTNC.mjs"));
|
|
311
|
+
var SpacesReady = lazy(() => import("./spaces-ready-7X5PGB2V.mjs"));
|
|
429
312
|
|
|
430
313
|
// packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
|
|
431
314
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
|
|
@@ -433,16 +316,15 @@ var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
|
433
316
|
var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavigate }) => {
|
|
434
317
|
const closeRef = useRef(null);
|
|
435
318
|
const manager = usePluginManager2();
|
|
436
|
-
const { t } =
|
|
319
|
+
const { t } = useTranslation3(SPACE_PLUGIN);
|
|
437
320
|
const client = useClient2();
|
|
438
321
|
const spaces = useSpaces();
|
|
439
322
|
const { dispatchPromise: dispatch } = useIntentDispatcher2();
|
|
440
323
|
const forms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
441
|
-
const resolve =
|
|
324
|
+
const resolve = useCallback3((typename2) => manager.context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
|
|
442
325
|
manager
|
|
443
326
|
]);
|
|
444
|
-
const handleCreateObject =
|
|
445
|
-
const target2 = isSpace(_target) ? _target.properties[CollectionType.typename]?.target : _target;
|
|
327
|
+
const handleCreateObject = useCallback3(async ({ form, target: target2, data = {} }) => {
|
|
446
328
|
if (!target2) {
|
|
447
329
|
return;
|
|
448
330
|
}
|
|
@@ -450,7 +332,7 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
|
|
|
450
332
|
const space = isSpace(target2) ? target2 : getSpace(target2);
|
|
451
333
|
invariant2(space, "Missing space", {
|
|
452
334
|
F: __dxlog_file2,
|
|
453
|
-
L:
|
|
335
|
+
L: 72,
|
|
454
336
|
S: void 0,
|
|
455
337
|
A: [
|
|
456
338
|
"space",
|
|
@@ -464,7 +346,8 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
|
|
|
464
346
|
if (isReactiveObject(object)) {
|
|
465
347
|
const addObjectIntent = createIntent2(SpaceAction.AddObject, {
|
|
466
348
|
target: target2,
|
|
467
|
-
object
|
|
349
|
+
object,
|
|
350
|
+
hidden: form.hidden
|
|
468
351
|
});
|
|
469
352
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
470
353
|
if (shouldNavigate(object)) {
|
|
@@ -482,22 +365,22 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
|
|
|
482
365
|
return (
|
|
483
366
|
// TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
|
|
484
367
|
// Consider factoring it out to the tabs package.
|
|
485
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ React3.createElement(Dialog.Content, {
|
|
486
369
|
classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
|
|
487
|
-
}, /* @__PURE__ */
|
|
370
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
488
371
|
role: "none",
|
|
489
372
|
className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
|
|
490
|
-
}, /* @__PURE__ */
|
|
373
|
+
}, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("create object dialog title")), /* @__PURE__ */ React3.createElement(Dialog.Close, {
|
|
491
374
|
asChild: true
|
|
492
|
-
}, /* @__PURE__ */
|
|
375
|
+
}, /* @__PURE__ */ React3.createElement(Button2, {
|
|
493
376
|
ref: closeRef,
|
|
494
377
|
density: "fine",
|
|
495
378
|
variant: "ghost",
|
|
496
379
|
autoFocus: true
|
|
497
|
-
}, /* @__PURE__ */
|
|
380
|
+
}, /* @__PURE__ */ React3.createElement(Icon2, {
|
|
498
381
|
icon: "ph--x--regular",
|
|
499
382
|
size: 4
|
|
500
|
-
})))), /* @__PURE__ */
|
|
383
|
+
})))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
|
|
501
384
|
classNames: "p-4",
|
|
502
385
|
forms,
|
|
503
386
|
spaces,
|
|
@@ -513,19 +396,19 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
|
|
|
513
396
|
|
|
514
397
|
// packages/plugins/plugin-space/src/components/CreateDialog/CreateSpaceDialog.tsx
|
|
515
398
|
import { Effect } from "effect";
|
|
516
|
-
import
|
|
399
|
+
import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
|
|
517
400
|
import { createIntent as createIntent3, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
|
|
518
|
-
import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as
|
|
519
|
-
import { Form as
|
|
401
|
+
import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
402
|
+
import { Form as Form2 } from "@dxos/react-ui-form";
|
|
520
403
|
var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
|
|
521
|
-
var
|
|
404
|
+
var initialValues = {
|
|
522
405
|
edgeReplication: true
|
|
523
406
|
};
|
|
524
407
|
var CreateSpaceDialog = () => {
|
|
525
408
|
const closeRef = useRef2(null);
|
|
526
|
-
const { t } =
|
|
409
|
+
const { t } = useTranslation4(SPACE_PLUGIN);
|
|
527
410
|
const { dispatch } = useIntentDispatcher3();
|
|
528
|
-
const handleCreateSpace =
|
|
411
|
+
const handleCreateSpace = useCallback4(async (data) => {
|
|
529
412
|
const program = Effect.gen(function* () {
|
|
530
413
|
const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
|
|
531
414
|
yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
|
|
@@ -543,28 +426,28 @@ var CreateSpaceDialog = () => {
|
|
|
543
426
|
return (
|
|
544
427
|
// TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
|
|
545
428
|
// Consider factoring it out to the tabs package.
|
|
546
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ React4.createElement(Dialog2.Content, {
|
|
547
430
|
classNames: "p-0 bs-content min-bs-[16rem] max-bs-full md:max-is-[32rem] overflow-hidden"
|
|
548
|
-
}, /* @__PURE__ */
|
|
431
|
+
}, /* @__PURE__ */ React4.createElement("div", {
|
|
549
432
|
role: "none",
|
|
550
433
|
className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
|
|
551
|
-
}, /* @__PURE__ */
|
|
434
|
+
}, /* @__PURE__ */ React4.createElement(Dialog2.Title, null, t("create space dialog title")), /* @__PURE__ */ React4.createElement(Dialog2.Close, {
|
|
552
435
|
asChild: true
|
|
553
|
-
}, /* @__PURE__ */
|
|
436
|
+
}, /* @__PURE__ */ React4.createElement(Button3, {
|
|
554
437
|
ref: closeRef,
|
|
555
438
|
density: "fine",
|
|
556
439
|
variant: "ghost",
|
|
557
440
|
autoFocus: true
|
|
558
|
-
}, /* @__PURE__ */
|
|
441
|
+
}, /* @__PURE__ */ React4.createElement(Icon3, {
|
|
559
442
|
icon: "ph--x--regular",
|
|
560
443
|
size: 4
|
|
561
|
-
})))), /* @__PURE__ */
|
|
444
|
+
})))), /* @__PURE__ */ React4.createElement("div", {
|
|
562
445
|
className: "p-4"
|
|
563
|
-
}, /* @__PURE__ */
|
|
446
|
+
}, /* @__PURE__ */ React4.createElement(Form2, {
|
|
564
447
|
testId: "create-space-form",
|
|
565
448
|
classNames: "!p-0",
|
|
566
449
|
autoFocus: true,
|
|
567
|
-
values:
|
|
450
|
+
values: initialValues,
|
|
568
451
|
schema: SpaceForm,
|
|
569
452
|
onSave: handleCreateSpace
|
|
570
453
|
})))
|
|
@@ -572,87 +455,89 @@ var CreateSpaceDialog = () => {
|
|
|
572
455
|
};
|
|
573
456
|
|
|
574
457
|
// packages/plugins/plugin-space/src/components/CollectionMain.tsx
|
|
575
|
-
import
|
|
576
|
-
import { useTranslation as
|
|
458
|
+
import React5 from "react";
|
|
459
|
+
import { useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
577
460
|
import { baseSurface, descriptionText, mx as mx3 } from "@dxos/react-ui-theme";
|
|
578
461
|
var CollectionMain = ({ collection }) => {
|
|
579
|
-
const { t } =
|
|
580
|
-
return /* @__PURE__ */
|
|
462
|
+
const { t } = useTranslation5(SPACE_PLUGIN);
|
|
463
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
581
464
|
role: "none",
|
|
582
465
|
className: mx3(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
|
|
583
466
|
"data-testid": "composer.firstRunMessage"
|
|
584
|
-
}, /* @__PURE__ */
|
|
467
|
+
}, /* @__PURE__ */ React5.createElement("p", {
|
|
585
468
|
role: "alert",
|
|
586
469
|
className: mx3(descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
|
|
587
470
|
}, collection.name ?? t("unnamed collection label")));
|
|
588
471
|
};
|
|
589
472
|
|
|
590
473
|
// packages/plugins/plugin-space/src/components/CollectionSection.tsx
|
|
591
|
-
import
|
|
592
|
-
import { useTranslation as
|
|
474
|
+
import React6 from "react";
|
|
475
|
+
import { useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
593
476
|
var CollectionSection = ({ collection }) => {
|
|
594
|
-
const { t } =
|
|
595
|
-
return /* @__PURE__ */
|
|
477
|
+
const { t } = useTranslation6(SPACE_PLUGIN);
|
|
478
|
+
return /* @__PURE__ */ React6.createElement("div", {
|
|
596
479
|
className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
|
|
597
|
-
}, /* @__PURE__ */
|
|
480
|
+
}, /* @__PURE__ */ React6.createElement("span", {
|
|
598
481
|
className: "truncate"
|
|
599
482
|
}, collection.name ?? t("unnamed collection label")));
|
|
600
483
|
};
|
|
601
484
|
|
|
602
485
|
// packages/plugins/plugin-space/src/components/JoinDialog.tsx
|
|
603
|
-
import
|
|
486
|
+
import React7, { useCallback as useCallback5 } from "react";
|
|
604
487
|
import { createIntent as createIntent4, LayoutAction as LayoutAction4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
|
|
605
|
-
import {
|
|
488
|
+
import { Trigger } from "@dxos/async";
|
|
606
489
|
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
607
490
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
608
|
-
import { Dialog as Dialog3, useTranslation as
|
|
491
|
+
import { Dialog as Dialog3, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
609
492
|
import { JoinPanel } from "@dxos/shell/react";
|
|
610
|
-
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/JoinDialog.tsx";
|
|
611
493
|
var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
|
|
612
494
|
var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
613
495
|
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
614
496
|
const client = useClient3();
|
|
615
497
|
const { graph } = useAppGraph();
|
|
616
|
-
const { t } =
|
|
617
|
-
const handleDone =
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
part: "toast",
|
|
622
|
-
subject: {
|
|
623
|
-
id: `${SPACE_PLUGIN}/join-success`,
|
|
624
|
-
duration: 5e3,
|
|
625
|
-
title: [
|
|
626
|
-
"join success label",
|
|
627
|
-
{
|
|
628
|
-
ns: SPACE_PLUGIN
|
|
629
|
-
}
|
|
630
|
-
],
|
|
631
|
-
closeLabel: [
|
|
632
|
-
"dismiss label",
|
|
633
|
-
{
|
|
634
|
-
ns: SPACE_PLUGIN
|
|
635
|
-
}
|
|
636
|
-
]
|
|
637
|
-
}
|
|
638
|
-
})),
|
|
639
|
-
dispatch(createIntent4(LayoutAction4.UpdateDialog, {
|
|
640
|
-
part: "dialog",
|
|
641
|
-
options: {
|
|
642
|
-
state: false
|
|
643
|
-
}
|
|
644
|
-
}))
|
|
645
|
-
]);
|
|
498
|
+
const { t } = useTranslation7(SPACE_PLUGIN);
|
|
499
|
+
const handleDone = useCallback5(async (result) => {
|
|
500
|
+
const spaceKey = result?.spaceKey;
|
|
501
|
+
if (!spaceKey) {
|
|
502
|
+
return;
|
|
646
503
|
}
|
|
647
|
-
|
|
504
|
+
await Promise.all([
|
|
505
|
+
dispatch(createIntent4(LayoutAction4.AddToast, {
|
|
506
|
+
part: "toast",
|
|
507
|
+
subject: {
|
|
508
|
+
id: `${SPACE_PLUGIN}/join-success`,
|
|
509
|
+
duration: 5e3,
|
|
510
|
+
title: [
|
|
511
|
+
"join success label",
|
|
512
|
+
{
|
|
513
|
+
ns: SPACE_PLUGIN
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
closeLabel: [
|
|
517
|
+
"dismiss label",
|
|
518
|
+
{
|
|
519
|
+
ns: SPACE_PLUGIN
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
})),
|
|
524
|
+
dispatch(createIntent4(LayoutAction4.UpdateDialog, {
|
|
525
|
+
part: "dialog",
|
|
526
|
+
options: {
|
|
527
|
+
state: false
|
|
528
|
+
}
|
|
529
|
+
}))
|
|
530
|
+
]);
|
|
531
|
+
let space = client.spaces.get(spaceKey);
|
|
648
532
|
if (!space) {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
533
|
+
const trigger = new Trigger();
|
|
534
|
+
client.spaces.subscribe(() => {
|
|
535
|
+
const space2 = client.spaces.get(spaceKey);
|
|
536
|
+
if (space2) {
|
|
537
|
+
trigger.wake(space2);
|
|
538
|
+
}
|
|
654
539
|
});
|
|
655
|
-
|
|
540
|
+
space = await trigger.wait();
|
|
656
541
|
}
|
|
657
542
|
await dispatch(createIntent4(LayoutAction4.SwitchWorkspace, {
|
|
658
543
|
part: "workspace",
|
|
@@ -691,52 +576,422 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
691
576
|
client,
|
|
692
577
|
graph
|
|
693
578
|
]);
|
|
694
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ React7.createElement(Dialog3.Content, null, /* @__PURE__ */ React7.createElement(Dialog3.Title, {
|
|
695
580
|
classNames: "sr-only"
|
|
696
581
|
}, t("join space label", {
|
|
697
582
|
ns: "os"
|
|
698
|
-
})), /* @__PURE__ */
|
|
583
|
+
})), /* @__PURE__ */ React7.createElement(JoinPanel, {
|
|
699
584
|
...props,
|
|
700
|
-
exitActionParent: /* @__PURE__ */
|
|
585
|
+
exitActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
|
|
701
586
|
asChild: true
|
|
702
587
|
}),
|
|
703
|
-
doneActionParent: /* @__PURE__ */
|
|
588
|
+
doneActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
|
|
704
589
|
asChild: true
|
|
705
590
|
}),
|
|
706
591
|
onDone: handleDone
|
|
707
592
|
}));
|
|
708
593
|
};
|
|
709
594
|
|
|
595
|
+
// packages/plugins/plugin-space/src/components/MembersContainer.tsx
|
|
596
|
+
import { Check, X } from "@phosphor-icons/react";
|
|
597
|
+
import React8, { useMemo, useState as useState3 } from "react";
|
|
598
|
+
import { QR } from "react-qr-rounded";
|
|
599
|
+
import { log } from "@dxos/log";
|
|
600
|
+
import { useConfig } from "@dxos/react-client";
|
|
601
|
+
import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
|
|
602
|
+
import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
|
|
603
|
+
import { Button as Button4, Clipboard, Icon as Icon4, useId, useTranslation as useTranslation8 } from "@dxos/react-ui";
|
|
604
|
+
import { ControlSection, ControlFrame, ControlFrameItem } from "@dxos/react-ui-form";
|
|
605
|
+
import { StackItem } from "@dxos/react-ui-stack";
|
|
606
|
+
import { getSize as getSize2, mx as mx4 } from "@dxos/react-ui-theme";
|
|
607
|
+
import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport } from "@dxos/shell/react";
|
|
608
|
+
import { hexToEmoji } from "@dxos/util";
|
|
609
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer.tsx";
|
|
610
|
+
var activeActionKey = "dxos:react-shell/space-manager/active-action";
|
|
611
|
+
var handleInvitationEvent = (invitation, subscription) => {
|
|
612
|
+
const invitationCode = InvitationEncoder.encode(invitation);
|
|
613
|
+
if (invitation.state === Invitation.State.CONNECTING) {
|
|
614
|
+
log.info(JSON.stringify({
|
|
615
|
+
invitationCode,
|
|
616
|
+
authCode: invitation.authCode
|
|
617
|
+
}), void 0, {
|
|
618
|
+
F: __dxlog_file3,
|
|
619
|
+
L: 38,
|
|
620
|
+
S: void 0,
|
|
621
|
+
C: (f, a) => f(...a)
|
|
622
|
+
});
|
|
623
|
+
subscription.unsubscribe();
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
627
|
+
const { t } = useTranslation8("os");
|
|
628
|
+
const config = useConfig();
|
|
629
|
+
const invitations = useSpaceInvitations(space.key);
|
|
630
|
+
const visibleInvitations = invitations?.filter((invitation) => ![
|
|
631
|
+
Invitation.State.CANCELLED
|
|
632
|
+
].includes(invitation.get().state));
|
|
633
|
+
const [activeAction, setInternalActiveAction] = useState3(localStorage.getItem(activeActionKey) ?? "inviteMany");
|
|
634
|
+
const setActiveAction = (nextAction) => {
|
|
635
|
+
setInternalActiveAction(nextAction);
|
|
636
|
+
localStorage.setItem(activeActionKey, nextAction);
|
|
637
|
+
};
|
|
638
|
+
const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
|
|
639
|
+
const inviteActions = useMemo(() => ({
|
|
640
|
+
inviteOne: {
|
|
641
|
+
label: t("invite one label"),
|
|
642
|
+
description: t("invite one description"),
|
|
643
|
+
icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
|
|
644
|
+
icon: "ph--user-plus--regular",
|
|
645
|
+
size: 5
|
|
646
|
+
}),
|
|
647
|
+
testId: "membersContainer.inviteOne",
|
|
648
|
+
onClick: () => {
|
|
649
|
+
const invitation = space.share?.({
|
|
650
|
+
type: Invitation.Type.INTERACTIVE,
|
|
651
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
652
|
+
multiUse: false,
|
|
653
|
+
target: target && fullyQualifiedId2(target)
|
|
654
|
+
});
|
|
655
|
+
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
656
|
+
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
inviteMany: {
|
|
661
|
+
label: t("invite many label"),
|
|
662
|
+
description: t("invite many description"),
|
|
663
|
+
icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
|
|
664
|
+
icon: "ph--users-three--regular",
|
|
665
|
+
size: 5
|
|
666
|
+
}),
|
|
667
|
+
testId: "membersContainer.inviteMany",
|
|
668
|
+
onClick: () => {
|
|
669
|
+
const invitation = space.share?.({
|
|
670
|
+
type: Invitation.Type.DELEGATED,
|
|
671
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
672
|
+
multiUse: true,
|
|
673
|
+
target: target && fullyQualifiedId2(target)
|
|
674
|
+
});
|
|
675
|
+
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
676
|
+
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}), [
|
|
681
|
+
t,
|
|
682
|
+
space,
|
|
683
|
+
target
|
|
684
|
+
]);
|
|
685
|
+
const [selectedInvitation, setSelectedInvitation] = useState3(null);
|
|
686
|
+
const handleSend = (event) => {
|
|
687
|
+
setSelectedInvitation(event.invitation);
|
|
688
|
+
};
|
|
689
|
+
const handleBack = () => {
|
|
690
|
+
setSelectedInvitation(null);
|
|
691
|
+
};
|
|
692
|
+
return /* @__PURE__ */ React8.createElement(StackItem.Content, {
|
|
693
|
+
classNames: "p-2 block overflow-y-auto"
|
|
694
|
+
}, /* @__PURE__ */ React8.createElement(ControlSection, {
|
|
695
|
+
title: t("members verbose label", {
|
|
696
|
+
ns: SPACE_PLUGIN
|
|
697
|
+
}),
|
|
698
|
+
description: t("members description", {
|
|
699
|
+
ns: SPACE_PLUGIN
|
|
700
|
+
})
|
|
701
|
+
}, /* @__PURE__ */ React8.createElement(ControlFrame, null, /* @__PURE__ */ React8.createElement(ControlFrameItem, {
|
|
702
|
+
title: t("members label", {
|
|
703
|
+
ns: SPACE_PLUGIN
|
|
704
|
+
})
|
|
705
|
+
}, /* @__PURE__ */ React8.createElement(SpaceMemberList, {
|
|
706
|
+
spaceKey: space.key,
|
|
707
|
+
includeSelf: true
|
|
708
|
+
})), /* @__PURE__ */ React8.createElement(ControlFrameItem, {
|
|
709
|
+
title: t("invitations label", {
|
|
710
|
+
ns: SPACE_PLUGIN
|
|
711
|
+
})
|
|
712
|
+
}, selectedInvitation && /* @__PURE__ */ React8.createElement(InvitationSection, {
|
|
713
|
+
...selectedInvitation,
|
|
714
|
+
onBack: handleBack
|
|
715
|
+
}), !selectedInvitation && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
|
|
716
|
+
className: "text-description mbe-2"
|
|
717
|
+
}, t("space invitation description", {
|
|
718
|
+
ns: SPACE_PLUGIN
|
|
719
|
+
})), /* @__PURE__ */ React8.createElement(InvitationList, {
|
|
720
|
+
className: "mb-2",
|
|
721
|
+
send: handleSend,
|
|
722
|
+
invitations: visibleInvitations ?? [],
|
|
723
|
+
onClickRemove: (invitation) => invitation.cancel(),
|
|
724
|
+
createInvitationUrl
|
|
725
|
+
}), /* @__PURE__ */ React8.createElement(BifurcatedAction, {
|
|
726
|
+
actions: inviteActions,
|
|
727
|
+
activeAction,
|
|
728
|
+
onChangeActiveAction: setActiveAction,
|
|
729
|
+
"data-testid": "membersContainer.createInvitation"
|
|
730
|
+
}))))));
|
|
731
|
+
};
|
|
732
|
+
var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
|
|
733
|
+
const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
|
|
734
|
+
return /* @__PURE__ */ React8.createElement(Viewport.Root, {
|
|
735
|
+
activeView
|
|
736
|
+
}, /* @__PURE__ */ React8.createElement(Viewport.Views, null, /* @__PURE__ */ React8.createElement(Viewport.View, {
|
|
737
|
+
id: "init"
|
|
738
|
+
}), /* @__PURE__ */ React8.createElement(Viewport.View, {
|
|
739
|
+
id: "complete"
|
|
740
|
+
}, /* @__PURE__ */ React8.createElement(InvitationComplete, {
|
|
741
|
+
statusValue: state
|
|
742
|
+
})), /* @__PURE__ */ React8.createElement(Viewport.View, {
|
|
743
|
+
id: "auth-code"
|
|
744
|
+
}, /* @__PURE__ */ React8.createElement(InvitationAuthCode, {
|
|
745
|
+
id: invitationId,
|
|
746
|
+
code: authCode ?? "never",
|
|
747
|
+
onCancel: onBack
|
|
748
|
+
})), /* @__PURE__ */ React8.createElement(Viewport.View, {
|
|
749
|
+
id: "qr-code"
|
|
750
|
+
}, /* @__PURE__ */ React8.createElement(InvitationQR, {
|
|
751
|
+
id: invitationId,
|
|
752
|
+
url,
|
|
753
|
+
onCancel: onBack
|
|
754
|
+
}))));
|
|
755
|
+
};
|
|
756
|
+
var InvitationQR = ({ id, url, onCancel }) => {
|
|
757
|
+
const { t } = useTranslation8("os");
|
|
758
|
+
const qrLabel = useId("members-container__qr-code");
|
|
759
|
+
const emoji = hexToEmoji(id);
|
|
760
|
+
return /* @__PURE__ */ React8.createElement(Clipboard.Provider, null, /* @__PURE__ */ React8.createElement("p", {
|
|
761
|
+
className: "text-description"
|
|
762
|
+
}, t("qr code description", {
|
|
763
|
+
ns: SPACE_PLUGIN
|
|
764
|
+
})), /* @__PURE__ */ React8.createElement("div", {
|
|
765
|
+
role: "group",
|
|
766
|
+
className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
|
|
767
|
+
}, /* @__PURE__ */ React8.createElement("div", {
|
|
768
|
+
role: "none",
|
|
769
|
+
className: "is-full aspect-square relative text-description"
|
|
770
|
+
}, /* @__PURE__ */ React8.createElement(QR, {
|
|
771
|
+
rounding: 100,
|
|
772
|
+
backgroundColor: "transparent",
|
|
773
|
+
color: "currentColor",
|
|
774
|
+
"aria-labelledby": qrLabel,
|
|
775
|
+
errorCorrectionLevel: "Q",
|
|
776
|
+
cutout: true
|
|
777
|
+
}, url ?? "never"), /* @__PURE__ */ React8.createElement(Centered, null, /* @__PURE__ */ React8.createElement(Emoji, {
|
|
778
|
+
text: emoji
|
|
779
|
+
}))), /* @__PURE__ */ React8.createElement("span", {
|
|
780
|
+
id: qrLabel,
|
|
781
|
+
className: "sr-only"
|
|
782
|
+
}, t("qr label")), /* @__PURE__ */ React8.createElement(Clipboard.Button, {
|
|
783
|
+
value: url ?? "never"
|
|
784
|
+
})), /* @__PURE__ */ React8.createElement(Button4, {
|
|
785
|
+
variant: "ghost",
|
|
786
|
+
onClick: onCancel
|
|
787
|
+
}, t("cancel label")));
|
|
788
|
+
};
|
|
789
|
+
var InvitationAuthCode = ({ id, code, onCancel }) => {
|
|
790
|
+
const { t } = useTranslation8("os");
|
|
791
|
+
const emoji = hexToEmoji(id);
|
|
792
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
|
|
793
|
+
className: "text-description"
|
|
794
|
+
}, t("auth other device emoji message")), emoji && /* @__PURE__ */ React8.createElement(Emoji, {
|
|
795
|
+
text: emoji,
|
|
796
|
+
className: "mli-auto mlb-2 text-center"
|
|
797
|
+
}), /* @__PURE__ */ React8.createElement("p", {
|
|
798
|
+
className: "text-description"
|
|
799
|
+
}, t("auth code message")), /* @__PURE__ */ React8.createElement(AuthCode, {
|
|
800
|
+
code,
|
|
801
|
+
large: true,
|
|
802
|
+
classNames: "mli-auto mlb-2 text-center grow"
|
|
803
|
+
}), /* @__PURE__ */ React8.createElement(Button4, {
|
|
804
|
+
variant: "ghost",
|
|
805
|
+
onClick: onCancel
|
|
806
|
+
}, t("cancel label")));
|
|
807
|
+
};
|
|
808
|
+
var InvitationComplete = ({ statusValue }) => {
|
|
809
|
+
return statusValue > 0 ? /* @__PURE__ */ React8.createElement(Check, {
|
|
810
|
+
className: mx4("m-1.5", getSize2(6))
|
|
811
|
+
}) : /* @__PURE__ */ React8.createElement(X, {
|
|
812
|
+
className: mx4("m-1.5", getSize2(6))
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
|
|
710
816
|
// packages/plugins/plugin-space/src/components/MenuFooter.tsx
|
|
711
817
|
import { Planet } from "@phosphor-icons/react";
|
|
712
|
-
import
|
|
818
|
+
import React9 from "react";
|
|
713
819
|
import { getSpace as getSpace2 } from "@dxos/client/echo";
|
|
714
820
|
import { useClient as useClient4 } from "@dxos/react-client";
|
|
715
|
-
import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as
|
|
821
|
+
import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation9 } from "@dxos/react-ui";
|
|
716
822
|
var MenuFooter = ({ object }) => {
|
|
717
|
-
const { t } =
|
|
823
|
+
const { t } = useTranslation9(SPACE_PLUGIN);
|
|
718
824
|
const client = useClient4();
|
|
719
825
|
const space = getSpace2(object);
|
|
720
826
|
const spaceName = space ? getSpaceDisplayName(space, {
|
|
721
827
|
personal: client.spaces.default === space
|
|
722
828
|
}) : "";
|
|
723
|
-
return space ? /* @__PURE__ */
|
|
829
|
+
return space ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React9.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React9.createElement("dl", {
|
|
724
830
|
className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
|
|
725
|
-
}, /* @__PURE__ */
|
|
831
|
+
}, /* @__PURE__ */ React9.createElement("dt", {
|
|
726
832
|
className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
|
|
727
|
-
}, t("location label")), /* @__PURE__ */
|
|
833
|
+
}, t("location label")), /* @__PURE__ */ React9.createElement("dd", {
|
|
728
834
|
className: "line-clamp-3"
|
|
729
|
-
}, /* @__PURE__ */
|
|
835
|
+
}, /* @__PURE__ */ React9.createElement(Planet, {
|
|
730
836
|
className: "inline-block mie-1"
|
|
731
837
|
}), toLocalizedString2(spaceName, t)))) : null;
|
|
732
838
|
};
|
|
733
839
|
|
|
840
|
+
// packages/plugins/plugin-space/src/components/ObjectSettingsContainer/ObjectSettingsContainer.tsx
|
|
841
|
+
import React13, { useMemo as useMemo2 } from "react";
|
|
842
|
+
import { Surface as Surface2 } from "@dxos/app-framework";
|
|
843
|
+
import { Clipboard as Clipboard2 } from "@dxos/react-ui";
|
|
844
|
+
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
845
|
+
|
|
846
|
+
// packages/plugins/plugin-space/src/components/ObjectSettingsContainer/AdvancedObjectSettings.tsx
|
|
847
|
+
import React11, { useCallback as useCallback7, useState as useState4 } from "react";
|
|
848
|
+
import { ForeignKeySchema } from "@dxos/echo-schema";
|
|
849
|
+
import { getMeta } from "@dxos/react-client/echo";
|
|
850
|
+
import { IconButton as IconButton2, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
851
|
+
import { Form as Form3 } from "@dxos/react-ui-form";
|
|
852
|
+
|
|
853
|
+
// packages/plugins/plugin-space/src/components/ObjectSettingsContainer/ForeignKeys.tsx
|
|
854
|
+
import React10, { useCallback as useCallback6 } from "react";
|
|
855
|
+
import { IconButton, List, ListItem, useTranslation as useTranslation10 } from "@dxos/react-ui";
|
|
856
|
+
var ForeignKeys = ({ keys, onDelete }) => {
|
|
857
|
+
return /* @__PURE__ */ React10.createElement(List, {
|
|
858
|
+
classNames: "flex flex-col gap-2"
|
|
859
|
+
}, keys.map((key) => /* @__PURE__ */ React10.createElement(KeyItem, {
|
|
860
|
+
key: key.id,
|
|
861
|
+
forignKey: key,
|
|
862
|
+
onDelete
|
|
863
|
+
})));
|
|
864
|
+
};
|
|
865
|
+
var KeyItem = ({ forignKey, onDelete }) => {
|
|
866
|
+
const { t } = useTranslation10(SPACE_PLUGIN);
|
|
867
|
+
const handleDelete = useCallback6(() => {
|
|
868
|
+
onDelete?.(forignKey);
|
|
869
|
+
}, [
|
|
870
|
+
forignKey,
|
|
871
|
+
onDelete
|
|
872
|
+
]);
|
|
873
|
+
return /* @__PURE__ */ React10.createElement(ListItem.Root, {
|
|
874
|
+
classNames: "px-2"
|
|
875
|
+
}, /* @__PURE__ */ React10.createElement(ListItem.Heading, {
|
|
876
|
+
classNames: "flex flex-col grow truncate"
|
|
877
|
+
}, /* @__PURE__ */ React10.createElement("div", null, forignKey.source), /* @__PURE__ */ React10.createElement("div", {
|
|
878
|
+
className: "text-description text-sm truncate"
|
|
879
|
+
}, forignKey.id)), /* @__PURE__ */ React10.createElement(ListItem.Endcap, null, /* @__PURE__ */ React10.createElement(IconButton, {
|
|
880
|
+
iconOnly: true,
|
|
881
|
+
icon: "ph--x--regular",
|
|
882
|
+
variant: "ghost",
|
|
883
|
+
label: t("delete key"),
|
|
884
|
+
onClick: handleDelete
|
|
885
|
+
})));
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
// packages/plugins/plugin-space/src/components/ObjectSettingsContainer/AdvancedObjectSettings.tsx
|
|
889
|
+
var initialValues2 = {
|
|
890
|
+
source: "",
|
|
891
|
+
id: ""
|
|
892
|
+
};
|
|
893
|
+
var AdvancedObjectSettings = ({ object }) => {
|
|
894
|
+
const { t } = useTranslation11(SPACE_PLUGIN);
|
|
895
|
+
const [adding, setAdding] = useState4(false);
|
|
896
|
+
const keys = getMeta(object).keys;
|
|
897
|
+
const handleNew = useCallback7(() => setAdding(true), []);
|
|
898
|
+
const handleCancel = useCallback7(() => setAdding(false), []);
|
|
899
|
+
const handleSave = useCallback7((key) => {
|
|
900
|
+
const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
|
|
901
|
+
if (index === -1) {
|
|
902
|
+
keys.push(key);
|
|
903
|
+
}
|
|
904
|
+
setAdding(false);
|
|
905
|
+
}, [
|
|
906
|
+
keys
|
|
907
|
+
]);
|
|
908
|
+
const handleDelete = useCallback7((key) => {
|
|
909
|
+
const index = keys.findIndex(({ source, id }) => source === key.source && id === key.id);
|
|
910
|
+
if (index !== -1) {
|
|
911
|
+
keys.splice(index, 1);
|
|
912
|
+
}
|
|
913
|
+
}, [
|
|
914
|
+
keys
|
|
915
|
+
]);
|
|
916
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("div", {
|
|
917
|
+
className: "p-2 flex flex-col gap-4"
|
|
918
|
+
}, /* @__PURE__ */ React11.createElement("h2", null, t("advanced settings label")), /* @__PURE__ */ React11.createElement("div", {
|
|
919
|
+
className: "flex items-center"
|
|
920
|
+
}, /* @__PURE__ */ React11.createElement("h3", {
|
|
921
|
+
className: "text-sm font-semibold"
|
|
922
|
+
}, t("foreign keys")), /* @__PURE__ */ React11.createElement("div", {
|
|
923
|
+
className: "grow"
|
|
924
|
+
}), /* @__PURE__ */ React11.createElement(IconButton2, {
|
|
925
|
+
classNames: adding && "invisible",
|
|
926
|
+
icon: "ph--plus--regular",
|
|
927
|
+
label: t("add key"),
|
|
928
|
+
onClick: handleNew
|
|
929
|
+
})), !adding && /* @__PURE__ */ React11.createElement(ForeignKeys, {
|
|
930
|
+
keys,
|
|
931
|
+
onDelete: handleDelete
|
|
932
|
+
})), adding && /* @__PURE__ */ React11.createElement(Form3, {
|
|
933
|
+
schema: ForeignKeySchema,
|
|
934
|
+
values: initialValues2,
|
|
935
|
+
onSave: handleSave,
|
|
936
|
+
onCancel: handleCancel
|
|
937
|
+
}));
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
// packages/plugins/plugin-space/src/components/ObjectSettingsContainer/BaseObjectSettings.tsx
|
|
941
|
+
import React12, { useRef as useRef3 } from "react";
|
|
942
|
+
import { Input, useTranslation as useTranslation12 } from "@dxos/react-ui";
|
|
943
|
+
import { mx as mx5 } from "@dxos/react-ui-theme";
|
|
944
|
+
var BaseObjectSettings = ({ classNames, children, object }) => {
|
|
945
|
+
const { t } = useTranslation12(meta.id);
|
|
946
|
+
const inputRef = useRef3(null);
|
|
947
|
+
return /* @__PURE__ */ React12.createElement("form", {
|
|
948
|
+
className: mx5("flex flex-col p-2 gap-2", classNames)
|
|
949
|
+
}, /* @__PURE__ */ React12.createElement(Input.Root, null, /* @__PURE__ */ React12.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React12.createElement(Input.TextInput, {
|
|
950
|
+
ref: inputRef,
|
|
951
|
+
placeholder: t("name placeholder"),
|
|
952
|
+
value: object.name ?? "",
|
|
953
|
+
onChange: (event) => {
|
|
954
|
+
object.name = event.target.value;
|
|
955
|
+
},
|
|
956
|
+
onKeyDown: (event) => {
|
|
957
|
+
if (event.key === "Enter") {
|
|
958
|
+
inputRef.current?.blur();
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
})), children);
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
// packages/plugins/plugin-space/src/components/ObjectSettingsContainer/ObjectSettingsContainer.tsx
|
|
965
|
+
var ObjectSettingsContainer = ({ object, role }) => {
|
|
966
|
+
const data = useMemo2(() => ({
|
|
967
|
+
subject: object
|
|
968
|
+
}), [
|
|
969
|
+
object
|
|
970
|
+
]);
|
|
971
|
+
return /* @__PURE__ */ React13.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React13.createElement(StackItem2.Content, {
|
|
972
|
+
toolbar: false,
|
|
973
|
+
role
|
|
974
|
+
}, /* @__PURE__ */ React13.createElement("div", {
|
|
975
|
+
className: "flex flex-col overflow-y-auto divide-y divide-separator"
|
|
976
|
+
}, /* @__PURE__ */ React13.createElement(BaseObjectSettings, {
|
|
977
|
+
object
|
|
978
|
+
}, /* @__PURE__ */ React13.createElement(Surface2, {
|
|
979
|
+
role: "base-object-settings",
|
|
980
|
+
data
|
|
981
|
+
})), /* @__PURE__ */ React13.createElement(Surface2, {
|
|
982
|
+
role: "object-settings",
|
|
983
|
+
data
|
|
984
|
+
}), /* @__PURE__ */ React13.createElement(AdvancedObjectSettings, {
|
|
985
|
+
object
|
|
986
|
+
}))));
|
|
987
|
+
};
|
|
988
|
+
|
|
734
989
|
// packages/plugins/plugin-space/src/components/PersistenceStatus.tsx
|
|
735
990
|
import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
|
|
736
|
-
import
|
|
991
|
+
import React14, { useEffect as useEffect2, useState as useState5 } from "react";
|
|
737
992
|
import { debounce } from "@dxos/async";
|
|
738
|
-
import { Tooltip, useTranslation as
|
|
739
|
-
import { getSize as
|
|
993
|
+
import { Tooltip, useTranslation as useTranslation13 } from "@dxos/react-ui";
|
|
994
|
+
import { getSize as getSize3, mx as mx6, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
|
|
740
995
|
var Status;
|
|
741
996
|
(function(Status2) {
|
|
742
997
|
Status2[Status2["PERSISTED_LOCALLY"] = 0] = "PERSISTED_LOCALLY";
|
|
@@ -744,10 +999,10 @@ var Status;
|
|
|
744
999
|
Status2[Status2["ERROR"] = 2] = "ERROR";
|
|
745
1000
|
})(Status || (Status = {}));
|
|
746
1001
|
var PersistenceStatus = ({ db }) => {
|
|
747
|
-
const { t } =
|
|
748
|
-
const [displayMessage, setDisplayMessage] =
|
|
749
|
-
const [status, naturalSetStatus] =
|
|
750
|
-
const [prevStatus, setPrevStatus] =
|
|
1002
|
+
const { t } = useTranslation13(SPACE_PLUGIN);
|
|
1003
|
+
const [displayMessage, setDisplayMessage] = useState5(false);
|
|
1004
|
+
const [status, naturalSetStatus] = useState5(0);
|
|
1005
|
+
const [prevStatus, setPrevStatus] = useState5(0);
|
|
751
1006
|
const _setStatus = debounce(naturalSetStatus, 500);
|
|
752
1007
|
useEffect2(() => {
|
|
753
1008
|
setPrevStatus(status);
|
|
@@ -761,48 +1016,48 @@ var PersistenceStatus = ({ db }) => {
|
|
|
761
1016
|
]);
|
|
762
1017
|
switch (status) {
|
|
763
1018
|
case 2:
|
|
764
|
-
return /* @__PURE__ */
|
|
1019
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
765
1020
|
className: "flex items-center"
|
|
766
|
-
}, /* @__PURE__ */
|
|
767
|
-
className:
|
|
768
|
-
}), /* @__PURE__ */
|
|
769
|
-
className:
|
|
1021
|
+
}, /* @__PURE__ */ React14.createElement(Warning, {
|
|
1022
|
+
className: mx6(getSize3(4), "me-1")
|
|
1023
|
+
}), /* @__PURE__ */ React14.createElement("span", {
|
|
1024
|
+
className: mx6("text-sm", warningText)
|
|
770
1025
|
}, t("persistence error label")));
|
|
771
1026
|
case 1:
|
|
772
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
773
1028
|
className: "flex items-center"
|
|
774
|
-
}, /* @__PURE__ */
|
|
775
|
-
className:
|
|
776
|
-
}), /* @__PURE__ */
|
|
777
|
-
className:
|
|
1029
|
+
}, /* @__PURE__ */ React14.createElement(ArrowsCounterClockwise, {
|
|
1030
|
+
className: mx6(getSize3(4), "me-1")
|
|
1031
|
+
}), /* @__PURE__ */ React14.createElement("span", {
|
|
1032
|
+
className: mx6("text-sm", staticPlaceholderText)
|
|
778
1033
|
}, t("persistence pending label")));
|
|
779
1034
|
case 0:
|
|
780
1035
|
default:
|
|
781
|
-
return /* @__PURE__ */
|
|
1036
|
+
return /* @__PURE__ */ React14.createElement(Tooltip.Root, {
|
|
782
1037
|
delayDuration: 400
|
|
783
|
-
}, /* @__PURE__ */
|
|
1038
|
+
}, /* @__PURE__ */ React14.createElement(Tooltip.Trigger, {
|
|
784
1039
|
role: "status",
|
|
785
1040
|
className: "flex items-center"
|
|
786
|
-
}, /* @__PURE__ */
|
|
787
|
-
className:
|
|
788
|
-
}), displayMessage && /* @__PURE__ */
|
|
789
|
-
className:
|
|
790
|
-
}, t("persisted locally label"))), /* @__PURE__ */
|
|
1041
|
+
}, /* @__PURE__ */ React14.createElement(CheckCircle2, {
|
|
1042
|
+
className: mx6(getSize3(4), "me-1")
|
|
1043
|
+
}), displayMessage && /* @__PURE__ */ React14.createElement("span", {
|
|
1044
|
+
className: mx6("text-sm", staticPlaceholderText)
|
|
1045
|
+
}, t("persisted locally label"))), /* @__PURE__ */ React14.createElement(Tooltip.Portal, null, /* @__PURE__ */ React14.createElement(Tooltip.Content, null, t("persisted locally message"), /* @__PURE__ */ React14.createElement(Tooltip.Arrow, null))));
|
|
791
1046
|
}
|
|
792
1047
|
};
|
|
793
1048
|
|
|
794
1049
|
// packages/plugins/plugin-space/src/components/PopoverAddSpace.tsx
|
|
795
|
-
import
|
|
1050
|
+
import React15 from "react";
|
|
796
1051
|
import { createIntent as createIntent5, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
|
|
797
|
-
import { IconButton as IconButton3, useTranslation as
|
|
1052
|
+
import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
798
1053
|
var POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
799
1054
|
var PopoverAddSpace = () => {
|
|
800
|
-
const { t } =
|
|
1055
|
+
const { t } = useTranslation14(SPACE_PLUGIN);
|
|
801
1056
|
const { dispatchPromise: dispatch } = useIntentDispatcher5();
|
|
802
|
-
return /* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ React15.createElement("div", {
|
|
803
1058
|
role: "none",
|
|
804
1059
|
className: "grid grid-cols-1 gap-1 [&>button]:justify-start"
|
|
805
|
-
}, /* @__PURE__ */
|
|
1060
|
+
}, /* @__PURE__ */ React15.createElement(IconButton3, {
|
|
806
1061
|
variant: "ghost",
|
|
807
1062
|
label: t("create space label"),
|
|
808
1063
|
icon: "ph--plus--regular",
|
|
@@ -817,7 +1072,7 @@ var PopoverAddSpace = () => {
|
|
|
817
1072
|
}));
|
|
818
1073
|
},
|
|
819
1074
|
"data-testid": "spacePlugin.createSpace"
|
|
820
|
-
}), /* @__PURE__ */
|
|
1075
|
+
}), /* @__PURE__ */ React15.createElement(IconButton3, {
|
|
821
1076
|
variant: "ghost",
|
|
822
1077
|
label: t("join space label"),
|
|
823
1078
|
icon: "ph--sign-in--regular",
|
|
@@ -836,16 +1091,16 @@ var PopoverAddSpace = () => {
|
|
|
836
1091
|
};
|
|
837
1092
|
|
|
838
1093
|
// packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
|
|
839
|
-
import
|
|
1094
|
+
import React16, { useCallback as useCallback8, useRef as useRef4, useState as useState6 } from "react";
|
|
840
1095
|
import { log as log2 } from "@dxos/log";
|
|
841
|
-
import { Button as
|
|
1096
|
+
import { Button as Button5, Input as Input2, Popover, useTranslation as useTranslation15 } from "@dxos/react-ui";
|
|
842
1097
|
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
|
|
843
1098
|
var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
844
1099
|
var PopoverRenameObject = ({ object: obj }) => {
|
|
845
|
-
const { t } =
|
|
846
|
-
const doneButton =
|
|
1100
|
+
const { t } = useTranslation15(SPACE_PLUGIN);
|
|
1101
|
+
const doneButton = useRef4(null);
|
|
847
1102
|
const object = obj;
|
|
848
|
-
const [name, setName] =
|
|
1103
|
+
const [name, setName] = useState6(object.name || object.title || "");
|
|
849
1104
|
const handleDone = useCallback8(() => {
|
|
850
1105
|
try {
|
|
851
1106
|
object.name = name;
|
|
@@ -867,23 +1122,23 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
867
1122
|
object,
|
|
868
1123
|
name
|
|
869
1124
|
]);
|
|
870
|
-
return /* @__PURE__ */
|
|
1125
|
+
return /* @__PURE__ */ React16.createElement("div", {
|
|
871
1126
|
role: "none",
|
|
872
1127
|
className: "p-1 flex gap-2"
|
|
873
|
-
}, /* @__PURE__ */
|
|
1128
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
874
1129
|
role: "none",
|
|
875
1130
|
className: "flex-1"
|
|
876
|
-
}, /* @__PURE__ */
|
|
1131
|
+
}, /* @__PURE__ */ React16.createElement(Input2.Root, null, /* @__PURE__ */ React16.createElement(Input2.Label, {
|
|
877
1132
|
srOnly: true
|
|
878
|
-
}, t("object name label")), /* @__PURE__ */
|
|
879
|
-
placeholder: t("object
|
|
1133
|
+
}, t("object name label")), /* @__PURE__ */ React16.createElement(Input2.TextInput, {
|
|
1134
|
+
placeholder: t("object placeholder"),
|
|
880
1135
|
value: name,
|
|
881
1136
|
"data-testid": "spacePlugin.renameObject.input",
|
|
882
1137
|
onChange: ({ target: { value } }) => setName(value),
|
|
883
1138
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
884
|
-
}))), /* @__PURE__ */
|
|
1139
|
+
}))), /* @__PURE__ */ React16.createElement(Popover.Close, {
|
|
885
1140
|
asChild: true
|
|
886
|
-
}, /* @__PURE__ */
|
|
1141
|
+
}, /* @__PURE__ */ React16.createElement(Button5, {
|
|
887
1142
|
ref: doneButton,
|
|
888
1143
|
classNames: "self-stretch",
|
|
889
1144
|
onClick: handleDone
|
|
@@ -893,37 +1148,37 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
893
1148
|
};
|
|
894
1149
|
|
|
895
1150
|
// packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
|
|
896
|
-
import
|
|
897
|
-
import { Button as
|
|
1151
|
+
import React17, { useCallback as useCallback9, useRef as useRef5, useState as useState7 } from "react";
|
|
1152
|
+
import { Button as Button6, Input as Input3, Popover as Popover2, useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
898
1153
|
var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
899
1154
|
var PopoverRenameSpace = ({ space }) => {
|
|
900
|
-
const { t } =
|
|
901
|
-
const doneButton =
|
|
902
|
-
const [name, setName] =
|
|
1155
|
+
const { t } = useTranslation16(SPACE_PLUGIN);
|
|
1156
|
+
const doneButton = useRef5(null);
|
|
1157
|
+
const [name, setName] = useState7(space.properties.name ?? "");
|
|
903
1158
|
const handleDone = useCallback9(() => {
|
|
904
1159
|
space.properties.name = name;
|
|
905
1160
|
}, [
|
|
906
1161
|
space,
|
|
907
1162
|
name
|
|
908
1163
|
]);
|
|
909
|
-
return /* @__PURE__ */
|
|
1164
|
+
return /* @__PURE__ */ React17.createElement("div", {
|
|
910
1165
|
role: "none",
|
|
911
1166
|
className: "p-1 flex gap-2"
|
|
912
|
-
}, /* @__PURE__ */
|
|
1167
|
+
}, /* @__PURE__ */ React17.createElement("div", {
|
|
913
1168
|
role: "none",
|
|
914
1169
|
className: "flex-1"
|
|
915
|
-
}, /* @__PURE__ */
|
|
1170
|
+
}, /* @__PURE__ */ React17.createElement(Input3.Root, null, /* @__PURE__ */ React17.createElement(Input3.Label, {
|
|
916
1171
|
srOnly: true
|
|
917
|
-
}, t("space name label")), /* @__PURE__ */
|
|
1172
|
+
}, t("space name label")), /* @__PURE__ */ React17.createElement(Input3.TextInput, {
|
|
918
1173
|
defaultValue: space.properties.name ?? "",
|
|
919
1174
|
placeholder: t("unnamed space label"),
|
|
920
1175
|
onChange: ({ target: { value } }) => setName(value),
|
|
921
1176
|
// TODO(wittjosiah): Ideally this should access the popover context to close the popover.
|
|
922
1177
|
// Currently this is not possible because Radix does not expose the popover context.
|
|
923
1178
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
924
|
-
}))), /* @__PURE__ */
|
|
1179
|
+
}))), /* @__PURE__ */ React17.createElement(Popover2.Close, {
|
|
925
1180
|
asChild: true
|
|
926
|
-
}, /* @__PURE__ */
|
|
1181
|
+
}, /* @__PURE__ */ React17.createElement(Button6, {
|
|
927
1182
|
ref: doneButton,
|
|
928
1183
|
classNames: "self-stretch",
|
|
929
1184
|
onClick: handleDone
|
|
@@ -933,20 +1188,20 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
933
1188
|
};
|
|
934
1189
|
|
|
935
1190
|
// packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
|
|
936
|
-
import
|
|
1191
|
+
import React18 from "react";
|
|
937
1192
|
import { createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
938
|
-
import { IconButton as IconButton4, useTranslation as
|
|
1193
|
+
import { IconButton as IconButton4, useTranslation as useTranslation17 } from "@dxos/react-ui";
|
|
939
1194
|
var ShareSpaceButton = ({ space }) => {
|
|
940
1195
|
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
941
|
-
return /* @__PURE__ */
|
|
1196
|
+
return /* @__PURE__ */ React18.createElement(ShareSpaceButtonImpl, {
|
|
942
1197
|
onClick: () => dispatch(createIntent6(SpaceAction.Share, {
|
|
943
1198
|
space
|
|
944
1199
|
}))
|
|
945
1200
|
});
|
|
946
1201
|
};
|
|
947
1202
|
var ShareSpaceButtonImpl = ({ onClick }) => {
|
|
948
|
-
const { t } =
|
|
949
|
-
return /* @__PURE__ */
|
|
1203
|
+
const { t } = useTranslation17(SPACE_PLUGIN);
|
|
1204
|
+
return /* @__PURE__ */ React18.createElement(IconButton4, {
|
|
950
1205
|
"data-testid": "spacePlugin.shareSpaceButton",
|
|
951
1206
|
icon: "ph--users--regular",
|
|
952
1207
|
label: t("share space label"),
|
|
@@ -955,20 +1210,20 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
|
|
|
955
1210
|
};
|
|
956
1211
|
|
|
957
1212
|
// packages/plugins/plugin-space/src/components/SpacePresence.tsx
|
|
958
|
-
import
|
|
1213
|
+
import React19, { useCallback as useCallback10, useEffect as useEffect4, useState as useState9 } from "react";
|
|
959
1214
|
import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
|
|
960
1215
|
import { generateName } from "@dxos/display-name";
|
|
961
1216
|
import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
|
|
962
|
-
import { getSpace as getSpace3, useMembers, fullyQualifiedId as
|
|
1217
|
+
import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
|
|
963
1218
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
964
|
-
import { Avatar,
|
|
1219
|
+
import { Avatar, Tooltip as Tooltip2, useTranslation as useTranslation18, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
|
|
965
1220
|
import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
|
|
966
1221
|
import { ComplexMap, keyToFallback } from "@dxos/util";
|
|
967
1222
|
|
|
968
1223
|
// packages/plugins/plugin-space/src/hooks/usePath.ts
|
|
969
|
-
import { useEffect as useEffect3, useState as
|
|
1224
|
+
import { useEffect as useEffect3, useState as useState8 } from "react";
|
|
970
1225
|
var usePath = (graph, id, timeout) => {
|
|
971
|
-
const [pathState, setPathState] =
|
|
1226
|
+
const [pathState, setPathState] = useState8(id ? graph.getPath({
|
|
972
1227
|
target: id
|
|
973
1228
|
}) : void 0);
|
|
974
1229
|
useEffect3(() => {
|
|
@@ -1012,7 +1267,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1012
1267
|
const identity = useIdentity();
|
|
1013
1268
|
const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
|
|
1014
1269
|
const spaceMembers = useMembers(space?.key);
|
|
1015
|
-
const [_moment, setMoment] =
|
|
1270
|
+
const [_moment, setMoment] = useState9(Date.now());
|
|
1016
1271
|
useEffect4(() => {
|
|
1017
1272
|
const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
|
|
1018
1273
|
return () => clearInterval(interval);
|
|
@@ -1024,7 +1279,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1024
1279
|
if (!identity || !spaceState || !space) {
|
|
1025
1280
|
return null;
|
|
1026
1281
|
}
|
|
1027
|
-
const currentObjectViewers = spaceState.viewersByObject[
|
|
1282
|
+
const currentObjectViewers = spaceState.viewersByObject[fullyQualifiedId3(object)] ?? noViewers;
|
|
1028
1283
|
const membersForObject = spaceMembers.filter((member) => memberOnline(member) && memberIsNotSelf(member)).filter((member) => currentObjectViewers.has(member.identity.identityKey)).map((member) => {
|
|
1029
1284
|
const objectView = currentObjectViewers.get(member.identity.identityKey);
|
|
1030
1285
|
const lastSeen = objectView?.lastSeen ?? -Infinity;
|
|
@@ -1035,7 +1290,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1035
1290
|
lastSeen
|
|
1036
1291
|
};
|
|
1037
1292
|
}).toSorted((a, b) => a.lastSeen - b.lastSeen);
|
|
1038
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ React19.createElement(FullPresence, {
|
|
1039
1294
|
members: membersForObject
|
|
1040
1295
|
});
|
|
1041
1296
|
};
|
|
@@ -1045,63 +1300,60 @@ var FullPresence = (props) => {
|
|
|
1045
1300
|
if (members.length === 0) {
|
|
1046
1301
|
return null;
|
|
1047
1302
|
}
|
|
1048
|
-
return /* @__PURE__ */
|
|
1049
|
-
|
|
1050
|
-
classNames: "mbs-2 mie-4",
|
|
1303
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1304
|
+
className: "dx-avatar-group",
|
|
1051
1305
|
"data-testid": "spacePlugin.presence"
|
|
1052
|
-
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */
|
|
1306
|
+
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React19.createElement(Tooltip2.Root, {
|
|
1053
1307
|
key: member.identity.identityKey.toHex()
|
|
1054
|
-
}, /* @__PURE__ */
|
|
1308
|
+
}, /* @__PURE__ */ React19.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React19.createElement(PrensenceAvatar, {
|
|
1055
1309
|
identity: member.identity,
|
|
1056
|
-
group: true,
|
|
1057
1310
|
match: member.currentlyAttended,
|
|
1058
1311
|
index: members.length - i,
|
|
1059
|
-
onClick: () => onMemberClick?.(member)
|
|
1060
|
-
|
|
1312
|
+
onClick: () => onMemberClick?.(member),
|
|
1313
|
+
size
|
|
1314
|
+
})), /* @__PURE__ */ React19.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React19.createElement(Tooltip2.Content, {
|
|
1061
1315
|
side: "bottom"
|
|
1062
|
-
}, /* @__PURE__ */
|
|
1063
|
-
status: "inactive"
|
|
1064
|
-
}, /* @__PURE__ */ React17.createElement(Avatar.Frame, {
|
|
1316
|
+
}, /* @__PURE__ */ React19.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React19.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React19.createElement(Tooltip2.Root, null, /* @__PURE__ */ React19.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React19.createElement(Avatar.Root, null, /* @__PURE__ */ React19.createElement(Avatar.Content, {
|
|
1317
|
+
status: "inactive",
|
|
1065
1318
|
style: {
|
|
1066
1319
|
zIndex: members.length - 4
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
})))), /* @__PURE__ */ React17.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip2.Content, {
|
|
1320
|
+
},
|
|
1321
|
+
fallback: `+${members.length - 3}`
|
|
1322
|
+
}))), /* @__PURE__ */ React19.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React19.createElement(Tooltip2.Content, {
|
|
1071
1323
|
side: "bottom"
|
|
1072
|
-
}, /* @__PURE__ */
|
|
1324
|
+
}, /* @__PURE__ */ React19.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React19.createElement(List2, {
|
|
1073
1325
|
classNames: "max-h-56 overflow-y-auto"
|
|
1074
|
-
}, members.map((member) => /* @__PURE__ */
|
|
1326
|
+
}, members.map((member) => /* @__PURE__ */ React19.createElement(ListItem2.Root, {
|
|
1075
1327
|
key: member.identity.identityKey.toHex(),
|
|
1076
1328
|
classNames: "flex gap-2 items-center cursor-pointer mbe-2",
|
|
1077
1329
|
onClick: () => onMemberClick?.(member),
|
|
1078
1330
|
"data-testid": "identity-list-item"
|
|
1079
|
-
}, /* @__PURE__ */
|
|
1331
|
+
}, /* @__PURE__ */ React19.createElement(PrensenceAvatar, {
|
|
1080
1332
|
identity: member.identity,
|
|
1333
|
+
size,
|
|
1081
1334
|
showName: true,
|
|
1082
1335
|
match: member.currentlyAttended
|
|
1083
1336
|
}))))))));
|
|
1084
1337
|
};
|
|
1085
|
-
var PrensenceAvatar = ({ identity, showName, match,
|
|
1086
|
-
const Root = group ? AvatarGroupItem.Root : Avatar.Root;
|
|
1338
|
+
var PrensenceAvatar = ({ identity, showName, match, index, onClick, size }) => {
|
|
1087
1339
|
const status = match ? "current" : "active";
|
|
1088
1340
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
1089
|
-
return /* @__PURE__ */
|
|
1341
|
+
return /* @__PURE__ */ React19.createElement(Avatar.Root, null, /* @__PURE__ */ React19.createElement(Avatar.Content, {
|
|
1090
1342
|
status,
|
|
1091
|
-
hue: identity.profile?.data?.hue || fallbackValue.hue
|
|
1092
|
-
}, /* @__PURE__ */ React17.createElement(Avatar.Frame, {
|
|
1343
|
+
hue: identity.profile?.data?.hue || fallbackValue.hue,
|
|
1093
1344
|
"data-testid": "spacePlugin.presence.member",
|
|
1094
1345
|
"data-status": status,
|
|
1346
|
+
size,
|
|
1347
|
+
classNames: "mbs-2 mie-4",
|
|
1095
1348
|
...index ? {
|
|
1096
1349
|
style: {
|
|
1097
1350
|
zIndex: index
|
|
1098
1351
|
}
|
|
1099
1352
|
} : {},
|
|
1100
|
-
onClick: () => onClick?.()
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
classNames: "text-sm truncate pli-2"
|
|
1353
|
+
onClick: () => onClick?.(),
|
|
1354
|
+
fallback: identity.profile?.data?.emoji || fallbackValue.emoji
|
|
1355
|
+
}), /* @__PURE__ */ React19.createElement(Avatar.Label, {
|
|
1356
|
+
classNames: showName ? "text-sm truncate pli-2" : "sr-only"
|
|
1105
1357
|
}, getName(identity)));
|
|
1106
1358
|
};
|
|
1107
1359
|
var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
@@ -1116,7 +1368,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1116
1368
|
const moment = Date.now();
|
|
1117
1369
|
return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
|
|
1118
1370
|
};
|
|
1119
|
-
const [activeViewers, setActiveViewers] =
|
|
1371
|
+
const [activeViewers, setActiveViewers] = useState9(viewers ? getActiveViewers(viewers) : []);
|
|
1120
1372
|
useEffect4(() => {
|
|
1121
1373
|
if (viewers) {
|
|
1122
1374
|
setActiveViewers(getActiveViewers(viewers));
|
|
@@ -1128,62 +1380,59 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1128
1380
|
}, [
|
|
1129
1381
|
viewers
|
|
1130
1382
|
]);
|
|
1131
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ React19.createElement(SmallPresence, {
|
|
1132
1384
|
count: activeViewers.length,
|
|
1133
1385
|
attended: isAttended,
|
|
1134
1386
|
containsAttended
|
|
1135
1387
|
});
|
|
1136
1388
|
};
|
|
1137
1389
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1138
|
-
const { t } =
|
|
1139
|
-
return /* @__PURE__ */
|
|
1390
|
+
const { t } = useTranslation18(SPACE_PLUGIN);
|
|
1391
|
+
return /* @__PURE__ */ React19.createElement(Tooltip2.Root, null, /* @__PURE__ */ React19.createElement(Tooltip2.Trigger, {
|
|
1140
1392
|
asChild: true
|
|
1141
|
-
}, /* @__PURE__ */
|
|
1393
|
+
}, /* @__PURE__ */ React19.createElement(AttentionGlyph, {
|
|
1142
1394
|
attended,
|
|
1143
1395
|
containsAttended,
|
|
1144
1396
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
1145
1397
|
classNames: "self-center mie-1"
|
|
1146
|
-
})), /* @__PURE__ */
|
|
1398
|
+
})), /* @__PURE__ */ React19.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React19.createElement(Tooltip2.Content, {
|
|
1147
1399
|
side: "bottom"
|
|
1148
|
-
}, /* @__PURE__ */
|
|
1400
|
+
}, /* @__PURE__ */ React19.createElement("span", null, t("presence label", {
|
|
1149
1401
|
count
|
|
1150
|
-
})), /* @__PURE__ */
|
|
1402
|
+
})), /* @__PURE__ */ React19.createElement(Tooltip2.Arrow, null))));
|
|
1151
1403
|
};
|
|
1152
1404
|
|
|
1153
1405
|
// packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
|
|
1154
|
-
import
|
|
1155
|
-
import { Input as Input4, useTranslation as
|
|
1406
|
+
import React20 from "react";
|
|
1407
|
+
import { Input as Input4, useTranslation as useTranslation19 } from "@dxos/react-ui";
|
|
1156
1408
|
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
1157
1409
|
var SpacePluginSettings = ({ settings }) => {
|
|
1158
|
-
const { t } =
|
|
1159
|
-
return /* @__PURE__ */
|
|
1410
|
+
const { t } = useTranslation19(SPACE_PLUGIN);
|
|
1411
|
+
return /* @__PURE__ */ React20.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React20.createElement(DeprecatedFormInput, {
|
|
1160
1412
|
label: t("show hidden spaces label")
|
|
1161
|
-
}, /* @__PURE__ */
|
|
1413
|
+
}, /* @__PURE__ */ React20.createElement(Input4.Switch, {
|
|
1162
1414
|
checked: settings.showHidden,
|
|
1163
1415
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1164
1416
|
})));
|
|
1165
1417
|
};
|
|
1166
1418
|
|
|
1167
|
-
// packages/plugins/plugin-space/src/components/SpaceSettings/
|
|
1168
|
-
import
|
|
1419
|
+
// packages/plugins/plugin-space/src/components/SpaceSettings/SpacePropertiesForm.tsx
|
|
1420
|
+
import React21, { useCallback as useCallback11, useMemo as useMemo3, useState as useState10 } from "react";
|
|
1169
1421
|
import { log as log3 } from "@dxos/log";
|
|
1170
1422
|
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1171
|
-
import {
|
|
1172
|
-
import {
|
|
1173
|
-
import { DeprecatedFormContainer as DeprecatedFormContainer2, DeprecatedFormInput as DeprecatedFormInput2 } from "@dxos/react-ui-form";
|
|
1423
|
+
import { Input as Input5, useTranslation as useTranslation20 } from "@dxos/react-ui";
|
|
1424
|
+
import { Form as Form4, ControlItem, ControlItemInput } from "@dxos/react-ui-form";
|
|
1174
1425
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
1175
|
-
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/
|
|
1176
|
-
var
|
|
1177
|
-
const { t } =
|
|
1178
|
-
const
|
|
1179
|
-
const edgeEnabled = Boolean(client.config.values.runtime?.client?.edgeFeatures?.echoReplicator);
|
|
1180
|
-
const [edgeReplication, setEdgeReplication] = useState9(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
|
|
1426
|
+
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpacePropertiesForm.tsx";
|
|
1427
|
+
var SpacePropertiesForm = ({ space }) => {
|
|
1428
|
+
const { t } = useTranslation20(SPACE_PLUGIN);
|
|
1429
|
+
const [edgeReplication, setEdgeReplication] = useState10(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
|
|
1181
1430
|
const toggleEdgeReplication = useCallback11(async (next) => {
|
|
1182
1431
|
setEdgeReplication(next);
|
|
1183
1432
|
await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
|
|
1184
1433
|
log3.catch(err, void 0, {
|
|
1185
1434
|
F: __dxlog_file5,
|
|
1186
|
-
L:
|
|
1435
|
+
L: 34,
|
|
1187
1436
|
S: void 0,
|
|
1188
1437
|
C: (f, a) => f(...a)
|
|
1189
1438
|
});
|
|
@@ -1192,155 +1441,172 @@ var SpaceSettingsPanel = ({ space }) => {
|
|
|
1192
1441
|
}, [
|
|
1193
1442
|
space
|
|
1194
1443
|
]);
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
value: space.properties.name ?? "",
|
|
1200
|
-
onChange: (event) => {
|
|
1201
|
-
space.properties.name = event.target.value;
|
|
1444
|
+
const handleSave = useCallback11((properties) => {
|
|
1445
|
+
void toggleEdgeReplication(properties.edgeReplication);
|
|
1446
|
+
if (properties.name !== space.properties.name) {
|
|
1447
|
+
space.properties.name = properties.name;
|
|
1202
1448
|
}
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
}, /* @__PURE__ */ React19.createElement(Toolbar.Root, null, /* @__PURE__ */ React19.createElement(IconPicker, {
|
|
1206
|
-
value: space.properties.icon,
|
|
1207
|
-
onChange: (nextIcon) => space.properties.icon = nextIcon,
|
|
1208
|
-
onReset: () => {
|
|
1209
|
-
space.properties.icon = void 0;
|
|
1449
|
+
if (properties.icon !== space.properties.icon) {
|
|
1450
|
+
space.properties.icon = properties.icon;
|
|
1210
1451
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
}, /* @__PURE__ */ React19.createElement(Toolbar.Root, null, /* @__PURE__ */ React19.createElement(HuePicker, {
|
|
1214
|
-
value: space.properties.hue,
|
|
1215
|
-
onChange: (nextHue) => space.properties.hue = nextHue,
|
|
1216
|
-
onReset: () => {
|
|
1217
|
-
space.properties.hue = void 0;
|
|
1452
|
+
if (properties.hue !== space.properties.hue) {
|
|
1453
|
+
space.properties.hue = properties.hue;
|
|
1218
1454
|
}
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1455
|
+
}, [
|
|
1456
|
+
space,
|
|
1457
|
+
toggleEdgeReplication
|
|
1458
|
+
]);
|
|
1459
|
+
const values = useMemo3(() => ({
|
|
1460
|
+
name: space.properties.name,
|
|
1461
|
+
icon: space.properties.icon,
|
|
1462
|
+
hue: space.properties.hue,
|
|
1463
|
+
edgeReplication
|
|
1464
|
+
}), [
|
|
1465
|
+
space.properties.name,
|
|
1466
|
+
space.properties.icon,
|
|
1467
|
+
space.properties.hue,
|
|
1468
|
+
edgeReplication
|
|
1469
|
+
]);
|
|
1470
|
+
const customElements = useMemo3(() => ({
|
|
1471
|
+
name: ({ type, label, getValue, onValueChange }) => {
|
|
1472
|
+
const handleChange = useCallback11(({ target: { value } }) => onValueChange(type, value), [
|
|
1473
|
+
onValueChange,
|
|
1474
|
+
type
|
|
1475
|
+
]);
|
|
1476
|
+
return /* @__PURE__ */ React21.createElement(ControlItemInput, {
|
|
1477
|
+
title: label,
|
|
1478
|
+
description: t("display name description")
|
|
1479
|
+
}, /* @__PURE__ */ React21.createElement(Input5.TextInput, {
|
|
1480
|
+
value: getValue(),
|
|
1481
|
+
onChange: handleChange,
|
|
1482
|
+
placeholder: t("display name input placeholder"),
|
|
1483
|
+
classNames: "min-is-64"
|
|
1484
|
+
}));
|
|
1485
|
+
},
|
|
1486
|
+
icon: ({ type, label, getValue, onValueChange }) => {
|
|
1487
|
+
const handleChange = useCallback11((nextEmoji) => onValueChange(type, nextEmoji), [
|
|
1488
|
+
onValueChange,
|
|
1489
|
+
type
|
|
1490
|
+
]);
|
|
1491
|
+
const handleEmojiReset = useCallback11(() => onValueChange(type, void 0), [
|
|
1492
|
+
onValueChange,
|
|
1493
|
+
type
|
|
1494
|
+
]);
|
|
1495
|
+
return /* @__PURE__ */ React21.createElement(ControlItem, {
|
|
1496
|
+
title: label,
|
|
1497
|
+
description: t("icon description")
|
|
1498
|
+
}, /* @__PURE__ */ React21.createElement(IconPicker, {
|
|
1499
|
+
value: getValue(),
|
|
1500
|
+
onChange: handleChange,
|
|
1501
|
+
onReset: handleEmojiReset,
|
|
1502
|
+
classNames: "justify-self-end",
|
|
1503
|
+
iconSize: 5
|
|
1504
|
+
}));
|
|
1505
|
+
},
|
|
1506
|
+
hue: ({ type, label, getValue, onValueChange }) => {
|
|
1507
|
+
const handleChange = useCallback11((nextHue) => onValueChange(type, nextHue), [
|
|
1508
|
+
onValueChange,
|
|
1509
|
+
type
|
|
1510
|
+
]);
|
|
1511
|
+
const handleHueReset = useCallback11(() => onValueChange(type, void 0), [
|
|
1512
|
+
onValueChange,
|
|
1513
|
+
type
|
|
1514
|
+
]);
|
|
1515
|
+
return /* @__PURE__ */ React21.createElement(ControlItem, {
|
|
1516
|
+
title: label,
|
|
1517
|
+
description: t("hue description")
|
|
1518
|
+
}, /* @__PURE__ */ React21.createElement(HuePicker, {
|
|
1519
|
+
value: getValue(),
|
|
1520
|
+
onChange: handleChange,
|
|
1521
|
+
onReset: handleHueReset,
|
|
1522
|
+
classNames: "[--hue-preview-size:1.25rem] justify-self-end"
|
|
1523
|
+
}));
|
|
1524
|
+
},
|
|
1525
|
+
edgeReplication: ({ type, label, getValue, onValueChange }) => {
|
|
1526
|
+
const handleChange = useCallback11((checked) => onValueChange(type, checked), [
|
|
1527
|
+
onValueChange,
|
|
1528
|
+
type
|
|
1529
|
+
]);
|
|
1530
|
+
return /* @__PURE__ */ React21.createElement(ControlItemInput, {
|
|
1531
|
+
title: label,
|
|
1532
|
+
description: t("edge replication description")
|
|
1533
|
+
}, /* @__PURE__ */ React21.createElement(Input5.Switch, {
|
|
1534
|
+
checked: getValue(),
|
|
1535
|
+
onCheckedChange: handleChange,
|
|
1536
|
+
classNames: "justify-self-end"
|
|
1537
|
+
}));
|
|
1538
|
+
}
|
|
1539
|
+
}), [
|
|
1540
|
+
t
|
|
1541
|
+
]);
|
|
1542
|
+
return /* @__PURE__ */ React21.createElement(Form4, {
|
|
1543
|
+
schema: SpaceForm,
|
|
1544
|
+
values,
|
|
1545
|
+
autoSave: true,
|
|
1546
|
+
onSave: handleSave,
|
|
1547
|
+
Custom: customElements,
|
|
1548
|
+
classNames: 'p-0 container-max-width [&_[role="form"]]:grid [&_[role="form"]]:grid-cols-1 md:[&_[role="form"]]:grid-cols-[1fr_min-content] [&_[role="form"]]:gap-4'
|
|
1549
|
+
});
|
|
1225
1550
|
};
|
|
1226
1551
|
|
|
1227
|
-
// packages/plugins/plugin-space/src/components/SpaceSettings/
|
|
1228
|
-
import
|
|
1229
|
-
import { Surface as
|
|
1230
|
-
import {
|
|
1231
|
-
import {
|
|
1232
|
-
import {
|
|
1233
|
-
import {
|
|
1552
|
+
// packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx
|
|
1553
|
+
import React22, { useCallback as useCallback12, useMemo as useMemo4 } from "react";
|
|
1554
|
+
import { Surface as Surface3, useCapabilities as useCapabilities2, useCapability as useCapability2 } from "@dxos/app-framework";
|
|
1555
|
+
import { toLocalizedString as toLocalizedString3, useTranslation as useTranslation21 } from "@dxos/react-ui";
|
|
1556
|
+
import { ControlSectionHeading } from "@dxos/react-ui-form";
|
|
1557
|
+
import { Accordion } from "@dxos/react-ui-list";
|
|
1558
|
+
import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
|
|
1559
|
+
import { byPosition } from "@dxos/util";
|
|
1234
1560
|
var SPACE_SETTINGS_DIALOG = `${SPACE_PLUGIN}/SpaceSettingsDialog`;
|
|
1235
|
-
var
|
|
1236
|
-
const { t } =
|
|
1237
|
-
const
|
|
1238
|
-
const
|
|
1239
|
-
const
|
|
1240
|
-
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
1241
|
-
const name = getSpaceDisplayName(space, {
|
|
1242
|
-
personal: client.spaces.default === space,
|
|
1243
|
-
namesCache
|
|
1244
|
-
});
|
|
1245
|
-
const panels = useCapabilities2(SpaceCapabilities.SettingsPanel);
|
|
1246
|
-
const data = useMemo(() => ({
|
|
1561
|
+
var SpaceSettingsContainer = ({ space }) => {
|
|
1562
|
+
const { t } = useTranslation21(SPACE_PLUGIN);
|
|
1563
|
+
const state = useCapability2(SpaceCapabilities.MutableState);
|
|
1564
|
+
const items = useCapabilities2(SpaceCapabilities.SettingsSection).toSorted(byPosition);
|
|
1565
|
+
const data = useMemo4(() => ({
|
|
1247
1566
|
subject: space
|
|
1248
1567
|
}), [
|
|
1249
1568
|
space
|
|
1250
1569
|
]);
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
density: "fine",
|
|
1276
|
-
variant: "ghost",
|
|
1277
|
-
autoFocus: true
|
|
1278
|
-
}, /* @__PURE__ */ React20.createElement(Icon4, {
|
|
1279
|
-
icon: "ph--x--regular",
|
|
1280
|
-
size: 4
|
|
1281
|
-
})))), /* @__PURE__ */ React20.createElement(Tabs.Root, {
|
|
1282
|
-
orientation: "vertical",
|
|
1283
|
-
value: selected,
|
|
1284
|
-
onValueChange: setSelected,
|
|
1285
|
-
activePart: tabsActivePart,
|
|
1286
|
-
onActivePartChange: setTabsActivePart,
|
|
1287
|
-
classNames: "flex flex-col flex-1 mbs-2"
|
|
1288
|
-
}, /* @__PURE__ */ React20.createElement(Tabs.Viewport, {
|
|
1289
|
-
classNames: "flex-1 min-bs-0"
|
|
1290
|
-
}, /* @__PURE__ */ React20.createElement("div", {
|
|
1291
|
-
role: "none",
|
|
1292
|
-
className: "overflow-y-auto pli-3 @md:pis-2 @md:pie-0 mbe-4 border-r border-separator"
|
|
1293
|
-
}, /* @__PURE__ */ React20.createElement(Tabs.Tablist, {
|
|
1294
|
-
classNames: "flex flex-col max-bs-none min-is-[200px] gap-4 overflow-y-auto"
|
|
1295
|
-
}, /* @__PURE__ */ React20.createElement("div", {
|
|
1296
|
-
role: "none",
|
|
1297
|
-
className: "flex flex-col ml-1"
|
|
1298
|
-
}, /* @__PURE__ */ React20.createElement(Tabs.Tab, {
|
|
1299
|
-
value: "settings"
|
|
1300
|
-
}, t("settings tab label")), /* @__PURE__ */ React20.createElement(Tabs.Tab, {
|
|
1301
|
-
value: "members",
|
|
1302
|
-
disabled: locked
|
|
1303
|
-
}, t("members tab label")), panels.map((panel) => /* @__PURE__ */ React20.createElement(Tabs.Tab, {
|
|
1304
|
-
key: panel.id,
|
|
1305
|
-
value: panel.id
|
|
1306
|
-
}, toLocalizedString3(panel.label, t)))))), /* @__PURE__ */ React20.createElement(Tabs.Tabpanel, {
|
|
1307
|
-
value: "settings",
|
|
1308
|
-
classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
|
|
1309
|
-
}, /* @__PURE__ */ React20.createElement(SpaceSettingsPanel, {
|
|
1310
|
-
space
|
|
1311
|
-
})), /* @__PURE__ */ React20.createElement(Tabs.Tabpanel, {
|
|
1312
|
-
value: "members",
|
|
1313
|
-
classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
|
|
1314
|
-
}, /* @__PURE__ */ React20.createElement(Clipboard.Provider, null, /* @__PURE__ */ React20.createElement(SpacePanel, {
|
|
1315
|
-
space,
|
|
1316
|
-
hideHeading: true,
|
|
1317
|
-
target,
|
|
1318
|
-
createInvitationUrl
|
|
1319
|
-
}))), panels.map((panel) => /* @__PURE__ */ React20.createElement(Tabs.Tabpanel, {
|
|
1320
|
-
key: panel.id,
|
|
1321
|
-
value: panel.id,
|
|
1322
|
-
classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
|
|
1323
|
-
}, /* @__PURE__ */ React20.createElement(Surface2, {
|
|
1324
|
-
role: `space-settings--${panel.id}`,
|
|
1325
|
-
data
|
|
1326
|
-
}))))))
|
|
1327
|
-
);
|
|
1570
|
+
const handleOpenSectionChange = useCallback12((sections) => {
|
|
1571
|
+
state.spaceSettingsOpenSections.splice(0, state.spaceSettingsOpenSections.length, ...sections);
|
|
1572
|
+
}, [
|
|
1573
|
+
state
|
|
1574
|
+
]);
|
|
1575
|
+
return /* @__PURE__ */ React22.createElement(StackItem3.Content, {
|
|
1576
|
+
classNames: "p-2 block overflow-y-auto"
|
|
1577
|
+
}, /* @__PURE__ */ React22.createElement(Accordion.Root, {
|
|
1578
|
+
items,
|
|
1579
|
+
value: state.spaceSettingsOpenSections,
|
|
1580
|
+
onValueChange: handleOpenSectionChange
|
|
1581
|
+
}, ({ items: items2 }) => /* @__PURE__ */ React22.createElement(React22.Fragment, null, items2.map((item) => /* @__PURE__ */ React22.createElement(Accordion.Item, {
|
|
1582
|
+
key: item.id,
|
|
1583
|
+
item,
|
|
1584
|
+
classNames: "container-max-width"
|
|
1585
|
+
}, /* @__PURE__ */ React22.createElement(Accordion.ItemHeader, {
|
|
1586
|
+
classNames: "pie-6",
|
|
1587
|
+
asChild: true
|
|
1588
|
+
}, /* @__PURE__ */ React22.createElement(ControlSectionHeading, {
|
|
1589
|
+
title: toLocalizedString3(item.label, t)
|
|
1590
|
+
})), /* @__PURE__ */ React22.createElement(Accordion.ItemBody, null, /* @__PURE__ */ React22.createElement(Surface3, {
|
|
1591
|
+
role: `space-settings--${item.id}`,
|
|
1592
|
+
data
|
|
1593
|
+
})))))));
|
|
1328
1594
|
};
|
|
1329
1595
|
|
|
1330
1596
|
// packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1331
|
-
import
|
|
1597
|
+
import React23, { useEffect as useEffect6, useState as useState12 } from "react";
|
|
1332
1598
|
import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
|
|
1333
1599
|
import { QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
1334
1600
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1335
|
-
import { useClient as
|
|
1336
|
-
import { Tooltip as Tooltip3, useTranslation as
|
|
1601
|
+
import { useClient as useClient7 } from "@dxos/react-client";
|
|
1602
|
+
import { Tooltip as Tooltip3, useTranslation as useTranslation22 } from "@dxos/react-ui";
|
|
1337
1603
|
import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
1338
1604
|
|
|
1339
1605
|
// packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts
|
|
1340
1606
|
import { useEffect as useEffect5, useState as useState11 } from "react";
|
|
1341
1607
|
import { Context } from "@dxos/context";
|
|
1342
1608
|
import { EdgeService } from "@dxos/protocols";
|
|
1343
|
-
import { useClient as
|
|
1609
|
+
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1344
1610
|
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts";
|
|
1345
1611
|
var createEmptyEdgeSyncState = () => ({
|
|
1346
1612
|
missingOnLocal: 0,
|
|
@@ -1361,7 +1627,7 @@ var getSyncSummary = (syncMap) => {
|
|
|
1361
1627
|
};
|
|
1362
1628
|
var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);
|
|
1363
1629
|
var useSyncState = () => {
|
|
1364
|
-
const client =
|
|
1630
|
+
const client = useClient6();
|
|
1365
1631
|
const [spaceState, setSpaceState] = useState11({});
|
|
1366
1632
|
useEffect5(() => {
|
|
1367
1633
|
const ctx = new Context(void 0, {
|
|
@@ -1421,7 +1687,7 @@ var useSpaceSyncState = (space) => {
|
|
|
1421
1687
|
// packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1422
1688
|
var useEdgeStatus = () => {
|
|
1423
1689
|
const [status, setStatus] = useState12(QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED);
|
|
1424
|
-
const client =
|
|
1690
|
+
const client = useClient7();
|
|
1425
1691
|
useEffect6(() => {
|
|
1426
1692
|
client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
|
|
1427
1693
|
setStatus(status2);
|
|
@@ -1432,7 +1698,7 @@ var useEdgeStatus = () => {
|
|
|
1432
1698
|
return status;
|
|
1433
1699
|
};
|
|
1434
1700
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1435
|
-
const { t } =
|
|
1701
|
+
const { t } = useTranslation22(SPACE_PLUGIN);
|
|
1436
1702
|
const id = space.id;
|
|
1437
1703
|
const { hasAttention, isAncestor, isRelated } = useAttention2(id);
|
|
1438
1704
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1445,33 +1711,33 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1445
1711
|
const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
|
|
1446
1712
|
const syncState = useSpaceSyncState(space);
|
|
1447
1713
|
const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
|
|
1448
|
-
return /* @__PURE__ */
|
|
1714
|
+
return /* @__PURE__ */ React23.createElement(Tooltip3.Root, null, /* @__PURE__ */ React23.createElement(Tooltip3.Trigger, {
|
|
1449
1715
|
asChild: true
|
|
1450
|
-
}, /* @__PURE__ */
|
|
1716
|
+
}, /* @__PURE__ */ React23.createElement(AttentionGlyph2, {
|
|
1451
1717
|
syncing,
|
|
1452
1718
|
attended: isAttended,
|
|
1453
1719
|
containsAttended,
|
|
1454
1720
|
classNames: "self-center mie-1"
|
|
1455
|
-
})), /* @__PURE__ */
|
|
1721
|
+
})), /* @__PURE__ */ React23.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React23.createElement(Tooltip3.Content, {
|
|
1456
1722
|
side: "bottom",
|
|
1457
1723
|
classNames: "z-[70]"
|
|
1458
|
-
}, /* @__PURE__ */
|
|
1724
|
+
}, /* @__PURE__ */ React23.createElement("span", null, t("syncing label")), /* @__PURE__ */ React23.createElement(Tooltip3.Arrow, null))));
|
|
1459
1725
|
};
|
|
1460
1726
|
|
|
1461
1727
|
// packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
|
|
1462
|
-
import
|
|
1728
|
+
import React25, { useCallback as useCallback13, useEffect as useEffect8, useState as useState14 } from "react";
|
|
1463
1729
|
import { StatusBar } from "@dxos/plugin-status-bar";
|
|
1464
|
-
import { useClient as
|
|
1465
|
-
import { Icon as Icon6, Input as Input6, Popover as Popover3, useTranslation as
|
|
1730
|
+
import { useClient as useClient9 } from "@dxos/react-client";
|
|
1731
|
+
import { Icon as Icon6, Input as Input6, Popover as Popover3, useTranslation as useTranslation24 } from "@dxos/react-ui";
|
|
1466
1732
|
import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
|
|
1467
|
-
import { mx as
|
|
1733
|
+
import { mx as mx8 } from "@dxos/react-ui-theme";
|
|
1468
1734
|
|
|
1469
1735
|
// packages/plugins/plugin-space/src/components/SyncStatus/Space.tsx
|
|
1470
|
-
import
|
|
1471
|
-
import { useClient as
|
|
1736
|
+
import React24, { useEffect as useEffect7, useState as useState13 } from "react";
|
|
1737
|
+
import { useClient as useClient8 } from "@dxos/react-client";
|
|
1472
1738
|
import { useSpace } from "@dxos/react-client/echo";
|
|
1473
|
-
import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as
|
|
1474
|
-
import { mx as
|
|
1739
|
+
import { Icon as Icon5, toLocalizedString as toLocalizedString4, useTranslation as useTranslation23 } from "@dxos/react-ui";
|
|
1740
|
+
import { mx as mx7 } from "@dxos/react-ui-theme";
|
|
1475
1741
|
var SYNC_STALLED_TIMEOUT = 5e3;
|
|
1476
1742
|
var styles = {
|
|
1477
1743
|
barBg: "bg-neutral-50 dark:bg-green-900 text-black",
|
|
@@ -1502,8 +1768,8 @@ var useActive = (count) => {
|
|
|
1502
1768
|
return active;
|
|
1503
1769
|
};
|
|
1504
1770
|
var SpaceRowContainer = ({ spaceId, state }) => {
|
|
1505
|
-
const { t } =
|
|
1506
|
-
const client =
|
|
1771
|
+
const { t } = useTranslation23(SPACE_PLUGIN);
|
|
1772
|
+
const client = useClient8();
|
|
1507
1773
|
const space = useSpace(spaceId);
|
|
1508
1774
|
if (!space) {
|
|
1509
1775
|
return null;
|
|
@@ -1511,7 +1777,7 @@ var SpaceRowContainer = ({ spaceId, state }) => {
|
|
|
1511
1777
|
const spaceName = toLocalizedString4(getSpaceDisplayName(space, {
|
|
1512
1778
|
personal: space === client.spaces.default
|
|
1513
1779
|
}), t);
|
|
1514
|
-
return /* @__PURE__ */
|
|
1780
|
+
return /* @__PURE__ */ React24.createElement(SpaceRow, {
|
|
1515
1781
|
spaceId,
|
|
1516
1782
|
spaceName,
|
|
1517
1783
|
state
|
|
@@ -1520,19 +1786,19 @@ var SpaceRowContainer = ({ spaceId, state }) => {
|
|
|
1520
1786
|
var SpaceRow = ({ spaceId, spaceName, state: { localDocumentCount, remoteDocumentCount, missingOnLocal, missingOnRemote } }) => {
|
|
1521
1787
|
const downActive = useActive(localDocumentCount);
|
|
1522
1788
|
const upActive = useActive(remoteDocumentCount);
|
|
1523
|
-
return /* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ React24.createElement("div", {
|
|
1524
1790
|
className: "flex items-center mx-0.5 gap-0.5 cursor-pointer",
|
|
1525
1791
|
title: spaceId,
|
|
1526
1792
|
onClick: () => {
|
|
1527
1793
|
void navigator.clipboard.writeText(spaceId);
|
|
1528
1794
|
}
|
|
1529
|
-
}, /* @__PURE__ */
|
|
1795
|
+
}, /* @__PURE__ */ React24.createElement("span", {
|
|
1530
1796
|
className: "is-1/2 truncate"
|
|
1531
|
-
}, spaceName), /* @__PURE__ */
|
|
1797
|
+
}, spaceName), /* @__PURE__ */ React24.createElement(Icon5, {
|
|
1532
1798
|
icon: "ph--arrow-fat-line-left--regular",
|
|
1533
1799
|
size: 3,
|
|
1534
|
-
classNames:
|
|
1535
|
-
}), /* @__PURE__ */
|
|
1800
|
+
classNames: mx7(downActive && "animate-[pulse_1s_infinite]")
|
|
1801
|
+
}), /* @__PURE__ */ React24.createElement(Candle, {
|
|
1536
1802
|
up: {
|
|
1537
1803
|
count: remoteDocumentCount,
|
|
1538
1804
|
total: remoteDocumentCount + missingOnRemote
|
|
@@ -1542,37 +1808,37 @@ var SpaceRow = ({ spaceId, spaceName, state: { localDocumentCount, remoteDocumen
|
|
|
1542
1808
|
total: localDocumentCount + missingOnLocal
|
|
1543
1809
|
},
|
|
1544
1810
|
title: spaceId
|
|
1545
|
-
}), /* @__PURE__ */
|
|
1811
|
+
}), /* @__PURE__ */ React24.createElement(Icon5, {
|
|
1546
1812
|
icon: "ph--arrow-fat-line-right--regular",
|
|
1547
1813
|
size: 3,
|
|
1548
|
-
classNames:
|
|
1814
|
+
classNames: mx7(upActive && "animate-[pulse_1s_step-start_infinite]")
|
|
1549
1815
|
}));
|
|
1550
1816
|
};
|
|
1551
1817
|
var Candle = ({ classNames, up, down }) => {
|
|
1552
|
-
return /* @__PURE__ */
|
|
1553
|
-
className:
|
|
1554
|
-
}, /* @__PURE__ */
|
|
1818
|
+
return /* @__PURE__ */ React24.createElement("div", {
|
|
1819
|
+
className: mx7("grid grid-cols-[1fr_2rem_1fr] w-full h-3", classNames)
|
|
1820
|
+
}, /* @__PURE__ */ React24.createElement(Bar, {
|
|
1555
1821
|
classNames: "justify-end",
|
|
1556
1822
|
...up
|
|
1557
|
-
}), /* @__PURE__ */
|
|
1823
|
+
}), /* @__PURE__ */ React24.createElement("div", {
|
|
1558
1824
|
className: "relative"
|
|
1559
|
-
}, /* @__PURE__ */
|
|
1560
|
-
className:
|
|
1561
|
-
}, up.total)), /* @__PURE__ */
|
|
1825
|
+
}, /* @__PURE__ */ React24.createElement("div", {
|
|
1826
|
+
className: mx7("absolute inset-0 flex items-center justify-center text-xs", styles.barBg)
|
|
1827
|
+
}, up.total)), /* @__PURE__ */ React24.createElement(Bar, down));
|
|
1562
1828
|
};
|
|
1563
1829
|
var Bar = ({ classNames, count, total }) => {
|
|
1564
1830
|
let p = count / total * 100;
|
|
1565
1831
|
if (count < total) {
|
|
1566
1832
|
p = Math.min(p, 95);
|
|
1567
1833
|
}
|
|
1568
|
-
return /* @__PURE__ */
|
|
1569
|
-
className:
|
|
1570
|
-
}, /* @__PURE__ */
|
|
1571
|
-
className:
|
|
1834
|
+
return /* @__PURE__ */ React24.createElement("div", {
|
|
1835
|
+
className: mx7("relative flex w-full", styles.barBg, classNames)
|
|
1836
|
+
}, /* @__PURE__ */ React24.createElement("div", {
|
|
1837
|
+
className: mx7("shrink-0", styles.barFg),
|
|
1572
1838
|
style: {
|
|
1573
1839
|
width: `${p}%`
|
|
1574
1840
|
}
|
|
1575
|
-
}), count !== total && /* @__PURE__ */
|
|
1841
|
+
}), count !== total && /* @__PURE__ */ React24.createElement("div", {
|
|
1576
1842
|
className: "absolute top-0 bottom-0 flex items-center mx-0.5 text-black text-xs"
|
|
1577
1843
|
}, count));
|
|
1578
1844
|
};
|
|
@@ -1581,7 +1847,7 @@ var Bar = ({ classNames, count, total }) => {
|
|
|
1581
1847
|
import { Context as Context2 } from "@dxos/context";
|
|
1582
1848
|
var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
|
|
1583
1849
|
var createClientSaveTracker = (client, cb) => {
|
|
1584
|
-
const
|
|
1850
|
+
const CleanupFns = {};
|
|
1585
1851
|
const state = {};
|
|
1586
1852
|
const install = (spaces) => {
|
|
1587
1853
|
for (const space of spaces) {
|
|
@@ -1589,7 +1855,7 @@ var createClientSaveTracker = (client, cb) => {
|
|
|
1589
1855
|
continue;
|
|
1590
1856
|
}
|
|
1591
1857
|
state[space.id] = "saved";
|
|
1592
|
-
|
|
1858
|
+
CleanupFns[space.id] = createSpaceSaveTracker(space, (s) => {
|
|
1593
1859
|
state[space.id] = s;
|
|
1594
1860
|
cb(Object.values(state).some((s2) => s2 === "saving") ? "saving" : "saved");
|
|
1595
1861
|
});
|
|
@@ -1600,7 +1866,7 @@ var createClientSaveTracker = (client, cb) => {
|
|
|
1600
1866
|
});
|
|
1601
1867
|
install(client.spaces.get());
|
|
1602
1868
|
return () => {
|
|
1603
|
-
for (const unsubscribe of Object.values(
|
|
1869
|
+
for (const unsubscribe of Object.values(CleanupFns)) {
|
|
1604
1870
|
unsubscribe();
|
|
1605
1871
|
}
|
|
1606
1872
|
};
|
|
@@ -1670,7 +1936,7 @@ var getIcon = (status) => {
|
|
|
1670
1936
|
|
|
1671
1937
|
// packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
|
|
1672
1938
|
var SyncStatus = () => {
|
|
1673
|
-
const client =
|
|
1939
|
+
const client = useClient9();
|
|
1674
1940
|
const state = useSyncState();
|
|
1675
1941
|
const [saved, setSaved] = useState14(true);
|
|
1676
1942
|
useEffect8(() => {
|
|
@@ -1678,13 +1944,13 @@ var SyncStatus = () => {
|
|
|
1678
1944
|
setSaved(state2 === "saved");
|
|
1679
1945
|
});
|
|
1680
1946
|
}, []);
|
|
1681
|
-
return /* @__PURE__ */
|
|
1947
|
+
return /* @__PURE__ */ React25.createElement(SyncStatusIndicator, {
|
|
1682
1948
|
state,
|
|
1683
1949
|
saved
|
|
1684
1950
|
});
|
|
1685
1951
|
};
|
|
1686
1952
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1687
|
-
const { t } =
|
|
1953
|
+
const { t } = useTranslation24(SPACE_PLUGIN);
|
|
1688
1954
|
const summary = getSyncSummary(state);
|
|
1689
1955
|
const offline = Object.values(state).length === 0;
|
|
1690
1956
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1711,66 +1977,64 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1711
1977
|
needsToDownload
|
|
1712
1978
|
]);
|
|
1713
1979
|
const title = t(`${status} label`);
|
|
1714
|
-
const icon = /* @__PURE__ */
|
|
1980
|
+
const icon = /* @__PURE__ */ React25.createElement(Icon6, {
|
|
1715
1981
|
icon: getIcon(status),
|
|
1716
1982
|
size: 4,
|
|
1717
1983
|
classNames
|
|
1718
1984
|
});
|
|
1719
1985
|
if (offline) {
|
|
1720
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ React25.createElement(StatusBar.Item, {
|
|
1721
1987
|
title
|
|
1722
1988
|
}, icon);
|
|
1723
1989
|
} else {
|
|
1724
|
-
return /* @__PURE__ */
|
|
1990
|
+
return /* @__PURE__ */ React25.createElement(Popover3.Root, null, /* @__PURE__ */ React25.createElement(Popover3.Trigger, {
|
|
1725
1991
|
asChild: true
|
|
1726
|
-
}, /* @__PURE__ */
|
|
1992
|
+
}, /* @__PURE__ */ React25.createElement(StatusBar.Button, {
|
|
1727
1993
|
title
|
|
1728
|
-
}, icon)), /* @__PURE__ */
|
|
1994
|
+
}, icon)), /* @__PURE__ */ React25.createElement(Popover3.Portal, null, /* @__PURE__ */ React25.createElement(Popover3.Content, null, /* @__PURE__ */ React25.createElement(SyncStatusDetail, {
|
|
1729
1995
|
state,
|
|
1730
1996
|
summary,
|
|
1731
1997
|
debug: false
|
|
1732
|
-
}), /* @__PURE__ */
|
|
1998
|
+
}), /* @__PURE__ */ React25.createElement(Popover3.Arrow, null))));
|
|
1733
1999
|
}
|
|
1734
2000
|
};
|
|
1735
2001
|
var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
|
|
1736
2002
|
const [showAll, setShowAll] = useState14(false);
|
|
1737
|
-
const { t } =
|
|
2003
|
+
const { t } = useTranslation24(SPACE_PLUGIN);
|
|
1738
2004
|
const entries = Object.entries(state).filter(([_, value]) => showAll || value.missingOnLocal + value.missingOnRemote > 0).toSorted(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
1739
|
-
const handleCheckedChange =
|
|
2005
|
+
const handleCheckedChange = useCallback13((state2) => setShowAll(state2), [
|
|
1740
2006
|
setShowAll
|
|
1741
2007
|
]);
|
|
1742
|
-
return /* @__PURE__ */
|
|
1743
|
-
className:
|
|
1744
|
-
}, /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ React25.createElement("div", {
|
|
2009
|
+
className: mx8("flex flex-col gap-3 p-2 text-xs min-w-[400px]", classNames)
|
|
2010
|
+
}, /* @__PURE__ */ React25.createElement("div", {
|
|
1745
2011
|
role: "none",
|
|
1746
2012
|
className: "flex items-center"
|
|
1747
|
-
}, /* @__PURE__ */
|
|
2013
|
+
}, /* @__PURE__ */ React25.createElement("h1", {
|
|
1748
2014
|
className: "flex-1"
|
|
1749
|
-
}, t("sync status title")), /* @__PURE__ */
|
|
2015
|
+
}, t("sync status title")), /* @__PURE__ */ React25.createElement("div", {
|
|
1750
2016
|
className: "flex items-center gap-2"
|
|
1751
|
-
}, /* @__PURE__ */
|
|
2017
|
+
}, /* @__PURE__ */ React25.createElement(Input6.Root, null, /* @__PURE__ */ React25.createElement(Input6.Label, {
|
|
1752
2018
|
classNames: "text-xs"
|
|
1753
|
-
}, t("show all label")), /* @__PURE__ */
|
|
2019
|
+
}, t("show all label")), /* @__PURE__ */ React25.createElement(Input6.Checkbox, {
|
|
1754
2020
|
checked: showAll,
|
|
1755
2021
|
onCheckedChange: handleCheckedChange
|
|
1756
|
-
})))), /* @__PURE__ */
|
|
2022
|
+
})))), /* @__PURE__ */ React25.createElement("div", {
|
|
1757
2023
|
className: "flex flex-col gap-2"
|
|
1758
|
-
}, entries.length === 0 && /* @__PURE__ */
|
|
2024
|
+
}, entries.length === 0 && /* @__PURE__ */ React25.createElement("div", {
|
|
1759
2025
|
role: "none",
|
|
1760
2026
|
className: "flex justify-center"
|
|
1761
|
-
}, t("no sync status label")), entries.map(([spaceId, state2]) => /* @__PURE__ */
|
|
2027
|
+
}, t("no sync status label")), entries.map(([spaceId, state2]) => /* @__PURE__ */ React25.createElement(SpaceRowContainer, {
|
|
1762
2028
|
key: spaceId,
|
|
1763
2029
|
spaceId,
|
|
1764
2030
|
state: state2
|
|
1765
|
-
}))), debug && /* @__PURE__ */
|
|
2031
|
+
}))), debug && /* @__PURE__ */ React25.createElement(SyntaxHighlighter, {
|
|
1766
2032
|
language: "json"
|
|
1767
2033
|
}, JSON.stringify(summary, null, 2)));
|
|
1768
2034
|
};
|
|
1769
2035
|
|
|
1770
2036
|
export {
|
|
1771
|
-
AdvancedObjectSettings,
|
|
1772
2037
|
AwaitingObject,
|
|
1773
|
-
BaseObjectSettings,
|
|
1774
2038
|
CREATE_OBJECT_DIALOG,
|
|
1775
2039
|
CreateObjectDialog,
|
|
1776
2040
|
CREATE_SPACE_DIALOG,
|
|
@@ -1779,7 +2043,9 @@ export {
|
|
|
1779
2043
|
CollectionSection,
|
|
1780
2044
|
JOIN_DIALOG,
|
|
1781
2045
|
JoinDialog,
|
|
2046
|
+
MembersContainer,
|
|
1782
2047
|
MenuFooter,
|
|
2048
|
+
ObjectSettingsContainer,
|
|
1783
2049
|
PersistenceStatus,
|
|
1784
2050
|
POPOVER_ADD_SPACE,
|
|
1785
2051
|
PopoverAddSpace,
|
|
@@ -1794,9 +2060,9 @@ export {
|
|
|
1794
2060
|
SmallPresenceLive,
|
|
1795
2061
|
SmallPresence,
|
|
1796
2062
|
SpacePluginSettings,
|
|
1797
|
-
|
|
2063
|
+
SpacePropertiesForm,
|
|
1798
2064
|
SPACE_SETTINGS_DIALOG,
|
|
1799
|
-
|
|
2065
|
+
SpaceSettingsContainer,
|
|
1800
2066
|
InlineSyncStatus,
|
|
1801
2067
|
SyncStatus,
|
|
1802
2068
|
SyncStatusIndicator,
|
|
@@ -1808,8 +2074,9 @@ export {
|
|
|
1808
2074
|
ReactRoot,
|
|
1809
2075
|
ReactSurface,
|
|
1810
2076
|
Schema,
|
|
2077
|
+
Tools,
|
|
1811
2078
|
SpaceSettings,
|
|
1812
2079
|
SpaceState,
|
|
1813
2080
|
SpacesReady
|
|
1814
2081
|
};
|
|
1815
|
-
//# sourceMappingURL=chunk-
|
|
2082
|
+
//# sourceMappingURL=chunk-HMCIZ7G7.mjs.map
|