@dxos/plugin-space 0.8.4-main.66e292d → 0.8.4-main.69d29f4
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/CollectionArticle-XPNA6EHZ.mjs +129 -0
- package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs.map +7 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +148 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +142 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +107 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +523 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +84 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +7 -0
- package/dist/lib/browser/chunk-3X2EA2OA.mjs +1898 -0
- package/dist/lib/browser/chunk-3X2EA2OA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-P25R3AOK.mjs → chunk-4WZUGLQQ.mjs} +49 -56
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs +19 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +7 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs +13 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs.map +7 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs +714 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VZBIIYFM.mjs → chunk-HSMQFM57.mjs} +1 -1
- package/dist/lib/browser/chunk-HSMQFM57.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GJOZILGC.mjs → chunk-SUI34XSA.mjs} +204 -200
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-POFUXISV.mjs → chunk-ZT2VPYRM.mjs} +4 -3
- package/dist/lib/browser/{chunk-POFUXISV.mjs.map → chunk-ZT2VPYRM.mjs.map} +2 -2
- package/dist/lib/browser/cli/index.mjs +849 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs +23 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +213 -192
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +827 -0
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +7 -0
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs +30 -0
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs.map +7 -0
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs +382 -0
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs.map +7 -0
- package/dist/lib/browser/{repair-CNLE35NF.mjs → repair-CJG26D52.mjs} +16 -10
- package/dist/lib/browser/repair-CJG26D52.mjs.map +7 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs +33 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +7 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +242 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +7 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs +58 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -8
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs +130 -0
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +149 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +143 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +108 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +524 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +85 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs → chunk-2SW6S2BB.mjs} +4 -3
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs.map → chunk-2SW6S2BB.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-I6FZP42D.mjs → chunk-7KMYUWSR.mjs} +204 -200
- package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs +20 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-EYS3L2NO.mjs +1899 -0
- package/dist/lib/node-esm/chunk-EYS3L2NO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs +15 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7EV4SN47.mjs → chunk-JOBIWCBC.mjs} +49 -56
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +715 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BDEFTL6K.mjs → chunk-SL4BJSUG.mjs} +1 -1
- package/dist/lib/node-esm/chunk-SL4BJSUG.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +850 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +25 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +213 -192
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs +828 -0
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs +31 -0
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs +383 -0
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-EHZS6MFY.mjs → repair-G3ZW3VG3.mjs} +16 -10
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +7 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs +34 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +7 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +243 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +7 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs +59 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -8
- package/dist/types/src/SpacePlugin.d.ts +3 -15
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts +5 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts +3 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -20
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +6 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +9 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +8 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts +3 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +5 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +13 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +17 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/add.d.ts +17 -0
- package/dist/types/src/cli/commands/database/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/index.d.ts +3 -0
- package/dist/types/src/cli/commands/database/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts +13 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/remove.d.ts +9 -0
- package/dist/types/src/cli/commands/database/remove.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/stats.d.ts +6 -0
- package/dist/types/src/cli/commands/database/stats.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/util.d.ts +14 -0
- package/dist/types/src/cli/commands/database/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +4 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/index.d.ts +7 -0
- package/dist/types/src/cli/commands/queue/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/query.d.ts +8 -0
- package/dist/types/src/cli/commands/queue/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/util.d.ts +6 -0
- package/dist/types/src/cli/commands/queue/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts +12 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts +12 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/index.d.ts +31 -0
- package/dist/types/src/cli/commands/space/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts +13 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts +14 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts +17 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts +13 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts +9 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts +12 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts +8 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts +19 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts +6 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +5 -2
- package/dist/types/src/components/CollectionArticle.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/CreateObjectDialog.stories.d.ts +16 -6
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -4
- 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/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +10 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +1 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts +8 -0
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectDetailsPanel → ObjectCardStack}/ObjectForm.d.ts +2 -3
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts +3 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts +9 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +9 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts +3 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +1 -1
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.d.ts +1 -1
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +10 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts +4 -4
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +9 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +10 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +9 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +14 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +6 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +3 -4
- package/dist/types/src/helpers/query.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +2 -2
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -8
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +2 -2
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +9 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +71 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/form.d.ts +1 -3
- package/dist/types/src/types/form.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +638 -355
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +35 -31
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -69
- package/src/SpacePlugin.ts +153 -192
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +617 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +82 -0
- package/src/capabilities/app-graph-serializer/index.ts +7 -0
- package/src/capabilities/identity-created/identity-created.ts +29 -0
- package/src/capabilities/identity-created/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +760 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +375 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +21 -11
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +32 -0
- package/src/capabilities/spaces-ready/index.ts +7 -0
- package/src/capabilities/spaces-ready/spaces-ready.ts +289 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +64 -0
- package/src/cli/commands/database/add.ts +116 -0
- package/src/cli/commands/database/index.ts +16 -0
- package/src/cli/commands/database/query/index.ts +5 -0
- package/src/cli/commands/database/query/query.test.ts +55 -0
- package/src/cli/commands/database/query/query.ts +44 -0
- package/src/cli/commands/database/remove.ts +51 -0
- package/src/cli/commands/database/stats.ts +44 -0
- package/src/cli/commands/database/util.ts +32 -0
- package/src/cli/commands/index.ts +7 -0
- package/src/cli/commands/queue/index.ts +12 -0
- package/src/cli/commands/queue/query.ts +45 -0
- package/src/cli/commands/queue/util.ts +19 -0
- package/src/cli/commands/space/close/close.ts +40 -0
- package/src/cli/commands/space/close/index.ts +5 -0
- package/src/cli/commands/space/create/create.test.ts +67 -0
- package/src/cli/commands/space/create/create.ts +61 -0
- package/src/cli/commands/space/create/index.ts +5 -0
- package/src/cli/commands/space/index.ts +21 -0
- package/src/cli/commands/space/info/index.ts +5 -0
- package/src/cli/commands/space/info/info.test.ts +47 -0
- package/src/cli/commands/space/info/info.ts +37 -0
- package/src/cli/commands/space/join/index.ts +5 -0
- package/src/cli/commands/space/join/join.ts +122 -0
- package/src/cli/commands/space/join/util.ts +82 -0
- package/src/cli/commands/space/list/index.ts +5 -0
- package/src/cli/commands/space/list/list.test.ts +36 -0
- package/src/cli/commands/space/list/list.ts +30 -0
- package/src/cli/commands/space/members/index.ts +5 -0
- package/src/cli/commands/space/members/members.test.ts +46 -0
- package/src/cli/commands/space/members/members.ts +40 -0
- package/src/cli/commands/space/members/util.ts +29 -0
- package/src/cli/commands/space/open/index.ts +5 -0
- package/src/cli/commands/space/open/open.ts +39 -0
- package/src/cli/commands/space/schema/index.ts +12 -0
- package/src/cli/commands/space/schema/list/index.ts +5 -0
- package/src/cli/commands/space/schema/list/list.test.ts +42 -0
- package/src/cli/commands/space/schema/list/list.ts +64 -0
- package/src/cli/commands/space/schema/list/util.ts +39 -0
- package/src/cli/commands/space/share/index.ts +5 -0
- package/src/cli/commands/space/share/share.ts +112 -0
- package/src/cli/commands/space/sync/index.ts +5 -0
- package/src/cli/commands/space/sync/sync.test.ts +12 -0
- package/src/cli/commands/space/sync/sync.ts +33 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +81 -0
- package/src/components/AwaitingObject.tsx +13 -10
- package/src/components/CollectionArticle.tsx +144 -19
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +27 -21
- package/src/components/CreateDialog/CreateObjectDialog.tsx +39 -47
- package/src/components/CreateDialog/CreateObjectPanel.tsx +125 -70
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -47
- package/src/components/JoinDialog/JoinDialog.tsx +25 -52
- package/src/components/MembersContainer/MembersContainer.stories.tsx +2 -2
- package/src/components/MembersContainer/MembersContainer.tsx +35 -37
- package/src/components/MenuFooter.tsx +1 -1
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +67 -0
- package/src/components/ObjectCardStack/ObjectForm.tsx +97 -0
- package/src/components/ObjectCardStack/index.ts +7 -0
- package/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.tsx +4 -4
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
- package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
- package/src/components/ObjectDetails/index.ts +7 -0
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +9 -13
- package/src/components/RecordArticle.stories.tsx +12 -12
- package/src/components/RecordArticle.tsx +26 -18
- package/src/components/SchemaContainer.tsx +3 -3
- package/src/components/SpacePluginSettings.tsx +11 -7
- package/src/components/SpacePresence/SpacePresence.tsx +14 -16
- package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +11 -12
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +180 -184
- package/src/components/SyncStatus/SyncStatus.tsx +1 -1
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +16 -13
- package/src/components/index.ts +5 -5
- package/src/constants.ts +11 -0
- package/src/helpers/query.ts +7 -12
- package/src/hooks/useActiveSpace.ts +6 -4
- package/src/hooks/useInputSurfaceLookup.tsx +8 -17
- package/src/hooks/usePath.ts +4 -4
- package/src/hooks/useTypeOptions.ts +1 -3
- package/src/index.ts +1 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +2 -0
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +15 -0
- package/src/types/form.ts +26 -32
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +528 -247
- package/src/util.tsx +219 -231
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs +0 -31
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs +0 -141
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs.map +0 -7
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs +0 -144
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs.map +0 -7
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs +0 -116
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs +0 -517
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs.map +0 -7
- package/dist/lib/browser/chunk-6A3NWBB6.mjs +0 -392
- package/dist/lib/browser/chunk-6A3NWBB6.mjs.map +0 -7
- package/dist/lib/browser/chunk-C6DAPIFF.mjs +0 -20
- package/dist/lib/browser/chunk-C6DAPIFF.mjs.map +0 -7
- package/dist/lib/browser/chunk-GJOZILGC.mjs.map +0 -7
- package/dist/lib/browser/chunk-KCZ527AM.mjs +0 -2126
- package/dist/lib/browser/chunk-KCZ527AM.mjs.map +0 -7
- package/dist/lib/browser/chunk-P25R3AOK.mjs.map +0 -7
- package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WJXU4GKV.mjs +0 -19
- package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +0 -7
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs +0 -23
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs +0 -773
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs.map +0 -7
- package/dist/lib/browser/react-root-JCRD74GI.mjs +0 -30
- package/dist/lib/browser/react-root-JCRD74GI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VOETEAG3.mjs +0 -365
- package/dist/lib/browser/react-surface-VOETEAG3.mjs.map +0 -7
- package/dist/lib/browser/repair-CNLE35NF.mjs.map +0 -7
- package/dist/lib/browser/settings-TRLI52I5.mjs +0 -24
- package/dist/lib/browser/settings-TRLI52I5.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs +0 -208
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs.map +0 -7
- package/dist/lib/browser/state-C7N6EDDZ.mjs +0 -47
- package/dist/lib/browser/state-C7N6EDDZ.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs +0 -32
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs +0 -142
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs +0 -145
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs.map +0 -7
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs +0 -117
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs +0 -518
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7EV4SN47.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs +0 -20
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-I6FZP42D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAMGJUFU.mjs +0 -2127
- package/dist/lib/node-esm/chunk-JAMGJUFU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs +0 -21
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X34VDVMY.mjs +0 -393
- package/dist/lib/node-esm/chunk-X34VDVMY.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs +0 -25
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs +0 -774
- package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs +0 -31
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs +0 -366
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs.map +0 -7
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-MNQTKHL7.mjs +0 -25
- package/dist/lib/node-esm/settings-MNQTKHL7.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs +0 -209
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs.map +0 -7
- package/dist/lib/node-esm/state-45TXZQJ6.mjs +0 -48
- package/dist/lib/node-esm/state-45TXZQJ6.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -34
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/identity-created.d.ts +0 -4
- package/dist/types/src/capabilities/identity-created.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -9
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -7
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +0 -4
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -5
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +0 -9
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +0 -3
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +0 -7
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +0 -8
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts +0 -3
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -689
- package/src/capabilities/app-graph-serializer.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -40
- package/src/capabilities/identity-created.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -706
- package/src/capabilities/react-root.tsx +0 -22
- package/src/capabilities/react-surface.tsx +0 -350
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -243
- package/src/capabilities/state.ts +0 -46
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -51
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -72
- package/src/components/ObjectDetailsPanel/index.ts +0 -7
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -80
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -111
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
- package/src/components/ObjectSettings/index.ts +0 -7
- package/src/events.ts +0 -15
- /package/dist/types/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.d.ts +0 -0
- /package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +0 -0
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Function from 'effect/Function';
|
|
6
5
|
import * as Schema from 'effect/Schema';
|
|
7
|
-
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
6
|
+
import React, { type ChangeEvent, forwardRef, useCallback, useMemo, useState } from 'react';
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
import { useCapabilities,
|
|
8
|
+
import { Common } from '@dxos/app-framework';
|
|
9
|
+
import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/react';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
13
13
|
import { useClient } from '@dxos/react-client';
|
|
@@ -19,16 +19,15 @@ import {
|
|
|
19
19
|
ControlPage,
|
|
20
20
|
ControlSection,
|
|
21
21
|
Form,
|
|
22
|
-
type
|
|
22
|
+
type FormFieldMap,
|
|
23
23
|
} from '@dxos/react-ui-form';
|
|
24
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
24
25
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
25
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
26
26
|
|
|
27
|
-
import { SpaceCapabilities } from '../../capabilities';
|
|
28
27
|
import { meta } from '../../meta';
|
|
29
|
-
import {
|
|
28
|
+
import { SpaceCapabilities, SpaceForm, SpaceOperation } from '../../types';
|
|
30
29
|
|
|
31
|
-
const
|
|
30
|
+
const SpaceFormSchema = SpaceForm.pipe(
|
|
32
31
|
Schema.extend(
|
|
33
32
|
Schema.Struct({
|
|
34
33
|
archived: Schema.Boolean.annotations({ title: 'Archive Space' }),
|
|
@@ -41,184 +40,181 @@ export type SpaceSettingsContainerProps = {
|
|
|
41
40
|
};
|
|
42
41
|
|
|
43
42
|
// TODO(wittjosiah): Handle space migrations here?
|
|
44
|
-
export const SpaceSettingsContainer =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
[space],
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
const handleSave = useCallback(
|
|
66
|
-
(properties: Schema.Schema.Type<typeof FormSchema>) => {
|
|
67
|
-
void toggleEdgeReplication(properties.edgeReplication);
|
|
68
|
-
if (properties.name !== space.properties.name) {
|
|
69
|
-
space.properties.name = properties.name;
|
|
70
|
-
}
|
|
71
|
-
if (properties.icon !== space.properties.icon) {
|
|
72
|
-
space.properties.icon = properties.icon;
|
|
73
|
-
}
|
|
74
|
-
if (properties.hue !== space.properties.hue) {
|
|
75
|
-
space.properties.hue = properties.hue;
|
|
76
|
-
}
|
|
77
|
-
if (properties.archived && !archived) {
|
|
78
|
-
void dispatch(
|
|
79
|
-
Function.pipe(
|
|
80
|
-
createIntent(SpaceAction.Close, { space }),
|
|
81
|
-
chain(LayoutAction.SwitchWorkspace, {
|
|
82
|
-
part: 'workspace',
|
|
83
|
-
subject: client.spaces.default.id,
|
|
84
|
-
}),
|
|
85
|
-
),
|
|
86
|
-
);
|
|
87
|
-
} else if (!properties.archived && archived) {
|
|
88
|
-
void dispatch(createIntent(SpaceAction.Open, { space }));
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
[space, toggleEdgeReplication, archived],
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
const values = useMemo(
|
|
95
|
-
() => ({
|
|
96
|
-
name: space.properties.name,
|
|
97
|
-
icon: space.properties.icon,
|
|
98
|
-
hue: space.properties.hue,
|
|
99
|
-
edgeReplication,
|
|
100
|
-
archived,
|
|
101
|
-
}),
|
|
102
|
-
[space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
const customElements: Partial<Record<string, InputComponent>> = useMemo(
|
|
106
|
-
() => ({
|
|
107
|
-
name: ({ type, label, getValue, onValueChange }) => {
|
|
108
|
-
const handleChange = useCallback(
|
|
109
|
-
({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
|
|
110
|
-
[onValueChange, type],
|
|
111
|
-
);
|
|
112
|
-
return (
|
|
113
|
-
<ControlItemInput title={label} description={t('display name description')}>
|
|
114
|
-
<Input.TextInput
|
|
115
|
-
value={getValue()}
|
|
116
|
-
onChange={handleChange}
|
|
117
|
-
placeholder={t('display name input placeholder')}
|
|
118
|
-
classNames='min-is-64'
|
|
119
|
-
/>
|
|
120
|
-
</ControlItemInput>
|
|
121
|
-
);
|
|
122
|
-
},
|
|
123
|
-
icon: ({ type, label, getValue, onValueChange }) => {
|
|
124
|
-
const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
|
|
125
|
-
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
|
|
126
|
-
return (
|
|
127
|
-
<ControlItem title={label} description={t('icon description')}>
|
|
128
|
-
<IconPicker
|
|
129
|
-
value={getValue()}
|
|
130
|
-
onChange={handleChange}
|
|
131
|
-
onReset={handleReset}
|
|
132
|
-
classNames='justify-self-end'
|
|
133
|
-
/>
|
|
134
|
-
</ControlItem>
|
|
135
|
-
);
|
|
43
|
+
export const SpaceSettingsContainer = forwardRef<HTMLDivElement, SpaceSettingsContainerProps>(
|
|
44
|
+
({ space }, forwardedRef) => {
|
|
45
|
+
const { t } = useTranslation(meta.id);
|
|
46
|
+
const { invokePromise } = useOperationInvoker();
|
|
47
|
+
const client = useClient();
|
|
48
|
+
const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
|
|
49
|
+
const [edgeReplication, setEdgeReplication] = useState(
|
|
50
|
+
space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED,
|
|
51
|
+
);
|
|
52
|
+
const toggleEdgeReplication = useCallback(
|
|
53
|
+
async (next: boolean) => {
|
|
54
|
+
setEdgeReplication(next);
|
|
55
|
+
await space?.internal
|
|
56
|
+
.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED)
|
|
57
|
+
.catch((err: unknown) => {
|
|
58
|
+
log.catch(err);
|
|
59
|
+
setEdgeReplication(!next);
|
|
60
|
+
});
|
|
136
61
|
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
|
|
140
|
-
return (
|
|
141
|
-
<ControlItem title={label} description={t('hue description')}>
|
|
142
|
-
<HuePicker value={getValue()} onChange={handleChange} onReset={handleReset} classNames='justify-self-end' />
|
|
143
|
-
</ControlItem>
|
|
144
|
-
);
|
|
145
|
-
},
|
|
146
|
-
edgeReplication: ({ type, label, getValue, onValueChange }) => {
|
|
147
|
-
const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
|
|
148
|
-
return (
|
|
149
|
-
<ControlItemInput title={label} description={t('edge replication description')}>
|
|
150
|
-
<Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
|
|
151
|
-
</ControlItemInput>
|
|
152
|
-
);
|
|
153
|
-
},
|
|
154
|
-
archived: ({ type, label, getValue, onValueChange }) => {
|
|
155
|
-
const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
|
|
156
|
-
return (
|
|
157
|
-
<ControlItemInput title={label} description={t('archive space description')}>
|
|
158
|
-
<Button
|
|
159
|
-
disabled={space === client.spaces.default}
|
|
160
|
-
variant={getValue() ? 'default' : 'destructive'}
|
|
161
|
-
onClick={handleChange}
|
|
162
|
-
>
|
|
163
|
-
{getValue() ? t('unarchive space label') : t('archive space label')}
|
|
164
|
-
</Button>
|
|
165
|
-
</ControlItemInput>
|
|
166
|
-
);
|
|
167
|
-
},
|
|
168
|
-
}),
|
|
169
|
-
[t, space],
|
|
170
|
-
);
|
|
62
|
+
[space],
|
|
63
|
+
);
|
|
171
64
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
65
|
+
const handleSave = useCallback(
|
|
66
|
+
(properties: Schema.Schema.Type<typeof SpaceFormSchema>) => {
|
|
67
|
+
void toggleEdgeReplication(properties.edgeReplication ?? false);
|
|
68
|
+
const nameChanged = properties.name !== space.properties.name;
|
|
69
|
+
const iconChanged = properties.icon !== space.properties.icon;
|
|
70
|
+
const hueChanged = properties.hue !== space.properties.hue;
|
|
71
|
+
if (nameChanged || iconChanged || hueChanged) {
|
|
72
|
+
Obj.change(space.properties, (p) => {
|
|
73
|
+
if (nameChanged) {
|
|
74
|
+
p.name = properties.name;
|
|
75
|
+
}
|
|
76
|
+
if (iconChanged) {
|
|
77
|
+
p.icon = properties.icon;
|
|
78
|
+
}
|
|
79
|
+
if (hueChanged) {
|
|
80
|
+
p.hue = properties.hue;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (properties.archived && !archived) {
|
|
85
|
+
void (async () => {
|
|
86
|
+
await invokePromise(SpaceOperation.Close, { space });
|
|
87
|
+
await invokePromise(Common.LayoutOperation.SwitchWorkspace, { subject: client.spaces.default.id });
|
|
88
|
+
})();
|
|
89
|
+
} else if (!properties.archived && archived) {
|
|
90
|
+
void invokePromise(SpaceOperation.Open, { space });
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
[space, toggleEdgeReplication, archived],
|
|
94
|
+
);
|
|
177
95
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
96
|
+
const values = useMemo(
|
|
97
|
+
() => ({
|
|
98
|
+
name: space.properties.name,
|
|
99
|
+
icon: space.properties.icon,
|
|
100
|
+
hue: space.properties.hue,
|
|
101
|
+
edgeReplication,
|
|
102
|
+
archived,
|
|
103
|
+
}),
|
|
104
|
+
[space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
|
|
105
|
+
);
|
|
182
106
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
outerSpacing={false}
|
|
199
|
-
classNames='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'
|
|
200
|
-
/>
|
|
201
|
-
</ControlSection>
|
|
202
|
-
<ControlSection
|
|
203
|
-
title={t('space controls title', { ns: meta.id })}
|
|
204
|
-
description={t('space controls description', { ns: meta.id })}
|
|
205
|
-
>
|
|
206
|
-
<div role='none' className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
207
|
-
<ControlItemInput
|
|
208
|
-
title={t('backup space title', { ns: meta.id })}
|
|
209
|
-
description={t('backup space description', { ns: meta.id })}
|
|
210
|
-
>
|
|
211
|
-
<Button onClick={handleBackup}>{t('download backup label')}</Button>
|
|
107
|
+
const fieldMap = useMemo<FormFieldMap>(
|
|
108
|
+
() => ({
|
|
109
|
+
name: ({ type, label, getValue, onValueChange }) => {
|
|
110
|
+
const handleChange = useCallback(
|
|
111
|
+
({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
|
|
112
|
+
[onValueChange, type],
|
|
113
|
+
);
|
|
114
|
+
return (
|
|
115
|
+
<ControlItemInput title={label} description={t('display name description')}>
|
|
116
|
+
<Input.TextInput
|
|
117
|
+
value={getValue()}
|
|
118
|
+
onChange={handleChange}
|
|
119
|
+
placeholder={t('display name input placeholder')}
|
|
120
|
+
classNames='min-is-64'
|
|
121
|
+
/>
|
|
212
122
|
</ControlItemInput>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
123
|
+
);
|
|
124
|
+
},
|
|
125
|
+
icon: ({ type, label, getValue, onValueChange }) => {
|
|
126
|
+
const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
|
|
127
|
+
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
|
|
128
|
+
return (
|
|
129
|
+
<ControlItem title={label} description={t('icon description')}>
|
|
130
|
+
<IconPicker
|
|
131
|
+
value={getValue()}
|
|
132
|
+
onChange={handleChange}
|
|
133
|
+
onReset={handleReset}
|
|
134
|
+
classNames='justify-self-end'
|
|
135
|
+
/>
|
|
136
|
+
</ControlItem>
|
|
137
|
+
);
|
|
138
|
+
},
|
|
139
|
+
hue: ({ type, label, getValue, onValueChange }) => {
|
|
140
|
+
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
|
|
141
|
+
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
|
|
142
|
+
return (
|
|
143
|
+
<ControlItem title={label} description={t('hue description')}>
|
|
144
|
+
<HuePicker
|
|
145
|
+
value={getValue()}
|
|
146
|
+
onChange={handleChange}
|
|
147
|
+
onReset={handleReset}
|
|
148
|
+
classNames='justify-self-end'
|
|
149
|
+
/>
|
|
150
|
+
</ControlItem>
|
|
151
|
+
);
|
|
152
|
+
},
|
|
153
|
+
edgeReplication: ({ type, label, getValue, onValueChange }) => {
|
|
154
|
+
const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
|
|
155
|
+
return (
|
|
156
|
+
<ControlItemInput title={label} description={t('edge replication description')}>
|
|
157
|
+
<Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
|
|
218
158
|
</ControlItemInput>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
159
|
+
);
|
|
160
|
+
},
|
|
161
|
+
archived: ({ type, label, getValue, onValueChange }) => {
|
|
162
|
+
const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
|
|
163
|
+
return (
|
|
164
|
+
<ControlItemInput title={label} description={t('archive space description')}>
|
|
165
|
+
<Button
|
|
166
|
+
disabled={space === client.spaces.default}
|
|
167
|
+
variant={getValue() ? 'default' : 'destructive'}
|
|
168
|
+
onClick={handleChange}
|
|
169
|
+
>
|
|
170
|
+
{getValue() ? t('unarchive space label') : t('archive space label')}
|
|
171
|
+
</Button>
|
|
172
|
+
</ControlItemInput>
|
|
173
|
+
);
|
|
174
|
+
},
|
|
175
|
+
}),
|
|
176
|
+
[t, space],
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
const download = useFileDownload();
|
|
180
|
+
const handleBackup = useCallback(async () => {
|
|
181
|
+
const archive = await space.internal.export();
|
|
182
|
+
download(new Blob([archive.contents as Uint8Array<ArrayBuffer>]), archive.filename);
|
|
183
|
+
}, [space, download]);
|
|
184
|
+
|
|
185
|
+
const repairs = useCapabilities(SpaceCapabilities.Repair);
|
|
186
|
+
const handleRepair = useCallback(async () => {
|
|
187
|
+
await Promise.all(repairs.map((repair) => repair({ space, isDefault: client.spaces.default === space })));
|
|
188
|
+
}, [client, space, repairs]);
|
|
189
|
+
|
|
190
|
+
return (
|
|
191
|
+
<Layout.Container scrollable ref={forwardedRef}>
|
|
192
|
+
<ControlPage>
|
|
193
|
+
<ControlSection
|
|
194
|
+
title={t('space properties settings verbose label')}
|
|
195
|
+
description={t('space properties settings description', {
|
|
196
|
+
ns: meta.id,
|
|
197
|
+
})}
|
|
198
|
+
>
|
|
199
|
+
<Form.Root fieldMap={fieldMap} schema={SpaceFormSchema} values={values} autoSave onSave={handleSave}>
|
|
200
|
+
<Form.FieldSet />
|
|
201
|
+
</Form.Root>
|
|
202
|
+
</ControlSection>
|
|
203
|
+
|
|
204
|
+
<ControlSection title={t('space controls title')} description={t('space controls description')}>
|
|
205
|
+
<div role='none' className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
206
|
+
<ControlItemInput title={t('backup space title')} description={t('backup space description')}>
|
|
207
|
+
<Button onClick={handleBackup}>{t('download backup label')}</Button>
|
|
208
|
+
</ControlItemInput>
|
|
209
|
+
<ControlItemInput title={t('repair space title')} description={t('repair space description')}>
|
|
210
|
+
<Button onClick={handleRepair}>{t('repair space label')}</Button>
|
|
211
|
+
</ControlItemInput>
|
|
212
|
+
</div>
|
|
213
|
+
</ControlSection>
|
|
214
|
+
</ControlPage>
|
|
215
|
+
</Layout.Container>
|
|
216
|
+
);
|
|
217
|
+
},
|
|
218
|
+
);
|
|
219
|
+
|
|
220
|
+
SpaceSettingsContainer.displayName = 'SpaceSettingsContainer';
|
|
@@ -11,7 +11,7 @@ import { useClient } from '@dxos/react-client';
|
|
|
11
11
|
import { useStream } from '@dxos/react-client/devtools';
|
|
12
12
|
import { type SpaceSyncStateMap, getSyncSummary, useSyncState } from '@dxos/react-client/echo';
|
|
13
13
|
import { Icon, Popover, useTranslation } from '@dxos/react-ui';
|
|
14
|
-
import { mx } from '@dxos/
|
|
14
|
+
import { mx } from '@dxos/ui-theme';
|
|
15
15
|
import { Unit, type UnitFormat } from '@dxos/util';
|
|
16
16
|
|
|
17
17
|
import { meta } from '../../meta';
|
|
@@ -46,10 +46,10 @@ const createSpaceSaveTracker = (space: Space, cb: (state: 'saved' | 'saving') =>
|
|
|
46
46
|
|
|
47
47
|
let hasUnsavedChanges = false;
|
|
48
48
|
let lastFlushPromise: Promise<void> | undefined;
|
|
49
|
-
space.db.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
|
|
49
|
+
space.internal.db.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
|
|
50
50
|
hasUnsavedChanges = unsavedDocuments.length > 0;
|
|
51
51
|
});
|
|
52
|
-
space.db.saveStateChanged.debounce(500).on(ctx, () => {
|
|
52
|
+
space.internal.db.saveStateChanged.debounce(500).on(ctx, () => {
|
|
53
53
|
if (hasUnsavedChanges) {
|
|
54
54
|
lastFlushPromise = undefined;
|
|
55
55
|
cb('saving');
|
|
@@ -5,27 +5,27 @@
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
import React, { useCallback, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/react';
|
|
10
9
|
import { DXN, Filter, Obj, Query, type QueryAST, Tag, Type } from '@dxos/echo';
|
|
10
|
+
import { type Mutable } from '@dxos/echo/internal';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
12
12
|
import { getSpace, useQuery } from '@dxos/react-client/echo';
|
|
13
13
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
14
14
|
import { ViewEditor as NaturalViewEditor } from '@dxos/react-ui-form';
|
|
15
15
|
import { View } from '@dxos/schema';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { resolveSchemaWithRegistry } from '../helpers';
|
|
18
18
|
import { useTypeOptions } from '../hooks';
|
|
19
|
-
import {
|
|
19
|
+
import { SpaceOperation } from '../types';
|
|
20
20
|
|
|
21
21
|
export type ViewEditorProps = { view: View.View };
|
|
22
22
|
|
|
23
23
|
export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
24
|
-
const {
|
|
24
|
+
const { invokePromise } = useOperationInvoker();
|
|
25
25
|
const client = useClient();
|
|
26
26
|
const space = getSpace(view);
|
|
27
27
|
const [schema, setSchema] = useState<Schema.Schema.AnyNoContext>(() => Schema.Struct({}));
|
|
28
|
-
const tags = useQuery(space, Filter.type(Tag.Tag));
|
|
28
|
+
const tags = useQuery(space?.db, Filter.type(Tag.Tag));
|
|
29
29
|
const types = useTypeOptions({
|
|
30
30
|
space,
|
|
31
31
|
annotation: {
|
|
@@ -40,7 +40,7 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const foundSchema = await
|
|
43
|
+
const foundSchema = await resolveSchemaWithRegistry(space.db.schemaRegistry, view.query.ast);
|
|
44
44
|
if (foundSchema && foundSchema !== schema) {
|
|
45
45
|
setSchema(() => foundSchema);
|
|
46
46
|
}
|
|
@@ -54,8 +54,10 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
54
54
|
|
|
55
55
|
const queue = target && DXN.tryParse(target) ? target : undefined;
|
|
56
56
|
const query = queue ? Query.fromAst(newQuery).options({ queues: [queue] }) : Query.fromAst(newQuery);
|
|
57
|
-
view
|
|
58
|
-
|
|
57
|
+
Obj.change(view, (v) => {
|
|
58
|
+
v.query.ast = query.ast as Mutable<typeof query.ast>;
|
|
59
|
+
});
|
|
60
|
+
const newSchema = await resolveSchemaWithRegistry(space.db.schemaRegistry, query.ast);
|
|
59
61
|
if (!newSchema) {
|
|
60
62
|
return;
|
|
61
63
|
}
|
|
@@ -64,7 +66,9 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
64
66
|
query,
|
|
65
67
|
jsonSchema: Type.toJsonSchema(newSchema),
|
|
66
68
|
});
|
|
67
|
-
|
|
69
|
+
Obj.change(view, (v) => {
|
|
70
|
+
v.projection = Obj.getSnapshot(newView).projection as Mutable<typeof v.projection>;
|
|
71
|
+
});
|
|
68
72
|
|
|
69
73
|
setSchema(() => newSchema);
|
|
70
74
|
},
|
|
@@ -73,9 +77,9 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
73
77
|
|
|
74
78
|
const handleDelete = useCallback(
|
|
75
79
|
(fieldId: string) => {
|
|
76
|
-
void
|
|
80
|
+
void invokePromise(SpaceOperation.DeleteField, { view, fieldId });
|
|
77
81
|
},
|
|
78
|
-
[
|
|
82
|
+
[invokePromise, view],
|
|
79
83
|
);
|
|
80
84
|
|
|
81
85
|
if (!space || !schema) {
|
|
@@ -88,7 +92,6 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
88
92
|
schema={schema}
|
|
89
93
|
view={view}
|
|
90
94
|
mode='tag'
|
|
91
|
-
outerSpacing={false}
|
|
92
95
|
tags={tags}
|
|
93
96
|
types={types}
|
|
94
97
|
onQueryChanged={handleQueryChanged}
|
package/src/components/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export * from './AwaitingObject';
|
|
8
8
|
export * from './CreateDialog';
|
|
@@ -11,15 +11,15 @@ export * from './JoinDialog';
|
|
|
11
11
|
export * from './MembersContainer';
|
|
12
12
|
export * from './MenuFooter';
|
|
13
13
|
export * from './ObjectRenamePopover';
|
|
14
|
-
export * from './SpaceRenamePopover';
|
|
15
14
|
export * from './SchemaContainer';
|
|
16
|
-
export * from './SpacePresence';
|
|
17
15
|
export * from './SpacePluginSettings';
|
|
16
|
+
export * from './SpacePresence';
|
|
17
|
+
export * from './SpaceRenamePopover';
|
|
18
18
|
export * from './SpaceSettings';
|
|
19
19
|
export * from './SyncStatus';
|
|
20
20
|
export * from './ViewEditor';
|
|
21
21
|
|
|
22
22
|
export const CollectionArticle = lazy(() => import('./CollectionArticle'));
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
23
|
+
export const ObjectCardStack = lazy(() => import('./ObjectCardStack'));
|
|
24
|
+
export const ObjectDetails = lazy(() => import('./ObjectDetails'));
|
|
25
25
|
export const RecordArticle = lazy(() => import('./RecordArticle'));
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { meta } from './meta';
|
|
6
|
+
|
|
7
|
+
export const CREATE_OBJECT_DIALOG = `${meta.id}/CreateObjectDialog`;
|
|
8
|
+
export const CREATE_SPACE_DIALOG = `${meta.id}/CreateSpaceDialog`;
|
|
9
|
+
export const JOIN_DIALOG = `${meta.id}/JoinDialog`;
|
|
10
|
+
export const OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
|
|
11
|
+
export const SPACE_RENAME_POPOVER = `${meta.id}/SpaceRenamePopover`;
|
package/src/helpers/query.ts
CHANGED
|
@@ -10,15 +10,15 @@ import * as Option from 'effect/Option';
|
|
|
10
10
|
import type * as Schema from 'effect/Schema';
|
|
11
11
|
import * as SchemaAST from 'effect/SchemaAST';
|
|
12
12
|
|
|
13
|
-
import { DXN, Filter, Query, type QueryAST } from '@dxos/echo';
|
|
13
|
+
import { DXN, Filter, Query, type QueryAST, type SchemaRegistry } from '@dxos/echo';
|
|
14
14
|
import {
|
|
15
15
|
ReferenceAnnotationId,
|
|
16
16
|
type ReferenceAnnotationValue,
|
|
17
17
|
getTypeAnnotation,
|
|
18
18
|
unwrapOptional,
|
|
19
19
|
} from '@dxos/echo/internal';
|
|
20
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
20
21
|
import { log } from '@dxos/log';
|
|
21
|
-
import { type Client } from '@dxos/react-client';
|
|
22
22
|
import { type Space } from '@dxos/react-client/echo';
|
|
23
23
|
import { Person } from '@dxos/types';
|
|
24
24
|
|
|
@@ -35,26 +35,21 @@ export const evalQuery = (queryString: string): Query.Any => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
export const
|
|
38
|
+
export const resolveSchemaWithRegistry = (registry: SchemaRegistry.SchemaRegistry, query: QueryAST.Query) => {
|
|
39
39
|
const resolve = Effect.fn(function* (dxn: string) {
|
|
40
40
|
const typename = DXN.parse(dxn).asTypeDXN()?.type;
|
|
41
41
|
if (!typename) {
|
|
42
42
|
return Option.none();
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const
|
|
46
|
-
if (staticSchema) {
|
|
47
|
-
return Option.some(staticSchema);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const query = space.db.schemaRegistry.query({ typename });
|
|
45
|
+
const query = registry.query({ typename, location: ['database', 'runtime'] });
|
|
51
46
|
const schemas = yield* Effect.promise(() => query.run());
|
|
52
47
|
return Array.head(schemas);
|
|
53
48
|
});
|
|
54
49
|
|
|
55
50
|
return resolveSchema(query, resolve).pipe(
|
|
56
51
|
Effect.map((schema) => Option.getOrUndefined(schema)),
|
|
57
|
-
|
|
52
|
+
runAndForwardErrors,
|
|
58
53
|
);
|
|
59
54
|
};
|
|
60
55
|
|
|
@@ -150,9 +145,9 @@ export const getQueryTarget = (query: QueryAST.Query, space?: Space) => {
|
|
|
150
145
|
Option.flatMap((queues) => Array.head(queues)),
|
|
151
146
|
Option.flatMap((queueDxn) => Option.fromNullable(DXN.tryParse(queueDxn))),
|
|
152
147
|
Option.flatMap((queueDxn) => Option.fromNullable(space?.queues.get(queueDxn))),
|
|
153
|
-
Option.getOrElse(() => space),
|
|
148
|
+
Option.getOrElse(() => space?.db),
|
|
154
149
|
);
|
|
155
150
|
}),
|
|
156
|
-
Match.orElse(() => space),
|
|
151
|
+
Match.orElse(() => space?.db),
|
|
157
152
|
);
|
|
158
153
|
};
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type CapabilityManager, Common } from '@dxos/app-framework';
|
|
6
6
|
import { useLayout } from '@dxos/app-framework/react';
|
|
7
7
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
8
8
|
import { parseId, useSpace } from '@dxos/react-client/echo';
|
|
9
9
|
|
|
10
|
-
export const getActiveSpace = (
|
|
11
|
-
const client =
|
|
12
|
-
const
|
|
10
|
+
export const getActiveSpace = (capabilities: CapabilityManager.CapabilityManager) => {
|
|
11
|
+
const client = capabilities.get(ClientCapabilities.Client);
|
|
12
|
+
const registry = capabilities.get(Common.Capability.AtomRegistry);
|
|
13
|
+
const layoutAtom = capabilities.get(Common.Capability.Layout);
|
|
14
|
+
const layout = registry.get(layoutAtom);
|
|
13
15
|
const { spaceId } = parseId(layout.workspace);
|
|
14
16
|
return spaceId ? client.spaces.get(spaceId) : undefined;
|
|
15
17
|
};
|