@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
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SPACE_TYPE,
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
SpaceOperation
|
|
4
|
+
} from "./chunk-KGLWYGIF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
meta
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HSMQFM57.mjs";
|
|
8
8
|
|
|
9
9
|
// src/util.tsx
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
12
|
+
import { SpaceState, isSpace } from "@dxos/client/echo";
|
|
13
13
|
import { Filter, Obj, Query, Ref, Type } from "@dxos/echo";
|
|
14
|
-
import { EXPANDO_TYPENAME } from "@dxos/echo/internal";
|
|
15
14
|
import { invariant } from "@dxos/invariant";
|
|
16
15
|
import { Migrations } from "@dxos/migrations";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention";
|
|
20
|
-
import { Collection } from "@dxos/schema";
|
|
16
|
+
import { Operation } from "@dxos/operation";
|
|
17
|
+
import { Graph, Node } from "@dxos/plugin-graph";
|
|
18
|
+
import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention/types";
|
|
19
|
+
import { Collection, Expando } from "@dxos/schema";
|
|
21
20
|
import { createFilename } from "@dxos/util";
|
|
22
21
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/util.tsx";
|
|
23
22
|
var SPACES = `${meta.id}-spaces`;
|
|
24
23
|
var COMPOSER_SPACE_LOCK = `${meta.id}/lock`;
|
|
25
24
|
var SHARED = "shared-spaces";
|
|
26
|
-
var atomFromQuery = (query) => {
|
|
27
|
-
return Atom.make((get) => {
|
|
28
|
-
const unsubscribe = query.subscribe((result) => {
|
|
29
|
-
get.setSelf(result.results);
|
|
30
|
-
});
|
|
31
|
-
get.addFinalizer(() => unsubscribe());
|
|
32
|
-
return query.results;
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
25
|
var getSpaceDisplayName = (space, { personal, namesCache = {} } = {}) => {
|
|
36
26
|
return space.state.get() === SpaceState.SPACE_READY && (space.properties.name?.length ?? 0) > 0 ? space.properties.name : namesCache[space.id] ? namesCache[space.id] : personal ? [
|
|
37
27
|
"personal space label",
|
|
@@ -45,45 +35,48 @@ var getSpaceDisplayName = (space, { personal, namesCache = {} } = {}) => {
|
|
|
45
35
|
}
|
|
46
36
|
];
|
|
47
37
|
};
|
|
48
|
-
var getCollectionGraphNodePartials = ({ collection,
|
|
38
|
+
var getCollectionGraphNodePartials = ({ collection, db, resolve }) => {
|
|
49
39
|
return {
|
|
50
40
|
acceptPersistenceClass: /* @__PURE__ */ new Set([
|
|
51
41
|
"echo"
|
|
52
42
|
]),
|
|
53
43
|
acceptPersistenceKey: /* @__PURE__ */ new Set([
|
|
54
|
-
|
|
44
|
+
db.spaceId
|
|
55
45
|
]),
|
|
56
46
|
role: "branch",
|
|
57
|
-
onRearrangeChildren: (nextOrder) => {
|
|
58
|
-
collection.objects = nextOrder.filter(Obj.isObject).map(Ref.make);
|
|
59
|
-
},
|
|
60
47
|
onTransferStart: (child, index) => {
|
|
61
|
-
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
Obj.change(collection, (c) => {
|
|
49
|
+
if (!c.objects.find((object) => object.target === child.data)) {
|
|
50
|
+
if (typeof index !== "undefined") {
|
|
51
|
+
c.objects.splice(index, 0, Ref.make(child.data));
|
|
52
|
+
} else {
|
|
53
|
+
c.objects.push(Ref.make(child.data));
|
|
54
|
+
}
|
|
66
55
|
}
|
|
67
|
-
}
|
|
56
|
+
});
|
|
68
57
|
},
|
|
69
58
|
onTransferEnd: (child, destination) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
Obj.change(collection, (c) => {
|
|
60
|
+
const index = c.objects.findIndex((object) => object.target === child.data);
|
|
61
|
+
if (index > -1) {
|
|
62
|
+
c.objects.splice(index, 1);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
74
65
|
},
|
|
75
66
|
onCopy: async (child, index) => {
|
|
76
|
-
const newObject = await cloneObject(child.data, resolve,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
67
|
+
const newObject = await cloneObject(child.data, resolve, db);
|
|
68
|
+
db.add(newObject);
|
|
69
|
+
Obj.change(collection, (c) => {
|
|
70
|
+
if (typeof index !== "undefined") {
|
|
71
|
+
c.objects.splice(index, 0, Ref.make(newObject));
|
|
72
|
+
} else {
|
|
73
|
+
c.objects.push(Ref.make(newObject));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
83
76
|
}
|
|
84
77
|
};
|
|
85
78
|
};
|
|
86
|
-
var getSystemCollectionNodePartials = ({ collection,
|
|
79
|
+
var getSystemCollectionNodePartials = ({ collection, db, resolve }) => {
|
|
87
80
|
const metadata = resolve(collection.key);
|
|
88
81
|
return {
|
|
89
82
|
label: [
|
|
@@ -99,7 +92,7 @@ var getSystemCollectionNodePartials = ({ collection, space, resolve }) => {
|
|
|
99
92
|
"echo"
|
|
100
93
|
]),
|
|
101
94
|
acceptPersistenceKey: /* @__PURE__ */ new Set([
|
|
102
|
-
|
|
95
|
+
db.spaceId
|
|
103
96
|
]),
|
|
104
97
|
role: "branch"
|
|
105
98
|
};
|
|
@@ -113,14 +106,20 @@ var getSchemaGraphNodePartials = () => {
|
|
|
113
106
|
var checkPendingMigration = (space) => {
|
|
114
107
|
return space.state.get() === SpaceState.SPACE_REQUIRES_MIGRATION || space.state.get() === SpaceState.SPACE_READY && !!Migrations.versionProperty && space.properties[Migrations.versionProperty] !== Migrations.targetVersion;
|
|
115
108
|
};
|
|
116
|
-
var constructSpaceNode = ({ space, navigable = false, personal, namesCache, resolve }) => {
|
|
109
|
+
var constructSpaceNode = ({ space, navigable = false, personal, namesCache, resolve, graph, spacesOrder }) => {
|
|
117
110
|
const hasPendingMigration = checkPendingMigration(space);
|
|
118
111
|
const collection = space.state.get() === SpaceState.SPACE_READY && space.properties[Collection.Collection.typename]?.target;
|
|
119
112
|
const partials = space.state.get() === SpaceState.SPACE_READY && Obj.instanceOf(Collection.Collection, collection) ? getCollectionGraphNodePartials({
|
|
120
113
|
collection,
|
|
121
|
-
space,
|
|
114
|
+
db: space.db,
|
|
122
115
|
resolve
|
|
123
116
|
}) : {};
|
|
117
|
+
const onRearrange = graph && spacesOrder ? (nextOrder) => {
|
|
118
|
+
Graph.sortEdges(graph, Node.RootId, "outbound", nextOrder.map(({ id }) => id));
|
|
119
|
+
Obj.change(spacesOrder, (mutableOrder) => {
|
|
120
|
+
mutableOrder.order = nextOrder.map(({ id }) => id);
|
|
121
|
+
});
|
|
122
|
+
} : void 0;
|
|
124
123
|
return {
|
|
125
124
|
id: space.id,
|
|
126
125
|
type: SPACE_TYPE,
|
|
@@ -141,7 +140,9 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
141
140
|
icon: space.state.get() === SpaceState.SPACE_READY && space.properties.icon ? `ph--${space.properties.icon}--regular` : void 0,
|
|
142
141
|
iconHue: space.state.get() === SpaceState.SPACE_READY && space.properties.iconHue,
|
|
143
142
|
disabled: !navigable || space.state.get() !== SpaceState.SPACE_READY || hasPendingMigration,
|
|
143
|
+
disposition: "workspace",
|
|
144
144
|
testId: "spacePlugin.space",
|
|
145
|
+
onRearrange,
|
|
145
146
|
canDrop: (source) => {
|
|
146
147
|
return Obj.isObject(source.item.data) || isSpace(source.item.data);
|
|
147
148
|
}
|
|
@@ -174,7 +175,8 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
174
175
|
}
|
|
175
176
|
],
|
|
176
177
|
icon: "ph--sliders--regular",
|
|
177
|
-
position: "hoist"
|
|
178
|
+
position: "hoist",
|
|
179
|
+
testId: "spacePlugin.general"
|
|
178
180
|
}
|
|
179
181
|
},
|
|
180
182
|
{
|
|
@@ -189,7 +191,8 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
189
191
|
}
|
|
190
192
|
],
|
|
191
193
|
icon: "ph--users--regular",
|
|
192
|
-
position: "hoist"
|
|
194
|
+
position: "hoist",
|
|
195
|
+
testId: "spacePlugin.members"
|
|
193
196
|
}
|
|
194
197
|
},
|
|
195
198
|
{
|
|
@@ -203,7 +206,8 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
203
206
|
ns: meta.id
|
|
204
207
|
}
|
|
205
208
|
],
|
|
206
|
-
icon: "ph--shapes--regular"
|
|
209
|
+
icon: "ph--shapes--regular",
|
|
210
|
+
testId: "spacePlugin.schema"
|
|
207
211
|
}
|
|
208
212
|
}
|
|
209
213
|
]
|
|
@@ -211,20 +215,18 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
211
215
|
]
|
|
212
216
|
};
|
|
213
217
|
};
|
|
214
|
-
var constructSpaceActions = ({ space,
|
|
218
|
+
var constructSpaceActions = ({ space, personal, migrating }) => {
|
|
215
219
|
const state = space.state.get();
|
|
216
220
|
const hasPendingMigration = checkPendingMigration(space);
|
|
217
221
|
const getId = (id) => `${id}/${space.id}`;
|
|
218
222
|
const actions = [];
|
|
219
223
|
if (hasPendingMigration) {
|
|
220
224
|
actions.push({
|
|
221
|
-
id: getId(
|
|
222
|
-
type:
|
|
223
|
-
data:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}));
|
|
227
|
-
},
|
|
225
|
+
id: getId(SpaceOperation.Migrate.meta.key),
|
|
226
|
+
type: Node.ActionGroupType,
|
|
227
|
+
data: () => Operation.invoke(SpaceOperation.Migrate, {
|
|
228
|
+
space
|
|
229
|
+
}),
|
|
228
230
|
properties: {
|
|
229
231
|
label: [
|
|
230
232
|
"migrate space label",
|
|
@@ -240,13 +242,11 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
|
|
|
240
242
|
}
|
|
241
243
|
if (state === SpaceState.SPACE_READY && !hasPendingMigration) {
|
|
242
244
|
actions.push({
|
|
243
|
-
id: getId(
|
|
244
|
-
type:
|
|
245
|
-
data:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}));
|
|
249
|
-
},
|
|
245
|
+
id: getId(SpaceOperation.OpenCreateObject.meta.key),
|
|
246
|
+
type: Node.ActionType,
|
|
247
|
+
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
248
|
+
target: space.db
|
|
249
|
+
}),
|
|
250
250
|
properties: {
|
|
251
251
|
label: [
|
|
252
252
|
"create object in space label",
|
|
@@ -255,18 +255,16 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
|
|
|
255
255
|
}
|
|
256
256
|
],
|
|
257
257
|
icon: "ph--plus--regular",
|
|
258
|
-
disposition: "item",
|
|
258
|
+
disposition: "list-item-primary",
|
|
259
259
|
testId: "spacePlugin.createObject"
|
|
260
260
|
}
|
|
261
261
|
}, {
|
|
262
|
-
id: getId(
|
|
263
|
-
type:
|
|
264
|
-
data:
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}));
|
|
269
|
-
},
|
|
262
|
+
id: getId(SpaceOperation.Rename.meta.key),
|
|
263
|
+
type: Node.ActionType,
|
|
264
|
+
data: (params) => Operation.invoke(SpaceOperation.Rename, {
|
|
265
|
+
space,
|
|
266
|
+
caller: params?.caller
|
|
267
|
+
}),
|
|
270
268
|
properties: {
|
|
271
269
|
label: [
|
|
272
270
|
"rename space label",
|
|
@@ -307,21 +305,19 @@ var createStaticSchemaNode = ({ schema, space }) => {
|
|
|
307
305
|
}
|
|
308
306
|
};
|
|
309
307
|
};
|
|
310
|
-
var createStaticSchemaActions = ({ schema, space,
|
|
308
|
+
var createStaticSchemaActions = ({ schema, space, deletable }) => {
|
|
311
309
|
const getId = (id) => `${space.id}/${Type.getTypename(schema)}/${id}`;
|
|
312
310
|
const actions = [
|
|
313
311
|
{
|
|
314
|
-
id: getId(
|
|
315
|
-
type:
|
|
316
|
-
data:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}));
|
|
324
|
-
},
|
|
312
|
+
id: getId(SpaceOperation.AddObject.meta.key),
|
|
313
|
+
type: Node.ActionType,
|
|
314
|
+
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
315
|
+
target: space.db,
|
|
316
|
+
views: true,
|
|
317
|
+
initialFormValues: {
|
|
318
|
+
typename: Type.getTypename(schema)
|
|
319
|
+
}
|
|
320
|
+
}),
|
|
325
321
|
properties: {
|
|
326
322
|
label: [
|
|
327
323
|
"add view to schema label",
|
|
@@ -335,11 +331,9 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
335
331
|
}
|
|
336
332
|
},
|
|
337
333
|
{
|
|
338
|
-
id: getId(
|
|
339
|
-
type:
|
|
340
|
-
data:
|
|
341
|
-
throw new Error("Not implemented");
|
|
342
|
-
},
|
|
334
|
+
id: getId(SpaceOperation.RenameObject.meta.key),
|
|
335
|
+
type: Node.ActionType,
|
|
336
|
+
data: () => Effect.fail(new Error("Not implemented")),
|
|
343
337
|
properties: {
|
|
344
338
|
label: [
|
|
345
339
|
"rename object label",
|
|
@@ -354,14 +348,16 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
354
348
|
}
|
|
355
349
|
},
|
|
356
350
|
{
|
|
357
|
-
id: getId(
|
|
358
|
-
type:
|
|
359
|
-
data:
|
|
351
|
+
id: getId(SpaceOperation.RemoveObjects.meta.key),
|
|
352
|
+
type: Node.ActionType,
|
|
353
|
+
data: () => Effect.sync(() => {
|
|
360
354
|
const index = space.properties.staticRecords.findIndex((typename) => typename === Type.getTypename(schema));
|
|
361
355
|
if (index > -1) {
|
|
362
|
-
space.properties
|
|
356
|
+
Obj.change(space.properties, (p) => {
|
|
357
|
+
p.staticRecords.splice(index, 1);
|
|
358
|
+
});
|
|
363
359
|
}
|
|
364
|
-
},
|
|
360
|
+
}),
|
|
365
361
|
properties: {
|
|
366
362
|
label: [
|
|
367
363
|
"delete object label",
|
|
@@ -376,23 +372,23 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
376
372
|
}
|
|
377
373
|
},
|
|
378
374
|
{
|
|
379
|
-
id: getId(
|
|
380
|
-
type:
|
|
381
|
-
data:
|
|
382
|
-
const result =
|
|
383
|
-
space,
|
|
375
|
+
id: getId(SpaceOperation.Snapshot.meta.key),
|
|
376
|
+
type: Node.ActionType,
|
|
377
|
+
data: Effect.fnUntraced(function* () {
|
|
378
|
+
const result = yield* Operation.invoke(SpaceOperation.Snapshot, {
|
|
379
|
+
db: space.db,
|
|
384
380
|
query: Query.select(Filter.type(schema)).ast
|
|
385
|
-
})
|
|
386
|
-
if (result.
|
|
387
|
-
|
|
381
|
+
});
|
|
382
|
+
if (result.snapshot) {
|
|
383
|
+
yield* Effect.tryPromise(() => downloadBlob(result.snapshot, createFilename({
|
|
388
384
|
parts: [
|
|
389
385
|
space.id,
|
|
390
386
|
Type.getTypename(schema)
|
|
391
387
|
],
|
|
392
388
|
ext: "json"
|
|
393
|
-
}));
|
|
389
|
+
})));
|
|
394
390
|
}
|
|
395
|
-
},
|
|
391
|
+
}),
|
|
396
392
|
properties: {
|
|
397
393
|
label: [
|
|
398
394
|
"snapshot by schema label",
|
|
@@ -407,7 +403,7 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
407
403
|
];
|
|
408
404
|
return actions;
|
|
409
405
|
};
|
|
410
|
-
var createObjectNode = ({
|
|
406
|
+
var createObjectNode = ({ db, object, disposition, droppable = true, navigable = false, managedCollectionChild = false, resolve, parentCollection }) => {
|
|
411
407
|
const type = Obj.getTypename(object);
|
|
412
408
|
if (!type) {
|
|
413
409
|
return null;
|
|
@@ -415,11 +411,11 @@ var createObjectNode = ({ space, object, disposition, droppable = true, navigabl
|
|
|
415
411
|
const metadata = resolve(type);
|
|
416
412
|
const partials = Obj.instanceOf(Collection.Collection, object) ? getCollectionGraphNodePartials({
|
|
417
413
|
collection: object,
|
|
418
|
-
|
|
414
|
+
db,
|
|
419
415
|
resolve
|
|
420
416
|
}) : Obj.instanceOf(Collection.Managed, object) ? getSystemCollectionNodePartials({
|
|
421
417
|
collection: object,
|
|
422
|
-
|
|
418
|
+
db,
|
|
423
419
|
resolve
|
|
424
420
|
}) : Obj.instanceOf(Type.PersistentType, object) ? getSchemaGraphNodePartials() : metadata.graphProps;
|
|
425
421
|
const label = object.name || Obj.getLabel(object) || // TODO(wittjosiah): Remove metadata labels.
|
|
@@ -447,9 +443,14 @@ var createObjectNode = ({ space, object, disposition, droppable = true, navigabl
|
|
|
447
443
|
disposition,
|
|
448
444
|
testId: "spacePlugin.object",
|
|
449
445
|
persistenceClass: "echo",
|
|
450
|
-
persistenceKey:
|
|
446
|
+
persistenceKey: db.spaceId,
|
|
451
447
|
selectable,
|
|
452
448
|
managedCollectionChild,
|
|
449
|
+
onRearrange: parentCollection ? (nextOrder) => {
|
|
450
|
+
Obj.change(parentCollection, (c) => {
|
|
451
|
+
c.objects = nextOrder.filter(Obj.isObject).map(Ref.make);
|
|
452
|
+
});
|
|
453
|
+
} : void 0,
|
|
453
454
|
blockInstruction: (source, instruction) => {
|
|
454
455
|
if (source.item.properties.managedCollectionChild) {
|
|
455
456
|
return true;
|
|
@@ -460,27 +461,27 @@ var createObjectNode = ({ space, object, disposition, droppable = true, navigabl
|
|
|
460
461
|
return managedCollectionChild;
|
|
461
462
|
},
|
|
462
463
|
canDrop: (source) => {
|
|
463
|
-
return droppable && isGraphNode(source.item) && Obj.isObject(source.item.data);
|
|
464
|
+
return droppable && Node.isGraphNode(source.item) && Obj.isObject(source.item.data);
|
|
464
465
|
},
|
|
465
466
|
...partials
|
|
466
467
|
}
|
|
467
468
|
};
|
|
468
469
|
};
|
|
469
|
-
var constructObjectActions = ({ object, graph,
|
|
470
|
-
const
|
|
471
|
-
invariant(
|
|
470
|
+
var constructObjectActions = ({ object, graph, resolve, capabilities, deletable = true, navigable = false, shareableLinkOrigin }) => {
|
|
471
|
+
const db = Obj.getDatabase(object);
|
|
472
|
+
invariant(db, "Database not found", {
|
|
472
473
|
F: __dxlog_file,
|
|
473
|
-
L:
|
|
474
|
+
L: 547,
|
|
474
475
|
S: void 0,
|
|
475
476
|
A: [
|
|
476
|
-
"
|
|
477
|
-
"'
|
|
477
|
+
"db",
|
|
478
|
+
"'Database not found'"
|
|
478
479
|
]
|
|
479
480
|
});
|
|
480
481
|
const typename = Obj.getTypename(object);
|
|
481
482
|
invariant(typename, "Object has no typename", {
|
|
482
483
|
F: __dxlog_file,
|
|
483
|
-
L:
|
|
484
|
+
L: 549,
|
|
484
485
|
S: void 0,
|
|
485
486
|
A: [
|
|
486
487
|
"typename",
|
|
@@ -490,18 +491,16 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
490
491
|
const getId = (id) => `${id}/${Obj.getDXN(object).toString()}`;
|
|
491
492
|
const managedCollection = Obj.instanceOf(Collection.Managed, object) ? object : void 0;
|
|
492
493
|
const metadata = managedCollection ? resolve(managedCollection.key) : {};
|
|
493
|
-
const
|
|
494
|
+
const createObject = metadata.createObject;
|
|
494
495
|
const inputSchema = metadata.inputSchema;
|
|
495
496
|
const actions = [
|
|
496
497
|
...Obj.instanceOf(Collection.Collection, object) ? [
|
|
497
498
|
{
|
|
498
|
-
id: getId(
|
|
499
|
-
type:
|
|
500
|
-
data:
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
}));
|
|
504
|
-
},
|
|
499
|
+
id: getId(SpaceOperation.OpenCreateObject.meta.key),
|
|
500
|
+
type: Node.ActionType,
|
|
501
|
+
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
502
|
+
target: object
|
|
503
|
+
}),
|
|
505
504
|
properties: {
|
|
506
505
|
label: [
|
|
507
506
|
"create object in collection label",
|
|
@@ -517,17 +516,15 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
517
516
|
] : [],
|
|
518
517
|
...Obj.instanceOf(Type.PersistentType, object) ? [
|
|
519
518
|
{
|
|
520
|
-
id: getId(
|
|
521
|
-
type:
|
|
522
|
-
data:
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}));
|
|
530
|
-
},
|
|
519
|
+
id: getId(SpaceOperation.AddObject.meta.key),
|
|
520
|
+
type: Node.ActionType,
|
|
521
|
+
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
522
|
+
target: db,
|
|
523
|
+
views: true,
|
|
524
|
+
initialFormValues: {
|
|
525
|
+
typename: object.typename
|
|
526
|
+
}
|
|
527
|
+
}),
|
|
531
528
|
properties: {
|
|
532
529
|
label: [
|
|
533
530
|
"add view to schema label",
|
|
@@ -541,23 +538,23 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
541
538
|
}
|
|
542
539
|
},
|
|
543
540
|
{
|
|
544
|
-
id: getId(
|
|
545
|
-
type:
|
|
546
|
-
data:
|
|
547
|
-
const result =
|
|
548
|
-
|
|
541
|
+
id: getId(SpaceOperation.Snapshot.meta.key),
|
|
542
|
+
type: Node.ActionType,
|
|
543
|
+
data: Effect.fnUntraced(function* () {
|
|
544
|
+
const result = yield* Operation.invoke(SpaceOperation.Snapshot, {
|
|
545
|
+
db,
|
|
549
546
|
query: Query.select(Filter.type(Type.toEffectSchema(object.jsonSchema))).ast
|
|
550
|
-
})
|
|
551
|
-
if (result.
|
|
552
|
-
|
|
547
|
+
});
|
|
548
|
+
if (result.snapshot) {
|
|
549
|
+
yield* Effect.promise(() => downloadBlob(result.snapshot, createFilename({
|
|
553
550
|
parts: [
|
|
554
|
-
|
|
551
|
+
db.spaceId,
|
|
555
552
|
object.typename
|
|
556
553
|
],
|
|
557
554
|
ext: "json"
|
|
558
|
-
}));
|
|
555
|
+
})));
|
|
559
556
|
}
|
|
560
|
-
},
|
|
557
|
+
}),
|
|
561
558
|
properties: {
|
|
562
559
|
label: [
|
|
563
560
|
"snapshot by schema label",
|
|
@@ -570,27 +567,35 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
570
567
|
}
|
|
571
568
|
}
|
|
572
569
|
] : [],
|
|
573
|
-
...
|
|
570
|
+
...createObject ? [
|
|
574
571
|
{
|
|
575
|
-
id: getId(
|
|
576
|
-
type:
|
|
577
|
-
data:
|
|
572
|
+
id: getId(SpaceOperation.OpenCreateObject.meta.key),
|
|
573
|
+
type: Node.ActionType,
|
|
574
|
+
data: Effect.fnUntraced(function* () {
|
|
578
575
|
if (inputSchema) {
|
|
579
|
-
|
|
580
|
-
target:
|
|
576
|
+
yield* Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
577
|
+
target: db,
|
|
581
578
|
typename: managedCollection ? managedCollection.key : void 0
|
|
582
|
-
})
|
|
579
|
+
});
|
|
583
580
|
} else {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
581
|
+
const createdObject = yield* createObject({}, {
|
|
582
|
+
db,
|
|
583
|
+
capabilities
|
|
584
|
+
});
|
|
585
|
+
const addResult = yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
586
|
+
target: db,
|
|
587
|
+
hidden: true,
|
|
588
|
+
object: createdObject
|
|
589
|
+
});
|
|
590
|
+
if (addResult.id) {
|
|
591
|
+
yield* Operation.invoke(LayoutOperation.Open, {
|
|
592
|
+
subject: [
|
|
593
|
+
addResult.id
|
|
594
|
+
]
|
|
595
|
+
});
|
|
596
|
+
}
|
|
592
597
|
}
|
|
593
|
-
},
|
|
598
|
+
}),
|
|
594
599
|
properties: {
|
|
595
600
|
label: [
|
|
596
601
|
"create object in system collection label",
|
|
@@ -606,14 +611,12 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
606
611
|
] : [],
|
|
607
612
|
...managedCollection ? [] : [
|
|
608
613
|
{
|
|
609
|
-
id: getId(
|
|
610
|
-
type:
|
|
611
|
-
data:
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}));
|
|
616
|
-
},
|
|
614
|
+
id: getId(SpaceOperation.RenameObject.meta.key),
|
|
615
|
+
type: Node.ActionType,
|
|
616
|
+
data: (params) => Operation.invoke(SpaceOperation.RenameObject, {
|
|
617
|
+
object,
|
|
618
|
+
caller: params?.caller
|
|
619
|
+
}),
|
|
617
620
|
properties: {
|
|
618
621
|
label: [
|
|
619
622
|
"rename object label",
|
|
@@ -631,17 +634,17 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
631
634
|
}
|
|
632
635
|
},
|
|
633
636
|
{
|
|
634
|
-
id: getId(
|
|
635
|
-
type:
|
|
636
|
-
data:
|
|
637
|
-
const collection =
|
|
638
|
-
|
|
637
|
+
id: getId(SpaceOperation.RemoveObjects.meta.key),
|
|
638
|
+
type: Node.ActionType,
|
|
639
|
+
data: Effect.fnUntraced(function* () {
|
|
640
|
+
const collection = Graph.getConnections(graph, Obj.getDXN(object).toString(), "inbound").find((node) => Obj.instanceOf(Collection.Collection, node.data))?.data;
|
|
641
|
+
yield* Operation.invoke(SpaceOperation.RemoveObjects, {
|
|
639
642
|
objects: [
|
|
640
643
|
object
|
|
641
644
|
],
|
|
642
645
|
target: collection
|
|
643
|
-
})
|
|
644
|
-
},
|
|
646
|
+
});
|
|
647
|
+
}),
|
|
645
648
|
properties: {
|
|
646
649
|
label: [
|
|
647
650
|
"delete object label",
|
|
@@ -661,11 +664,11 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
661
664
|
...navigable || !Obj.instanceOf(Collection.Collection, object) && !Obj.instanceOf(Collection.Managed, object) && !Obj.instanceOf(Type.PersistentType, object) ? [
|
|
662
665
|
{
|
|
663
666
|
id: getId("copy-link"),
|
|
664
|
-
type:
|
|
665
|
-
data: async () => {
|
|
666
|
-
const url = `${
|
|
667
|
+
type: Node.ActionType,
|
|
668
|
+
data: () => Effect.promise(async () => {
|
|
669
|
+
const url = `${shareableLinkOrigin}/${db.spaceId}/${Obj.getDXN(object).toString()}`;
|
|
667
670
|
await navigator.clipboard.writeText(url);
|
|
668
|
-
},
|
|
671
|
+
}),
|
|
669
672
|
properties: {
|
|
670
673
|
label: [
|
|
671
674
|
"copy link label",
|
|
@@ -681,14 +684,11 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
681
684
|
] : [],
|
|
682
685
|
// TODO(wittjosiah): Factor out and apply to all nodes.
|
|
683
686
|
{
|
|
684
|
-
id: getId(
|
|
685
|
-
type:
|
|
686
|
-
data:
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
subject: Obj.getDXN(object).toString()
|
|
690
|
-
}));
|
|
691
|
-
},
|
|
687
|
+
id: getId(LayoutOperation.Expose.meta.key),
|
|
688
|
+
type: Node.ActionType,
|
|
689
|
+
data: () => Operation.invoke(LayoutOperation.Expose, {
|
|
690
|
+
subject: Obj.getDXN(object).toString()
|
|
691
|
+
}),
|
|
692
692
|
properties: {
|
|
693
693
|
label: [
|
|
694
694
|
"expose object label",
|
|
@@ -731,14 +731,14 @@ var getNestedObjects = async (object, resolve) => {
|
|
|
731
731
|
...nested.flat()
|
|
732
732
|
];
|
|
733
733
|
};
|
|
734
|
-
var cloneObject = async (object, resolve,
|
|
734
|
+
var cloneObject = async (object, resolve, newDb) => {
|
|
735
735
|
const schema = Obj.getSchema(object);
|
|
736
|
-
const typename = schema ? Type.getTypename(schema) ??
|
|
736
|
+
const typename = schema ? Type.getTypename(schema) ?? Expando.Expando.typename : Expando.Expando.typename;
|
|
737
737
|
const metadata = resolve(typename);
|
|
738
738
|
const serializer = metadata.serializer;
|
|
739
739
|
invariant(serializer, `No serializer for type: ${typename}`, {
|
|
740
740
|
F: __dxlog_file,
|
|
741
|
-
L:
|
|
741
|
+
L: 779,
|
|
742
742
|
S: void 0,
|
|
743
743
|
A: [
|
|
744
744
|
"serializer",
|
|
@@ -750,7 +750,7 @@ var cloneObject = async (object, resolve, newSpace) => {
|
|
|
750
750
|
});
|
|
751
751
|
return serializer.deserialize({
|
|
752
752
|
content,
|
|
753
|
-
|
|
753
|
+
db: newDb,
|
|
754
754
|
newId: true
|
|
755
755
|
});
|
|
756
756
|
};
|
|
@@ -759,7 +759,6 @@ export {
|
|
|
759
759
|
SPACES,
|
|
760
760
|
COMPOSER_SPACE_LOCK,
|
|
761
761
|
SHARED,
|
|
762
|
-
atomFromQuery,
|
|
763
762
|
getSpaceDisplayName,
|
|
764
763
|
constructSpaceNode,
|
|
765
764
|
constructSpaceActions,
|
|
@@ -770,4 +769,4 @@ export {
|
|
|
770
769
|
getNestedObjects,
|
|
771
770
|
cloneObject
|
|
772
771
|
};
|
|
773
|
-
//# sourceMappingURL=chunk-
|
|
772
|
+
//# sourceMappingURL=chunk-WAOJLA2S.mjs.map
|