@dxos/plugin-space 0.8.4-main.3c1ae3b → 0.8.4-main.3eb6e50203
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-XXLUNK3F.mjs +127 -0
- package/dist/lib/browser/CollectionArticle-XXLUNK3F.mjs.map +7 -0
- package/dist/lib/browser/ObjectCardStack-CXNBCSMR.mjs +148 -0
- package/dist/lib/browser/ObjectCardStack-CXNBCSMR.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetails-HXV4IQEM.mjs +143 -0
- package/dist/lib/browser/ObjectDetails-HXV4IQEM.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-36LDKFWF.mjs +108 -0
- package/dist/lib/browser/RecordArticle-36LDKFWF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-GLV46QSI.mjs +530 -0
- package/dist/lib/browser/app-graph-builder-GLV46QSI.mjs.map +7 -0
- package/dist/lib/browser/app-graph-serializer-VOLRDNVE.mjs +85 -0
- package/dist/lib/browser/app-graph-serializer-VOLRDNVE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-POFUXISV.mjs → chunk-7D63MVRS.mjs} +6 -5
- package/dist/lib/browser/chunk-7D63MVRS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5CSSKOWR.mjs → chunk-A7ZCVQGZ.mjs} +43 -45
- package/dist/lib/browser/chunk-A7ZCVQGZ.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-CMLRMQNM.mjs +1889 -0
- package/dist/lib/browser/chunk-CMLRMQNM.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-KGLWYGIF.mjs +715 -0
- package/dist/lib/browser/chunk-KGLWYGIF.mjs.map +7 -0
- package/dist/lib/browser/chunk-NF3ZFAB4.mjs +13 -0
- package/dist/lib/browser/chunk-NF3ZFAB4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IJCMB5B5.mjs → chunk-WAOJLA2S.mjs} +195 -196
- package/dist/lib/browser/chunk-WAOJLA2S.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +851 -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 +215 -189
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-PJJ3PCM7.mjs +830 -0
- package/dist/lib/browser/operation-resolver-PJJ3PCM7.mjs.map +7 -0
- package/dist/lib/browser/react-root-ITWAPZIY.mjs +30 -0
- package/dist/lib/browser/react-root-ITWAPZIY.mjs.map +7 -0
- package/dist/lib/browser/react-surface-6GD6K4I4.mjs +383 -0
- package/dist/lib/browser/react-surface-6GD6K4I4.mjs.map +7 -0
- package/dist/lib/browser/{repair-CNLE35NF.mjs → repair-DKU4TUD2.mjs} +16 -10
- package/dist/lib/browser/repair-DKU4TUD2.mjs.map +7 -0
- package/dist/lib/browser/settings-M2DMD2ZA.mjs +34 -0
- package/dist/lib/browser/settings-M2DMD2ZA.mjs.map +7 -0
- package/dist/lib/browser/spaces-ready-XWJUJ43N.mjs +243 -0
- package/dist/lib/browser/spaces-ready-XWJUJ43N.mjs.map +7 -0
- package/dist/lib/browser/state-V637BLIM.mjs +58 -0
- package/dist/lib/browser/state-V637BLIM.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -8
- package/dist/lib/node-esm/CollectionArticle-KFFKKP37.mjs +128 -0
- package/dist/lib/node-esm/CollectionArticle-KFFKKP37.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectCardStack-EHXPNRQW.mjs +149 -0
- package/dist/lib/node-esm/ObjectCardStack-EHXPNRQW.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetails-N73UI4ZL.mjs +144 -0
- package/dist/lib/node-esm/ObjectDetails-N73UI4ZL.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-CMEXNNOZ.mjs +109 -0
- package/dist/lib/node-esm/RecordArticle-CMEXNNOZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-KCEHEKVS.mjs +531 -0
- package/dist/lib/node-esm/app-graph-builder-KCEHEKVS.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-serializer-7C4MV5NB.mjs +86 -0
- package/dist/lib/node-esm/app-graph-serializer-7C4MV5NB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2NM62ORP.mjs +1890 -0
- package/dist/lib/node-esm/chunk-2NM62ORP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs → chunk-5N3YIAXD.mjs} +6 -5
- package/dist/lib/node-esm/chunk-5N3YIAXD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UMZ7G6G4.mjs → chunk-A5A7M37T.mjs} +43 -45
- package/dist/lib/node-esm/chunk-A5A7M37T.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-3D4NGZPW.mjs → chunk-FB5YNROS.mjs} +195 -196
- package/dist/lib/node-esm/chunk-FB5YNROS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NYSDQPNM.mjs +716 -0
- package/dist/lib/node-esm/chunk-NYSDQPNM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PG7DNOEX.mjs +15 -0
- package/dist/lib/node-esm/chunk-PG7DNOEX.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 +852 -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 +215 -189
- 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-2K7N4KYC.mjs +831 -0
- package/dist/lib/node-esm/operation-resolver-2K7N4KYC.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-GIQAKDQ2.mjs +31 -0
- package/dist/lib/node-esm/react-root-GIQAKDQ2.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-KWP2DNFG.mjs +384 -0
- package/dist/lib/node-esm/react-surface-KWP2DNFG.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-EHZS6MFY.mjs → repair-C2H6JQCL.mjs} +16 -10
- package/dist/lib/node-esm/repair-C2H6JQCL.mjs.map +7 -0
- package/dist/lib/node-esm/settings-VCPCNBOY.mjs +35 -0
- package/dist/lib/node-esm/settings-VCPCNBOY.mjs.map +7 -0
- package/dist/lib/node-esm/spaces-ready-5JOGEWON.mjs +244 -0
- package/dist/lib/node-esm/spaces-ready-5JOGEWON.mjs.map +7 -0
- package/dist/lib/node-esm/state-5MCEPWN3.mjs +59 -0
- package/dist/lib/node-esm/state-5MCEPWN3.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 +7 -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 +10 -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 +6 -3
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -1
- package/dist/types/src/components/CollectionSection.d.ts +1 -1
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +17 -7
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +9 -5
- 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 +11 -2
- 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 +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts +9 -0
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +6 -5
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -1
- 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 +2 -2
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +11 -2
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.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 +4 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +13 -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 +11 -6
- 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 -3
- 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/usePath.d.ts +2 -2
- package/dist/types/src/hooks/usePath.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/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +643 -354
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +36 -31
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +83 -69
- package/src/SpacePlugin.ts +174 -194
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +621 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +83 -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 +762 -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 +377 -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 +33 -0
- package/src/capabilities/spaces-ready/index.ts +7 -0
- package/src/capabilities/spaces-ready/spaces-ready.ts +290 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +64 -0
- package/src/cli/commands/database/add.ts +115 -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 +88 -0
- package/src/components/AwaitingObject.tsx +14 -10
- package/src/components/CollectionArticle.tsx +142 -19
- package/src/components/CollectionSection.tsx +1 -1
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +28 -22
- package/src/components/CreateDialog/CreateObjectDialog.tsx +55 -60
- package/src/components/CreateDialog/CreateObjectPanel.tsx +102 -52
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -51
- package/src/components/JoinDialog/JoinDialog.tsx +26 -52
- package/src/components/MembersContainer/MembersContainer.stories.tsx +3 -3
- package/src/components/MembersContainer/MembersContainer.tsx +76 -81
- package/src/components/MenuFooter.tsx +1 -1
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +13 -10
- package/src/components/ObjectCardStack/ObjectForm.tsx +34 -27
- package/src/components/ObjectDetails/BaseObjectSettings.stories.tsx +8 -8
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +35 -31
- package/src/components/ObjectDetails/ObjectDetails.tsx +9 -11
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +9 -13
- package/src/components/RecordArticle.stories.tsx +14 -13
- package/src/components/RecordArticle.tsx +47 -37
- package/src/components/SchemaContainer.tsx +20 -17
- package/src/components/SpacePluginSettings.tsx +42 -35
- package/src/components/SpacePresence/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence/SpacePresence.tsx +15 -16
- package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +11 -12
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +5 -5
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +165 -182
- package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.stories.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.tsx +1 -1
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +16 -12
- package/src/constants.ts +11 -0
- package/src/helpers/query.ts +7 -6
- package/src/hooks/useActiveSpace.ts +8 -5
- package/src/hooks/useInputSurfaceLookup.tsx +3 -3
- package/src/hooks/usePath.ts +4 -4
- package/src/index.ts +1 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +4 -2
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +16 -0
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +533 -245
- package/src/util.tsx +222 -230
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs +0 -31
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +0 -7
- package/dist/lib/browser/ObjectCardStack-TE7AWPMH.mjs +0 -144
- package/dist/lib/browser/ObjectCardStack-TE7AWPMH.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetails-666IBRHE.mjs +0 -144
- package/dist/lib/browser/ObjectDetails-666IBRHE.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-USKWFIDK.mjs +0 -551
- package/dist/lib/browser/app-graph-builder-USKWFIDK.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-SXIQ425K.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-SXIQ425K.mjs.map +0 -7
- package/dist/lib/browser/chunk-5CSSKOWR.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-E4BEMEZ3.mjs +0 -399
- package/dist/lib/browser/chunk-E4BEMEZ3.mjs.map +0 -7
- package/dist/lib/browser/chunk-IJCMB5B5.mjs.map +0 -7
- package/dist/lib/browser/chunk-POFUXISV.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/chunk-XKQCDLXX.mjs +0 -2103
- package/dist/lib/browser/chunk-XKQCDLXX.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-QEIM7NQT.mjs +0 -769
- package/dist/lib/browser/intent-resolver-QEIM7NQT.mjs.map +0 -7
- package/dist/lib/browser/react-root-T6ZETLD2.mjs +0 -30
- package/dist/lib/browser/react-root-T6ZETLD2.mjs.map +0 -7
- package/dist/lib/browser/react-surface-MLN5BZ2G.mjs +0 -374
- package/dist/lib/browser/react-surface-MLN5BZ2G.mjs.map +0 -7
- package/dist/lib/browser/repair-CNLE35NF.mjs.map +0 -7
- package/dist/lib/browser/settings-EGTCHS7U.mjs +0 -24
- package/dist/lib/browser/settings-EGTCHS7U.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-YS4BBZXW.mjs +0 -208
- package/dist/lib/browser/spaces-ready-YS4BBZXW.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/ObjectCardStack-AAKMAQ6T.mjs +0 -145
- package/dist/lib/node-esm/ObjectCardStack-AAKMAQ6T.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetails-TZ5YKXGN.mjs +0 -145
- package/dist/lib/node-esm/ObjectDetails-TZ5YKXGN.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-QRQ5EQLB.mjs +0 -552
- package/dist/lib/node-esm/app-graph-builder-QRQ5EQLB.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-P2X4W7LI.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-P2X4W7LI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3D4NGZPW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AX3UGL5D.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-QQQE2ZCX.mjs +0 -400
- package/dist/lib/node-esm/chunk-QQQE2ZCX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMZ7G6G4.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-XD532BVR.mjs +0 -2104
- package/dist/lib/node-esm/chunk-XD532BVR.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-ZWCBVABN.mjs +0 -770
- package/dist/lib/node-esm/intent-resolver-ZWCBVABN.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-SKB4UJ4K.mjs +0 -31
- package/dist/lib/node-esm/react-root-SKB4UJ4K.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-BVZGNSBB.mjs +0 -375
- package/dist/lib/node-esm/react-surface-BVZGNSBB.mjs.map +0 -7
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-N3F6JCIR.mjs +0 -25
- package/dist/lib/node-esm/settings-N3F6JCIR.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-U2K5P4LB.mjs +0 -209
- package/dist/lib/node-esm/spaces-ready-U2K5P4LB.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/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -724
- 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 -705
- package/src/capabilities/react-root.tsx +0 -22
- package/src/capabilities/react-surface.tsx +0 -358
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -252
- package/src/capabilities/state.ts +0 -46
- package/src/events.ts +0 -15
|
@@ -4,35 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
12
13
|
|
|
13
14
|
import { meta } from '../../meta';
|
|
14
15
|
|
|
15
16
|
export const OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
|
|
16
17
|
|
|
17
|
-
export const ObjectRenamePopover = ({ object }: { object: Obj.
|
|
18
|
+
export const ObjectRenamePopover = ({ object }: { object: Obj.Unknown }) => {
|
|
18
19
|
const { t } = useTranslation(meta.id);
|
|
19
20
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
20
21
|
const [name, setName] = useState(Obj.getLabel(object));
|
|
21
|
-
const {
|
|
22
|
+
const { invokePromise } = useOperationInvoker();
|
|
22
23
|
|
|
23
24
|
const handleDone = useCallback(() => {
|
|
24
25
|
try {
|
|
25
|
-
name && Obj.setLabel(object, name);
|
|
26
|
+
name && Obj.change(object, () => Obj.setLabel(object, name));
|
|
26
27
|
} catch (err) {
|
|
27
28
|
log.error('Failed to rename object', { err });
|
|
28
29
|
}
|
|
29
|
-
void
|
|
30
|
-
|
|
31
|
-
part: 'popover',
|
|
32
|
-
options: { variant: 'react', anchorId: '', state: false },
|
|
33
|
-
}),
|
|
34
|
-
);
|
|
35
|
-
}, [object, name]);
|
|
30
|
+
void invokePromise(LayoutOperation.UpdatePopover, { anchorId: '', state: false });
|
|
31
|
+
}, [object, name, invokePromise]);
|
|
36
32
|
|
|
37
33
|
return (
|
|
38
34
|
<div role='none' className='p-2 flex gap-2'>
|
|
@@ -49,7 +45,7 @@ export const ObjectRenamePopover = ({ object }: { object: Obj.Any }) => {
|
|
|
49
45
|
</Input.Root>
|
|
50
46
|
</div>
|
|
51
47
|
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
52
|
-
{t('done label', { ns:
|
|
48
|
+
{t('done label', { ns: osTranslations })}
|
|
53
49
|
</Button>
|
|
54
50
|
</div>
|
|
55
51
|
);
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { Capabilities,
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
11
|
import { Filter, Obj, Ref, Relation, type Type } from '@dxos/echo';
|
|
11
12
|
import { faker } from '@dxos/random';
|
|
12
13
|
import { useQuery } from '@dxos/react-client/echo';
|
|
13
|
-
import {
|
|
14
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
14
15
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
15
|
-
import { Card } from '@dxos/react-ui-
|
|
16
|
+
import { Card } from '@dxos/react-ui-mosaic';
|
|
16
17
|
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
17
18
|
import { type ValueGenerator, createAsyncGenerator } from '@dxos/schema/testing';
|
|
18
19
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
@@ -27,8 +28,8 @@ faker.seed(1);
|
|
|
27
28
|
const generator: ValueGenerator = faker as any;
|
|
28
29
|
|
|
29
30
|
const DefaultStory = () => {
|
|
30
|
-
const { space } =
|
|
31
|
-
const [object] = useQuery(space, Filter.type(Organization.Organization));
|
|
31
|
+
const { space } = useClientStory();
|
|
32
|
+
const [object] = useQuery(space?.db, Filter.type(Organization.Organization));
|
|
32
33
|
if (!object) {
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
@@ -41,27 +42,27 @@ const meta = {
|
|
|
41
42
|
component: RecordArticle as any,
|
|
42
43
|
render: render(DefaultStory),
|
|
43
44
|
decorators: [
|
|
44
|
-
withTheme,
|
|
45
|
+
withTheme(),
|
|
45
46
|
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
46
47
|
withPluginManager({
|
|
47
48
|
capabilities: [
|
|
48
|
-
contributes(Capabilities.ReactSurface, [
|
|
49
|
-
|
|
49
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
50
|
+
Surface.create({
|
|
50
51
|
id: 'section',
|
|
51
52
|
role: 'section',
|
|
52
53
|
component: ({ data }) => (
|
|
53
|
-
<Card.
|
|
54
|
+
<Card.Root>
|
|
54
55
|
<Json classNames='text-sm' data={data} />
|
|
55
|
-
</Card.
|
|
56
|
+
</Card.Root>
|
|
56
57
|
),
|
|
57
58
|
}),
|
|
58
|
-
|
|
59
|
+
Surface.create({
|
|
59
60
|
id: 'card',
|
|
60
61
|
role: 'card',
|
|
61
62
|
component: ({ data }) => (
|
|
62
|
-
<Card.
|
|
63
|
+
<Card.Root>
|
|
63
64
|
<Json classNames='text-sm' data={data} />
|
|
64
|
-
</Card.
|
|
65
|
+
</Card.Root>
|
|
65
66
|
),
|
|
66
67
|
}),
|
|
67
68
|
]),
|
|
@@ -4,63 +4,73 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface } from '@dxos/app-framework/
|
|
8
|
-
import { type SurfaceComponentProps } from '@dxos/app-
|
|
9
|
-
import { type Entity, Filter,
|
|
10
|
-
import {
|
|
11
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { type Database, Entity, Filter, Obj, Ref, Relation } from '@dxos/echo';
|
|
10
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { Layout, ScrollArea, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
import { Masonry } from '@dxos/react-ui-masonry';
|
|
13
|
-
import {
|
|
14
|
-
import { mx } from '@dxos/
|
|
13
|
+
import { Card as MosaicCard } from '@dxos/react-ui-mosaic';
|
|
14
|
+
import { mx } from '@dxos/ui-theme';
|
|
15
15
|
import { isNonNullable } from '@dxos/util';
|
|
16
16
|
|
|
17
17
|
import { meta } from '../meta';
|
|
18
18
|
|
|
19
|
-
export const RecordArticle = ({ subject }: SurfaceComponentProps) => {
|
|
19
|
+
export const RecordArticle = ({ role, subject }: SurfaceComponentProps) => {
|
|
20
20
|
const { t } = useTranslation(meta.id);
|
|
21
|
-
const
|
|
21
|
+
const db = Obj.getDatabase(subject);
|
|
22
22
|
const data = useMemo(() => ({ subject }), [subject]);
|
|
23
|
-
const related = useRelatedObjects(
|
|
23
|
+
const related = useRelatedObjects(db, subject, {
|
|
24
24
|
references: true,
|
|
25
25
|
relations: true,
|
|
26
26
|
});
|
|
27
27
|
const singleColumn = related.length === 1;
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{related.length > 0 && (
|
|
37
|
-
<div role='none' className={mx('flex flex-col gap-1', singleColumn ? 'card-max-width' : 'is-full')}>
|
|
38
|
-
<label className='mbs-2 text-sm text-description'>{t('related objects label')}</label>
|
|
39
|
-
<Masonry.Root<Entity.Unknown>
|
|
40
|
-
items={related}
|
|
41
|
-
render={Card}
|
|
42
|
-
columnCount={singleColumn ? 1 : undefined}
|
|
43
|
-
intrinsicHeight
|
|
44
|
-
/>
|
|
30
|
+
<Layout.Main role={role}>
|
|
31
|
+
<ScrollArea.Root orientation='vertical'>
|
|
32
|
+
<ScrollArea.Viewport classNames={mx('p-4 gap-4')}>
|
|
33
|
+
<div role='none' className={mx('flex is-full card-max-width')}>
|
|
34
|
+
<Surface.Surface role='section' data={data} limit={1} />
|
|
45
35
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
|
|
37
|
+
{related.length > 0 && (
|
|
38
|
+
<div role='none' className={mx('flex flex-col gap-1', singleColumn ? 'card-max-width' : 'is-full')}>
|
|
39
|
+
<label className='mbs-2 text-sm text-description'>{t('related objects label')}</label>
|
|
40
|
+
<Masonry.Root<Entity.Unknown>
|
|
41
|
+
items={related}
|
|
42
|
+
render={Card}
|
|
43
|
+
columnCount={singleColumn ? 1 : undefined}
|
|
44
|
+
intrinsicHeight
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
</ScrollArea.Viewport>
|
|
49
|
+
</ScrollArea.Root>
|
|
50
|
+
</Layout.Main>
|
|
49
51
|
);
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
const Card = ({ data: subject }: { data: Entity.Unknown }) => {
|
|
53
55
|
const data = useMemo(() => ({ subject }), [subject]);
|
|
54
|
-
return
|
|
56
|
+
return (
|
|
57
|
+
<MosaicCard.Root>
|
|
58
|
+
<MosaicCard.Toolbar>
|
|
59
|
+
<span />
|
|
60
|
+
<MosaicCard.Title>{Entity.getLabel(subject)}</MosaicCard.Title>
|
|
61
|
+
</MosaicCard.Toolbar>
|
|
62
|
+
<Surface.Surface role='card--content' data={data} limit={1} />
|
|
63
|
+
</MosaicCard.Root>
|
|
64
|
+
);
|
|
55
65
|
};
|
|
56
66
|
|
|
57
67
|
// TODO(wittjosiah): This is a hack. ECHO needs to have a back reference index to easily query for related objects.
|
|
58
68
|
const useRelatedObjects = (
|
|
59
|
-
|
|
60
|
-
record?: Obj.
|
|
69
|
+
db?: Database.Database,
|
|
70
|
+
record?: Obj.Unknown,
|
|
61
71
|
options: { references?: boolean; relations?: boolean } = {},
|
|
62
72
|
) => {
|
|
63
|
-
const objects = useQuery(
|
|
73
|
+
const objects = useQuery(db, Filter.everything());
|
|
64
74
|
return useMemo(() => {
|
|
65
75
|
if (!record) {
|
|
66
76
|
return [];
|
|
@@ -70,10 +80,10 @@ const useRelatedObjects = (
|
|
|
70
80
|
|
|
71
81
|
// TODO(burdon): Change Person => Organization to relations.
|
|
72
82
|
if (options.references) {
|
|
73
|
-
const getReferences = (obj: Entity.Unknown): Ref.
|
|
83
|
+
const getReferences = (obj: Entity.Unknown): Ref.Unknown[] => {
|
|
74
84
|
return Object.getOwnPropertyNames(obj)
|
|
75
|
-
.map((name) => obj[name as keyof Obj.
|
|
76
|
-
.filter((value) => Ref.isRef(value)) as Ref.
|
|
85
|
+
.map((name) => obj[name as keyof Obj.Unknown])
|
|
86
|
+
.filter((value) => Ref.isRef(value)) as Ref.Unknown[];
|
|
77
87
|
};
|
|
78
88
|
|
|
79
89
|
const references = getReferences(record);
|
|
@@ -88,7 +98,7 @@ const useRelatedObjects = (
|
|
|
88
98
|
|
|
89
99
|
if (options.relations) {
|
|
90
100
|
// TODO(dmaretskyi): Workaround until https://github.com/dxos/dxos/pull/10100 lands.
|
|
91
|
-
const isValidRelation = (obj: Relation.
|
|
101
|
+
const isValidRelation = (obj: Relation.Unknown) => {
|
|
92
102
|
try {
|
|
93
103
|
return Relation.isRelation(obj) && Relation.getSource(obj) && Relation.getTarget(obj);
|
|
94
104
|
} catch {
|
|
@@ -96,7 +106,7 @@ const useRelatedObjects = (
|
|
|
96
106
|
}
|
|
97
107
|
};
|
|
98
108
|
|
|
99
|
-
const relations = objects.filter(
|
|
109
|
+
const relations = objects.filter(Relation.isRelation).filter((obj) => isValidRelation(obj));
|
|
100
110
|
const targetObjects = relations
|
|
101
111
|
.filter((relation) => Relation.getTarget(relation) === record)
|
|
102
112
|
.map((relation) => Relation.getSource(relation));
|
|
@@ -7,33 +7,36 @@ import React, { useEffect, useState } from 'react';
|
|
|
7
7
|
import { type Type } from '@dxos/echo';
|
|
8
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
9
|
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
11
|
+
import { mx } from '@dxos/ui-theme';
|
|
12
12
|
|
|
13
13
|
import { meta } from '../meta';
|
|
14
14
|
|
|
15
15
|
type SchemaPanelProps = { space: Space };
|
|
16
16
|
|
|
17
|
+
const itemClasses = mx([
|
|
18
|
+
'container-max-width grid md:col-span-2 grid-cols-subgrid gap-trimSm items-center',
|
|
19
|
+
'*:first:!mbs-0 *:last:!mbe-0 pli-trimMd plb-trimMd',
|
|
20
|
+
'border border-separator rounded-md',
|
|
21
|
+
]);
|
|
22
|
+
|
|
17
23
|
export const SchemaContainer = ({ space }: SchemaPanelProps) => {
|
|
18
24
|
const { t } = useTranslation(meta.id);
|
|
19
25
|
const schemas = useQuerySpaceSchemas(space);
|
|
20
26
|
|
|
21
|
-
// TODO(ZaymonFC): Support deleting Schema (DangerZone section).
|
|
22
27
|
return (
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<div
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</ControlPage>
|
|
36
|
-
</StackItem.Content>
|
|
28
|
+
<Settings.Root>
|
|
29
|
+
<Settings.Section title={t('schema verbose label')} description={t('schema description')}>
|
|
30
|
+
<div role='none' className={itemClasses}>
|
|
31
|
+
{schemas.length === 0 && <div className='text-center plb-4'>{t('no schemas found message')}</div>}
|
|
32
|
+
{schemas.map((schema) => (
|
|
33
|
+
<div role='none' key={schema.id}>
|
|
34
|
+
{schema.typename}
|
|
35
|
+
</div>
|
|
36
|
+
))}
|
|
37
|
+
</div>
|
|
38
|
+
</Settings.Section>
|
|
39
|
+
</Settings.Root>
|
|
37
40
|
);
|
|
38
41
|
};
|
|
39
42
|
|
|
@@ -4,55 +4,62 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
8
|
import { useClient } from '@dxos/react-client';
|
|
10
9
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
11
10
|
import { IconButton, Input, List, ListItem, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import {
|
|
11
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
13
12
|
|
|
14
13
|
import { meta } from '../meta';
|
|
15
|
-
import {
|
|
14
|
+
import { SpaceOperation, type SpaceSettingsProps } from '../types';
|
|
16
15
|
import { getSpaceDisplayName } from '../util';
|
|
17
16
|
|
|
18
|
-
export
|
|
17
|
+
export type SpacePluginSettingsComponentProps = {
|
|
18
|
+
settings: SpaceSettingsProps;
|
|
19
|
+
onSettingsChange: (fn: (current: SpaceSettingsProps) => SpaceSettingsProps) => void;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const SpacePluginSettings = ({ settings, onSettingsChange }: SpacePluginSettingsComponentProps) => {
|
|
19
23
|
const { t } = useTranslation(meta.id);
|
|
20
24
|
const client = useClient();
|
|
21
25
|
const spaces = useSpaces({ all: settings.showHidden });
|
|
22
|
-
const {
|
|
26
|
+
const { invokePromise } = useOperationInvoker();
|
|
23
27
|
|
|
24
28
|
return (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
+
<Settings.Root>
|
|
30
|
+
<Settings.Section title={t('space settings label')} description={t('space settings description')}>
|
|
31
|
+
<Settings.Group>
|
|
32
|
+
<Settings.ItemInput title={t('show hidden spaces label')}>
|
|
29
33
|
<Input.Switch
|
|
30
34
|
checked={settings.showHidden}
|
|
31
|
-
onCheckedChange={(checked) => (
|
|
35
|
+
onCheckedChange={(checked) => onSettingsChange((state) => ({ ...state, showHidden: !!checked }))}
|
|
32
36
|
/>
|
|
33
|
-
</
|
|
34
|
-
</
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<ListItem.
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
</Settings.ItemInput>
|
|
38
|
+
</Settings.Group>
|
|
39
|
+
|
|
40
|
+
<Settings.Container>
|
|
41
|
+
<List classNames='flex flex-col gap-trimSm'>
|
|
42
|
+
{spaces.map((space) => (
|
|
43
|
+
<ListItem.Root key={space.id} classNames='is-full items-center'>
|
|
44
|
+
{/* TODO(burdon): Should auto center and truncate; NOTE truncate doesn't work with flex grow. */}
|
|
45
|
+
<ListItem.Heading classNames='grow truncate !min-bs-0'>
|
|
46
|
+
{toLocalizedString(
|
|
47
|
+
getSpaceDisplayName(space, {
|
|
48
|
+
personal: space === client.spaces.default,
|
|
49
|
+
}),
|
|
50
|
+
t,
|
|
51
|
+
)}
|
|
52
|
+
</ListItem.Heading>
|
|
53
|
+
<IconButton
|
|
54
|
+
icon='ph--faders--regular'
|
|
55
|
+
onClick={() => invokePromise(SpaceOperation.OpenSettings, { space })}
|
|
56
|
+
label={t('open space settings label')}
|
|
57
|
+
/>
|
|
58
|
+
</ListItem.Root>
|
|
59
|
+
))}
|
|
60
|
+
</List>
|
|
61
|
+
</Settings.Container>
|
|
62
|
+
</Settings.Section>
|
|
63
|
+
</Settings.Root>
|
|
57
64
|
);
|
|
58
65
|
};
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import * as Option from 'effect/Option';
|
|
6
6
|
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { useAtomCapability } from '@dxos/app-framework/ui';
|
|
9
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
9
10
|
import { generateName } from '@dxos/display-name';
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { PublicKey
|
|
12
|
-
import { type SpaceMember,
|
|
11
|
+
import { type Key, Obj } from '@dxos/echo';
|
|
12
|
+
import { PublicKey } from '@dxos/react-client';
|
|
13
|
+
import { type SpaceMember, useMembers, useSpace } from '@dxos/react-client/echo';
|
|
13
14
|
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
14
15
|
import {
|
|
15
16
|
Avatar,
|
|
@@ -27,10 +28,9 @@ import {
|
|
|
27
28
|
import { AttentionGlyph, type AttentionGlyphProps, useAttended, useAttention } from '@dxos/react-ui-attention';
|
|
28
29
|
import { ComplexMap, keyToFallback } from '@dxos/util';
|
|
29
30
|
|
|
30
|
-
import { SpaceCapabilities } from '../../capabilities';
|
|
31
31
|
import { usePath } from '../../hooks';
|
|
32
32
|
import { meta } from '../../meta';
|
|
33
|
-
import { type ObjectViewerProps } from '../../types';
|
|
33
|
+
import { type ObjectViewerProps, SpaceCapabilities } from '../../types';
|
|
34
34
|
|
|
35
35
|
// TODO(thure): Get/derive these values from protocol
|
|
36
36
|
const REFRESH_INTERVAL = 5000;
|
|
@@ -43,17 +43,16 @@ const noViewers = new ComplexMap<PublicKey, ObjectViewerProps>(PublicKey.hash);
|
|
|
43
43
|
const getName = (identity: Identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
|
|
44
44
|
|
|
45
45
|
export type SpacePresenceProps = {
|
|
46
|
-
object: Obj.
|
|
47
|
-
|
|
46
|
+
object: Obj.Unknown;
|
|
47
|
+
spaceId?: Key.SpaceId;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
export const SpacePresence = ({ object,
|
|
51
|
-
|
|
52
|
-
const spaceState = useCapability(SpaceCapabilities.MutableState);
|
|
53
|
-
const client = useClient();
|
|
50
|
+
export const SpacePresence = ({ object, spaceId }: SpacePresenceProps) => {
|
|
51
|
+
const ephemeral = useAtomCapability(SpaceCapabilities.EphemeralState);
|
|
54
52
|
const identity = useIdentity();
|
|
55
|
-
const
|
|
56
|
-
const
|
|
53
|
+
const db = Obj.getDatabase(object);
|
|
54
|
+
const space = useSpace(spaceId ?? db?.spaceId);
|
|
55
|
+
const spaceMembers = useMembers(spaceId ?? db?.spaceId);
|
|
57
56
|
|
|
58
57
|
const [_moment, setMoment] = useState(Date.now());
|
|
59
58
|
|
|
@@ -71,11 +70,11 @@ export const SpacePresence = ({ object, spaceKey }: SpacePresenceProps) => {
|
|
|
71
70
|
|
|
72
71
|
// TODO(thure): Could it be a smell to return early when there are interactions with `deepSignal` later, since it
|
|
73
72
|
// prevents reactivity?
|
|
74
|
-
if (!identity || !
|
|
73
|
+
if (!identity || !ephemeral || !space) {
|
|
75
74
|
return null;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
const currentObjectViewers =
|
|
77
|
+
const currentObjectViewers = ephemeral.viewersByObject[Obj.getDXN(object).toString()] ?? noViewers;
|
|
79
78
|
|
|
80
79
|
const membersForObject = spaceMembers
|
|
81
80
|
.filter((member) => memberOnline(member) && memberIsNotSelf(member))
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
9
|
import { type Space } from '@dxos/client/echo';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
10
11
|
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
11
13
|
|
|
12
14
|
import { meta } from '../../meta';
|
|
13
15
|
|
|
@@ -17,17 +19,14 @@ export const SpaceRenamePopover = ({ space }: { space: Space }) => {
|
|
|
17
19
|
const { t } = useTranslation(meta.id);
|
|
18
20
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
19
21
|
const [name, setName] = useState(space.properties.name ?? '');
|
|
20
|
-
const {
|
|
22
|
+
const { invokePromise } = useOperationInvoker();
|
|
21
23
|
|
|
22
24
|
const handleDone = useCallback(() => {
|
|
23
|
-
space.properties
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
);
|
|
30
|
-
}, [space, name]);
|
|
25
|
+
Obj.change(space.properties, (p) => {
|
|
26
|
+
p.name = name;
|
|
27
|
+
});
|
|
28
|
+
void invokePromise(LayoutOperation.UpdatePopover, { anchorId: '', state: false });
|
|
29
|
+
}, [space, name, invokePromise]);
|
|
31
30
|
|
|
32
31
|
// TODO(thure): Why does the input value need to be uncontrolled to work?
|
|
33
32
|
return (
|
|
@@ -47,7 +46,7 @@ export const SpaceRenamePopover = ({ space }: { space: Space }) => {
|
|
|
47
46
|
</div>
|
|
48
47
|
<Popover.Close asChild>
|
|
49
48
|
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
50
|
-
{t('done label', { ns:
|
|
49
|
+
{t('done label', { ns: osTranslations })}
|
|
51
50
|
</Button>
|
|
52
51
|
</Popover.Close>
|
|
53
52
|
</div>
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { OperationPlugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import {
|
|
10
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
11
11
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
12
|
|
|
13
13
|
import { translations } from '../../translations';
|
|
@@ -15,7 +15,7 @@ import { translations } from '../../translations';
|
|
|
15
15
|
import { SpaceSettingsContainer, type SpaceSettingsContainerProps } from './SpaceSettingsContainer';
|
|
16
16
|
|
|
17
17
|
const Story = (props: Partial<SpaceSettingsContainerProps>) => {
|
|
18
|
-
const { space } =
|
|
18
|
+
const { space } = useClientStory();
|
|
19
19
|
return (
|
|
20
20
|
<div role='none' className='p-2 border border-primary-500 rounded'>
|
|
21
21
|
<SpaceSettingsContainer {...props} space={space!} />
|
|
@@ -28,10 +28,10 @@ const meta = {
|
|
|
28
28
|
component: SpaceSettingsContainer,
|
|
29
29
|
render: Story,
|
|
30
30
|
decorators: [
|
|
31
|
-
withTheme,
|
|
31
|
+
withTheme(),
|
|
32
32
|
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
33
33
|
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
34
|
-
withPluginManager({ plugins: [
|
|
34
|
+
withPluginManager({ plugins: [OperationPlugin()] }),
|
|
35
35
|
],
|
|
36
36
|
parameters: {
|
|
37
37
|
translations,
|