@dxos/plugin-space 0.8.3 → 0.8.4-main.28f8d3d
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/CollectionMain-D2B75XBS.mjs +31 -0
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetailsPanel-SY6FYTYC.mjs +88 -0
- package/dist/lib/browser/ObjectDetailsPanel-SY6FYTYC.mjs.map +7 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +68 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-M2RH72VL.mjs → app-graph-builder-VZW75QPJ.mjs} +178 -30
- package/dist/lib/browser/app-graph-builder-VZW75QPJ.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-F7ISRRBV.mjs → app-graph-serializer-YPHYVZAP.mjs} +13 -13
- package/dist/lib/browser/app-graph-serializer-YPHYVZAP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TW7O2EPP.mjs → chunk-3UFG6LQQ.mjs} +59 -5
- package/dist/lib/browser/chunk-3UFG6LQQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YMCZR6EZ.mjs → chunk-CBYL62HG.mjs} +5 -4
- package/dist/lib/browser/chunk-CBYL62HG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7Y4M7GXO.mjs → chunk-DYKFFVN6.mjs} +5 -5
- package/dist/lib/browser/{chunk-7Y4M7GXO.mjs.map → chunk-DYKFFVN6.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-PTKYMZWO.mjs → chunk-FBCGT5YY.mjs} +2 -2
- package/dist/lib/browser/{chunk-NFUKCRGE.mjs → chunk-PSIBVBTA.mjs} +419 -353
- package/dist/lib/browser/chunk-PSIBVBTA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BXNL6SDI.mjs → chunk-Q5EEPP3S.mjs} +4 -3
- package/dist/lib/browser/chunk-Q5EEPP3S.mjs.map +7 -0
- package/dist/lib/browser/{chunk-V24VASAJ.mjs → chunk-SMB4DGYO.mjs} +133 -29
- package/dist/lib/browser/chunk-SMB4DGYO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4ZKSFDXM.mjs → chunk-WAXS2ZVX.mjs} +77 -16
- package/dist/lib/browser/chunk-WAXS2ZVX.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-PI7TKANR.mjs → identity-created-T6ZNVE7S.mjs} +5 -5
- package/dist/lib/browser/identity-created-T6ZNVE7S.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +108 -17
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-RWU6ZE4H.mjs → intent-resolver-TS6CCKST.mjs} +172 -22
- package/dist/lib/browser/intent-resolver-TS6CCKST.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-QIKHSNT2.mjs → react-root-RQGTZ2ZO.mjs} +8 -8
- package/dist/lib/browser/{react-root-QIKHSNT2.mjs.map → react-root-RQGTZ2ZO.mjs.map} +2 -2
- package/dist/lib/browser/{react-surface-W56UD53I.mjs → react-surface-V3ARS2BP.mjs} +54 -22
- package/dist/lib/browser/react-surface-V3ARS2BP.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-WREJNMIC.mjs → schema-defs-5LBA43X5.mjs} +4 -4
- package/dist/lib/browser/schema-defs-5LBA43X5.mjs.map +7 -0
- package/dist/lib/browser/{schema-tools-ILTVSSS3.mjs → schema-tools-LPL35WOJ.mjs} +13 -13
- package/dist/lib/browser/schema-tools-LPL35WOJ.mjs.map +7 -0
- package/dist/lib/browser/{settings-K54STC5A.mjs → settings-FLLBP5KI.mjs} +4 -4
- package/dist/lib/browser/{spaces-ready-3PDRDHPC.mjs → spaces-ready-FXEP6XEW.mjs} +17 -15
- package/dist/lib/browser/spaces-ready-FXEP6XEW.mjs.map +7 -0
- package/dist/lib/browser/{state-HRZ4VRXU.mjs → state-K3UBPKYP.mjs} +4 -4
- package/dist/lib/{node-esm/state-XQNDCN37.mjs.map → browser/state-K3UBPKYP.mjs.map} +2 -2
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs +32 -0
- package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-3MYLTMXN.mjs +89 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-3MYLTMXN.mjs.map +7 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +70 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-BCHVZ4OM.mjs → app-graph-builder-XNVQOJLE.mjs} +178 -30
- package/dist/lib/node-esm/app-graph-builder-XNVQOJLE.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-TXRGGNP2.mjs → app-graph-serializer-PKVLWV6V.mjs} +13 -13
- package/dist/lib/node-esm/app-graph-serializer-PKVLWV6V.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BSLREHIX.mjs → chunk-7MZ3J3LI.mjs} +4 -3
- package/dist/lib/node-esm/chunk-7MZ3J3LI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HO7AIKQS.mjs → chunk-CTQMR7E3.mjs} +133 -29
- package/dist/lib/node-esm/chunk-CTQMR7E3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3CP67AYY.mjs → chunk-FJZNSJC4.mjs} +5 -4
- package/dist/lib/node-esm/chunk-FJZNSJC4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MSWEFAPD.mjs → chunk-HWNG4MEU.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-JBQKU4K5.mjs → chunk-HYIZVPOA.mjs} +77 -16
- package/dist/lib/node-esm/chunk-HYIZVPOA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GH2FGJXH.mjs → chunk-KLG4Y4GY.mjs} +5 -5
- package/dist/lib/node-esm/{chunk-GH2FGJXH.mjs.map → chunk-KLG4Y4GY.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-LA6AVVH6.mjs → chunk-KYUHPPRN.mjs} +419 -353
- package/dist/lib/node-esm/chunk-KYUHPPRN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-D4QMPPS7.mjs → chunk-S7MKRQHY.mjs} +59 -5
- package/dist/lib/node-esm/chunk-S7MKRQHY.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-35CTAQWI.mjs → identity-created-AL7NNCKH.mjs} +5 -5
- package/dist/lib/node-esm/identity-created-AL7NNCKH.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +108 -17
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-JO6L2VXC.mjs → intent-resolver-W6P27SCF.mjs} +172 -22
- package/dist/lib/node-esm/intent-resolver-W6P27SCF.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-YFGL3B4J.mjs → react-root-N27KETKT.mjs} +8 -8
- package/dist/lib/node-esm/{react-root-YFGL3B4J.mjs.map → react-root-N27KETKT.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-surface-CVAPDLEZ.mjs → react-surface-TNPAUQCM.mjs} +54 -22
- package/dist/lib/node-esm/react-surface-TNPAUQCM.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-4MEJETVX.mjs → schema-defs-TPWZPDCR.mjs} +4 -4
- package/dist/lib/node-esm/schema-defs-TPWZPDCR.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-tools-SRLCRZ3B.mjs → schema-tools-PJE2FKWH.mjs} +13 -13
- package/dist/lib/node-esm/schema-tools-PJE2FKWH.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-TD76LTQS.mjs → settings-WKUWY3P6.mjs} +4 -4
- package/dist/lib/node-esm/{spaces-ready-FJMGPAVV.mjs → spaces-ready-PQLLIO5W.mjs} +17 -15
- package/dist/lib/node-esm/spaces-ready-PQLLIO5W.mjs.map +7 -0
- package/dist/lib/node-esm/{state-XQNDCN37.mjs → state-4M5A6OSB.mjs} +4 -4
- package/dist/lib/node-esm/state-4M5A6OSB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +9 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionMain.d.ts +1 -0
- package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +3 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetailsPanel.d.ts +9 -0
- package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/RecordMain.d.ts +7 -0
- package/dist/types/src/components/RecordMain.d.ts.map +1 -0
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts +5 -5
- package/dist/types/src/components/ViewEditor.d.ts +8 -0
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +11 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -0
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +212 -410
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +82 -2
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +31 -5
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +52 -52
- package/src/SpacePlugin.ts +91 -8
- package/src/capabilities/app-graph-builder.ts +211 -14
- package/src/capabilities/app-graph-serializer.ts +6 -6
- package/src/capabilities/capabilities.ts +8 -3
- package/src/capabilities/identity-created.ts +3 -5
- package/src/capabilities/intent-resolver.ts +123 -13
- package/src/capabilities/react-root.tsx +2 -1
- package/src/capabilities/react-surface.tsx +69 -18
- package/src/capabilities/schema-defs.ts +3 -2
- package/src/capabilities/schema-tool.test.ts +1 -1
- package/src/capabilities/schema-tools.ts +11 -11
- package/src/capabilities/spaces-ready.ts +10 -7
- package/src/capabilities/state.ts +3 -2
- package/src/components/AwaitingObject.tsx +5 -7
- package/src/components/CollectionMain.tsx +2 -0
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +5 -4
- package/src/components/CreateDialog/CreateObjectDialog.tsx +32 -27
- package/src/components/CreateDialog/CreateObjectPanel.tsx +3 -3
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +1 -1
- package/src/components/JoinDialog.tsx +1 -1
- package/src/components/MembersContainer.stories.tsx +6 -5
- package/src/components/MembersContainer.tsx +8 -7
- package/src/components/MenuFooter.tsx +2 -3
- package/src/components/ObjectDetailsPanel.tsx +77 -0
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +2 -1
- package/src/components/PersistenceStatus.tsx +5 -6
- package/src/components/PopoverRenameObject.tsx +7 -13
- package/src/components/PopoverRenameSpace.tsx +1 -1
- package/src/components/RecordMain.tsx +43 -0
- package/src/components/SchemaContainer.tsx +2 -2
- package/src/components/SpacePluginSettings.tsx +2 -2
- package/src/components/SpacePresence.stories.tsx +4 -3
- package/src/components/SpacePresence.tsx +7 -7
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +3 -2
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +6 -6
- package/src/components/SyncStatus/SyncStatus.stories.tsx +9 -15
- package/src/components/SyncStatus/SyncStatus.tsx +4 -3
- package/src/components/SyncStatus/save-tracker.ts +3 -3
- package/src/components/SyncStatus/status.ts +4 -4
- package/src/components/ViewEditor.tsx +64 -0
- package/src/components/index.ts +7 -1
- package/src/events.ts +2 -1
- package/src/hooks/useActiveSpace.ts +1 -1
- package/src/hooks/useInputSurfaceLookup.tsx +1 -1
- package/src/translations.ts +75 -11
- package/src/types/types.ts +56 -3
- package/src/util.tsx +127 -26
- package/dist/lib/browser/app-graph-builder-M2RH72VL.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-F7ISRRBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-4ZKSFDXM.mjs.map +0 -7
- package/dist/lib/browser/chunk-BXNL6SDI.mjs.map +0 -7
- package/dist/lib/browser/chunk-NFUKCRGE.mjs.map +0 -7
- package/dist/lib/browser/chunk-TW7O2EPP.mjs.map +0 -7
- package/dist/lib/browser/chunk-V24VASAJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-YMCZR6EZ.mjs.map +0 -7
- package/dist/lib/browser/identity-created-PI7TKANR.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RWU6ZE4H.mjs.map +0 -7
- package/dist/lib/browser/react-surface-W56UD53I.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-WREJNMIC.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-ILTVSSS3.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-3PDRDHPC.mjs.map +0 -7
- package/dist/lib/browser/state-HRZ4VRXU.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-6LK5HLLE.cjs +0 -364
- package/dist/lib/node/app-graph-builder-6LK5HLLE.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-HKHBNHA3.cjs +0 -89
- package/dist/lib/node/app-graph-serializer-HKHBNHA3.cjs.map +0 -7
- package/dist/lib/node/chunk-3X4EA4XL.cjs +0 -37
- package/dist/lib/node/chunk-3X4EA4XL.cjs.map +0 -7
- package/dist/lib/node/chunk-5WLAXYE3.cjs +0 -125
- package/dist/lib/node/chunk-5WLAXYE3.cjs.map +0 -7
- package/dist/lib/node/chunk-6P2DB4QQ.cjs +0 -36
- package/dist/lib/node/chunk-6P2DB4QQ.cjs.map +0 -7
- package/dist/lib/node/chunk-DOC5XEZ4.cjs +0 -184
- package/dist/lib/node/chunk-DOC5XEZ4.cjs.map +0 -7
- package/dist/lib/node/chunk-NCHF433F.cjs +0 -1921
- package/dist/lib/node/chunk-NCHF433F.cjs.map +0 -7
- package/dist/lib/node/chunk-NL5Y4EDX.cjs +0 -38
- package/dist/lib/node/chunk-NL5Y4EDX.cjs.map +0 -7
- package/dist/lib/node/chunk-ULJZPATP.cjs +0 -312
- package/dist/lib/node/chunk-ULJZPATP.cjs.map +0 -7
- package/dist/lib/node/chunk-XHWVT7LW.cjs +0 -572
- package/dist/lib/node/chunk-XHWVT7LW.cjs.map +0 -7
- package/dist/lib/node/identity-created-FF4WZ2WY.cjs +0 -42
- package/dist/lib/node/identity-created-FF4WZ2WY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -278
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-AV4CMM3Z.cjs +0 -609
- package/dist/lib/node/intent-resolver-AV4CMM3Z.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-root-RQUU3A45.cjs +0 -51
- package/dist/lib/node/react-root-RQUU3A45.cjs.map +0 -7
- package/dist/lib/node/react-surface-AZFJLE72.cjs +0 -351
- package/dist/lib/node/react-surface-AZFJLE72.cjs.map +0 -7
- package/dist/lib/node/schema-defs-OB2X2HBH.cjs +0 -42
- package/dist/lib/node/schema-defs-OB2X2HBH.cjs.map +0 -7
- package/dist/lib/node/schema-tools-IYREN4IH.cjs +0 -147
- package/dist/lib/node/schema-tools-IYREN4IH.cjs.map +0 -7
- package/dist/lib/node/settings-P2EQ7VKQ.cjs +0 -38
- package/dist/lib/node/settings-P2EQ7VKQ.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-DXPOHYV7.cjs +0 -210
- package/dist/lib/node/spaces-ready-DXPOHYV7.cjs.map +0 -7
- package/dist/lib/node/state-M35DK75Z.cjs +0 -61
- package/dist/lib/node/state-M35DK75Z.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -48
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-BCHVZ4OM.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-TXRGGNP2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3CP67AYY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BSLREHIX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D4QMPPS7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HO7AIKQS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JBQKU4K5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LA6AVVH6.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-35CTAQWI.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-JO6L2VXC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-CVAPDLEZ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-4MEJETVX.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-SRLCRZ3B.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-FJMGPAVV.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-PTKYMZWO.mjs.map → chunk-FBCGT5YY.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-K54STC5A.mjs.map → settings-FLLBP5KI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-MSWEFAPD.mjs.map → chunk-HWNG4MEU.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-TD76LTQS.mjs.map → settings-WKUWY3P6.mjs.map} +0 -0
|
@@ -18,25 +18,26 @@ import { Migrations } from '@dxos/migrations';
|
|
|
18
18
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
19
19
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
20
20
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
21
|
-
import {
|
|
21
|
+
import { SpaceState, fullyQualifiedId, getSpace, isSpace } from '@dxos/react-client/echo';
|
|
22
22
|
import { Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
23
23
|
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
|
|
24
|
-
import { DataType } from '@dxos/schema';
|
|
24
|
+
import { DataType, ProjectionModel } from '@dxos/schema';
|
|
25
25
|
|
|
26
|
-
import { SpaceCapabilities } from './capabilities';
|
|
27
26
|
import {
|
|
28
27
|
CREATE_OBJECT_DIALOG,
|
|
29
28
|
CREATE_SPACE_DIALOG,
|
|
29
|
+
type CreateObjectDialogProps,
|
|
30
30
|
JOIN_DIALOG,
|
|
31
|
+
type JoinDialogProps,
|
|
31
32
|
POPOVER_RENAME_OBJECT,
|
|
32
33
|
POPOVER_RENAME_SPACE,
|
|
33
|
-
type CreateObjectDialogProps,
|
|
34
|
-
type JoinDialogProps,
|
|
35
34
|
} from '../components';
|
|
36
35
|
import { SpaceEvents } from '../events';
|
|
37
36
|
import { SPACE_PLUGIN } from '../meta';
|
|
38
37
|
import { CollectionAction, SpaceAction } from '../types';
|
|
39
|
-
import {
|
|
38
|
+
import { COMPOSER_SPACE_LOCK, cloneObject, getNestedObjects } from '../util';
|
|
39
|
+
|
|
40
|
+
import { SpaceCapabilities } from './capabilities';
|
|
40
41
|
|
|
41
42
|
// TODO(wittjosiah): Remove.
|
|
42
43
|
const SPACE_MAX_OBJECTS = 500;
|
|
@@ -75,17 +76,27 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
75
76
|
await space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED);
|
|
76
77
|
}
|
|
77
78
|
await space.waitUntilReady();
|
|
79
|
+
|
|
80
|
+
// Create root collection.
|
|
78
81
|
const collection = Obj.make(DataType.Collection, { objects: [] });
|
|
79
|
-
space.properties[
|
|
82
|
+
space.properties[DataType.Collection.typename] = Ref.make(collection);
|
|
80
83
|
|
|
84
|
+
// Set current migration version.
|
|
81
85
|
if (Migrations.versionProperty) {
|
|
82
86
|
space.properties[Migrations.versionProperty] = Migrations.targetVersion;
|
|
83
87
|
}
|
|
84
88
|
|
|
89
|
+
// Create records smart collection.
|
|
90
|
+
const records = Obj.make(DataType.QueryCollection, {
|
|
91
|
+
query: { typename: DataType.StoredSchema.typename },
|
|
92
|
+
});
|
|
93
|
+
collection.objects.push(Ref.make(records));
|
|
94
|
+
|
|
95
|
+
// Allow other plugins to add default content.
|
|
85
96
|
await context.activatePromise(SpaceEvents.SpaceCreated);
|
|
86
97
|
const onSpaceCreatedCallbacks = context.getCapabilities(SpaceCapabilities.OnSpaceCreated);
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
const spaceCreatedIntents = onSpaceCreatedCallbacks.map((onSpaceCreated) =>
|
|
99
|
+
onSpaceCreated({ space, rootCollection: collection }),
|
|
89
100
|
);
|
|
90
101
|
|
|
91
102
|
return {
|
|
@@ -95,6 +106,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
95
106
|
space,
|
|
96
107
|
},
|
|
97
108
|
intents: [
|
|
109
|
+
...spaceCreatedIntents,
|
|
98
110
|
...(observability
|
|
99
111
|
? [
|
|
100
112
|
createIntent(ObservabilityAction.SendEvent, {
|
|
@@ -309,9 +321,106 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
309
321
|
};
|
|
310
322
|
},
|
|
311
323
|
}),
|
|
324
|
+
createResolver({
|
|
325
|
+
intent: SpaceAction.UseStaticSchema,
|
|
326
|
+
resolve: async ({ space, typename }) => {
|
|
327
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
328
|
+
const schema = client.graph.schemaRegistry.schemas.find((schema) => Type.getTypename(schema) === typename);
|
|
329
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
330
|
+
|
|
331
|
+
if (!space.properties.staticRecords) {
|
|
332
|
+
space.properties.staticRecords = [];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (!space.properties.staticRecords.includes(typename)) {
|
|
336
|
+
space.properties.staticRecords.push(typename);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
await context.activatePromise(SpaceEvents.SchemaAdded);
|
|
340
|
+
const onSchemaAdded = context.getCapabilities(SpaceCapabilities.OnSchemaAdded);
|
|
341
|
+
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema }));
|
|
342
|
+
|
|
343
|
+
return {
|
|
344
|
+
data: {},
|
|
345
|
+
intents: [
|
|
346
|
+
...schemaAddedIntents,
|
|
347
|
+
...(observability
|
|
348
|
+
? [
|
|
349
|
+
createIntent(ObservabilityAction.SendEvent, {
|
|
350
|
+
name: 'space.schema.use',
|
|
351
|
+
properties: {
|
|
352
|
+
spaceId: space.id,
|
|
353
|
+
typename: Type.getTypename(schema),
|
|
354
|
+
},
|
|
355
|
+
}),
|
|
356
|
+
]
|
|
357
|
+
: []),
|
|
358
|
+
],
|
|
359
|
+
};
|
|
360
|
+
},
|
|
361
|
+
}),
|
|
362
|
+
createResolver({
|
|
363
|
+
intent: SpaceAction.AddSchema,
|
|
364
|
+
resolve: async ({ space, name, schema: schemaInput }) => {
|
|
365
|
+
const [schema] = await space.db.schemaRegistry.register([schemaInput]);
|
|
366
|
+
if (name) {
|
|
367
|
+
schema.storedSchema.name = name;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
await context.activatePromise(SpaceEvents.SchemaAdded);
|
|
371
|
+
const onSchemaAdded = context.getCapabilities(SpaceCapabilities.OnSchemaAdded);
|
|
372
|
+
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema }));
|
|
373
|
+
|
|
374
|
+
return {
|
|
375
|
+
data: {
|
|
376
|
+
id: schema.id,
|
|
377
|
+
object: schema.storedSchema,
|
|
378
|
+
schema,
|
|
379
|
+
},
|
|
380
|
+
intents: [
|
|
381
|
+
...schemaAddedIntents,
|
|
382
|
+
...(observability
|
|
383
|
+
? [
|
|
384
|
+
createIntent(ObservabilityAction.SendEvent, {
|
|
385
|
+
name: 'space.schema.add',
|
|
386
|
+
properties: {
|
|
387
|
+
spaceId: space.id,
|
|
388
|
+
objectId: schema.id,
|
|
389
|
+
typename: schema.typename,
|
|
390
|
+
},
|
|
391
|
+
}),
|
|
392
|
+
]
|
|
393
|
+
: []),
|
|
394
|
+
],
|
|
395
|
+
};
|
|
396
|
+
},
|
|
397
|
+
}),
|
|
398
|
+
createResolver({
|
|
399
|
+
intent: SpaceAction.DeleteField,
|
|
400
|
+
resolve: async ({ view, fieldId, deletionData }, undo) => {
|
|
401
|
+
const space = getSpace(view);
|
|
402
|
+
invariant(space);
|
|
403
|
+
invariant(view.query.typename);
|
|
404
|
+
const schema = await space.db.schemaRegistry.query({ typename: view.query.typename }).firstOrUndefined();
|
|
405
|
+
invariant(schema);
|
|
406
|
+
const projection = new ProjectionModel(schema.jsonSchema, view.projection);
|
|
407
|
+
if (!undo) {
|
|
408
|
+
const { deleted, index } = projection.deleteFieldProjection(fieldId);
|
|
409
|
+
return {
|
|
410
|
+
undoable: {
|
|
411
|
+
message: ['field deleted label', { ns: SPACE_PLUGIN }],
|
|
412
|
+
data: { deletionData: { ...deleted, index } },
|
|
413
|
+
},
|
|
414
|
+
};
|
|
415
|
+
} else if (undo && deletionData) {
|
|
416
|
+
const { field, props, index } = deletionData;
|
|
417
|
+
projection.setFieldProjection({ field, props }, index);
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
}),
|
|
312
421
|
createResolver({
|
|
313
422
|
intent: SpaceAction.OpenCreateObject,
|
|
314
|
-
resolve: ({ target, typename, navigable = true }) => {
|
|
423
|
+
resolve: ({ target, typename, navigable = true, onCreateObject }) => {
|
|
315
424
|
const state = context.getCapability(SpaceCapabilities.State);
|
|
316
425
|
|
|
317
426
|
return {
|
|
@@ -324,6 +433,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
324
433
|
props: {
|
|
325
434
|
target,
|
|
326
435
|
typename,
|
|
436
|
+
onCreateObject,
|
|
327
437
|
shouldNavigate: navigable
|
|
328
438
|
? (object: Obj.Any) => {
|
|
329
439
|
const isCollection = Obj.instanceOf(DataType.Collection, object);
|
|
@@ -381,13 +491,13 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
381
491
|
} else if (isSpace(target) && hidden) {
|
|
382
492
|
space.db.add(object);
|
|
383
493
|
} else if (isSpace(target)) {
|
|
384
|
-
const collection = space.properties[
|
|
494
|
+
const collection = space.properties[DataType.Collection.typename]?.target;
|
|
385
495
|
if (Obj.instanceOf(DataType.Collection, collection)) {
|
|
386
496
|
collection.objects.push(Ref.make(object));
|
|
387
497
|
} else {
|
|
388
498
|
// TODO(wittjosiah): Can't add non-echo objects by including in a collection because of types.
|
|
389
499
|
const collection = Obj.make(DataType.Collection, { objects: [Ref.make(object)] });
|
|
390
|
-
space.properties[
|
|
500
|
+
space.properties[DataType.Collection.typename] = Ref.make(collection);
|
|
391
501
|
}
|
|
392
502
|
}
|
|
393
503
|
|
|
@@ -444,7 +554,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
444
554
|
|
|
445
555
|
if (!undo) {
|
|
446
556
|
const parentCollection: DataType.Collection =
|
|
447
|
-
target ?? space.properties[
|
|
557
|
+
target ?? space.properties[DataType.Collection.typename]?.target;
|
|
448
558
|
const nestedObjectsList = await Promise.all(objects.map((obj) => getNestedObjects(obj, resolve)));
|
|
449
559
|
|
|
450
560
|
const deletionData = {
|
|
@@ -6,10 +6,11 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import { SpaceCapabilities } from './capabilities';
|
|
10
9
|
import { AwaitingObject } from '../components';
|
|
11
10
|
import { SPACE_PLUGIN } from '../meta';
|
|
12
11
|
|
|
12
|
+
import { SpaceCapabilities } from './capabilities';
|
|
13
|
+
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactRoot, {
|
|
15
16
|
id: SPACE_PLUGIN,
|
|
@@ -7,9 +7,9 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
+
Surface,
|
|
10
11
|
contributes,
|
|
11
12
|
createSurface,
|
|
12
|
-
Surface,
|
|
13
13
|
useCapabilities,
|
|
14
14
|
useCapability,
|
|
15
15
|
useLayout,
|
|
@@ -19,47 +19,60 @@ import { findAnnotation } from '@dxos/effect';
|
|
|
19
19
|
import { SettingsStore } from '@dxos/local-storage';
|
|
20
20
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
21
|
import { useClient } from '@dxos/react-client';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
type Space,
|
|
24
|
+
SpaceState,
|
|
25
|
+
fullyQualifiedId,
|
|
26
|
+
getSpace,
|
|
27
|
+
isLiveObject,
|
|
28
|
+
isSpace,
|
|
29
|
+
parseId,
|
|
30
|
+
useSpace,
|
|
31
|
+
} from '@dxos/react-client/echo';
|
|
23
32
|
import { Input, useTranslation } from '@dxos/react-ui';
|
|
24
33
|
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
25
34
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
26
35
|
import { DataType, type TypenameAnnotation, TypenameAnnotationId } from '@dxos/schema';
|
|
27
36
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
28
37
|
|
|
29
|
-
import { SpaceCapabilities } from './capabilities';
|
|
30
38
|
import {
|
|
31
|
-
CollectionMain,
|
|
32
|
-
CollectionSection,
|
|
33
39
|
CREATE_OBJECT_DIALOG,
|
|
34
40
|
CREATE_SPACE_DIALOG,
|
|
41
|
+
CollectionMain,
|
|
42
|
+
CollectionSection,
|
|
35
43
|
CreateObjectDialog,
|
|
44
|
+
type CreateObjectDialogProps,
|
|
36
45
|
CreateSpaceDialog,
|
|
37
46
|
InlineSyncStatus,
|
|
38
47
|
JOIN_DIALOG,
|
|
39
48
|
JoinDialog,
|
|
40
49
|
MembersContainer,
|
|
41
50
|
MenuFooter,
|
|
51
|
+
ObjectDetailsPanel,
|
|
42
52
|
ObjectSettingsContainer,
|
|
43
53
|
POPOVER_RENAME_OBJECT,
|
|
44
54
|
POPOVER_RENAME_SPACE,
|
|
45
55
|
PopoverRenameObject,
|
|
46
56
|
PopoverRenameSpace,
|
|
57
|
+
RecordMain,
|
|
47
58
|
SchemaContainer,
|
|
48
59
|
SmallPresenceLive,
|
|
49
60
|
SpacePluginSettings,
|
|
50
61
|
SpacePresence,
|
|
51
62
|
SpaceSettingsContainer,
|
|
52
63
|
SyncStatus,
|
|
53
|
-
|
|
64
|
+
ViewEditor,
|
|
54
65
|
} from '../components';
|
|
55
66
|
import { SPACE_PLUGIN } from '../meta';
|
|
56
67
|
import { HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
57
68
|
|
|
69
|
+
import { SpaceCapabilities } from './capabilities';
|
|
70
|
+
|
|
58
71
|
type ReactSurfaceOptions = {
|
|
59
72
|
createInvitationUrl: (invitationCode: string) => string;
|
|
60
73
|
};
|
|
61
74
|
|
|
62
|
-
const OMIT = [
|
|
75
|
+
const OMIT = [DataType.Collection.typename, DataType.QueryCollection.typename];
|
|
63
76
|
|
|
64
77
|
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
65
78
|
contributes(Capabilities.ReactSurface, [
|
|
@@ -73,13 +86,20 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
73
86
|
<Surface
|
|
74
87
|
data={{
|
|
75
88
|
id: data.subject.id,
|
|
76
|
-
subject: data.subject.properties[
|
|
89
|
+
subject: data.subject.properties[DataType.Collection.typename]?.target,
|
|
77
90
|
}}
|
|
78
91
|
role={role}
|
|
79
92
|
{...rest}
|
|
80
93
|
/>
|
|
81
94
|
),
|
|
82
95
|
}),
|
|
96
|
+
createSurface({
|
|
97
|
+
id: `${SPACE_PLUGIN}/record-article`,
|
|
98
|
+
role: 'article',
|
|
99
|
+
position: 'fallback',
|
|
100
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
101
|
+
component: ({ data }) => <RecordMain record={data.subject} />,
|
|
102
|
+
}),
|
|
83
103
|
createSurface({
|
|
84
104
|
id: `${SPACE_PLUGIN}/collection-fallback`,
|
|
85
105
|
role: 'article',
|
|
@@ -146,6 +166,19 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
146
166
|
return <SchemaContainer space={space} />;
|
|
147
167
|
},
|
|
148
168
|
}),
|
|
169
|
+
createSurface({
|
|
170
|
+
id: `${SPACE_PLUGIN}/selected-objects`,
|
|
171
|
+
role: 'article',
|
|
172
|
+
filter: (data): data is { companionTo: DataType.View; subject: 'selected-objects' } =>
|
|
173
|
+
Obj.instanceOf(DataType.View, data.companionTo) && data.subject === 'selected-objects',
|
|
174
|
+
component: ({ data }) => (
|
|
175
|
+
<ObjectDetailsPanel
|
|
176
|
+
key={fullyQualifiedId(data.companionTo)}
|
|
177
|
+
objectId={fullyQualifiedId(data.companionTo)}
|
|
178
|
+
view={data.companionTo}
|
|
179
|
+
/>
|
|
180
|
+
),
|
|
181
|
+
}),
|
|
149
182
|
createSurface({
|
|
150
183
|
id: JOIN_DIALOG,
|
|
151
184
|
role: 'dialog',
|
|
@@ -228,7 +261,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
228
261
|
|
|
229
262
|
const schemaWhitelists = useCapabilities(ClientCapabilities.SchemaWhiteList);
|
|
230
263
|
const whitelistedTypenames = useMemo(
|
|
231
|
-
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => type
|
|
264
|
+
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => Type.getTypename(type)))),
|
|
232
265
|
[schemaWhitelists],
|
|
233
266
|
);
|
|
234
267
|
|
|
@@ -239,7 +272,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
239
272
|
objectForms
|
|
240
273
|
.map((form) => Type.getTypename(form.objectSchema))
|
|
241
274
|
// TODO(wittjosiah): Remove.
|
|
242
|
-
.filter((typename) => !OMIT.includes(typename)),
|
|
275
|
+
.filter((typename) => !OMIT.includes(typename) && !typename.endsWith('View')),
|
|
243
276
|
),
|
|
244
277
|
[objectForms],
|
|
245
278
|
);
|
|
@@ -247,13 +280,23 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
247
280
|
const fixed = client.graph.schemaRegistry.schemas.filter((schema) => {
|
|
248
281
|
const limitedStatic =
|
|
249
282
|
annotation.includes('limited-static') && whitelistedTypenames.has(Type.getTypename(schema));
|
|
283
|
+
const unusedStatic =
|
|
284
|
+
annotation.includes('unused-static') &&
|
|
285
|
+
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
286
|
+
!space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
287
|
+
const usedStatic =
|
|
288
|
+
annotation.includes('used-static') &&
|
|
289
|
+
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
290
|
+
space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
250
291
|
const objectForm = annotation.includes('object-form') && objectFormTypenames.has(Type.getTypename(schema));
|
|
251
|
-
return annotation.includes('static') || limitedStatic || objectForm;
|
|
292
|
+
return annotation.includes('static') || limitedStatic || unusedStatic || usedStatic || objectForm;
|
|
252
293
|
});
|
|
253
294
|
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
254
295
|
const typenames = Array.from(
|
|
255
296
|
new Set<string>([
|
|
256
297
|
...(annotation.includes('limited-static') ||
|
|
298
|
+
annotation.includes('unused-static') ||
|
|
299
|
+
annotation.includes('used-static') ||
|
|
257
300
|
annotation.includes('static') ||
|
|
258
301
|
annotation.includes('object-form')
|
|
259
302
|
? fixed.map((schema) => Type.getTypename(schema))
|
|
@@ -264,25 +307,33 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
264
307
|
|
|
265
308
|
const options = useMemo(
|
|
266
309
|
() =>
|
|
267
|
-
typenames
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
310
|
+
typenames
|
|
311
|
+
.map((typename) => ({
|
|
312
|
+
value: typename,
|
|
313
|
+
label: t('typename label', { ns: typename, defaultValue: typename }),
|
|
314
|
+
}))
|
|
315
|
+
.toSorted((a, b) => a.label.localeCompare(b.label)),
|
|
271
316
|
[t, typenames],
|
|
272
317
|
);
|
|
273
318
|
|
|
274
319
|
return <SelectInput {...props} options={options} />;
|
|
275
320
|
},
|
|
276
321
|
}),
|
|
322
|
+
createSurface({
|
|
323
|
+
id: `${SPACE_PLUGIN}/object-settings`,
|
|
324
|
+
role: 'object-settings',
|
|
325
|
+
filter: (data): data is { subject: DataType.View } => Obj.instanceOf(DataType.View, data.subject),
|
|
326
|
+
component: ({ data }) => <ViewEditor view={data.subject} />,
|
|
327
|
+
}),
|
|
277
328
|
createSurface({
|
|
278
329
|
id: POPOVER_RENAME_SPACE,
|
|
279
|
-
role: 'popover',
|
|
330
|
+
role: 'card--popover',
|
|
280
331
|
filter: (data): data is { props: Space } => data.component === POPOVER_RENAME_SPACE && isSpace(data.props),
|
|
281
332
|
component: ({ data }) => <PopoverRenameSpace space={data.props} />,
|
|
282
333
|
}),
|
|
283
334
|
createSurface({
|
|
284
335
|
id: POPOVER_RENAME_OBJECT,
|
|
285
|
-
role: 'popover',
|
|
336
|
+
role: 'card--popover',
|
|
286
337
|
filter: (data): data is { props: Obj.Any } =>
|
|
287
338
|
data.component === POPOVER_RENAME_OBJECT && isLiveObject(data.props),
|
|
288
339
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
@@ -328,7 +379,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
328
379
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
329
380
|
const object = isSpace(data.subject)
|
|
330
381
|
? data.subject.state.get() === SpaceState.SPACE_READY
|
|
331
|
-
? (space?.properties[
|
|
382
|
+
? (space?.properties[DataType.Collection.typename]?.target as DataType.Collection)
|
|
332
383
|
: undefined
|
|
333
384
|
: data.subject;
|
|
334
385
|
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
7
|
|
|
8
|
-
import { SpaceCapabilities } from './capabilities';
|
|
9
8
|
import { type ObjectForm } from '../types';
|
|
10
9
|
|
|
10
|
+
import { SpaceCapabilities } from './capabilities';
|
|
11
|
+
|
|
11
12
|
export default (context: PluginContext) => {
|
|
12
13
|
const registry = context.getCapability(Capabilities.RxRegistry);
|
|
13
14
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { Schema, SchemaAST } from 'effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { Capabilities,
|
|
7
|
+
import { ToolResult, createTool } from '@dxos/ai';
|
|
8
|
+
import { Capabilities, type PromiseIntentDispatcher, contributes } from '@dxos/app-framework';
|
|
9
9
|
import { type Space } from '@dxos/client/echo';
|
|
10
10
|
import { Type } from '@dxos/echo';
|
|
11
11
|
import { FormatEnum, FormatEnums, SelectOptionSchema } from '@dxos/echo-schema';
|
|
@@ -61,8 +61,8 @@ export default () =>
|
|
|
61
61
|
contributes(Capabilities.Tools, [
|
|
62
62
|
createTool(SYSTEM_NAMESPACE, {
|
|
63
63
|
name: 'list',
|
|
64
|
-
description: 'List registered
|
|
65
|
-
caption: 'Listing registered
|
|
64
|
+
description: 'List registered record types in the space.',
|
|
65
|
+
caption: 'Listing registered record types...',
|
|
66
66
|
schema: Schema.Struct({}),
|
|
67
67
|
execute: async (_input, { extensions }) => {
|
|
68
68
|
invariant(extensions?.space, 'No space.');
|
|
@@ -79,11 +79,11 @@ export default () =>
|
|
|
79
79
|
}),
|
|
80
80
|
createTool(SYSTEM_NAMESPACE, {
|
|
81
81
|
name: 'get',
|
|
82
|
-
description: 'Get a specific
|
|
83
|
-
caption: 'Getting
|
|
82
|
+
description: 'Get a specific record type by its name.',
|
|
83
|
+
caption: 'Getting record...',
|
|
84
84
|
schema: Schema.Struct({
|
|
85
85
|
typename: Schema.String.annotations({
|
|
86
|
-
description: 'The fully qualified
|
|
86
|
+
description: 'The fully qualified name of the record type.',
|
|
87
87
|
}),
|
|
88
88
|
}),
|
|
89
89
|
execute: async ({ typename }, { extensions }) => {
|
|
@@ -100,15 +100,15 @@ export default () =>
|
|
|
100
100
|
}),
|
|
101
101
|
createTool(SYSTEM_NAMESPACE, {
|
|
102
102
|
name: 'create',
|
|
103
|
-
description: 'Create a new
|
|
104
|
-
caption: 'Creating
|
|
103
|
+
description: 'Create a new record type with the provided definition.',
|
|
104
|
+
caption: 'Creating record type...',
|
|
105
105
|
schema: Schema.Struct({
|
|
106
106
|
typename: TypeNameSchema.annotations({
|
|
107
107
|
description:
|
|
108
|
-
'The fully qualified
|
|
108
|
+
'The fully qualified name of the record type. Must start with a domain, and then one or more path components (e.g., "example.com/type/TypeName").',
|
|
109
109
|
}),
|
|
110
110
|
properties: Schema.Array(PropertyDefinitionSchema).pipe(
|
|
111
|
-
Schema.annotations({ description: 'Array of property definitions for the
|
|
111
|
+
Schema.annotations({ description: 'Array of property definitions for the record.' }),
|
|
112
112
|
Schema.mutable,
|
|
113
113
|
),
|
|
114
114
|
}),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Option } from 'effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
8
|
import { SubscriptionList } from '@dxos/async';
|
|
9
9
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
10
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
@@ -14,13 +14,14 @@ import { ClientCapabilities } from '@dxos/plugin-client';
|
|
|
14
14
|
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
15
15
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
16
|
import { PublicKey } from '@dxos/react-client';
|
|
17
|
-
import { FQ_ID_LENGTH,
|
|
17
|
+
import { FQ_ID_LENGTH, SpaceState, parseFullyQualifiedId } from '@dxos/react-client/echo';
|
|
18
18
|
import { ComplexMap, reduceGroupBy } from '@dxos/util';
|
|
19
19
|
|
|
20
|
-
import { SpaceCapabilities } from './capabilities';
|
|
21
20
|
import { SpaceAction } from '../types';
|
|
22
21
|
import { COMPOSER_SPACE_LOCK, SHARED } from '../util';
|
|
23
22
|
|
|
23
|
+
import { SpaceCapabilities } from './capabilities';
|
|
24
|
+
|
|
24
25
|
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
25
26
|
const WAIT_FOR_OBJECT_TIMEOUT = 5_000;
|
|
26
27
|
|
|
@@ -66,12 +67,14 @@ export default async (context: PluginContext) => {
|
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
const
|
|
70
|
-
|
|
70
|
+
const id = active[0];
|
|
71
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
72
|
+
if (!node && id.length === FQ_ID_LENGTH) {
|
|
73
|
+
void graph.initialize(id);
|
|
71
74
|
const timeout = setTimeout(async () => {
|
|
72
|
-
const node = graph.getNode(
|
|
75
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
73
76
|
if (!node) {
|
|
74
|
-
await dispatch(createIntent(SpaceAction.WaitForObject, { id
|
|
77
|
+
await dispatch(createIntent(SpaceAction.WaitForObject, { id }));
|
|
75
78
|
}
|
|
76
79
|
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
77
80
|
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import { effect } from '@preact/signals-core';
|
|
6
6
|
|
|
7
|
-
import { Capabilities,
|
|
7
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
10
|
import { ComplexMap } from '@dxos/util';
|
|
11
11
|
|
|
12
|
-
import { SpaceCapabilities } from './capabilities';
|
|
13
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
13
|
import { type PluginState } from '../types';
|
|
15
14
|
|
|
15
|
+
import { SpaceCapabilities } from './capabilities';
|
|
16
|
+
|
|
16
17
|
export default (context: PluginContext) => {
|
|
17
18
|
const state = new LocalStorageStore<PluginState>(SPACE_PLUGIN, {
|
|
18
19
|
awaiting: undefined,
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { CheckCircle, CircleDashed, CircleNotch } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useIntentDispatcher, useLayout } from '@dxos/app-framework';
|
|
9
8
|
import { useClient } from '@dxos/react-client';
|
|
10
9
|
import { Filter, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
|
|
11
|
-
import { Button, Toast, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
10
|
+
import { Button, Icon, Toast, useTranslation } from '@dxos/react-ui';
|
|
13
11
|
|
|
14
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
15
13
|
import { SpaceAction } from '../types';
|
|
@@ -66,17 +64,17 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
66
64
|
<Toast.Title classNames='flex items-center gap-2'>
|
|
67
65
|
{found ? (
|
|
68
66
|
<>
|
|
69
|
-
<
|
|
67
|
+
<Icon icon='ph--check-circle--regular' size={5} />
|
|
70
68
|
<span>{t('found object label')}</span>
|
|
71
69
|
</>
|
|
72
70
|
) : waiting ? (
|
|
73
71
|
<>
|
|
74
|
-
<
|
|
72
|
+
<Icon icon='ph--circle-notch--regular' size={5} classNames='animate-spin' />
|
|
75
73
|
<span>{t('waiting for object label')}</span>
|
|
76
74
|
</>
|
|
77
75
|
) : (
|
|
78
76
|
<>
|
|
79
|
-
<
|
|
77
|
+
<Icon icon='ph--circle-dashed--regular' size={5} />
|
|
80
78
|
<span>{t('object not found label')}</span>
|
|
81
79
|
</>
|
|
82
80
|
)}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { useEffect } from 'react';
|
|
9
9
|
|
|
10
10
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
@@ -12,11 +12,12 @@ import { useQuery, useSpace } from '@dxos/react-client/echo';
|
|
|
12
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
13
|
import { Dialog } from '@dxos/react-ui';
|
|
14
14
|
import { DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
15
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
16
16
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
17
17
|
|
|
18
|
+
import { translations } from '../../translations';
|
|
19
|
+
|
|
18
20
|
import { CreateObjectDialog, type CreateObjectDialogProps } from './CreateObjectDialog';
|
|
19
|
-
import translations from '../../translations';
|
|
20
21
|
|
|
21
22
|
const Story = (args: CreateObjectDialogProps) => {
|
|
22
23
|
return (
|
|
@@ -39,7 +40,7 @@ const meta: Meta<typeof CreateObjectDialog> = {
|
|
|
39
40
|
withLayout(),
|
|
40
41
|
],
|
|
41
42
|
parameters: {
|
|
42
|
-
translations: [...translations,
|
|
43
|
+
translations: [...translations, ...shellTranslations],
|
|
43
44
|
},
|
|
44
45
|
args: {},
|
|
45
46
|
};
|