@dxos/plugin-space 0.8.4-main.66e292d → 0.8.4-main.69d29f4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs +129 -0
- package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs.map +7 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +148 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +142 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +107 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +523 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +84 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +7 -0
- package/dist/lib/browser/chunk-3X2EA2OA.mjs +1898 -0
- package/dist/lib/browser/chunk-3X2EA2OA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-P25R3AOK.mjs → chunk-4WZUGLQQ.mjs} +49 -56
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs +19 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +7 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs +13 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs.map +7 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs +714 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VZBIIYFM.mjs → chunk-HSMQFM57.mjs} +1 -1
- package/dist/lib/browser/chunk-HSMQFM57.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GJOZILGC.mjs → chunk-SUI34XSA.mjs} +204 -200
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-POFUXISV.mjs → chunk-ZT2VPYRM.mjs} +4 -3
- package/dist/lib/browser/{chunk-POFUXISV.mjs.map → chunk-ZT2VPYRM.mjs.map} +2 -2
- package/dist/lib/browser/cli/index.mjs +849 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs +23 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +213 -192
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +827 -0
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +7 -0
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs +30 -0
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs.map +7 -0
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs +382 -0
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs.map +7 -0
- package/dist/lib/browser/{repair-CNLE35NF.mjs → repair-CJG26D52.mjs} +16 -10
- package/dist/lib/browser/repair-CJG26D52.mjs.map +7 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs +33 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +7 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +242 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +7 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs +58 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -8
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs +130 -0
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +149 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +143 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +108 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +524 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +85 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs → chunk-2SW6S2BB.mjs} +4 -3
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs.map → chunk-2SW6S2BB.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-I6FZP42D.mjs → chunk-7KMYUWSR.mjs} +204 -200
- package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs +20 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-EYS3L2NO.mjs +1899 -0
- package/dist/lib/node-esm/chunk-EYS3L2NO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs +15 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7EV4SN47.mjs → chunk-JOBIWCBC.mjs} +49 -56
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +715 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BDEFTL6K.mjs → chunk-SL4BJSUG.mjs} +1 -1
- package/dist/lib/node-esm/chunk-SL4BJSUG.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +850 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +25 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +213 -192
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs +828 -0
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs +31 -0
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs +383 -0
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-EHZS6MFY.mjs → repair-G3ZW3VG3.mjs} +16 -10
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +7 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs +34 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +7 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +243 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +7 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs +59 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -8
- package/dist/types/src/SpacePlugin.d.ts +3 -15
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts +5 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts +3 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -20
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +6 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +9 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +8 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts +3 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +5 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +13 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +17 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/add.d.ts +17 -0
- package/dist/types/src/cli/commands/database/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/index.d.ts +3 -0
- package/dist/types/src/cli/commands/database/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts +13 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/remove.d.ts +9 -0
- package/dist/types/src/cli/commands/database/remove.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/stats.d.ts +6 -0
- package/dist/types/src/cli/commands/database/stats.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/util.d.ts +14 -0
- package/dist/types/src/cli/commands/database/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +4 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/index.d.ts +7 -0
- package/dist/types/src/cli/commands/queue/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/query.d.ts +8 -0
- package/dist/types/src/cli/commands/queue/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/util.d.ts +6 -0
- package/dist/types/src/cli/commands/queue/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts +12 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts +12 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/index.d.ts +31 -0
- package/dist/types/src/cli/commands/space/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts +13 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts +14 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts +17 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts +13 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts +9 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts +12 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts +8 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts +19 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts +6 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +5 -2
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +16 -6
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -4
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +10 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +1 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts +8 -0
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectDetailsPanel → ObjectCardStack}/ObjectForm.d.ts +2 -3
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts +3 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts +9 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +9 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts +3 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +1 -1
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.d.ts +1 -1
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +10 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts +4 -4
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +9 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +10 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +9 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +14 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +6 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +3 -4
- package/dist/types/src/helpers/query.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +2 -2
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -8
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +2 -2
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +9 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +71 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/form.d.ts +1 -3
- package/dist/types/src/types/form.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +638 -355
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +35 -31
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -69
- package/src/SpacePlugin.ts +153 -192
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +617 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +82 -0
- package/src/capabilities/app-graph-serializer/index.ts +7 -0
- package/src/capabilities/identity-created/identity-created.ts +29 -0
- package/src/capabilities/identity-created/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +760 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +375 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +21 -11
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +32 -0
- package/src/capabilities/spaces-ready/index.ts +7 -0
- package/src/capabilities/spaces-ready/spaces-ready.ts +289 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +64 -0
- package/src/cli/commands/database/add.ts +116 -0
- package/src/cli/commands/database/index.ts +16 -0
- package/src/cli/commands/database/query/index.ts +5 -0
- package/src/cli/commands/database/query/query.test.ts +55 -0
- package/src/cli/commands/database/query/query.ts +44 -0
- package/src/cli/commands/database/remove.ts +51 -0
- package/src/cli/commands/database/stats.ts +44 -0
- package/src/cli/commands/database/util.ts +32 -0
- package/src/cli/commands/index.ts +7 -0
- package/src/cli/commands/queue/index.ts +12 -0
- package/src/cli/commands/queue/query.ts +45 -0
- package/src/cli/commands/queue/util.ts +19 -0
- package/src/cli/commands/space/close/close.ts +40 -0
- package/src/cli/commands/space/close/index.ts +5 -0
- package/src/cli/commands/space/create/create.test.ts +67 -0
- package/src/cli/commands/space/create/create.ts +61 -0
- package/src/cli/commands/space/create/index.ts +5 -0
- package/src/cli/commands/space/index.ts +21 -0
- package/src/cli/commands/space/info/index.ts +5 -0
- package/src/cli/commands/space/info/info.test.ts +47 -0
- package/src/cli/commands/space/info/info.ts +37 -0
- package/src/cli/commands/space/join/index.ts +5 -0
- package/src/cli/commands/space/join/join.ts +122 -0
- package/src/cli/commands/space/join/util.ts +82 -0
- package/src/cli/commands/space/list/index.ts +5 -0
- package/src/cli/commands/space/list/list.test.ts +36 -0
- package/src/cli/commands/space/list/list.ts +30 -0
- package/src/cli/commands/space/members/index.ts +5 -0
- package/src/cli/commands/space/members/members.test.ts +46 -0
- package/src/cli/commands/space/members/members.ts +40 -0
- package/src/cli/commands/space/members/util.ts +29 -0
- package/src/cli/commands/space/open/index.ts +5 -0
- package/src/cli/commands/space/open/open.ts +39 -0
- package/src/cli/commands/space/schema/index.ts +12 -0
- package/src/cli/commands/space/schema/list/index.ts +5 -0
- package/src/cli/commands/space/schema/list/list.test.ts +42 -0
- package/src/cli/commands/space/schema/list/list.ts +64 -0
- package/src/cli/commands/space/schema/list/util.ts +39 -0
- package/src/cli/commands/space/share/index.ts +5 -0
- package/src/cli/commands/space/share/share.ts +112 -0
- package/src/cli/commands/space/sync/index.ts +5 -0
- package/src/cli/commands/space/sync/sync.test.ts +12 -0
- package/src/cli/commands/space/sync/sync.ts +33 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +81 -0
- package/src/components/AwaitingObject.tsx +13 -10
- package/src/components/CollectionArticle.tsx +144 -19
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +27 -21
- package/src/components/CreateDialog/CreateObjectDialog.tsx +39 -47
- package/src/components/CreateDialog/CreateObjectPanel.tsx +125 -70
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -47
- package/src/components/JoinDialog/JoinDialog.tsx +25 -52
- package/src/components/MembersContainer/MembersContainer.stories.tsx +2 -2
- package/src/components/MembersContainer/MembersContainer.tsx +35 -37
- package/src/components/MenuFooter.tsx +1 -1
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +67 -0
- package/src/components/ObjectCardStack/ObjectForm.tsx +97 -0
- package/src/components/ObjectCardStack/index.ts +7 -0
- package/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.tsx +4 -4
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
- package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
- package/src/components/ObjectDetails/index.ts +7 -0
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +9 -13
- package/src/components/RecordArticle.stories.tsx +12 -12
- package/src/components/RecordArticle.tsx +26 -18
- package/src/components/SchemaContainer.tsx +3 -3
- package/src/components/SpacePluginSettings.tsx +11 -7
- package/src/components/SpacePresence/SpacePresence.tsx +14 -16
- package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +11 -12
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +180 -184
- package/src/components/SyncStatus/SyncStatus.tsx +1 -1
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +16 -13
- package/src/components/index.ts +5 -5
- package/src/constants.ts +11 -0
- package/src/helpers/query.ts +7 -12
- package/src/hooks/useActiveSpace.ts +6 -4
- package/src/hooks/useInputSurfaceLookup.tsx +8 -17
- package/src/hooks/usePath.ts +4 -4
- package/src/hooks/useTypeOptions.ts +1 -3
- package/src/index.ts +1 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +2 -0
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +15 -0
- package/src/types/form.ts +26 -32
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +528 -247
- package/src/util.tsx +219 -231
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs +0 -31
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs +0 -141
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs.map +0 -7
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs +0 -144
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs.map +0 -7
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs +0 -116
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs +0 -517
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs.map +0 -7
- package/dist/lib/browser/chunk-6A3NWBB6.mjs +0 -392
- package/dist/lib/browser/chunk-6A3NWBB6.mjs.map +0 -7
- package/dist/lib/browser/chunk-C6DAPIFF.mjs +0 -20
- package/dist/lib/browser/chunk-C6DAPIFF.mjs.map +0 -7
- package/dist/lib/browser/chunk-GJOZILGC.mjs.map +0 -7
- package/dist/lib/browser/chunk-KCZ527AM.mjs +0 -2126
- package/dist/lib/browser/chunk-KCZ527AM.mjs.map +0 -7
- package/dist/lib/browser/chunk-P25R3AOK.mjs.map +0 -7
- package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WJXU4GKV.mjs +0 -19
- package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +0 -7
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs +0 -23
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs +0 -773
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs.map +0 -7
- package/dist/lib/browser/react-root-JCRD74GI.mjs +0 -30
- package/dist/lib/browser/react-root-JCRD74GI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VOETEAG3.mjs +0 -365
- package/dist/lib/browser/react-surface-VOETEAG3.mjs.map +0 -7
- package/dist/lib/browser/repair-CNLE35NF.mjs.map +0 -7
- package/dist/lib/browser/settings-TRLI52I5.mjs +0 -24
- package/dist/lib/browser/settings-TRLI52I5.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs +0 -208
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs.map +0 -7
- package/dist/lib/browser/state-C7N6EDDZ.mjs +0 -47
- package/dist/lib/browser/state-C7N6EDDZ.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs +0 -32
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs +0 -142
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs +0 -145
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs.map +0 -7
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs +0 -117
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs +0 -518
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7EV4SN47.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs +0 -20
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-I6FZP42D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAMGJUFU.mjs +0 -2127
- package/dist/lib/node-esm/chunk-JAMGJUFU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs +0 -21
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X34VDVMY.mjs +0 -393
- package/dist/lib/node-esm/chunk-X34VDVMY.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs +0 -25
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs +0 -774
- package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs +0 -31
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs +0 -366
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs.map +0 -7
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-MNQTKHL7.mjs +0 -25
- package/dist/lib/node-esm/settings-MNQTKHL7.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs +0 -209
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs.map +0 -7
- package/dist/lib/node-esm/state-45TXZQJ6.mjs +0 -48
- package/dist/lib/node-esm/state-45TXZQJ6.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -34
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/identity-created.d.ts +0 -4
- package/dist/types/src/capabilities/identity-created.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -9
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -7
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +0 -4
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -5
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +0 -9
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +0 -3
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +0 -7
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +0 -8
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts +0 -3
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -689
- package/src/capabilities/app-graph-serializer.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -40
- package/src/capabilities/identity-created.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -706
- package/src/capabilities/react-root.tsx +0 -22
- package/src/capabilities/react-surface.tsx +0 -350
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -243
- package/src/capabilities/state.ts +0 -46
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -51
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -72
- package/src/components/ObjectDetailsPanel/index.ts +0 -7
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -80
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -111
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
- package/src/components/ObjectSettings/index.ts +0 -7
- package/src/events.ts +0 -15
- /package/dist/types/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.d.ts +0 -0
- /package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +0 -0
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SPACE_TYPE,
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
SpaceOperation
|
|
4
|
+
} from "./chunk-CCRSHECL.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 { Common } from "@dxos/app-framework";
|
|
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";
|
|
20
|
+
import { createFilename } from "@dxos/util";
|
|
21
21
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/util.tsx";
|
|
22
22
|
var SPACES = `${meta.id}-spaces`;
|
|
23
23
|
var COMPOSER_SPACE_LOCK = `${meta.id}/lock`;
|
|
24
24
|
var SHARED = "shared-spaces";
|
|
25
|
-
var atomFromQuery = (query) => {
|
|
26
|
-
return Atom.make((get) => {
|
|
27
|
-
const unsubscribe = query.subscribe((result) => {
|
|
28
|
-
get.setSelf(result.objects);
|
|
29
|
-
});
|
|
30
|
-
get.addFinalizer(() => unsubscribe());
|
|
31
|
-
return query.objects;
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
25
|
var getSpaceDisplayName = (space, { personal, namesCache = {} } = {}) => {
|
|
35
26
|
return space.state.get() === SpaceState.SPACE_READY && (space.properties.name?.length ?? 0) > 0 ? space.properties.name : namesCache[space.id] ? namesCache[space.id] : personal ? [
|
|
36
27
|
"personal space label",
|
|
@@ -44,45 +35,48 @@ var getSpaceDisplayName = (space, { personal, namesCache = {} } = {}) => {
|
|
|
44
35
|
}
|
|
45
36
|
];
|
|
46
37
|
};
|
|
47
|
-
var getCollectionGraphNodePartials = ({ collection,
|
|
38
|
+
var getCollectionGraphNodePartials = ({ collection, db, resolve }) => {
|
|
48
39
|
return {
|
|
49
40
|
acceptPersistenceClass: /* @__PURE__ */ new Set([
|
|
50
41
|
"echo"
|
|
51
42
|
]),
|
|
52
43
|
acceptPersistenceKey: /* @__PURE__ */ new Set([
|
|
53
|
-
|
|
44
|
+
db.spaceId
|
|
54
45
|
]),
|
|
55
46
|
role: "branch",
|
|
56
|
-
onRearrangeChildren: (nextOrder) => {
|
|
57
|
-
collection.objects = nextOrder.filter(Obj.isObject).map(Ref.make);
|
|
58
|
-
},
|
|
59
47
|
onTransferStart: (child, index) => {
|
|
60
|
-
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
}
|
|
65
55
|
}
|
|
66
|
-
}
|
|
56
|
+
});
|
|
67
57
|
},
|
|
68
58
|
onTransferEnd: (child, destination) => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
+
});
|
|
73
65
|
},
|
|
74
66
|
onCopy: async (child, index) => {
|
|
75
|
-
const newObject = await cloneObject(child.data, resolve,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
+
});
|
|
82
76
|
}
|
|
83
77
|
};
|
|
84
78
|
};
|
|
85
|
-
var getSystemCollectionNodePartials = ({ collection,
|
|
79
|
+
var getSystemCollectionNodePartials = ({ collection, db, resolve }) => {
|
|
86
80
|
const metadata = resolve(collection.key);
|
|
87
81
|
return {
|
|
88
82
|
label: [
|
|
@@ -98,7 +92,7 @@ var getSystemCollectionNodePartials = ({ collection, space, resolve }) => {
|
|
|
98
92
|
"echo"
|
|
99
93
|
]),
|
|
100
94
|
acceptPersistenceKey: /* @__PURE__ */ new Set([
|
|
101
|
-
|
|
95
|
+
db.spaceId
|
|
102
96
|
]),
|
|
103
97
|
role: "branch"
|
|
104
98
|
};
|
|
@@ -112,14 +106,20 @@ var getSchemaGraphNodePartials = () => {
|
|
|
112
106
|
var checkPendingMigration = (space) => {
|
|
113
107
|
return space.state.get() === SpaceState.SPACE_REQUIRES_MIGRATION || space.state.get() === SpaceState.SPACE_READY && !!Migrations.versionProperty && space.properties[Migrations.versionProperty] !== Migrations.targetVersion;
|
|
114
108
|
};
|
|
115
|
-
var constructSpaceNode = ({ space, navigable = false, personal, namesCache, resolve }) => {
|
|
109
|
+
var constructSpaceNode = ({ space, navigable = false, personal, namesCache, resolve, graph, spacesOrder }) => {
|
|
116
110
|
const hasPendingMigration = checkPendingMigration(space);
|
|
117
111
|
const collection = space.state.get() === SpaceState.SPACE_READY && space.properties[Collection.Collection.typename]?.target;
|
|
118
112
|
const partials = space.state.get() === SpaceState.SPACE_READY && Obj.instanceOf(Collection.Collection, collection) ? getCollectionGraphNodePartials({
|
|
119
113
|
collection,
|
|
120
|
-
space,
|
|
114
|
+
db: space.db,
|
|
121
115
|
resolve
|
|
122
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;
|
|
123
123
|
return {
|
|
124
124
|
id: space.id,
|
|
125
125
|
type: SPACE_TYPE,
|
|
@@ -140,7 +140,9 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
140
140
|
icon: space.state.get() === SpaceState.SPACE_READY && space.properties.icon ? `ph--${space.properties.icon}--regular` : void 0,
|
|
141
141
|
iconHue: space.state.get() === SpaceState.SPACE_READY && space.properties.iconHue,
|
|
142
142
|
disabled: !navigable || space.state.get() !== SpaceState.SPACE_READY || hasPendingMigration,
|
|
143
|
+
disposition: "workspace",
|
|
143
144
|
testId: "spacePlugin.space",
|
|
145
|
+
onRearrange,
|
|
144
146
|
canDrop: (source) => {
|
|
145
147
|
return Obj.isObject(source.item.data) || isSpace(source.item.data);
|
|
146
148
|
}
|
|
@@ -173,7 +175,8 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
173
175
|
}
|
|
174
176
|
],
|
|
175
177
|
icon: "ph--sliders--regular",
|
|
176
|
-
position: "hoist"
|
|
178
|
+
position: "hoist",
|
|
179
|
+
testId: "spacePlugin.general"
|
|
177
180
|
}
|
|
178
181
|
},
|
|
179
182
|
{
|
|
@@ -188,7 +191,8 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
188
191
|
}
|
|
189
192
|
],
|
|
190
193
|
icon: "ph--users--regular",
|
|
191
|
-
position: "hoist"
|
|
194
|
+
position: "hoist",
|
|
195
|
+
testId: "spacePlugin.members"
|
|
192
196
|
}
|
|
193
197
|
},
|
|
194
198
|
{
|
|
@@ -202,7 +206,8 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
202
206
|
ns: meta.id
|
|
203
207
|
}
|
|
204
208
|
],
|
|
205
|
-
icon: "ph--shapes--regular"
|
|
209
|
+
icon: "ph--shapes--regular",
|
|
210
|
+
testId: "spacePlugin.schema"
|
|
206
211
|
}
|
|
207
212
|
}
|
|
208
213
|
]
|
|
@@ -210,20 +215,18 @@ var constructSpaceNode = ({ space, navigable = false, personal, namesCache, reso
|
|
|
210
215
|
]
|
|
211
216
|
};
|
|
212
217
|
};
|
|
213
|
-
var constructSpaceActions = ({ space,
|
|
218
|
+
var constructSpaceActions = ({ space, personal, migrating }) => {
|
|
214
219
|
const state = space.state.get();
|
|
215
220
|
const hasPendingMigration = checkPendingMigration(space);
|
|
216
221
|
const getId = (id) => `${id}/${space.id}`;
|
|
217
222
|
const actions = [];
|
|
218
223
|
if (hasPendingMigration) {
|
|
219
224
|
actions.push({
|
|
220
|
-
id: getId(
|
|
221
|
-
type:
|
|
222
|
-
data:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}));
|
|
226
|
-
},
|
|
225
|
+
id: getId(SpaceOperation.Migrate.meta.key),
|
|
226
|
+
type: Node.ActionGroupType,
|
|
227
|
+
data: () => Operation.invoke(SpaceOperation.Migrate, {
|
|
228
|
+
space
|
|
229
|
+
}),
|
|
227
230
|
properties: {
|
|
228
231
|
label: [
|
|
229
232
|
"migrate space label",
|
|
@@ -239,13 +242,11 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
|
|
|
239
242
|
}
|
|
240
243
|
if (state === SpaceState.SPACE_READY && !hasPendingMigration) {
|
|
241
244
|
actions.push({
|
|
242
|
-
id: getId(
|
|
243
|
-
type:
|
|
244
|
-
data:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}));
|
|
248
|
-
},
|
|
245
|
+
id: getId(SpaceOperation.OpenCreateObject.meta.key),
|
|
246
|
+
type: Node.ActionType,
|
|
247
|
+
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
248
|
+
target: space.db
|
|
249
|
+
}),
|
|
249
250
|
properties: {
|
|
250
251
|
label: [
|
|
251
252
|
"create object in space label",
|
|
@@ -258,14 +259,12 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
|
|
|
258
259
|
testId: "spacePlugin.createObject"
|
|
259
260
|
}
|
|
260
261
|
}, {
|
|
261
|
-
id: getId(
|
|
262
|
-
type:
|
|
263
|
-
data:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}));
|
|
268
|
-
},
|
|
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
|
+
}),
|
|
269
268
|
properties: {
|
|
270
269
|
label: [
|
|
271
270
|
"rename space label",
|
|
@@ -306,21 +305,19 @@ var createStaticSchemaNode = ({ schema, space }) => {
|
|
|
306
305
|
}
|
|
307
306
|
};
|
|
308
307
|
};
|
|
309
|
-
var createStaticSchemaActions = ({ schema, space,
|
|
308
|
+
var createStaticSchemaActions = ({ schema, space, deletable }) => {
|
|
310
309
|
const getId = (id) => `${space.id}/${Type.getTypename(schema)}/${id}`;
|
|
311
310
|
const actions = [
|
|
312
311
|
{
|
|
313
|
-
id: getId(
|
|
314
|
-
type:
|
|
315
|
-
data:
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}));
|
|
323
|
-
},
|
|
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
|
+
}),
|
|
324
321
|
properties: {
|
|
325
322
|
label: [
|
|
326
323
|
"add view to schema label",
|
|
@@ -334,11 +331,9 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
334
331
|
}
|
|
335
332
|
},
|
|
336
333
|
{
|
|
337
|
-
id: getId(
|
|
338
|
-
type:
|
|
339
|
-
data:
|
|
340
|
-
throw new Error("Not implemented");
|
|
341
|
-
},
|
|
334
|
+
id: getId(SpaceOperation.RenameObject.meta.key),
|
|
335
|
+
type: Node.ActionType,
|
|
336
|
+
data: () => Effect.fail(new Error("Not implemented")),
|
|
342
337
|
properties: {
|
|
343
338
|
label: [
|
|
344
339
|
"rename object label",
|
|
@@ -353,14 +348,16 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
353
348
|
}
|
|
354
349
|
},
|
|
355
350
|
{
|
|
356
|
-
id: getId(
|
|
357
|
-
type:
|
|
358
|
-
data:
|
|
351
|
+
id: getId(SpaceOperation.RemoveObjects.meta.key),
|
|
352
|
+
type: Node.ActionType,
|
|
353
|
+
data: () => Effect.sync(() => {
|
|
359
354
|
const index = space.properties.staticRecords.findIndex((typename) => typename === Type.getTypename(schema));
|
|
360
355
|
if (index > -1) {
|
|
361
|
-
space.properties
|
|
356
|
+
Obj.change(space.properties, (p) => {
|
|
357
|
+
p.staticRecords.splice(index, 1);
|
|
358
|
+
});
|
|
362
359
|
}
|
|
363
|
-
},
|
|
360
|
+
}),
|
|
364
361
|
properties: {
|
|
365
362
|
label: [
|
|
366
363
|
"delete object label",
|
|
@@ -375,21 +372,23 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
375
372
|
}
|
|
376
373
|
},
|
|
377
374
|
{
|
|
378
|
-
id: getId(
|
|
379
|
-
type:
|
|
380
|
-
data:
|
|
381
|
-
const result =
|
|
382
|
-
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,
|
|
383
380
|
query: Query.select(Filter.type(schema)).ast
|
|
384
|
-
})
|
|
385
|
-
if (result.
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
381
|
+
});
|
|
382
|
+
if (result.snapshot) {
|
|
383
|
+
yield* Effect.tryPromise(() => downloadBlob(result.snapshot, createFilename({
|
|
384
|
+
parts: [
|
|
385
|
+
space.id,
|
|
386
|
+
Type.getTypename(schema)
|
|
387
|
+
],
|
|
388
|
+
ext: "json"
|
|
389
|
+
})));
|
|
391
390
|
}
|
|
392
|
-
},
|
|
391
|
+
}),
|
|
393
392
|
properties: {
|
|
394
393
|
label: [
|
|
395
394
|
"snapshot by schema label",
|
|
@@ -404,7 +403,7 @@ var createStaticSchemaActions = ({ schema, space, dispatch, deletable }) => {
|
|
|
404
403
|
];
|
|
405
404
|
return actions;
|
|
406
405
|
};
|
|
407
|
-
var createObjectNode = ({
|
|
406
|
+
var createObjectNode = ({ db, object, disposition, droppable = true, navigable = false, managedCollectionChild = false, resolve, parentCollection }) => {
|
|
408
407
|
const type = Obj.getTypename(object);
|
|
409
408
|
if (!type) {
|
|
410
409
|
return null;
|
|
@@ -412,11 +411,11 @@ var createObjectNode = ({ space, object, disposition, droppable = true, navigabl
|
|
|
412
411
|
const metadata = resolve(type);
|
|
413
412
|
const partials = Obj.instanceOf(Collection.Collection, object) ? getCollectionGraphNodePartials({
|
|
414
413
|
collection: object,
|
|
415
|
-
|
|
414
|
+
db,
|
|
416
415
|
resolve
|
|
417
416
|
}) : Obj.instanceOf(Collection.Managed, object) ? getSystemCollectionNodePartials({
|
|
418
417
|
collection: object,
|
|
419
|
-
|
|
418
|
+
db,
|
|
420
419
|
resolve
|
|
421
420
|
}) : Obj.instanceOf(Type.PersistentType, object) ? getSchemaGraphNodePartials() : metadata.graphProps;
|
|
422
421
|
const label = object.name || Obj.getLabel(object) || // TODO(wittjosiah): Remove metadata labels.
|
|
@@ -444,9 +443,14 @@ var createObjectNode = ({ space, object, disposition, droppable = true, navigabl
|
|
|
444
443
|
disposition,
|
|
445
444
|
testId: "spacePlugin.object",
|
|
446
445
|
persistenceClass: "echo",
|
|
447
|
-
persistenceKey:
|
|
446
|
+
persistenceKey: db.spaceId,
|
|
448
447
|
selectable,
|
|
449
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,
|
|
450
454
|
blockInstruction: (source, instruction) => {
|
|
451
455
|
if (source.item.properties.managedCollectionChild) {
|
|
452
456
|
return true;
|
|
@@ -457,27 +461,27 @@ var createObjectNode = ({ space, object, disposition, droppable = true, navigabl
|
|
|
457
461
|
return managedCollectionChild;
|
|
458
462
|
},
|
|
459
463
|
canDrop: (source) => {
|
|
460
|
-
return droppable && isGraphNode(source.item) && Obj.isObject(source.item.data);
|
|
464
|
+
return droppable && Node.isGraphNode(source.item) && Obj.isObject(source.item.data);
|
|
461
465
|
},
|
|
462
466
|
...partials
|
|
463
467
|
}
|
|
464
468
|
};
|
|
465
469
|
};
|
|
466
|
-
var constructObjectActions = ({ object, graph,
|
|
467
|
-
const
|
|
468
|
-
invariant(
|
|
470
|
+
var constructObjectActions = ({ object, graph, resolve, capabilities, deletable = true, navigable = false }) => {
|
|
471
|
+
const db = Obj.getDatabase(object);
|
|
472
|
+
invariant(db, "Database not found", {
|
|
469
473
|
F: __dxlog_file,
|
|
470
|
-
L:
|
|
474
|
+
L: 544,
|
|
471
475
|
S: void 0,
|
|
472
476
|
A: [
|
|
473
|
-
"
|
|
474
|
-
"'
|
|
477
|
+
"db",
|
|
478
|
+
"'Database not found'"
|
|
475
479
|
]
|
|
476
480
|
});
|
|
477
481
|
const typename = Obj.getTypename(object);
|
|
478
482
|
invariant(typename, "Object has no typename", {
|
|
479
483
|
F: __dxlog_file,
|
|
480
|
-
L:
|
|
484
|
+
L: 546,
|
|
481
485
|
S: void 0,
|
|
482
486
|
A: [
|
|
483
487
|
"typename",
|
|
@@ -487,18 +491,16 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
487
491
|
const getId = (id) => `${id}/${Obj.getDXN(object).toString()}`;
|
|
488
492
|
const managedCollection = Obj.instanceOf(Collection.Managed, object) ? object : void 0;
|
|
489
493
|
const metadata = managedCollection ? resolve(managedCollection.key) : {};
|
|
490
|
-
const
|
|
494
|
+
const createObject = metadata.createObject;
|
|
491
495
|
const inputSchema = metadata.inputSchema;
|
|
492
496
|
const actions = [
|
|
493
497
|
...Obj.instanceOf(Collection.Collection, object) ? [
|
|
494
498
|
{
|
|
495
|
-
id: getId(
|
|
496
|
-
type:
|
|
497
|
-
data:
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}));
|
|
501
|
-
},
|
|
499
|
+
id: getId(SpaceOperation.OpenCreateObject.meta.key),
|
|
500
|
+
type: Node.ActionType,
|
|
501
|
+
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
502
|
+
target: object
|
|
503
|
+
}),
|
|
502
504
|
properties: {
|
|
503
505
|
label: [
|
|
504
506
|
"create object in collection label",
|
|
@@ -514,17 +516,15 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
514
516
|
] : [],
|
|
515
517
|
...Obj.instanceOf(Type.PersistentType, object) ? [
|
|
516
518
|
{
|
|
517
|
-
id: getId(
|
|
518
|
-
type:
|
|
519
|
-
data:
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}));
|
|
527
|
-
},
|
|
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
|
+
}),
|
|
528
528
|
properties: {
|
|
529
529
|
label: [
|
|
530
530
|
"add view to schema label",
|
|
@@ -538,21 +538,23 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
538
538
|
}
|
|
539
539
|
},
|
|
540
540
|
{
|
|
541
|
-
id: getId(
|
|
542
|
-
type:
|
|
543
|
-
data:
|
|
544
|
-
const result =
|
|
545
|
-
|
|
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,
|
|
546
546
|
query: Query.select(Filter.type(Type.toEffectSchema(object.jsonSchema))).ast
|
|
547
|
-
})
|
|
548
|
-
if (result.
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
547
|
+
});
|
|
548
|
+
if (result.snapshot) {
|
|
549
|
+
yield* Effect.promise(() => downloadBlob(result.snapshot, createFilename({
|
|
550
|
+
parts: [
|
|
551
|
+
db.spaceId,
|
|
552
|
+
object.typename
|
|
553
|
+
],
|
|
554
|
+
ext: "json"
|
|
555
|
+
})));
|
|
554
556
|
}
|
|
555
|
-
},
|
|
557
|
+
}),
|
|
556
558
|
properties: {
|
|
557
559
|
label: [
|
|
558
560
|
"snapshot by schema label",
|
|
@@ -565,27 +567,35 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
565
567
|
}
|
|
566
568
|
}
|
|
567
569
|
] : [],
|
|
568
|
-
...
|
|
570
|
+
...createObject ? [
|
|
569
571
|
{
|
|
570
|
-
id: getId(
|
|
571
|
-
type:
|
|
572
|
-
data:
|
|
572
|
+
id: getId(SpaceOperation.OpenCreateObject.meta.key),
|
|
573
|
+
type: Node.ActionType,
|
|
574
|
+
data: Effect.fnUntraced(function* () {
|
|
573
575
|
if (inputSchema) {
|
|
574
|
-
|
|
575
|
-
target:
|
|
576
|
+
yield* Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
577
|
+
target: db,
|
|
576
578
|
typename: managedCollection ? managedCollection.key : void 0
|
|
577
|
-
})
|
|
579
|
+
});
|
|
578
580
|
} else {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
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(Common.LayoutOperation.Open, {
|
|
592
|
+
subject: [
|
|
593
|
+
addResult.id
|
|
594
|
+
]
|
|
595
|
+
});
|
|
596
|
+
}
|
|
587
597
|
}
|
|
588
|
-
},
|
|
598
|
+
}),
|
|
589
599
|
properties: {
|
|
590
600
|
label: [
|
|
591
601
|
"create object in system collection label",
|
|
@@ -601,14 +611,12 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
601
611
|
] : [],
|
|
602
612
|
...managedCollection ? [] : [
|
|
603
613
|
{
|
|
604
|
-
id: getId(
|
|
605
|
-
type:
|
|
606
|
-
data:
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
}));
|
|
611
|
-
},
|
|
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
|
+
}),
|
|
612
620
|
properties: {
|
|
613
621
|
label: [
|
|
614
622
|
"rename object label",
|
|
@@ -626,17 +634,17 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
626
634
|
}
|
|
627
635
|
},
|
|
628
636
|
{
|
|
629
|
-
id: getId(
|
|
630
|
-
type:
|
|
631
|
-
data:
|
|
632
|
-
const collection =
|
|
633
|
-
|
|
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, {
|
|
634
642
|
objects: [
|
|
635
643
|
object
|
|
636
644
|
],
|
|
637
645
|
target: collection
|
|
638
|
-
})
|
|
639
|
-
},
|
|
646
|
+
});
|
|
647
|
+
}),
|
|
640
648
|
properties: {
|
|
641
649
|
label: [
|
|
642
650
|
"delete object label",
|
|
@@ -656,11 +664,11 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
656
664
|
...navigable || !Obj.instanceOf(Collection.Collection, object) && !Obj.instanceOf(Collection.Managed, object) && !Obj.instanceOf(Type.PersistentType, object) ? [
|
|
657
665
|
{
|
|
658
666
|
id: getId("copy-link"),
|
|
659
|
-
type:
|
|
660
|
-
data: async () => {
|
|
661
|
-
const url = `${window.location.origin}/${
|
|
667
|
+
type: Node.ActionType,
|
|
668
|
+
data: () => Effect.promise(async () => {
|
|
669
|
+
const url = `${window.location.origin}/${db.spaceId}/${Obj.getDXN(object).toString()}`;
|
|
662
670
|
await navigator.clipboard.writeText(url);
|
|
663
|
-
},
|
|
671
|
+
}),
|
|
664
672
|
properties: {
|
|
665
673
|
label: [
|
|
666
674
|
"copy link label",
|
|
@@ -676,14 +684,11 @@ var constructObjectActions = ({ object, graph, dispatch, resolve, deletable = tr
|
|
|
676
684
|
] : [],
|
|
677
685
|
// TODO(wittjosiah): Factor out and apply to all nodes.
|
|
678
686
|
{
|
|
679
|
-
id: getId(
|
|
680
|
-
type:
|
|
681
|
-
data:
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
subject: Obj.getDXN(object).toString()
|
|
685
|
-
}));
|
|
686
|
-
},
|
|
687
|
+
id: getId(Common.LayoutOperation.Expose.meta.key),
|
|
688
|
+
type: Node.ActionType,
|
|
689
|
+
data: () => Operation.invoke(Common.LayoutOperation.Expose, {
|
|
690
|
+
subject: Obj.getDXN(object).toString()
|
|
691
|
+
}),
|
|
687
692
|
properties: {
|
|
688
693
|
label: [
|
|
689
694
|
"expose object label",
|
|
@@ -726,14 +731,14 @@ var getNestedObjects = async (object, resolve) => {
|
|
|
726
731
|
...nested.flat()
|
|
727
732
|
];
|
|
728
733
|
};
|
|
729
|
-
var cloneObject = async (object, resolve,
|
|
734
|
+
var cloneObject = async (object, resolve, newDb) => {
|
|
730
735
|
const schema = Obj.getSchema(object);
|
|
731
|
-
const typename = schema ? Type.getTypename(schema) ??
|
|
736
|
+
const typename = schema ? Type.getTypename(schema) ?? Expando.Expando.typename : Expando.Expando.typename;
|
|
732
737
|
const metadata = resolve(typename);
|
|
733
738
|
const serializer = metadata.serializer;
|
|
734
739
|
invariant(serializer, `No serializer for type: ${typename}`, {
|
|
735
740
|
F: __dxlog_file,
|
|
736
|
-
L:
|
|
741
|
+
L: 776,
|
|
737
742
|
S: void 0,
|
|
738
743
|
A: [
|
|
739
744
|
"serializer",
|
|
@@ -745,7 +750,7 @@ var cloneObject = async (object, resolve, newSpace) => {
|
|
|
745
750
|
});
|
|
746
751
|
return serializer.deserialize({
|
|
747
752
|
content,
|
|
748
|
-
|
|
753
|
+
db: newDb,
|
|
749
754
|
newId: true
|
|
750
755
|
});
|
|
751
756
|
};
|
|
@@ -754,7 +759,6 @@ export {
|
|
|
754
759
|
SPACES,
|
|
755
760
|
COMPOSER_SPACE_LOCK,
|
|
756
761
|
SHARED,
|
|
757
|
-
atomFromQuery,
|
|
758
762
|
getSpaceDisplayName,
|
|
759
763
|
constructSpaceNode,
|
|
760
764
|
constructSpaceActions,
|
|
@@ -765,4 +769,4 @@ export {
|
|
|
765
769
|
getNestedObjects,
|
|
766
770
|
cloneObject
|
|
767
771
|
};
|
|
768
|
-
//# sourceMappingURL=chunk-
|
|
772
|
+
//# sourceMappingURL=chunk-SUI34XSA.mjs.map
|