@dxos/plugin-space 0.8.2-staging.7ac8446 → 0.8.2
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-DCWUULKX.mjs +328 -0
- package/dist/lib/browser/app-graph-builder-DCWUULKX.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-DSF2U3A5.mjs → app-graph-serializer-MLU7XI2P.mjs} +10 -10
- package/dist/lib/browser/app-graph-serializer-MLU7XI2P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KVRYWFZU.mjs → chunk-3LN4LJN6.mjs} +3 -8
- package/dist/lib/{node-esm/chunk-PIYAWT5N.mjs.map → browser/chunk-3LN4LJN6.mjs.map} +3 -3
- package/dist/lib/browser/chunk-7Y4M7GXO.mjs +94 -0
- package/dist/lib/browser/chunk-7Y4M7GXO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-LO5UL6RU.mjs → chunk-N5QMRLKI.mjs} +78 -173
- package/dist/lib/browser/chunk-N5QMRLKI.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q4BTFH2P.mjs +1900 -0
- package/dist/lib/browser/chunk-Q4BTFH2P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5BDV575R.mjs → chunk-VEBKN45O.mjs} +21 -10
- package/dist/lib/browser/chunk-VEBKN45O.mjs.map +7 -0
- package/dist/lib/browser/chunk-W46VVHFM.mjs +288 -0
- package/dist/lib/browser/chunk-W46VVHFM.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-JR7BNXFH.mjs → identity-created-O63SIYOF.mjs} +5 -5
- package/dist/lib/browser/identity-created-O63SIYOF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +34 -54
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-RKYILWWQ.mjs → intent-resolver-KBF3YU6I.mjs} +116 -108
- package/dist/lib/browser/intent-resolver-KBF3YU6I.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-6H7NX2M2.mjs → react-root-PVKJE4EZ.mjs} +6 -5
- package/dist/lib/browser/{react-surface-7AGLOVMK.mjs → react-surface-252P4NCK.mjs} +121 -54
- package/dist/lib/browser/react-surface-252P4NCK.mjs.map +7 -0
- package/dist/lib/browser/schema-defs-JMN74RNK.mjs +26 -0
- package/dist/lib/browser/schema-defs-JMN74RNK.mjs.map +7 -0
- package/dist/lib/browser/{schema-tools-YAXPRIXP.mjs → schema-tools-JIEMHUXV.mjs} +26 -26
- package/dist/lib/browser/schema-tools-JIEMHUXV.mjs.map +7 -0
- package/dist/lib/browser/{settings-PJPTJUPE.mjs → settings-2IN2WLUK.mjs} +4 -4
- package/dist/lib/browser/settings-2IN2WLUK.mjs.map +7 -0
- package/dist/lib/browser/{spaces-ready-BSSP7HHG.mjs → spaces-ready-L4QAGTDE.mjs} +20 -19
- package/dist/lib/browser/spaces-ready-L4QAGTDE.mjs.map +7 -0
- package/dist/lib/browser/{state-X7VLCC6E.mjs → state-6HOSHLIN.mjs} +3 -5
- package/dist/lib/browser/state-6HOSHLIN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -7
- package/dist/lib/node/app-graph-builder-WC445X77.cjs +328 -0
- package/dist/lib/node/app-graph-builder-WC445X77.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-JELGJUAY.cjs → app-graph-serializer-UPQOQVMJ.cjs} +22 -22
- package/dist/lib/node/app-graph-serializer-UPQOQVMJ.cjs.map +7 -0
- package/dist/lib/node/chunk-5WLAXYE3.cjs +125 -0
- package/dist/lib/node/chunk-5WLAXYE3.cjs.map +7 -0
- package/dist/lib/node/{chunk-IKIDS6XF.cjs → chunk-7GQGM4ZF.cjs} +7 -13
- package/dist/lib/node/{chunk-IKIDS6XF.cjs.map → chunk-7GQGM4ZF.cjs.map} +3 -3
- package/dist/lib/node/{chunk-TUZWEPGX.cjs → chunk-COQYISES.cjs} +100 -198
- package/dist/lib/node/chunk-COQYISES.cjs.map +7 -0
- package/dist/lib/node/{chunk-PU2EYH4E.cjs → chunk-DXL5TDFP.cjs} +25 -14
- package/dist/lib/node/chunk-DXL5TDFP.cjs.map +7 -0
- package/dist/lib/node/chunk-FXHI7JNY.cjs +315 -0
- package/dist/lib/node/chunk-FXHI7JNY.cjs.map +7 -0
- package/dist/lib/node/chunk-Q3YZEYZT.cjs +1904 -0
- package/dist/lib/node/chunk-Q3YZEYZT.cjs.map +7 -0
- package/dist/lib/node/{identity-created-XU4HFV2T.cjs → identity-created-UXEAUGC7.cjs} +7 -7
- package/dist/lib/node/identity-created-UXEAUGC7.cjs.map +7 -0
- package/dist/lib/node/index.cjs +83 -105
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VJ7YV74L.cjs → intent-resolver-SVFJKUH7.cjs} +161 -152
- package/dist/lib/node/intent-resolver-SVFJKUH7.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-TEL5RW3N.cjs → react-root-DDPDUMCG.cjs} +11 -10
- package/dist/lib/node/{react-root-TEL5RW3N.cjs.map → react-root-DDPDUMCG.cjs.map} +1 -1
- package/dist/lib/node/{react-surface-2H3S5TY5.cjs → react-surface-JUIU37BX.cjs} +144 -77
- package/dist/lib/node/react-surface-JUIU37BX.cjs.map +7 -0
- package/dist/lib/node/{schema-PPJ5BZ3A.cjs → schema-defs-XLFBG3XK.cjs} +14 -12
- package/dist/lib/node/schema-defs-XLFBG3XK.cjs.map +7 -0
- package/dist/lib/node/{schema-tools-BLIMOZYY.cjs → schema-tools-ZG6Z2QRC.cjs} +32 -32
- package/dist/lib/node/schema-tools-ZG6Z2QRC.cjs.map +7 -0
- package/dist/lib/node/{settings-WVFP2UEP.cjs → settings-FOH7EB5C.cjs} +7 -7
- package/dist/lib/node/settings-FOH7EB5C.cjs.map +7 -0
- package/dist/lib/node/{spaces-ready-7DNZSUOG.cjs → spaces-ready-VXQYCBII.cjs} +27 -26
- package/dist/lib/node/spaces-ready-VXQYCBII.cjs.map +7 -0
- package/dist/lib/node/{state-5KX6WBJH.cjs → state-ZT3MTZXB.cjs} +7 -9
- package/dist/lib/node/state-ZT3MTZXB.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-E7CCGPQJ.mjs +329 -0
- package/dist/lib/node-esm/app-graph-builder-E7CCGPQJ.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-FXONFKOE.mjs → app-graph-serializer-UCMSLPIA.mjs} +10 -10
- package/dist/lib/node-esm/app-graph-serializer-UCMSLPIA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PIYAWT5N.mjs → chunk-4X4Y63ND.mjs} +3 -8
- package/dist/lib/{browser/chunk-KVRYWFZU.mjs.map → node-esm/chunk-4X4Y63ND.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-FTELJGEG.mjs +289 -0
- package/dist/lib/node-esm/chunk-FTELJGEG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GH2FGJXH.mjs +96 -0
- package/dist/lib/node-esm/chunk-GH2FGJXH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HL2Z2GNW.mjs +1901 -0
- package/dist/lib/node-esm/chunk-HL2Z2GNW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3ZOUV4DF.mjs → chunk-OSPEGYX3.mjs} +21 -10
- package/dist/lib/node-esm/chunk-OSPEGYX3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZGLK25WQ.mjs → chunk-XAZNQ3QN.mjs} +78 -173
- package/dist/lib/node-esm/chunk-XAZNQ3QN.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-WJKAS2PV.mjs → identity-created-ZECO4NH3.mjs} +5 -5
- package/dist/lib/node-esm/identity-created-ZECO4NH3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +34 -54
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-ZFNSA4CM.mjs → intent-resolver-K2UDBF2R.mjs} +116 -108
- package/dist/lib/node-esm/intent-resolver-K2UDBF2R.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-PRBJMWLQ.mjs → react-root-6F7B3OVO.mjs} +6 -5
- package/dist/lib/{browser/react-root-6H7NX2M2.mjs.map → node-esm/react-root-6F7B3OVO.mjs.map} +1 -1
- package/dist/lib/node-esm/{react-surface-RCZG2PNF.mjs → react-surface-NP3Y6BNZ.mjs} +121 -54
- package/dist/lib/node-esm/react-surface-NP3Y6BNZ.mjs.map +7 -0
- package/dist/lib/node-esm/schema-defs-QZJS6UXN.mjs +27 -0
- package/dist/lib/node-esm/schema-defs-QZJS6UXN.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-tools-IU7EX5A5.mjs → schema-tools-2Y4D42PD.mjs} +26 -26
- package/dist/lib/node-esm/schema-tools-2Y4D42PD.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-FJZPC2TV.mjs → settings-Q4XDFSYD.mjs} +4 -4
- package/dist/lib/node-esm/settings-Q4XDFSYD.mjs.map +7 -0
- package/dist/lib/node-esm/{spaces-ready-7X5PGB2V.mjs → spaces-ready-JHKPD4PH.mjs} +20 -19
- package/dist/lib/node-esm/spaces-ready-JHKPD4PH.mjs.map +7 -0
- package/dist/lib/node-esm/{state-Z6E2YTNC.mjs → state-4ATRHSKA.mjs} +3 -5
- package/dist/lib/node-esm/state-4ATRHSKA.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -7
- 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/capabilities.d.ts +0 -8
- package/dist/types/src/capabilities/capabilities.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 +3 -3
- 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 +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/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts +13 -0
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +0 -2
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +7 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/index.d.ts +0 -1
- package/dist/types/src/components/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -8
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/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 +2 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -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 +14 -0
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -0
- 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 +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +17 -242
- 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/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +173 -146
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +36 -20
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +54 -47
- package/src/SpacePlugin.tsx +11 -20
- package/src/capabilities/app-graph-builder.ts +377 -230
- package/src/capabilities/app-graph-serializer.ts +8 -8
- package/src/capabilities/capabilities.ts +0 -9
- package/src/capabilities/identity-created.ts +5 -5
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/intent-resolver.ts +107 -111
- package/src/capabilities/react-surface.tsx +111 -50
- package/src/capabilities/schema-defs.ts +30 -0
- package/src/capabilities/schema-tool.test.ts +2 -3
- package/src/capabilities/schema-tools.ts +29 -29
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +17 -15
- package/src/capabilities/state.ts +3 -5
- package/src/components/AwaitingObject.tsx +1 -1
- package/src/components/CollectionMain.tsx +2 -5
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +4 -4
- package/src/components/CreateDialog/CreateObjectDialog.tsx +4 -4
- package/src/components/CreateDialog/CreateObjectPanel.tsx +3 -25
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +6 -3
- package/src/components/MembersContainer.stories.tsx +1 -5
- package/src/components/MembersContainer.tsx +80 -54
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.tsx +4 -4
- package/src/components/{ObjectSettingsContainer → ObjectSettings}/BaseObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.tsx +4 -4
- package/src/components/PersistenceStatus.tsx +11 -14
- package/src/components/PopoverRenameObject.tsx +15 -9
- package/src/components/PopoverRenameSpace.tsx +9 -1
- package/src/components/SchemaContainer.tsx +59 -0
- package/src/components/SpacePluginSettings.tsx +27 -2
- package/src/components/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence.tsx +60 -65
- package/src/components/SpaceSettings/{SpacePropertiesForm.stories.tsx → SpaceSettingsContainer.stories.tsx} +6 -6
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +159 -39
- package/src/components/SpaceSettings/index.ts +0 -1
- package/src/components/SyncStatus/InlineSyncStatus.tsx +15 -24
- package/src/components/SyncStatus/SyncStatus.tsx +6 -69
- package/src/components/index.ts +2 -3
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useActiveSpace.ts +20 -0
- package/src/hooks/useInputSurfaceLookup.tsx +31 -0
- package/src/hooks/usePath.ts +9 -6
- package/src/index.ts +3 -2
- package/src/translations.ts +19 -7
- package/src/types/collection.ts +6 -4
- package/src/types/index.ts +0 -1
- package/src/types/types.ts +130 -101
- package/src/util.tsx +75 -172
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs +0 -315
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-DSF2U3A5.mjs.map +0 -7
- package/dist/lib/browser/chunk-5BDV575R.mjs.map +0 -7
- package/dist/lib/browser/chunk-AYW4IDRT.mjs +0 -275
- package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +0 -7
- package/dist/lib/browser/chunk-JZXWPMLA.mjs +0 -2081
- package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +0 -7
- package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +0 -7
- package/dist/lib/browser/identity-created-JR7BNXFH.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +0 -7
- package/dist/lib/browser/schema-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/settings-PJPTJUPE.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +0 -7
- package/dist/lib/browser/state-X7VLCC6E.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs +0 -318
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-JELGJUAY.cjs.map +0 -7
- package/dist/lib/node/chunk-3GKCNADA.cjs +0 -2074
- package/dist/lib/node/chunk-3GKCNADA.cjs.map +0 -7
- package/dist/lib/node/chunk-PU2EYH4E.cjs.map +0 -7
- package/dist/lib/node/chunk-TUZWEPGX.cjs.map +0 -7
- package/dist/lib/node/chunk-WDEIFDTX.cjs +0 -300
- package/dist/lib/node/chunk-WDEIFDTX.cjs.map +0 -7
- package/dist/lib/node/identity-created-XU4HFV2T.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +0 -7
- package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +0 -7
- package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +0 -7
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
- package/dist/lib/node/settings-WVFP2UEP.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +0 -7
- package/dist/lib/node/state-5KX6WBJH.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs +0 -316
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-FXONFKOE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs +0 -2082
- package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs +0 -276
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-WJKAS2PV.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +0 -7
- package/dist/lib/node-esm/schema-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/settings-FJZPC2TV.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +0 -7
- package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +0 -7
- package/dist/types/src/capabilities/schema.d.ts +0 -4
- package/dist/types/src/capabilities/schema.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/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/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/Space.d.ts +0 -13
- package/dist/types/src/components/SyncStatus/Space.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts +0 -9
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/sync-state.d.ts +0 -18
- package/dist/types/src/components/SyncStatus/sync-state.d.ts.map +0 -1
- package/dist/types/src/types/thread.d.ts +0 -128
- package/dist/types/src/types/thread.d.ts.map +0 -1
- package/src/capabilities/schema.ts +0 -27
- package/src/components/PopoverAddSpace.tsx +0 -46
- package/src/components/ShareSpaceButton.stories.tsx +0 -27
- package/src/components/ShareSpaceButton.tsx +0 -32
- package/src/components/SpaceSettings/SpacePropertiesForm.tsx +0 -136
- package/src/components/SyncStatus/Space.tsx +0 -133
- package/src/components/SyncStatus/SyncStatusDetail.stories.tsx +0 -89
- package/src/components/SyncStatus/sync-state.ts +0 -101
- package/src/types/thread.ts +0 -24
- /package/dist/lib/{node-esm/react-root-PRBJMWLQ.mjs.map → browser/react-root-PVKJE4EZ.mjs.map} +0 -0
- /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.d.ts +0 -0
- /package/dist/types/src/components/{ObjectSettingsContainer → ObjectSettings}/index.d.ts +0 -0
- /package/src/components/{ObjectSettingsContainer → ObjectSettings}/ForeignKeys.tsx +0 -0
- /package/src/components/{ObjectSettingsContainer → ObjectSettings}/index.ts +0 -0
|
@@ -4,42 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { getTypeAnnotation, type TypeAnnotation, type S } from '@dxos/echo-schema';
|
|
7
|
+
import { getTypeAnnotation, type TypeAnnotation } from '@dxos/echo-schema';
|
|
9
8
|
import { invariant } from '@dxos/invariant';
|
|
10
9
|
import { type SpaceId, type Space } from '@dxos/react-client/echo';
|
|
11
10
|
import { Icon, type ThemedClassName, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import { Form
|
|
11
|
+
import { Form } from '@dxos/react-ui-form';
|
|
13
12
|
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
14
13
|
import { mx } from '@dxos/react-ui-theme';
|
|
15
14
|
import { isNonNullable, type MaybePromise } from '@dxos/util';
|
|
16
15
|
|
|
16
|
+
import { useInputSurfaceLookup } from '../../hooks';
|
|
17
17
|
import { SPACE_PLUGIN } from '../../meta';
|
|
18
18
|
import { type ObjectForm, type CollectionType } from '../../types';
|
|
19
19
|
import { getSpaceDisplayName } from '../../util';
|
|
20
20
|
|
|
21
|
-
// TODO(ZaymonFC): Move this if you find yourself needing it elsewhere.
|
|
22
|
-
/**
|
|
23
|
-
* Creates a surface input component based on plugin context.
|
|
24
|
-
* @param baseData Additional data that will be merged with form data and passed to the surface.
|
|
25
|
-
* This allows providing more context to the surface than what's available from the form itself.
|
|
26
|
-
*/
|
|
27
|
-
const useInputSurfaceLookup = (baseData?: Record<string, any>) => {
|
|
28
|
-
const pluginManager = usePluginManager();
|
|
29
|
-
|
|
30
|
-
return useCallback(
|
|
31
|
-
({ prop, schema, inputProps }: { prop: string; schema: S.Schema<any>; inputProps: InputProps }) => {
|
|
32
|
-
const composedData = { prop, schema, ...baseData };
|
|
33
|
-
if (!isSurfaceAvailable(pluginManager.context, { role: 'form-input', data: composedData })) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return <Surface role='form-input' data={composedData} {...inputProps} />;
|
|
38
|
-
},
|
|
39
|
-
[pluginManager, baseData],
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
21
|
export type CreateObjectPanelProps = ThemedClassName<{
|
|
44
22
|
forms: ObjectForm[];
|
|
45
23
|
spaces: Space[];
|
|
@@ -2,20 +2,20 @@
|
|
|
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
|
|
|
12
|
+
import { useInputSurfaceLookup } from '../../hooks';
|
|
13
13
|
import { SPACE_PLUGIN } from '../../meta';
|
|
14
14
|
import { SpaceAction, SpaceForm } from '../../types';
|
|
15
15
|
|
|
16
16
|
export const CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
|
|
17
17
|
|
|
18
|
-
type FormValues =
|
|
18
|
+
type FormValues = Schema.Schema.Type<typeof SpaceForm>;
|
|
19
19
|
const initialValues: FormValues = { edgeReplication: true };
|
|
20
20
|
|
|
21
21
|
export const CreateSpaceDialog = () => {
|
|
@@ -23,6 +23,8 @@ export const CreateSpaceDialog = () => {
|
|
|
23
23
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
24
24
|
const { dispatch } = useIntentDispatcher();
|
|
25
25
|
|
|
26
|
+
const inputSurfaceLookup = useInputSurfaceLookup();
|
|
27
|
+
|
|
26
28
|
const handleCreateSpace = useCallback(
|
|
27
29
|
async (data: FormValues) => {
|
|
28
30
|
const program = Effect.gen(function* () {
|
|
@@ -54,6 +56,7 @@ export const CreateSpaceDialog = () => {
|
|
|
54
56
|
autoFocus
|
|
55
57
|
values={initialValues}
|
|
56
58
|
schema={SpaceForm}
|
|
59
|
+
lookupComponent={inputSurfaceLookup}
|
|
57
60
|
onSave={handleCreateSpace}
|
|
58
61
|
/>
|
|
59
62
|
</div>
|
|
@@ -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],
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Check, X } from '@phosphor-icons/react';
|
|
6
|
-
import React, { type Dispatch, type SetStateAction, useMemo, useState } from 'react';
|
|
6
|
+
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import { QR } from 'react-qr-rounded';
|
|
8
8
|
|
|
9
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
11
|
import { useConfig } from '@dxos/react-client';
|
|
11
12
|
import { fullyQualifiedId, useSpaceInvitations, type Space } from '@dxos/react-client/echo';
|
|
12
13
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
13
|
-
import { Button, Clipboard, Icon, useId, useTranslation } from '@dxos/react-ui';
|
|
14
|
-
import { ControlSection, ControlFrame, ControlFrameItem } from '@dxos/react-ui-form';
|
|
14
|
+
import { Button, Clipboard, Icon, Input, useId, useTranslation } from '@dxos/react-ui';
|
|
15
|
+
import { ControlPage, ControlSection, ControlFrame, ControlFrameItem, ControlItemInput } from '@dxos/react-ui-form';
|
|
15
16
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
16
17
|
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
17
18
|
import {
|
|
@@ -27,7 +28,8 @@ import {
|
|
|
27
28
|
import { hexToEmoji } from '@dxos/util';
|
|
28
29
|
|
|
29
30
|
import { SPACE_PLUGIN } from '../meta';
|
|
30
|
-
import { CollectionType } from '../types';
|
|
31
|
+
import { CollectionType, SpaceAction } from '../types';
|
|
32
|
+
import { COMPOSER_SPACE_LOCK } from '../util';
|
|
31
33
|
|
|
32
34
|
// TODO(wittjosiah): Copied from Shell.
|
|
33
35
|
const activeActionKey = 'dxos:react-shell/space-manager/active-action';
|
|
@@ -47,8 +49,9 @@ export const MembersContainer = ({
|
|
|
47
49
|
space: Space;
|
|
48
50
|
createInvitationUrl: (invitationCode: string) => string;
|
|
49
51
|
}) => {
|
|
50
|
-
const { t } = useTranslation(
|
|
52
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
51
53
|
const config = useConfig();
|
|
54
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
52
55
|
const invitations = useSpaceInvitations(space.key);
|
|
53
56
|
const visibleInvitations = invitations?.filter(
|
|
54
57
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -64,20 +67,28 @@ export const MembersContainer = ({
|
|
|
64
67
|
// TODO(wittjosiah): Track which was the most recently viewed object.
|
|
65
68
|
const target = space.properties[CollectionType.typename]?.target?.objects[0]?.target;
|
|
66
69
|
|
|
70
|
+
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
71
|
+
const handleChangeLocked = useCallback(() => {
|
|
72
|
+
space.properties[COMPOSER_SPACE_LOCK] = !locked;
|
|
73
|
+
}, [locked, space]);
|
|
74
|
+
|
|
67
75
|
const inviteActions = useMemo(
|
|
68
76
|
(): Record<string, ActionMenuItem> => ({
|
|
69
77
|
inviteOne: {
|
|
70
|
-
label: t('invite one label'),
|
|
71
|
-
description: t('invite one description'),
|
|
78
|
+
label: t('invite one label', { ns: 'os' }),
|
|
79
|
+
description: t('invite one description', { ns: 'os' }),
|
|
72
80
|
icon: () => <Icon icon='ph--user-plus--regular' size={5} />,
|
|
73
81
|
testId: 'membersContainer.inviteOne',
|
|
74
|
-
onClick: () => {
|
|
75
|
-
const invitation =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
onClick: async () => {
|
|
83
|
+
const { data: invitation } = await dispatch(
|
|
84
|
+
createIntent(SpaceAction.Share, {
|
|
85
|
+
space,
|
|
86
|
+
type: Invitation.Type.INTERACTIVE,
|
|
87
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
88
|
+
multiUse: false,
|
|
89
|
+
target: target && fullyQualifiedId(target),
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
81
92
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
82
93
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
83
94
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -86,17 +97,20 @@ export const MembersContainer = ({
|
|
|
86
97
|
},
|
|
87
98
|
},
|
|
88
99
|
inviteMany: {
|
|
89
|
-
label: t('invite many label'),
|
|
90
|
-
description: t('invite many description'),
|
|
100
|
+
label: t('invite many label', { ns: 'os' }),
|
|
101
|
+
description: t('invite many description', { ns: 'os' }),
|
|
91
102
|
icon: () => <Icon icon='ph--users-three--regular' size={5} />,
|
|
92
103
|
testId: 'membersContainer.inviteMany',
|
|
93
|
-
onClick: () => {
|
|
94
|
-
const invitation =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
onClick: async () => {
|
|
105
|
+
const { data: invitation } = await dispatch(
|
|
106
|
+
createIntent(SpaceAction.Share, {
|
|
107
|
+
space,
|
|
108
|
+
type: Invitation.Type.DELEGATED,
|
|
109
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
110
|
+
multiUse: true,
|
|
111
|
+
target: target && fullyQualifiedId(target),
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
100
114
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
101
115
|
const subscription: ZenObservable.Subscription = invitation.subscribe((invitation) =>
|
|
102
116
|
handleInvitationEvent(invitation, subscription),
|
|
@@ -118,38 +132,50 @@ export const MembersContainer = ({
|
|
|
118
132
|
|
|
119
133
|
return (
|
|
120
134
|
<Clipboard.Provider>
|
|
121
|
-
<StackItem.Content classNames='
|
|
122
|
-
<
|
|
123
|
-
title={t('members verbose label'
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
<StackItem.Content classNames='block overflow-y-auto'>
|
|
136
|
+
<ControlPage>
|
|
137
|
+
<ControlSection title={t('members verbose label')} description={t('members description')}>
|
|
138
|
+
<ControlFrame>
|
|
139
|
+
<ControlFrameItem title={t('members label')}>
|
|
140
|
+
<SpaceMemberList spaceKey={space.key} includeSelf />
|
|
141
|
+
</ControlFrameItem>
|
|
142
|
+
{locked && (
|
|
143
|
+
<ControlFrameItem title={t('invitations label')}>
|
|
144
|
+
<p className='text-description mbe-2'>{t('locked space description')}</p>
|
|
145
|
+
</ControlFrameItem>
|
|
146
|
+
)}
|
|
147
|
+
{!locked && (
|
|
148
|
+
<ControlFrameItem title={t('invitations label')}>
|
|
149
|
+
{selectedInvitation && <InvitationSection {...selectedInvitation} onBack={handleBack} />}
|
|
150
|
+
{!selectedInvitation && (
|
|
151
|
+
<>
|
|
152
|
+
<p className='text-description mbe-2'>{t('space invitation description')}</p>
|
|
153
|
+
<InvitationList
|
|
154
|
+
className='mb-2'
|
|
155
|
+
send={handleSend}
|
|
156
|
+
invitations={visibleInvitations ?? []}
|
|
157
|
+
onClickRemove={(invitation) => invitation.cancel()}
|
|
158
|
+
createInvitationUrl={createInvitationUrl}
|
|
159
|
+
/>
|
|
160
|
+
<BifurcatedAction
|
|
161
|
+
actions={inviteActions}
|
|
162
|
+
activeAction={activeAction}
|
|
163
|
+
onChangeActiveAction={setActiveAction as Dispatch<SetStateAction<string>>}
|
|
164
|
+
data-testid='membersContainer.createInvitation'
|
|
165
|
+
/>
|
|
166
|
+
</>
|
|
167
|
+
)}
|
|
168
|
+
</ControlFrameItem>
|
|
149
169
|
)}
|
|
150
|
-
</
|
|
151
|
-
|
|
152
|
-
|
|
170
|
+
</ControlFrame>
|
|
171
|
+
{/* TODO(wittjosiah): Make ControlItemInput & ControlFrame compatible. */}
|
|
172
|
+
<div className='justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
173
|
+
<ControlItemInput title={t('space locked label')} description={t('space locked description')}>
|
|
174
|
+
<Input.Switch checked={locked} onCheckedChange={handleChangeLocked} classNames='justify-self-end' />
|
|
175
|
+
</ControlItemInput>
|
|
176
|
+
</div>
|
|
177
|
+
</ControlSection>
|
|
178
|
+
</ControlPage>
|
|
153
179
|
</StackItem.Content>
|
|
154
180
|
</Clipboard.Provider>
|
|
155
181
|
);
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { Planet } from '@phosphor-icons/react';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { type
|
|
8
|
+
import { type AnyLiveObject, getSpace } from '@dxos/client/echo';
|
|
9
9
|
import { useClient } from '@dxos/react-client';
|
|
10
10
|
import { DropdownMenu, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
|
|
12
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
13
13
|
import { getSpaceDisplayName } from '../util';
|
|
14
14
|
|
|
15
|
-
export const MenuFooter = ({ object }: { object:
|
|
15
|
+
export const MenuFooter = ({ object }: { object: AnyLiveObject<any> }) => {
|
|
16
16
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
17
|
const client = useClient();
|
|
18
18
|
const space = getSpace(object);
|
package/src/components/{ObjectSettingsContainer → ObjectSettings}/AdvancedObjectSettings.tsx
RENAMED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { getMeta, type
|
|
7
|
+
import { ForeignKey } from '@dxos/echo-schema';
|
|
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) => {
|
|
@@ -66,7 +66,7 @@ export const AdvancedObjectSettings = ({ object }: AdvancedObjectSettingsProps)
|
|
|
66
66
|
{!adding && <ForeignKeys keys={keys} onDelete={handleDelete} />}
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
|
-
{adding && <Form schema={
|
|
69
|
+
{adding && <Form schema={ForeignKey} values={initialValues} onSave={handleSave} onCancel={handleCancel} />}
|
|
70
70
|
</>
|
|
71
71
|
);
|
|
72
72
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type AnyLiveObject } from '@dxos/react-client/echo';
|
|
8
8
|
import { Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ import { meta } from '../../meta';
|
|
|
12
12
|
|
|
13
13
|
export type BaseObjectSettingsProps = ThemedClassName<
|
|
14
14
|
PropsWithChildren<{
|
|
15
|
-
object:
|
|
15
|
+
object: AnyLiveObject<any>;
|
|
16
16
|
}>
|
|
17
17
|
>;
|
|
18
18
|
|
package/src/components/{ObjectSettingsContainer → ObjectSettings}/ObjectSettingsContainer.tsx
RENAMED
|
@@ -5,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,21 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { type Live } from '@dxos/live-object';
|
|
8
9
|
import { log } from '@dxos/log';
|
|
9
|
-
import { Button, Input,
|
|
10
|
+
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
10
11
|
|
|
11
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
12
13
|
|
|
13
14
|
export const POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
14
15
|
|
|
15
|
-
export const PopoverRenameObject = ({ object: obj }: { object:
|
|
16
|
+
export const PopoverRenameObject = ({ object: obj }: { object: Live<any> }) => {
|
|
16
17
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
18
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
18
19
|
// TODO(wittjosiah): Use schema here.
|
|
19
20
|
const object = obj as any;
|
|
20
21
|
// TODO(burdon): Field should not be hardcoded field.
|
|
21
22
|
const [name, setName] = useState(object.name || object.title || '');
|
|
23
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
22
24
|
|
|
23
25
|
const handleDone = useCallback(() => {
|
|
24
26
|
try {
|
|
@@ -30,10 +32,16 @@ export const PopoverRenameObject = ({ object: obj }: { object: ReactiveObject<an
|
|
|
30
32
|
log.error('Failed to rename object', { err });
|
|
31
33
|
}
|
|
32
34
|
}
|
|
35
|
+
void dispatch(
|
|
36
|
+
createIntent(LayoutAction.UpdatePopover, {
|
|
37
|
+
part: 'popover',
|
|
38
|
+
options: { variant: 'react', anchorId: '', state: false },
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
33
41
|
}, [object, name]);
|
|
34
42
|
|
|
35
43
|
return (
|
|
36
|
-
<div role='none' className='p-
|
|
44
|
+
<div role='none' className='p-2 flex gap-2'>
|
|
37
45
|
<div role='none' className='flex-1'>
|
|
38
46
|
<Input.Root>
|
|
39
47
|
<Input.Label srOnly>{t('object name label')}</Input.Label>
|
|
@@ -46,11 +54,9 @@ export const PopoverRenameObject = ({ object: obj }: { object: ReactiveObject<an
|
|
|
46
54
|
/>
|
|
47
55
|
</Input.Root>
|
|
48
56
|
</div>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</Button>
|
|
53
|
-
</Popover.Close>
|
|
57
|
+
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
58
|
+
{t('done label', { ns: 'os' })}
|
|
59
|
+
</Button>
|
|
54
60
|
</div>
|
|
55
61
|
);
|
|
56
62
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
7
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
8
9
|
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
9
10
|
|
|
@@ -15,14 +16,21 @@ 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?
|
|
24
32
|
return (
|
|
25
|
-
<div role='none' className='p-
|
|
33
|
+
<div role='none' className='p-2 flex gap-2'>
|
|
26
34
|
<div role='none' className='flex-1'>
|
|
27
35
|
<Input.Root>
|
|
28
36
|
<Input.Label srOnly>{t('space name label')}</Input.Label>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type EchoSchema } from '@dxos/echo-schema';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { controlItemClasses, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
11
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
12
|
+
|
|
13
|
+
import { SPACE_PLUGIN } from '../meta';
|
|
14
|
+
|
|
15
|
+
type SchemaPanelProps = { space: Space };
|
|
16
|
+
|
|
17
|
+
// TODO(ZaymonFC):
|
|
18
|
+
// - Support deleting Schema. This should tie in to some sort of
|
|
19
|
+
// 'DangerZone™️' / 'Are you really sure?' / 'this might have consequences' component.
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe to and retrieve all schemas from a space's schema registry.
|
|
23
|
+
*/
|
|
24
|
+
export const useQuerySpaceSchemas = (space: Space): EchoSchema[] => {
|
|
25
|
+
const [schemas, setSchemas] = useState<EchoSchema[]>([]);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const query = space.db.schemaRegistry.query();
|
|
29
|
+
const initialResults = query.runSync();
|
|
30
|
+
setSchemas(initialResults);
|
|
31
|
+
|
|
32
|
+
const unsubscribe = query.subscribe(() => setSchemas(query.results));
|
|
33
|
+
return () => unsubscribe();
|
|
34
|
+
}, [space]);
|
|
35
|
+
|
|
36
|
+
return schemas;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const SchemaContainer = ({ space }: SchemaPanelProps) => {
|
|
40
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
41
|
+
const schemas = useQuerySpaceSchemas(space);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<StackItem.Content classNames='block overflow-y-auto'>
|
|
45
|
+
<ControlPage>
|
|
46
|
+
<ControlSection title={t('schema verbose label')} description={t('schema description')}>
|
|
47
|
+
<div role='none' className={controlItemClasses}>
|
|
48
|
+
{schemas.length === 0 && <div className='text-center plb-4'>{t('no schemas found message')}</div>}
|
|
49
|
+
{schemas.map((schema) => (
|
|
50
|
+
<div key={schema.id}>
|
|
51
|
+
<div>{schema.typename}</div>
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
</ControlSection>
|
|
56
|
+
</ControlPage>
|
|
57
|
+
</StackItem.Content>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -4,20 +4,45 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { useClient } from '@dxos/react-client';
|
|
9
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
10
|
+
import { Input, toLocalizedString, useTranslation, List, ListItem, Button } from '@dxos/react-ui';
|
|
8
11
|
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
9
12
|
|
|
10
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
11
|
-
import { type SpaceSettingsProps } from '../types';
|
|
14
|
+
import { SpaceAction, type SpaceSettingsProps } from '../types';
|
|
15
|
+
import { getSpaceDisplayName } from '../util';
|
|
12
16
|
|
|
13
17
|
export const SpacePluginSettings = ({ settings }: { settings: SpaceSettingsProps }) => {
|
|
14
18
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
19
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
+
const client = useClient();
|
|
21
|
+
const spaces = useSpaces({ all: settings.showHidden });
|
|
15
22
|
|
|
23
|
+
// TODO(wittjosiah): Migrate to new form container.
|
|
16
24
|
return (
|
|
17
25
|
<DeprecatedFormContainer>
|
|
18
26
|
<DeprecatedFormInput label={t('show hidden spaces label')}>
|
|
19
27
|
<Input.Switch checked={settings.showHidden} onCheckedChange={(checked) => (settings.showHidden = !!checked)} />
|
|
20
28
|
</DeprecatedFormInput>
|
|
29
|
+
<div role='none'>
|
|
30
|
+
<h2 className='text-xl my-4'>Space Settings</h2>
|
|
31
|
+
<List classNames='max-w-md mx-auto'>
|
|
32
|
+
{spaces.map((space) => (
|
|
33
|
+
<ListItem.Root key={space.id}>
|
|
34
|
+
<ListItem.Heading classNames='flex flex-col grow truncate mbe-2'>
|
|
35
|
+
{toLocalizedString(getSpaceDisplayName(space, { personal: space === client.spaces.default }), t)}
|
|
36
|
+
</ListItem.Heading>
|
|
37
|
+
<ListItem.Endcap>
|
|
38
|
+
<Button onClick={() => dispatch(createIntent(SpaceAction.OpenSettings, { space }))}>
|
|
39
|
+
{t('open space settings label')}
|
|
40
|
+
</Button>
|
|
41
|
+
</ListItem.Endcap>
|
|
42
|
+
</ListItem.Root>
|
|
43
|
+
))}
|
|
44
|
+
</List>
|
|
45
|
+
</div>
|
|
21
46
|
</DeprecatedFormContainer>
|
|
22
47
|
);
|
|
23
48
|
};
|
|
@@ -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
|
|