@dxos/plugin-space 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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/{CollectionMain-D2B75XBS.mjs → CollectionArticle-WTHWY4YS.mjs} +10 -10
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs +141 -0
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs.map +7 -0
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs +144 -0
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs +116 -0
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs +517 -0
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-3A6KBYWT.mjs → app-graph-serializer-G3VFEGTN.mjs} +19 -19
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs.map +7 -0
- package/dist/lib/browser/chunk-6A3NWBB6.mjs +392 -0
- package/dist/lib/browser/chunk-6A3NWBB6.mjs.map +7 -0
- package/dist/lib/browser/chunk-C6DAPIFF.mjs +20 -0
- package/dist/lib/browser/chunk-C6DAPIFF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DCY3W36E.mjs → chunk-GJOZILGC.mjs} +210 -142
- package/dist/lib/browser/chunk-GJOZILGC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-J6YZG77T.mjs → chunk-KCZ527AM.mjs} +641 -500
- package/dist/lib/browser/chunk-KCZ527AM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ELJDGQTO.mjs → chunk-P25R3AOK.mjs} +35 -5
- package/dist/lib/browser/chunk-P25R3AOK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WAXS2ZVX.mjs → chunk-POFUXISV.mjs} +69 -62
- package/dist/lib/browser/chunk-POFUXISV.mjs.map +7 -0
- package/dist/lib/browser/chunk-VZBIIYFM.mjs +16 -0
- package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +7 -0
- package/dist/lib/browser/chunk-WJXU4GKV.mjs +19 -0
- package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-T6ZNVE7S.mjs → identity-created-NAXTPQXE.mjs} +5 -5
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +88 -131
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-7E3IZIJS.mjs → intent-resolver-RZEWNJ2K.mjs} +105 -100
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-JCRD74GI.mjs +30 -0
- package/dist/lib/browser/react-root-JCRD74GI.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-GL4CE2F4.mjs → react-surface-VOETEAG3.mjs} +91 -111
- package/dist/lib/browser/react-surface-VOETEAG3.mjs.map +7 -0
- package/dist/lib/browser/repair-CNLE35NF.mjs +44 -0
- package/dist/lib/browser/repair-CNLE35NF.mjs.map +7 -0
- package/dist/lib/browser/{settings-B6MMHLPS.mjs → settings-TRLI52I5.mjs} +5 -5
- package/dist/lib/browser/{settings-B6MMHLPS.mjs.map → settings-TRLI52I5.mjs.map} +1 -1
- package/dist/lib/browser/{spaces-ready-QVABOCO3.mjs → spaces-ready-OHGCWZHQ.mjs} +22 -15
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs.map +7 -0
- package/dist/lib/browser/{state-2RGW7FQG.mjs → state-C7N6EDDZ.mjs} +7 -7
- package/dist/lib/browser/state-C7N6EDDZ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -4
- package/dist/lib/node-esm/{CollectionMain-ZJIFCWKZ.mjs → CollectionArticle-KHXYT3SH.mjs} +10 -10
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs +142 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs +145 -0
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs +117 -0
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs +518 -0
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-M45TH5LR.mjs → app-graph-serializer-2NLWWFUB.mjs} +19 -19
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-Q6AAQLQG.mjs → chunk-7EV4SN47.mjs} +34 -5
- package/dist/lib/node-esm/chunk-7EV4SN47.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HYIZVPOA.mjs → chunk-AX3UGL5D.mjs} +69 -62
- package/dist/lib/node-esm/chunk-AX3UGL5D.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs +18 -0
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs +20 -0
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AUQ3SKL2.mjs → chunk-I6FZP42D.mjs} +210 -142
- package/dist/lib/node-esm/chunk-I6FZP42D.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZCEH2VYE.mjs → chunk-JAMGJUFU.mjs} +641 -500
- package/dist/lib/node-esm/chunk-JAMGJUFU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs +21 -0
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-X34VDVMY.mjs +393 -0
- package/dist/lib/node-esm/chunk-X34VDVMY.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-AL7NNCKH.mjs → identity-created-OXLKCJE3.mjs} +5 -5
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +88 -131
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-UVO4MKWX.mjs → intent-resolver-4PHJWDXW.mjs} +105 -100
- package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-5EKYI66P.mjs → react-root-O5I5CDJ7.mjs} +13 -12
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-IOC6YSVQ.mjs → react-surface-J3XDMU2D.mjs} +91 -111
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs.map +7 -0
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs +45 -0
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-IOFU6EAS.mjs → settings-MNQTKHL7.mjs} +5 -5
- package/dist/lib/node-esm/{settings-IOFU6EAS.mjs.map → settings-MNQTKHL7.mjs.map} +1 -1
- package/dist/lib/node-esm/{spaces-ready-MS6GHPFR.mjs → spaces-ready-ZPU24DA2.mjs} +22 -15
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs.map +7 -0
- package/dist/lib/node-esm/{state-7VBVBGNS.mjs → state-45TXZQJ6.mjs} +7 -7
- package/dist/lib/node-esm/state-45TXZQJ6.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -4
- package/dist/types/src/SpacePlugin.d.ts +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +13 -7
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +4 -0
- package/dist/types/src/capabilities/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +6 -0
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -0
- package/dist/types/src/components/CollectionSection.d.ts +3 -4
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +218 -215
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +16 -9
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/{JoinDialog.d.ts → JoinDialog/JoinDialog.d.ts} +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/components/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/components/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +1591 -0
- package/dist/types/src/components/{MembersContainer.stories.d.ts.map → MembersContainer/MembersContainer.stories.d.ts.map} +1 -1
- package/dist/types/src/components/MembersContainer/index.d.ts +2 -0
- package/dist/types/src/components/MembersContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +9 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts +10 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +3 -0
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +7 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts.map +1 -0
- 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/BaseObjectSettings.stories.d.ts +1424 -0
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts +3 -3
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts +2 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.d.ts +5 -0
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -0
- package/dist/types/src/components/{MembersContainer.stories.d.ts → RecordArticle.stories.d.ts} +219 -216
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -0
- package/dist/types/src/components/SchemaContainer.d.ts +2 -2
- 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 → SpacePresence/SpacePresence.d.ts} +6 -5
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -0
- package/dist/types/src/components/{SpacePresence.stories.d.ts → SpacePresence/SpacePresence.stories.d.ts} +220 -217
- package/dist/types/src/components/{SpacePresence.stories.d.ts.map → SpacePresence/SpacePresence.stories.d.ts.map} +1 -1
- package/dist/types/src/components/SpacePresence/index.d.ts +2 -0
- package/dist/types/src/components/SpacePresence/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts +7 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +218 -215
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +219 -216
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts +3 -4
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +10 -17
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/helpers/index.d.ts +2 -0
- package/dist/types/src/helpers/index.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +8 -0
- package/dist/types/src/helpers/query.d.ts.map +1 -0
- package/dist/types/src/helpers/query.test.d.ts +2 -0
- package/dist/types/src/helpers/query.test.d.ts.map +1 -0
- 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.map +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +1 -1
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/hooks/useTypeOptions.d.ts +10 -0
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1261 -67
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/form.d.ts +24 -0
- package/dist/types/src/types/form.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +82 -142
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +21 -34
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +68 -59
- package/src/SpacePlugin.ts +181 -215
- package/src/capabilities/app-graph-builder.ts +205 -267
- package/src/capabilities/app-graph-serializer.ts +12 -12
- package/src/capabilities/capabilities.ts +26 -16
- package/src/capabilities/identity-created.ts +2 -2
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/intent-resolver.ts +78 -75
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +95 -145
- package/src/capabilities/repair.ts +57 -0
- package/src/capabilities/spaces-ready.ts +15 -6
- package/src/capabilities/state.ts +2 -2
- package/src/components/AwaitingObject.tsx +12 -14
- package/src/components/{CollectionMain.tsx → CollectionArticle.tsx} +7 -6
- package/src/components/CollectionSection.tsx +8 -6
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +11 -11
- package/src/components/CreateDialog/CreateObjectDialog.tsx +63 -43
- package/src/components/CreateDialog/CreateObjectPanel.tsx +38 -31
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +30 -11
- package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +26 -10
- package/src/components/JoinDialog/index.ts +5 -0
- package/src/components/{MembersContainer.stories.tsx → MembersContainer/MembersContainer.stories.tsx} +7 -6
- package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +16 -14
- package/src/components/MembersContainer/index.ts +5 -0
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +51 -0
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +72 -0
- package/src/components/ObjectDetailsPanel/index.ts +7 -0
- package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx} +6 -6
- package/src/components/ObjectRenamePopover/index.ts +5 -0
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +6 -7
- package/src/components/ObjectSettings/BaseObjectSettings.stories.tsx +63 -0
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +90 -26
- package/src/components/ObjectSettings/ForeignKeys.tsx +8 -8
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -3
- package/src/components/ObjectSettings/index.ts +3 -1
- package/src/components/RecordArticle.stories.tsx +115 -0
- package/src/components/RecordArticle.tsx +114 -0
- package/src/components/SchemaContainer.tsx +24 -27
- package/src/components/SpacePluginSettings.tsx +10 -4
- package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +23 -25
- package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +16 -11
- package/src/components/SpacePresence/index.ts +5 -0
- package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +7 -6
- package/src/components/SpaceRenamePopover/index.ts +5 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +9 -4
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +63 -23
- package/src/components/SyncStatus/InlineSyncStatus.tsx +8 -8
- package/src/components/SyncStatus/SyncStatus.stories.tsx +4 -5
- package/src/components/SyncStatus/SyncStatus.tsx +107 -11
- package/src/components/ViewEditor.tsx +57 -23
- package/src/components/index.ts +7 -8
- package/src/events.ts +6 -6
- package/src/helpers/index.ts +5 -0
- package/src/helpers/query.test.ts +24 -0
- package/src/helpers/query.ts +158 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveSpace.ts +2 -1
- package/src/hooks/useInputSurfaceLookup.tsx +8 -3
- package/src/hooks/usePath.ts +1 -1
- package/src/hooks/useTypeOptions.ts +27 -0
- package/src/index.ts +1 -0
- package/src/meta.ts +6 -3
- package/src/translations.ts +68 -58
- package/src/types/form.ts +75 -0
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +44 -50
- package/src/util.tsx +216 -143
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-SY6FYTYC.mjs +0 -88
- package/dist/lib/browser/ObjectDetailsPanel-SY6FYTYC.mjs.map +0 -7
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +0 -68
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-FLF7XMQO.mjs +0 -516
- package/dist/lib/browser/app-graph-builder-FLF7XMQO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-3A6KBYWT.mjs.map +0 -7
- package/dist/lib/browser/chunk-CBYL62HG.mjs +0 -19
- package/dist/lib/browser/chunk-CBYL62HG.mjs.map +0 -7
- package/dist/lib/browser/chunk-DCY3W36E.mjs.map +0 -7
- package/dist/lib/browser/chunk-ELJDGQTO.mjs.map +0 -7
- package/dist/lib/browser/chunk-FBCGT5YY.mjs +0 -13
- package/dist/lib/browser/chunk-FBCGT5YY.mjs.map +0 -7
- package/dist/lib/browser/chunk-J6YZG77T.mjs.map +0 -7
- package/dist/lib/browser/chunk-RQVV4XVF.mjs +0 -343
- package/dist/lib/browser/chunk-RQVV4XVF.mjs.map +0 -7
- package/dist/lib/browser/chunk-TUQZO5P4.mjs +0 -20
- package/dist/lib/browser/chunk-TUQZO5P4.mjs.map +0 -7
- package/dist/lib/browser/chunk-WAXS2ZVX.mjs.map +0 -7
- package/dist/lib/browser/identity-created-T6ZNVE7S.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-7E3IZIJS.mjs.map +0 -7
- package/dist/lib/browser/react-root-RWMT2RCK.mjs +0 -29
- package/dist/lib/browser/react-root-RWMT2RCK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-GL4CE2F4.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-YDPFZELA.mjs +0 -26
- package/dist/lib/browser/schema-defs-YDPFZELA.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-QVABOCO3.mjs.map +0 -7
- package/dist/lib/browser/state-2RGW7FQG.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-3MYLTMXN.mjs +0 -89
- package/dist/lib/node-esm/ObjectDetailsPanel-3MYLTMXN.mjs.map +0 -7
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +0 -70
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-D5YPOJS5.mjs +0 -517
- package/dist/lib/node-esm/app-graph-builder-D5YPOJS5.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-M45TH5LR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AUQ3SKL2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FJZNSJC4.mjs +0 -20
- package/dist/lib/node-esm/chunk-FJZNSJC4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HC677WUJ.mjs +0 -21
- package/dist/lib/node-esm/chunk-HC677WUJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HWNG4MEU.mjs +0 -15
- package/dist/lib/node-esm/chunk-HWNG4MEU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HYIZVPOA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q6AAQLQG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WKQTO37U.mjs +0 -344
- package/dist/lib/node-esm/chunk-WKQTO37U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZCEH2VYE.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-AL7NNCKH.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-UVO4MKWX.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-5EKYI66P.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-IOC6YSVQ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-OYBCWKAS.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-OYBCWKAS.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-MS6GHPFR.mjs.map +0 -7
- package/dist/lib/node-esm/state-7VBVBGNS.mjs.map +0 -7
- package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
- package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
- package/dist/types/src/components/CollectionMain.d.ts +0 -7
- package/dist/types/src/components/CollectionMain.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel.d.ts +0 -9
- package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +0 -1
- package/dist/types/src/components/PersistenceStatus.d.ts +0 -6
- package/dist/types/src/components/PersistenceStatus.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +0 -1
- package/dist/types/src/components/RecordMain.d.ts +0 -7
- package/dist/types/src/components/RecordMain.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +0 -1
- package/src/capabilities/schema-defs.ts +0 -31
- package/src/components/ObjectDetailsPanel.tsx +0 -77
- package/src/components/PersistenceStatus.tsx +0 -83
- package/src/components/RecordMain.tsx +0 -43
- /package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +0 -0
|
@@ -2,43 +2,27 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
|
+
import type * as Schema from 'effect/Schema';
|
|
7
|
+
import React, { useCallback } from 'react';
|
|
7
8
|
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
contributes,
|
|
12
|
-
createSurface,
|
|
13
|
-
useCapabilities,
|
|
14
|
-
useCapability,
|
|
15
|
-
useLayout,
|
|
16
|
-
} from '@dxos/app-framework';
|
|
17
|
-
import { Obj, Type } from '@dxos/echo';
|
|
9
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
10
|
+
import { Surface, useCapability, useLayout } from '@dxos/app-framework/react';
|
|
11
|
+
import { Obj, type Ref } from '@dxos/echo';
|
|
18
12
|
import { findAnnotation } from '@dxos/effect';
|
|
19
13
|
import { SettingsStore } from '@dxos/local-storage';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
type Space,
|
|
24
|
-
SpaceState,
|
|
25
|
-
fullyQualifiedId,
|
|
26
|
-
getSpace,
|
|
27
|
-
isLiveObject,
|
|
28
|
-
isSpace,
|
|
29
|
-
parseId,
|
|
30
|
-
useSpace,
|
|
31
|
-
} from '@dxos/react-client/echo';
|
|
32
|
-
import { Input, useTranslation } from '@dxos/react-ui';
|
|
14
|
+
import { type Space, SpaceState, getSpace, isLiveObject, isSpace, parseId, useSpace } from '@dxos/react-client/echo';
|
|
15
|
+
import { Input } from '@dxos/react-ui';
|
|
33
16
|
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
34
17
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
35
|
-
import {
|
|
18
|
+
import { Collection, View, ViewAnnotation } from '@dxos/schema';
|
|
36
19
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
37
20
|
|
|
21
|
+
// TODO(burdon): Component name standard: NounVerbComponent.
|
|
38
22
|
import {
|
|
39
23
|
CREATE_OBJECT_DIALOG,
|
|
40
24
|
CREATE_SPACE_DIALOG,
|
|
41
|
-
|
|
25
|
+
CollectionArticle,
|
|
42
26
|
CollectionSection,
|
|
43
27
|
CreateObjectDialog,
|
|
44
28
|
type CreateObjectDialogProps,
|
|
@@ -48,23 +32,30 @@ import {
|
|
|
48
32
|
JoinDialog,
|
|
49
33
|
MembersContainer,
|
|
50
34
|
MenuFooter,
|
|
35
|
+
OBJECT_RENAME_POPOVER,
|
|
51
36
|
ObjectDetailsPanel,
|
|
37
|
+
ObjectRenamePopover,
|
|
52
38
|
ObjectSettingsContainer,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
PopoverRenameObject,
|
|
56
|
-
PopoverRenameSpace,
|
|
57
|
-
RecordMain,
|
|
39
|
+
RecordArticle,
|
|
40
|
+
SPACE_RENAME_POPOVER,
|
|
58
41
|
SchemaContainer,
|
|
59
42
|
SmallPresenceLive,
|
|
60
43
|
SpacePluginSettings,
|
|
61
44
|
SpacePresence,
|
|
45
|
+
SpaceRenamePopover,
|
|
62
46
|
SpaceSettingsContainer,
|
|
63
47
|
SyncStatus,
|
|
64
48
|
ViewEditor,
|
|
65
49
|
} from '../components';
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
50
|
+
import { useTypeOptions } from '../hooks';
|
|
51
|
+
import { meta } from '../meta';
|
|
52
|
+
import {
|
|
53
|
+
HueAnnotationId,
|
|
54
|
+
IconAnnotationId,
|
|
55
|
+
type SpaceSettingsProps,
|
|
56
|
+
type TypeInputOptions,
|
|
57
|
+
TypeInputOptionsAnnotationId,
|
|
58
|
+
} from '../types';
|
|
68
59
|
|
|
69
60
|
import { SpaceCapabilities } from './capabilities';
|
|
70
61
|
|
|
@@ -72,12 +63,10 @@ type ReactSurfaceOptions = {
|
|
|
72
63
|
createInvitationUrl: (invitationCode: string) => string;
|
|
73
64
|
};
|
|
74
65
|
|
|
75
|
-
const OMIT = [DataType.Collection.typename, DataType.QueryCollection.typename];
|
|
76
|
-
|
|
77
66
|
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
78
67
|
contributes(Capabilities.ReactSurface, [
|
|
79
68
|
createSurface({
|
|
80
|
-
id: `${
|
|
69
|
+
id: `${meta.id}/article`,
|
|
81
70
|
role: 'article',
|
|
82
71
|
filter: (data): data is { subject: Space } =>
|
|
83
72
|
// TODO(wittjosiah): Need to avoid shotgun parsing space state everywhere.
|
|
@@ -86,7 +75,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
86
75
|
<Surface
|
|
87
76
|
data={{
|
|
88
77
|
id: data.subject.id,
|
|
89
|
-
subject: data.subject.properties[
|
|
78
|
+
subject: data.subject.properties[Collection.Collection.typename]?.target,
|
|
90
79
|
}}
|
|
91
80
|
role={role}
|
|
92
81
|
{...rest}
|
|
@@ -94,36 +83,36 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
94
83
|
),
|
|
95
84
|
}),
|
|
96
85
|
createSurface({
|
|
97
|
-
id: `${
|
|
86
|
+
id: `${meta.id}/record-article`,
|
|
98
87
|
role: 'article',
|
|
99
88
|
position: 'fallback',
|
|
100
89
|
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
101
|
-
component: ({ data }) => <
|
|
90
|
+
component: ({ data }) => <RecordArticle subject={data.subject} />,
|
|
102
91
|
}),
|
|
103
92
|
createSurface({
|
|
104
|
-
id: `${
|
|
93
|
+
id: `${meta.id}/collection-fallback`,
|
|
105
94
|
role: 'article',
|
|
106
95
|
position: 'fallback',
|
|
107
|
-
filter: (data): data is { subject:
|
|
108
|
-
component: ({ data }) => <
|
|
96
|
+
filter: (data): data is { subject: Collection.Collection } => Obj.instanceOf(Collection.Collection, data.subject),
|
|
97
|
+
component: ({ data }) => <CollectionArticle subject={data.subject} />,
|
|
109
98
|
}),
|
|
110
99
|
createSurface({
|
|
111
|
-
id: `${
|
|
100
|
+
id: `${meta.id}/plugin-settings`,
|
|
112
101
|
role: 'article',
|
|
113
102
|
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
114
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
103
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
115
104
|
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
116
105
|
}),
|
|
117
106
|
createSurface({
|
|
118
|
-
id: `${
|
|
107
|
+
id: `${meta.id}/companion/object-settings`,
|
|
119
108
|
role: 'article',
|
|
120
109
|
filter: (data): data is { companionTo: Obj.Any } => Obj.isObject(data.companionTo) && data.subject === 'settings',
|
|
121
110
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
122
111
|
}),
|
|
123
112
|
createSurface({
|
|
124
|
-
id: `${
|
|
113
|
+
id: `${meta.id}/space-settings-properties`,
|
|
125
114
|
role: 'article',
|
|
126
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
115
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/properties`,
|
|
127
116
|
component: () => {
|
|
128
117
|
const layout = useLayout();
|
|
129
118
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -136,10 +125,10 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
136
125
|
},
|
|
137
126
|
}),
|
|
138
127
|
createSurface({
|
|
139
|
-
id: `${
|
|
128
|
+
id: `${meta.id}/space-settings-members`,
|
|
140
129
|
role: 'article',
|
|
141
130
|
position: 'hoist',
|
|
142
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
131
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/members`,
|
|
143
132
|
component: () => {
|
|
144
133
|
const layout = useLayout();
|
|
145
134
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -152,9 +141,9 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
152
141
|
},
|
|
153
142
|
}),
|
|
154
143
|
createSurface({
|
|
155
|
-
id: `${
|
|
144
|
+
id: `${meta.id}/space-settings-schema`,
|
|
156
145
|
role: 'article',
|
|
157
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
146
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/schema`,
|
|
158
147
|
component: () => {
|
|
159
148
|
const layout = useLayout();
|
|
160
149
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -167,14 +156,14 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
167
156
|
},
|
|
168
157
|
}),
|
|
169
158
|
createSurface({
|
|
170
|
-
id: `${
|
|
159
|
+
id: `${meta.id}/selected-objects`,
|
|
171
160
|
role: 'article',
|
|
172
|
-
filter: (data): data is { companionTo:
|
|
173
|
-
Obj.instanceOf(
|
|
161
|
+
filter: (data): data is { companionTo: View.View; subject: 'selected-objects' } =>
|
|
162
|
+
Obj.instanceOf(View.View, data.companionTo) && data.subject === 'selected-objects',
|
|
174
163
|
component: ({ data }) => (
|
|
175
164
|
<ObjectDetailsPanel
|
|
176
|
-
key={
|
|
177
|
-
objectId={
|
|
165
|
+
key={Obj.getDXN(data.companionTo).toString()}
|
|
166
|
+
objectId={Obj.getDXN(data.companionTo).toString()}
|
|
178
167
|
view={data.companionTo}
|
|
179
168
|
/>
|
|
180
169
|
),
|
|
@@ -198,7 +187,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
198
187
|
component: ({ data }) => <CreateObjectDialog {...data.props} />,
|
|
199
188
|
}),
|
|
200
189
|
createSurface({
|
|
201
|
-
id: `${
|
|
190
|
+
id: `${meta.id}/create-initial-space-form-[hue]`,
|
|
202
191
|
role: 'form-input',
|
|
203
192
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
204
193
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
@@ -217,7 +206,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
217
206
|
},
|
|
218
207
|
}),
|
|
219
208
|
createSurface({
|
|
220
|
-
id: `${
|
|
209
|
+
id: `${meta.id}/create-initial-space-form-[icon]`,
|
|
221
210
|
role: 'form-input',
|
|
222
211
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
223
212
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
@@ -236,116 +225,77 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
236
225
|
},
|
|
237
226
|
}),
|
|
238
227
|
createSurface({
|
|
239
|
-
id: `${
|
|
228
|
+
id: `${meta.id}/typename-form-input`,
|
|
240
229
|
role: 'form-input',
|
|
241
230
|
filter: (
|
|
242
231
|
data,
|
|
243
|
-
): data is {
|
|
232
|
+
): data is {
|
|
233
|
+
prop: string;
|
|
234
|
+
schema: Schema.Schema.Any;
|
|
235
|
+
target: Space | Collection.Collection | undefined;
|
|
236
|
+
} => {
|
|
244
237
|
if (data.prop !== 'typename') {
|
|
245
238
|
return false;
|
|
246
239
|
}
|
|
247
240
|
|
|
248
|
-
|
|
241
|
+
// TODO(wittjosiah): This doesn't work here.
|
|
242
|
+
// const annotation = TypeInputOptionsAnnotation.get(data.schema as Schema.Schema.Any);
|
|
243
|
+
const annotation = findAnnotation((data.schema as Schema.Schema.All).ast, TypeInputOptionsAnnotationId);
|
|
249
244
|
return !!annotation;
|
|
250
245
|
},
|
|
251
246
|
component: ({ data: { schema, target }, ...inputProps }) => {
|
|
252
|
-
const { t } = useTranslation();
|
|
253
|
-
const client = useClient();
|
|
254
247
|
const props = inputProps as any as InputProps;
|
|
255
248
|
const space = isSpace(target) ? target : getSpace(target);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const annotation = findAnnotation<TypenameAnnotation[]>(schema.ast, TypenameAnnotationId)!;
|
|
261
|
-
|
|
262
|
-
const schemaWhitelists = useCapabilities(ClientCapabilities.SchemaWhiteList);
|
|
263
|
-
const whitelistedTypenames = useMemo(
|
|
264
|
-
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => Type.getTypename(type)))),
|
|
265
|
-
[schemaWhitelists],
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
const objectForms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
269
|
-
const objectFormTypenames = useMemo(
|
|
270
|
-
() =>
|
|
271
|
-
new Set(
|
|
272
|
-
objectForms
|
|
273
|
-
.map((form) => Type.getTypename(form.objectSchema))
|
|
274
|
-
// TODO(wittjosiah): Remove.
|
|
275
|
-
.filter((typename) => !OMIT.includes(typename) && !typename.endsWith('View')),
|
|
276
|
-
),
|
|
277
|
-
[objectForms],
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
const fixed = client.graph.schemaRegistry.schemas.filter((schema) => {
|
|
281
|
-
const limitedStatic =
|
|
282
|
-
annotation.includes('limited-static') && whitelistedTypenames.has(Type.getTypename(schema));
|
|
283
|
-
const unusedStatic =
|
|
284
|
-
annotation.includes('unused-static') &&
|
|
285
|
-
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
286
|
-
!space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
287
|
-
const usedStatic =
|
|
288
|
-
annotation.includes('used-static') &&
|
|
289
|
-
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
290
|
-
space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
291
|
-
const objectForm = annotation.includes('object-form') && objectFormTypenames.has(Type.getTypename(schema));
|
|
292
|
-
return annotation.includes('static') || limitedStatic || unusedStatic || usedStatic || objectForm;
|
|
293
|
-
});
|
|
294
|
-
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
295
|
-
const typenames = Array.from(
|
|
296
|
-
new Set<string>([
|
|
297
|
-
...(annotation.includes('limited-static') ||
|
|
298
|
-
annotation.includes('unused-static') ||
|
|
299
|
-
annotation.includes('used-static') ||
|
|
300
|
-
annotation.includes('static') ||
|
|
301
|
-
annotation.includes('object-form')
|
|
302
|
-
? fixed.map((schema) => Type.getTypename(schema))
|
|
303
|
-
: []),
|
|
304
|
-
...(annotation.includes('dynamic') ? dynamic.map((schema) => schema.typename) : []),
|
|
305
|
-
]),
|
|
306
|
-
).sort();
|
|
307
|
-
|
|
308
|
-
const options = useMemo(
|
|
309
|
-
() =>
|
|
310
|
-
typenames
|
|
311
|
-
.map((typename) => ({
|
|
312
|
-
value: typename,
|
|
313
|
-
label: t('typename label', { ns: typename, defaultValue: typename }),
|
|
314
|
-
}))
|
|
315
|
-
.toSorted((a, b) => a.label.localeCompare(b.label)),
|
|
316
|
-
[t, typenames],
|
|
317
|
-
);
|
|
249
|
+
const annotation = findAnnotation<TypeInputOptions>(schema.ast, TypeInputOptionsAnnotationId)!;
|
|
250
|
+
const options = useTypeOptions({ space, annotation });
|
|
318
251
|
|
|
319
252
|
return <SelectInput {...props} options={options} />;
|
|
320
253
|
},
|
|
321
254
|
}),
|
|
322
255
|
createSurface({
|
|
323
|
-
id: `${
|
|
256
|
+
id: `${meta.id}/object-settings`,
|
|
324
257
|
role: 'object-settings',
|
|
325
|
-
filter: (data): data is { subject:
|
|
326
|
-
|
|
258
|
+
filter: (data): data is { subject: { view: Ref.Ref<View.View> } } => {
|
|
259
|
+
if (!Obj.isObject(data.subject)) {
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const schema = Obj.getSchema(data.subject);
|
|
264
|
+
return Option.fromNullable(schema).pipe(
|
|
265
|
+
Option.flatMap((schema) => ViewAnnotation.get(schema)),
|
|
266
|
+
Option.getOrElse(() => false),
|
|
267
|
+
);
|
|
268
|
+
},
|
|
269
|
+
component: ({ data }) => {
|
|
270
|
+
const view = data.subject.view.target;
|
|
271
|
+
if (!view) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return <ViewEditor view={view} />;
|
|
276
|
+
},
|
|
327
277
|
}),
|
|
328
278
|
createSurface({
|
|
329
|
-
id:
|
|
279
|
+
id: SPACE_RENAME_POPOVER,
|
|
330
280
|
role: 'card--popover',
|
|
331
|
-
filter: (data): data is { props: Space } => data.component ===
|
|
332
|
-
component: ({ data }) => <
|
|
281
|
+
filter: (data): data is { props: Space } => data.component === SPACE_RENAME_POPOVER && isSpace(data.props),
|
|
282
|
+
component: ({ data }) => <SpaceRenamePopover space={data.props} />,
|
|
333
283
|
}),
|
|
334
284
|
createSurface({
|
|
335
|
-
id:
|
|
285
|
+
id: OBJECT_RENAME_POPOVER,
|
|
336
286
|
role: 'card--popover',
|
|
337
287
|
filter: (data): data is { props: Obj.Any } =>
|
|
338
|
-
data.component ===
|
|
339
|
-
component: ({ data }) => <
|
|
288
|
+
data.component === OBJECT_RENAME_POPOVER && isLiveObject(data.props),
|
|
289
|
+
component: ({ data }) => <ObjectRenamePopover object={data.props} />,
|
|
340
290
|
}),
|
|
341
291
|
createSurface({
|
|
342
|
-
id: `${
|
|
292
|
+
id: `${meta.id}/menu-footer`,
|
|
343
293
|
role: 'menu-footer',
|
|
344
294
|
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
345
295
|
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
346
296
|
}),
|
|
347
297
|
createSurface({
|
|
348
|
-
id: `${
|
|
298
|
+
id: `${meta.id}/navtree-presence`,
|
|
349
299
|
role: 'navtree-item-end',
|
|
350
300
|
filter: (data): data is { id: string; subject: Obj.Any; open?: boolean } =>
|
|
351
301
|
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
@@ -357,7 +307,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
357
307
|
}),
|
|
358
308
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
359
309
|
createSurface({
|
|
360
|
-
id: `${
|
|
310
|
+
id: `${meta.id}/navtree-presence-fallback`,
|
|
361
311
|
role: 'navtree-item-end',
|
|
362
312
|
position: 'fallback',
|
|
363
313
|
filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
|
|
@@ -365,13 +315,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
365
315
|
}),
|
|
366
316
|
// TODO(wittjosiah): Broken?
|
|
367
317
|
createSurface({
|
|
368
|
-
id: `${
|
|
318
|
+
id: `${meta.id}/navtree-sync-status`,
|
|
369
319
|
role: 'navtree-item-end',
|
|
370
320
|
filter: (data): data is { subject: Space; open?: boolean } => isSpace(data.subject),
|
|
371
321
|
component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,
|
|
372
322
|
}),
|
|
373
323
|
createSurface({
|
|
374
|
-
id: `${
|
|
324
|
+
id: `${meta.id}/navbar-presence`,
|
|
375
325
|
role: 'navbar-end',
|
|
376
326
|
position: 'hoist',
|
|
377
327
|
filter: (data): data is { subject: Space | Obj.Any } => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
@@ -379,7 +329,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
379
329
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
380
330
|
const object = isSpace(data.subject)
|
|
381
331
|
? data.subject.state.get() === SpaceState.SPACE_READY
|
|
382
|
-
? (space?.properties[
|
|
332
|
+
? (space?.properties[Collection.Collection.typename]?.target as Collection.Collection)
|
|
383
333
|
: undefined
|
|
384
334
|
: data.subject;
|
|
385
335
|
|
|
@@ -387,13 +337,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
387
337
|
},
|
|
388
338
|
}),
|
|
389
339
|
createSurface({
|
|
390
|
-
id: `${
|
|
340
|
+
id: `${meta.id}/collection-section`,
|
|
391
341
|
role: 'section',
|
|
392
|
-
filter: (data): data is { subject:
|
|
393
|
-
component: ({ data }) => <CollectionSection
|
|
342
|
+
filter: (data): data is { subject: Collection.Collection } => Obj.instanceOf(Collection.Collection, data.subject),
|
|
343
|
+
component: ({ data }) => <CollectionSection subject={data.subject} />,
|
|
394
344
|
}),
|
|
395
345
|
createSurface({
|
|
396
|
-
id: `${
|
|
346
|
+
id: `${meta.id}/status`,
|
|
397
347
|
role: 'status',
|
|
398
348
|
component: () => <SyncStatus />,
|
|
399
349
|
}),
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { contributes } from '@dxos/app-framework';
|
|
6
|
+
import { Obj, Ref, Type } from '@dxos/echo';
|
|
7
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
8
|
+
import { Collection } from '@dxos/schema';
|
|
9
|
+
|
|
10
|
+
import { SpaceCapabilities } from './capabilities';
|
|
11
|
+
|
|
12
|
+
export default () =>
|
|
13
|
+
contributes(SpaceCapabilities.Repair, async ({ space }) => {
|
|
14
|
+
await removeQueryCollections(space);
|
|
15
|
+
await ensureSystemCollection(space);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Remove all existing query collections from the root collection.
|
|
20
|
+
*/
|
|
21
|
+
const removeQueryCollections = async (space: Space) => {
|
|
22
|
+
const rootCollection: Collection.Collection = await space.properties[Collection.Collection.typename]?.load();
|
|
23
|
+
if (!rootCollection) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const objects = await Promise.all(rootCollection.objects.map((ref) => ref.load()));
|
|
28
|
+
const queryCollections = objects.filter((object) => Obj.getTypename(object) === 'dxos.org/type/QueryCollection');
|
|
29
|
+
if (queryCollections.length === 0) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
rootCollection.objects = objects
|
|
34
|
+
.filter((object) => Obj.getTypename(object) !== 'dxos.org/type/QueryCollection')
|
|
35
|
+
.map((object) => Ref.make(object));
|
|
36
|
+
queryCollections.forEach((object) => space.db.remove(object));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Ensure the root collection has a system collection for StoredSchema.
|
|
41
|
+
*/
|
|
42
|
+
const ensureSystemCollection = async (space: Space) => {
|
|
43
|
+
const rootCollection: Collection.Collection = await space.properties[Collection.Collection.typename]?.load();
|
|
44
|
+
if (!rootCollection) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const objects = await Promise.all(rootCollection.objects.map((ref) => ref.load()));
|
|
49
|
+
const records = objects.find(
|
|
50
|
+
(object) => Obj.instanceOf(Collection.Managed, object) && object.key === Type.getTypename(Type.PersistentType),
|
|
51
|
+
);
|
|
52
|
+
if (records) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
rootCollection.objects.push(Ref.make(Collection.makeManaged({ key: Type.getTypename(Type.PersistentType) })));
|
|
57
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
8
|
import { SubscriptionList } from '@dxos/async';
|
|
@@ -14,7 +14,7 @@ import { ClientCapabilities } from '@dxos/plugin-client';
|
|
|
14
14
|
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
15
15
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
16
|
import { PublicKey } from '@dxos/react-client';
|
|
17
|
-
import {
|
|
17
|
+
import { SpaceState, parseId } from '@dxos/react-client/echo';
|
|
18
18
|
import { ComplexMap, reduceGroupBy } from '@dxos/util';
|
|
19
19
|
|
|
20
20
|
import { SpaceAction } from '../types';
|
|
@@ -25,6 +25,9 @@ import { SpaceCapabilities } from './capabilities';
|
|
|
25
25
|
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
26
26
|
const WAIT_FOR_OBJECT_TIMEOUT = 5_000;
|
|
27
27
|
|
|
28
|
+
// E.g., dxn:echo:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
|
|
29
|
+
const ECHO_DXN_LENGTH = 3 + 1 + 4 + 1 + 33 + 1 + 26;
|
|
30
|
+
|
|
28
31
|
export default async (context: PluginContext) => {
|
|
29
32
|
const subscriptions = new SubscriptionList();
|
|
30
33
|
const spaceSubscriptions = new SubscriptionList();
|
|
@@ -69,7 +72,7 @@ export default async (context: PluginContext) => {
|
|
|
69
72
|
|
|
70
73
|
const id = active[0];
|
|
71
74
|
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
72
|
-
if (!node && id.length ===
|
|
75
|
+
if (!node && id.length === ECHO_DXN_LENGTH) {
|
|
73
76
|
void graph.initialize(id);
|
|
74
77
|
const timeout = setTimeout(async () => {
|
|
75
78
|
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
@@ -98,7 +101,13 @@ export default async (context: PluginContext) => {
|
|
|
98
101
|
subscriptions.add(
|
|
99
102
|
scheduledEffect(
|
|
100
103
|
() => ({ name: space.properties.name }),
|
|
101
|
-
({ name }) =>
|
|
104
|
+
({ name }) => {
|
|
105
|
+
if (!name) {
|
|
106
|
+
delete state.spaceNames[space.id];
|
|
107
|
+
} else {
|
|
108
|
+
state.spaceNames[space.id] = name;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
102
111
|
),
|
|
103
112
|
);
|
|
104
113
|
});
|
|
@@ -117,7 +126,7 @@ export default async (context: PluginContext) => {
|
|
|
117
126
|
// Group parts by space for efficient messaging.
|
|
118
127
|
const idsBySpace = reduceGroupBy(active, (id) => {
|
|
119
128
|
try {
|
|
120
|
-
const
|
|
129
|
+
const { spaceId } = parseId(id);
|
|
121
130
|
return spaceId;
|
|
122
131
|
} catch {
|
|
123
132
|
return null;
|
|
@@ -126,7 +135,7 @@ export default async (context: PluginContext) => {
|
|
|
126
135
|
|
|
127
136
|
const removedBySpace = reduceGroupBy(inactive, (id) => {
|
|
128
137
|
try {
|
|
129
|
-
const
|
|
138
|
+
const { spaceId } = parseId(id);
|
|
130
139
|
return spaceId;
|
|
131
140
|
} catch {
|
|
132
141
|
return null;
|
|
@@ -9,13 +9,13 @@ import { PublicKey } from '@dxos/keys';
|
|
|
9
9
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
10
|
import { ComplexMap } from '@dxos/util';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '../meta';
|
|
13
13
|
import { type PluginState } from '../types';
|
|
14
14
|
|
|
15
15
|
import { SpaceCapabilities } from './capabilities';
|
|
16
16
|
|
|
17
17
|
export default (context: PluginContext) => {
|
|
18
|
-
const state = new LocalStorageStore<PluginState>(
|
|
18
|
+
const state = new LocalStorageStore<PluginState>(meta.id, {
|
|
19
19
|
awaiting: undefined,
|
|
20
20
|
spaceNames: {},
|
|
21
21
|
viewersByObject: {},
|
|
@@ -4,23 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { LayoutAction, createIntent
|
|
7
|
+
import { LayoutAction, createIntent } from '@dxos/app-framework';
|
|
8
|
+
import { useIntentDispatcher, useLayout } from '@dxos/app-framework/react';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
8
10
|
import { useClient } from '@dxos/react-client';
|
|
9
|
-
import { Filter,
|
|
11
|
+
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
10
12
|
import { Button, Icon, Toast, useTranslation } from '@dxos/react-ui';
|
|
11
13
|
|
|
12
|
-
import {
|
|
14
|
+
import { meta } from '../meta';
|
|
13
15
|
import { SpaceAction } from '../types';
|
|
14
16
|
|
|
15
|
-
const WAIT_FOR_OBJECT_TIMEOUT =
|
|
16
|
-
const TOAST_TIMEOUT =
|
|
17
|
+
const WAIT_FOR_OBJECT_TIMEOUT = 3 * 60 * 1_000;
|
|
18
|
+
const TOAST_TIMEOUT = 4 * 60 * 1_000;
|
|
17
19
|
|
|
18
20
|
export const AwaitingObject = ({ id }: { id: string }) => {
|
|
21
|
+
const { t } = useTranslation(meta.id);
|
|
22
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
19
23
|
const [open, setOpen] = useState(true);
|
|
20
24
|
const [waiting, setWaiting] = useState(true);
|
|
21
25
|
const [found, setFound] = useState(false);
|
|
22
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
23
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
24
26
|
const layout = useLayout();
|
|
25
27
|
|
|
26
28
|
const client = useClient();
|
|
@@ -31,17 +33,13 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
const timeout = setTimeout(() =>
|
|
35
|
-
|
|
36
|
-
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
37
|
-
|
|
38
|
-
() => clearTimeout(timeout);
|
|
36
|
+
const timeout = setTimeout(() => setWaiting(false), WAIT_FOR_OBJECT_TIMEOUT);
|
|
37
|
+
return () => clearTimeout(timeout);
|
|
39
38
|
}, [id]);
|
|
40
39
|
|
|
41
40
|
useEffect(() => {
|
|
42
|
-
if (objects.findIndex((object) =>
|
|
41
|
+
if (objects.findIndex((object) => Obj.getDXN(object).toString() === id) > -1) {
|
|
43
42
|
setFound(true);
|
|
44
|
-
|
|
45
43
|
if (layout.active.includes(id)) {
|
|
46
44
|
setOpen(false);
|
|
47
45
|
}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
7
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
9
|
import { baseSurface, descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
9
|
-
import { type
|
|
10
|
+
import { type Collection } from '@dxos/schema';
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
+
import { meta } from '../meta';
|
|
12
13
|
|
|
13
|
-
export const
|
|
14
|
-
const { t } = useTranslation(
|
|
14
|
+
export const CollectionArticle = ({ subject }: SurfaceComponentProps<Collection.Collection>) => {
|
|
15
|
+
const { t } = useTranslation(meta.id);
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
18
|
<div
|
|
@@ -23,10 +24,10 @@ export const CollectionMain = ({ collection }: { collection: DataType.Collection
|
|
|
23
24
|
role='alert'
|
|
24
25
|
className={mx(descriptionMessage, 'rounded-md p-8 font-normal text-lg max-is-[24rem] break-words')}
|
|
25
26
|
>
|
|
26
|
-
{
|
|
27
|
+
{subject.name ?? t('unnamed collection label')}
|
|
27
28
|
</p>
|
|
28
29
|
</div>
|
|
29
30
|
);
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
export default
|
|
33
|
+
export default CollectionArticle;
|