@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
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
|
-
|
|
9
|
-
import { AwaitingObject } from '../components';
|
|
10
|
-
import { meta } from '../meta';
|
|
11
|
-
|
|
12
|
-
import { SpaceCapabilities } from './capabilities';
|
|
13
|
-
|
|
14
|
-
export default () =>
|
|
15
|
-
contributes(Capabilities.ReactRoot, {
|
|
16
|
-
id: meta.id,
|
|
17
|
-
root: () => {
|
|
18
|
-
const state = useCapability(SpaceCapabilities.State);
|
|
19
|
-
return state.awaiting ? <AwaitingObject id={state.awaiting} /> : null;
|
|
20
|
-
},
|
|
21
|
-
});
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import type * as Schema from 'effect/Schema';
|
|
6
|
-
import React, { useCallback } from 'react';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, Surface, contributes, createSurface, useCapability, useLayout } from '@dxos/app-framework';
|
|
9
|
-
import { Obj, Type } from '@dxos/echo';
|
|
10
|
-
import { findAnnotation } from '@dxos/effect';
|
|
11
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
12
|
-
import {
|
|
13
|
-
type Space,
|
|
14
|
-
SpaceState,
|
|
15
|
-
fullyQualifiedId,
|
|
16
|
-
getSpace,
|
|
17
|
-
isLiveObject,
|
|
18
|
-
isSpace,
|
|
19
|
-
parseId,
|
|
20
|
-
useSpace,
|
|
21
|
-
} from '@dxos/react-client/echo';
|
|
22
|
-
import { Input } from '@dxos/react-ui';
|
|
23
|
-
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
24
|
-
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
25
|
-
import { DataType, type TypenameAnnotation, TypenameAnnotationId } from '@dxos/schema';
|
|
26
|
-
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
27
|
-
|
|
28
|
-
import {
|
|
29
|
-
CREATE_OBJECT_DIALOG,
|
|
30
|
-
CREATE_SPACE_DIALOG,
|
|
31
|
-
CollectionMain,
|
|
32
|
-
CollectionSection,
|
|
33
|
-
CreateObjectDialog,
|
|
34
|
-
type CreateObjectDialogProps,
|
|
35
|
-
CreateSpaceDialog,
|
|
36
|
-
InlineSyncStatus,
|
|
37
|
-
JOIN_DIALOG,
|
|
38
|
-
JoinDialog,
|
|
39
|
-
MembersContainer,
|
|
40
|
-
MenuFooter,
|
|
41
|
-
ObjectDetailsPanel,
|
|
42
|
-
ObjectSettingsContainer,
|
|
43
|
-
POPOVER_RENAME_OBJECT,
|
|
44
|
-
POPOVER_RENAME_SPACE,
|
|
45
|
-
PopoverRenameObject,
|
|
46
|
-
PopoverRenameSpace,
|
|
47
|
-
RecordMain,
|
|
48
|
-
SchemaContainer,
|
|
49
|
-
SmallPresenceLive,
|
|
50
|
-
SpacePluginSettings,
|
|
51
|
-
SpacePresence,
|
|
52
|
-
SpaceSettingsContainer,
|
|
53
|
-
SyncStatus,
|
|
54
|
-
ViewEditor,
|
|
55
|
-
} from '../components';
|
|
56
|
-
import { useTypeOptions } from '../hooks';
|
|
57
|
-
import { meta } from '../meta';
|
|
58
|
-
import { HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
59
|
-
|
|
60
|
-
import { SpaceCapabilities } from './capabilities';
|
|
61
|
-
|
|
62
|
-
type ReactSurfaceOptions = {
|
|
63
|
-
createInvitationUrl: (invitationCode: string) => string;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const OMIT = [DataType.Collection.typename, Type.getTypename(DataType.QueryCollection)];
|
|
67
|
-
|
|
68
|
-
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
69
|
-
contributes(Capabilities.ReactSurface, [
|
|
70
|
-
createSurface({
|
|
71
|
-
id: `${meta.id}/article`,
|
|
72
|
-
role: 'article',
|
|
73
|
-
filter: (data): data is { subject: Space } =>
|
|
74
|
-
// TODO(wittjosiah): Need to avoid shotgun parsing space state everywhere.
|
|
75
|
-
isSpace(data.subject) && data.subject.state.get() === SpaceState.SPACE_READY,
|
|
76
|
-
component: ({ data, role, ...rest }) => (
|
|
77
|
-
<Surface
|
|
78
|
-
data={{
|
|
79
|
-
id: data.subject.id,
|
|
80
|
-
subject: data.subject.properties[DataType.Collection.typename]?.target,
|
|
81
|
-
}}
|
|
82
|
-
role={role}
|
|
83
|
-
{...rest}
|
|
84
|
-
/>
|
|
85
|
-
),
|
|
86
|
-
}),
|
|
87
|
-
createSurface({
|
|
88
|
-
id: `${meta.id}/record-article`,
|
|
89
|
-
role: 'article',
|
|
90
|
-
position: 'fallback',
|
|
91
|
-
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
92
|
-
component: ({ data }) => <RecordMain record={data.subject} />,
|
|
93
|
-
}),
|
|
94
|
-
createSurface({
|
|
95
|
-
id: `${meta.id}/collection-fallback`,
|
|
96
|
-
role: 'article',
|
|
97
|
-
position: 'fallback',
|
|
98
|
-
filter: (data): data is { subject: DataType.Collection } => Obj.instanceOf(DataType.Collection, data.subject),
|
|
99
|
-
component: ({ data }) => <CollectionMain collection={data.subject} />,
|
|
100
|
-
}),
|
|
101
|
-
createSurface({
|
|
102
|
-
id: `${meta.id}/plugin-settings`,
|
|
103
|
-
role: 'article',
|
|
104
|
-
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
105
|
-
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
106
|
-
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
107
|
-
}),
|
|
108
|
-
createSurface({
|
|
109
|
-
id: `${meta.id}/companion/object-settings`,
|
|
110
|
-
role: 'article',
|
|
111
|
-
filter: (data): data is { companionTo: Obj.Any } => Obj.isObject(data.companionTo) && data.subject === 'settings',
|
|
112
|
-
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
113
|
-
}),
|
|
114
|
-
createSurface({
|
|
115
|
-
id: `${meta.id}/space-settings-properties`,
|
|
116
|
-
role: 'article',
|
|
117
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/properties`,
|
|
118
|
-
component: () => {
|
|
119
|
-
const layout = useLayout();
|
|
120
|
-
const { spaceId } = parseId(layout.workspace);
|
|
121
|
-
const space = useSpace(spaceId);
|
|
122
|
-
if (!space || !spaceId) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return <SpaceSettingsContainer space={space} />;
|
|
127
|
-
},
|
|
128
|
-
}),
|
|
129
|
-
createSurface({
|
|
130
|
-
id: `${meta.id}/space-settings-members`,
|
|
131
|
-
role: 'article',
|
|
132
|
-
position: 'hoist',
|
|
133
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/members`,
|
|
134
|
-
component: () => {
|
|
135
|
-
const layout = useLayout();
|
|
136
|
-
const { spaceId } = parseId(layout.workspace);
|
|
137
|
-
const space = useSpace(spaceId);
|
|
138
|
-
if (!space || !spaceId) {
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return <MembersContainer space={space} createInvitationUrl={createInvitationUrl} />;
|
|
143
|
-
},
|
|
144
|
-
}),
|
|
145
|
-
createSurface({
|
|
146
|
-
id: `${meta.id}/space-settings-schema`,
|
|
147
|
-
role: 'article',
|
|
148
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/schema`,
|
|
149
|
-
component: () => {
|
|
150
|
-
const layout = useLayout();
|
|
151
|
-
const { spaceId } = parseId(layout.workspace);
|
|
152
|
-
const space = useSpace(spaceId);
|
|
153
|
-
if (!space || !spaceId) {
|
|
154
|
-
return null;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return <SchemaContainer space={space} />;
|
|
158
|
-
},
|
|
159
|
-
}),
|
|
160
|
-
createSurface({
|
|
161
|
-
id: `${meta.id}/selected-objects`,
|
|
162
|
-
role: 'article',
|
|
163
|
-
filter: (data): data is { companionTo: DataType.View; subject: 'selected-objects' } =>
|
|
164
|
-
Obj.instanceOf(DataType.View, data.companionTo) && data.subject === 'selected-objects',
|
|
165
|
-
component: ({ data }) => (
|
|
166
|
-
<ObjectDetailsPanel
|
|
167
|
-
key={fullyQualifiedId(data.companionTo)}
|
|
168
|
-
objectId={fullyQualifiedId(data.companionTo)}
|
|
169
|
-
view={data.companionTo}
|
|
170
|
-
/>
|
|
171
|
-
),
|
|
172
|
-
}),
|
|
173
|
-
createSurface({
|
|
174
|
-
id: JOIN_DIALOG,
|
|
175
|
-
role: 'dialog',
|
|
176
|
-
filter: (data): data is { props: JoinPanelProps } => data.component === JOIN_DIALOG,
|
|
177
|
-
component: ({ data }) => <JoinDialog {...data.props} />,
|
|
178
|
-
}),
|
|
179
|
-
createSurface({
|
|
180
|
-
id: CREATE_SPACE_DIALOG,
|
|
181
|
-
role: 'dialog',
|
|
182
|
-
filter: (data): data is any => data.component === CREATE_SPACE_DIALOG,
|
|
183
|
-
component: () => <CreateSpaceDialog />,
|
|
184
|
-
}),
|
|
185
|
-
createSurface({
|
|
186
|
-
id: CREATE_OBJECT_DIALOG,
|
|
187
|
-
role: 'dialog',
|
|
188
|
-
filter: (data): data is { props: CreateObjectDialogProps } => data.component === CREATE_OBJECT_DIALOG,
|
|
189
|
-
component: ({ data }) => <CreateObjectDialog {...data.props} />,
|
|
190
|
-
}),
|
|
191
|
-
createSurface({
|
|
192
|
-
id: `${meta.id}/create-initial-space-form-[hue]`,
|
|
193
|
-
role: 'form-input',
|
|
194
|
-
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
195
|
-
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
196
|
-
return !!annotation;
|
|
197
|
-
},
|
|
198
|
-
component: ({ data: _, ...inputProps }) => {
|
|
199
|
-
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
200
|
-
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange]);
|
|
201
|
-
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
202
|
-
return (
|
|
203
|
-
<Input.Root>
|
|
204
|
-
<Input.Label>{label}</Input.Label>
|
|
205
|
-
<HuePicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
206
|
-
</Input.Root>
|
|
207
|
-
);
|
|
208
|
-
},
|
|
209
|
-
}),
|
|
210
|
-
createSurface({
|
|
211
|
-
id: `${meta.id}/create-initial-space-form-[icon]`,
|
|
212
|
-
role: 'form-input',
|
|
213
|
-
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
214
|
-
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
215
|
-
return !!annotation;
|
|
216
|
-
},
|
|
217
|
-
component: ({ data: _, ...inputProps }) => {
|
|
218
|
-
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
219
|
-
const handleChange = useCallback((nextIcon: string) => onValueChange(type, nextIcon), [onValueChange]);
|
|
220
|
-
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
221
|
-
return (
|
|
222
|
-
<Input.Root>
|
|
223
|
-
<Input.Label>{label}</Input.Label>
|
|
224
|
-
<IconPicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
225
|
-
</Input.Root>
|
|
226
|
-
);
|
|
227
|
-
},
|
|
228
|
-
}),
|
|
229
|
-
createSurface({
|
|
230
|
-
id: `${meta.id}/typename-form-input`,
|
|
231
|
-
role: 'form-input',
|
|
232
|
-
filter: (
|
|
233
|
-
data,
|
|
234
|
-
): data is { prop: string; schema: Schema.Schema<any>; target: Space | DataType.Collection | undefined } => {
|
|
235
|
-
if (data.prop !== 'typename') {
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const annotation = findAnnotation((data.schema as Schema.Schema.All).ast, TypenameAnnotationId);
|
|
240
|
-
return !!annotation;
|
|
241
|
-
},
|
|
242
|
-
component: ({ data: { schema, target }, ...inputProps }) => {
|
|
243
|
-
const props = inputProps as any as InputProps;
|
|
244
|
-
const space = isSpace(target) ? target : getSpace(target);
|
|
245
|
-
const annotation = findAnnotation<TypenameAnnotation[]>(schema.ast, TypenameAnnotationId)!;
|
|
246
|
-
const options = useTypeOptions({ space, annotation });
|
|
247
|
-
|
|
248
|
-
return <SelectInput {...props} options={options} />;
|
|
249
|
-
},
|
|
250
|
-
}),
|
|
251
|
-
createSurface({
|
|
252
|
-
id: `${meta.id}/object-settings`,
|
|
253
|
-
role: 'object-settings',
|
|
254
|
-
filter: (data): data is { subject: DataType.View } => Obj.instanceOf(DataType.View, data.subject),
|
|
255
|
-
component: ({ data }) => <ViewEditor view={data.subject} />,
|
|
256
|
-
}),
|
|
257
|
-
createSurface({
|
|
258
|
-
id: POPOVER_RENAME_SPACE,
|
|
259
|
-
role: 'card--popover',
|
|
260
|
-
filter: (data): data is { props: Space } => data.component === POPOVER_RENAME_SPACE && isSpace(data.props),
|
|
261
|
-
component: ({ data }) => <PopoverRenameSpace space={data.props} />,
|
|
262
|
-
}),
|
|
263
|
-
createSurface({
|
|
264
|
-
id: POPOVER_RENAME_OBJECT,
|
|
265
|
-
role: 'card--popover',
|
|
266
|
-
filter: (data): data is { props: Obj.Any } =>
|
|
267
|
-
data.component === POPOVER_RENAME_OBJECT && isLiveObject(data.props),
|
|
268
|
-
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
269
|
-
}),
|
|
270
|
-
createSurface({
|
|
271
|
-
id: `${meta.id}/menu-footer`,
|
|
272
|
-
role: 'menu-footer',
|
|
273
|
-
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
274
|
-
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
275
|
-
}),
|
|
276
|
-
createSurface({
|
|
277
|
-
id: `${meta.id}/navtree-presence`,
|
|
278
|
-
role: 'navtree-item-end',
|
|
279
|
-
filter: (data): data is { id: string; subject: Obj.Any; open?: boolean } =>
|
|
280
|
-
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
281
|
-
component: ({ data }) => {
|
|
282
|
-
// TODO(wittjosiah): Doesn't need to be mutable but readonly type messes with ComplexMap.
|
|
283
|
-
const state = useCapability(SpaceCapabilities.MutableState);
|
|
284
|
-
return <SmallPresenceLive id={data.id} open={data.open} viewers={state.viewersByObject[data.id]} />;
|
|
285
|
-
},
|
|
286
|
-
}),
|
|
287
|
-
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
288
|
-
createSurface({
|
|
289
|
-
id: `${meta.id}/navtree-presence-fallback`,
|
|
290
|
-
role: 'navtree-item-end',
|
|
291
|
-
position: 'fallback',
|
|
292
|
-
filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
|
|
293
|
-
component: ({ data }) => <SmallPresenceLive id={data.id} open={data.open} />,
|
|
294
|
-
}),
|
|
295
|
-
// TODO(wittjosiah): Broken?
|
|
296
|
-
createSurface({
|
|
297
|
-
id: `${meta.id}/navtree-sync-status`,
|
|
298
|
-
role: 'navtree-item-end',
|
|
299
|
-
filter: (data): data is { subject: Space; open?: boolean } => isSpace(data.subject),
|
|
300
|
-
component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,
|
|
301
|
-
}),
|
|
302
|
-
createSurface({
|
|
303
|
-
id: `${meta.id}/navbar-presence`,
|
|
304
|
-
role: 'navbar-end',
|
|
305
|
-
position: 'hoist',
|
|
306
|
-
filter: (data): data is { subject: Space | Obj.Any } => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
307
|
-
component: ({ data }) => {
|
|
308
|
-
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
309
|
-
const object = isSpace(data.subject)
|
|
310
|
-
? data.subject.state.get() === SpaceState.SPACE_READY
|
|
311
|
-
? (space?.properties[DataType.Collection.typename]?.target as DataType.Collection)
|
|
312
|
-
: undefined
|
|
313
|
-
: data.subject;
|
|
314
|
-
|
|
315
|
-
return object ? <SpacePresence object={object} /> : null;
|
|
316
|
-
},
|
|
317
|
-
}),
|
|
318
|
-
createSurface({
|
|
319
|
-
id: `${meta.id}/collection-section`,
|
|
320
|
-
role: 'section',
|
|
321
|
-
filter: (data): data is { subject: DataType.Collection } => Obj.instanceOf(DataType.Collection, data.subject),
|
|
322
|
-
component: ({ data }) => <CollectionSection collection={data.subject} />,
|
|
323
|
-
}),
|
|
324
|
-
createSurface({
|
|
325
|
-
id: `${meta.id}/status`,
|
|
326
|
-
role: 'status',
|
|
327
|
-
component: () => <SyncStatus />,
|
|
328
|
-
}),
|
|
329
|
-
]);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
|
-
|
|
8
|
-
import { type ObjectForm } from '../types';
|
|
9
|
-
|
|
10
|
-
import { SpaceCapabilities } from './capabilities';
|
|
11
|
-
|
|
12
|
-
export default (context: PluginContext) => {
|
|
13
|
-
const registry = context.getCapability(Capabilities.RxRegistry);
|
|
14
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
15
|
-
|
|
16
|
-
// TODO(wittjosiah): Unregister schemas when they are disabled.
|
|
17
|
-
let previous: ObjectForm[] = [];
|
|
18
|
-
const cancel = registry.subscribe(
|
|
19
|
-
context.capabilities(SpaceCapabilities.ObjectForm),
|
|
20
|
-
(_forms) => {
|
|
21
|
-
const forms = Array.from(new Set(_forms));
|
|
22
|
-
// TODO(wittjosiah): Filter out schemas which the client has already registered.
|
|
23
|
-
const newSchemas = forms.filter((form) => !previous.includes(form)).map((form) => form.objectSchema);
|
|
24
|
-
previous = forms;
|
|
25
|
-
client.addTypes(newSchemas);
|
|
26
|
-
},
|
|
27
|
-
{ immediate: true },
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
return contributes(Capabilities.Null, null, () => cancel());
|
|
31
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { type SpaceSettingsProps, SpaceSettingsSchema } from '../types';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<SpaceSettingsProps>({
|
|
13
|
-
showHidden: false,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
return contributes(Capabilities.Settings, {
|
|
17
|
-
prefix: meta.id,
|
|
18
|
-
schema: SpaceSettingsSchema,
|
|
19
|
-
value: settings,
|
|
20
|
-
});
|
|
21
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Option from 'effect/Option';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
|
-
import { SubscriptionList } from '@dxos/async';
|
|
9
|
-
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
|
-
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
11
|
-
import { log } from '@dxos/log';
|
|
12
|
-
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
13
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
14
|
-
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
15
|
-
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
|
-
import { PublicKey } from '@dxos/react-client';
|
|
17
|
-
import { FQ_ID_LENGTH, SpaceState, parseFullyQualifiedId } from '@dxos/react-client/echo';
|
|
18
|
-
import { ComplexMap, reduceGroupBy } from '@dxos/util';
|
|
19
|
-
|
|
20
|
-
import { SpaceAction } from '../types';
|
|
21
|
-
import { COMPOSER_SPACE_LOCK, SHARED } from '../util';
|
|
22
|
-
|
|
23
|
-
import { SpaceCapabilities } from './capabilities';
|
|
24
|
-
|
|
25
|
-
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
26
|
-
const WAIT_FOR_OBJECT_TIMEOUT = 5_000;
|
|
27
|
-
|
|
28
|
-
export default async (context: PluginContext) => {
|
|
29
|
-
const subscriptions = new SubscriptionList();
|
|
30
|
-
const spaceSubscriptions = new SubscriptionList();
|
|
31
|
-
|
|
32
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
33
|
-
const { graph } = context.getCapability(Capabilities.AppGraph);
|
|
34
|
-
const layout = context.getCapability(Capabilities.Layout);
|
|
35
|
-
const deck = context.getCapabilities(DeckCapabilities.DeckState)[0];
|
|
36
|
-
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
37
|
-
const state = context.getCapability(SpaceCapabilities.MutableState);
|
|
38
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
39
|
-
|
|
40
|
-
const defaultSpace = client.spaces.default;
|
|
41
|
-
await defaultSpace.waitUntilReady();
|
|
42
|
-
|
|
43
|
-
if (deck?.activeDeck === 'default') {
|
|
44
|
-
await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: defaultSpace.id }));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Initialize space sharing lock in default space.
|
|
48
|
-
if (typeof defaultSpace.properties[COMPOSER_SPACE_LOCK] !== 'boolean') {
|
|
49
|
-
defaultSpace.properties[COMPOSER_SPACE_LOCK] = true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const {
|
|
53
|
-
objects: [spacesOrder],
|
|
54
|
-
} = await defaultSpace.db.query(Filter.type(Type.Expando, { key: SHARED })).run();
|
|
55
|
-
if (!spacesOrder) {
|
|
56
|
-
// TODO(wittjosiah): Cannot be a Folder because Spaces are not TypedObjects so can't be saved in the database.
|
|
57
|
-
// Instead, we store order as an array of space ids.
|
|
58
|
-
defaultSpace.db.add(Obj.make(Type.Expando, { key: SHARED, order: [] }));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Await missing objects.
|
|
62
|
-
subscriptions.add(
|
|
63
|
-
scheduledEffect(
|
|
64
|
-
() => ({ active: layout.active }),
|
|
65
|
-
({ active }) => {
|
|
66
|
-
if (active.length !== 1) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const id = active[0];
|
|
71
|
-
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
72
|
-
if (!node && id.length === FQ_ID_LENGTH) {
|
|
73
|
-
void graph.initialize(id);
|
|
74
|
-
const timeout = setTimeout(async () => {
|
|
75
|
-
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
76
|
-
if (!node) {
|
|
77
|
-
await dispatch(createIntent(SpaceAction.WaitForObject, { id }));
|
|
78
|
-
}
|
|
79
|
-
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
80
|
-
|
|
81
|
-
return () => clearTimeout(timeout);
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
),
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
// Cache space names.
|
|
88
|
-
subscriptions.add(
|
|
89
|
-
client.spaces.subscribe(async (spaces) => {
|
|
90
|
-
// TODO(wittjosiah): Remove. This is a hack to be able to migrate the default space properties.
|
|
91
|
-
if (defaultSpace.state.get() === SpaceState.SPACE_REQUIRES_MIGRATION) {
|
|
92
|
-
await defaultSpace.internal.migrate();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
spaces
|
|
96
|
-
.filter((space) => space.state.get() === SpaceState.SPACE_READY)
|
|
97
|
-
.forEach((space) => {
|
|
98
|
-
subscriptions.add(
|
|
99
|
-
scheduledEffect(
|
|
100
|
-
() => ({ name: space.properties.name }),
|
|
101
|
-
({ name }) => (state.spaceNames[space.id] = name),
|
|
102
|
-
),
|
|
103
|
-
);
|
|
104
|
-
});
|
|
105
|
-
}).unsubscribe,
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
// Broadcast active node to other peers in the space.
|
|
109
|
-
subscriptions.add(
|
|
110
|
-
scheduledEffect(
|
|
111
|
-
() => ({ current: attention.current, active: layout.active, inactive: layout.inactive }),
|
|
112
|
-
({ current, active, inactive }) => {
|
|
113
|
-
const send = () => {
|
|
114
|
-
const spaces = client.spaces.get();
|
|
115
|
-
const identity = client.halo.identity.get();
|
|
116
|
-
if (identity) {
|
|
117
|
-
// Group parts by space for efficient messaging.
|
|
118
|
-
const idsBySpace = reduceGroupBy(active, (id) => {
|
|
119
|
-
try {
|
|
120
|
-
const [spaceId] = parseFullyQualifiedId(id);
|
|
121
|
-
return spaceId;
|
|
122
|
-
} catch {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
const removedBySpace = reduceGroupBy(inactive, (id) => {
|
|
128
|
-
try {
|
|
129
|
-
const [spaceId] = parseFullyQualifiedId(id);
|
|
130
|
-
return spaceId;
|
|
131
|
-
} catch {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
// NOTE: Ensure all spaces are included so that we send the correct `removed` object arrays.
|
|
137
|
-
for (const space of spaces) {
|
|
138
|
-
if (!idsBySpace.has(space.id)) {
|
|
139
|
-
idsBySpace.set(space.id, []);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
for (const [spaceId, added] of idsBySpace) {
|
|
144
|
-
const removed = removedBySpace.get(spaceId) ?? [];
|
|
145
|
-
const space = spaces.find((space) => space.id === spaceId);
|
|
146
|
-
if (!space) {
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
void space
|
|
151
|
-
.postMessage('viewing', {
|
|
152
|
-
identityKey: identity.identityKey.toHex(),
|
|
153
|
-
attended: current,
|
|
154
|
-
added,
|
|
155
|
-
removed,
|
|
156
|
-
})
|
|
157
|
-
// TODO(burdon): This seems defensive; why would this fail? Backoff interval.
|
|
158
|
-
.catch((err) => {
|
|
159
|
-
log.warn('Failed to broadcast active node for presence.', { err: err.message });
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
send();
|
|
166
|
-
// Send at interval to allow peers to expire entries if they become disconnected.
|
|
167
|
-
const interval = setInterval(() => send(), ACTIVE_NODE_BROADCAST_INTERVAL);
|
|
168
|
-
return () => clearInterval(interval);
|
|
169
|
-
},
|
|
170
|
-
),
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
// Listen for active nodes from other peers in the space.
|
|
174
|
-
subscriptions.add(
|
|
175
|
-
client.spaces.subscribe((spaces) => {
|
|
176
|
-
spaceSubscriptions.clear();
|
|
177
|
-
spaces.forEach((space) => {
|
|
178
|
-
spaceSubscriptions.add(
|
|
179
|
-
space.listen('viewing', (message) => {
|
|
180
|
-
const { added, removed, attended } = message.payload;
|
|
181
|
-
|
|
182
|
-
const identityKey = PublicKey.safeFrom(message.payload.identityKey);
|
|
183
|
-
const currentIdentity = client.halo.identity.get();
|
|
184
|
-
if (
|
|
185
|
-
identityKey &&
|
|
186
|
-
!currentIdentity?.identityKey.equals(identityKey) &&
|
|
187
|
-
Array.isArray(added) &&
|
|
188
|
-
Array.isArray(removed)
|
|
189
|
-
) {
|
|
190
|
-
added.forEach((id) => {
|
|
191
|
-
if (typeof id === 'string') {
|
|
192
|
-
if (!(id in state.viewersByObject)) {
|
|
193
|
-
state.viewersByObject[id] = new ComplexMap(PublicKey.hash);
|
|
194
|
-
}
|
|
195
|
-
state.viewersByObject[id]!.set(identityKey, {
|
|
196
|
-
lastSeen: Date.now(),
|
|
197
|
-
currentlyAttended: new Set(attended).has(id),
|
|
198
|
-
});
|
|
199
|
-
if (!state.viewersByIdentity.has(identityKey)) {
|
|
200
|
-
state.viewersByIdentity.set(identityKey, new Set());
|
|
201
|
-
}
|
|
202
|
-
state.viewersByIdentity.get(identityKey)!.add(id);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
removed.forEach((id) => {
|
|
207
|
-
if (typeof id === 'string') {
|
|
208
|
-
state.viewersByObject[id]?.delete(identityKey);
|
|
209
|
-
state.viewersByIdentity.get(identityKey)?.delete(id);
|
|
210
|
-
// It’s okay for these to be empty sets/maps, reduces churn.
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}),
|
|
215
|
-
);
|
|
216
|
-
});
|
|
217
|
-
}).unsubscribe,
|
|
218
|
-
);
|
|
219
|
-
|
|
220
|
-
// Enable edge replication for all spaces.
|
|
221
|
-
try {
|
|
222
|
-
await Promise.all(
|
|
223
|
-
client.spaces.get().map((space) => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED)),
|
|
224
|
-
);
|
|
225
|
-
state.enabledEdgeReplication = true;
|
|
226
|
-
} catch (err) {
|
|
227
|
-
log.catch(err);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
return contributes(Capabilities.Null, null, () => {
|
|
231
|
-
spaceSubscriptions.clear();
|
|
232
|
-
subscriptions.clear();
|
|
233
|
-
});
|
|
234
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { effect } from '@preact/signals-core';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
8
|
-
import { PublicKey } from '@dxos/keys';
|
|
9
|
-
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
|
-
import { ComplexMap } from '@dxos/util';
|
|
11
|
-
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
import { type PluginState } from '../types';
|
|
14
|
-
|
|
15
|
-
import { SpaceCapabilities } from './capabilities';
|
|
16
|
-
|
|
17
|
-
export default (context: PluginContext) => {
|
|
18
|
-
const state = new LocalStorageStore<PluginState>(meta.id, {
|
|
19
|
-
awaiting: undefined,
|
|
20
|
-
spaceNames: {},
|
|
21
|
-
viewersByObject: {},
|
|
22
|
-
// TODO(wittjosiah): Stop using (Complex)Map inside reactive object.
|
|
23
|
-
viewersByIdentity: new ComplexMap(PublicKey.hash),
|
|
24
|
-
sdkMigrationRunning: {},
|
|
25
|
-
navigableCollections: false,
|
|
26
|
-
enabledEdgeReplication: false,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
state
|
|
30
|
-
.prop({ key: 'spaceNames', type: LocalStorageStore.json<Record<string, string>>() })
|
|
31
|
-
.prop({ key: 'enabledEdgeReplication', type: LocalStorageStore.bool() });
|
|
32
|
-
|
|
33
|
-
const manager = context.getCapability(Capabilities.PluginManager);
|
|
34
|
-
const unsubscribe = effect(() => {
|
|
35
|
-
// TODO(wittjosiah): Find a way to make this capability-based.
|
|
36
|
-
const enabled = manager.enabled.includes('dxos.org/plugin/stack');
|
|
37
|
-
if (enabled !== state.values.navigableCollections) {
|
|
38
|
-
state.values.navigableCollections = enabled;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return contributes(SpaceCapabilities.State, state.values, () => {
|
|
43
|
-
unsubscribe();
|
|
44
|
-
state.close();
|
|
45
|
-
});
|
|
46
|
-
};
|