@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
|
@@ -2,20 +2,27 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { type Schema } from 'effect';
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
6
7
|
|
|
7
|
-
import { Capabilities, contributes, createSurface, Surface, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { Capabilities, contributes, createSurface, Surface, useCapability, useLayout } from '@dxos/app-framework';
|
|
8
9
|
import { isInstanceOf } from '@dxos/echo-schema';
|
|
10
|
+
import { findAnnotation } from '@dxos/effect';
|
|
9
11
|
import { SettingsStore } from '@dxos/local-storage';
|
|
10
12
|
import {
|
|
11
13
|
getSpace,
|
|
12
14
|
isEchoObject,
|
|
13
|
-
|
|
15
|
+
isLiveObject,
|
|
14
16
|
isSpace,
|
|
17
|
+
parseId,
|
|
15
18
|
SpaceState,
|
|
16
|
-
|
|
19
|
+
useSpace,
|
|
20
|
+
type AnyLiveObject,
|
|
17
21
|
type Space,
|
|
18
22
|
} from '@dxos/react-client/echo';
|
|
23
|
+
import { Input } from '@dxos/react-ui';
|
|
24
|
+
import { type InputProps } from '@dxos/react-ui-form';
|
|
25
|
+
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
19
26
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
20
27
|
|
|
21
28
|
import { SpaceCapabilities } from './capabilities';
|
|
@@ -29,25 +36,23 @@ import {
|
|
|
29
36
|
InlineSyncStatus,
|
|
30
37
|
JOIN_DIALOG,
|
|
31
38
|
JoinDialog,
|
|
39
|
+
MembersContainer,
|
|
32
40
|
MenuFooter,
|
|
41
|
+
ObjectSettingsContainer,
|
|
33
42
|
POPOVER_RENAME_OBJECT,
|
|
34
43
|
POPOVER_RENAME_SPACE,
|
|
35
44
|
PopoverRenameObject,
|
|
36
45
|
PopoverRenameSpace,
|
|
46
|
+
SchemaContainer,
|
|
37
47
|
SmallPresenceLive,
|
|
38
48
|
SpacePluginSettings,
|
|
39
49
|
SpacePresence,
|
|
50
|
+
SpaceSettingsContainer,
|
|
40
51
|
SyncStatus,
|
|
41
52
|
type CreateObjectDialogProps,
|
|
42
|
-
POPOVER_ADD_SPACE,
|
|
43
|
-
PopoverAddSpace,
|
|
44
|
-
SpaceSettingsContainer,
|
|
45
|
-
SpacePropertiesForm,
|
|
46
|
-
MembersContainer,
|
|
47
|
-
ObjectSettingsContainer,
|
|
48
53
|
} from '../components';
|
|
49
54
|
import { SPACE_PLUGIN } from '../meta';
|
|
50
|
-
import { CollectionType, type SpaceSettingsProps } from '../types';
|
|
55
|
+
import { CollectionType, HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
51
56
|
|
|
52
57
|
type ReactSurfaceOptions = {
|
|
53
58
|
createInvitationUrl: (invitationCode: string) => string;
|
|
@@ -77,33 +82,64 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
77
82
|
component: ({ data }) => <CollectionMain collection={data.subject} />,
|
|
78
83
|
}),
|
|
79
84
|
createSurface({
|
|
80
|
-
id: `${SPACE_PLUGIN}/
|
|
81
|
-
role: 'article',
|
|
82
|
-
position: 'hoist',
|
|
83
|
-
filter: (data): data is { subject: Space; variant: 'members' } =>
|
|
84
|
-
isSpace(data.subject) && data.variant === 'members',
|
|
85
|
-
component: ({ data }) => <MembersContainer space={data.subject} createInvitationUrl={createInvitationUrl} />,
|
|
86
|
-
}),
|
|
87
|
-
createSurface({
|
|
88
|
-
id: `${SPACE_PLUGIN}/settings`,
|
|
85
|
+
id: `${SPACE_PLUGIN}/plugin-settings`,
|
|
89
86
|
role: 'article',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
component: ({ data }) => <SpaceSettingsContainer space={data.subject} />,
|
|
87
|
+
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
88
|
+
data.subject instanceof SettingsStore && data.subject.prefix === SPACE_PLUGIN,
|
|
89
|
+
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
94
90
|
}),
|
|
95
91
|
createSurface({
|
|
96
92
|
id: `${SPACE_PLUGIN}/companion/object-settings`,
|
|
97
93
|
role: 'article',
|
|
98
|
-
filter: (data): data is { companionTo:
|
|
94
|
+
filter: (data): data is { companionTo: AnyLiveObject<any> } =>
|
|
99
95
|
isEchoObject(data.companionTo) && data.subject === 'settings',
|
|
100
96
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
101
97
|
}),
|
|
102
98
|
createSurface({
|
|
103
|
-
id: `${SPACE_PLUGIN}/space-settings
|
|
104
|
-
role: '
|
|
105
|
-
filter: (data): data is { subject:
|
|
106
|
-
component: (
|
|
99
|
+
id: `${SPACE_PLUGIN}/space-settings-properties`,
|
|
100
|
+
role: 'article',
|
|
101
|
+
filter: (data): data is { subject: string } => data.subject === `${SPACE_PLUGIN}/properties`,
|
|
102
|
+
component: () => {
|
|
103
|
+
const layout = useLayout();
|
|
104
|
+
const { spaceId } = parseId(layout.workspace);
|
|
105
|
+
const space = useSpace(spaceId);
|
|
106
|
+
if (!space || !spaceId) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return <SpaceSettingsContainer space={space} />;
|
|
111
|
+
},
|
|
112
|
+
}),
|
|
113
|
+
createSurface({
|
|
114
|
+
id: `${SPACE_PLUGIN}/space-settings-members`,
|
|
115
|
+
role: 'article',
|
|
116
|
+
position: 'hoist',
|
|
117
|
+
filter: (data): data is { subject: string } => data.subject === `${SPACE_PLUGIN}/members`,
|
|
118
|
+
component: () => {
|
|
119
|
+
const layout = useLayout();
|
|
120
|
+
const { spaceId } = parseId(layout.workspace);
|
|
121
|
+
const space = useSpace(spaceId);
|
|
122
|
+
if (!space || !spaceId) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return <MembersContainer space={space} createInvitationUrl={createInvitationUrl} />;
|
|
127
|
+
},
|
|
128
|
+
}),
|
|
129
|
+
createSurface({
|
|
130
|
+
id: `${SPACE_PLUGIN}/space-settings-schema`,
|
|
131
|
+
role: 'article',
|
|
132
|
+
filter: (data): data is { subject: string } => data.subject === `${SPACE_PLUGIN}/schema`,
|
|
133
|
+
component: () => {
|
|
134
|
+
const layout = useLayout();
|
|
135
|
+
const { spaceId } = parseId(layout.workspace);
|
|
136
|
+
const space = useSpace(spaceId);
|
|
137
|
+
if (!space || !spaceId) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return <SchemaContainer space={space} />;
|
|
142
|
+
},
|
|
107
143
|
}),
|
|
108
144
|
createSurface({
|
|
109
145
|
id: JOIN_DIALOG,
|
|
@@ -123,6 +159,44 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
123
159
|
filter: (data): data is { props: CreateObjectDialogProps } => data.component === CREATE_OBJECT_DIALOG,
|
|
124
160
|
component: ({ data }) => <CreateObjectDialog {...data.props} />,
|
|
125
161
|
}),
|
|
162
|
+
createSurface({
|
|
163
|
+
id: `${SPACE_PLUGIN}/create-initial-space-form-[hue]`,
|
|
164
|
+
role: 'form-input',
|
|
165
|
+
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
166
|
+
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
167
|
+
return !!annotation;
|
|
168
|
+
},
|
|
169
|
+
component: ({ data: _, ...inputProps }) => {
|
|
170
|
+
const { label, disabled, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
171
|
+
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange]);
|
|
172
|
+
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
173
|
+
return (
|
|
174
|
+
<Input.Root>
|
|
175
|
+
<Input.Label>{label}</Input.Label>
|
|
176
|
+
<HuePicker disabled={disabled} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
177
|
+
</Input.Root>
|
|
178
|
+
);
|
|
179
|
+
},
|
|
180
|
+
}),
|
|
181
|
+
createSurface({
|
|
182
|
+
id: `${SPACE_PLUGIN}/create-initial-space-form-[icon]`,
|
|
183
|
+
role: 'form-input',
|
|
184
|
+
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
185
|
+
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
186
|
+
return !!annotation;
|
|
187
|
+
},
|
|
188
|
+
component: ({ data: _, ...inputProps }) => {
|
|
189
|
+
const { label, disabled, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
190
|
+
const handleChange = useCallback((nextIcon: string) => onValueChange(type, nextIcon), [onValueChange]);
|
|
191
|
+
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
192
|
+
return (
|
|
193
|
+
<Input.Root>
|
|
194
|
+
<Input.Label>{label}</Input.Label>
|
|
195
|
+
<IconPicker disabled={disabled} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
196
|
+
</Input.Root>
|
|
197
|
+
);
|
|
198
|
+
},
|
|
199
|
+
}),
|
|
126
200
|
createSurface({
|
|
127
201
|
id: POPOVER_RENAME_SPACE,
|
|
128
202
|
role: 'popover',
|
|
@@ -132,20 +206,20 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
132
206
|
createSurface({
|
|
133
207
|
id: POPOVER_RENAME_OBJECT,
|
|
134
208
|
role: 'popover',
|
|
135
|
-
filter: (data): data is { props:
|
|
136
|
-
data.component === POPOVER_RENAME_OBJECT &&
|
|
209
|
+
filter: (data): data is { props: AnyLiveObject<any> } =>
|
|
210
|
+
data.component === POPOVER_RENAME_OBJECT && isLiveObject(data.props),
|
|
137
211
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
138
212
|
}),
|
|
139
213
|
createSurface({
|
|
140
|
-
id:
|
|
141
|
-
role: '
|
|
142
|
-
filter: (data): data is any => data.
|
|
143
|
-
component: () => <
|
|
214
|
+
id: `${SPACE_PLUGIN}/menu-footer`,
|
|
215
|
+
role: 'menu-footer',
|
|
216
|
+
filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),
|
|
217
|
+
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
144
218
|
}),
|
|
145
219
|
createSurface({
|
|
146
220
|
id: `${SPACE_PLUGIN}/navtree-presence`,
|
|
147
221
|
role: 'navtree-item-end',
|
|
148
|
-
filter: (data): data is { id: string; subject:
|
|
222
|
+
filter: (data): data is { id: string; subject: AnyLiveObject<any>; open?: boolean } =>
|
|
149
223
|
typeof data.id === 'string' && isEchoObject(data.subject),
|
|
150
224
|
component: ({ data }) => {
|
|
151
225
|
// TODO(wittjosiah): Doesn't need to be mutable but readonly type messes with ComplexMap.
|
|
@@ -172,7 +246,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
172
246
|
id: `${SPACE_PLUGIN}/navbar-presence`,
|
|
173
247
|
role: 'navbar-end',
|
|
174
248
|
position: 'hoist',
|
|
175
|
-
filter: (data): data is { subject: Space |
|
|
249
|
+
filter: (data): data is { subject: Space | AnyLiveObject<any> } =>
|
|
176
250
|
isSpace(data.subject) || isEchoObject(data.subject),
|
|
177
251
|
component: ({ data }) => {
|
|
178
252
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
@@ -191,19 +265,6 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
191
265
|
filter: (data): data is { subject: CollectionType } => isInstanceOf(CollectionType, data.subject),
|
|
192
266
|
component: ({ data }) => <CollectionSection collection={data.subject} />,
|
|
193
267
|
}),
|
|
194
|
-
createSurface({
|
|
195
|
-
id: `${SPACE_PLUGIN}/plugin-settings`,
|
|
196
|
-
role: 'article',
|
|
197
|
-
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
198
|
-
data.subject instanceof SettingsStore && data.subject.prefix === SPACE_PLUGIN,
|
|
199
|
-
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
200
|
-
}),
|
|
201
|
-
createSurface({
|
|
202
|
-
id: `${SPACE_PLUGIN}/menu-footer`,
|
|
203
|
-
role: 'menu-footer',
|
|
204
|
-
filter: (data): data is { subject: ReactiveEchoObject<any> } => isEchoObject(data.subject),
|
|
205
|
-
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
206
|
-
}),
|
|
207
268
|
createSurface({
|
|
208
269
|
id: `${SPACE_PLUGIN}/status`,
|
|
209
270
|
role: 'status',
|
|
@@ -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 }) => {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
8
|
import { SPACE_PLUGIN } from '../meta';
|
|
9
9
|
import { type SpaceSettingsProps, SpaceSettingsSchema } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
12
|
-
const settings =
|
|
12
|
+
const settings = live<SpaceSettingsProps>({
|
|
13
13
|
showHidden: false,
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -2,11 +2,13 @@
|
|
|
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';
|
|
9
|
-
import {
|
|
11
|
+
import { live } from '@dxos/live-object';
|
|
10
12
|
import { log } from '@dxos/log';
|
|
11
13
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
12
14
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
@@ -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,11 +51,11 @@ 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.
|
|
56
|
-
defaultSpace.db.add(
|
|
58
|
+
defaultSpace.db.add(live({ key: SHARED, order: [] }));
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
// Await missing objects.
|
|
@@ -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,12 +13,10 @@ import { SpaceCapabilities } from './capabilities';
|
|
|
13
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
14
|
import { type PluginState } from '../types';
|
|
15
15
|
|
|
16
|
-
export default (context:
|
|
17
|
-
const sections = context.requestCapabilities(SpaceCapabilities.SettingsSection);
|
|
16
|
+
export default (context: PluginContext) => {
|
|
18
17
|
const state = new LocalStorageStore<PluginState>(SPACE_PLUGIN, {
|
|
19
18
|
awaiting: undefined,
|
|
20
19
|
spaceNames: {},
|
|
21
|
-
spaceSettingsOpenSections: sections.map((section) => section.id),
|
|
22
20
|
viewersByObject: {},
|
|
23
21
|
// TODO(wittjosiah): Stop using (Complex)Map inside reactive object.
|
|
24
22
|
viewersByIdentity: new ComplexMap(PublicKey.hash),
|
|
@@ -31,7 +29,7 @@ export default (context: PluginsContext) => {
|
|
|
31
29
|
.prop({ key: 'spaceNames', type: LocalStorageStore.json<Record<string, string>>() })
|
|
32
30
|
.prop({ key: 'enabledEdgeReplication', type: LocalStorageStore.bool() });
|
|
33
31
|
|
|
34
|
-
const manager = context.
|
|
32
|
+
const manager = context.getCapability(Capabilities.PluginManager);
|
|
35
33
|
const unsubscribe = effect(() => {
|
|
36
34
|
// TODO(wittjosiah): Find a way to make this capability-based.
|
|
37
35
|
const enabled = manager.enabled.includes('dxos.org/plugin/stack');
|
|
@@ -26,7 +26,7 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
26
26
|
const layout = useLayout();
|
|
27
27
|
|
|
28
28
|
const client = useClient();
|
|
29
|
-
const objects = useQuery(client.spaces, Filter.
|
|
29
|
+
const objects = useQuery(client.spaces, Filter.everything());
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
if (!id) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { baseSurface,
|
|
8
|
+
import { baseSurface, descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
9
9
|
|
|
10
10
|
import { SPACE_PLUGIN } from '../meta';
|
|
11
11
|
import type { CollectionType } from '../types';
|
|
@@ -21,10 +21,7 @@ export const CollectionMain = ({ collection }: { collection: CollectionType }) =
|
|
|
21
21
|
>
|
|
22
22
|
<p
|
|
23
23
|
role='alert'
|
|
24
|
-
className={mx(
|
|
25
|
-
descriptionText,
|
|
26
|
-
'border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words',
|
|
27
|
-
)}
|
|
24
|
+
className={mx(descriptionMessage, 'rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words')}
|
|
28
25
|
>
|
|
29
26
|
{collection.name ?? t('unnamed collection label')}
|
|
30
27
|
</p>
|
|
@@ -7,7 +7,7 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type Meta, type StoryObj } from '@storybook/react';
|
|
8
8
|
import React, { useEffect } from 'react';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { live, Filter, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
11
11
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
12
12
|
import { Dialog } from '@dxos/react-ui';
|
|
13
13
|
import { osTranslations } from '@dxos/shell/react';
|
|
@@ -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,11 +66,11 @@ 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) {
|
|
73
|
-
space.db.add(
|
|
73
|
+
space.db.add(live(CollectionType, { name: 'My Collection', objects: [], views: {} }));
|
|
74
74
|
}
|
|
75
75
|
}, [space]);
|
|
76
76
|
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '@dxos/app-framework';
|
|
17
17
|
import { invariant } from '@dxos/invariant';
|
|
18
18
|
import { useClient } from '@dxos/react-client';
|
|
19
|
-
import { getSpace,
|
|
19
|
+
import { getSpace, isLiveObject, isSpace, type Live, useSpaces } from '@dxos/react-client/echo';
|
|
20
20
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
21
21
|
|
|
22
22
|
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
@@ -27,7 +27,7 @@ import { type ObjectForm, SpaceAction } from '../../types';
|
|
|
27
27
|
export const CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
28
28
|
|
|
29
29
|
export type CreateObjectDialogProps = Pick<CreateObjectPanelProps, 'target' | 'typename' | 'name'> & {
|
|
30
|
-
shouldNavigate?: (object:
|
|
30
|
+
shouldNavigate?: (object: Live<any>) => boolean;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const CreateObjectDialog = ({
|
|
@@ -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
|
|
|
@@ -72,7 +72,7 @@ export const CreateObjectDialog = ({
|
|
|
72
72
|
invariant(space, 'Missing space');
|
|
73
73
|
const result = await dispatch(form.getIntent(data, { space }));
|
|
74
74
|
const object = result.data?.object;
|
|
75
|
-
if (
|
|
75
|
+
if (isLiveObject(object)) {
|
|
76
76
|
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object, hidden: form.hidden });
|
|
77
77
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
78
78
|
if (shouldNavigate(object)) {
|