@dxos/plugin-space 0.8.3 → 0.8.4-main.1068cf700f
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-4ZKSFDXM.mjs → chunk-7D63MVRS.mjs} +110 -41
- package/dist/lib/browser/chunk-7D63MVRS.mjs.map +7 -0
- package/dist/lib/browser/chunk-A7ZCVQGZ.mjs +118 -0
- 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-HSMQFM57.mjs +16 -0
- 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-WAOJLA2S.mjs +772 -0
- 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 +251 -183
- 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-DKU4TUD2.mjs +50 -0
- 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 +18 -10
- 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-JBQKU4K5.mjs → chunk-5N3YIAXD.mjs} +110 -41
- package/dist/lib/node-esm/chunk-5N3YIAXD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-A5A7M37T.mjs +119 -0
- 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-FB5YNROS.mjs +773 -0
- 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-SL4BJSUG.mjs +18 -0
- 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 +251 -183
- 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-C2H6JQCL.mjs +51 -0
- 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 +18 -10
- 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 -21
- 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 +9 -0
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -0
- package/dist/types/src/components/CollectionSection.d.ts +3 -4
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +6 -5
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1602 -8
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +23 -10
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/{JoinDialog.d.ts → JoinDialog/JoinDialog.d.ts} +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/components/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/components/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +3 -2
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +1600 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/index.d.ts +2 -0
- package/dist/types/src/components/MembersContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/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/ObjectCardStack/ObjectForm.d.ts +9 -0
- 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 +3 -3
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts +1433 -0
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts +8 -0
- 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 +7 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/components/RecordArticle.d.ts +5 -0
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -0
- package/dist/types/src/components/RecordArticle.stories.d.ts +1600 -0
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -0
- package/dist/types/src/components/SchemaContainer.d.ts +2 -2
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/{SpacePresence.d.ts → SpacePresence/SpacePresence.d.ts} +7 -6
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +1430 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpacePresence/index.d.ts +2 -0
- package/dist/types/src/components/SpacePresence/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts +7 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +4 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1433 -4
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +1431 -5
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts +5 -5
- package/dist/types/src/components/ViewEditor.d.ts +7 -0
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +16 -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/index.d.ts +2 -0
- package/dist/types/src/helpers/index.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +7 -0
- package/dist/types/src/helpers/query.d.ts.map +1 -0
- package/dist/types/src/helpers/query.test.d.ts +2 -0
- package/dist/types/src/helpers/query.test.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +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 +3 -3
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/hooks/useTypeOptions.d.ts +10 -0
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1415 -410
- 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 +22 -0
- package/dist/types/src/types/form.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +646 -338
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +50 -31
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +87 -64
- package/src/SpacePlugin.ts +197 -174
- 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 -15
- 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/repair.ts +67 -0
- 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 +27 -27
- package/src/components/CollectionArticle.tsx +156 -0
- package/src/components/CollectionSection.tsx +8 -6
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +40 -33
- package/src/components/CreateDialog/CreateObjectDialog.tsx +108 -81
- package/src/components/CreateDialog/CreateObjectPanel.tsx +163 -91
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +35 -29
- package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +29 -39
- package/src/components/JoinDialog/index.ts +5 -0
- package/src/components/MembersContainer/MembersContainer.stories.tsx +56 -0
- package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +95 -98
- package/src/components/MembersContainer/index.ts +5 -0
- package/src/components/MenuFooter.tsx +5 -6
- 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/ObjectDetails/BaseObjectSettings.stories.tsx +63 -0
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
- package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +8 -8
- package/src/components/ObjectDetails/ObjectDetails.tsx +33 -0
- package/src/components/ObjectDetails/index.ts +7 -0
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +52 -0
- package/src/components/ObjectRenamePopover/index.ts +5 -0
- package/src/components/RecordArticle.stories.tsx +116 -0
- package/src/components/RecordArticle.tsx +124 -0
- package/src/components/SchemaContainer.tsx +31 -31
- package/src/components/SpacePluginSettings.tsx +45 -33
- package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +25 -24
- package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +28 -24
- package/src/components/SpacePresence/index.ts +5 -0
- package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +16 -16
- package/src/components/SpaceRenamePopover/index.ts +5 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +20 -12
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +99 -81
- package/src/components/SyncStatus/InlineSyncStatus.tsx +8 -8
- package/src/components/SyncStatus/SyncStatus.stories.tsx +12 -19
- package/src/components/SyncStatus/SyncStatus.tsx +110 -13
- package/src/components/SyncStatus/save-tracker.ts +3 -3
- package/src/components/SyncStatus/status.ts +4 -4
- package/src/components/ViewEditor.tsx +101 -0
- package/src/components/index.ts +11 -6
- package/src/constants.ts +11 -0
- package/src/helpers/index.ts +5 -0
- package/src/helpers/query.test.ts +24 -0
- package/src/helpers/query.ts +153 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveSpace.ts +8 -4
- package/src/hooks/useInputSurfaceLookup.tsx +9 -13
- package/src/hooks/usePath.ts +5 -5
- package/src/hooks/useTypeOptions.ts +25 -0
- package/src/index.ts +2 -2
- package/src/meta.ts +8 -5
- package/src/translations.ts +112 -36
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +16 -0
- package/src/types/form.ts +69 -0
- package/src/types/index.ts +3 -0
- package/src/types/types.ts +546 -206
- package/src/util.tsx +451 -242
- package/dist/lib/browser/app-graph-builder-M2RH72VL.mjs +0 -363
- package/dist/lib/browser/app-graph-builder-M2RH72VL.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-F7ISRRBV.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-F7ISRRBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-4ZKSFDXM.mjs.map +0 -7
- package/dist/lib/browser/chunk-7Y4M7GXO.mjs +0 -94
- package/dist/lib/browser/chunk-7Y4M7GXO.mjs.map +0 -7
- package/dist/lib/browser/chunk-BXNL6SDI.mjs +0 -19
- package/dist/lib/browser/chunk-BXNL6SDI.mjs.map +0 -7
- package/dist/lib/browser/chunk-NFUKCRGE.mjs +0 -1916
- package/dist/lib/browser/chunk-NFUKCRGE.mjs.map +0 -7
- package/dist/lib/browser/chunk-PTKYMZWO.mjs +0 -13
- package/dist/lib/browser/chunk-PTKYMZWO.mjs.map +0 -7
- package/dist/lib/browser/chunk-TW7O2EPP.mjs +0 -284
- package/dist/lib/browser/chunk-TW7O2EPP.mjs.map +0 -7
- package/dist/lib/browser/chunk-V24VASAJ.mjs +0 -546
- package/dist/lib/browser/chunk-V24VASAJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-YMCZR6EZ.mjs +0 -18
- package/dist/lib/browser/chunk-YMCZR6EZ.mjs.map +0 -7
- package/dist/lib/browser/identity-created-PI7TKANR.mjs +0 -23
- package/dist/lib/browser/identity-created-PI7TKANR.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RWU6ZE4H.mjs +0 -610
- package/dist/lib/browser/intent-resolver-RWU6ZE4H.mjs.map +0 -7
- package/dist/lib/browser/react-root-QIKHSNT2.mjs +0 -29
- package/dist/lib/browser/react-root-QIKHSNT2.mjs.map +0 -7
- package/dist/lib/browser/react-surface-W56UD53I.mjs +0 -353
- package/dist/lib/browser/react-surface-W56UD53I.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-WREJNMIC.mjs +0 -26
- package/dist/lib/browser/schema-defs-WREJNMIC.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-ILTVSSS3.mjs +0 -124
- package/dist/lib/browser/schema-tools-ILTVSSS3.mjs.map +0 -7
- package/dist/lib/browser/settings-K54STC5A.mjs +0 -24
- package/dist/lib/browser/settings-K54STC5A.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-3PDRDHPC.mjs +0 -199
- package/dist/lib/browser/spaces-ready-3PDRDHPC.mjs.map +0 -7
- package/dist/lib/browser/state-HRZ4VRXU.mjs +0 -47
- package/dist/lib/browser/state-HRZ4VRXU.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-6LK5HLLE.cjs +0 -364
- package/dist/lib/node/app-graph-builder-6LK5HLLE.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-HKHBNHA3.cjs +0 -89
- package/dist/lib/node/app-graph-serializer-HKHBNHA3.cjs.map +0 -7
- package/dist/lib/node/chunk-3X4EA4XL.cjs +0 -37
- package/dist/lib/node/chunk-3X4EA4XL.cjs.map +0 -7
- package/dist/lib/node/chunk-5WLAXYE3.cjs +0 -125
- package/dist/lib/node/chunk-5WLAXYE3.cjs.map +0 -7
- package/dist/lib/node/chunk-6P2DB4QQ.cjs +0 -36
- package/dist/lib/node/chunk-6P2DB4QQ.cjs.map +0 -7
- package/dist/lib/node/chunk-DOC5XEZ4.cjs +0 -184
- package/dist/lib/node/chunk-DOC5XEZ4.cjs.map +0 -7
- package/dist/lib/node/chunk-NCHF433F.cjs +0 -1921
- package/dist/lib/node/chunk-NCHF433F.cjs.map +0 -7
- package/dist/lib/node/chunk-NL5Y4EDX.cjs +0 -38
- package/dist/lib/node/chunk-NL5Y4EDX.cjs.map +0 -7
- package/dist/lib/node/chunk-ULJZPATP.cjs +0 -312
- package/dist/lib/node/chunk-ULJZPATP.cjs.map +0 -7
- package/dist/lib/node/chunk-XHWVT7LW.cjs +0 -572
- package/dist/lib/node/chunk-XHWVT7LW.cjs.map +0 -7
- package/dist/lib/node/identity-created-FF4WZ2WY.cjs +0 -42
- package/dist/lib/node/identity-created-FF4WZ2WY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -278
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-AV4CMM3Z.cjs +0 -609
- package/dist/lib/node/intent-resolver-AV4CMM3Z.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-root-RQUU3A45.cjs +0 -51
- package/dist/lib/node/react-root-RQUU3A45.cjs.map +0 -7
- package/dist/lib/node/react-surface-AZFJLE72.cjs +0 -351
- package/dist/lib/node/react-surface-AZFJLE72.cjs.map +0 -7
- package/dist/lib/node/schema-defs-OB2X2HBH.cjs +0 -42
- package/dist/lib/node/schema-defs-OB2X2HBH.cjs.map +0 -7
- package/dist/lib/node/schema-tools-IYREN4IH.cjs +0 -147
- package/dist/lib/node/schema-tools-IYREN4IH.cjs.map +0 -7
- package/dist/lib/node/settings-P2EQ7VKQ.cjs +0 -38
- package/dist/lib/node/settings-P2EQ7VKQ.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-DXPOHYV7.cjs +0 -210
- package/dist/lib/node/spaces-ready-DXPOHYV7.cjs.map +0 -7
- package/dist/lib/node/state-M35DK75Z.cjs +0 -61
- package/dist/lib/node/state-M35DK75Z.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -48
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-BCHVZ4OM.mjs +0 -364
- package/dist/lib/node-esm/app-graph-builder-BCHVZ4OM.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-TXRGGNP2.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-TXRGGNP2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3CP67AYY.mjs +0 -19
- package/dist/lib/node-esm/chunk-3CP67AYY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BSLREHIX.mjs +0 -20
- package/dist/lib/node-esm/chunk-BSLREHIX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D4QMPPS7.mjs +0 -285
- package/dist/lib/node-esm/chunk-D4QMPPS7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GH2FGJXH.mjs +0 -96
- package/dist/lib/node-esm/chunk-GH2FGJXH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HO7AIKQS.mjs +0 -547
- package/dist/lib/node-esm/chunk-HO7AIKQS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JBQKU4K5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LA6AVVH6.mjs +0 -1917
- package/dist/lib/node-esm/chunk-LA6AVVH6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MSWEFAPD.mjs +0 -15
- package/dist/lib/node-esm/chunk-MSWEFAPD.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-35CTAQWI.mjs +0 -25
- package/dist/lib/node-esm/identity-created-35CTAQWI.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-JO6L2VXC.mjs +0 -611
- package/dist/lib/node-esm/intent-resolver-JO6L2VXC.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-YFGL3B4J.mjs +0 -30
- package/dist/lib/node-esm/react-root-YFGL3B4J.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-CVAPDLEZ.mjs +0 -354
- package/dist/lib/node-esm/react-surface-CVAPDLEZ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-4MEJETVX.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-4MEJETVX.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-SRLCRZ3B.mjs +0 -126
- package/dist/lib/node-esm/schema-tools-SRLCRZ3B.mjs.map +0 -7
- package/dist/lib/node-esm/settings-TD76LTQS.mjs +0 -25
- package/dist/lib/node-esm/settings-TD76LTQS.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-FJMGPAVV.mjs +0 -200
- package/dist/lib/node-esm/spaces-ready-FJMGPAVV.mjs.map +0 -7
- package/dist/lib/node-esm/state-XQNDCN37.mjs +0 -48
- package/dist/lib/node-esm/state-XQNDCN37.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 -22
- 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/schema-defs.d.ts +0 -4
- package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-tool.test.d.ts +0 -2
- package/dist/types/src/capabilities/schema-tool.test.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-tools.d.ts +0 -13
- package/dist/types/src/capabilities/schema-tools.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/CollectionMain.d.ts +0 -6
- package/dist/types/src/components/CollectionMain.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts +0 -8
- package/dist/types/src/components/MembersContainer.stories.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 +0 -8
- 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 -2
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/PersistenceStatus.d.ts +0 -6
- package/dist/types/src/components/PersistenceStatus.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +0 -9
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -7
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -540
- package/src/capabilities/app-graph-serializer.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -24
- package/src/capabilities/identity-created.ts +0 -27
- package/src/capabilities/intent-resolver.ts +0 -585
- package/src/capabilities/react-root.tsx +0 -20
- package/src/capabilities/react-surface.tsx +0 -349
- package/src/capabilities/schema-defs.ts +0 -30
- package/src/capabilities/schema-tool.test.ts +0 -44
- package/src/capabilities/schema-tools.ts +0 -125
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -231
- package/src/capabilities/state.ts +0 -45
- package/src/components/CollectionMain.tsx +0 -30
- package/src/components/MembersContainer.stories.tsx +0 -30
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -80
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -47
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -36
- package/src/components/ObjectSettings/index.ts +0 -5
- package/src/components/PersistenceStatus.tsx +0 -84
- package/src/components/PopoverRenameObject.tsx +0 -62
- package/src/events.ts +0 -14
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
import React, { useCallback, useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
import { DXN, Obj, type Ref, Tag, Type } from '@dxos/echo';
|
|
9
|
+
import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
|
|
10
|
+
import { invariant } from '@dxos/invariant';
|
|
11
|
+
import { Form, omitId } from '@dxos/react-ui-form';
|
|
12
|
+
import { isNonNullable } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
import { meta as pluginMeta } from '../../meta';
|
|
15
|
+
|
|
16
|
+
export type ObjectFormProps = {
|
|
17
|
+
schema: Schema.Schema.AnyNoContext;
|
|
18
|
+
object: Obj.Unknown;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const ObjectForm = ({ object, schema }: ObjectFormProps) => {
|
|
22
|
+
const db = Obj.getDatabase(object);
|
|
23
|
+
|
|
24
|
+
const formSchema = useMemo(
|
|
25
|
+
() =>
|
|
26
|
+
Schema.Struct({
|
|
27
|
+
tags: Schema.Array(Type.Ref(Tag.Tag)).pipe(Schema.optional),
|
|
28
|
+
}).pipe(Schema.extend(omitId(schema))),
|
|
29
|
+
[schema],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const meta = Obj.getMeta(object);
|
|
33
|
+
const tags = (meta.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
34
|
+
const values = useMemo(() => ({ tags, ...object }), [object, tags]);
|
|
35
|
+
|
|
36
|
+
const handleCreate = useCallback((schema: Type.Entity.Any, values: any) => {
|
|
37
|
+
invariant(db);
|
|
38
|
+
invariant(Type.isObjectSchema(schema));
|
|
39
|
+
const newObject = db.add(Obj.make(schema, values));
|
|
40
|
+
if (Obj.instanceOf(Tag.Tag, newObject)) {
|
|
41
|
+
Obj.change(object, (obj) => {
|
|
42
|
+
Obj.getMeta(obj).tags = [...(Obj.getMeta(obj).tags ?? []), Obj.getDXN(newObject).toString()];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
47
|
+
// TODO(wittjosiah): Use FormRootProps type.
|
|
48
|
+
const handleChange = useCallback(
|
|
49
|
+
({ tags, ...values }: any, { isValid, changed }: { isValid: boolean; changed: Record<JsonPath, boolean> }) => {
|
|
50
|
+
if (!isValid) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
55
|
+
|
|
56
|
+
// Handle tags separately using Obj.change.
|
|
57
|
+
const hasTagsChange = changedPaths.some((path) => splitJsonPath(path)[0] === 'tags');
|
|
58
|
+
if (hasTagsChange) {
|
|
59
|
+
Obj.change(object, (obj) => {
|
|
60
|
+
Obj.getMeta(obj).tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.dxn.toString()) ?? [];
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Handle other property changes.
|
|
65
|
+
const nonTagPaths = changedPaths.filter((path) => splitJsonPath(path)[0] !== 'tags');
|
|
66
|
+
if (nonTagPaths.length > 0) {
|
|
67
|
+
Obj.change(object, () => {
|
|
68
|
+
for (const path of nonTagPaths) {
|
|
69
|
+
const parts = splitJsonPath(path);
|
|
70
|
+
const value = Obj.getValue(values, parts);
|
|
71
|
+
Obj.setValue(object, parts, value);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
[object],
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<Form.Root
|
|
81
|
+
schema={omitId(formSchema)}
|
|
82
|
+
values={values}
|
|
83
|
+
createOptionIcon='ph--plus--regular'
|
|
84
|
+
createOptionLabel={['add tag label', { ns: pluginMeta.id }]}
|
|
85
|
+
createInitialValuePath='label'
|
|
86
|
+
db={db}
|
|
87
|
+
onValuesChanged={handleChange}
|
|
88
|
+
onCreate={handleCreate}
|
|
89
|
+
>
|
|
90
|
+
<Form.Viewport>
|
|
91
|
+
<Form.Content>
|
|
92
|
+
<Form.FieldSet />
|
|
93
|
+
</Form.Content>
|
|
94
|
+
</Form.Viewport>
|
|
95
|
+
</Form.Root>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useEffect, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { type Obj, Tag } from '@dxos/echo';
|
|
9
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
10
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
|
+
import { render } from '@dxos/storybook-utils';
|
|
12
|
+
import { Pipeline } from '@dxos/types';
|
|
13
|
+
|
|
14
|
+
import { translations } from '../../translations';
|
|
15
|
+
|
|
16
|
+
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
17
|
+
|
|
18
|
+
const DefaultStory = () => {
|
|
19
|
+
const { space } = useClientStory();
|
|
20
|
+
const [object, setObject] = useState<Obj.Unknown>();
|
|
21
|
+
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (space && !object) {
|
|
24
|
+
const object = space.db.add(Pipeline.make());
|
|
25
|
+
setObject(object);
|
|
26
|
+
}
|
|
27
|
+
}, [space, object]);
|
|
28
|
+
|
|
29
|
+
if (!object) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return <BaseObjectSettings object={object} classNames='is-[20rem]' />;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const meta = {
|
|
37
|
+
title: 'plugins/plugin-space/BaseObjectSettings',
|
|
38
|
+
component: BaseObjectSettings as any,
|
|
39
|
+
render: render(DefaultStory),
|
|
40
|
+
decorators: [
|
|
41
|
+
withTheme(),
|
|
42
|
+
withClientProvider({
|
|
43
|
+
createIdentity: true,
|
|
44
|
+
createSpace: true,
|
|
45
|
+
types: [Pipeline.Pipeline, Tag.Tag],
|
|
46
|
+
onCreateSpace: async ({ space }) => {
|
|
47
|
+
space.db.add(Tag.make({ label: 'Tag 1' }));
|
|
48
|
+
space.db.add(Tag.make({ label: 'Tag 2' }));
|
|
49
|
+
space.db.add(Tag.make({ label: 'Tag 3' }));
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
parameters: {
|
|
54
|
+
layout: 'centered',
|
|
55
|
+
translations,
|
|
56
|
+
},
|
|
57
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
58
|
+
|
|
59
|
+
export default meta;
|
|
60
|
+
|
|
61
|
+
type Story = StoryObj<typeof meta>;
|
|
62
|
+
|
|
63
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Function from 'effect/Function';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
import React, { type PropsWithChildren, useCallback, useMemo } from 'react';
|
|
9
|
+
|
|
10
|
+
import { DXN, Obj, type Ref, Tag, Type } from '@dxos/echo';
|
|
11
|
+
import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
|
|
12
|
+
import { invariant } from '@dxos/invariant';
|
|
13
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
14
|
+
import { Form, omitId } from '@dxos/react-ui-form';
|
|
15
|
+
import { isNonNullable } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { meta as pluginMeta } from '../../meta';
|
|
18
|
+
|
|
19
|
+
// TODO(wittjosiah): Would be nice to control order when extending so this isn't always first/last.
|
|
20
|
+
const BaseSchema = Schema.Struct({
|
|
21
|
+
tags: Schema.Array(Type.Ref(Tag.Tag)).pipe(Schema.optional),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type BaseObjectSettingsProps = ThemedClassName<
|
|
25
|
+
PropsWithChildren<{
|
|
26
|
+
object: Obj.Unknown;
|
|
27
|
+
}>
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
// TODO(wittjosiah): Reconcile w/ ObjectDetailsPanel.
|
|
31
|
+
export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectSettingsProps) => {
|
|
32
|
+
const db = Obj.getDatabase(object);
|
|
33
|
+
|
|
34
|
+
const formSchema = useMemo(() => {
|
|
35
|
+
return Function.pipe(
|
|
36
|
+
Obj.getSchema(object),
|
|
37
|
+
Option.fromNullable,
|
|
38
|
+
Option.map((schema) => BaseSchema.pipe(Schema.extend(schema))),
|
|
39
|
+
Option.getOrUndefined,
|
|
40
|
+
);
|
|
41
|
+
}, [object]);
|
|
42
|
+
|
|
43
|
+
const meta = Obj.getMeta(object);
|
|
44
|
+
const tags = (meta.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
45
|
+
const values = useMemo(
|
|
46
|
+
() => ({
|
|
47
|
+
tags,
|
|
48
|
+
...object,
|
|
49
|
+
}),
|
|
50
|
+
[object, tags],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const handleCreate = useCallback((schema: Type.Entity.Any, values: any) => {
|
|
54
|
+
invariant(db);
|
|
55
|
+
invariant(Type.isObjectSchema(schema));
|
|
56
|
+
const newObject = db.add(Obj.make(schema, values));
|
|
57
|
+
if (Obj.instanceOf(Tag.Tag, newObject)) {
|
|
58
|
+
Obj.change(object, (obj) => {
|
|
59
|
+
Obj.getMeta(obj).tags = [...(Obj.getMeta(obj).tags ?? []), Obj.getDXN(newObject).toString()];
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
// TODO(wittjosiah): Use FormRootProps type.
|
|
65
|
+
const handleChange = useCallback(
|
|
66
|
+
(
|
|
67
|
+
{ tags, ...values }: Schema.Schema.Type<typeof formSchema>,
|
|
68
|
+
{ isValid, changed }: { isValid: boolean; changed: Record<JsonPath, boolean> },
|
|
69
|
+
) => {
|
|
70
|
+
if (!isValid) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
75
|
+
|
|
76
|
+
// Handle tags separately using Obj.change.
|
|
77
|
+
const hasTagsChange = changedPaths.some((path) => splitJsonPath(path)[0] === 'tags');
|
|
78
|
+
if (hasTagsChange) {
|
|
79
|
+
Obj.change(object, (obj) => {
|
|
80
|
+
Obj.getMeta(obj).tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.dxn.toString()) ?? [];
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Handle other property changes.
|
|
85
|
+
const nonTagPaths = changedPaths.filter((path) => splitJsonPath(path)[0] !== 'tags');
|
|
86
|
+
if (nonTagPaths.length > 0) {
|
|
87
|
+
Obj.change(object, () => {
|
|
88
|
+
for (const path of nonTagPaths) {
|
|
89
|
+
const parts = splitJsonPath(path);
|
|
90
|
+
const value = Obj.getValue(values, parts);
|
|
91
|
+
Obj.setValue(object, parts, value);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
[object],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
if (!formSchema) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Form.Root
|
|
105
|
+
schema={omitId(formSchema)}
|
|
106
|
+
values={values}
|
|
107
|
+
createOptionIcon='ph--plus--regular'
|
|
108
|
+
createOptionLabel={['add tag label', { ns: pluginMeta.id }]}
|
|
109
|
+
createInitialValuePath='label'
|
|
110
|
+
db={db}
|
|
111
|
+
onValuesChanged={handleChange}
|
|
112
|
+
onCreate={handleCreate}
|
|
113
|
+
>
|
|
114
|
+
<Form.Viewport>
|
|
115
|
+
<Form.Content classNames={classNames}>
|
|
116
|
+
<Form.FieldSet />
|
|
117
|
+
{children}
|
|
118
|
+
</Form.Content>
|
|
119
|
+
</Form.Viewport>
|
|
120
|
+
</Form.Root>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Key } from '@dxos/echo';
|
|
8
8
|
import { IconButton, List, ListItem, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '../../meta';
|
|
11
11
|
|
|
12
12
|
export type ForeignKeysProps = {
|
|
13
|
-
keys: ForeignKey[];
|
|
14
|
-
onDelete?: (key: ForeignKey) => void;
|
|
13
|
+
keys: Key.ForeignKey[];
|
|
14
|
+
onDelete?: (key: Key.ForeignKey) => void;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// TODO(wittjosiah): This is a clone of `TokenManager`. Consider a form variant for arrays of read-only objects.
|
|
@@ -26,19 +26,19 @@ export const ForeignKeys = ({ keys, onDelete }: ForeignKeysProps) => {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
type KeyItemProps = {
|
|
29
|
-
forignKey: ForeignKey;
|
|
30
|
-
onDelete?: (key: ForeignKey) => void;
|
|
29
|
+
forignKey: Key.ForeignKey;
|
|
30
|
+
onDelete?: (key: Key.ForeignKey) => void;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const KeyItem = ({ forignKey, onDelete }: KeyItemProps) => {
|
|
34
|
-
const { t } = useTranslation(
|
|
34
|
+
const { t } = useTranslation(meta.id);
|
|
35
35
|
|
|
36
36
|
const handleDelete = useCallback(() => {
|
|
37
37
|
onDelete?.(forignKey);
|
|
38
38
|
}, [forignKey, onDelete]);
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
|
-
<ListItem.Root classNames='
|
|
41
|
+
<ListItem.Root classNames='pli-2'>
|
|
42
42
|
<ListItem.Heading classNames='flex flex-col grow truncate'>
|
|
43
43
|
<div>{forignKey.source}</div>
|
|
44
44
|
<div className='text-description text-sm truncate'>{forignKey.id}</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { type Obj } from '@dxos/echo';
|
|
10
|
+
import { Toolbar } from '@dxos/react-ui';
|
|
11
|
+
import { Layout } from '@dxos/react-ui';
|
|
12
|
+
|
|
13
|
+
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
14
|
+
|
|
15
|
+
export type ObjectDetailsProps = SurfaceComponentProps<Obj.Unknown>;
|
|
16
|
+
|
|
17
|
+
export const ObjectDetails = forwardRef<HTMLDivElement, ObjectDetailsProps>(
|
|
18
|
+
({ role, subject: object }, forwardedRef) => {
|
|
19
|
+
const data = useMemo(() => ({ subject: object }), [object]);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Layout.Main toolbar role={role} ref={forwardedRef}>
|
|
23
|
+
<Toolbar.Root />
|
|
24
|
+
<BaseObjectSettings object={object}>
|
|
25
|
+
<Surface.Surface role='base-object-settings' data={data} />
|
|
26
|
+
<Surface.Surface role='object-settings' data={data} />
|
|
27
|
+
{/* TODO(wittjosiah): Remove (or add as surface)? */}
|
|
28
|
+
{/* <AdvancedObjectSettings object={object} /> */}
|
|
29
|
+
</BaseObjectSettings>
|
|
30
|
+
</Layout.Main>
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
|
+
import { log } from '@dxos/log';
|
|
11
|
+
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
13
|
+
|
|
14
|
+
import { meta } from '../../meta';
|
|
15
|
+
|
|
16
|
+
export const OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
|
|
17
|
+
|
|
18
|
+
export const ObjectRenamePopover = ({ object }: { object: Obj.Unknown }) => {
|
|
19
|
+
const { t } = useTranslation(meta.id);
|
|
20
|
+
const doneButton = useRef<HTMLButtonElement>(null);
|
|
21
|
+
const [name, setName] = useState(Obj.getLabel(object));
|
|
22
|
+
const { invokePromise } = useOperationInvoker();
|
|
23
|
+
|
|
24
|
+
const handleDone = useCallback(() => {
|
|
25
|
+
try {
|
|
26
|
+
name && Obj.change(object, () => Obj.setLabel(object, name));
|
|
27
|
+
} catch (err) {
|
|
28
|
+
log.error('Failed to rename object', { err });
|
|
29
|
+
}
|
|
30
|
+
void invokePromise(LayoutOperation.UpdatePopover, { anchorId: '', state: false });
|
|
31
|
+
}, [object, name, invokePromise]);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div role='none' className='p-2 flex gap-2'>
|
|
35
|
+
<div role='none' className='flex-1'>
|
|
36
|
+
<Input.Root>
|
|
37
|
+
<Input.Label srOnly>{t('object name label')}</Input.Label>
|
|
38
|
+
<Input.TextInput
|
|
39
|
+
placeholder={t('object placeholder')}
|
|
40
|
+
value={name}
|
|
41
|
+
data-testid='spacePlugin.renameObject.input'
|
|
42
|
+
onChange={({ target: { value } }) => setName(value)}
|
|
43
|
+
onKeyDown={({ key }) => key === 'Enter' && doneButton.current?.click()}
|
|
44
|
+
/>
|
|
45
|
+
</Input.Root>
|
|
46
|
+
</div>
|
|
47
|
+
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
48
|
+
{t('done label', { ns: osTranslations })}
|
|
49
|
+
</Button>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
11
|
+
import { Filter, Obj, Ref, Relation, type Type } from '@dxos/echo';
|
|
12
|
+
import { faker } from '@dxos/random';
|
|
13
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
14
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
16
|
+
import { Card } from '@dxos/react-ui-mosaic';
|
|
17
|
+
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
18
|
+
import { type ValueGenerator, createAsyncGenerator } from '@dxos/schema/testing';
|
|
19
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
20
|
+
import { render } from '@dxos/storybook-utils';
|
|
21
|
+
import { HasSubject, Organization, Person, Task } from '@dxos/types';
|
|
22
|
+
|
|
23
|
+
import { translations } from '../translations';
|
|
24
|
+
|
|
25
|
+
import { RecordArticle } from './RecordArticle';
|
|
26
|
+
|
|
27
|
+
faker.seed(1);
|
|
28
|
+
const generator: ValueGenerator = faker as any;
|
|
29
|
+
|
|
30
|
+
const DefaultStory = () => {
|
|
31
|
+
const { space } = useClientStory();
|
|
32
|
+
const [object] = useQuery(space?.db, Filter.type(Organization.Organization));
|
|
33
|
+
if (!object) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return <RecordArticle subject={object} />;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const meta = {
|
|
41
|
+
title: 'plugins/plugin-space/RecordArticle',
|
|
42
|
+
component: RecordArticle as any,
|
|
43
|
+
render: render(DefaultStory),
|
|
44
|
+
decorators: [
|
|
45
|
+
withTheme(),
|
|
46
|
+
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
47
|
+
withPluginManager({
|
|
48
|
+
capabilities: [
|
|
49
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
50
|
+
Surface.create({
|
|
51
|
+
id: 'section',
|
|
52
|
+
role: 'section',
|
|
53
|
+
component: ({ data }) => (
|
|
54
|
+
<Card.Root>
|
|
55
|
+
<Json classNames='text-sm' data={data} />
|
|
56
|
+
</Card.Root>
|
|
57
|
+
),
|
|
58
|
+
}),
|
|
59
|
+
Surface.create({
|
|
60
|
+
id: 'card',
|
|
61
|
+
role: 'card',
|
|
62
|
+
component: ({ data }) => (
|
|
63
|
+
<Card.Root>
|
|
64
|
+
<Json classNames='text-sm' data={data} />
|
|
65
|
+
</Card.Root>
|
|
66
|
+
),
|
|
67
|
+
}),
|
|
68
|
+
]),
|
|
69
|
+
],
|
|
70
|
+
}),
|
|
71
|
+
// TODO(burdon): Use plugin.
|
|
72
|
+
withClientProvider({
|
|
73
|
+
createIdentity: true,
|
|
74
|
+
createSpace: true,
|
|
75
|
+
types: [Organization.Organization, Person.Person, Task.Task, HasSubject.HasSubject],
|
|
76
|
+
onCreateSpace: async ({ space }) => {
|
|
77
|
+
const org = space.db.add(
|
|
78
|
+
Obj.make(Organization.Organization, {
|
|
79
|
+
name: 'DXOS',
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
const task = space.db.add(
|
|
83
|
+
Obj.make(Task.Task, {
|
|
84
|
+
title: 'Task',
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
space.db.add(
|
|
88
|
+
Relation.make(HasSubject.HasSubject, {
|
|
89
|
+
[Relation.Source]: task,
|
|
90
|
+
[Relation.Target]: org,
|
|
91
|
+
completedAt: new Date().toISOString(),
|
|
92
|
+
}),
|
|
93
|
+
);
|
|
94
|
+
const objectGenerator = createAsyncGenerator(generator, Person.Person as Type.Obj.Any, {
|
|
95
|
+
db: space?.db,
|
|
96
|
+
force: true,
|
|
97
|
+
});
|
|
98
|
+
await objectGenerator.createObjects(3).then((objects) => {
|
|
99
|
+
objects.forEach((object) => {
|
|
100
|
+
object.organization = Ref.make(org);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
],
|
|
106
|
+
parameters: {
|
|
107
|
+
layout: 'fullscreen',
|
|
108
|
+
translations: [...translations, ...shellTranslations],
|
|
109
|
+
},
|
|
110
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
111
|
+
|
|
112
|
+
export default meta;
|
|
113
|
+
|
|
114
|
+
type Story = StoryObj<typeof meta>;
|
|
115
|
+
|
|
116
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { type Database, Entity, Filter, Obj, Ref, Relation } from '@dxos/echo';
|
|
10
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { Layout, ScrollArea, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { Masonry } from '@dxos/react-ui-masonry';
|
|
13
|
+
import { Card as MosaicCard } from '@dxos/react-ui-mosaic';
|
|
14
|
+
import { mx } from '@dxos/ui-theme';
|
|
15
|
+
import { isNonNullable } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { meta } from '../meta';
|
|
18
|
+
|
|
19
|
+
export const RecordArticle = ({ role, subject }: SurfaceComponentProps) => {
|
|
20
|
+
const { t } = useTranslation(meta.id);
|
|
21
|
+
const db = Obj.getDatabase(subject);
|
|
22
|
+
const data = useMemo(() => ({ subject }), [subject]);
|
|
23
|
+
const related = useRelatedObjects(db, subject, {
|
|
24
|
+
references: true,
|
|
25
|
+
relations: true,
|
|
26
|
+
});
|
|
27
|
+
const singleColumn = related.length === 1;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Layout.Main role={role}>
|
|
31
|
+
<ScrollArea.Root orientation='vertical'>
|
|
32
|
+
<ScrollArea.Viewport classNames={mx('p-4 gap-4')}>
|
|
33
|
+
<div role='none' className={mx('flex is-full card-max-width')}>
|
|
34
|
+
<Surface.Surface role='section' data={data} limit={1} />
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
{related.length > 0 && (
|
|
38
|
+
<div role='none' className={mx('flex flex-col gap-1', singleColumn ? 'card-max-width' : 'is-full')}>
|
|
39
|
+
<label className='mbs-2 text-sm text-description'>{t('related objects label')}</label>
|
|
40
|
+
<Masonry.Root<Entity.Unknown>
|
|
41
|
+
items={related}
|
|
42
|
+
render={Card}
|
|
43
|
+
columnCount={singleColumn ? 1 : undefined}
|
|
44
|
+
intrinsicHeight
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
</ScrollArea.Viewport>
|
|
49
|
+
</ScrollArea.Root>
|
|
50
|
+
</Layout.Main>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const Card = ({ data: subject }: { data: Entity.Unknown }) => {
|
|
55
|
+
const data = useMemo(() => ({ subject }), [subject]);
|
|
56
|
+
return (
|
|
57
|
+
<MosaicCard.Root>
|
|
58
|
+
<MosaicCard.Toolbar>
|
|
59
|
+
<span />
|
|
60
|
+
<MosaicCard.Title>{Entity.getLabel(subject)}</MosaicCard.Title>
|
|
61
|
+
</MosaicCard.Toolbar>
|
|
62
|
+
<Surface.Surface role='card--content' data={data} limit={1} />
|
|
63
|
+
</MosaicCard.Root>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// TODO(wittjosiah): This is a hack. ECHO needs to have a back reference index to easily query for related objects.
|
|
68
|
+
const useRelatedObjects = (
|
|
69
|
+
db?: Database.Database,
|
|
70
|
+
record?: Obj.Unknown,
|
|
71
|
+
options: { references?: boolean; relations?: boolean } = {},
|
|
72
|
+
) => {
|
|
73
|
+
const objects = useQuery(db, Filter.everything());
|
|
74
|
+
return useMemo(() => {
|
|
75
|
+
if (!record) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const related: Entity.Unknown[] = [];
|
|
80
|
+
|
|
81
|
+
// TODO(burdon): Change Person => Organization to relations.
|
|
82
|
+
if (options.references) {
|
|
83
|
+
const getReferences = (obj: Entity.Unknown): Ref.Unknown[] => {
|
|
84
|
+
return Object.getOwnPropertyNames(obj)
|
|
85
|
+
.map((name) => obj[name as keyof Obj.Unknown])
|
|
86
|
+
.filter((value) => Ref.isRef(value)) as Ref.Unknown[];
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const references = getReferences(record);
|
|
90
|
+
const referenceTargets = references.map((ref) => ref.target).filter(isNonNullable);
|
|
91
|
+
const referenceSources = objects.filter((obj) => {
|
|
92
|
+
const refs = getReferences(obj);
|
|
93
|
+
return refs.some((ref) => ref.target === record);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
related.push(...referenceTargets, ...referenceSources);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (options.relations) {
|
|
100
|
+
// TODO(dmaretskyi): Workaround until https://github.com/dxos/dxos/pull/10100 lands.
|
|
101
|
+
const isValidRelation = (obj: Relation.Unknown) => {
|
|
102
|
+
try {
|
|
103
|
+
return Relation.isRelation(obj) && Relation.getSource(obj) && Relation.getTarget(obj);
|
|
104
|
+
} catch {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const relations = objects.filter(Relation.isRelation).filter((obj) => isValidRelation(obj));
|
|
110
|
+
const targetObjects = relations
|
|
111
|
+
.filter((relation) => Relation.getTarget(relation) === record)
|
|
112
|
+
.map((relation) => Relation.getSource(relation));
|
|
113
|
+
const sourceObjects = relations
|
|
114
|
+
.filter((relation) => Relation.getSource(relation) === record)
|
|
115
|
+
.map((relation) => Relation.getTarget(relation));
|
|
116
|
+
|
|
117
|
+
related.push(...targetObjects, ...sourceObjects);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return related;
|
|
121
|
+
}, [record, objects]);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export default RecordArticle;
|