@dxos/plugin-space 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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/SpacePluginSettings-LDOOTV5I.mjs +50 -0
- package/dist/lib/browser/SpacePluginSettings-LDOOTV5I.mjs.map +7 -0
- package/dist/lib/browser/add-object-PTDNNZ4X.mjs +86 -0
- package/dist/lib/browser/add-object-PTDNNZ4X.mjs.map +7 -0
- package/dist/lib/browser/add-relation-WVBJ5TLH.mjs +26 -0
- package/dist/lib/browser/add-relation-WVBJ5TLH.mjs.map +7 -0
- package/dist/lib/browser/add-schema-OT6SSEPX.mjs +60 -0
- package/dist/lib/browser/add-schema-OT6SSEPX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HSMQFM57.mjs → chunk-5CKPBXLB.mjs} +2 -2
- package/dist/lib/browser/{chunk-HSMQFM57.mjs.map → chunk-5CKPBXLB.mjs.map} +1 -1
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-JH2UWMN2.mjs +8 -0
- package/dist/lib/browser/chunk-JH2UWMN2.mjs.map +7 -0
- package/dist/lib/browser/chunk-KUNCAA4T.mjs +489 -0
- package/dist/lib/browser/chunk-KUNCAA4T.mjs.map +7 -0
- package/dist/lib/browser/chunk-VV4C4APQ.mjs +16 -0
- package/dist/lib/browser/chunk-VV4C4APQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-WB3HNICB.mjs +98 -0
- package/dist/lib/browser/chunk-WB3HNICB.mjs.map +7 -0
- package/dist/lib/browser/chunk-YSV6LKD6.mjs +71 -0
- package/dist/lib/browser/chunk-YSV6LKD6.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +62 -63
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/close-ABYGWMHQ.mjs +17 -0
- package/dist/lib/browser/close-ABYGWMHQ.mjs.map +7 -0
- package/dist/lib/browser/create-4TXUMKXU.mjs +74 -0
- package/dist/lib/browser/create-4TXUMKXU.mjs.map +7 -0
- package/dist/lib/browser/delete-field-2HSDW6OH.mjs +67 -0
- package/dist/lib/browser/delete-field-2HSDW6OH.mjs.map +7 -0
- package/dist/lib/browser/duplicate-object-D2M2NZVR.mjs +42 -0
- package/dist/lib/browser/duplicate-object-D2M2NZVR.mjs.map +7 -0
- package/dist/lib/browser/get-share-link-2LZFU6DO.mjs +41 -0
- package/dist/lib/browser/get-share-link-2LZFU6DO.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1047 -231
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/join-2HAIOBPN.mjs +28 -0
- package/dist/lib/browser/join-2HAIOBPN.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +8 -0
- package/dist/lib/browser/meta.mjs.map +7 -0
- package/dist/lib/browser/migrate-DRXGZXKT.mjs +50 -0
- package/dist/lib/browser/migrate-DRXGZXKT.mjs.map +7 -0
- package/dist/lib/browser/open-U253J7QM.mjs +17 -0
- package/dist/lib/browser/open-U253J7QM.mjs.map +7 -0
- package/dist/lib/browser/open-create-object-RFFUQ75C.mjs +42 -0
- package/dist/lib/browser/open-create-object-RFFUQ75C.mjs.map +7 -0
- package/dist/lib/browser/open-create-space-GFDF6QQI.mjs +24 -0
- package/dist/lib/browser/open-create-space-GFDF6QQI.mjs.map +7 -0
- package/dist/lib/browser/open-members-XNN3P5SJ.mjs +23 -0
- package/dist/lib/browser/open-members-XNN3P5SJ.mjs.map +7 -0
- package/dist/lib/browser/open-settings-CUG4OD7L.mjs +23 -0
- package/dist/lib/browser/open-settings-CUG4OD7L.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/remove-objects-BYCAN5JS.mjs +79 -0
- package/dist/lib/browser/remove-objects-BYCAN5JS.mjs.map +7 -0
- package/dist/lib/browser/rename-MG3N7CI4.mjs +25 -0
- package/dist/lib/browser/rename-MG3N7CI4.mjs.map +7 -0
- package/dist/lib/browser/rename-object-3TCBTOGS.mjs +26 -0
- package/dist/lib/browser/rename-object-3TCBTOGS.mjs.map +7 -0
- package/dist/lib/browser/restore-field-VHMYRPG4.mjs +65 -0
- package/dist/lib/browser/restore-field-VHMYRPG4.mjs.map +7 -0
- package/dist/lib/browser/restore-objects-4O46Z6SC.mjs +56 -0
- package/dist/lib/browser/restore-objects-4O46Z6SC.mjs.map +7 -0
- package/dist/lib/browser/share-EK2IUE6H.mjs +31 -0
- package/dist/lib/browser/share-EK2IUE6H.mjs.map +7 -0
- package/dist/lib/browser/snapshot-YHX4IEGR.mjs +38 -0
- package/dist/lib/browser/snapshot-YHX4IEGR.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -8
- package/dist/lib/browser/wait-for-object-KOAWA64L.mjs +23 -0
- package/dist/lib/browser/wait-for-object-KOAWA64L.mjs.map +7 -0
- package/dist/lib/node-esm/SpacePluginSettings-KR2HJWEO.mjs +51 -0
- package/dist/lib/node-esm/SpacePluginSettings-KR2HJWEO.mjs.map +7 -0
- package/dist/lib/node-esm/add-object-YDSK2W44.mjs +87 -0
- package/dist/lib/node-esm/add-object-YDSK2W44.mjs.map +7 -0
- package/dist/lib/node-esm/add-relation-YKUOLC42.mjs +27 -0
- package/dist/lib/node-esm/add-relation-YKUOLC42.mjs.map +7 -0
- package/dist/lib/node-esm/add-schema-LMXL74ID.mjs +61 -0
- package/dist/lib/node-esm/add-schema-LMXL74ID.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SL4BJSUG.mjs → chunk-64AL4GHY.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-SL4BJSUG.mjs.map → chunk-64AL4GHY.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-EQMZ4GGS.mjs +99 -0
- package/dist/lib/node-esm/chunk-EQMZ4GGS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GTF56ZOK.mjs +10 -0
- package/dist/lib/node-esm/chunk-GTF56ZOK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IAG7Y2XI.mjs +490 -0
- package/dist/lib/node-esm/chunk-IAG7Y2XI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IHOQPYNT.mjs +73 -0
- package/dist/lib/node-esm/chunk-IHOQPYNT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IYW6CXLN.mjs +18 -0
- package/dist/lib/node-esm/chunk-IYW6CXLN.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +62 -63
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/close-KI6ZXBRB.mjs +18 -0
- package/dist/lib/node-esm/close-KI6ZXBRB.mjs.map +7 -0
- package/dist/lib/node-esm/create-PUZH3EV5.mjs +75 -0
- package/dist/lib/node-esm/create-PUZH3EV5.mjs.map +7 -0
- package/dist/lib/node-esm/delete-field-ZHWGKU6K.mjs +68 -0
- package/dist/lib/node-esm/delete-field-ZHWGKU6K.mjs.map +7 -0
- package/dist/lib/node-esm/duplicate-object-7HESO4PZ.mjs +43 -0
- package/dist/lib/node-esm/duplicate-object-7HESO4PZ.mjs.map +7 -0
- package/dist/lib/node-esm/get-share-link-5SG2WVER.mjs +42 -0
- package/dist/lib/node-esm/get-share-link-5SG2WVER.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1047 -231
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/join-JRXZTIUA.mjs +29 -0
- package/dist/lib/node-esm/join-JRXZTIUA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/meta.mjs +9 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/migrate-SRFQ5HND.mjs +51 -0
- package/dist/lib/node-esm/migrate-SRFQ5HND.mjs.map +7 -0
- package/dist/lib/node-esm/open-JTUMKYY3.mjs +18 -0
- package/dist/lib/node-esm/open-JTUMKYY3.mjs.map +7 -0
- package/dist/lib/node-esm/open-create-object-Q53C4AQN.mjs +43 -0
- package/dist/lib/node-esm/open-create-object-Q53C4AQN.mjs.map +7 -0
- package/dist/lib/node-esm/open-create-space-AIFNTXIH.mjs +25 -0
- package/dist/lib/node-esm/open-create-space-AIFNTXIH.mjs.map +7 -0
- package/dist/lib/node-esm/open-members-J6S7Q4XJ.mjs +24 -0
- package/dist/lib/node-esm/open-members-J6S7Q4XJ.mjs.map +7 -0
- package/dist/lib/node-esm/open-settings-GAP5BFUC.mjs +24 -0
- package/dist/lib/node-esm/open-settings-GAP5BFUC.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/remove-objects-TRW4NX3G.mjs +80 -0
- package/dist/lib/node-esm/remove-objects-TRW4NX3G.mjs.map +7 -0
- package/dist/lib/node-esm/rename-734OA5MB.mjs +26 -0
- package/dist/lib/node-esm/rename-734OA5MB.mjs.map +7 -0
- package/dist/lib/node-esm/rename-object-REKCYSF6.mjs +27 -0
- package/dist/lib/node-esm/rename-object-REKCYSF6.mjs.map +7 -0
- package/dist/lib/node-esm/restore-field-MLXQH4SO.mjs +66 -0
- package/dist/lib/node-esm/restore-field-MLXQH4SO.mjs.map +7 -0
- package/dist/lib/node-esm/restore-objects-NS6G6J5K.mjs +57 -0
- package/dist/lib/node-esm/restore-objects-NS6G6J5K.mjs.map +7 -0
- package/dist/lib/node-esm/share-AX4Z5MNN.mjs +32 -0
- package/dist/lib/node-esm/share-AX4Z5MNN.mjs.map +7 -0
- package/dist/lib/node-esm/snapshot-R7K3QYKJ.mjs +39 -0
- package/dist/lib/node-esm/snapshot-R7K3QYKJ.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -8
- package/dist/lib/node-esm/wait-for-object-KW3SP6ZZ.mjs +24 -0
- package/dist/lib/node-esm/wait-for-object-KW3SP6ZZ.mjs.map +7 -0
- package/dist/types/src/SpacePlugin.d.ts +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +33 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts +19 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/index.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts +12 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts +57 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.test.d.ts +2 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts +24 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/types.d.ts +38 -0
- package/dist/types/src/capabilities/app-graph-builder/extensions/types.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created.d.ts +5 -0
- package/dist/types/src/capabilities/identity-created.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +38 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +13 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +9 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +8 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +10 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready.d.ts +5 -0
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +10 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/add.d.ts +1 -2
- package/dist/types/src/cli/commands/database/add.d.ts.map +1 -1
- package/dist/types/src/cli/plugin.d.ts +1 -1
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/components/AwaitingObject/AwaitingObject.d.ts.map +1 -0
- package/dist/types/src/components/AwaitingObject/index.d.ts +2 -0
- package/dist/types/src/components/AwaitingObject/index.d.ts.map +1 -0
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +13 -6
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/index.d.ts +1 -2
- package/dist/types/src/components/CreateDialog/index.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts +9 -4
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts +1576 -1405
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/index.d.ts +2 -2
- package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -1
- package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectForm/index.d.ts +2 -0
- package/dist/types/src/components/ObjectForm/index.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings/SpacePluginSettings.d.ts +10 -0
- package/dist/types/src/components/SpacePluginSettings/SpacePluginSettings.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings/SpacePluginSettings.stories.d.ts +1603 -0
- package/dist/types/src/components/{SpaceSettings/SpaceSettingsContainer.stories.d.ts.map → SpacePluginSettings/SpacePluginSettings.stories.d.ts.map} +1 -1
- package/dist/types/src/components/SpacePluginSettings/index.d.ts +3 -0
- package/dist/types/src/components/SpacePluginSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/index.d.ts +2 -2
- package/dist/types/src/components/SyncStatus/index.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +4 -23
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts +8 -0
- package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionArticle/index.d.ts +3 -0
- package/dist/types/src/containers/CollectionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionSection/CollectionSection.d.ts +5 -0
- package/dist/types/src/containers/CollectionSection/CollectionSection.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionSection/index.d.ts +3 -0
- package/dist/types/src/containers/CollectionSection/index.d.ts.map +1 -0
- package/dist/types/src/{components/CreateDialog → containers/CreateObjectDialog}/CreateObjectDialog.d.ts +5 -3
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -0
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +1600 -0
- package/dist/types/src/{components/RecordArticle.stories.d.ts.map → containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map} +1 -1
- package/dist/types/src/containers/CreateObjectDialog/index.d.ts +3 -0
- package/dist/types/src/containers/CreateObjectDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts.map +1 -0
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +1604 -0
- package/dist/types/src/{components/MembersContainer/MembersContainer.stories.d.ts.map → containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map} +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/index.d.ts +3 -0
- package/dist/types/src/containers/CreateSpaceDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/InlineSyncStatus/InlineSyncStatus.d.ts.map +1 -0
- package/dist/types/src/containers/InlineSyncStatus/index.d.ts +3 -0
- package/dist/types/src/containers/InlineSyncStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +1603 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts +3 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/containers/MembersContainer/index.d.ts +3 -0
- package/dist/types/src/containers/MembersContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/MenuFooter/MenuFooter.d.ts.map +1 -0
- package/dist/types/src/containers/MenuFooter/index.d.ts +3 -0
- package/dist/types/src/containers/MenuFooter/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/ObjectCardStack/ObjectCardStack.d.ts +4 -1
- package/dist/types/src/containers/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/ObjectCardStack/index.d.ts.map +1 -1
- package/dist/types/src/containers/ObjectDetails/ObjectDetails.d.ts +11 -0
- package/dist/types/src/containers/ObjectDetails/ObjectDetails.d.ts.map +1 -0
- package/dist/types/src/containers/ObjectDetails/index.d.ts +3 -0
- package/dist/types/src/containers/ObjectDetails/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -1
- package/dist/types/src/containers/ObjectRenamePopover/index.d.ts +3 -0
- package/dist/types/src/containers/ObjectRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts +4 -0
- package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RecordArticle/RecordArticle.stories.d.ts +14 -0
- package/dist/types/src/containers/RecordArticle/RecordArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecordArticle/index.d.ts +3 -0
- package/dist/types/src/containers/RecordArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -0
- package/dist/types/src/containers/SchemaContainer/index.d.ts +3 -0
- package/dist/types/src/containers/SchemaContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/SmallPresenceLive/index.d.ts +2 -0
- package/dist/types/src/containers/SmallPresenceLive/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpacePresence/SpacePresence.d.ts +1 -1
- package/dist/types/src/{components → containers}/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +1601 -0
- package/dist/types/src/{components → containers}/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts +3 -0
- package/dist/types/src/containers/SpacePresence/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts +3 -0
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.d.ts +10 -0
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +1607 -0
- package/dist/types/src/{components/CreateDialog/CreateObjectDialog.stories.d.ts.map → containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map} +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/index.d.ts +3 -0
- package/dist/types/src/containers/SpaceSettingsContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +1606 -0
- package/dist/types/src/{components → containers}/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/index.d.ts +3 -0
- package/dist/types/src/containers/SyncStatus/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ViewEditor}/ViewEditor.d.ts +1 -1
- package/dist/types/src/containers/ViewEditor/ViewEditor.d.ts.map +1 -0
- package/dist/types/src/containers/ViewEditor/index.d.ts +3 -0
- package/dist/types/src/containers/ViewEditor/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +22 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useRelatedObjects.d.ts +6 -0
- package/dist/types/src/hooks/useRelatedObjects.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/add-object.d.ts +5 -0
- package/dist/types/src/operations/add-object.d.ts.map +1 -0
- package/dist/types/src/operations/add-relation.d.ts +5 -0
- package/dist/types/src/operations/add-relation.d.ts.map +1 -0
- package/dist/types/src/operations/add-schema.d.ts +5 -0
- package/dist/types/src/operations/add-schema.d.ts.map +1 -0
- package/dist/types/src/operations/close.d.ts +5 -0
- package/dist/types/src/operations/close.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +217 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/delete-field.d.ts +5 -0
- package/dist/types/src/operations/delete-field.d.ts.map +1 -0
- package/dist/types/src/operations/duplicate-object.d.ts +5 -0
- package/dist/types/src/operations/duplicate-object.d.ts.map +1 -0
- package/dist/types/src/operations/get-share-link.d.ts +5 -0
- package/dist/types/src/operations/get-share-link.d.ts.map +1 -0
- package/dist/types/src/operations/helpers.d.ts +7 -0
- package/dist/types/src/operations/helpers.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/join.d.ts +5 -0
- package/dist/types/src/operations/join.d.ts.map +1 -0
- package/dist/types/src/operations/migrate.d.ts +5 -0
- package/dist/types/src/operations/migrate.d.ts.map +1 -0
- package/dist/types/src/operations/open-create-object.d.ts +5 -0
- package/dist/types/src/operations/open-create-object.d.ts.map +1 -0
- package/dist/types/src/operations/open-create-space.d.ts +5 -0
- package/dist/types/src/operations/open-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/open-members.d.ts +5 -0
- package/dist/types/src/operations/open-members.d.ts.map +1 -0
- package/dist/types/src/operations/open-settings.d.ts +5 -0
- package/dist/types/src/operations/open-settings.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/remove-objects.d.ts +5 -0
- package/dist/types/src/operations/remove-objects.d.ts.map +1 -0
- package/dist/types/src/operations/rename-object.d.ts +5 -0
- package/dist/types/src/operations/rename-object.d.ts.map +1 -0
- package/dist/types/src/operations/rename.d.ts +5 -0
- package/dist/types/src/operations/rename.d.ts.map +1 -0
- package/dist/types/src/operations/restore-field.d.ts +5 -0
- package/dist/types/src/operations/restore-field.d.ts.map +1 -0
- package/dist/types/src/operations/restore-objects.d.ts +5 -0
- package/dist/types/src/operations/restore-objects.d.ts.map +1 -0
- package/dist/types/src/operations/share.d.ts +5 -0
- package/dist/types/src/operations/share.d.ts.map +1 -0
- package/dist/types/src/operations/snapshot.d.ts +5 -0
- package/dist/types/src/operations/snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/wait-for-object.d.ts +5 -0
- package/dist/types/src/operations/wait-for-object.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +1575 -1404
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +9 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/form.d.ts +1 -21
- package/dist/types/src/types/form.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +30 -641
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +7 -123
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +102 -66
- package/src/SpacePlugin.ts +151 -83
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +17 -602
- package/src/capabilities/app-graph-builder/extensions/collections.ts +346 -0
- package/src/capabilities/app-graph-builder/extensions/companions.ts +72 -0
- package/src/capabilities/app-graph-builder/extensions/index.ts +9 -0
- package/src/capabilities/app-graph-builder/extensions/settings.ts +67 -0
- package/src/capabilities/app-graph-builder/extensions/shared.test.ts +112 -0
- package/src/capabilities/app-graph-builder/extensions/shared.ts +171 -0
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +341 -0
- package/src/capabilities/app-graph-builder/extensions/types.ts +423 -0
- package/src/capabilities/app-graph-builder/index.ts +1 -1
- package/src/capabilities/{app-graph-serializer/app-graph-serializer.ts → app-graph-serializer.ts} +17 -15
- package/src/capabilities/identity-created.ts +35 -0
- package/src/capabilities/index.ts +21 -9
- package/src/capabilities/migrations.ts +59 -0
- package/src/capabilities/navigation-handler/index.ts +9 -0
- package/src/capabilities/navigation-handler/navigation-handler.ts +50 -0
- package/src/capabilities/navigation-resolver.ts +99 -0
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +14 -0
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +6 -6
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +96 -106
- package/src/capabilities/repair.ts +42 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +7 -6
- package/src/capabilities/{spaces-ready/spaces-ready.ts → spaces-ready.ts} +97 -35
- package/src/capabilities/{state/state.ts → state.ts} +9 -7
- package/src/capabilities/undo-mappings.ts +58 -0
- package/src/cli/commands/database/add.ts +12 -18
- package/src/cli/commands/database/query/query.test.ts +3 -5
- package/src/cli/commands/database/query/query.ts +1 -1
- package/src/cli/commands/database/remove.ts +2 -2
- package/src/cli/commands/database/stats.ts +1 -1
- package/src/cli/commands/space/close/close.ts +1 -1
- package/src/cli/commands/space/create/create.ts +3 -3
- package/src/cli/commands/space/info/info.test.ts +0 -15
- package/src/cli/commands/space/join/join.ts +1 -1
- package/src/cli/commands/space/members/members.test.ts +0 -13
- package/src/cli/commands/space/open/open.ts +1 -1
- package/src/cli/commands/space/schema/list/list.test.ts +0 -13
- package/src/cli/plugin.ts +52 -33
- package/src/components/{AwaitingObject.tsx → AwaitingObject/AwaitingObject.tsx} +19 -18
- package/src/components/AwaitingObject/index.ts +5 -0
- package/src/components/CreateDialog/CreateObjectPanel.tsx +112 -133
- package/src/components/CreateDialog/index.ts +1 -2
- package/src/components/ObjectDetails/BaseObjectSettings.stories.tsx +11 -11
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +116 -98
- package/src/components/ObjectDetails/ForeignKeys.tsx +9 -3
- package/src/components/ObjectDetails/index.ts +2 -3
- package/src/components/{ObjectCardStack → ObjectForm}/ObjectForm.tsx +28 -10
- package/src/components/{JoinDialog → ObjectForm}/index.ts +1 -1
- package/src/components/SpacePluginSettings/SpacePluginSettings.stories.tsx +34 -0
- package/src/components/SpacePluginSettings/SpacePluginSettings.tsx +73 -0
- package/src/components/SpacePluginSettings/index.ts +7 -0
- package/src/components/SyncStatus/index.ts +2 -2
- package/src/components/SyncStatus/status.ts +7 -7
- package/src/components/index.ts +4 -16
- package/src/constants.ts +6 -6
- package/src/containers/CollectionArticle/CollectionArticle.tsx +134 -0
- package/src/containers/CollectionArticle/index.ts +7 -0
- package/src/containers/CollectionSection/CollectionSection.tsx +22 -0
- package/src/containers/CollectionSection/index.ts +7 -0
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +81 -0
- package/src/{components/CreateDialog → containers/CreateObjectDialog}/CreateObjectDialog.tsx +70 -62
- package/src/containers/CreateObjectDialog/index.ts +6 -0
- package/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.tsx +46 -0
- package/src/{components/CreateDialog → containers/CreateSpaceDialog}/CreateSpaceDialog.tsx +27 -24
- package/src/containers/CreateSpaceDialog/index.ts +7 -0
- package/src/{components/SyncStatus → containers/InlineSyncStatus}/InlineSyncStatus.tsx +10 -21
- package/src/containers/InlineSyncStatus/index.ts +7 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -0
- package/src/{components → containers}/JoinDialog/JoinDialog.tsx +25 -21
- package/src/containers/JoinDialog/index.ts +6 -0
- package/src/{components → containers}/MembersContainer/MembersContainer.tsx +51 -74
- package/src/containers/MembersContainer/index.ts +7 -0
- package/src/{components → containers/MenuFooter}/MenuFooter.tsx +8 -9
- package/src/containers/MenuFooter/index.ts +7 -0
- package/src/containers/ObjectCardStack/ObjectCardStack.tsx +82 -0
- package/src/containers/ObjectDetails/ObjectDetails.tsx +36 -0
- package/src/containers/ObjectDetails/index.ts +7 -0
- package/src/{components → containers}/ObjectRenamePopover/ObjectRenamePopover.tsx +8 -8
- package/src/containers/ObjectRenamePopover/index.ts +7 -0
- package/src/containers/RecordArticle/RecordArticle.stories.tsx +81 -0
- package/src/containers/RecordArticle/RecordArticle.tsx +93 -0
- package/src/containers/RecordArticle/index.ts +7 -0
- package/src/{components → containers/SchemaContainer}/SchemaContainer.tsx +22 -18
- package/src/containers/SchemaContainer/index.ts +7 -0
- package/src/containers/SmallPresenceLive/index.ts +5 -0
- package/src/{components → containers}/SpacePresence/SpacePresence.stories.tsx +2 -2
- package/src/{components → containers}/SpacePresence/SpacePresence.tsx +14 -25
- package/src/containers/SpacePresence/index.ts +6 -0
- package/src/{components → containers}/SpaceRenamePopover/SpaceRenamePopover.tsx +10 -10
- package/src/containers/SpaceRenamePopover/index.ts +7 -0
- package/src/{components/SpaceSettings → containers/SpaceSettingsContainer}/SpaceSettingsContainer.stories.tsx +12 -11
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +216 -0
- package/src/containers/SpaceSettingsContainer/index.ts +7 -0
- package/src/{components → containers}/SyncStatus/SyncStatus.stories.tsx +2 -2
- package/src/{components → containers}/SyncStatus/SyncStatus.tsx +33 -43
- package/src/containers/SyncStatus/index.ts +7 -0
- package/src/{components → containers/ViewEditor}/ViewEditor.tsx +15 -14
- package/src/containers/ViewEditor/index.ts +7 -0
- package/src/containers/index.ts +27 -0
- package/src/hooks/index.ts +1 -2
- package/src/hooks/useInputSurfaceLookup.tsx +3 -3
- package/src/{components/RecordArticle.tsx → hooks/useRelatedObjects.ts} +9 -60
- package/src/index.ts +2 -3
- package/src/meta.ts +1 -1
- package/src/operations/add-object.ts +82 -0
- package/src/operations/add-relation.ts +25 -0
- package/src/operations/add-schema.ts +52 -0
- package/src/operations/close.ts +16 -0
- package/src/operations/create.ts +60 -0
- package/src/operations/definitions.ts +437 -0
- package/src/operations/delete-field.ts +42 -0
- package/src/operations/duplicate-object.ts +31 -0
- package/src/operations/get-share-link.ts +43 -0
- package/src/operations/helpers.ts +10 -0
- package/src/operations/index.ts +31 -0
- package/src/operations/join.ts +27 -0
- package/src/operations/migrate.ts +46 -0
- package/src/operations/open-create-object.ts +41 -0
- package/src/operations/open-create-space.ts +22 -0
- package/src/operations/open-members.ts +20 -0
- package/src/operations/open-settings.ts +20 -0
- package/src/operations/open.ts +16 -0
- package/src/operations/remove-objects.ts +88 -0
- package/src/operations/rename-object.ts +25 -0
- package/src/operations/rename.ts +23 -0
- package/src/operations/restore-field.ts +36 -0
- package/src/operations/restore-objects.ts +49 -0
- package/src/operations/share.ts +27 -0
- package/src/operations/snapshot.ts +24 -0
- package/src/operations/wait-for-object.ts +22 -0
- package/src/translations.ts +251 -203
- package/src/types/Settings.ts +18 -0
- package/src/types/capabilities.ts +11 -10
- package/src/types/events.ts +8 -7
- package/src/types/form.ts +6 -65
- package/src/types/types.ts +38 -555
- package/src/util.ts +79 -0
- package/dist/lib/browser/CollectionArticle-OQMUVFVV.mjs +0 -125
- package/dist/lib/browser/CollectionArticle-OQMUVFVV.mjs.map +0 -7
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +0 -148
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +0 -142
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +0 -7
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +0 -107
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +0 -523
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +0 -84
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +0 -7
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs +0 -117
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-ASV6DYFH.mjs +0 -19
- package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +0 -7
- package/dist/lib/browser/chunk-AWVAX26X.mjs +0 -13
- package/dist/lib/browser/chunk-AWVAX26X.mjs.map +0 -7
- package/dist/lib/browser/chunk-CCRSHECL.mjs +0 -714
- package/dist/lib/browser/chunk-CCRSHECL.mjs.map +0 -7
- package/dist/lib/browser/chunk-SUI34XSA.mjs +0 -772
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +0 -7
- package/dist/lib/browser/chunk-TWUMNPG4.mjs +0 -1898
- package/dist/lib/browser/chunk-TWUMNPG4.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZT2VPYRM.mjs +0 -234
- package/dist/lib/browser/chunk-ZT2VPYRM.mjs.map +0 -7
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs +0 -23
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +0 -827
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +0 -7
- package/dist/lib/browser/react-root-3SPMM45V.mjs +0 -30
- package/dist/lib/browser/react-root-3SPMM45V.mjs.map +0 -7
- package/dist/lib/browser/react-surface-UUS7NDHS.mjs +0 -382
- package/dist/lib/browser/react-surface-UUS7NDHS.mjs.map +0 -7
- package/dist/lib/browser/repair-CJG26D52.mjs +0 -50
- package/dist/lib/browser/repair-CJG26D52.mjs.map +0 -7
- package/dist/lib/browser/settings-ZS2AQ73E.mjs +0 -33
- package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +0 -242
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +0 -7
- package/dist/lib/browser/state-7YZQB2KY.mjs +0 -58
- package/dist/lib/browser/state-7YZQB2KY.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs +0 -126
- package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +0 -149
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +0 -143
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +0 -7
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +0 -108
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +0 -524
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +0 -85
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2SW6S2BB.mjs +0 -235
- package/dist/lib/node-esm/chunk-2SW6S2BB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7KMYUWSR.mjs +0 -773
- package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs +0 -20
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FYSBFBSD.mjs +0 -1899
- package/dist/lib/node-esm/chunk-FYSBFBSD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HREWB23G.mjs +0 -15
- package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs +0 -118
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +0 -715
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +0 -25
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs +0 -828
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs +0 -31
- package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs +0 -383
- package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs.map +0 -7
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs +0 -51
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-PVI2VG56.mjs +0 -34
- package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +0 -243
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +0 -7
- package/dist/lib/node-esm/state-XE5YGPHM.mjs +0 -59
- package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +0 -5
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts +0 -5
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +0 -1
- package/dist/types/src/capabilities/identity-created/index.d.ts +0 -3
- package/dist/types/src/capabilities/identity-created/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -6
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -9
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -8
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -7
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +0 -9
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/spaces-ready/index.d.ts +0 -3
- package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +0 -5
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -13
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/AwaitingObject.d.ts.map +0 -1
- package/dist/types/src/components/CollectionArticle.d.ts +0 -9
- package/dist/types/src/components/CollectionArticle.d.ts.map +0 -1
- package/dist/types/src/components/CollectionSection.d.ts +0 -5
- package/dist/types/src/components/CollectionSection.d.ts.map +0 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +0 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +0 -1604
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog/index.d.ts +0 -2
- package/dist/types/src/components/JoinDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +0 -1600
- package/dist/types/src/components/MembersContainer/index.d.ts +0 -2
- package/dist/types/src/components/MembersContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +0 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +0 -1
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +0 -9
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +0 -1
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts +0 -2
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts.map +0 -1
- package/dist/types/src/components/RecordArticle.d.ts +0 -5
- package/dist/types/src/components/RecordArticle.d.ts.map +0 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +0 -1600
- package/dist/types/src/components/SchemaContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts +0 -8
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +0 -1430
- package/dist/types/src/components/SpacePresence/index.d.ts +0 -2
- package/dist/types/src/components/SpacePresence/index.d.ts.map +0 -1
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts +0 -2
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +0 -1433
- package/dist/types/src/components/SpaceSettings/index.d.ts +0 -2
- package/dist/types/src/components/SpaceSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +0 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +0 -1435
- package/dist/types/src/components/ViewEditor.d.ts.map +0 -1
- package/dist/types/src/helpers/index.d.ts +0 -2
- package/dist/types/src/helpers/index.d.ts.map +0 -1
- package/dist/types/src/helpers/query.d.ts +0 -7
- package/dist/types/src/helpers/query.d.ts.map +0 -1
- package/dist/types/src/helpers/query.test.d.ts +0 -2
- package/dist/types/src/helpers/query.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +0 -4
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +0 -1
- package/dist/types/src/hooks/useTypeOptions.d.ts +0 -10
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +0 -1
- package/src/capabilities/app-graph-serializer/index.ts +0 -7
- package/src/capabilities/identity-created/identity-created.ts +0 -29
- package/src/capabilities/identity-created/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -760
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -67
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/spaces-ready/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/CollectionArticle.tsx +0 -153
- package/src/components/CollectionSection.tsx +0 -22
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +0 -91
- package/src/components/MembersContainer/MembersContainer.stories.tsx +0 -56
- package/src/components/MembersContainer/index.ts +0 -5
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +0 -67
- package/src/components/ObjectDetails/ObjectDetails.tsx +0 -32
- package/src/components/ObjectRenamePopover/index.ts +0 -5
- package/src/components/RecordArticle.stories.tsx +0 -115
- package/src/components/SpacePluginSettings.tsx +0 -62
- package/src/components/SpacePresence/index.ts +0 -5
- package/src/components/SpaceRenamePopover/index.ts +0 -5
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +0 -220
- package/src/components/SpaceSettings/index.ts +0 -5
- package/src/helpers/index.ts +0 -5
- package/src/helpers/query.test.ts +0 -24
- package/src/helpers/query.ts +0 -153
- package/src/hooks/useActiveSpace.ts +0 -23
- package/src/hooks/useTypeOptions.ts +0 -25
- package/src/util.tsx +0 -779
- /package/dist/types/src/components/{AwaitingObject.d.ts → AwaitingObject/AwaitingObject.d.ts} +0 -0
- /package/dist/types/src/components/{ObjectCardStack → ObjectForm}/ObjectForm.d.ts +0 -0
- /package/dist/types/src/{components/CreateDialog → containers/CreateSpaceDialog}/CreateSpaceDialog.d.ts +0 -0
- /package/dist/types/src/{components/SyncStatus → containers/InlineSyncStatus}/InlineSyncStatus.d.ts +0 -0
- /package/dist/types/src/{components → containers}/JoinDialog/JoinDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers}/MembersContainer/MembersContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/MenuFooter}/MenuFooter.d.ts +0 -0
- /package/dist/types/src/{components → containers}/ObjectCardStack/index.d.ts +0 -0
- /package/dist/types/src/{components → containers}/ObjectRenamePopover/ObjectRenamePopover.d.ts +0 -0
- /package/dist/types/src/{components → containers/SchemaContainer}/SchemaContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers}/SpaceRenamePopover/SpaceRenamePopover.d.ts +0 -0
- /package/dist/types/src/{components → containers}/SyncStatus/SyncStatus.d.ts +0 -0
- /package/src/{components → containers}/ObjectCardStack/index.ts +0 -0
|
@@ -1,261 +1,1109 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
AwaitingObject,
|
|
7
|
-
CREATE_OBJECT_DIALOG,
|
|
8
|
-
CREATE_SPACE_DIALOG,
|
|
9
|
-
CollectionArticle,
|
|
10
|
-
CollectionSection,
|
|
11
|
-
CreateObjectDialog,
|
|
12
|
-
CreateSpaceDialog,
|
|
13
|
-
FullPresence,
|
|
14
|
-
InlineSyncStatus,
|
|
15
|
-
JOIN_DIALOG,
|
|
16
|
-
JoinDialog,
|
|
17
|
-
MembersContainer,
|
|
18
|
-
MenuFooter,
|
|
19
|
-
OBJECT_RENAME_POPOVER,
|
|
20
|
-
ObjectCardStack,
|
|
21
|
-
ObjectDetails,
|
|
22
|
-
ObjectRenamePopover,
|
|
23
|
-
RecordArticle,
|
|
24
|
-
SPACE_RENAME_POPOVER,
|
|
25
|
-
SchemaContainer,
|
|
26
|
-
SmallPresence,
|
|
27
|
-
SmallPresenceLive,
|
|
28
|
-
SpacePluginSettings,
|
|
29
|
-
SpacePresence,
|
|
30
|
-
SpaceRenamePopover,
|
|
31
|
-
SpaceSettingsContainer,
|
|
32
|
-
SyncStatus,
|
|
33
|
-
SyncStatusIndicator,
|
|
34
|
-
ViewEditor,
|
|
35
|
-
evalQuery,
|
|
36
|
-
getQueryTarget,
|
|
37
|
-
resolveSchemaWithRegistry,
|
|
38
|
-
useQuerySpaceSchemas
|
|
39
|
-
} from "./chunk-FYSBFBSD.mjs";
|
|
40
|
-
import {
|
|
41
|
-
IdentityCreated,
|
|
42
|
-
OperationResolver
|
|
43
|
-
} from "./chunk-HREWB23G.mjs";
|
|
44
|
-
import {
|
|
45
|
-
getActiveSpace,
|
|
46
|
-
useActiveSpace,
|
|
47
|
-
useInputSurfaceLookup,
|
|
48
|
-
usePath,
|
|
49
|
-
useTypeOptions
|
|
50
|
-
} from "./chunk-JOBIWCBC.mjs";
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-64AL4GHY.mjs";
|
|
51
5
|
import {
|
|
52
|
-
COMPOSER_SPACE_LOCK,
|
|
53
|
-
SHARED,
|
|
54
6
|
SPACES,
|
|
55
7
|
cloneObject,
|
|
56
|
-
constructObjectActions,
|
|
57
|
-
constructSpaceActions,
|
|
58
|
-
constructSpaceNode,
|
|
59
|
-
createObjectNode,
|
|
60
|
-
createStaticSchemaActions,
|
|
61
|
-
createStaticSchemaNode,
|
|
62
8
|
getNestedObjects,
|
|
63
9
|
getSpaceDisplayName
|
|
64
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IHOQPYNT.mjs";
|
|
65
11
|
import {
|
|
12
|
+
SHARED,
|
|
66
13
|
SpaceCapabilities,
|
|
67
|
-
SpaceEvents
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
import {
|
|
71
|
-
meta
|
|
72
|
-
} from "./chunk-SL4BJSUG.mjs";
|
|
14
|
+
SpaceEvents
|
|
15
|
+
} from "./chunk-EQMZ4GGS.mjs";
|
|
16
|
+
import "./chunk-HSLMI22Q.mjs";
|
|
73
17
|
|
|
74
|
-
// src/
|
|
75
|
-
import
|
|
76
|
-
import * as Schema from "effect/Schema";
|
|
77
|
-
import { ActivationEvent, Capability as Capability9, Common, Plugin } from "@dxos/app-framework";
|
|
78
|
-
import { Ref, Tag, Type } from "@dxos/echo";
|
|
79
|
-
import { Operation } from "@dxos/operation";
|
|
80
|
-
import { AttentionEvents } from "@dxos/plugin-attention";
|
|
81
|
-
import { ClientEvents } from "@dxos/plugin-client/types";
|
|
82
|
-
import { translations as componentsTranslations } from "@dxos/react-ui-components";
|
|
83
|
-
import { translations as formTranslations } from "@dxos/react-ui-form";
|
|
84
|
-
import { Collection, DataTypes, createDefaultSchema } from "@dxos/schema";
|
|
85
|
-
import { translations as shellTranslations } from "@dxos/shell/react";
|
|
86
|
-
import { AnchoredTo, Employer, Event, HasConnection, HasRelationship, HasSubject, Organization, Person, Project, Task } from "@dxos/types";
|
|
18
|
+
// src/components/index.ts
|
|
19
|
+
import { lazy } from "react";
|
|
87
20
|
|
|
88
|
-
// src/
|
|
89
|
-
import {
|
|
90
|
-
|
|
21
|
+
// src/components/AwaitingObject/AwaitingObject.tsx
|
|
22
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
23
|
+
import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
24
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
25
|
+
import { useLayout } from "@dxos/app-toolkit/ui";
|
|
26
|
+
import { Obj } from "@dxos/echo";
|
|
27
|
+
import { useClient } from "@dxos/react-client";
|
|
28
|
+
import { Filter, useQuery } from "@dxos/react-client/echo";
|
|
29
|
+
import { Button, Icon, Toast, useTranslation } from "@dxos/react-ui";
|
|
30
|
+
import { osTranslations } from "@dxos/ui-theme";
|
|
31
|
+
import { meta as meta2 } from "#meta";
|
|
32
|
+
import { SpaceOperation } from "#operations";
|
|
33
|
+
var WAIT_FOR_OBJECT_TIMEOUT = 3 * 60 * 1e3;
|
|
34
|
+
var TOAST_TIMEOUT = 4 * 60 * 1e3;
|
|
35
|
+
var AwaitingObject = ({ id }) => {
|
|
36
|
+
const { t } = useTranslation(meta2.id);
|
|
37
|
+
const { invokePromise } = useOperationInvoker();
|
|
38
|
+
const [open, setOpen] = useState(true);
|
|
39
|
+
const [waiting, setWaiting] = useState(true);
|
|
40
|
+
const [found, setFound] = useState(false);
|
|
41
|
+
const layout = useLayout();
|
|
42
|
+
const client = useClient();
|
|
43
|
+
const objects = useQuery(client.spaces, Filter.everything());
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (!id) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const timeout = setTimeout(() => setWaiting(false), WAIT_FOR_OBJECT_TIMEOUT);
|
|
49
|
+
return () => clearTimeout(timeout);
|
|
50
|
+
}, [
|
|
51
|
+
id
|
|
52
|
+
]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (objects.findIndex((object) => Obj.getDXN(object).toString() === id) > -1) {
|
|
55
|
+
setFound(true);
|
|
56
|
+
if (layout.active.includes(id)) {
|
|
57
|
+
setOpen(false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, [
|
|
61
|
+
id,
|
|
62
|
+
objects,
|
|
63
|
+
layout
|
|
64
|
+
]);
|
|
65
|
+
const handleClose = useCallback(async () => invokePromise(SpaceOperation.WaitForObject, {
|
|
66
|
+
id: void 0
|
|
67
|
+
}), [
|
|
68
|
+
invokePromise
|
|
69
|
+
]);
|
|
70
|
+
const handleNavigate = useCallback(() => {
|
|
71
|
+
void invokePromise(LayoutOperation.Open, {
|
|
72
|
+
subject: [
|
|
73
|
+
id
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
void handleClose();
|
|
77
|
+
}, [
|
|
78
|
+
id,
|
|
79
|
+
handleClose,
|
|
80
|
+
invokePromise
|
|
81
|
+
]);
|
|
82
|
+
return /* @__PURE__ */ React.createElement(Toast.Root, {
|
|
83
|
+
open,
|
|
84
|
+
duration: TOAST_TIMEOUT,
|
|
85
|
+
onOpenChange: setOpen
|
|
86
|
+
}, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
|
|
87
|
+
classNames: "flex items-center gap-2"
|
|
88
|
+
}, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
89
|
+
icon: "ph--check-circle--regular"
|
|
90
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("found-object.label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
91
|
+
icon: "ph--circle-notch--regular",
|
|
92
|
+
classNames: "animate-spin"
|
|
93
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("waiting-for-object.label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
94
|
+
icon: "ph--circle-dashed--regular"
|
|
95
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("object-not-found.label")))), /* @__PURE__ */ React.createElement(Toast.Description, null, t(found ? "found-object.description" : waiting ? "waiting-for-object.description" : "object-not-found.description"))), /* @__PURE__ */ React.createElement(Toast.Actions, null, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Toast.Action, {
|
|
96
|
+
altText: t("go-to-object.alt"),
|
|
97
|
+
asChild: true
|
|
98
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
99
|
+
variant: "primary",
|
|
100
|
+
onClick: handleNavigate
|
|
101
|
+
}, t("go-to-object.label"))), /* @__PURE__ */ React.createElement(Toast.Close, {
|
|
102
|
+
asChild: true
|
|
103
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
104
|
+
onClick: handleClose
|
|
105
|
+
}, t("close.label", {
|
|
106
|
+
ns: osTranslations
|
|
107
|
+
})))) : /* @__PURE__ */ React.createElement(Toast.Close, {
|
|
108
|
+
asChild: true
|
|
109
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
110
|
+
onClick: handleClose
|
|
111
|
+
}, t(waiting ? "close.label" : "confirm.label", {
|
|
112
|
+
ns: osTranslations
|
|
113
|
+
})))));
|
|
114
|
+
};
|
|
91
115
|
|
|
92
|
-
// src/
|
|
93
|
-
import {
|
|
94
|
-
|
|
116
|
+
// src/components/CreateDialog/CreateObjectPanel.tsx
|
|
117
|
+
import React2, { useCallback as useCallback2, useMemo } from "react";
|
|
118
|
+
import { Obj as Obj2 } from "@dxos/echo";
|
|
119
|
+
import { toLocalizedString, useDefaultValue, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
120
|
+
import { Form, omitId } from "@dxos/react-ui-form";
|
|
121
|
+
import { SearchList, useSearchListResults } from "@dxos/react-ui-search";
|
|
122
|
+
import { useInputSurfaceLookup } from "#hooks";
|
|
123
|
+
import { meta as meta3 } from "#meta";
|
|
124
|
+
var CreateObjectPanel = ({ options, spaces, typename, target, initialFormValues: initialFormValuesProp, defaultSpaceId, resolve, onTargetChange, onTypenameChange, onCreateObject }) => {
|
|
125
|
+
const initialFormValues = useDefaultValue(initialFormValuesProp, () => ({}));
|
|
126
|
+
const metadata = typename && resolve?.(typename);
|
|
127
|
+
const sortedOptions = useMemo(() => [
|
|
128
|
+
...options
|
|
129
|
+
].sort((a, b) => a.label.localeCompare(b.label)), [
|
|
130
|
+
options
|
|
131
|
+
]);
|
|
132
|
+
const handleCreateObject = useCallback2(async (props) => {
|
|
133
|
+
if (!metadata) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
await onCreateObject?.({
|
|
137
|
+
metadata,
|
|
138
|
+
data: props
|
|
139
|
+
});
|
|
140
|
+
}, [
|
|
141
|
+
onCreateObject,
|
|
142
|
+
metadata
|
|
143
|
+
]);
|
|
144
|
+
const handleSelectOption = useCallback2(async (id) => {
|
|
145
|
+
const metadata2 = resolve?.(id);
|
|
146
|
+
if (metadata2 && !metadata2.inputSchema) {
|
|
147
|
+
await onCreateObject?.({
|
|
148
|
+
metadata: metadata2
|
|
149
|
+
});
|
|
150
|
+
} else {
|
|
151
|
+
onTypenameChange?.(id);
|
|
152
|
+
}
|
|
153
|
+
}, [
|
|
154
|
+
resolve,
|
|
155
|
+
onCreateObject
|
|
156
|
+
]);
|
|
157
|
+
const inputSchema = useMemo(() => metadata && typeof metadata === "object" && metadata.inputSchema ? omitId(metadata.inputSchema) : void 0, [
|
|
158
|
+
metadata
|
|
159
|
+
]);
|
|
160
|
+
const inputSurfaceLookup = useInputSurfaceLookup({
|
|
161
|
+
target
|
|
162
|
+
});
|
|
163
|
+
if (!metadata) {
|
|
164
|
+
return /* @__PURE__ */ React2.createElement(SelectType, {
|
|
165
|
+
options: sortedOptions,
|
|
166
|
+
onChange: handleSelectOption
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
if (!target) {
|
|
170
|
+
return /* @__PURE__ */ React2.createElement(SelectSpace, {
|
|
171
|
+
spaces,
|
|
172
|
+
defaultSpaceId,
|
|
173
|
+
onChange: onTargetChange
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (metadata.inputSchema) {
|
|
177
|
+
return /* @__PURE__ */ React2.createElement(Form.Root, {
|
|
178
|
+
autoFocus: true,
|
|
179
|
+
schema: inputSchema,
|
|
180
|
+
defaultValues: initialFormValues,
|
|
181
|
+
fieldProvider: inputSurfaceLookup,
|
|
182
|
+
db: Obj2.isObject(target) ? Obj2.getDatabase(target) : target,
|
|
183
|
+
onSave: handleCreateObject,
|
|
184
|
+
testId: "create-object-form"
|
|
185
|
+
}, /* @__PURE__ */ React2.createElement(Form.Viewport, null, /* @__PURE__ */ React2.createElement(Form.Content, null, /* @__PURE__ */ React2.createElement(Form.FieldSet, null), /* @__PURE__ */ React2.createElement(Form.Submit, null))));
|
|
186
|
+
}
|
|
187
|
+
return null;
|
|
188
|
+
};
|
|
189
|
+
CreateObjectPanel.displayName = "CreateObjectPanel";
|
|
190
|
+
var SelectType = ({ options, onChange }) => {
|
|
191
|
+
const { t } = useTranslation2(meta3.id);
|
|
192
|
+
const { results, handleSearch } = useSearchListResults({
|
|
193
|
+
items: options,
|
|
194
|
+
extract: (option) => option.label
|
|
195
|
+
});
|
|
196
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
197
|
+
onSearch: handleSearch
|
|
198
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Content, {
|
|
199
|
+
classNames: "gap-form-gap"
|
|
200
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
201
|
+
autoFocus: true,
|
|
202
|
+
"data-testid": "create-object-form.schema-input",
|
|
203
|
+
placeholder: t("schema-input.placeholder")
|
|
204
|
+
}), /* @__PURE__ */ React2.createElement(SearchList.Viewport, null, results.map((option) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
205
|
+
key: option.id,
|
|
206
|
+
value: option.id,
|
|
207
|
+
label: option.label,
|
|
208
|
+
icon: option.icon ?? "ph--placeholder--regular",
|
|
209
|
+
onSelect: () => onChange(option.id)
|
|
210
|
+
})))));
|
|
211
|
+
};
|
|
212
|
+
var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
213
|
+
const { t } = useTranslation2(meta3.id);
|
|
214
|
+
const sortedSpaces = useMemo(() => [
|
|
215
|
+
...spaces
|
|
216
|
+
].sort((a, b) => {
|
|
217
|
+
const labelA = toLocalizedString(getSpaceDisplayName(a, {
|
|
218
|
+
personal: a.id === defaultSpaceId
|
|
219
|
+
}), t);
|
|
220
|
+
const labelB = toLocalizedString(getSpaceDisplayName(b, {
|
|
221
|
+
personal: b.id === defaultSpaceId
|
|
222
|
+
}), t);
|
|
223
|
+
return labelA.localeCompare(labelB);
|
|
224
|
+
}), [
|
|
225
|
+
spaces,
|
|
226
|
+
defaultSpaceId,
|
|
227
|
+
t
|
|
228
|
+
]);
|
|
229
|
+
const { results, handleSearch } = useSearchListResults({
|
|
230
|
+
items: sortedSpaces,
|
|
231
|
+
extract: (space) => toLocalizedString(getSpaceDisplayName(space, {
|
|
232
|
+
personal: space.id === defaultSpaceId
|
|
233
|
+
}), t)
|
|
234
|
+
});
|
|
235
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
236
|
+
onSearch: handleSearch
|
|
237
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Content, null, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
238
|
+
autoFocus: true,
|
|
239
|
+
"data-testid": "create-object-form.space-input",
|
|
240
|
+
placeholder: t("space-input.placeholder")
|
|
241
|
+
}), /* @__PURE__ */ React2.createElement(SearchList.Viewport, null, results.map((space) => {
|
|
242
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
243
|
+
key: space.id,
|
|
244
|
+
value: space.id,
|
|
245
|
+
label: toLocalizedString(getSpaceDisplayName(space, {
|
|
246
|
+
personal: space.id === defaultSpaceId
|
|
247
|
+
}), t),
|
|
248
|
+
onSelect: () => onChange?.(space.db)
|
|
249
|
+
});
|
|
250
|
+
}))));
|
|
251
|
+
};
|
|
95
252
|
|
|
96
|
-
// src/
|
|
97
|
-
import
|
|
98
|
-
|
|
253
|
+
// src/components/ObjectDetails/BaseObjectSettings.tsx
|
|
254
|
+
import * as Function from "effect/Function";
|
|
255
|
+
import * as Option from "effect/Option";
|
|
256
|
+
import * as Schema from "effect/Schema";
|
|
257
|
+
import React3, { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
258
|
+
import { DXN, Obj as Obj3, Ref, Tag, Type } from "@dxos/echo";
|
|
259
|
+
import { splitJsonPath } from "@dxos/echo/internal";
|
|
260
|
+
import { invariant } from "@dxos/invariant";
|
|
261
|
+
import { Form as Form2, omitId as omitId2 } from "@dxos/react-ui-form";
|
|
262
|
+
import { HuePicker } from "@dxos/react-ui-pickers";
|
|
263
|
+
import { composable, composableProps } from "@dxos/ui-theme";
|
|
264
|
+
import { isNonNullable } from "@dxos/util";
|
|
265
|
+
import { meta as pluginMeta } from "#meta";
|
|
266
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ObjectDetails/BaseObjectSettings.tsx";
|
|
267
|
+
var createFieldMap = {
|
|
268
|
+
hue: ({ type, label, layout, getValue, onValueChange }) => {
|
|
269
|
+
const handleChange = useCallback3((nextHue) => onValueChange(type, nextHue), [
|
|
270
|
+
onValueChange,
|
|
271
|
+
type
|
|
272
|
+
]);
|
|
273
|
+
const handleReset = useCallback3(() => onValueChange(type, void 0), [
|
|
274
|
+
onValueChange,
|
|
275
|
+
type
|
|
276
|
+
]);
|
|
277
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, layout !== "inline" && /* @__PURE__ */ React3.createElement(Form2.Label, {
|
|
278
|
+
label
|
|
279
|
+
}), /* @__PURE__ */ React3.createElement(HuePicker, {
|
|
280
|
+
value: getValue(),
|
|
281
|
+
onChange: handleChange,
|
|
282
|
+
onReset: handleReset
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
var BaseSchema = Schema.Struct({
|
|
287
|
+
tags: Schema.Array(Ref.Ref(Tag.Tag)).pipe(Schema.optional)
|
|
288
|
+
});
|
|
289
|
+
var BaseObjectSettings = composable(({ children, object, ...props }, forwardedRef) => {
|
|
290
|
+
const db = Obj3.getDatabase(object);
|
|
291
|
+
const formSchema = useMemo2(() => {
|
|
292
|
+
return Function.pipe(Obj3.getSchema(object), Option.fromNullable, Option.map((schema) => omitId2(BaseSchema.pipe(Schema.extend(schema)))), Option.getOrUndefined);
|
|
293
|
+
}, [
|
|
294
|
+
object
|
|
295
|
+
]);
|
|
296
|
+
const meta7 = Obj3.getMeta(object);
|
|
297
|
+
const tags = (meta7.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
298
|
+
const values = useMemo2(() => ({
|
|
299
|
+
tags,
|
|
300
|
+
...object
|
|
301
|
+
}), [
|
|
302
|
+
object,
|
|
303
|
+
tags
|
|
304
|
+
]);
|
|
305
|
+
const handleCreate = useCallback3((schema, values2) => {
|
|
306
|
+
invariant(db, void 0, {
|
|
307
|
+
F: __dxlog_file,
|
|
308
|
+
L: 67,
|
|
309
|
+
S: void 0,
|
|
310
|
+
A: [
|
|
311
|
+
"db",
|
|
312
|
+
""
|
|
313
|
+
]
|
|
314
|
+
});
|
|
315
|
+
invariant(Type.isObjectSchema(schema), void 0, {
|
|
316
|
+
F: __dxlog_file,
|
|
317
|
+
L: 68,
|
|
318
|
+
S: void 0,
|
|
319
|
+
A: [
|
|
320
|
+
"Type.isObjectSchema(schema)",
|
|
321
|
+
""
|
|
322
|
+
]
|
|
323
|
+
});
|
|
324
|
+
const newObject = db.add(Obj3.make(schema, values2));
|
|
325
|
+
if (Obj3.instanceOf(Tag.Tag, newObject)) {
|
|
326
|
+
Obj3.change(object, (obj) => {
|
|
327
|
+
Obj3.getMeta(obj).tags = [
|
|
328
|
+
...Obj3.getMeta(obj).tags ?? [],
|
|
329
|
+
Obj3.getDXN(newObject).toString()
|
|
330
|
+
];
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}, []);
|
|
334
|
+
const handleChange = useCallback3(({ tags: tags2, ...values2 }, { isValid, changed }) => {
|
|
335
|
+
if (!isValid) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path]);
|
|
339
|
+
const hasTagsChange = changedPaths.some((path) => splitJsonPath(path)[0] === "tags");
|
|
340
|
+
if (hasTagsChange) {
|
|
341
|
+
Obj3.change(object, (obj) => {
|
|
342
|
+
Obj3.getMeta(obj).tags = tags2?.map((tag) => tag.dxn.toString()) ?? [];
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
const nonTagPaths = changedPaths.filter((path) => splitJsonPath(path)[0] !== "tags");
|
|
346
|
+
if (nonTagPaths.length > 0) {
|
|
347
|
+
Obj3.change(object, () => {
|
|
348
|
+
for (const path of nonTagPaths) {
|
|
349
|
+
const parts = splitJsonPath(path);
|
|
350
|
+
const value = Obj3.getValue(values2, parts);
|
|
351
|
+
Obj3.setValue(object, parts, value);
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}, [
|
|
356
|
+
object
|
|
357
|
+
]);
|
|
358
|
+
if (!formSchema) {
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
361
|
+
const { className } = composableProps(props);
|
|
362
|
+
return /* @__PURE__ */ React3.createElement(Form2.Root, {
|
|
363
|
+
schema: formSchema,
|
|
364
|
+
defaultValues: values,
|
|
365
|
+
createTypename: Type.getTypename(Tag.Tag),
|
|
366
|
+
createOptionIcon: "ph--plus--regular",
|
|
367
|
+
createOptionLabel: [
|
|
368
|
+
"add-tag.label",
|
|
369
|
+
{
|
|
370
|
+
ns: pluginMeta.id
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
createInitialValuePath: "label",
|
|
374
|
+
createFieldMap,
|
|
375
|
+
db,
|
|
376
|
+
onValuesChanged: handleChange,
|
|
377
|
+
onCreate: handleCreate
|
|
378
|
+
}, /* @__PURE__ */ React3.createElement(Form2.Viewport, null, /* @__PURE__ */ React3.createElement(Form2.Content, {
|
|
379
|
+
classNames: className
|
|
380
|
+
}, /* @__PURE__ */ React3.createElement(Form2.FieldSet, null), children)));
|
|
381
|
+
});
|
|
99
382
|
|
|
100
|
-
// src/
|
|
101
|
-
import {
|
|
102
|
-
|
|
383
|
+
// src/components/ObjectDetails/ForeignKeys.tsx
|
|
384
|
+
import React4, { useCallback as useCallback4 } from "react";
|
|
385
|
+
import { IconButton, List, ListItem, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
386
|
+
import { meta as meta4 } from "#meta";
|
|
387
|
+
var ForeignKeys = ({ keys, onDelete }) => {
|
|
388
|
+
return /* @__PURE__ */ React4.createElement(List, {
|
|
389
|
+
classNames: "flex flex-col gap-2"
|
|
390
|
+
}, keys.map((key) => /* @__PURE__ */ React4.createElement(KeyItem, {
|
|
391
|
+
key: key.id,
|
|
392
|
+
forignKey: key,
|
|
393
|
+
onDelete
|
|
394
|
+
})));
|
|
395
|
+
};
|
|
396
|
+
var KeyItem = ({ forignKey, onDelete }) => {
|
|
397
|
+
const { t } = useTranslation3(meta4.id);
|
|
398
|
+
const handleDelete = useCallback4(() => {
|
|
399
|
+
onDelete?.(forignKey);
|
|
400
|
+
}, [
|
|
401
|
+
forignKey,
|
|
402
|
+
onDelete
|
|
403
|
+
]);
|
|
404
|
+
return /* @__PURE__ */ React4.createElement(ListItem.Root, {
|
|
405
|
+
classNames: "px-2"
|
|
406
|
+
}, /* @__PURE__ */ React4.createElement(ListItem.Heading, {
|
|
407
|
+
classNames: "flex flex-col grow truncate"
|
|
408
|
+
}, /* @__PURE__ */ React4.createElement("div", null, forignKey.source), /* @__PURE__ */ React4.createElement("div", {
|
|
409
|
+
className: "text-description text-sm truncate"
|
|
410
|
+
}, forignKey.id)), /* @__PURE__ */ React4.createElement(ListItem.Endcap, null, /* @__PURE__ */ React4.createElement(IconButton, {
|
|
411
|
+
iconOnly: true,
|
|
412
|
+
icon: "ph--x--regular",
|
|
413
|
+
variant: "ghost",
|
|
414
|
+
label: t("delete-key.button"),
|
|
415
|
+
onClick: handleDelete
|
|
416
|
+
})));
|
|
417
|
+
};
|
|
103
418
|
|
|
104
|
-
// src/
|
|
105
|
-
import
|
|
106
|
-
|
|
419
|
+
// src/components/ObjectForm/ObjectForm.tsx
|
|
420
|
+
import * as Schema2 from "effect/Schema";
|
|
421
|
+
import React5, { useCallback as useCallback5, useMemo as useMemo3 } from "react";
|
|
422
|
+
import { DXN as DXN2, Obj as Obj4, Ref as Ref2, Tag as Tag2, Type as Type2 } from "@dxos/echo";
|
|
423
|
+
import { splitJsonPath as splitJsonPath2 } from "@dxos/echo/internal";
|
|
424
|
+
import { invariant as invariant2 } from "@dxos/invariant";
|
|
425
|
+
import { Form as Form3, omitId as omitId3 } from "@dxos/react-ui-form";
|
|
426
|
+
import { HuePicker as HuePicker2 } from "@dxos/react-ui-pickers";
|
|
427
|
+
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
428
|
+
import { meta as pluginMeta2 } from "#meta";
|
|
429
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ObjectForm/ObjectForm.tsx";
|
|
430
|
+
var createFieldMap2 = {
|
|
431
|
+
hue: ({ type, label, layout, getValue, onValueChange }) => {
|
|
432
|
+
const handleChange = useCallback5((nextHue) => onValueChange(type, nextHue), [
|
|
433
|
+
onValueChange,
|
|
434
|
+
type
|
|
435
|
+
]);
|
|
436
|
+
const handleReset = useCallback5(() => onValueChange(type, void 0), [
|
|
437
|
+
onValueChange,
|
|
438
|
+
type
|
|
439
|
+
]);
|
|
440
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, layout !== "inline" && /* @__PURE__ */ React5.createElement(Form3.Label, {
|
|
441
|
+
label
|
|
442
|
+
}), /* @__PURE__ */ React5.createElement(HuePicker2, {
|
|
443
|
+
value: getValue(),
|
|
444
|
+
onChange: handleChange,
|
|
445
|
+
onReset: handleReset
|
|
446
|
+
}));
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
var ObjectForm = ({ object, schema }) => {
|
|
450
|
+
const db = Obj4.getDatabase(object);
|
|
451
|
+
const formSchema = useMemo3(() => omitId3(Schema2.Struct({
|
|
452
|
+
tags: Schema2.Array(Ref2.Ref(Tag2.Tag)).pipe(Schema2.optional)
|
|
453
|
+
}).pipe(Schema2.extend(schema))), [
|
|
454
|
+
schema
|
|
455
|
+
]);
|
|
456
|
+
const meta7 = Obj4.getMeta(object);
|
|
457
|
+
const tags = (meta7.tags ?? []).map((tag) => db?.makeRef(DXN2.parse(tag))).filter(isNonNullable2);
|
|
458
|
+
const values = useMemo3(() => ({
|
|
459
|
+
tags,
|
|
460
|
+
...object
|
|
461
|
+
}), [
|
|
462
|
+
object,
|
|
463
|
+
tags
|
|
464
|
+
]);
|
|
465
|
+
const handleCreate = useCallback5((schema2, values2) => {
|
|
466
|
+
invariant2(db, void 0, {
|
|
467
|
+
F: __dxlog_file2,
|
|
468
|
+
L: 53,
|
|
469
|
+
S: void 0,
|
|
470
|
+
A: [
|
|
471
|
+
"db",
|
|
472
|
+
""
|
|
473
|
+
]
|
|
474
|
+
});
|
|
475
|
+
invariant2(Type2.isObjectSchema(schema2), void 0, {
|
|
476
|
+
F: __dxlog_file2,
|
|
477
|
+
L: 54,
|
|
478
|
+
S: void 0,
|
|
479
|
+
A: [
|
|
480
|
+
"Type.isObjectSchema(schema)",
|
|
481
|
+
""
|
|
482
|
+
]
|
|
483
|
+
});
|
|
484
|
+
const newObject = db.add(Obj4.make(schema2, values2));
|
|
485
|
+
if (Obj4.instanceOf(Tag2.Tag, newObject)) {
|
|
486
|
+
Obj4.change(object, (obj) => {
|
|
487
|
+
Obj4.getMeta(obj).tags = [
|
|
488
|
+
...Obj4.getMeta(obj).tags ?? [],
|
|
489
|
+
Obj4.getDXN(newObject).toString()
|
|
490
|
+
];
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}, []);
|
|
494
|
+
const handleChange = useCallback5(({ tags: tags2, ...values2 }, { isValid, changed }) => {
|
|
495
|
+
if (!isValid) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path]);
|
|
499
|
+
const hasTagsChange = changedPaths.some((path) => splitJsonPath2(path)[0] === "tags");
|
|
500
|
+
if (hasTagsChange) {
|
|
501
|
+
Obj4.change(object, (obj) => {
|
|
502
|
+
Obj4.getMeta(obj).tags = tags2?.map((tag) => tag.dxn.toString()) ?? [];
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
const nonTagPaths = changedPaths.filter((path) => splitJsonPath2(path)[0] !== "tags");
|
|
506
|
+
if (nonTagPaths.length > 0) {
|
|
507
|
+
Obj4.change(object, () => {
|
|
508
|
+
for (const path of nonTagPaths) {
|
|
509
|
+
const parts = splitJsonPath2(path);
|
|
510
|
+
const value = Obj4.getValue(values2, parts);
|
|
511
|
+
Obj4.setValue(object, parts, value);
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
}, [
|
|
516
|
+
object
|
|
517
|
+
]);
|
|
518
|
+
return /* @__PURE__ */ React5.createElement(Form3.Root, {
|
|
519
|
+
schema: formSchema,
|
|
520
|
+
defaultValues: values,
|
|
521
|
+
createTypename: Type2.getTypename(Tag2.Tag),
|
|
522
|
+
createOptionIcon: "ph--plus--regular",
|
|
523
|
+
createOptionLabel: [
|
|
524
|
+
"add-tag.label",
|
|
525
|
+
{
|
|
526
|
+
ns: pluginMeta2.id
|
|
527
|
+
}
|
|
528
|
+
],
|
|
529
|
+
createInitialValuePath: "label",
|
|
530
|
+
createFieldMap: createFieldMap2,
|
|
531
|
+
db,
|
|
532
|
+
onValuesChanged: handleChange,
|
|
533
|
+
onCreate: handleCreate
|
|
534
|
+
}, /* @__PURE__ */ React5.createElement(Form3.Viewport, null, /* @__PURE__ */ React5.createElement(Form3.Content, null, /* @__PURE__ */ React5.createElement(Form3.FieldSet, null))));
|
|
535
|
+
};
|
|
107
536
|
|
|
108
|
-
// src/
|
|
109
|
-
import {
|
|
110
|
-
var
|
|
537
|
+
// src/components/SyncStatus/save-tracker.ts
|
|
538
|
+
import { Context } from "@dxos/context";
|
|
539
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
|
|
540
|
+
var createClientSaveTracker = (client, cb) => {
|
|
541
|
+
const CleanupFns = {};
|
|
542
|
+
const state = {};
|
|
543
|
+
const install = (spaces) => {
|
|
544
|
+
for (const space of spaces) {
|
|
545
|
+
if (state[space.id]) {
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
state[space.id] = "saved";
|
|
549
|
+
CleanupFns[space.id] = createSpaceSaveTracker(space, (s) => {
|
|
550
|
+
state[space.id] = s;
|
|
551
|
+
cb(Object.values(state).some((s2) => s2 === "saving") ? "saving" : "saved");
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
client.spaces.subscribe((spaces) => {
|
|
556
|
+
install(spaces);
|
|
557
|
+
});
|
|
558
|
+
install(client.spaces.get());
|
|
559
|
+
return () => {
|
|
560
|
+
for (const unsubscribe of Object.values(CleanupFns)) {
|
|
561
|
+
unsubscribe();
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
var createSpaceSaveTracker = (space, cb) => {
|
|
566
|
+
const ctx = new Context(void 0, {
|
|
567
|
+
F: __dxlog_file3,
|
|
568
|
+
L: 40
|
|
569
|
+
});
|
|
570
|
+
void space.waitUntilReady().then(() => {
|
|
571
|
+
if (ctx.disposed) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
let hasUnsavedChanges = false;
|
|
575
|
+
let lastFlushPromise;
|
|
576
|
+
space.internal.db.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
|
|
577
|
+
hasUnsavedChanges = unsavedDocuments.length > 0;
|
|
578
|
+
});
|
|
579
|
+
space.internal.db.saveStateChanged.debounce(500).on(ctx, () => {
|
|
580
|
+
if (hasUnsavedChanges) {
|
|
581
|
+
lastFlushPromise = void 0;
|
|
582
|
+
cb("saving");
|
|
583
|
+
} else {
|
|
584
|
+
const flushPromise = space.db.flush();
|
|
585
|
+
lastFlushPromise = flushPromise;
|
|
586
|
+
void flushPromise.then(() => {
|
|
587
|
+
if (lastFlushPromise === flushPromise) {
|
|
588
|
+
cb("saved");
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
return () => {
|
|
595
|
+
void ctx.dispose();
|
|
596
|
+
};
|
|
597
|
+
};
|
|
111
598
|
|
|
112
|
-
// src/
|
|
113
|
-
|
|
114
|
-
|
|
599
|
+
// src/components/SyncStatus/status.ts
|
|
600
|
+
var getStatus = ({ offline, saved, needsToUpload, needsToDownload }) => {
|
|
601
|
+
if (!saved) {
|
|
602
|
+
return "saving-locally";
|
|
603
|
+
} else if (!offline && needsToDownload) {
|
|
604
|
+
return "downloading";
|
|
605
|
+
} else if (!offline && needsToUpload) {
|
|
606
|
+
return "uploading";
|
|
607
|
+
} else if (offline && !needsToUpload && !needsToDownload) {
|
|
608
|
+
return "offline-persisted";
|
|
609
|
+
} else {
|
|
610
|
+
return "remote-synced";
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
var getIcon = (status) => {
|
|
614
|
+
switch (status) {
|
|
615
|
+
case "saving-locally":
|
|
616
|
+
return "ph--download--regular";
|
|
617
|
+
case "downloading":
|
|
618
|
+
return "ph--cloud-arrow-down--regular";
|
|
619
|
+
case "uploading":
|
|
620
|
+
return "ph--cloud-arrow-up--regular";
|
|
621
|
+
case "offline-persisted":
|
|
622
|
+
return "ph--check-circle--regular";
|
|
623
|
+
case "remote-synced":
|
|
624
|
+
return "ph--cloud-check--regular";
|
|
625
|
+
}
|
|
626
|
+
};
|
|
115
627
|
|
|
116
|
-
// src/
|
|
117
|
-
|
|
118
|
-
var SpaceState = Capability8.lazy("SpaceState", () => import("./state-XE5YGPHM.mjs"));
|
|
628
|
+
// src/components/index.ts
|
|
629
|
+
var SpacePluginSettings = lazy(() => import("./SpacePluginSettings-KR2HJWEO.mjs"));
|
|
119
630
|
|
|
120
631
|
// src/SpacePlugin.ts
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
632
|
+
import * as Effect from "effect/Effect";
|
|
633
|
+
import * as Option2 from "effect/Option";
|
|
634
|
+
import * as Schema3 from "effect/Schema";
|
|
635
|
+
import { ActivationEvent, ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
|
|
636
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
637
|
+
import { Annotation, Ref as Ref3, Tag as Tag3, Type as Type4 } from "@dxos/echo";
|
|
638
|
+
import { Collection as Collection2 } from "@dxos/echo";
|
|
639
|
+
import { Operation } from "@dxos/operation";
|
|
640
|
+
import { AttentionEvents } from "@dxos/plugin-attention/types";
|
|
641
|
+
import { ClientEvents } from "@dxos/plugin-client/types";
|
|
642
|
+
import { translations as componentsTranslations } from "@dxos/react-ui-components";
|
|
643
|
+
import { translations as formTranslations } from "@dxos/react-ui-form";
|
|
644
|
+
import { DataTypes, createDefaultSchema } from "@dxos/schema";
|
|
645
|
+
import { translations as shellTranslations } from "@dxos/shell/react";
|
|
646
|
+
import { AnchoredTo, Employer, Event as Event2, HasConnection, HasRelationship, HasSubject, Organization as Organization2, Person as Person2, Pipeline as Pipeline2, Task as Task2 } from "@dxos/types";
|
|
647
|
+
import { meta as meta6 } from "#meta";
|
|
648
|
+
|
|
649
|
+
// src/translations.ts
|
|
650
|
+
import { Type as Type3 } from "@dxos/echo";
|
|
651
|
+
import { Collection } from "@dxos/echo";
|
|
652
|
+
import { Event, Message, Organization, Person, Pipeline, Task } from "@dxos/types";
|
|
653
|
+
import { meta as meta5 } from "#meta";
|
|
654
|
+
var translations = [
|
|
655
|
+
{
|
|
656
|
+
"en-US": {
|
|
657
|
+
[Collection.Collection.typename]: {
|
|
658
|
+
"typename.label": "Collection",
|
|
659
|
+
"typename.label_zero": "Collections",
|
|
660
|
+
"typename.label_one": "Collection",
|
|
661
|
+
"typename.label_other": "Collections",
|
|
662
|
+
"object-name.placeholder": "New collection",
|
|
663
|
+
"add-object.label": "Add collection",
|
|
664
|
+
"rename-object.label": "Rename collection",
|
|
665
|
+
"delete-object.label": "Delete collection",
|
|
666
|
+
"object-deleted.label": "Collection deleted"
|
|
667
|
+
},
|
|
668
|
+
[Type3.getTypename(Type3.PersistentType)]: {
|
|
669
|
+
"typename.label": "Type",
|
|
670
|
+
"typename.label_zero": "Types",
|
|
671
|
+
"typename.label_one": "Type",
|
|
672
|
+
"typename.label_other": "Types",
|
|
673
|
+
"object-name.placeholder": "New type",
|
|
674
|
+
"add-object.label": "Add type",
|
|
675
|
+
"rename-object.label": "Rename type",
|
|
676
|
+
"delete-object.label": "Delete type",
|
|
677
|
+
"object-deleted.label": "Type deleted"
|
|
678
|
+
},
|
|
679
|
+
[Event.Event.typename]: {
|
|
680
|
+
"typename.label": "Event",
|
|
681
|
+
"typename.label_zero": "Events",
|
|
682
|
+
"typename.label_one": "Event",
|
|
683
|
+
"typename.label_other": "Events",
|
|
684
|
+
"object-name.placeholder": "New event",
|
|
685
|
+
"add-object.label": "Add event",
|
|
686
|
+
"rename-object.label": "Rename event",
|
|
687
|
+
"delete-object.label": "Delete event",
|
|
688
|
+
"object-deleted.label": "Event deleted"
|
|
689
|
+
},
|
|
690
|
+
[Message.Message.typename]: {
|
|
691
|
+
"typename.label": "Message",
|
|
692
|
+
"typename.label_zero": "Messages",
|
|
693
|
+
"typename.label_one": "Message",
|
|
694
|
+
"typename.label_other": "Messages",
|
|
695
|
+
"object-name.placeholder": "New message",
|
|
696
|
+
"add-object.label": "Add message",
|
|
697
|
+
"rename-object.label": "Rename message",
|
|
698
|
+
"delete-object.label": "Delete message",
|
|
699
|
+
"object-deleted.label": "Message deleted"
|
|
700
|
+
},
|
|
701
|
+
[Organization.Organization.typename]: {
|
|
702
|
+
"typename.label": "Organization",
|
|
703
|
+
"typename.label_zero": "Organizations",
|
|
704
|
+
"typename.label_one": "Organization",
|
|
705
|
+
"typename.label_other": "Organizations",
|
|
706
|
+
"object-name.placeholder": "New organization",
|
|
707
|
+
"add-object.label": "Add organization",
|
|
708
|
+
"rename-object.label": "Rename organization",
|
|
709
|
+
"delete-object.label": "Delete organization",
|
|
710
|
+
"object-deleted.label": "Organization deleted"
|
|
711
|
+
},
|
|
712
|
+
[Person.Person.typename]: {
|
|
713
|
+
"typename.label": "Person",
|
|
714
|
+
"typename.label_zero": "People",
|
|
715
|
+
"typename.label_one": "Person",
|
|
716
|
+
"typename.label_other": "People",
|
|
717
|
+
"object-name.placeholder": "New person",
|
|
718
|
+
"add-object.label": "Add person",
|
|
719
|
+
"rename-object.label": "Rename person",
|
|
720
|
+
"delete-object.label": "Delete person",
|
|
721
|
+
"object-deleted.label": "Person deleted"
|
|
722
|
+
},
|
|
723
|
+
[Pipeline.Pipeline.typename]: {
|
|
724
|
+
"typename.label": "Project",
|
|
725
|
+
"typename.label_zero": "Projects",
|
|
726
|
+
"typename.label_one": "Project",
|
|
727
|
+
"typename.label_other": "Projects",
|
|
728
|
+
"object-name.placeholder": "New project",
|
|
729
|
+
"add-object.label": "Add project",
|
|
730
|
+
"rename-object.label": "Rename project",
|
|
731
|
+
"delete-object.label": "Delete project",
|
|
732
|
+
"object-deleted.label": "Project deleted"
|
|
733
|
+
},
|
|
734
|
+
[Task.Task.typename]: {
|
|
735
|
+
"typename.label": "Task",
|
|
736
|
+
"typename.label_zero": "Tasks",
|
|
737
|
+
"typename.label_one": "Task",
|
|
738
|
+
"typename.label_other": "Tasks",
|
|
739
|
+
"object-name.placeholder": "New task",
|
|
740
|
+
"add-object.label": "Add task",
|
|
741
|
+
"rename-object.label": "Rename task",
|
|
742
|
+
"delete-object.label": "Delete task",
|
|
743
|
+
"object-deleted.label": "Task deleted"
|
|
744
|
+
},
|
|
745
|
+
[meta5.id]: {
|
|
746
|
+
"plugin.name": "Spaces",
|
|
747
|
+
"first-run.message": "Nothing selected.",
|
|
748
|
+
"create-space.label": "Create space",
|
|
749
|
+
"join-space.label": "Join space",
|
|
750
|
+
"empty-space.message": "No documents",
|
|
751
|
+
"empty-tree.message": "No spaces",
|
|
752
|
+
"unnamed-space.label": "New space",
|
|
753
|
+
"closed-space.label": "Closed",
|
|
754
|
+
"loading-space.label": "Loading space\u2026",
|
|
755
|
+
"lock-space.label": "Lock space",
|
|
756
|
+
"unlock-space.label": "Unlock space",
|
|
757
|
+
"rename-space.label": "Rename space",
|
|
758
|
+
"active-space.label": "Active space:",
|
|
759
|
+
"space-name.label": "Space name",
|
|
760
|
+
"object-name.label": "Object name",
|
|
761
|
+
"close-space.label": "Close space",
|
|
762
|
+
"open-space.label": "Open space",
|
|
763
|
+
"export-data.label": "Export data",
|
|
764
|
+
"import-data.label": "Import data",
|
|
765
|
+
"migrate-space.label": "Migrate space",
|
|
766
|
+
"share-space.label": "Share current space",
|
|
767
|
+
"save-space-to-disk.label": "Save to disk",
|
|
768
|
+
"load-space-from-disk.label": "Load from disk",
|
|
769
|
+
"confirm-restore.title": "Overwrite files in this space?",
|
|
770
|
+
"upload-file.message": "Drag file here or click to browse",
|
|
771
|
+
"object-name.placeholder": "Object",
|
|
772
|
+
"object.placeholder": "Type a title here\u2026",
|
|
773
|
+
"personal-space.label": "Personal Space",
|
|
774
|
+
"spaces.label": "Spaces",
|
|
775
|
+
"space-settings.label": "Spaces",
|
|
776
|
+
"space-settings.description": "Each space has its own settings you can configure, where you can adjust its properties, membership, integrations, and other objects specific to that space.",
|
|
777
|
+
"show-hidden-spaces.label": "Show archived spaces",
|
|
778
|
+
"show-hidden-spaces.description": "Display archived spaces in the sidebar so they can be accessed or unarchived.",
|
|
779
|
+
"save-files-to-directory.label": "Save files to disk",
|
|
780
|
+
"select-path.label": "Select path",
|
|
781
|
+
"snapshot-by-schema.label": "Snapshot of objects",
|
|
782
|
+
"rename-collection.label": "Rename collection",
|
|
783
|
+
"rename-object.label": "Rename object",
|
|
784
|
+
"duplicate-object.label": "Duplicate object",
|
|
785
|
+
"object-deleted.label": "Object deleted",
|
|
786
|
+
"objects-deleted.label": "Objects deleted",
|
|
787
|
+
"go-to-object.alt": "Open",
|
|
788
|
+
"go-to-object.label": "Open object",
|
|
789
|
+
"found-object.label": "Ready.",
|
|
790
|
+
"found-object.description": "The requested object is now available.",
|
|
791
|
+
"waiting-for-object.label": "Loading\u2026",
|
|
792
|
+
"waiting-for-object.description": "The requested object is still being synchronized.",
|
|
793
|
+
"object-not-found.label": "Nothing found.",
|
|
794
|
+
"object-not-found.description": "The requested object has not been found yet. Ensure there are enough peers online in the space with an updated copy.",
|
|
795
|
+
"missing-object.message": "Object not available.",
|
|
796
|
+
"missing-object.description": "The requested object has not been found yet. Ensure there are enough peers online in the space with an updated copy.",
|
|
797
|
+
"create-object-in-space.label": "Add to space",
|
|
798
|
+
"create-object-in-collection.label": "Add to collection",
|
|
799
|
+
"remove-from-collection.label": "Remove from collection",
|
|
800
|
+
"create-object-in-system-collection.label": "Add to system collection",
|
|
801
|
+
"new-type.label": "New type",
|
|
802
|
+
"add-view-to-schema.label": "Add view for type",
|
|
803
|
+
"space-members.label": "Space members",
|
|
804
|
+
"active-space-members.heading": "Online ({{count}})",
|
|
805
|
+
"inactive-space-members.heading": "Offline ({{count}})",
|
|
806
|
+
"presence.label_zero": "No other viewers",
|
|
807
|
+
"presence.label_one": "1 other viewer",
|
|
808
|
+
"presence.label_other": "{{count}} other viewers",
|
|
809
|
+
"persisted-locally.label": "Changes saved locally.",
|
|
810
|
+
"persisted-locally.message": "All changes have been saved to disk on this device.",
|
|
811
|
+
"persistence-pending.label": "Saving\u2026",
|
|
812
|
+
"persistence-error.label": "Error saving changes.",
|
|
813
|
+
"more-actions.label": "More actions",
|
|
814
|
+
"invitations.heading": "Invitations",
|
|
815
|
+
"keyshortcuts.label": "Keyboard shortcuts",
|
|
816
|
+
"menu-footer.label": "Details",
|
|
817
|
+
"location.label": "Located in",
|
|
818
|
+
"space-limit.label": "Space Limit Reached",
|
|
819
|
+
"space-limit.description": "This space has reached the maximum number of objects for the beta. This limit includes deleted objects currently, but those can be permanently removed with the cleanup action.",
|
|
820
|
+
"space-limit-close.label": "Close",
|
|
821
|
+
"remove-deleted-objects.label": "Cleanup",
|
|
822
|
+
"remove-deleted-objects.alt": "Permanently remove deleted objects to free up space.",
|
|
823
|
+
"copy-link.label": "Copy link",
|
|
824
|
+
"default-on-space-create.label": "On space create",
|
|
825
|
+
"sync-status.title": "Sync status",
|
|
826
|
+
"dismiss.label": "Dismiss",
|
|
827
|
+
"join-success.label": "Successfully joined space",
|
|
828
|
+
"name.label": "Name",
|
|
829
|
+
"name.placeholder": "Name",
|
|
830
|
+
"object-settings.label": "Details",
|
|
831
|
+
"edge-replication.label": "Enable EDGE Replication",
|
|
832
|
+
"saving-locally.label": "Writing to disk",
|
|
833
|
+
"downloading.label": "Replicating from peers",
|
|
834
|
+
"uploading.label": "Replicating to peers",
|
|
835
|
+
"offline-persisted.label": "Saved to disk (offline)",
|
|
836
|
+
"remote-synced.label": "Synced with peers",
|
|
837
|
+
"syncing.label": "Space syncing",
|
|
838
|
+
"show-all.label": "Show all",
|
|
839
|
+
"no-sync-status.label": "No space with missing objects.",
|
|
840
|
+
"create-space-dialog.title": "Create Space",
|
|
841
|
+
"create-object-dialog.title": "Create {{object}}",
|
|
842
|
+
"space-input.placeholder": "Select space",
|
|
843
|
+
"schema-input.placeholder": "Select type",
|
|
844
|
+
"creating-object-type.label": "Type",
|
|
845
|
+
"creating-in-space.label": "Location",
|
|
846
|
+
"creating-in-collection.label": "In Collection",
|
|
847
|
+
"clear-input.label": "Clear",
|
|
848
|
+
"expose-object.label": "Expose in navtree",
|
|
849
|
+
"add-tag.label": "Add tag",
|
|
850
|
+
"advanced-settings.label": "Advanced",
|
|
851
|
+
"settings.space-list.label": "Spaces",
|
|
852
|
+
"settings.open-settings.label": "Open settings",
|
|
853
|
+
"related-actions.label": "Related Actions",
|
|
854
|
+
"related-objects.label": "Related Objects",
|
|
855
|
+
"open-space-settings.label": "Open settings",
|
|
856
|
+
"row-details-no-selection.label": "No objects selected",
|
|
857
|
+
"companion-selected-objects.label": "Selected",
|
|
858
|
+
"field-deleted.label": "Field deleted",
|
|
859
|
+
"members-panel.label": "Members",
|
|
860
|
+
"members-verbose.label": "Manage space members",
|
|
861
|
+
"members.description": "You can view the current status of space members here as well as invite new members.",
|
|
862
|
+
"members.label": "Members",
|
|
863
|
+
"invitations.label": "Invitations",
|
|
864
|
+
"space-invitation.description": "Manage invitations to the space.",
|
|
865
|
+
"qr-code.description": "Share this QR code, or copy the URL and share it with the person you want to invite.",
|
|
866
|
+
"locked-space.description": "This space is locked, unlock it to invite new members.",
|
|
867
|
+
"space-locked.label": "Lock space",
|
|
868
|
+
"space-locked.description": "Locking a space prevents new members from being invited to the space.",
|
|
869
|
+
"settings.panel.label": "Space Settings",
|
|
870
|
+
"open-current-space-settings.label": "Open current space settings",
|
|
871
|
+
"space-settings-properties.label": "General settings",
|
|
872
|
+
"space-properties-settings-verbose.label": "Manage space properties",
|
|
873
|
+
"space-properties-settings.description": "You can configure how this space is displayed in the app here.",
|
|
874
|
+
"space-settings-schema.label": "Types",
|
|
875
|
+
"schema-verbose.label": "Manage types",
|
|
876
|
+
"schema.description": "You can manage all of the types stored within this space here.",
|
|
877
|
+
"no-schemas-found.message": "No types found",
|
|
878
|
+
"display-name-input.placeholder": "Space name",
|
|
879
|
+
"display-name.description": "Name of the space as it appears in the app.",
|
|
880
|
+
"icon.description": "Icon used to represent the space in the app.",
|
|
881
|
+
"hue.description": "Color used to represent the space in the app.",
|
|
882
|
+
"edge-replication.description": "Only change this if you know what you're doing. Disabling this will prevent the space from replicating through Composer's EDGE services, and relies solely on peer-to-peer sync.",
|
|
883
|
+
"archive-space.description": "Archiving a space will remove it from the sidebar and stop replicating updates, but will not delete the data. You can unarchive it by enabling archived spaces in the app settings.",
|
|
884
|
+
"archive-space.label": "Archive",
|
|
885
|
+
"unarchive-space.label": "Unarchive",
|
|
886
|
+
"space-controls.title": "Space Controls",
|
|
887
|
+
"space-controls.description": "Advanced controls for this space.",
|
|
888
|
+
"backup-space.title": "Backup Space",
|
|
889
|
+
"backup-space.description": "Download a backup of the space. Contains all data in the space in an unencrypted format.",
|
|
890
|
+
"download-backup.label": "Download backup",
|
|
891
|
+
"repair-space.title": "Repair Space",
|
|
892
|
+
"repair-space.description": "Run repair operations on the space.",
|
|
893
|
+
"repair-space.label": "Run repairs",
|
|
894
|
+
"sync-edge-connected.label": "Edge connected",
|
|
895
|
+
"sync-edge-disconnected.label": "Edge disconnected",
|
|
896
|
+
"sync-no-connection.label": "No connection to edge service",
|
|
897
|
+
"sync-latency.label": "Latency",
|
|
898
|
+
"sync-upload.label": "Upload",
|
|
899
|
+
"sync-download.label": "Download",
|
|
900
|
+
"types-section.label": "Types",
|
|
901
|
+
"collections-section.label": "Collections",
|
|
902
|
+
"type-collection-all.label": "All",
|
|
903
|
+
"search.placeholder": "Search\u2026",
|
|
904
|
+
"auth-code.message": "Authorization code",
|
|
905
|
+
"auth-other-device-emoji.message": "Authorization icon",
|
|
906
|
+
"cancel.label": "Cancel",
|
|
907
|
+
"delete-key.button": "Delete token",
|
|
908
|
+
"invite-one.label": "Create single-use invitation",
|
|
909
|
+
"invite-one.description": "One-time link",
|
|
910
|
+
"invite-many.label": "Create multi-use invitation",
|
|
911
|
+
"invite-many.description": "Anyone with the link can join.",
|
|
912
|
+
"presence.label": "Online activity",
|
|
913
|
+
"qr.label": "QR Code",
|
|
914
|
+
"typename.label": "Typename",
|
|
915
|
+
"unnamed-collection.label": "Unnamed"
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
];
|
|
920
|
+
|
|
921
|
+
// src/SpacePlugin.ts
|
|
922
|
+
import { SpaceEvents as SpaceEvents2 } from "#types";
|
|
923
|
+
import { SpaceOperation as SpaceOperation2 } from "#operations";
|
|
924
|
+
import { AppGraphSerializer, IdentityCreated, Migrations, NavigationHandler, NavigationResolver, OperationHandler, UndoMappings, ReactRoot, ReactSurface, Repair, SpaceSettings, SpaceState, SpacesReady, AppGraphBuilder } from "#capabilities";
|
|
925
|
+
var SpacePlugin = Plugin.define(meta6).pipe(
|
|
926
|
+
AppPlugin.addMetadataModule({
|
|
144
927
|
metadata: [
|
|
145
928
|
{
|
|
146
|
-
id:
|
|
929
|
+
id: Collection2.Collection.typename,
|
|
147
930
|
metadata: {
|
|
148
|
-
icon:
|
|
149
|
-
iconHue: "
|
|
931
|
+
icon: Annotation.IconAnnotation.get(Collection2.Collection).pipe(Option2.getOrThrow).icon,
|
|
932
|
+
iconHue: Annotation.IconAnnotation.get(Collection2.Collection).pipe(Option2.getOrThrow).hue ?? "white",
|
|
150
933
|
// TODO(wittjosiah): Move out of metadata.
|
|
151
|
-
loadReferences: async (collection) => await
|
|
152
|
-
inputSchema:
|
|
153
|
-
name:
|
|
934
|
+
loadReferences: async (collection) => await Ref3.Array.loadAll(collection.objects),
|
|
935
|
+
inputSchema: Schema3.Struct({
|
|
936
|
+
name: Schema3.optional(Schema3.String)
|
|
154
937
|
}),
|
|
155
|
-
createObject: (props) => Effect.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
iconHue: "green",
|
|
164
|
-
inputSchema: SpaceOperation.StoredSchemaForm,
|
|
165
|
-
createObject: (props, { db }) => Effect.gen(function* () {
|
|
166
|
-
if (props.typename) {
|
|
167
|
-
const result = yield* Operation.invoke(SpaceOperation.UseStaticSchema, {
|
|
168
|
-
db,
|
|
169
|
-
typename: props.typename
|
|
170
|
-
});
|
|
171
|
-
return result;
|
|
172
|
-
} else {
|
|
173
|
-
const result = yield* Operation.invoke(SpaceOperation.AddSchema, {
|
|
174
|
-
db,
|
|
175
|
-
name: props.name,
|
|
176
|
-
schema: createDefaultSchema()
|
|
177
|
-
});
|
|
178
|
-
return result.object;
|
|
179
|
-
}
|
|
938
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
939
|
+
const object = Collection2.make(props);
|
|
940
|
+
return yield* Operation.invoke(SpaceOperation2.AddObject, {
|
|
941
|
+
object,
|
|
942
|
+
target: options.target,
|
|
943
|
+
hidden: false,
|
|
944
|
+
targetNodeId: options.targetNodeId
|
|
945
|
+
});
|
|
180
946
|
})
|
|
181
947
|
}
|
|
182
948
|
},
|
|
183
949
|
{
|
|
184
|
-
id:
|
|
950
|
+
id: Type4.getTypename(Type4.PersistentType),
|
|
185
951
|
metadata: {
|
|
186
|
-
icon:
|
|
952
|
+
icon: Annotation.IconAnnotation.get(Type4.PersistentType).pipe(Option2.getOrThrow).icon,
|
|
953
|
+
iconHue: Annotation.IconAnnotation.get(Type4.PersistentType).pipe(Option2.getOrThrow).hue ?? "white",
|
|
954
|
+
inputSchema: SpaceOperation2.StoredSchemaForm,
|
|
955
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
956
|
+
const result = yield* Operation.invoke(SpaceOperation2.AddSchema, {
|
|
957
|
+
db: options.db,
|
|
958
|
+
name: props.name,
|
|
959
|
+
schema: createDefaultSchema()
|
|
960
|
+
});
|
|
961
|
+
return {
|
|
962
|
+
id: result.id,
|
|
963
|
+
subject: [],
|
|
964
|
+
object: result.object
|
|
965
|
+
};
|
|
966
|
+
})
|
|
187
967
|
}
|
|
188
968
|
},
|
|
189
969
|
{
|
|
190
|
-
id:
|
|
970
|
+
id: Organization2.Organization.typename,
|
|
191
971
|
metadata: {
|
|
192
|
-
icon:
|
|
972
|
+
icon: Annotation.IconAnnotation.get(Organization2.Organization).pipe(Option2.getOrThrow).icon,
|
|
973
|
+
iconHue: Annotation.IconAnnotation.get(Organization2.Organization).pipe(Option2.getOrThrow).hue ?? "white",
|
|
974
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
975
|
+
const object = Organization2.make(props);
|
|
976
|
+
return yield* Operation.invoke(SpaceOperation2.AddObject, {
|
|
977
|
+
object,
|
|
978
|
+
target: options.target,
|
|
979
|
+
hidden: true,
|
|
980
|
+
targetNodeId: options.targetNodeId
|
|
981
|
+
});
|
|
982
|
+
})
|
|
193
983
|
}
|
|
194
984
|
},
|
|
195
985
|
{
|
|
196
|
-
id:
|
|
986
|
+
id: Person2.Person.typename,
|
|
197
987
|
metadata: {
|
|
198
|
-
icon:
|
|
988
|
+
icon: Annotation.IconAnnotation.get(Person2.Person).pipe(Option2.getOrThrow).icon,
|
|
989
|
+
iconHue: Annotation.IconAnnotation.get(Person2.Person).pipe(Option2.getOrThrow).hue ?? "white",
|
|
990
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
991
|
+
const object = Person2.make(props);
|
|
992
|
+
return yield* Operation.invoke(SpaceOperation2.AddObject, {
|
|
993
|
+
object,
|
|
994
|
+
target: options.target,
|
|
995
|
+
hidden: true,
|
|
996
|
+
targetNodeId: options.targetNodeId
|
|
997
|
+
});
|
|
998
|
+
})
|
|
199
999
|
}
|
|
200
1000
|
},
|
|
201
1001
|
{
|
|
202
|
-
id:
|
|
1002
|
+
id: Task2.Task.typename,
|
|
203
1003
|
metadata: {
|
|
204
|
-
icon:
|
|
1004
|
+
icon: Annotation.IconAnnotation.get(Task2.Task).pipe(Option2.getOrThrow).icon,
|
|
1005
|
+
iconHue: Annotation.IconAnnotation.get(Task2.Task).pipe(Option2.getOrThrow).hue ?? "white",
|
|
1006
|
+
inputSchema: Task2.Task,
|
|
1007
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
1008
|
+
const object = Task2.make(props);
|
|
1009
|
+
return yield* Operation.invoke(SpaceOperation2.AddObject, {
|
|
1010
|
+
object,
|
|
1011
|
+
target: options.target,
|
|
1012
|
+
hidden: true,
|
|
1013
|
+
targetNodeId: options.targetNodeId
|
|
1014
|
+
});
|
|
1015
|
+
})
|
|
205
1016
|
}
|
|
206
1017
|
}
|
|
207
1018
|
]
|
|
208
1019
|
}),
|
|
209
|
-
|
|
1020
|
+
AppPlugin.addNavigationHandlerModule(({ invitationProp }) => ({
|
|
1021
|
+
activate: () => NavigationHandler({
|
|
1022
|
+
invitationProp
|
|
1023
|
+
})
|
|
1024
|
+
})),
|
|
1025
|
+
AppPlugin.addNavigationResolverModule({
|
|
1026
|
+
activatesOn: ClientEvents.ClientReady,
|
|
1027
|
+
activate: NavigationResolver
|
|
1028
|
+
}),
|
|
1029
|
+
AppPlugin.addOperationHandlerModule({
|
|
1030
|
+
activate: OperationHandler
|
|
1031
|
+
}),
|
|
1032
|
+
AppPlugin.addReactRootModule({
|
|
1033
|
+
activate: ReactRoot
|
|
1034
|
+
}),
|
|
1035
|
+
AppPlugin.addSchemaModule({
|
|
210
1036
|
schema: [
|
|
211
1037
|
...DataTypes,
|
|
212
1038
|
AnchoredTo.AnchoredTo,
|
|
213
1039
|
Employer.Employer,
|
|
214
|
-
|
|
1040
|
+
Event2.Event,
|
|
215
1041
|
HasConnection.HasConnection,
|
|
216
1042
|
HasRelationship.HasRelationship,
|
|
217
1043
|
HasSubject.HasSubject,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
1044
|
+
Organization2.Organization,
|
|
1045
|
+
Person2.Person,
|
|
1046
|
+
Pipeline2.Pipeline,
|
|
1047
|
+
Tag3.Tag,
|
|
1048
|
+
Task2.Task
|
|
223
1049
|
]
|
|
224
1050
|
}),
|
|
225
|
-
|
|
226
|
-
activate:
|
|
1051
|
+
AppPlugin.addSettingsModule({
|
|
1052
|
+
activate: SpaceSettings
|
|
1053
|
+
}),
|
|
1054
|
+
AppPlugin.addTranslationsModule({
|
|
1055
|
+
translations: [
|
|
1056
|
+
...translations,
|
|
1057
|
+
...componentsTranslations,
|
|
1058
|
+
...formTranslations,
|
|
1059
|
+
...shellTranslations
|
|
1060
|
+
]
|
|
1061
|
+
}),
|
|
1062
|
+
Plugin.addModule({
|
|
1063
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
1064
|
+
// Should this be a different event?
|
|
1065
|
+
// Should settings store be renamed to be more generic?
|
|
1066
|
+
activatesOn: ActivationEvent.oneOf(AppActivationEvents.SetupSettings, AppActivationEvents.SetupAppGraph),
|
|
1067
|
+
activatesAfter: [
|
|
1068
|
+
SpaceEvents2.StateReady
|
|
1069
|
+
],
|
|
1070
|
+
activate: SpaceState
|
|
227
1071
|
}),
|
|
228
|
-
Plugin.addModule(({
|
|
1072
|
+
Plugin.addModule(({ shareableLinkOrigin = typeof window !== "undefined" ? window.location.origin : "http://localhost", invitationPath = "/", invitationProp = "spaceInvitationCode" }) => {
|
|
229
1073
|
const createInvitationUrl = (invitationCode) => {
|
|
230
|
-
const baseUrl = new URL(
|
|
1074
|
+
const baseUrl = new URL(invitationPath || "/", shareableLinkOrigin);
|
|
231
1075
|
baseUrl.searchParams.set(invitationProp, invitationCode);
|
|
232
1076
|
return baseUrl.toString();
|
|
233
1077
|
};
|
|
234
1078
|
return {
|
|
235
|
-
id:
|
|
236
|
-
activatesOn:
|
|
1079
|
+
id: Capability.getModuleTag(ReactSurface),
|
|
1080
|
+
activatesOn: ActivationEvents.SetupReactSurface,
|
|
237
1081
|
// TODO(wittjosiah): Should occur before the settings dialog is loaded when surfaces activation is more granular.
|
|
238
1082
|
activatesBefore: [
|
|
239
|
-
|
|
1083
|
+
SpaceEvents2.SetupSettingsPanel
|
|
240
1084
|
],
|
|
241
1085
|
activate: () => ReactSurface({
|
|
242
1086
|
createInvitationUrl
|
|
243
1087
|
})
|
|
244
1088
|
};
|
|
245
1089
|
}),
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
1090
|
+
Plugin.addModule(({ shareableLinkOrigin = typeof window !== "undefined" ? window.location.origin : "http://localhost" }) => ({
|
|
1091
|
+
id: Capability.getModuleTag(AppGraphBuilder),
|
|
1092
|
+
activatesOn: AppActivationEvents.SetupAppGraph,
|
|
1093
|
+
activate: () => AppGraphBuilder({
|
|
1094
|
+
shareableLinkOrigin
|
|
1095
|
+
})
|
|
1096
|
+
})),
|
|
1097
|
+
Plugin.addModule(({ shareableLinkOrigin = typeof window !== "undefined" ? window.location.origin : "http://localhost", invitationPath = "/", invitationProp = "spaceInvitationCode", observability = false }) => {
|
|
250
1098
|
const createInvitationUrl = (invitationCode) => {
|
|
251
|
-
const baseUrl = new URL(
|
|
1099
|
+
const baseUrl = new URL(invitationPath || "/", shareableLinkOrigin);
|
|
252
1100
|
baseUrl.searchParams.set(invitationProp, invitationCode);
|
|
253
1101
|
return baseUrl.toString();
|
|
254
1102
|
};
|
|
255
1103
|
return {
|
|
256
|
-
id:
|
|
257
|
-
activatesOn:
|
|
258
|
-
activate: () =>
|
|
1104
|
+
id: Capability.getModuleTag(UndoMappings),
|
|
1105
|
+
activatesOn: ActivationEvents.SetupOperationHandler,
|
|
1106
|
+
activate: () => UndoMappings({
|
|
259
1107
|
createInvitationUrl,
|
|
260
1108
|
observability
|
|
261
1109
|
})
|
|
@@ -263,20 +1111,24 @@ var SpacePlugin = Plugin.define(meta).pipe(
|
|
|
263
1111
|
}),
|
|
264
1112
|
// TODO(wittjosiah): This could probably be deferred.
|
|
265
1113
|
Plugin.addModule({
|
|
266
|
-
activatesOn:
|
|
1114
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
267
1115
|
activate: AppGraphSerializer
|
|
268
1116
|
}),
|
|
269
1117
|
Plugin.addModule({
|
|
270
1118
|
activatesOn: ClientEvents.IdentityCreated,
|
|
271
1119
|
activatesAfter: [
|
|
272
|
-
|
|
1120
|
+
SpaceEvents2.PersonalSpaceReady
|
|
273
1121
|
],
|
|
274
1122
|
activate: IdentityCreated
|
|
275
1123
|
}),
|
|
276
1124
|
Plugin.addModule({
|
|
277
|
-
activatesOn: ActivationEvent.allOf(
|
|
1125
|
+
activatesOn: ActivationEvent.allOf(ActivationEvents.OperationInvokerReady, AppActivationEvents.LayoutReady, AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady, SpaceEvents2.StateReady, ClientEvents.SpacesReady),
|
|
278
1126
|
activate: SpacesReady
|
|
279
1127
|
}),
|
|
1128
|
+
Plugin.addModule({
|
|
1129
|
+
activatesOn: ClientEvents.SetupMigration,
|
|
1130
|
+
activate: Migrations
|
|
1131
|
+
}),
|
|
280
1132
|
Plugin.addModule({
|
|
281
1133
|
activatesOn: ClientEvents.SpacesReady,
|
|
282
1134
|
activate: Repair
|
|
@@ -285,58 +1137,22 @@ var SpacePlugin = Plugin.define(meta).pipe(
|
|
|
285
1137
|
);
|
|
286
1138
|
export {
|
|
287
1139
|
AwaitingObject,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
CollectionSection,
|
|
293
|
-
CreateObjectDialog,
|
|
294
|
-
CreateSpaceDialog,
|
|
295
|
-
FullPresence,
|
|
296
|
-
InlineSyncStatus,
|
|
297
|
-
JOIN_DIALOG,
|
|
298
|
-
JoinDialog,
|
|
299
|
-
MembersContainer,
|
|
300
|
-
MenuFooter,
|
|
301
|
-
OBJECT_RENAME_POPOVER,
|
|
302
|
-
ObjectCardStack,
|
|
303
|
-
ObjectDetails,
|
|
304
|
-
ObjectRenamePopover,
|
|
305
|
-
RecordArticle,
|
|
1140
|
+
BaseObjectSettings,
|
|
1141
|
+
CreateObjectPanel,
|
|
1142
|
+
ForeignKeys,
|
|
1143
|
+
ObjectForm,
|
|
306
1144
|
SHARED,
|
|
307
1145
|
SPACES,
|
|
308
|
-
SPACE_RENAME_POPOVER,
|
|
309
|
-
SchemaContainer,
|
|
310
|
-
SmallPresence,
|
|
311
|
-
SmallPresenceLive,
|
|
312
1146
|
SpaceCapabilities,
|
|
313
1147
|
SpaceEvents,
|
|
314
1148
|
SpacePlugin,
|
|
315
1149
|
SpacePluginSettings,
|
|
316
|
-
SpacePresence,
|
|
317
|
-
SpaceRenamePopover,
|
|
318
|
-
SpaceSettingsContainer,
|
|
319
|
-
SyncStatus,
|
|
320
|
-
SyncStatusIndicator,
|
|
321
|
-
ViewEditor,
|
|
322
1150
|
cloneObject,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
constructSpaceNode,
|
|
326
|
-
createObjectNode,
|
|
327
|
-
createStaticSchemaActions,
|
|
328
|
-
createStaticSchemaNode,
|
|
329
|
-
evalQuery,
|
|
330
|
-
getActiveSpace,
|
|
1151
|
+
createClientSaveTracker,
|
|
1152
|
+
getIcon,
|
|
331
1153
|
getNestedObjects,
|
|
332
|
-
getQueryTarget,
|
|
333
1154
|
getSpaceDisplayName,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
useActiveSpace,
|
|
337
|
-
useInputSurfaceLookup,
|
|
338
|
-
usePath,
|
|
339
|
-
useQuerySpaceSchemas,
|
|
340
|
-
useTypeOptions
|
|
1155
|
+
getStatus,
|
|
1156
|
+
meta
|
|
341
1157
|
};
|
|
342
1158
|
//# sourceMappingURL=index.mjs.map
|