@dxos/plugin-space 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
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-OQMUVFVV.mjs +125 -0
- package/dist/lib/browser/CollectionArticle-OQMUVFVV.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-4WZUGLQQ.mjs +117 -0
- 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-OWNBEI5J.mjs → chunk-SUI34XSA.mjs} +318 -256
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
- package/dist/lib/browser/chunk-TWUMNPG4.mjs +1898 -0
- package/dist/lib/browser/chunk-TWUMNPG4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4V4JNJ33.mjs → chunk-ZT2VPYRM.mjs} +62 -63
- package/dist/lib/browser/chunk-ZT2VPYRM.mjs.map +7 -0
- 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 +230 -236
- 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-3SPMM45V.mjs +30 -0
- package/dist/lib/browser/react-root-3SPMM45V.mjs.map +7 -0
- package/dist/lib/browser/react-surface-UUS7NDHS.mjs +382 -0
- package/dist/lib/browser/react-surface-UUS7NDHS.mjs.map +7 -0
- package/dist/lib/browser/repair-CJG26D52.mjs +50 -0
- 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 +18 -10
- package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs +126 -0
- package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.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-G4PDWB7G.mjs → chunk-2SW6S2BB.mjs} +62 -63
- package/dist/lib/node-esm/chunk-2SW6S2BB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XEVIWD3O.mjs → chunk-7KMYUWSR.mjs} +318 -256
- 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-FYSBFBSD.mjs +1899 -0
- package/dist/lib/node-esm/chunk-FYSBFBSD.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-JOBIWCBC.mjs +118 -0
- 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 +230 -236
- 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-Y6JTGDTW.mjs +31 -0
- package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs +383 -0
- package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs.map +7 -0
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs +51 -0
- 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 +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 +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 +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 +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +163 -229
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +18 -10
- 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 -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/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/components/{RecordMain.stories.d.ts → MembersContainer/MembersContainer.stories.d.ts} +158 -225
- package/dist/types/src/components/{MembersContainer.stories.d.ts.map → MembersContainer/MembersContainer.stories.d.ts.map} +1 -1
- 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/{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 +156 -223
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
- 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/{MembersContainer.stories.d.ts → RecordArticle.stories.d.ts} +158 -225
- package/dist/types/src/components/{RecordMain.stories.d.ts.map → RecordArticle.stories.d.ts.map} +1 -1
- 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.stories.d.ts → SpacePresence/SpacePresence.stories.d.ts} +156 -223
- package/dist/types/src/components/{SpacePresence.stories.d.ts.map → SpacePresence/SpacePresence.stories.d.ts.map} +1 -1
- 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 +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +157 -224
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +156 -223
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts +3 -4
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +15 -16
- 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/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 +2 -2
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -1
- 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 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +156 -223
- 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 +637 -397
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +39 -51
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -63
- package/src/SpacePlugin.ts +169 -227
- 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/repair.ts +67 -0
- 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 +21 -20
- package/src/components/CollectionArticle.tsx +153 -0
- package/src/components/CollectionSection.tsx +6 -4
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +30 -24
- package/src/components/CreateDialog/CreateObjectDialog.tsx +66 -57
- package/src/components/CreateDialog/CreateObjectPanel.tsx +153 -91
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -29
- package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +26 -37
- package/src/components/JoinDialog/index.ts +5 -0
- package/src/components/{MembersContainer.stories.tsx → MembersContainer/MembersContainer.stories.tsx} +3 -3
- package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +41 -41
- package/src/components/MembersContainer/index.ts +5 -0
- 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 +7 -7
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
- package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +6 -6
- package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
- package/src/components/ObjectDetails/index.ts +7 -0
- package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx} +11 -15
- package/src/components/ObjectRenamePopover/index.ts +5 -0
- package/src/components/{RecordMain.stories.tsx → RecordArticle.stories.tsx} +30 -31
- package/src/components/RecordArticle.tsx +122 -0
- package/src/components/SchemaContainer.tsx +24 -27
- package/src/components/SpacePluginSettings.tsx +17 -7
- package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +1 -1
- package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +19 -16
- package/src/components/SpacePresence/index.ts +5 -0
- package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +15 -15
- package/src/components/SpaceRenamePopover/index.ts +5 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +188 -153
- package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.tsx +26 -20
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +64 -21
- package/src/components/index.ts +7 -8
- 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/useActiveSpace.ts +7 -4
- package/src/hooks/useInputSurfaceLookup.tsx +9 -13
- package/src/hooks/usePath.ts +4 -4
- package/src/hooks/useTypeOptions.ts +3 -37
- package/src/index.ts +2 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +61 -59
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +15 -0
- package/src/types/form.ts +69 -0
- package/src/types/index.ts +3 -0
- package/src/types/types.ts +532 -261
- package/src/util.tsx +330 -282
- package/dist/lib/browser/CollectionMain-HTKSZCRR.mjs +0 -31
- package/dist/lib/browser/CollectionMain-HTKSZCRR.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-5B45G744.mjs +0 -145
- package/dist/lib/browser/ObjectDetailsPanel-5B45G744.mjs.map +0 -7
- package/dist/lib/browser/ObjectSettings-UFTKBP7B.mjs +0 -146
- package/dist/lib/browser/ObjectSettings-UFTKBP7B.mjs.map +0 -7
- package/dist/lib/browser/RecordMain-BCSXTSEB.mjs +0 -99
- package/dist/lib/browser/RecordMain-BCSXTSEB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-QJFO4ANM.mjs +0 -520
- package/dist/lib/browser/app-graph-builder-QJFO4ANM.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-3R5NVV7U.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-3R5NVV7U.mjs.map +0 -7
- package/dist/lib/browser/chunk-2NS3VPSY.mjs +0 -20
- package/dist/lib/browser/chunk-2NS3VPSY.mjs.map +0 -7
- package/dist/lib/browser/chunk-4V4JNJ33.mjs.map +0 -7
- package/dist/lib/browser/chunk-ENBBJSNE.mjs +0 -1949
- package/dist/lib/browser/chunk-ENBBJSNE.mjs.map +0 -7
- package/dist/lib/browser/chunk-HS2VD6DN.mjs +0 -166
- package/dist/lib/browser/chunk-HS2VD6DN.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWNBEI5J.mjs.map +0 -7
- package/dist/lib/browser/chunk-SLDQWMQ2.mjs +0 -349
- package/dist/lib/browser/chunk-SLDQWMQ2.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-PW2BA46S.mjs +0 -23
- package/dist/lib/browser/identity-created-PW2BA46S.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MBVOLXFQ.mjs +0 -772
- package/dist/lib/browser/intent-resolver-MBVOLXFQ.mjs.map +0 -7
- package/dist/lib/browser/react-root-NKEKCEYM.mjs +0 -29
- package/dist/lib/browser/react-root-NKEKCEYM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PYSN2MBY.mjs +0 -354
- package/dist/lib/browser/react-surface-PYSN2MBY.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-DWYK7TYW.mjs +0 -26
- package/dist/lib/browser/schema-defs-DWYK7TYW.mjs.map +0 -7
- package/dist/lib/browser/settings-ZUCC3ZLB.mjs +0 -24
- package/dist/lib/browser/settings-ZUCC3ZLB.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-HTWWJHLR.mjs +0 -201
- package/dist/lib/browser/spaces-ready-HTWWJHLR.mjs.map +0 -7
- package/dist/lib/browser/state-ISVAKMO7.mjs +0 -47
- package/dist/lib/browser/state-ISVAKMO7.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionMain-OUHGG6OC.mjs +0 -32
- package/dist/lib/node-esm/CollectionMain-OUHGG6OC.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-4SDHQVQU.mjs +0 -146
- package/dist/lib/node-esm/ObjectDetailsPanel-4SDHQVQU.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectSettings-EU6F43RP.mjs +0 -147
- package/dist/lib/node-esm/ObjectSettings-EU6F43RP.mjs.map +0 -7
- package/dist/lib/node-esm/RecordMain-SD76DGOR.mjs +0 -100
- package/dist/lib/node-esm/RecordMain-SD76DGOR.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-B23W62HY.mjs +0 -521
- package/dist/lib/node-esm/app-graph-builder-B23W62HY.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-3Z3EXEEF.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-3Z3EXEEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-G4PDWB7G.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-KKPCCA5O.mjs +0 -1950
- package/dist/lib/node-esm/chunk-KKPCCA5O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PM4ZIGKC.mjs +0 -167
- package/dist/lib/node-esm/chunk-PM4ZIGKC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XEVIWD3O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YFQXFQGT.mjs +0 -350
- package/dist/lib/node-esm/chunk-YFQXFQGT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZLMFLI7G.mjs +0 -21
- package/dist/lib/node-esm/chunk-ZLMFLI7G.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs +0 -25
- package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-IWI47NTW.mjs +0 -773
- package/dist/lib/node-esm/intent-resolver-IWI47NTW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-LX7SIG6M.mjs +0 -30
- package/dist/lib/node-esm/react-root-LX7SIG6M.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6SVGOZNJ.mjs +0 -355
- package/dist/lib/node-esm/react-surface-6SVGOZNJ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-EOG2UPJU.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-EOG2UPJU.mjs.map +0 -7
- package/dist/lib/node-esm/settings-ZDJNLFGW.mjs +0 -25
- package/dist/lib/node-esm/settings-ZDJNLFGW.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-VUGYPF4L.mjs +0 -202
- package/dist/lib/node-esm/spaces-ready-VUGYPF4L.mjs.map +0 -7
- package/dist/lib/node-esm/state-QZ4Q6ZRL.mjs +0 -48
- package/dist/lib/node-esm/state-QZ4Q6ZRL.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 -29
- 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/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 -7
- 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/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 +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 -3
- 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/RecordMain.d.ts +0 -8
- package/dist/types/src/components/RecordMain.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.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 -757
- package/src/capabilities/app-graph-serializer.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -35
- package/src/capabilities/identity-created.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -711
- package/src/capabilities/react-root.tsx +0 -21
- package/src/capabilities/react-surface.tsx +0 -329
- package/src/capabilities/schema-defs.ts +0 -31
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -234
- package/src/capabilities/state.ts +0 -46
- package/src/components/CollectionMain.tsx +0 -32
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -52
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -75
- package/src/components/ObjectDetailsPanel/index.ts +0 -7
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -81
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -107
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
- package/src/components/ObjectSettings/index.ts +0 -7
- package/src/components/PersistenceStatus.tsx +0 -83
- package/src/components/RecordMain.tsx +0 -83
- package/src/events.ts +0 -15
- /package/dist/types/src/components/{JoinDialog.d.ts → JoinDialog/JoinDialog.d.ts} +0 -0
- /package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +0 -0
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import { QR } from 'react-qr-rounded';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/react';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
11
|
import { useConfig } from '@dxos/react-client';
|
|
11
|
-
import { type Space,
|
|
12
|
+
import { type Space, useSpaceInvitations } from '@dxos/react-client/echo';
|
|
12
13
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
13
14
|
import { Button, Clipboard, Icon, Input, useId, useTranslation } from '@dxos/react-ui';
|
|
14
15
|
import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
16
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
17
|
+
import { Collection } from '@dxos/schema';
|
|
17
18
|
import {
|
|
18
19
|
type ActionMenuItem,
|
|
19
20
|
AuthCode,
|
|
@@ -23,12 +24,13 @@ import {
|
|
|
23
24
|
InvitationList,
|
|
24
25
|
SpaceMemberList,
|
|
25
26
|
Viewport,
|
|
27
|
+
translationKey as shellTranslationKey,
|
|
26
28
|
} from '@dxos/shell/react';
|
|
27
29
|
import { hexToEmoji } from '@dxos/util';
|
|
28
30
|
|
|
29
|
-
import { meta } from '
|
|
30
|
-
import {
|
|
31
|
-
import { COMPOSER_SPACE_LOCK } from '
|
|
31
|
+
import { meta } from '../../meta';
|
|
32
|
+
import { SpaceOperation } from '../../types';
|
|
33
|
+
import { COMPOSER_SPACE_LOCK } from '../../util';
|
|
32
34
|
|
|
33
35
|
// TODO(wittjosiah): Copied from Shell.
|
|
34
36
|
const activeActionKey = 'dxos:react-shell/space-manager/active-action';
|
|
@@ -49,7 +51,7 @@ export type MembersContainerProps = {
|
|
|
49
51
|
export const MembersContainer = ({ space, createInvitationUrl }: MembersContainerProps) => {
|
|
50
52
|
const { t } = useTranslation(meta.id);
|
|
51
53
|
const config = useConfig();
|
|
52
|
-
const {
|
|
54
|
+
const { invokePromise } = useOperationInvoker();
|
|
53
55
|
const invitations = useSpaceInvitations(space.key);
|
|
54
56
|
const visibleInvitations = invitations?.filter(
|
|
55
57
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -63,61 +65,59 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
63
65
|
};
|
|
64
66
|
|
|
65
67
|
// TODO(wittjosiah): Track which was the most recently viewed object.
|
|
66
|
-
const target = space.properties[
|
|
68
|
+
const target = space.properties[Collection.Collection.typename]?.target?.objects[0]?.target;
|
|
67
69
|
|
|
68
70
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
69
71
|
const handleChangeLocked = useCallback(() => {
|
|
70
|
-
space.properties
|
|
72
|
+
Obj.change(space.properties, (p) => {
|
|
73
|
+
p[COMPOSER_SPACE_LOCK] = !locked;
|
|
74
|
+
});
|
|
71
75
|
}, [locked, space]);
|
|
72
76
|
|
|
73
77
|
const inviteActions = useMemo(
|
|
74
78
|
(): Record<string, ActionMenuItem> => ({
|
|
75
79
|
inviteOne: {
|
|
76
|
-
label: t('invite one label', { ns:
|
|
77
|
-
description: t('invite one description', { ns:
|
|
80
|
+
label: t('invite one label', { ns: shellTranslationKey }),
|
|
81
|
+
description: t('invite one description', { ns: shellTranslationKey }),
|
|
78
82
|
icon: 'ph--user-plus--regular',
|
|
79
83
|
testId: 'membersContainer.inviteOne',
|
|
80
84
|
onClick: async () => {
|
|
81
|
-
const { data: invitation } = await
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}),
|
|
89
|
-
);
|
|
85
|
+
const { data: invitation } = await invokePromise(SpaceOperation.Share, {
|
|
86
|
+
space,
|
|
87
|
+
type: Invitation.Type.INTERACTIVE,
|
|
88
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
89
|
+
multiUse: false,
|
|
90
|
+
target: target && Obj.getDXN(target).toString(),
|
|
91
|
+
});
|
|
90
92
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
91
|
-
const subscription: ZenObservable.Subscription = invitation.subscribe(
|
|
92
|
-
handleInvitationEvent(invitation, subscription),
|
|
93
|
+
const subscription: ZenObservable.Subscription = (invitation as CancellableInvitationObservable).subscribe(
|
|
94
|
+
(invitation: Invitation) => handleInvitationEvent(invitation, subscription),
|
|
93
95
|
);
|
|
94
96
|
}
|
|
95
97
|
},
|
|
96
98
|
},
|
|
97
99
|
inviteMany: {
|
|
98
|
-
label: t('invite many label', { ns:
|
|
99
|
-
description: t('invite many description', { ns:
|
|
100
|
+
label: t('invite many label', { ns: shellTranslationKey }),
|
|
101
|
+
description: t('invite many description', { ns: shellTranslationKey }),
|
|
100
102
|
icon: 'ph--users-three--regular',
|
|
101
103
|
testId: 'membersContainer.inviteMany',
|
|
102
104
|
onClick: async () => {
|
|
103
|
-
const { data: invitation } = await
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}),
|
|
111
|
-
);
|
|
105
|
+
const { data: invitation } = await invokePromise(SpaceOperation.Share, {
|
|
106
|
+
space,
|
|
107
|
+
type: Invitation.Type.DELEGATED,
|
|
108
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
109
|
+
multiUse: true,
|
|
110
|
+
target: target && Obj.getDXN(target).toString(),
|
|
111
|
+
});
|
|
112
112
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
113
|
-
const subscription: ZenObservable.Subscription = invitation.subscribe(
|
|
114
|
-
handleInvitationEvent(invitation, subscription),
|
|
113
|
+
const subscription: ZenObservable.Subscription = (invitation as CancellableInvitationObservable).subscribe(
|
|
114
|
+
(invitation: Invitation) => handleInvitationEvent(invitation, subscription),
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
}),
|
|
120
|
-
[t, space, target],
|
|
120
|
+
[t, space, target, invokePromise],
|
|
121
121
|
);
|
|
122
122
|
|
|
123
123
|
const [selectedInvitation, setSelectedInvitation] = useState<CancellableInvitationObservable | null>(null);
|
|
@@ -130,7 +130,7 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
130
130
|
|
|
131
131
|
return (
|
|
132
132
|
<Clipboard.Provider>
|
|
133
|
-
<
|
|
133
|
+
<Layout.Container scrollable>
|
|
134
134
|
<ControlPage>
|
|
135
135
|
<ControlSection title={t('members verbose label')} description={t('members description')}>
|
|
136
136
|
<ControlFrame>
|
|
@@ -174,7 +174,7 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
174
174
|
</div>
|
|
175
175
|
</ControlSection>
|
|
176
176
|
</ControlPage>
|
|
177
|
-
</
|
|
177
|
+
</Layout.Container>
|
|
178
178
|
</Clipboard.Provider>
|
|
179
179
|
);
|
|
180
180
|
};
|
|
@@ -225,7 +225,7 @@ const InvitationSection = ({
|
|
|
225
225
|
};
|
|
226
226
|
|
|
227
227
|
const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel?: () => void }) => {
|
|
228
|
-
const { t } = useTranslation(
|
|
228
|
+
const { t } = useTranslation(shellTranslationKey);
|
|
229
229
|
const qrLabel = useId('members-container__qr-code');
|
|
230
230
|
const emoji = hexToEmoji(id);
|
|
231
231
|
return (
|
|
@@ -260,7 +260,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string; onCancel?: () => void }) => {
|
|
263
|
-
const { t } = useTranslation(
|
|
263
|
+
const { t } = useTranslation(shellTranslationKey);
|
|
264
264
|
const emoji = hexToEmoji(id);
|
|
265
265
|
|
|
266
266
|
return (
|
|
@@ -12,7 +12,7 @@ import { DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/rea
|
|
|
12
12
|
import { meta } from '../meta';
|
|
13
13
|
import { getSpaceDisplayName } from '../util';
|
|
14
14
|
|
|
15
|
-
export const MenuFooter = ({ object }: { object: Obj.
|
|
15
|
+
export const MenuFooter = ({ object }: { object: Obj.Unknown }) => {
|
|
16
16
|
const { t } = useTranslation(meta.id);
|
|
17
17
|
const client = useClient();
|
|
18
18
|
const space = getSpace(object);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { Filter, useQuery, useSchema } from '@dxos/react-client/echo';
|
|
9
|
+
import { Callout, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { useSelected } from '@dxos/react-ui-attention';
|
|
11
|
+
import { Card } from '@dxos/react-ui-mosaic';
|
|
12
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
13
|
+
import { CardStack, StackItem } from '@dxos/react-ui-stack';
|
|
14
|
+
import { type View, getTypenameFromQuery } from '@dxos/schema';
|
|
15
|
+
import { isNonNullable } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { meta } from '../../meta';
|
|
18
|
+
|
|
19
|
+
import { ObjectForm } from './ObjectForm';
|
|
20
|
+
|
|
21
|
+
export type ObjectCardStackProps = {
|
|
22
|
+
view: View.View;
|
|
23
|
+
objectId: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(({ objectId, view }, forwardedRef) => {
|
|
27
|
+
const { t } = useTranslation(meta.id);
|
|
28
|
+
const db = Obj.getDatabase(view);
|
|
29
|
+
const typename = view.query ? getTypenameFromQuery(view.query.ast) : undefined;
|
|
30
|
+
const schema = useSchema(db, typename);
|
|
31
|
+
|
|
32
|
+
const queriedObjects = useQuery(db, schema ? Filter.type(schema) : Filter.nothing());
|
|
33
|
+
const selectedRows = useSelected(objectId, 'multi');
|
|
34
|
+
const selectedObjects = selectedRows.map((id) => queriedObjects.find((obj) => obj.id === id)).filter(isNonNullable);
|
|
35
|
+
|
|
36
|
+
if (!schema) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Layout.Main toolbar ref={forwardedRef}>
|
|
42
|
+
<Toolbar.Root></Toolbar.Root>
|
|
43
|
+
<CardStack.Root asChild>
|
|
44
|
+
<CardStack.Content>
|
|
45
|
+
<CardStack.Stack id={objectId} itemsCount={selectedObjects.length}>
|
|
46
|
+
{selectedObjects.length === 0 && (
|
|
47
|
+
<CardStack.Item>
|
|
48
|
+
<Callout.Root>
|
|
49
|
+
<Callout.Title>{t('row details no selection label')}</Callout.Title>
|
|
50
|
+
</Callout.Root>
|
|
51
|
+
</CardStack.Item>
|
|
52
|
+
)}
|
|
53
|
+
{selectedObjects.map((object) => (
|
|
54
|
+
<CardStack.Item key={object.id} asChild>
|
|
55
|
+
<StackItem.Root item={object}>
|
|
56
|
+
<Card.Root>
|
|
57
|
+
<ObjectForm object={object} schema={schema} />
|
|
58
|
+
</Card.Root>
|
|
59
|
+
</StackItem.Root>
|
|
60
|
+
</CardStack.Item>
|
|
61
|
+
))}
|
|
62
|
+
</CardStack.Stack>
|
|
63
|
+
</CardStack.Content>
|
|
64
|
+
</CardStack.Root>
|
|
65
|
+
</Layout.Main>
|
|
66
|
+
);
|
|
67
|
+
});
|
|
@@ -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
|
+
};
|
|
@@ -6,23 +6,23 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
import React, { useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type Obj, Tag } from '@dxos/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
10
10
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
|
-
import { DataType } from '@dxos/schema';
|
|
12
11
|
import { render } from '@dxos/storybook-utils';
|
|
12
|
+
import { Project } from '@dxos/types';
|
|
13
13
|
|
|
14
14
|
import { translations } from '../../translations';
|
|
15
15
|
|
|
16
16
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
17
17
|
|
|
18
18
|
const DefaultStory = () => {
|
|
19
|
-
const { space } =
|
|
20
|
-
const [object, setObject] = useState<Obj.
|
|
19
|
+
const { space } = useClientStory();
|
|
20
|
+
const [object, setObject] = useState<Obj.Unknown>();
|
|
21
21
|
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
if (space && !object) {
|
|
24
|
-
const object = space.db.add(
|
|
25
|
-
setObject(object
|
|
24
|
+
const object = space.db.add(Project.make());
|
|
25
|
+
setObject(object);
|
|
26
26
|
}
|
|
27
27
|
}, [space, object]);
|
|
28
28
|
|
|
@@ -42,7 +42,7 @@ const meta = {
|
|
|
42
42
|
withClientProvider({
|
|
43
43
|
createIdentity: true,
|
|
44
44
|
createSpace: true,
|
|
45
|
-
types: [
|
|
45
|
+
types: [Project.Project, Tag.Tag],
|
|
46
46
|
onCreateSpace: async ({ space }) => {
|
|
47
47
|
space.db.add(Tag.make({ label: 'Tag 1' }));
|
|
48
48
|
space.db.add(Tag.make({ label: 'Tag 2' }));
|
|
@@ -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
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,8 +26,8 @@ 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) => {
|
|
@@ -38,7 +38,7 @@ const KeyItem = ({ forignKey, onDelete }: KeyItemProps) => {
|
|
|
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,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface, type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
8
|
+
import { type Obj } from '@dxos/echo';
|
|
9
|
+
import { Toolbar } from '@dxos/react-ui';
|
|
10
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
11
|
+
|
|
12
|
+
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
13
|
+
|
|
14
|
+
export type ObjectDetailsProps = SurfaceComponentProps<Obj.Unknown>;
|
|
15
|
+
|
|
16
|
+
export const ObjectDetails = forwardRef<HTMLDivElement, ObjectDetailsProps>(
|
|
17
|
+
({ role, subject: object }, forwardedRef) => {
|
|
18
|
+
const data = useMemo(() => ({ subject: object }), [object]);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Layout.Main role={role} ref={forwardedRef}>
|
|
22
|
+
<Toolbar.Root />
|
|
23
|
+
<BaseObjectSettings object={object}>
|
|
24
|
+
<Surface role='base-object-settings' data={data} />
|
|
25
|
+
<Surface role='object-settings' data={data} />
|
|
26
|
+
{/* TODO(wittjosiah): Remove (or add as surface)? */}
|
|
27
|
+
{/* <AdvancedObjectSettings object={object} /> */}
|
|
28
|
+
</BaseObjectSettings>
|
|
29
|
+
</Layout.Main>
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
);
|
package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx}
RENAMED
|
@@ -4,35 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Common } from '@dxos/app-framework';
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/react';
|
|
8
9
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { type Live } from '@dxos/live-object';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
12
13
|
|
|
13
|
-
import { meta } from '
|
|
14
|
+
import { meta } from '../../meta';
|
|
14
15
|
|
|
15
|
-
export const
|
|
16
|
+
export const OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
|
|
16
17
|
|
|
17
|
-
export const
|
|
18
|
+
export const ObjectRenamePopover = ({ object }: { object: Obj.Unknown }) => {
|
|
18
19
|
const { t } = useTranslation(meta.id);
|
|
19
20
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
20
21
|
const [name, setName] = useState(Obj.getLabel(object));
|
|
21
|
-
const {
|
|
22
|
+
const { invokePromise } = useOperationInvoker();
|
|
22
23
|
|
|
23
24
|
const handleDone = useCallback(() => {
|
|
24
25
|
try {
|
|
25
|
-
name && Obj.setLabel(object, name);
|
|
26
|
+
name && Obj.change(object, () => Obj.setLabel(object, name));
|
|
26
27
|
} catch (err) {
|
|
27
28
|
log.error('Failed to rename object', { err });
|
|
28
29
|
}
|
|
29
|
-
void
|
|
30
|
-
|
|
31
|
-
part: 'popover',
|
|
32
|
-
options: { variant: 'react', anchorId: '', state: false },
|
|
33
|
-
}),
|
|
34
|
-
);
|
|
35
|
-
}, [object, name]);
|
|
30
|
+
void invokePromise(Common.LayoutOperation.UpdatePopover, { anchorId: '', state: false });
|
|
31
|
+
}, [object, name, invokePromise]);
|
|
36
32
|
|
|
37
33
|
return (
|
|
38
34
|
<div role='none' className='p-2 flex gap-2'>
|
|
@@ -49,7 +45,7 @@ export const PopoverRenameObject = ({ object }: { object: Live<any> }) => {
|
|
|
49
45
|
</Input.Root>
|
|
50
46
|
</div>
|
|
51
47
|
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
52
|
-
{t('done label', { ns:
|
|
48
|
+
{t('done label', { ns: osTranslations })}
|
|
53
49
|
</Button>
|
|
54
50
|
</div>
|
|
55
51
|
);
|