@dxos/plugin-space 0.8.2-main.fbd8ed0 → 0.8.2-staging.7ac8446
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs +315 -0
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-VRU57AEZ.mjs → app-graph-serializer-DSF2U3A5.mjs} +10 -10
- package/dist/lib/browser/app-graph-serializer-DSF2U3A5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UBSVH2NQ.mjs → chunk-5BDV575R.mjs} +10 -21
- package/dist/lib/browser/chunk-5BDV575R.mjs.map +7 -0
- package/dist/lib/browser/chunk-AYW4IDRT.mjs +275 -0
- package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-43UQWMD3.mjs → chunk-JZXWPMLA.mjs} +740 -390
- package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IQFFOAWD.mjs → chunk-LO5UL6RU.mjs} +173 -78
- package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-ANRJHNMQ.mjs → identity-created-JR7BNXFH.mjs} +5 -5
- package/dist/lib/browser/identity-created-JR7BNXFH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +47 -30
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-KRINV5QI.mjs → intent-resolver-RKYILWWQ.mjs} +106 -98
- package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-J3SP2HVW.mjs → react-root-6H7NX2M2.mjs} +4 -5
- package/dist/lib/{node-esm/react-root-S2LW4FS7.mjs.map → browser/react-root-6H7NX2M2.mjs.map} +1 -1
- package/dist/lib/browser/{react-surface-J7T2IMH4.mjs → react-surface-7AGLOVMK.mjs} +53 -120
- package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +7 -0
- package/dist/lib/browser/schema-FHTA26SW.mjs +24 -0
- package/dist/lib/browser/schema-FHTA26SW.mjs.map +7 -0
- package/dist/lib/browser/{schema-tools-MYC4LTQD.mjs → schema-tools-YAXPRIXP.mjs} +22 -22
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +7 -0
- package/dist/lib/browser/{settings-G24447B7.mjs → settings-PJPTJUPE.mjs} +4 -4
- package/dist/lib/browser/settings-PJPTJUPE.mjs.map +7 -0
- package/dist/lib/browser/{spaces-ready-5I3RKYTT.mjs → spaces-ready-BSSP7HHG.mjs} +17 -18
- package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +7 -0
- package/dist/lib/browser/{state-SI4B5GHC.mjs → state-X7VLCC6E.mjs} +4 -2
- package/dist/lib/browser/state-X7VLCC6E.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -7
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs +318 -0
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-VLBCR3IX.cjs → app-graph-serializer-JELGJUAY.cjs} +22 -22
- package/dist/lib/node/app-graph-serializer-JELGJUAY.cjs.map +7 -0
- package/dist/lib/node/{chunk-MXBE2VET.cjs → chunk-3GKCNADA.cjs} +751 -412
- package/dist/lib/node/chunk-3GKCNADA.cjs.map +7 -0
- package/dist/lib/node/{chunk-5YHUQJVB.cjs → chunk-PU2EYH4E.cjs} +14 -25
- package/dist/lib/node/chunk-PU2EYH4E.cjs.map +7 -0
- package/dist/lib/node/{chunk-SCATWJKX.cjs → chunk-TUZWEPGX.cjs} +198 -100
- package/dist/lib/node/chunk-TUZWEPGX.cjs.map +7 -0
- package/dist/lib/node/chunk-WDEIFDTX.cjs +300 -0
- package/dist/lib/node/chunk-WDEIFDTX.cjs.map +7 -0
- package/dist/lib/node/{identity-created-NIPYGVG3.cjs → identity-created-XU4HFV2T.cjs} +7 -7
- package/dist/lib/node/identity-created-XU4HFV2T.cjs.map +7 -0
- package/dist/lib/node/index.cjs +97 -79
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-MJVRY6YE.cjs → intent-resolver-VJ7YV74L.cjs} +151 -144
- package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-M4BZ6VXB.cjs → react-root-TEL5RW3N.cjs} +8 -9
- package/dist/lib/node/{react-root-M4BZ6VXB.cjs.map → react-root-TEL5RW3N.cjs.map} +1 -1
- package/dist/lib/node/{react-surface-RYKSYYKM.cjs → react-surface-2H3S5TY5.cjs} +75 -142
- package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +7 -0
- package/dist/lib/node/{schema-defs-2HJLXSNK.cjs → schema-PPJ5BZ3A.cjs} +11 -13
- package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +7 -0
- package/dist/lib/node/{schema-tools-OE3MFYYH.cjs → schema-tools-BLIMOZYY.cjs} +24 -24
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +7 -0
- package/dist/lib/node/{settings-AFWO4AWK.cjs → settings-WVFP2UEP.cjs} +7 -7
- package/dist/lib/node/settings-WVFP2UEP.cjs.map +7 -0
- package/dist/lib/node/{spaces-ready-BMPXSFHF.cjs → spaces-ready-7DNZSUOG.cjs} +24 -25
- package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +7 -0
- package/dist/lib/node/{state-L2ZSDKLS.cjs → state-5KX6WBJH.cjs} +7 -5
- package/dist/lib/node/state-5KX6WBJH.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +12 -18
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs +316 -0
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-GEUYYXKD.mjs → app-graph-serializer-FXONFKOE.mjs} +10 -10
- package/dist/lib/node-esm/app-graph-serializer-FXONFKOE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-5NIBYPVF.mjs → chunk-3ZOUV4DF.mjs} +10 -21
- package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FI3WV22Y.mjs → chunk-BEWBZ4Q4.mjs} +740 -390
- package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs +276 -0
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-S2W6HS4A.mjs → chunk-ZGLK25WQ.mjs} +173 -78
- package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-O5X2FFWU.mjs → identity-created-WJKAS2PV.mjs} +5 -5
- package/dist/lib/node-esm/identity-created-WJKAS2PV.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +47 -30
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-JT6EB47M.mjs → intent-resolver-ZFNSA4CM.mjs} +106 -98
- package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-S2LW4FS7.mjs → react-root-PRBJMWLQ.mjs} +4 -5
- package/dist/lib/node-esm/{react-surface-ZNNMO7QQ.mjs → react-surface-RCZG2PNF.mjs} +53 -120
- package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +7 -0
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs +25 -0
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-tools-YTJLA3NQ.mjs → schema-tools-IU7EX5A5.mjs} +22 -22
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-MJVSCOI4.mjs → settings-FJZPC2TV.mjs} +4 -4
- package/dist/lib/node-esm/settings-FJZPC2TV.mjs.map +7 -0
- package/dist/lib/node-esm/{spaces-ready-XKG57SL5.mjs → spaces-ready-7X5PGB2V.mjs} +17 -18
- package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +7 -0
- package/dist/lib/node-esm/{state-QUDYGEU6.mjs → state-Z6E2YTNC.mjs} +4 -2
- package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -7
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +179 -2
- 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 +184 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +3 -4
- 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-tools.d.ts +2 -2
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema.d.ts +4 -0
- package/dist/types/src/capabilities/schema.d.ts.map +1 -0
- 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 +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/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 → ObjectSettingsContainer}/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/BaseObjectSettings.d.ts +2 -2
- 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/{ObjectSettings → ObjectSettingsContainer}/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverAddSpace.d.ts +4 -0
- package/dist/types/src/components/PopoverAddSpace.d.ts.map +1 -0
- package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/ShareSpaceButton.d.ts +9 -0
- package/dist/types/src/components/ShareSpaceButton.d.ts.map +1 -0
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts +10 -0
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.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 +2 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/index.d.ts +1 -0
- package/dist/types/src/components/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/Space.d.ts +13 -0
- package/dist/types/src/components/SyncStatus/Space.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +8 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts +9 -0
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts.map +1 -0
- 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/SyncStatus/sync-state.d.ts +18 -0
- package/dist/types/src/components/SyncStatus/sync-state.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +2 -3
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +242 -17
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/collection.d.ts +8 -9
- package/dist/types/src/types/collection.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +110 -205
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +146 -157
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +20 -36
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -51
- package/src/SpacePlugin.tsx +20 -11
- package/src/capabilities/app-graph-builder.ts +230 -377
- package/src/capabilities/app-graph-serializer.ts +8 -8
- package/src/capabilities/identity-created.ts +5 -5
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/intent-resolver.ts +110 -94
- package/src/capabilities/react-surface.tsx +50 -111
- package/src/capabilities/schema-tool.test.ts +3 -2
- package/src/capabilities/schema-tools.ts +25 -25
- package/src/capabilities/schema.ts +27 -0
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +14 -16
- package/src/capabilities/state.ts +5 -3
- package/src/components/AwaitingObject.tsx +1 -1
- package/src/components/CollectionMain.tsx +5 -2
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +4 -4
- package/src/components/CreateDialog/CreateObjectDialog.tsx +4 -4
- package/src/components/CreateDialog/CreateObjectPanel.tsx +25 -3
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +3 -6
- package/src/components/MembersContainer.stories.tsx +5 -1
- package/src/components/MembersContainer.tsx +54 -80
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/{ObjectSettings → ObjectSettingsContainer}/AdvancedObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettings → ObjectSettingsContainer}/BaseObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettings → ObjectSettingsContainer}/ObjectSettingsContainer.tsx +4 -4
- package/src/components/PersistenceStatus.tsx +14 -11
- package/src/components/PopoverAddSpace.tsx +46 -0
- package/src/components/PopoverRenameObject.tsx +8 -14
- package/src/components/PopoverRenameSpace.tsx +0 -8
- package/src/components/ShareSpaceButton.stories.tsx +27 -0
- package/src/components/ShareSpaceButton.tsx +32 -0
- package/src/components/SpacePluginSettings.tsx +2 -27
- package/src/components/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence.tsx +65 -60
- package/src/components/SpaceSettings/{SpaceSettingsContainer.stories.tsx → SpacePropertiesForm.stories.tsx} +6 -6
- package/src/components/SpaceSettings/SpacePropertiesForm.tsx +136 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +39 -159
- package/src/components/SpaceSettings/index.ts +1 -0
- package/src/components/SyncStatus/InlineSyncStatus.tsx +24 -15
- package/src/components/SyncStatus/Space.tsx +133 -0
- package/src/components/SyncStatus/SyncStatus.tsx +69 -6
- package/src/components/SyncStatus/SyncStatusDetail.stories.tsx +89 -0
- package/src/components/SyncStatus/sync-state.ts +101 -0
- package/src/components/index.ts +3 -2
- package/src/hooks/index.ts +0 -2
- package/src/hooks/usePath.ts +6 -9
- package/src/index.ts +0 -1
- package/src/translations.ts +7 -19
- package/src/types/collection.ts +4 -6
- package/src/types/thread.ts +8 -14
- package/src/types/types.ts +101 -115
- package/src/util.tsx +172 -75
- package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs +0 -328
- package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-VRU57AEZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-43UQWMD3.mjs.map +0 -7
- package/dist/lib/browser/chunk-AR5R2F6B.mjs +0 -88
- package/dist/lib/browser/chunk-AR5R2F6B.mjs.map +0 -7
- package/dist/lib/browser/chunk-CY35NLWL.mjs +0 -296
- package/dist/lib/browser/chunk-CY35NLWL.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQFFOAWD.mjs.map +0 -7
- package/dist/lib/browser/chunk-UBSVH2NQ.mjs.map +0 -7
- package/dist/lib/browser/identity-created-ANRJHNMQ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-KRINV5QI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-J7T2IMH4.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-OCBY7APN.mjs +0 -26
- package/dist/lib/browser/schema-defs-OCBY7APN.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-MYC4LTQD.mjs.map +0 -7
- package/dist/lib/browser/settings-G24447B7.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-5I3RKYTT.mjs.map +0 -7
- package/dist/lib/browser/state-SI4B5GHC.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs +0 -328
- package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-VLBCR3IX.cjs.map +0 -7
- package/dist/lib/node/chunk-5YHUQJVB.cjs.map +0 -7
- package/dist/lib/node/chunk-DQN4ZQDW.cjs +0 -119
- package/dist/lib/node/chunk-DQN4ZQDW.cjs.map +0 -7
- package/dist/lib/node/chunk-K6ZO4WDJ.cjs +0 -324
- package/dist/lib/node/chunk-K6ZO4WDJ.cjs.map +0 -7
- package/dist/lib/node/chunk-MXBE2VET.cjs.map +0 -7
- package/dist/lib/node/chunk-SCATWJKX.cjs.map +0 -7
- package/dist/lib/node/identity-created-NIPYGVG3.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-MJVRY6YE.cjs.map +0 -7
- package/dist/lib/node/react-surface-RYKSYYKM.cjs.map +0 -7
- package/dist/lib/node/schema-defs-2HJLXSNK.cjs.map +0 -7
- package/dist/lib/node/schema-tools-OE3MFYYH.cjs.map +0 -7
- package/dist/lib/node/settings-AFWO4AWK.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-BMPXSFHF.cjs.map +0 -7
- package/dist/lib/node/state-L2ZSDKLS.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs +0 -329
- package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-GEUYYXKD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5NIBYPVF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CLRCW6PU.mjs +0 -297
- package/dist/lib/node-esm/chunk-CLRCW6PU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FI3WV22Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HNKAG5CX.mjs +0 -90
- package/dist/lib/node-esm/chunk-HNKAG5CX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-S2W6HS4A.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-O5X2FFWU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-JT6EB47M.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ZNNMO7QQ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-YTJLA3NQ.mjs.map +0 -7
- package/dist/lib/node-esm/settings-MJVSCOI4.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-XKG57SL5.mjs.map +0 -7
- package/dist/lib/node-esm/state-QUDYGEU6.mjs.map +0 -7
- package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
- package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/SchemaContainer.d.ts +0 -13
- package/dist/types/src/components/SchemaContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +0 -4
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +0 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +0 -14
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +0 -1
- package/src/capabilities/schema-defs.ts +0 -30
- package/src/components/SchemaContainer.tsx +0 -59
- package/src/hooks/useActiveSpace.ts +0 -20
- package/src/hooks/useInputSurfaceLookup.tsx +0 -31
- /package/dist/lib/{browser/react-root-J3SP2HVW.mjs.map → node-esm/react-root-PRBJMWLQ.mjs.map} +0 -0
- /package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/ForeignKeys.d.ts +0 -0
- /package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/index.d.ts +0 -0
- /package/src/components/{ObjectSettings → ObjectSettingsContainer}/ForeignKeys.tsx +0 -0
- /package/src/components/{ObjectSettings → ObjectSettingsContainer}/index.ts +0 -0
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Check, X } from '@phosphor-icons/react';
|
|
6
|
-
import React, { type Dispatch, type SetStateAction,
|
|
6
|
+
import React, { type Dispatch, type SetStateAction, useMemo, useState } from 'react';
|
|
7
7
|
import { QR } from 'react-qr-rounded';
|
|
8
8
|
|
|
9
|
-
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
10
9
|
import { log } from '@dxos/log';
|
|
11
10
|
import { useConfig } from '@dxos/react-client';
|
|
12
11
|
import { fullyQualifiedId, useSpaceInvitations, type Space } from '@dxos/react-client/echo';
|
|
13
12
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
14
|
-
import { Button, Clipboard, Icon,
|
|
15
|
-
import {
|
|
13
|
+
import { Button, Clipboard, Icon, useId, useTranslation } from '@dxos/react-ui';
|
|
14
|
+
import { ControlSection, ControlFrame, ControlFrameItem } from '@dxos/react-ui-form';
|
|
16
15
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
17
16
|
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
18
17
|
import {
|
|
@@ -28,8 +27,7 @@ import {
|
|
|
28
27
|
import { hexToEmoji } from '@dxos/util';
|
|
29
28
|
|
|
30
29
|
import { SPACE_PLUGIN } from '../meta';
|
|
31
|
-
import { CollectionType
|
|
32
|
-
import { COMPOSER_SPACE_LOCK } from '../util';
|
|
30
|
+
import { CollectionType } from '../types';
|
|
33
31
|
|
|
34
32
|
// TODO(wittjosiah): Copied from Shell.
|
|
35
33
|
const activeActionKey = 'dxos:react-shell/space-manager/active-action';
|
|
@@ -49,9 +47,8 @@ export const MembersContainer = ({
|
|
|
49
47
|
space: Space;
|
|
50
48
|
createInvitationUrl: (invitationCode: string) => string;
|
|
51
49
|
}) => {
|
|
52
|
-
const { t } = useTranslation(
|
|
50
|
+
const { t } = useTranslation('os');
|
|
53
51
|
const config = useConfig();
|
|
54
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
55
52
|
const invitations = useSpaceInvitations(space.key);
|
|
56
53
|
const visibleInvitations = invitations?.filter(
|
|
57
54
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -67,28 +64,20 @@ export const MembersContainer = ({
|
|
|
67
64
|
// TODO(wittjosiah): Track which was the most recently viewed object.
|
|
68
65
|
const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
|
|
69
66
|
|
|
70
|
-
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
71
|
-
const handleChangeLocked = useCallback(() => {
|
|
72
|
-
space.properties[COMPOSER_SPACE_LOCK] = !locked;
|
|
73
|
-
}, [locked, space]);
|
|
74
|
-
|
|
75
67
|
const inviteActions = useMemo(
|
|
76
68
|
(): Record<string, ActionMenuItem> => ({
|
|
77
69
|
inviteOne: {
|
|
78
|
-
label: t('invite one label'
|
|
79
|
-
description: t('invite one description'
|
|
70
|
+
label: t('invite one label'),
|
|
71
|
+
description: t('invite one description'),
|
|
80
72
|
icon: () => <Icon icon='ph--user-plus--regular' size={5} />,
|
|
81
73
|
testId: 'membersContainer.inviteOne',
|
|
82
|
-
onClick:
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
target: target && fullyQualifiedId(target),
|
|
90
|
-
}),
|
|
91
|
-
);
|
|
74
|
+
onClick: () => {
|
|
75
|
+
const invitation = space.share?.({
|
|
76
|
+
type: Invitation.Type.INTERACTIVE,
|
|
77
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
78
|
+
multiUse: false,
|
|
79
|
+
target: target && fullyQualifiedId(target),
|
|
80
|
+
});
|
|
92
81
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
93
82
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
94
83
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -97,20 +86,17 @@ export const MembersContainer = ({
|
|
|
97
86
|
},
|
|
98
87
|
},
|
|
99
88
|
inviteMany: {
|
|
100
|
-
label: t('invite many label'
|
|
101
|
-
description: t('invite many description'
|
|
89
|
+
label: t('invite many label'),
|
|
90
|
+
description: t('invite many description'),
|
|
102
91
|
icon: () => <Icon icon='ph--users-three--regular' size={5} />,
|
|
103
92
|
testId: 'membersContainer.inviteMany',
|
|
104
|
-
onClick:
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
target: target && fullyQualifiedId(target),
|
|
112
|
-
}),
|
|
113
|
-
);
|
|
93
|
+
onClick: () => {
|
|
94
|
+
const invitation = space.share?.({
|
|
95
|
+
type: Invitation.Type.DELEGATED,
|
|
96
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
97
|
+
multiUse: true,
|
|
98
|
+
target: target && fullyQualifiedId(target),
|
|
99
|
+
});
|
|
114
100
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
115
101
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
116
102
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -132,50 +118,38 @@ export const MembersContainer = ({
|
|
|
132
118
|
|
|
133
119
|
return (
|
|
134
120
|
<Clipboard.Provider>
|
|
135
|
-
<StackItem.Content classNames='block overflow-y-auto'>
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
onChangeActiveAction={setActiveAction as Dispatch<SetStateAction<string>>}
|
|
164
|
-
data-testid='membersContainer.createInvitation'
|
|
165
|
-
/>
|
|
166
|
-
</>
|
|
167
|
-
)}
|
|
168
|
-
</ControlFrameItem>
|
|
121
|
+
<StackItem.Content classNames='p-2 block overflow-y-auto'>
|
|
122
|
+
<ControlSection
|
|
123
|
+
title={t('members verbose label', { ns: SPACE_PLUGIN })}
|
|
124
|
+
description={t('members description', { ns: SPACE_PLUGIN })}
|
|
125
|
+
>
|
|
126
|
+
<ControlFrame>
|
|
127
|
+
<ControlFrameItem title={t('members label', { ns: SPACE_PLUGIN })}>
|
|
128
|
+
<SpaceMemberList spaceKey={space.key} includeSelf />
|
|
129
|
+
</ControlFrameItem>
|
|
130
|
+
<ControlFrameItem title={t('invitations label', { ns: SPACE_PLUGIN })}>
|
|
131
|
+
{selectedInvitation && <InvitationSection {...selectedInvitation} onBack={handleBack} />}
|
|
132
|
+
{!selectedInvitation && (
|
|
133
|
+
<>
|
|
134
|
+
<p className='text-description mbe-2'>{t('space invitation description', { ns: SPACE_PLUGIN })}</p>
|
|
135
|
+
<InvitationList
|
|
136
|
+
className='mb-2'
|
|
137
|
+
send={handleSend}
|
|
138
|
+
invitations={visibleInvitations ?? []}
|
|
139
|
+
onClickRemove={(invitation) => invitation.cancel()}
|
|
140
|
+
createInvitationUrl={createInvitationUrl}
|
|
141
|
+
/>
|
|
142
|
+
<BifurcatedAction
|
|
143
|
+
actions={inviteActions}
|
|
144
|
+
activeAction={activeAction}
|
|
145
|
+
onChangeActiveAction={setActiveAction as Dispatch<SetStateAction<string>>}
|
|
146
|
+
data-testid='membersContainer.createInvitation'
|
|
147
|
+
/>
|
|
148
|
+
</>
|
|
169
149
|
)}
|
|
170
|
-
</
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
<ControlItemInput title={t('space locked label')} description={t('space locked description')}>
|
|
174
|
-
<Input.Switch checked={locked} onCheckedChange={handleChangeLocked} classNames='justify-self-end' />
|
|
175
|
-
</ControlItemInput>
|
|
176
|
-
</div>
|
|
177
|
-
</ControlSection>
|
|
178
|
-
</ControlPage>
|
|
150
|
+
</ControlFrameItem>
|
|
151
|
+
</ControlFrame>
|
|
152
|
+
</ControlSection>
|
|
179
153
|
</StackItem.Content>
|
|
180
154
|
</Clipboard.Provider>
|
|
181
155
|
);
|
|
@@ -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 ReactiveEchoObject, 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: ReactiveEchoObject<any> }) => {
|
|
16
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
17
|
const client = useClient();
|
|
18
18
|
const space = getSpace(object);
|
package/src/components/{ObjectSettings → ObjectSettingsContainer}/AdvancedObjectSettings.tsx
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ForeignKey, ForeignKeySchema } from '@dxos/echo-schema';
|
|
8
|
-
import { getMeta, type
|
|
8
|
+
import { getMeta, type ReactiveEchoObject } 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: ReactiveEchoObject<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 ReactiveEchoObject } 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: ReactiveEchoObject<any>;
|
|
16
16
|
}>
|
|
17
17
|
>;
|
|
18
18
|
|
package/src/components/{ObjectSettings → ObjectSettingsContainer}/ObjectSettingsContainer.tsx
RENAMED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework';
|
|
8
|
-
import { type
|
|
8
|
+
import { type ReactiveEchoObject } 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';
|
|
12
13
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
13
14
|
|
|
14
15
|
export type ObjectSettingsContainerProps = {
|
|
15
|
-
object:
|
|
16
|
+
object: ReactiveEchoObject<any>;
|
|
16
17
|
role: string;
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -27,8 +28,7 @@ export const ObjectSettingsContainer = ({ object, role }: ObjectSettingsContaine
|
|
|
27
28
|
<Surface role='base-object-settings' data={data} />
|
|
28
29
|
</BaseObjectSettings>
|
|
29
30
|
<Surface role='object-settings' data={data} />
|
|
30
|
-
{
|
|
31
|
-
{/* <AdvancedObjectSettings object={object} /> */}
|
|
31
|
+
<AdvancedObjectSettings object={object} />
|
|
32
32
|
</div>
|
|
33
33
|
</StackItem.Content>
|
|
34
34
|
</Clipboard.Provider>
|
|
@@ -68,17 +68,20 @@ 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
|
-
|
|
71
|
+
<Tooltip.Root delayDuration={400}>
|
|
72
|
+
<Tooltip.Trigger role='status' className='flex items-center'>
|
|
73
|
+
<CheckCircle className={mx(getSize(4), 'me-1')} />
|
|
74
|
+
{displayMessage && (
|
|
75
|
+
<span className={mx('text-sm', staticPlaceholderText)}>{t('persisted locally label')}</span>
|
|
76
|
+
)}
|
|
77
|
+
</Tooltip.Trigger>
|
|
78
|
+
<Tooltip.Portal>
|
|
79
|
+
<Tooltip.Content>
|
|
80
|
+
{t('persisted locally message')}
|
|
81
|
+
<Tooltip.Arrow />
|
|
82
|
+
</Tooltip.Content>
|
|
83
|
+
</Tooltip.Portal>
|
|
84
|
+
</Tooltip.Root>
|
|
82
85
|
);
|
|
83
86
|
}
|
|
84
87
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
|
|
10
|
+
import { SPACE_PLUGIN } from '../meta';
|
|
11
|
+
import { SpaceAction } from '../types';
|
|
12
|
+
|
|
13
|
+
export const POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
14
|
+
|
|
15
|
+
export const PopoverAddSpace = () => {
|
|
16
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
18
|
+
return (
|
|
19
|
+
<div role='none' className='grid grid-cols-1 gap-1 [&>button]:justify-start'>
|
|
20
|
+
<IconButton
|
|
21
|
+
variant='ghost'
|
|
22
|
+
label={t('create space label')}
|
|
23
|
+
icon='ph--plus--regular'
|
|
24
|
+
onClick={() => {
|
|
25
|
+
void dispatch(createIntent(SpaceAction.OpenCreateSpace));
|
|
26
|
+
void dispatch(
|
|
27
|
+
createIntent(LayoutAction.UpdatePopover, { part: 'popover', options: { anchorId: '', state: false } }),
|
|
28
|
+
);
|
|
29
|
+
}}
|
|
30
|
+
data-testid='spacePlugin.createSpace'
|
|
31
|
+
/>
|
|
32
|
+
<IconButton
|
|
33
|
+
variant='ghost'
|
|
34
|
+
label={t('join space label')}
|
|
35
|
+
icon='ph--sign-in--regular'
|
|
36
|
+
onClick={() => {
|
|
37
|
+
void dispatch(createIntent(SpaceAction.Join));
|
|
38
|
+
void dispatch(
|
|
39
|
+
createIntent(LayoutAction.UpdatePopover, { part: 'popover', options: { anchorId: '', state: false } }),
|
|
40
|
+
);
|
|
41
|
+
}}
|
|
42
|
+
data-testid='spacePlugin.joinSpace'
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -4,23 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { type Live } from '@dxos/live-object';
|
|
7
|
+
import { type ReactiveObject } from '@dxos/live-object';
|
|
9
8
|
import { log } from '@dxos/log';
|
|
10
|
-
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
11
10
|
|
|
12
11
|
import { SPACE_PLUGIN } from '../meta';
|
|
13
12
|
|
|
14
13
|
export const POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
15
14
|
|
|
16
|
-
export const PopoverRenameObject = ({ object: obj }: { object:
|
|
15
|
+
export const PopoverRenameObject = ({ object: obj }: { object: ReactiveObject<any> }) => {
|
|
17
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
18
17
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
19
18
|
// TODO(wittjosiah): Use schema here.
|
|
20
19
|
const object = obj as any;
|
|
21
20
|
// TODO(burdon): Field should not be hardcoded field.
|
|
22
21
|
const [name, setName] = useState(object.name || object.title || '');
|
|
23
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
24
22
|
|
|
25
23
|
const handleDone = useCallback(() => {
|
|
26
24
|
try {
|
|
@@ -32,12 +30,6 @@ export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
|
32
30
|
log.error('Failed to rename object', { err });
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
void dispatch(
|
|
36
|
-
createIntent(LayoutAction.UpdatePopover, {
|
|
37
|
-
part: 'popover',
|
|
38
|
-
options: { variant: 'react', anchorId: '', state: false },
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
33
|
}, [object, name]);
|
|
42
34
|
|
|
43
35
|
return (
|
|
@@ -54,9 +46,11 @@ export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
|
54
46
|
/>
|
|
55
47
|
</Input.Root>
|
|
56
48
|
</div>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
<Popover.Close asChild>
|
|
50
|
+
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
51
|
+
{t('done label', { ns: 'os' })}
|
|
52
|
+
</Button>
|
|
53
|
+
</Popover.Close>
|
|
60
54
|
</div>
|
|
61
55
|
);
|
|
62
56
|
};
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
7
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
8
|
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
10
9
|
|
|
@@ -16,16 +15,9 @@ export const PopoverRenameSpace = ({ space }: { space: Space }) => {
|
|
|
16
15
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
16
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
18
17
|
const [name, setName] = useState(space.properties.name ?? '');
|
|
19
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
18
|
|
|
21
19
|
const handleDone = useCallback(() => {
|
|
22
20
|
space.properties.name = name;
|
|
23
|
-
void dispatch(
|
|
24
|
-
createIntent(LayoutAction.UpdatePopover, {
|
|
25
|
-
part: 'popover',
|
|
26
|
-
options: { variant: 'react', anchorId: '', state: false },
|
|
27
|
-
}),
|
|
28
|
-
);
|
|
29
21
|
}, [space, name]);
|
|
30
22
|
|
|
31
23
|
// TODO(thure): Why does the input value need to be uncontrolled to work?
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxos-theme';
|
|
6
|
+
|
|
7
|
+
import { type Meta } from '@storybook/react';
|
|
8
|
+
|
|
9
|
+
import { withTheme } from '@dxos/storybook-utils';
|
|
10
|
+
|
|
11
|
+
import { ShareSpaceButtonImpl } from './ShareSpaceButton';
|
|
12
|
+
import translations from '../translations';
|
|
13
|
+
|
|
14
|
+
export const Default = {
|
|
15
|
+
args: {
|
|
16
|
+
onClick: () => console.log('clicked'),
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const meta: Meta = {
|
|
21
|
+
title: 'plugins/plugin-space/ShareSpaceButton',
|
|
22
|
+
component: ShareSpaceButtonImpl,
|
|
23
|
+
decorators: [withTheme],
|
|
24
|
+
parameters: { translations },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default meta;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
+
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
|
|
11
|
+
import { SPACE_PLUGIN } from '../meta';
|
|
12
|
+
import { SpaceAction } from '../types';
|
|
13
|
+
|
|
14
|
+
export const ShareSpaceButton = ({ space }: { space: Space }) => {
|
|
15
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
16
|
+
|
|
17
|
+
return <ShareSpaceButtonImpl onClick={() => dispatch(createIntent(SpaceAction.Share, { space }))} />;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// TODO(wittjosiah): Better way to name pure/impure components?
|
|
21
|
+
export const ShareSpaceButtonImpl = ({ onClick }: { onClick: () => void }) => {
|
|
22
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<IconButton
|
|
26
|
+
data-testid='spacePlugin.shareSpaceButton'
|
|
27
|
+
icon='ph--users--regular'
|
|
28
|
+
label={t('share space label')}
|
|
29
|
+
onClick={onClick}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -4,45 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { useClient } from '@dxos/react-client';
|
|
9
|
-
import { useSpaces } from '@dxos/react-client/echo';
|
|
10
|
-
import { Input, toLocalizedString, useTranslation, List, ListItem, Button } from '@dxos/react-ui';
|
|
7
|
+
import { Input, useTranslation } from '@dxos/react-ui';
|
|
11
8
|
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
12
9
|
|
|
13
10
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
|
-
import {
|
|
15
|
-
import { getSpaceDisplayName } from '../util';
|
|
11
|
+
import { type SpaceSettingsProps } from '../types';
|
|
16
12
|
|
|
17
13
|
export const SpacePluginSettings = ({ settings }: { settings: SpaceSettingsProps }) => {
|
|
18
14
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
19
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
-
const client = useClient();
|
|
21
|
-
const spaces = useSpaces({ all: settings.showHidden });
|
|
22
15
|
|
|
23
|
-
// TODO(wittjosiah): Migrate to new form container.
|
|
24
16
|
return (
|
|
25
17
|
<DeprecatedFormContainer>
|
|
26
18
|
<DeprecatedFormInput label={t('show hidden spaces label')}>
|
|
27
19
|
<Input.Switch checked={settings.showHidden} onCheckedChange={(checked) => (settings.showHidden = !!checked)} />
|
|
28
20
|
</DeprecatedFormInput>
|
|
29
|
-
<div role='none'>
|
|
30
|
-
<h2 className='text-xl my-4'>Space Settings</h2>
|
|
31
|
-
<List classNames='max-w-md mx-auto'>
|
|
32
|
-
{spaces.map((space) => (
|
|
33
|
-
<ListItem.Root key={space.id}>
|
|
34
|
-
<ListItem.Heading classNames='flex flex-col grow truncate mbe-2'>
|
|
35
|
-
{toLocalizedString(getSpaceDisplayName(space, { personal: space === client.spaces.default }), t)}
|
|
36
|
-
</ListItem.Heading>
|
|
37
|
-
<ListItem.Endcap>
|
|
38
|
-
<Button onClick={() => dispatch(createIntent(SpaceAction.OpenSettings, { space }))}>
|
|
39
|
-
{t('open space settings label')}
|
|
40
|
-
</Button>
|
|
41
|
-
</ListItem.Endcap>
|
|
42
|
-
</ListItem.Root>
|
|
43
|
-
))}
|
|
44
|
-
</List>
|
|
45
|
-
</div>
|
|
46
21
|
</DeprecatedFormContainer>
|
|
47
22
|
);
|
|
48
23
|
};
|
|
@@ -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({ tooltips: true })],
|
|
104
104
|
parameters: { translations },
|
|
105
105
|
};
|
|
106
106
|
|