@dxos/plugin-space 0.8.2-main.f11618f → 0.8.2-staging.42af850
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-UUJH7JRN.mjs → app-graph-serializer-MLU7XI2P.mjs} +6 -6
- 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-JS6ZV4GV.mjs → chunk-N5QMRLKI.mjs} +24 -38
- 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-DIJ7LMCS.mjs → chunk-VEBKN45O.mjs} +3 -4
- 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-NRVE4XLL.mjs → identity-created-O63SIYOF.mjs} +3 -3
- package/dist/lib/browser/identity-created-O63SIYOF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +27 -26
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-NP55M7C7.mjs → intent-resolver-KBF3YU6I.mjs} +33 -35
- 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-XKAUZ3X2.mjs → react-root-PVKJE4EZ.mjs} +6 -5
- package/dist/lib/browser/{react-surface-2DW2UDRX.mjs → react-surface-252P4NCK.mjs} +6 -13
- 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-MVT32NP6.mjs → settings-2IN2WLUK.mjs} +2 -2
- package/dist/lib/browser/{spaces-ready-ERNSICUW.mjs → spaces-ready-L4QAGTDE.mjs} +18 -17
- package/dist/lib/browser/spaces-ready-L4QAGTDE.mjs.map +7 -0
- package/dist/lib/browser/{state-CYV6QCTN.mjs → state-6HOSHLIN.mjs} +3 -3
- package/dist/lib/browser/state-6HOSHLIN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -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-M6Z2OPA4.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-XADZLQAJ.cjs → chunk-COQYISES.cjs} +46 -61
- package/dist/lib/node/chunk-COQYISES.cjs.map +7 -0
- package/dist/lib/node/{chunk-UOCR4G2D.cjs → chunk-DXL5TDFP.cjs} +7 -8
- 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-YDTRMOMX.cjs → identity-created-UXEAUGC7.cjs} +7 -7
- package/dist/lib/node/identity-created-UXEAUGC7.cjs.map +7 -0
- package/dist/lib/node/index.cjs +77 -78
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-3J52ARFL.cjs → intent-resolver-SVFJKUH7.cjs} +80 -81
- 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-XUE2J7HT.cjs → react-root-DDPDUMCG.cjs} +11 -10
- package/dist/lib/node/{react-root-XUE2J7HT.cjs.map → react-root-DDPDUMCG.cjs.map} +1 -1
- package/dist/lib/node/{react-surface-IWSTOZ2E.cjs → react-surface-JUIU37BX.cjs} +44 -49
- 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-JLV7YT6Q.cjs → settings-FOH7EB5C.cjs} +6 -6
- package/dist/lib/node/{spaces-ready-6EBR4SM4.cjs → spaces-ready-VXQYCBII.cjs} +26 -25
- package/dist/lib/node/spaces-ready-VXQYCBII.cjs.map +7 -0
- package/dist/lib/node/{state-JLN7TGRR.cjs → state-ZT3MTZXB.cjs} +7 -7
- package/dist/lib/node/state-ZT3MTZXB.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-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-J3B4WSXU.mjs → app-graph-serializer-UCMSLPIA.mjs} +6 -6
- 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-OLISVDCF.mjs → chunk-OSPEGYX3.mjs} +3 -4
- package/dist/lib/node-esm/chunk-OSPEGYX3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ABTVMAG5.mjs → chunk-XAZNQ3QN.mjs} +24 -38
- package/dist/lib/node-esm/chunk-XAZNQ3QN.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-EC6SVYB5.mjs → identity-created-ZECO4NH3.mjs} +3 -3
- package/dist/lib/node-esm/identity-created-ZECO4NH3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +27 -26
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MXQIFIRC.mjs → intent-resolver-K2UDBF2R.mjs} +33 -35
- 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-ZBCJCEFS.mjs → react-root-6F7B3OVO.mjs} +6 -5
- package/dist/lib/{browser/react-root-XKAUZ3X2.mjs.map → node-esm/react-root-6F7B3OVO.mjs.map} +1 -1
- package/dist/lib/node-esm/{react-surface-JCHDAPGM.mjs → react-surface-NP3Y6BNZ.mjs} +6 -13
- 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-AILIMHTE.mjs → settings-Q4XDFSYD.mjs} +2 -2
- package/dist/lib/node-esm/{spaces-ready-5PXESKHX.mjs → spaces-ready-JHKPD4PH.mjs} +18 -17
- package/dist/lib/node-esm/spaces-ready-JHKPD4PH.mjs.map +7 -0
- package/dist/lib/node-esm/{state-YZPY5T5A.mjs → state-4ATRHSKA.mjs} +3 -3
- package/dist/lib/node-esm/state-4ATRHSKA.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 +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 +8 -184
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-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.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +2 -2
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/save-tracker.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +4 -0
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -0
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -2
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +3 -2
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -263
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/collection.d.ts +9 -8
- package/dist/types/src/types/collection.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +161 -160
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +10 -16
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +54 -48
- package/src/SpacePlugin.tsx +8 -7
- package/src/capabilities/app-graph-builder.ts +376 -268
- package/src/capabilities/app-graph-serializer.ts +4 -4
- package/src/capabilities/capabilities.ts +0 -9
- package/src/capabilities/identity-created.ts +3 -3
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/intent-resolver.ts +22 -29
- package/src/capabilities/react-surface.tsx +15 -23
- 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/spaces-ready.ts +15 -13
- package/src/capabilities/state.ts +3 -3
- package/src/components/AwaitingObject.tsx +1 -1
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +2 -2
- package/src/components/CreateDialog/CreateObjectDialog.tsx +1 -1
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +2 -3
- package/src/components/MembersContainer.stories.tsx +1 -5
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +4 -4
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +2 -2
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -4
- package/src/components/PersistenceStatus.tsx +11 -14
- package/src/components/PopoverRenameObject.tsx +1 -1
- package/src/components/PopoverRenameSpace.tsx +1 -1
- package/src/components/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence.tsx +34 -43
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +5 -3
- package/src/components/SyncStatus/InlineSyncStatus.tsx +10 -17
- package/src/components/index.ts +0 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveSpace.ts +20 -0
- package/src/hooks/useInputSurfaceLookup.tsx +2 -2
- package/src/hooks/usePath.ts +9 -6
- package/src/index.ts +3 -2
- package/src/translations.ts +1 -2
- package/src/types/collection.ts +6 -4
- package/src/types/index.ts +0 -1
- package/src/types/types.ts +119 -112
- package/src/util.tsx +36 -73
- package/dist/lib/browser/app-graph-builder-ZWNOWRAX.mjs +0 -369
- package/dist/lib/browser/app-graph-builder-ZWNOWRAX.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-UUJH7JRN.mjs.map +0 -7
- package/dist/lib/browser/chunk-4226DMDP.mjs +0 -1937
- package/dist/lib/browser/chunk-4226DMDP.mjs.map +0 -7
- package/dist/lib/browser/chunk-DIJ7LMCS.mjs.map +0 -7
- package/dist/lib/browser/chunk-JS6ZV4GV.mjs.map +0 -7
- package/dist/lib/browser/chunk-O7WGQVLQ.mjs +0 -306
- package/dist/lib/browser/chunk-O7WGQVLQ.mjs.map +0 -7
- package/dist/lib/browser/identity-created-NRVE4XLL.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-NP55M7C7.mjs.map +0 -7
- package/dist/lib/browser/react-surface-2DW2UDRX.mjs.map +0 -7
- package/dist/lib/browser/schema-FHTA26SW.mjs +0 -24
- package/dist/lib/browser/schema-FHTA26SW.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-ERNSICUW.mjs.map +0 -7
- package/dist/lib/browser/state-CYV6QCTN.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-LLIV422L.cjs +0 -371
- package/dist/lib/node/app-graph-builder-LLIV422L.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-M6Z2OPA4.cjs.map +0 -7
- package/dist/lib/node/chunk-EQ5BPSQ7.cjs +0 -334
- package/dist/lib/node/chunk-EQ5BPSQ7.cjs.map +0 -7
- package/dist/lib/node/chunk-UOCR4G2D.cjs.map +0 -7
- package/dist/lib/node/chunk-XADZLQAJ.cjs.map +0 -7
- package/dist/lib/node/chunk-ZMQO74LX.cjs +0 -1932
- package/dist/lib/node/chunk-ZMQO74LX.cjs.map +0 -7
- package/dist/lib/node/identity-created-YDTRMOMX.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-3J52ARFL.cjs.map +0 -7
- package/dist/lib/node/react-surface-IWSTOZ2E.cjs.map +0 -7
- package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +0 -7
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-6EBR4SM4.cjs.map +0 -7
- package/dist/lib/node/state-JLN7TGRR.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-HSGLCS76.mjs +0 -370
- package/dist/lib/node-esm/app-graph-builder-HSGLCS76.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-J3B4WSXU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ABTVMAG5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FJPCLEKN.mjs +0 -307
- package/dist/lib/node-esm/chunk-FJPCLEKN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OLISVDCF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PQI4D4SH.mjs +0 -1938
- package/dist/lib/node-esm/chunk-PQI4D4SH.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-EC6SVYB5.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MXQIFIRC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-JCHDAPGM.mjs.map +0 -7
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs +0 -25
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-5PXESKHX.mjs.map +0 -7
- package/dist/lib/node-esm/state-YZPY5T5A.mjs.map +0 -7
- package/dist/types/src/capabilities/schema.d.ts +0 -4
- package/dist/types/src/capabilities/schema.d.ts.map +0 -1
- package/dist/types/src/components/PopoverAddSpace.d.ts +0 -4
- package/dist/types/src/components/PopoverAddSpace.d.ts.map +0 -1
- package/dist/types/src/types/thread.d.ts +0 -352
- package/dist/types/src/types/thread.d.ts.map +0 -1
- package/src/capabilities/schema.ts +0 -27
- package/src/components/PopoverAddSpace.tsx +0 -52
- package/src/types/thread.ts +0 -24
- /package/dist/lib/{node-esm/react-root-ZBCJCEFS.mjs.map → browser/react-root-PVKJE4EZ.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-MVT32NP6.mjs.map → settings-2IN2WLUK.mjs.map} +0 -0
- /package/dist/lib/node/{settings-JLV7YT6Q.cjs.map → settings-FOH7EB5C.cjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-AILIMHTE.mjs.map → settings-Q4XDFSYD.mjs.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, createIntent, type
|
|
5
|
+
import { Capabilities, contributes, createIntent, type PluginContext } from '@dxos/app-framework';
|
|
6
6
|
import { isSpace } from '@dxos/client/echo';
|
|
7
7
|
import { live } from '@dxos/live-object';
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ import { SPACES } from '../util';
|
|
|
14
14
|
// https://stackoverflow.com/a/19016910
|
|
15
15
|
const DIRECTORY_TYPE = 'text/directory';
|
|
16
16
|
|
|
17
|
-
export default (context:
|
|
17
|
+
export default (context: PluginContext) =>
|
|
18
18
|
contributes(Capabilities.AppGraphSerializer, [
|
|
19
19
|
{
|
|
20
20
|
inputType: SPACES,
|
|
@@ -37,7 +37,7 @@ export default (context: PluginsContext) =>
|
|
|
37
37
|
type: DIRECTORY_TYPE,
|
|
38
38
|
}),
|
|
39
39
|
deserialize: async (data) => {
|
|
40
|
-
const { dispatchPromise: dispatch } = context.
|
|
40
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
41
41
|
const result = await dispatch(createIntent(SpaceAction.Create, { name: data.name, edgeReplication: true }));
|
|
42
42
|
return result.data?.space;
|
|
43
43
|
},
|
|
@@ -59,7 +59,7 @@ export default (context: PluginsContext) =>
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const { dispatchPromise: dispatch } = context.
|
|
62
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
63
63
|
const result = await dispatch(
|
|
64
64
|
createIntent(SpaceAction.AddObject, {
|
|
65
65
|
target: collection,
|
|
@@ -17,12 +17,3 @@ export namespace SpaceCapabilities {
|
|
|
17
17
|
|
|
18
18
|
export const ObjectForm = defineCapability<ObjectForm<any>>(`${SPACE_PLUGIN}/capability/object-form`);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
// TODO(wittjosiah): Factor out.
|
|
22
|
-
export namespace ThreadCapabilities {
|
|
23
|
-
type ThreadCapability<T = any> = {
|
|
24
|
-
predicate: (obj: any) => obj is T;
|
|
25
|
-
createSort: (obj: T) => (anchorA: string | undefined, anchorB: string | undefined) => number;
|
|
26
|
-
};
|
|
27
|
-
export const Thread = defineCapability<ThreadCapability>(`${SPACE_PLUGIN}/capability/thread`);
|
|
28
|
-
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { contributes, type
|
|
5
|
+
import { contributes, type PluginContext, Capabilities } from '@dxos/app-framework';
|
|
6
6
|
import { live, makeRef } from '@dxos/live-object';
|
|
7
7
|
import { Migrations } from '@dxos/migrations';
|
|
8
8
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
9
|
|
|
10
10
|
import { CollectionType } from '../types';
|
|
11
11
|
|
|
12
|
-
export default async (context:
|
|
13
|
-
const client = context.
|
|
12
|
+
export default async (context: PluginContext) => {
|
|
13
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
14
14
|
await client.spaces.waitUntilReady();
|
|
15
15
|
|
|
16
16
|
const defaultSpace = client.spaces.default;
|
|
@@ -10,8 +10,8 @@ export const IdentityCreated = lazy(() => import('./identity-created'));
|
|
|
10
10
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
11
11
|
export const ReactRoot = lazy(() => import('./react-root'));
|
|
12
12
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
13
|
+
export const SchemaDefs = lazy(() => import('./schema-defs'));
|
|
14
|
+
export const SchemaTools = lazy(() => import('./schema-tools'));
|
|
15
15
|
export const SpaceSettings = lazy(() => import('./settings'));
|
|
16
16
|
export const SpaceState = lazy(() => import('./state'));
|
|
17
17
|
export const SpacesReady = lazy(() => import('./spaces-ready'));
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
createIntent,
|
|
11
11
|
createResolver,
|
|
12
12
|
LayoutAction,
|
|
13
|
-
type
|
|
13
|
+
type PluginContext,
|
|
14
14
|
} from '@dxos/app-framework';
|
|
15
|
-
import { type Expando, getTypename, type HasId } from '@dxos/echo-schema';
|
|
15
|
+
import { type Expando, getTypename, type HasId, RelationSourceId, RelationTargetId } from '@dxos/echo-schema';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
17
17
|
import { live, makeRef, type Live } from '@dxos/live-object';
|
|
18
18
|
import { Migrations } from '@dxos/migrations';
|
|
@@ -32,7 +32,6 @@ import {
|
|
|
32
32
|
CREATE_OBJECT_DIALOG,
|
|
33
33
|
type CreateObjectDialogProps,
|
|
34
34
|
POPOVER_RENAME_OBJECT,
|
|
35
|
-
POPOVER_ADD_SPACE,
|
|
36
35
|
} from '../components';
|
|
37
36
|
import { SPACE_PLUGIN } from '../meta';
|
|
38
37
|
import { CollectionAction, CollectionType, SpaceAction } from '../types';
|
|
@@ -42,14 +41,14 @@ import { cloneObject, COMPOSER_SPACE_LOCK, getNestedObjects } from '../util';
|
|
|
42
41
|
const SPACE_MAX_OBJECTS = 500;
|
|
43
42
|
|
|
44
43
|
type IntentResolverOptions = {
|
|
45
|
-
context:
|
|
44
|
+
context: PluginContext;
|
|
46
45
|
createInvitationUrl: (invitationCode: string) => string;
|
|
47
46
|
observability?: boolean;
|
|
48
47
|
};
|
|
49
48
|
|
|
50
49
|
export default ({ context, observability, createInvitationUrl }: IntentResolverOptions) => {
|
|
51
50
|
const resolve = (typename: string) =>
|
|
52
|
-
context.
|
|
51
|
+
context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
53
52
|
|
|
54
53
|
return contributes(Capabilities.IntentResolver, [
|
|
55
54
|
createResolver({
|
|
@@ -69,7 +68,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
69
68
|
createResolver({
|
|
70
69
|
intent: SpaceAction.Create,
|
|
71
70
|
resolve: async ({ name, hue, icon, edgeReplication }) => {
|
|
72
|
-
const client = context.
|
|
71
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
73
72
|
const space = await client.spaces.create({ name, hue, icon });
|
|
74
73
|
if (edgeReplication) {
|
|
75
74
|
await space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED);
|
|
@@ -158,7 +157,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
158
157
|
intent: SpaceAction.GetShareLink,
|
|
159
158
|
resolve: ({ space, target, copyToClipboard }) =>
|
|
160
159
|
Effect.gen(function* () {
|
|
161
|
-
const { dispatch } = context.
|
|
160
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
162
161
|
const invitation = yield* dispatch(
|
|
163
162
|
createIntent(SpaceAction.Share, {
|
|
164
163
|
space,
|
|
@@ -246,24 +245,6 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
246
245
|
};
|
|
247
246
|
},
|
|
248
247
|
}),
|
|
249
|
-
createResolver({
|
|
250
|
-
intent: SpaceAction.AddSpace,
|
|
251
|
-
resolve: () => {
|
|
252
|
-
return {
|
|
253
|
-
intents: [
|
|
254
|
-
createIntent(LayoutAction.UpdatePopover, {
|
|
255
|
-
part: 'popover',
|
|
256
|
-
subject: POPOVER_ADD_SPACE,
|
|
257
|
-
options: {
|
|
258
|
-
variant: 'react',
|
|
259
|
-
anchorId: SpaceAction.AddSpace._tag,
|
|
260
|
-
side: 'right',
|
|
261
|
-
},
|
|
262
|
-
}),
|
|
263
|
-
],
|
|
264
|
-
};
|
|
265
|
-
},
|
|
266
|
-
}),
|
|
267
248
|
createResolver({
|
|
268
249
|
intent: SpaceAction.OpenSettings,
|
|
269
250
|
resolve: ({ space }) => ({
|
|
@@ -293,7 +274,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
293
274
|
createResolver({
|
|
294
275
|
intent: SpaceAction.Migrate,
|
|
295
276
|
resolve: async ({ space, version: targetVersion }) => {
|
|
296
|
-
const state = context.
|
|
277
|
+
const state = context.getCapability(SpaceCapabilities.MutableState);
|
|
297
278
|
|
|
298
279
|
if (space.state.get() === SpaceState.SPACE_REQUIRES_MIGRATION) {
|
|
299
280
|
state.sdkMigrationRunning[space.id] = true;
|
|
@@ -324,7 +305,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
324
305
|
createResolver({
|
|
325
306
|
intent: SpaceAction.OpenCreateObject,
|
|
326
307
|
resolve: ({ target, navigable = true }) => {
|
|
327
|
-
const state = context.
|
|
308
|
+
const state = context.getCapability(SpaceCapabilities.State);
|
|
328
309
|
|
|
329
310
|
return {
|
|
330
311
|
intents: [
|
|
@@ -421,10 +402,22 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
421
402
|
};
|
|
422
403
|
},
|
|
423
404
|
}),
|
|
405
|
+
createResolver({
|
|
406
|
+
intent: SpaceAction.AddRelation,
|
|
407
|
+
resolve: ({ space, schema, source, target, fields }) => {
|
|
408
|
+
const relation = live(schema, { [RelationSourceId]: source, [RelationTargetId]: target, ...fields });
|
|
409
|
+
space.db.add(relation);
|
|
410
|
+
return {
|
|
411
|
+
data: {
|
|
412
|
+
relation,
|
|
413
|
+
},
|
|
414
|
+
};
|
|
415
|
+
},
|
|
416
|
+
}),
|
|
424
417
|
createResolver({
|
|
425
418
|
intent: SpaceAction.RemoveObjects,
|
|
426
419
|
resolve: async ({ objects, target, deletionData }, undo) => {
|
|
427
|
-
const layout = context.
|
|
420
|
+
const layout = context.getCapability(Capabilities.Layout);
|
|
428
421
|
|
|
429
422
|
// All objects must be a member of the same space.
|
|
430
423
|
const space = getSpace(objects[0]);
|
|
@@ -553,7 +546,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
553
546
|
createResolver({
|
|
554
547
|
intent: SpaceAction.WaitForObject,
|
|
555
548
|
resolve: async ({ id }) => {
|
|
556
|
-
const state = context.
|
|
549
|
+
const state = context.getCapability(SpaceCapabilities.MutableState);
|
|
557
550
|
state.awaiting = id;
|
|
558
551
|
},
|
|
559
552
|
}),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Schema
|
|
5
|
+
import { type Schema } from 'effect';
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, contributes, createSurface, Surface, useCapability, useLayout } from '@dxos/app-framework';
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
parseId,
|
|
18
18
|
SpaceState,
|
|
19
19
|
useSpace,
|
|
20
|
-
type
|
|
20
|
+
type AnyLiveObject,
|
|
21
21
|
type Space,
|
|
22
22
|
} from '@dxos/react-client/echo';
|
|
23
23
|
import { Input } from '@dxos/react-ui';
|
|
@@ -36,22 +36,20 @@ import {
|
|
|
36
36
|
InlineSyncStatus,
|
|
37
37
|
JOIN_DIALOG,
|
|
38
38
|
JoinDialog,
|
|
39
|
+
MembersContainer,
|
|
39
40
|
MenuFooter,
|
|
41
|
+
ObjectSettingsContainer,
|
|
40
42
|
POPOVER_RENAME_OBJECT,
|
|
41
43
|
POPOVER_RENAME_SPACE,
|
|
42
44
|
PopoverRenameObject,
|
|
43
45
|
PopoverRenameSpace,
|
|
46
|
+
SchemaContainer,
|
|
44
47
|
SmallPresenceLive,
|
|
45
48
|
SpacePluginSettings,
|
|
46
49
|
SpacePresence,
|
|
50
|
+
SpaceSettingsContainer,
|
|
47
51
|
SyncStatus,
|
|
48
52
|
type CreateObjectDialogProps,
|
|
49
|
-
POPOVER_ADD_SPACE,
|
|
50
|
-
PopoverAddSpace,
|
|
51
|
-
MembersContainer,
|
|
52
|
-
ObjectSettingsContainer,
|
|
53
|
-
SpaceSettingsContainer,
|
|
54
|
-
SchemaContainer,
|
|
55
53
|
} from '../components';
|
|
56
54
|
import { SPACE_PLUGIN } from '../meta';
|
|
57
55
|
import { CollectionType, HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
@@ -93,7 +91,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
93
91
|
createSurface({
|
|
94
92
|
id: `${SPACE_PLUGIN}/companion/object-settings`,
|
|
95
93
|
role: 'article',
|
|
96
|
-
filter: (data): data is { companionTo:
|
|
94
|
+
filter: (data): data is { companionTo: AnyLiveObject<any> } =>
|
|
97
95
|
isEchoObject(data.companionTo) && data.subject === 'settings',
|
|
98
96
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
99
97
|
}),
|
|
@@ -164,8 +162,8 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
164
162
|
createSurface({
|
|
165
163
|
id: `${SPACE_PLUGIN}/create-initial-space-form-[hue]`,
|
|
166
164
|
role: 'form-input',
|
|
167
|
-
filter: (data): data is { prop: string; schema:
|
|
168
|
-
const annotation = findAnnotation<boolean>((data.schema as
|
|
165
|
+
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
166
|
+
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
169
167
|
return !!annotation;
|
|
170
168
|
},
|
|
171
169
|
component: ({ data: _, ...inputProps }) => {
|
|
@@ -183,8 +181,8 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
183
181
|
createSurface({
|
|
184
182
|
id: `${SPACE_PLUGIN}/create-initial-space-form-[icon]`,
|
|
185
183
|
role: 'form-input',
|
|
186
|
-
filter: (data): data is { prop: string; schema:
|
|
187
|
-
const annotation = findAnnotation<boolean>((data.schema as
|
|
184
|
+
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
185
|
+
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
188
186
|
return !!annotation;
|
|
189
187
|
},
|
|
190
188
|
component: ({ data: _, ...inputProps }) => {
|
|
@@ -208,26 +206,20 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
208
206
|
createSurface({
|
|
209
207
|
id: POPOVER_RENAME_OBJECT,
|
|
210
208
|
role: 'popover',
|
|
211
|
-
filter: (data): data is { props:
|
|
209
|
+
filter: (data): data is { props: AnyLiveObject<any> } =>
|
|
212
210
|
data.component === POPOVER_RENAME_OBJECT && isLiveObject(data.props),
|
|
213
211
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
214
212
|
}),
|
|
215
|
-
createSurface({
|
|
216
|
-
id: POPOVER_ADD_SPACE,
|
|
217
|
-
role: 'popover',
|
|
218
|
-
filter: (data): data is any => data.component === POPOVER_ADD_SPACE,
|
|
219
|
-
component: () => <PopoverAddSpace />,
|
|
220
|
-
}),
|
|
221
213
|
createSurface({
|
|
222
214
|
id: `${SPACE_PLUGIN}/menu-footer`,
|
|
223
215
|
role: 'menu-footer',
|
|
224
|
-
filter: (data): data is { subject:
|
|
216
|
+
filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),
|
|
225
217
|
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
226
218
|
}),
|
|
227
219
|
createSurface({
|
|
228
220
|
id: `${SPACE_PLUGIN}/navtree-presence`,
|
|
229
221
|
role: 'navtree-item-end',
|
|
230
|
-
filter: (data): data is { id: string; subject:
|
|
222
|
+
filter: (data): data is { id: string; subject: AnyLiveObject<any>; open?: boolean } =>
|
|
231
223
|
typeof data.id === 'string' && isEchoObject(data.subject),
|
|
232
224
|
component: ({ data }) => {
|
|
233
225
|
// TODO(wittjosiah): Doesn't need to be mutable but readonly type messes with ComplexMap.
|
|
@@ -254,7 +246,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
254
246
|
id: `${SPACE_PLUGIN}/navbar-presence`,
|
|
255
247
|
role: 'navbar-end',
|
|
256
248
|
position: 'hoist',
|
|
257
|
-
filter: (data): data is { subject: Space |
|
|
249
|
+
filter: (data): data is { subject: Space | AnyLiveObject<any> } =>
|
|
258
250
|
isSpace(data.subject) || isEchoObject(data.subject),
|
|
259
251
|
component: ({ data }) => {
|
|
260
252
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
6
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
|
+
|
|
8
|
+
import { SpaceCapabilities } from './capabilities';
|
|
9
|
+
import { type ObjectForm } from '../types';
|
|
10
|
+
|
|
11
|
+
export default (context: PluginContext) => {
|
|
12
|
+
const registry = context.getCapability(Capabilities.RxRegistry);
|
|
13
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
14
|
+
|
|
15
|
+
// TODO(wittjosiah): Unregister schemas when they are disabled.
|
|
16
|
+
let previous: ObjectForm[] = [];
|
|
17
|
+
const cancel = registry.subscribe(
|
|
18
|
+
context.capabilities(SpaceCapabilities.ObjectForm),
|
|
19
|
+
(_forms) => {
|
|
20
|
+
const forms = Array.from(new Set(_forms));
|
|
21
|
+
// TODO(wittjosiah): Filter out schemas which the client has already registered.
|
|
22
|
+
const newSchemas = forms.filter((form) => !previous.includes(form)).map((form) => form.objectSchema);
|
|
23
|
+
previous = forms;
|
|
24
|
+
client.addTypes(newSchemas);
|
|
25
|
+
},
|
|
26
|
+
{ immediate: true },
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
return contributes(Capabilities.Null, null, () => cancel());
|
|
30
|
+
};
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Schema } from 'effect';
|
|
5
6
|
import { describe, it, expect } from 'vitest';
|
|
6
7
|
|
|
7
|
-
import { S } from '@dxos/echo-schema';
|
|
8
|
-
|
|
9
8
|
import { TypeNameSchema } from './schema-tools';
|
|
10
9
|
|
|
11
10
|
describe('TypeNameSchema format', () => {
|
|
@@ -29,7 +28,7 @@ describe('TypeNameSchema format', () => {
|
|
|
29
28
|
'.org/Type', // Must have domain
|
|
30
29
|
];
|
|
31
30
|
|
|
32
|
-
const validate =
|
|
31
|
+
const validate = Schema.validateSync(TypeNameSchema);
|
|
33
32
|
|
|
34
33
|
valid.forEach((typename) => {
|
|
35
34
|
it(`should accept valid typename: ${typename}`, () => {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Schema, SchemaAST } from 'effect';
|
|
6
6
|
|
|
7
|
+
import { createTool, ToolResult } from '@dxos/ai';
|
|
7
8
|
import { Capabilities, contributes, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import { defineTool, ToolResult } from '@dxos/artifact';
|
|
9
9
|
import { type Space } from '@dxos/client/echo';
|
|
10
|
-
import { FormatEnum, FormatEnums,
|
|
10
|
+
import { FormatEnum, FormatEnums, SelectOptionSchema, GeoPoint, toJsonSchema } from '@dxos/echo-schema';
|
|
11
11
|
import { invariant } from '@dxos/invariant';
|
|
12
12
|
import { hues } from '@dxos/react-ui-theme';
|
|
13
13
|
import { getSchemaFromPropertyDefinitions } from '@dxos/schema';
|
|
@@ -21,13 +21,13 @@ declare global {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// TODO(ZaymonFC): Move this somewhere common.
|
|
24
|
-
export const TypeNameSchema =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export const TypeNameSchema = Schema.String.pipe(
|
|
25
|
+
Schema.pattern(/^\w+\.\w{2,}\/[\w/]+$/i),
|
|
26
|
+
Schema.annotations({
|
|
27
|
+
title: 'TypeName',
|
|
28
|
+
description:
|
|
29
29
|
'Domain-style type name path. Dashes are not allowed. Use camel case for the final component of the type name.',
|
|
30
|
-
[ExamplesAnnotationId]: ['example.com/type/Document', 'example.com/type/FlightList'],
|
|
30
|
+
[SchemaAST.ExamplesAnnotationId]: ['example.com/type/Document', 'example.com/type/FlightList'],
|
|
31
31
|
}),
|
|
32
32
|
);
|
|
33
33
|
|
|
@@ -36,33 +36,33 @@ const formatDescription = `The format of the property. Additional information:
|
|
|
36
36
|
This tuple is GeoJSON. You must specify \`${FormatEnum.GeoPoint}\` as [Longitude, Latitude]`;
|
|
37
37
|
|
|
38
38
|
// TODO(ZaymonFC): All properties are default optional, but maybe we should allow for required properties.
|
|
39
|
-
const PropertyDefinitionSchema =
|
|
40
|
-
name:
|
|
41
|
-
format:
|
|
42
|
-
|
|
39
|
+
const PropertyDefinitionSchema = Schema.Struct({
|
|
40
|
+
name: Schema.String.annotations({ description: 'The name of the property.' }),
|
|
41
|
+
format: Schema.Union(...FormatEnums.map((format) => Schema.Literal(format))).annotations({
|
|
42
|
+
description: formatDescription,
|
|
43
43
|
}),
|
|
44
|
-
config:
|
|
45
|
-
|
|
46
|
-
options:
|
|
47
|
-
|
|
44
|
+
config: Schema.optional(
|
|
45
|
+
Schema.Struct({
|
|
46
|
+
options: Schema.optional(
|
|
47
|
+
Schema.Array(SelectOptionSchema)
|
|
48
48
|
.annotations({
|
|
49
49
|
description: `Options for SingleSelect/MultiSelect formats. Available colors: ${hues.join(', ')}`,
|
|
50
50
|
})
|
|
51
|
-
.pipe(
|
|
51
|
+
.pipe(Schema.mutable),
|
|
52
52
|
),
|
|
53
53
|
}),
|
|
54
54
|
),
|
|
55
|
-
}).pipe(
|
|
55
|
+
}).pipe(Schema.mutable);
|
|
56
56
|
|
|
57
57
|
const SYSTEM_NAMESPACE = 'dxos.org/echo/schema';
|
|
58
58
|
|
|
59
59
|
export default () =>
|
|
60
60
|
contributes(Capabilities.Tools, [
|
|
61
|
-
|
|
61
|
+
createTool(SYSTEM_NAMESPACE, {
|
|
62
62
|
name: 'list',
|
|
63
63
|
description: 'List registered schemas in the space.',
|
|
64
64
|
caption: 'Listing registered schemas...',
|
|
65
|
-
schema:
|
|
65
|
+
schema: Schema.Struct({}),
|
|
66
66
|
execute: async (_input, { extensions }) => {
|
|
67
67
|
invariant(extensions?.space, 'No space.');
|
|
68
68
|
const space = extensions.space;
|
|
@@ -76,12 +76,12 @@ export default () =>
|
|
|
76
76
|
);
|
|
77
77
|
},
|
|
78
78
|
}),
|
|
79
|
-
|
|
79
|
+
createTool(SYSTEM_NAMESPACE, {
|
|
80
80
|
name: 'get',
|
|
81
81
|
description: 'Get a specific schema by its typename.',
|
|
82
82
|
caption: 'Getting schema...',
|
|
83
|
-
schema:
|
|
84
|
-
typename:
|
|
83
|
+
schema: Schema.Struct({
|
|
84
|
+
typename: Schema.String.annotations({
|
|
85
85
|
description: 'The fully qualified typename of the schema.',
|
|
86
86
|
}),
|
|
87
87
|
}),
|
|
@@ -97,18 +97,18 @@ export default () =>
|
|
|
97
97
|
return ToolResult.Success(schema);
|
|
98
98
|
},
|
|
99
99
|
}),
|
|
100
|
-
|
|
100
|
+
createTool(SYSTEM_NAMESPACE, {
|
|
101
101
|
name: 'create',
|
|
102
102
|
description: 'Create a new schema with the provided definition.',
|
|
103
103
|
caption: 'Creating schema...',
|
|
104
|
-
schema:
|
|
104
|
+
schema: Schema.Struct({
|
|
105
105
|
typename: TypeNameSchema.annotations({
|
|
106
106
|
description:
|
|
107
107
|
'The fully qualified schema typename. Must start with a domain, and then one or more path components (e.g., "example.com/type/TypeName").',
|
|
108
108
|
}),
|
|
109
|
-
properties:
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
properties: Schema.Array(PropertyDefinitionSchema).pipe(
|
|
110
|
+
Schema.annotations({ description: 'Array of property definitions for the schema.' }),
|
|
111
|
+
Schema.mutable,
|
|
112
112
|
),
|
|
113
113
|
}),
|
|
114
114
|
execute: async ({ typename, properties }, { extensions }) => {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Option } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { contributes, createIntent, type PluginContext, Capabilities, LayoutAction } from '@dxos/app-framework';
|
|
6
8
|
import { SubscriptionList } from '@dxos/async';
|
|
7
9
|
import { Expando } from '@dxos/echo-schema';
|
|
8
10
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
@@ -21,19 +23,19 @@ import { SpaceAction } from '../types';
|
|
|
21
23
|
import { COMPOSER_SPACE_LOCK, SHARED } from '../util';
|
|
22
24
|
|
|
23
25
|
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
24
|
-
const WAIT_FOR_OBJECT_TIMEOUT =
|
|
26
|
+
const WAIT_FOR_OBJECT_TIMEOUT = 5_000;
|
|
25
27
|
|
|
26
|
-
export default async (context:
|
|
28
|
+
export default async (context: PluginContext) => {
|
|
27
29
|
const subscriptions = new SubscriptionList();
|
|
28
30
|
const spaceSubscriptions = new SubscriptionList();
|
|
29
31
|
|
|
30
|
-
const { dispatchPromise: dispatch } = context.
|
|
31
|
-
const { graph } = context.
|
|
32
|
-
const layout = context.
|
|
33
|
-
const deck = context.
|
|
34
|
-
const attention = context.
|
|
35
|
-
const state = context.
|
|
36
|
-
const client = context.
|
|
32
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
33
|
+
const { graph } = context.getCapability(Capabilities.AppGraph);
|
|
34
|
+
const layout = context.getCapability(Capabilities.Layout);
|
|
35
|
+
const deck = context.getCapability(DeckCapabilities.DeckState);
|
|
36
|
+
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
37
|
+
const state = context.getCapability(SpaceCapabilities.MutableState);
|
|
38
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
37
39
|
|
|
38
40
|
const defaultSpace = client.spaces.default;
|
|
39
41
|
await defaultSpace.waitUntilReady();
|
|
@@ -49,7 +51,7 @@ export default async (context: PluginsContext) => {
|
|
|
49
51
|
|
|
50
52
|
const {
|
|
51
53
|
objects: [spacesOrder],
|
|
52
|
-
} = await defaultSpace.db.query(Filter.
|
|
54
|
+
} = await defaultSpace.db.query(Filter.type(Expando, { key: SHARED })).run();
|
|
53
55
|
if (!spacesOrder) {
|
|
54
56
|
// TODO(wittjosiah): Cannot be a Folder because Spaces are not TypedObjects so can't be saved in the database.
|
|
55
57
|
// Instead, we store order as an array of space ids.
|
|
@@ -65,10 +67,10 @@ export default async (context: PluginsContext) => {
|
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
const node = graph.
|
|
70
|
+
const node = graph.getNode(active[0]).pipe(Option.getOrNull);
|
|
69
71
|
if (!node && active[0].length === FQ_ID_LENGTH) {
|
|
70
72
|
const timeout = setTimeout(async () => {
|
|
71
|
-
const node = graph.
|
|
73
|
+
const node = graph.getNode(active[0]).pipe(Option.getOrNull);
|
|
72
74
|
if (!node) {
|
|
73
75
|
await dispatch(createIntent(SpaceAction.WaitForObject, { id: active[0] }));
|
|
74
76
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { effect } from '@preact/signals-core';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, type
|
|
7
|
+
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
10
|
import { ComplexMap } from '@dxos/util';
|
|
@@ -13,7 +13,7 @@ import { SpaceCapabilities } from './capabilities';
|
|
|
13
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
14
|
import { type PluginState } from '../types';
|
|
15
15
|
|
|
16
|
-
export default (context:
|
|
16
|
+
export default (context: PluginContext) => {
|
|
17
17
|
const state = new LocalStorageStore<PluginState>(SPACE_PLUGIN, {
|
|
18
18
|
awaiting: undefined,
|
|
19
19
|
spaceNames: {},
|
|
@@ -29,7 +29,7 @@ export default (context: PluginsContext) => {
|
|
|
29
29
|
.prop({ key: 'spaceNames', type: LocalStorageStore.json<Record<string, string>>() })
|
|
30
30
|
.prop({ key: 'enabledEdgeReplication', type: LocalStorageStore.bool() });
|
|
31
31
|
|
|
32
|
-
const manager = context.
|
|
32
|
+
const manager = context.getCapability(Capabilities.PluginManager);
|
|
33
33
|
const unsubscribe = effect(() => {
|
|
34
34
|
// TODO(wittjosiah): Find a way to make this capability-based.
|
|
35
35
|
const enabled = manager.enabled.includes('dxos.org/plugin/stack');
|
|
@@ -26,7 +26,7 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
26
26
|
const layout = useLayout();
|
|
27
27
|
|
|
28
28
|
const client = useClient();
|
|
29
|
-
const objects = useQuery(client.spaces, Filter.
|
|
29
|
+
const objects = useQuery(client.spaces, Filter.everything());
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
if (!id) {
|
|
@@ -35,7 +35,7 @@ const meta: Meta<typeof CreateObjectDialog> = {
|
|
|
35
35
|
decorators: [
|
|
36
36
|
withClientProvider({ createIdentity: true, createSpace: true, types: [CollectionType] }),
|
|
37
37
|
withTheme,
|
|
38
|
-
withLayout(
|
|
38
|
+
withLayout(),
|
|
39
39
|
],
|
|
40
40
|
parameters: {
|
|
41
41
|
translations: [...translations, osTranslations],
|
|
@@ -66,7 +66,7 @@ export const TargetSpace: StoryObj<typeof CreateObjectDialog> = {
|
|
|
66
66
|
export const TargetCollection: StoryObj<typeof CreateObjectDialog> = {
|
|
67
67
|
render: (args) => {
|
|
68
68
|
const space = useSpace();
|
|
69
|
-
const [collection] = useQuery(space, Filter.
|
|
69
|
+
const [collection] = useQuery(space, Filter.type(CollectionType));
|
|
70
70
|
|
|
71
71
|
useEffect(() => {
|
|
72
72
|
if (space) {
|
|
@@ -46,7 +46,7 @@ export const CreateObjectDialog = ({
|
|
|
46
46
|
|
|
47
47
|
const resolve = useCallback(
|
|
48
48
|
(typename: string) =>
|
|
49
|
-
manager.context.
|
|
49
|
+
manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {},
|
|
50
50
|
[manager],
|
|
51
51
|
);
|
|
52
52
|
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Effect } from 'effect';
|
|
5
|
+
import { Effect, type Schema } from 'effect';
|
|
6
6
|
import React, { useCallback, useRef } from 'react';
|
|
7
7
|
|
|
8
8
|
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
-
import { type S } from '@dxos/echo-schema';
|
|
10
9
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
11
10
|
import { Form } from '@dxos/react-ui-form';
|
|
12
11
|
|
|
@@ -16,7 +15,7 @@ import { SpaceAction, SpaceForm } from '../../types';
|
|
|
16
15
|
|
|
17
16
|
export const CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
|
|
18
17
|
|
|
19
|
-
type FormValues =
|
|
18
|
+
type FormValues = Schema.Schema.Type<typeof SpaceForm>;
|
|
20
19
|
const initialValues: FormValues = { edgeReplication: true };
|
|
21
20
|
|
|
22
21
|
export const CreateSpaceDialog = () => {
|
|
@@ -16,11 +16,7 @@ import translations from '../translations';
|
|
|
16
16
|
const meta: Meta = {
|
|
17
17
|
title: 'plugins/plugin-space/MembersContainer',
|
|
18
18
|
component: MembersContainer,
|
|
19
|
-
decorators: [
|
|
20
|
-
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
21
|
-
withTheme,
|
|
22
|
-
withLayout({ tooltips: true }),
|
|
23
|
-
],
|
|
19
|
+
decorators: [withClientProvider({ createIdentity: true, createSpace: true }), withTheme, withLayout()],
|
|
24
20
|
parameters: {
|
|
25
21
|
layout: 'fullscreen',
|
|
26
22
|
translations: [...translations, osTranslations],
|