@dxos/plugin-space 0.8.2-main.f081794 → 0.8.2-main.fbd8ed0
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-7X3SIPCD.mjs +328 -0
- package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-6WIAFHYK.mjs → app-graph-serializer-VRU57AEZ.mjs} +6 -6
- package/dist/lib/browser/app-graph-serializer-VRU57AEZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-MHTZAZT2.mjs → chunk-43UQWMD3.mjs} +327 -535
- package/dist/lib/browser/chunk-43UQWMD3.mjs.map +7 -0
- package/dist/lib/browser/chunk-AR5R2F6B.mjs +88 -0
- package/dist/lib/browser/chunk-AR5R2F6B.mjs.map +7 -0
- package/dist/lib/browser/chunk-CY35NLWL.mjs +296 -0
- package/dist/lib/browser/chunk-CY35NLWL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FSHDAPFY.mjs → chunk-IQFFOAWD.mjs} +24 -38
- package/dist/lib/browser/chunk-IQFFOAWD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-MIJHUABE.mjs → chunk-UBSVH2NQ.mjs} +3 -4
- package/dist/lib/browser/chunk-UBSVH2NQ.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-DVHNLGYU.mjs → identity-created-ANRJHNMQ.mjs} +3 -3
- package/dist/lib/browser/identity-created-ANRJHNMQ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +24 -23
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-72IWBVYE.mjs → intent-resolver-KRINV5QI.mjs} +90 -94
- package/dist/lib/browser/intent-resolver-KRINV5QI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-DRVM5ACV.mjs → react-root-J3SP2HVW.mjs} +5 -4
- package/dist/lib/browser/{react-surface-KODNQYDN.mjs → react-surface-J7T2IMH4.mjs} +6 -30
- package/dist/lib/browser/react-surface-J7T2IMH4.mjs.map +7 -0
- package/dist/lib/browser/schema-defs-OCBY7APN.mjs +26 -0
- package/dist/lib/browser/schema-defs-OCBY7APN.mjs.map +7 -0
- package/dist/lib/browser/{schema-tools-YAXPRIXP.mjs → schema-tools-MYC4LTQD.mjs} +22 -22
- package/dist/lib/browser/schema-tools-MYC4LTQD.mjs.map +7 -0
- package/dist/lib/browser/{settings-2UIV5WX5.mjs → settings-G24447B7.mjs} +2 -2
- package/dist/lib/browser/{spaces-ready-3URIMLCR.mjs → spaces-ready-5I3RKYTT.mjs} +16 -15
- package/dist/lib/browser/spaces-ready-5I3RKYTT.mjs.map +7 -0
- package/dist/lib/browser/{state-CYV6QCTN.mjs → state-SI4B5GHC.mjs} +2 -2
- package/dist/lib/browser/state-SI4B5GHC.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs +328 -0
- package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-GOLCQHFQ.cjs → app-graph-serializer-VLBCR3IX.cjs} +22 -22
- package/dist/lib/node/app-graph-serializer-VLBCR3IX.cjs.map +7 -0
- package/dist/lib/node/{chunk-EI3ZPOLJ.cjs → chunk-5YHUQJVB.cjs} +7 -8
- package/dist/lib/node/chunk-5YHUQJVB.cjs.map +7 -0
- package/dist/lib/node/chunk-DQN4ZQDW.cjs +119 -0
- package/dist/lib/node/chunk-DQN4ZQDW.cjs.map +7 -0
- package/dist/lib/node/chunk-K6ZO4WDJ.cjs +324 -0
- package/dist/lib/node/chunk-K6ZO4WDJ.cjs.map +7 -0
- package/dist/lib/node/{chunk-GPZPEQXP.cjs → chunk-MXBE2VET.cjs} +351 -550
- package/dist/lib/node/chunk-MXBE2VET.cjs.map +7 -0
- package/dist/lib/node/{chunk-U63V2254.cjs → chunk-SCATWJKX.cjs} +46 -61
- package/dist/lib/node/chunk-SCATWJKX.cjs.map +7 -0
- package/dist/lib/node/{identity-created-YYTW4K3Z.cjs → identity-created-NIPYGVG3.cjs} +7 -7
- package/dist/lib/node/identity-created-NIPYGVG3.cjs.map +7 -0
- package/dist/lib/node/index.cjs +74 -74
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-KA56XGUX.cjs → intent-resolver-MJVRY6YE.cjs} +133 -136
- package/dist/lib/node/intent-resolver-MJVRY6YE.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-6WGN5WRQ.cjs → react-root-M4BZ6VXB.cjs} +9 -8
- package/dist/lib/node/{react-root-6WGN5WRQ.cjs.map → react-root-M4BZ6VXB.cjs.map} +1 -1
- package/dist/lib/node/{react-surface-37AVZFPL.cjs → react-surface-RYKSYYKM.cjs} +42 -64
- package/dist/lib/node/react-surface-RYKSYYKM.cjs.map +7 -0
- package/dist/lib/node/{schema-PPJ5BZ3A.cjs → schema-defs-2HJLXSNK.cjs} +13 -11
- package/dist/lib/node/schema-defs-2HJLXSNK.cjs.map +7 -0
- package/dist/lib/node/{schema-tools-BLIMOZYY.cjs → schema-tools-OE3MFYYH.cjs} +24 -24
- package/dist/lib/node/schema-tools-OE3MFYYH.cjs.map +7 -0
- package/dist/lib/node/{settings-HJROTHC4.cjs → settings-AFWO4AWK.cjs} +6 -6
- package/dist/lib/node/{spaces-ready-IWDDIAAD.cjs → spaces-ready-BMPXSFHF.cjs} +24 -23
- package/dist/lib/node/spaces-ready-BMPXSFHF.cjs.map +7 -0
- package/dist/lib/node/{state-JLN7TGRR.cjs → state-L2ZSDKLS.cjs} +5 -5
- package/dist/lib/node/state-L2ZSDKLS.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +15 -15
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs +329 -0
- package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-AZXSO7HK.mjs → app-graph-serializer-GEUYYXKD.mjs} +6 -6
- package/dist/lib/node-esm/app-graph-serializer-GEUYYXKD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DUA32XUX.mjs → chunk-5NIBYPVF.mjs} +3 -4
- package/dist/lib/node-esm/chunk-5NIBYPVF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CLRCW6PU.mjs +297 -0
- package/dist/lib/node-esm/chunk-CLRCW6PU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ABKX22IP.mjs → chunk-FI3WV22Y.mjs} +327 -535
- package/dist/lib/node-esm/chunk-FI3WV22Y.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HNKAG5CX.mjs +90 -0
- package/dist/lib/node-esm/chunk-HNKAG5CX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TVN6VHTT.mjs → chunk-S2W6HS4A.mjs} +24 -38
- package/dist/lib/node-esm/chunk-S2W6HS4A.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-MP4GLXHO.mjs → identity-created-O5X2FFWU.mjs} +3 -3
- package/dist/lib/node-esm/identity-created-O5X2FFWU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -23
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-SG2ECM5R.mjs → intent-resolver-JT6EB47M.mjs} +90 -94
- package/dist/lib/node-esm/intent-resolver-JT6EB47M.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-MSUT6S2S.mjs → react-root-S2LW4FS7.mjs} +5 -4
- package/dist/lib/{browser/react-root-DRVM5ACV.mjs.map → node-esm/react-root-S2LW4FS7.mjs.map} +1 -1
- package/dist/lib/node-esm/{react-surface-G73SO23W.mjs → react-surface-ZNNMO7QQ.mjs} +6 -30
- package/dist/lib/node-esm/react-surface-ZNNMO7QQ.mjs.map +7 -0
- package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs +27 -0
- package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-tools-IU7EX5A5.mjs → schema-tools-YTJLA3NQ.mjs} +22 -22
- package/dist/lib/node-esm/schema-tools-YTJLA3NQ.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-KCLKPJVY.mjs → settings-MJVSCOI4.mjs} +2 -2
- package/dist/lib/node-esm/{spaces-ready-Z3SXKWX2.mjs → spaces-ready-XKG57SL5.mjs} +16 -15
- package/dist/lib/node-esm/spaces-ready-XKG57SL5.mjs.map +7 -0
- package/dist/lib/node-esm/{state-YZPY5T5A.mjs → state-QUDYGEU6.mjs} +2 -2
- package/dist/lib/node-esm/state-QUDYGEU6.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts +2 -2
- package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +9 -184
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -3
- 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-defs.d.ts +4 -0
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-tools.d.ts +2 -2
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +2 -2
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +2 -2
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/save-tracker.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +4 -0
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -0
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -2
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +3 -2
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -263
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/collection.d.ts +9 -8
- package/dist/types/src/types/collection.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +205 -110
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +154 -142
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +10 -16
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +51 -45
- package/src/SpacePlugin.tsx +9 -8
- package/src/capabilities/app-graph-builder.ts +376 -268
- package/src/capabilities/app-graph-serializer.ts +4 -4
- package/src/capabilities/identity-created.ts +3 -3
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/intent-resolver.ts +85 -95
- package/src/capabilities/react-surface.tsx +17 -38
- package/src/capabilities/schema-defs.ts +30 -0
- package/src/capabilities/schema-tool.test.ts +2 -3
- package/src/capabilities/schema-tools.ts +25 -25
- package/src/capabilities/spaces-ready.ts +14 -12
- package/src/capabilities/state.ts +3 -3
- package/src/components/AwaitingObject.tsx +1 -1
- package/src/components/CollectionMain.tsx +2 -5
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +2 -2
- package/src/components/CreateDialog/CreateObjectDialog.tsx +1 -1
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +2 -3
- package/src/components/MembersContainer.stories.tsx +1 -5
- package/src/components/MembersContainer.tsx +23 -15
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +2 -2
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +2 -2
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -4
- package/src/components/PersistenceStatus.tsx +11 -14
- package/src/components/PopoverRenameObject.tsx +12 -6
- package/src/components/PopoverRenameSpace.tsx +8 -0
- package/src/components/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence.tsx +34 -43
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +5 -3
- package/src/components/SyncStatus/InlineSyncStatus.tsx +10 -17
- package/src/components/index.ts +0 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveSpace.ts +20 -0
- package/src/hooks/useInputSurfaceLookup.tsx +2 -2
- package/src/hooks/usePath.ts +9 -6
- package/src/index.ts +1 -0
- package/src/translations.ts +1 -2
- package/src/types/collection.ts +6 -4
- package/src/types/thread.ts +14 -8
- package/src/types/types.ts +109 -96
- package/src/util.tsx +36 -73
- package/dist/lib/browser/app-graph-builder-J4PN5HOM.mjs +0 -369
- package/dist/lib/browser/app-graph-builder-J4PN5HOM.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-6WIAFHYK.mjs.map +0 -7
- package/dist/lib/browser/chunk-FSHDAPFY.mjs.map +0 -7
- package/dist/lib/browser/chunk-KDNV4YRD.mjs +0 -283
- package/dist/lib/browser/chunk-KDNV4YRD.mjs.map +0 -7
- package/dist/lib/browser/chunk-MHTZAZT2.mjs.map +0 -7
- package/dist/lib/browser/chunk-MIJHUABE.mjs.map +0 -7
- package/dist/lib/browser/identity-created-DVHNLGYU.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-72IWBVYE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-KODNQYDN.mjs.map +0 -7
- package/dist/lib/browser/schema-FHTA26SW.mjs +0 -24
- package/dist/lib/browser/schema-FHTA26SW.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-3URIMLCR.mjs.map +0 -7
- package/dist/lib/browser/state-CYV6QCTN.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-3BNPC5GB.cjs +0 -371
- package/dist/lib/node/app-graph-builder-3BNPC5GB.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-GOLCQHFQ.cjs.map +0 -7
- package/dist/lib/node/chunk-3UKLWXNJ.cjs +0 -311
- package/dist/lib/node/chunk-3UKLWXNJ.cjs.map +0 -7
- package/dist/lib/node/chunk-EI3ZPOLJ.cjs.map +0 -7
- package/dist/lib/node/chunk-GPZPEQXP.cjs.map +0 -7
- package/dist/lib/node/chunk-U63V2254.cjs.map +0 -7
- package/dist/lib/node/identity-created-YYTW4K3Z.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-KA56XGUX.cjs.map +0 -7
- package/dist/lib/node/react-surface-37AVZFPL.cjs.map +0 -7
- package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +0 -7
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-IWDDIAAD.cjs.map +0 -7
- package/dist/lib/node/state-JLN7TGRR.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OVMSUAX3.mjs +0 -370
- package/dist/lib/node-esm/app-graph-builder-OVMSUAX3.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-AZXSO7HK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-35OHQARN.mjs +0 -284
- package/dist/lib/node-esm/chunk-35OHQARN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ABKX22IP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DUA32XUX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TVN6VHTT.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-MP4GLXHO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-SG2ECM5R.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-G73SO23W.mjs.map +0 -7
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs +0 -25
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-Z3SXKWX2.mjs.map +0 -7
- package/dist/lib/node-esm/state-YZPY5T5A.mjs.map +0 -7
- package/dist/types/src/capabilities/schema.d.ts +0 -4
- package/dist/types/src/capabilities/schema.d.ts.map +0 -1
- package/dist/types/src/components/PopoverAddSpace.d.ts +0 -4
- package/dist/types/src/components/PopoverAddSpace.d.ts.map +0 -1
- package/dist/types/src/components/ShareSpaceButton.d.ts +0 -9
- package/dist/types/src/components/ShareSpaceButton.d.ts.map +0 -1
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts +0 -10
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +0 -1
- package/src/capabilities/schema.ts +0 -27
- package/src/components/PopoverAddSpace.tsx +0 -52
- package/src/components/ShareSpaceButton.stories.tsx +0 -27
- package/src/components/ShareSpaceButton.tsx +0 -32
- /package/dist/lib/{node-esm/react-root-MSUT6S2S.mjs.map → browser/react-root-J3SP2HVW.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-2UIV5WX5.mjs.map → settings-G24447B7.mjs.map} +0 -0
- /package/dist/lib/node/{settings-HJROTHC4.cjs.map → settings-AFWO4AWK.cjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-KCLKPJVY.mjs.map → settings-MJVSCOI4.mjs.map} +0 -0
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Option } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { contributes, createIntent, type PluginContext, Capabilities, LayoutAction } from '@dxos/app-framework';
|
|
6
8
|
import { SubscriptionList } from '@dxos/async';
|
|
7
9
|
import { Expando } from '@dxos/echo-schema';
|
|
8
10
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
@@ -23,17 +25,17 @@ import { COMPOSER_SPACE_LOCK, SHARED } from '../util';
|
|
|
23
25
|
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
24
26
|
const WAIT_FOR_OBJECT_TIMEOUT = 1000;
|
|
25
27
|
|
|
26
|
-
export default async (context:
|
|
28
|
+
export default async (context: PluginContext) => {
|
|
27
29
|
const subscriptions = new SubscriptionList();
|
|
28
30
|
const spaceSubscriptions = new SubscriptionList();
|
|
29
31
|
|
|
30
|
-
const { dispatchPromise: dispatch } = context.
|
|
31
|
-
const { graph } = context.
|
|
32
|
-
const layout = context.
|
|
33
|
-
const deck = context.
|
|
34
|
-
const attention = context.
|
|
35
|
-
const state = context.
|
|
36
|
-
const client = context.
|
|
32
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
33
|
+
const { graph } = context.getCapability(Capabilities.AppGraph);
|
|
34
|
+
const layout = context.getCapability(Capabilities.Layout);
|
|
35
|
+
const deck = context.getCapability(DeckCapabilities.DeckState);
|
|
36
|
+
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
37
|
+
const state = context.getCapability(SpaceCapabilities.MutableState);
|
|
38
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
37
39
|
|
|
38
40
|
const defaultSpace = client.spaces.default;
|
|
39
41
|
await defaultSpace.waitUntilReady();
|
|
@@ -49,7 +51,7 @@ export default async (context: PluginsContext) => {
|
|
|
49
51
|
|
|
50
52
|
const {
|
|
51
53
|
objects: [spacesOrder],
|
|
52
|
-
} = await defaultSpace.db.query(Filter.
|
|
54
|
+
} = await defaultSpace.db.query(Filter.type(Expando, { key: SHARED })).run();
|
|
53
55
|
if (!spacesOrder) {
|
|
54
56
|
// TODO(wittjosiah): Cannot be a Folder because Spaces are not TypedObjects so can't be saved in the database.
|
|
55
57
|
// Instead, we store order as an array of space ids.
|
|
@@ -65,10 +67,10 @@ export default async (context: PluginsContext) => {
|
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
const node = graph.
|
|
70
|
+
const node = graph.getNode(active[0]).pipe(Option.getOrNull);
|
|
69
71
|
if (!node && active[0].length === FQ_ID_LENGTH) {
|
|
70
72
|
const timeout = setTimeout(async () => {
|
|
71
|
-
const node = graph.
|
|
73
|
+
const node = graph.getNode(active[0]).pipe(Option.getOrNull);
|
|
72
74
|
if (!node) {
|
|
73
75
|
await dispatch(createIntent(SpaceAction.WaitForObject, { id: active[0] }));
|
|
74
76
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { effect } from '@preact/signals-core';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, type
|
|
7
|
+
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
10
|
import { ComplexMap } from '@dxos/util';
|
|
@@ -13,7 +13,7 @@ import { SpaceCapabilities } from './capabilities';
|
|
|
13
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
14
|
import { type PluginState } from '../types';
|
|
15
15
|
|
|
16
|
-
export default (context:
|
|
16
|
+
export default (context: PluginContext) => {
|
|
17
17
|
const state = new LocalStorageStore<PluginState>(SPACE_PLUGIN, {
|
|
18
18
|
awaiting: undefined,
|
|
19
19
|
spaceNames: {},
|
|
@@ -29,7 +29,7 @@ export default (context: PluginsContext) => {
|
|
|
29
29
|
.prop({ key: 'spaceNames', type: LocalStorageStore.json<Record<string, string>>() })
|
|
30
30
|
.prop({ key: 'enabledEdgeReplication', type: LocalStorageStore.bool() });
|
|
31
31
|
|
|
32
|
-
const manager = context.
|
|
32
|
+
const manager = context.getCapability(Capabilities.PluginManager);
|
|
33
33
|
const unsubscribe = effect(() => {
|
|
34
34
|
// TODO(wittjosiah): Find a way to make this capability-based.
|
|
35
35
|
const enabled = manager.enabled.includes('dxos.org/plugin/stack');
|
|
@@ -26,7 +26,7 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
26
26
|
const layout = useLayout();
|
|
27
27
|
|
|
28
28
|
const client = useClient();
|
|
29
|
-
const objects = useQuery(client.spaces, Filter.
|
|
29
|
+
const objects = useQuery(client.spaces, Filter.everything());
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
if (!id) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { baseSurface,
|
|
8
|
+
import { baseSurface, descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
9
9
|
|
|
10
10
|
import { SPACE_PLUGIN } from '../meta';
|
|
11
11
|
import type { CollectionType } from '../types';
|
|
@@ -21,10 +21,7 @@ export const CollectionMain = ({ collection }: { collection: CollectionType }) =
|
|
|
21
21
|
>
|
|
22
22
|
<p
|
|
23
23
|
role='alert'
|
|
24
|
-
className={mx(
|
|
25
|
-
descriptionText,
|
|
26
|
-
'border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words',
|
|
27
|
-
)}
|
|
24
|
+
className={mx(descriptionMessage, 'rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words')}
|
|
28
25
|
>
|
|
29
26
|
{collection.name ?? t('unnamed collection label')}
|
|
30
27
|
</p>
|
|
@@ -35,7 +35,7 @@ const meta: Meta<typeof CreateObjectDialog> = {
|
|
|
35
35
|
decorators: [
|
|
36
36
|
withClientProvider({ createIdentity: true, createSpace: true, types: [CollectionType] }),
|
|
37
37
|
withTheme,
|
|
38
|
-
withLayout(
|
|
38
|
+
withLayout(),
|
|
39
39
|
],
|
|
40
40
|
parameters: {
|
|
41
41
|
translations: [...translations, osTranslations],
|
|
@@ -66,7 +66,7 @@ export const TargetSpace: StoryObj<typeof CreateObjectDialog> = {
|
|
|
66
66
|
export const TargetCollection: StoryObj<typeof CreateObjectDialog> = {
|
|
67
67
|
render: (args) => {
|
|
68
68
|
const space = useSpace();
|
|
69
|
-
const [collection] = useQuery(space, Filter.
|
|
69
|
+
const [collection] = useQuery(space, Filter.type(CollectionType));
|
|
70
70
|
|
|
71
71
|
useEffect(() => {
|
|
72
72
|
if (space) {
|
|
@@ -46,7 +46,7 @@ export const CreateObjectDialog = ({
|
|
|
46
46
|
|
|
47
47
|
const resolve = useCallback(
|
|
48
48
|
(typename: string) =>
|
|
49
|
-
manager.context.
|
|
49
|
+
manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {},
|
|
50
50
|
[manager],
|
|
51
51
|
);
|
|
52
52
|
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Effect } from 'effect';
|
|
5
|
+
import { Effect, type Schema } from 'effect';
|
|
6
6
|
import React, { useCallback, useRef } from 'react';
|
|
7
7
|
|
|
8
8
|
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
-
import { type S } from '@dxos/echo-schema';
|
|
10
9
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
11
10
|
import { Form } from '@dxos/react-ui-form';
|
|
12
11
|
|
|
@@ -16,7 +15,7 @@ import { SpaceAction, SpaceForm } from '../../types';
|
|
|
16
15
|
|
|
17
16
|
export const CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
|
|
18
17
|
|
|
19
|
-
type FormValues =
|
|
18
|
+
type FormValues = Schema.Schema.Type<typeof SpaceForm>;
|
|
20
19
|
const initialValues: FormValues = { edgeReplication: true };
|
|
21
20
|
|
|
22
21
|
export const CreateSpaceDialog = () => {
|
|
@@ -16,11 +16,7 @@ import translations from '../translations';
|
|
|
16
16
|
const meta: Meta = {
|
|
17
17
|
title: 'plugins/plugin-space/MembersContainer',
|
|
18
18
|
component: MembersContainer,
|
|
19
|
-
decorators: [
|
|
20
|
-
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
21
|
-
withTheme,
|
|
22
|
-
withLayout({ tooltips: true }),
|
|
23
|
-
],
|
|
19
|
+
decorators: [withClientProvider({ createIdentity: true, createSpace: true }), withTheme, withLayout()],
|
|
24
20
|
parameters: {
|
|
25
21
|
layout: 'fullscreen',
|
|
26
22
|
translations: [...translations, osTranslations],
|
|
@@ -6,6 +6,7 @@ import { Check, X } from '@phosphor-icons/react';
|
|
|
6
6
|
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import { QR } from 'react-qr-rounded';
|
|
8
8
|
|
|
9
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
11
|
import { useConfig } from '@dxos/react-client';
|
|
11
12
|
import { fullyQualifiedId, useSpaceInvitations, type Space } from '@dxos/react-client/echo';
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
import { hexToEmoji } from '@dxos/util';
|
|
28
29
|
|
|
29
30
|
import { SPACE_PLUGIN } from '../meta';
|
|
30
|
-
import { CollectionType } from '../types';
|
|
31
|
+
import { CollectionType, SpaceAction } from '../types';
|
|
31
32
|
import { COMPOSER_SPACE_LOCK } from '../util';
|
|
32
33
|
|
|
33
34
|
// TODO(wittjosiah): Copied from Shell.
|
|
@@ -50,6 +51,7 @@ export const MembersContainer = ({
|
|
|
50
51
|
}) => {
|
|
51
52
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
52
53
|
const config = useConfig();
|
|
54
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
53
55
|
const invitations = useSpaceInvitations(space.key);
|
|
54
56
|
const visibleInvitations = invitations?.filter(
|
|
55
57
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -77,13 +79,16 @@ export const MembersContainer = ({
|
|
|
77
79
|
description: t('invite one description', { ns: 'os' }),
|
|
78
80
|
icon: () => <Icon icon='ph--user-plus--regular' size={5} />,
|
|
79
81
|
testId: 'membersContainer.inviteOne',
|
|
80
|
-
onClick: () => {
|
|
81
|
-
const invitation =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
onClick: async () => {
|
|
83
|
+
const { data: invitation } = await dispatch(
|
|
84
|
+
createIntent(SpaceAction.Share, {
|
|
85
|
+
space,
|
|
86
|
+
type: Invitation.Type.INTERACTIVE,
|
|
87
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
88
|
+
multiUse: false,
|
|
89
|
+
target: target && fullyQualifiedId(target),
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
87
92
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
88
93
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
89
94
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -96,13 +101,16 @@ export const MembersContainer = ({
|
|
|
96
101
|
description: t('invite many description', { ns: 'os' }),
|
|
97
102
|
icon: () => <Icon icon='ph--users-three--regular' size={5} />,
|
|
98
103
|
testId: 'membersContainer.inviteMany',
|
|
99
|
-
onClick: () => {
|
|
100
|
-
const invitation =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
onClick: async () => {
|
|
105
|
+
const { data: invitation } = await dispatch(
|
|
106
|
+
createIntent(SpaceAction.Share, {
|
|
107
|
+
space,
|
|
108
|
+
type: Invitation.Type.DELEGATED,
|
|
109
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
110
|
+
multiUse: true,
|
|
111
|
+
target: target && fullyQualifiedId(target),
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
106
114
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
107
115
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
108
116
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { Planet } from '@phosphor-icons/react';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { type
|
|
8
|
+
import { type AnyLiveObject, getSpace } from '@dxos/client/echo';
|
|
9
9
|
import { useClient } from '@dxos/react-client';
|
|
10
10
|
import { DropdownMenu, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
|
|
12
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
13
13
|
import { getSpaceDisplayName } from '../util';
|
|
14
14
|
|
|
15
|
-
export const MenuFooter = ({ object }: { object:
|
|
15
|
+
export const MenuFooter = ({ object }: { object: AnyLiveObject<any> }) => {
|
|
16
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
17
|
const client = useClient();
|
|
18
18
|
const space = getSpace(object);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ForeignKey, ForeignKeySchema } from '@dxos/echo-schema';
|
|
8
|
-
import { getMeta, type
|
|
8
|
+
import { getMeta, type AnyLiveObject } from '@dxos/react-client/echo';
|
|
9
9
|
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ const initialValues = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export type AdvancedObjectSettingsProps = {
|
|
21
|
-
object:
|
|
21
|
+
object: AnyLiveObject<any>;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const AdvancedObjectSettings = ({ object }: AdvancedObjectSettingsProps) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type AnyLiveObject } from '@dxos/react-client/echo';
|
|
8
8
|
import { Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ import { meta } from '../../meta';
|
|
|
12
12
|
|
|
13
13
|
export type BaseObjectSettingsProps = ThemedClassName<
|
|
14
14
|
PropsWithChildren<{
|
|
15
|
-
object:
|
|
15
|
+
object: AnyLiveObject<any>;
|
|
16
16
|
}>
|
|
17
17
|
>;
|
|
18
18
|
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework';
|
|
8
|
-
import { type
|
|
8
|
+
import { type AnyLiveObject } from '@dxos/react-client/echo';
|
|
9
9
|
import { Clipboard } from '@dxos/react-ui';
|
|
10
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
11
|
|
|
12
|
-
import { AdvancedObjectSettings } from './AdvancedObjectSettings';
|
|
13
12
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
14
13
|
|
|
15
14
|
export type ObjectSettingsContainerProps = {
|
|
16
|
-
object:
|
|
15
|
+
object: AnyLiveObject<any>;
|
|
17
16
|
role: string;
|
|
18
17
|
};
|
|
19
18
|
|
|
@@ -28,7 +27,8 @@ export const ObjectSettingsContainer = ({ object, role }: ObjectSettingsContaine
|
|
|
28
27
|
<Surface role='base-object-settings' data={data} />
|
|
29
28
|
</BaseObjectSettings>
|
|
30
29
|
<Surface role='object-settings' data={data} />
|
|
31
|
-
|
|
30
|
+
{/* TODO(wittjosiah): Remove? */}
|
|
31
|
+
{/* <AdvancedObjectSettings object={object} /> */}
|
|
32
32
|
</div>
|
|
33
33
|
</StackItem.Content>
|
|
34
34
|
</Clipboard.Provider>
|
|
@@ -68,20 +68,17 @@ export const PersistenceStatus = ({ db }: { db: EchoDatabase }) => {
|
|
|
68
68
|
case Status.PERSISTED_LOCALLY:
|
|
69
69
|
default:
|
|
70
70
|
return (
|
|
71
|
-
<Tooltip.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</Tooltip.Content>
|
|
83
|
-
</Tooltip.Portal>
|
|
84
|
-
</Tooltip.Root>
|
|
71
|
+
<Tooltip.Trigger
|
|
72
|
+
delayDuration={400}
|
|
73
|
+
role='status'
|
|
74
|
+
content={t('persisted locally message')}
|
|
75
|
+
className='flex items-center'
|
|
76
|
+
>
|
|
77
|
+
<CheckCircle className={mx(getSize(4), 'me-1')} />
|
|
78
|
+
{displayMessage && (
|
|
79
|
+
<span className={mx('text-sm', staticPlaceholderText)}>{t('persisted locally label')}</span>
|
|
80
|
+
)}
|
|
81
|
+
</Tooltip.Trigger>
|
|
85
82
|
);
|
|
86
83
|
}
|
|
87
84
|
};
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
7
8
|
import { type Live } from '@dxos/live-object';
|
|
8
9
|
import { log } from '@dxos/log';
|
|
9
|
-
import { Button, Input,
|
|
10
|
+
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
10
11
|
|
|
11
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@ export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
|
19
20
|
const object = obj as any;
|
|
20
21
|
// TODO(burdon): Field should not be hardcoded field.
|
|
21
22
|
const [name, setName] = useState(object.name || object.title || '');
|
|
23
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
22
24
|
|
|
23
25
|
const handleDone = useCallback(() => {
|
|
24
26
|
try {
|
|
@@ -30,6 +32,12 @@ export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
|
30
32
|
log.error('Failed to rename object', { err });
|
|
31
33
|
}
|
|
32
34
|
}
|
|
35
|
+
void dispatch(
|
|
36
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
37
|
+
part: 'popover',
|
|
38
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
33
41
|
}, [object, name]);
|
|
34
42
|
|
|
35
43
|
return (
|
|
@@ -46,11 +54,9 @@ export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
|
46
54
|
/>
|
|
47
55
|
</Input.Root>
|
|
48
56
|
</div>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</Button>
|
|
53
|
-
</Popover.Close>
|
|
57
|
+
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
58
|
+
{t('done label', { ns: 'os' })}
|
|
59
|
+
</Button>
|
|
54
60
|
</div>
|
|
55
61
|
);
|
|
56
62
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
7
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
8
9
|
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
9
10
|
|
|
@@ -15,9 +16,16 @@ export const PopoverRenameSpace = ({ space }: { space: Space }) => {
|
|
|
15
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
16
17
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
17
18
|
const [name, setName] = useState(space.properties.name ?? '');
|
|
19
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
18
20
|
|
|
19
21
|
const handleDone = useCallback(() => {
|
|
20
22
|
space.properties.name = name;
|
|
23
|
+
void dispatch(
|
|
24
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
25
|
+
part: 'popover',
|
|
26
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
21
29
|
}, [space, name]);
|
|
22
30
|
|
|
23
31
|
// TODO(thure): Why does the input value need to be uncontrolled to work?
|
|
@@ -100,7 +100,7 @@ export const Small = () => {
|
|
|
100
100
|
|
|
101
101
|
const meta: Meta = {
|
|
102
102
|
title: 'plugins/plugin-space/SpacePresence',
|
|
103
|
-
decorators: [withTheme, withLayout(
|
|
103
|
+
decorators: [withTheme, withLayout()],
|
|
104
104
|
parameters: { translations },
|
|
105
105
|
};
|
|
106
106
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Option } from 'effect';
|
|
5
6
|
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
6
7
|
|
|
7
8
|
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
type Size,
|
|
17
18
|
type ThemedClassName,
|
|
18
19
|
Tooltip,
|
|
20
|
+
Popover,
|
|
19
21
|
useTranslation,
|
|
20
22
|
List,
|
|
21
23
|
ListItem,
|
|
@@ -115,28 +117,25 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
115
117
|
return (
|
|
116
118
|
<div className='dx-avatar-group' data-testid='spacePlugin.presence'>
|
|
117
119
|
{members.slice(0, 3).map((member, i) => (
|
|
118
|
-
<Tooltip.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
</Tooltip.Content>
|
|
133
|
-
</Tooltip.Portal>
|
|
134
|
-
</Tooltip.Root>
|
|
120
|
+
<Tooltip.Trigger
|
|
121
|
+
key={member.identity.identityKey.toHex()}
|
|
122
|
+
side='bottom'
|
|
123
|
+
content={getName(member.identity)}
|
|
124
|
+
className='grid focus:outline-none'
|
|
125
|
+
>
|
|
126
|
+
<PresenceAvatar
|
|
127
|
+
identity={member.identity}
|
|
128
|
+
match={member.currentlyAttended} // TODO(Zan): Match always true now we're showing 'members viewing current object'.
|
|
129
|
+
index={members.length - i}
|
|
130
|
+
onClick={() => onMemberClick?.(member)}
|
|
131
|
+
size={size}
|
|
132
|
+
/>
|
|
133
|
+
</Tooltip.Trigger>
|
|
135
134
|
))}
|
|
136
135
|
|
|
137
136
|
{members.length > 3 && (
|
|
138
|
-
<
|
|
139
|
-
<
|
|
137
|
+
<Popover.Root>
|
|
138
|
+
<Popover.Trigger className='grid focus:outline-none'>
|
|
140
139
|
<Avatar.Root>
|
|
141
140
|
{/* TODO(wittjosiah): Make text fit. */}
|
|
142
141
|
<Avatar.Content
|
|
@@ -146,10 +145,10 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
146
145
|
size={size}
|
|
147
146
|
/>
|
|
148
147
|
</Avatar.Root>
|
|
149
|
-
</
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
<
|
|
148
|
+
</Popover.Trigger>
|
|
149
|
+
<Popover.Portal>
|
|
150
|
+
<Popover.Content side='bottom'>
|
|
151
|
+
<Popover.Arrow />
|
|
153
152
|
<List classNames='max-h-56 overflow-y-auto'>
|
|
154
153
|
{members.map((member) => (
|
|
155
154
|
<ListItem.Root
|
|
@@ -163,9 +162,9 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
163
162
|
</ListItem.Root>
|
|
164
163
|
))}
|
|
165
164
|
</List>
|
|
166
|
-
</
|
|
167
|
-
</
|
|
168
|
-
</
|
|
165
|
+
</Popover.Content>
|
|
166
|
+
</Popover.Portal>
|
|
167
|
+
</Popover.Root>
|
|
169
168
|
)}
|
|
170
169
|
</div>
|
|
171
170
|
);
|
|
@@ -219,7 +218,7 @@ export const SmallPresenceLive = ({ id, open, viewers }: SmallPresenceLiveProps)
|
|
|
219
218
|
const attended = useAttended();
|
|
220
219
|
const startOfAttention = attended.at(-1);
|
|
221
220
|
const path = usePath(graph, startOfAttention);
|
|
222
|
-
const containsAttended = !open && !isAttended && id && path ? path.includes(id) : false;
|
|
221
|
+
const containsAttended = !open && !isAttended && id && Option.isSome(path) ? path.value.includes(id) : false;
|
|
223
222
|
|
|
224
223
|
const getActiveViewers = (viewers: ComplexMap<PublicKey, ObjectViewerProps>): ObjectViewerProps[] => {
|
|
225
224
|
const moment = Date.now();
|
|
@@ -251,21 +250,13 @@ export const SmallPresence = ({ count = 0, attended, containsAttended }: SmallPr
|
|
|
251
250
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
252
251
|
|
|
253
252
|
return (
|
|
254
|
-
<Tooltip.
|
|
255
|
-
<
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
</Tooltip.Trigger>
|
|
263
|
-
<Tooltip.Portal>
|
|
264
|
-
<Tooltip.Content side='bottom'>
|
|
265
|
-
<span>{t('presence label', { count })}</span>
|
|
266
|
-
<Tooltip.Arrow />
|
|
267
|
-
</Tooltip.Content>
|
|
268
|
-
</Tooltip.Portal>
|
|
269
|
-
</Tooltip.Root>
|
|
253
|
+
<Tooltip.Trigger asChild content={t('presence label', { count })} side='bottom'>
|
|
254
|
+
<AttentionGlyph
|
|
255
|
+
attended={attended}
|
|
256
|
+
containsAttended={containsAttended}
|
|
257
|
+
presence={count > 1 ? 'many' : count === 1 ? 'one' : 'none'}
|
|
258
|
+
classNames='self-center mie-1'
|
|
259
|
+
/>
|
|
260
|
+
</Tooltip.Trigger>
|
|
270
261
|
);
|
|
271
262
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { pipe, Schema
|
|
5
|
+
import { pipe, Schema } from 'effect';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { chain, createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
@@ -25,7 +25,9 @@ import { StackItem } from '@dxos/react-ui-stack';
|
|
|
25
25
|
import { SPACE_PLUGIN } from '../../meta';
|
|
26
26
|
import { SpaceAction, SpaceForm } from '../../types';
|
|
27
27
|
|
|
28
|
-
const FormSchema = SpaceForm.pipe(
|
|
28
|
+
const FormSchema = SpaceForm.pipe(
|
|
29
|
+
Schema.extend(Schema.Struct({ archived: Schema.Boolean.annotations({ title: 'Archive space' }) })),
|
|
30
|
+
);
|
|
29
31
|
|
|
30
32
|
export type SpaceSettingsContainerProps = {
|
|
31
33
|
space: Space;
|
|
@@ -54,7 +56,7 @@ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) =
|
|
|
54
56
|
);
|
|
55
57
|
|
|
56
58
|
const handleSave = useCallback(
|
|
57
|
-
(properties:
|
|
59
|
+
(properties: Schema.Schema.Type<typeof FormSchema>) => {
|
|
58
60
|
void toggleEdgeReplication(properties.edgeReplication);
|
|
59
61
|
if (properties.name !== space.properties.name) {
|
|
60
62
|
space.properties.name = properties.name;
|