@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { pipe } from 'effect';
|
|
5
|
+
import { Effect, pipe } from 'effect';
|
|
6
6
|
import React, { useCallback, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import {
|
|
@@ -14,23 +14,25 @@ import {
|
|
|
14
14
|
useIntentDispatcher,
|
|
15
15
|
usePluginManager,
|
|
16
16
|
} from '@dxos/app-framework';
|
|
17
|
-
import { Query, Type
|
|
17
|
+
import { Obj, Query, Type } from '@dxos/echo';
|
|
18
18
|
import { invariant } from '@dxos/invariant';
|
|
19
19
|
import { useClient } from '@dxos/react-client';
|
|
20
|
-
import { getSpace, isLiveObject, isSpace,
|
|
20
|
+
import { type Space, getSpace, isLiveObject, isSpace, useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
21
21
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
22
22
|
import { cardDialogContent, cardDialogHeader } from '@dxos/react-ui-stack';
|
|
23
23
|
import { DataType } from '@dxos/schema';
|
|
24
24
|
import { isNonNullable } from '@dxos/util';
|
|
25
25
|
|
|
26
|
-
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
27
26
|
import { SpaceCapabilities } from '../../capabilities';
|
|
28
27
|
import { SPACE_PLUGIN } from '../../meta';
|
|
29
28
|
import { SpaceAction } from '../../types';
|
|
30
29
|
|
|
30
|
+
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
31
|
+
|
|
31
32
|
export const CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
32
33
|
|
|
33
34
|
export type CreateObjectDialogProps = Pick<CreateObjectPanelProps, 'target' | 'typename' | 'name'> & {
|
|
35
|
+
onCreateObject?: (object: Obj.Any) => void;
|
|
34
36
|
shouldNavigate?: (object: Obj.Any) => boolean;
|
|
35
37
|
};
|
|
36
38
|
|
|
@@ -38,6 +40,7 @@ export const CreateObjectDialog = ({
|
|
|
38
40
|
target: initialTarget,
|
|
39
41
|
typename: initialTypename,
|
|
40
42
|
name,
|
|
43
|
+
onCreateObject,
|
|
41
44
|
shouldNavigate: _shouldNavigate,
|
|
42
45
|
}: CreateObjectDialogProps) => {
|
|
43
46
|
const closeRef = useRef<HTMLButtonElement | null>(null);
|
|
@@ -45,7 +48,7 @@ export const CreateObjectDialog = ({
|
|
|
45
48
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
46
49
|
const client = useClient();
|
|
47
50
|
const spaces = useSpaces();
|
|
48
|
-
const {
|
|
51
|
+
const { dispatch } = useIntentDispatcher();
|
|
49
52
|
const forms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
50
53
|
const [target, setTarget] = useState<Space | DataType.Collection | undefined>(initialTarget);
|
|
51
54
|
const [typename, setTypename] = useState<string | undefined>(initialTypename);
|
|
@@ -60,31 +63,33 @@ export const CreateObjectDialog = ({
|
|
|
60
63
|
);
|
|
61
64
|
|
|
62
65
|
const handleCreateObject = useCallback<NonNullable<CreateObjectPanelProps['onCreateObject']>>(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
({ form, data = {} }) =>
|
|
67
|
+
Effect.gen(function* () {
|
|
68
|
+
if (!target) {
|
|
69
|
+
// TODO(wittjosiah): UI feedback.
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// NOTE: Must close before navigating or attention won't follow object.
|
|
74
|
+
closeRef.current?.click();
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
const space = isSpace(target) ? target : getSpace(target);
|
|
77
|
+
invariant(space, 'Missing space');
|
|
78
|
+
const { object } = yield* dispatch(form.getIntent(data, { space }));
|
|
79
|
+
if (isLiveObject(object) && !Obj.instanceOf(DataType.StoredSchema, object)) {
|
|
80
|
+
// TODO(wittjosiah): Selection in navtree isn't working as expected when hidden typenames evals to true.
|
|
81
|
+
const hidden = form.hidden || hiddenTypenames.includes(Type.getTypename(form.objectSchema));
|
|
82
|
+
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object, hidden });
|
|
83
|
+
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
84
|
+
if (shouldNavigate(object)) {
|
|
85
|
+
yield* dispatch(pipe(addObjectIntent, chain(LayoutAction.Open, { part: 'main' })));
|
|
86
|
+
} else {
|
|
87
|
+
yield* dispatch(addObjectIntent);
|
|
88
|
+
}
|
|
71
89
|
|
|
72
|
-
|
|
73
|
-
invariant(space, 'Missing space');
|
|
74
|
-
const result = await dispatch(form.getIntent(data, { space }));
|
|
75
|
-
const object = result.data?.object;
|
|
76
|
-
if (isLiveObject(object)) {
|
|
77
|
-
// TODO(wittjosiah): Selection in navtree isn't working as expected when hidden typenames evals to true.
|
|
78
|
-
const hidden = form.hidden || hiddenTypenames.includes(Type.getTypename(form.objectSchema));
|
|
79
|
-
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object, hidden });
|
|
80
|
-
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
81
|
-
if (shouldNavigate(object)) {
|
|
82
|
-
await dispatch(pipe(addObjectIntent, chain(LayoutAction.Open, { part: 'main' })));
|
|
83
|
-
} else {
|
|
84
|
-
await dispatch(addObjectIntent);
|
|
90
|
+
onCreateObject?.(object);
|
|
85
91
|
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
92
|
+
}).pipe(Effect.runPromise),
|
|
88
93
|
[dispatch, target, resolve, hiddenTypenames, _shouldNavigate],
|
|
89
94
|
);
|
|
90
95
|
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Type } from '@dxos/echo';
|
|
8
|
-
import {
|
|
9
|
-
import { type
|
|
8
|
+
import { type TypeAnnotation, getTypeAnnotation } from '@dxos/echo-schema';
|
|
9
|
+
import { type Space, type SpaceId } from '@dxos/react-client/echo';
|
|
10
10
|
import { Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { Form } from '@dxos/react-ui-form';
|
|
12
12
|
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
13
13
|
import { cardDialogOverflow, cardDialogPaddedOverflow, cardDialogSearchListRoot } from '@dxos/react-ui-stack';
|
|
14
14
|
import { type DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
15
|
+
import { type MaybePromise, isNonNullable } from '@dxos/util';
|
|
16
16
|
|
|
17
17
|
import { useInputSurfaceLookup } from '../../hooks';
|
|
18
18
|
import { SPACE_PLUGIN } from '../../meta';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Effect, type Schema } from 'effect';
|
|
6
6
|
import React, { useCallback, useRef } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
import { cardDialogContent, cardDialogHeader } from '@dxos/react-ui-stack';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
8
|
import { Trigger } from '@dxos/async';
|
|
9
9
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
10
10
|
import { useClient } from '@dxos/react-client';
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
|
|
9
9
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
12
|
+
|
|
13
|
+
import { translations } from '../translations';
|
|
12
14
|
|
|
13
15
|
import { MembersContainer } from './MembersContainer';
|
|
14
|
-
import translations from '../translations';
|
|
15
16
|
|
|
16
17
|
const meta: Meta = {
|
|
17
18
|
title: 'plugins/plugin-space/MembersContainer',
|
|
@@ -19,7 +20,7 @@ const meta: Meta = {
|
|
|
19
20
|
decorators: [withClientProvider({ createIdentity: true, createSpace: true }), withTheme, withLayout()],
|
|
20
21
|
parameters: {
|
|
21
22
|
layout: 'fullscreen',
|
|
22
|
-
translations: [...translations,
|
|
23
|
+
translations: [...translations, ...shellTranslations],
|
|
23
24
|
},
|
|
24
25
|
};
|
|
25
26
|
|
|
@@ -2,20 +2,17 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Check, X } from '@phosphor-icons/react';
|
|
6
5
|
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
7
6
|
import { QR } from 'react-qr-rounded';
|
|
8
7
|
|
|
9
8
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
10
|
-
import { Type } from '@dxos/echo';
|
|
11
9
|
import { log } from '@dxos/log';
|
|
12
10
|
import { useConfig } from '@dxos/react-client';
|
|
13
|
-
import { fullyQualifiedId, useSpaceInvitations
|
|
11
|
+
import { type Space, fullyQualifiedId, useSpaceInvitations } from '@dxos/react-client/echo';
|
|
14
12
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
15
13
|
import { Button, Clipboard, Icon, Input, useId, useTranslation } from '@dxos/react-ui';
|
|
16
|
-
import {
|
|
14
|
+
import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
17
15
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
18
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
19
16
|
import { DataType } from '@dxos/schema';
|
|
20
17
|
import {
|
|
21
18
|
type ActionMenuItem,
|
|
@@ -67,7 +64,7 @@ export const MembersContainer = ({
|
|
|
67
64
|
};
|
|
68
65
|
|
|
69
66
|
// TODO(wittjosiah): Track which was the most recently viewed object.
|
|
70
|
-
const target = space.properties[
|
|
67
|
+
const target = space.properties[DataType.Collection.typename]?.target?.objects[0]?.target;
|
|
71
68
|
|
|
72
69
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
73
70
|
const handleChangeLocked = useCallback(() => {
|
|
@@ -281,5 +278,9 @@ const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string;
|
|
|
281
278
|
};
|
|
282
279
|
|
|
283
280
|
const InvitationComplete = ({ statusValue }: { statusValue: number }) => {
|
|
284
|
-
return statusValue > 0 ?
|
|
281
|
+
return statusValue > 0 ? (
|
|
282
|
+
<Icon icon='ph--check--regular' size={6} classNames='m-1.5' />
|
|
283
|
+
) : (
|
|
284
|
+
<Icon icon='ph--x--regular' size={6} classNames='m-1.5' />
|
|
285
|
+
);
|
|
285
286
|
};
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Planet } from '@phosphor-icons/react';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import { getSpace } from '@dxos/client/echo';
|
|
9
8
|
import { type Obj } from '@dxos/echo';
|
|
10
9
|
import { useClient } from '@dxos/react-client';
|
|
11
|
-
import { DropdownMenu, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
12
11
|
|
|
13
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
13
|
import { getSpaceDisplayName } from '../util';
|
|
@@ -25,7 +24,7 @@ export const MenuFooter = ({ object }: { object: Obj.Any }) => {
|
|
|
25
24
|
<dl className='pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2'>
|
|
26
25
|
<dt className='uppercase text-[.75em] tracking-wide font-medium mbs-px self-start'>{t('location label')}</dt>
|
|
27
26
|
<dd className='line-clamp-3'>
|
|
28
|
-
<
|
|
27
|
+
<Icon icon='ph--planet--regular' classNames='inline-block mie-1' />
|
|
29
28
|
{toLocalizedString(spaceName, t)}
|
|
30
29
|
</dd>
|
|
31
30
|
</dl>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type JsonPath, setValue } from '@dxos/echo-schema';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { useClient } from '@dxos/react-client';
|
|
10
|
+
import { Filter, getSpace, useQuery, useSchema } from '@dxos/react-client/echo';
|
|
11
|
+
import { Callout, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { useSelected } from '@dxos/react-ui-attention';
|
|
13
|
+
import { Form, useRefQueryLookupHandler } from '@dxos/react-ui-form';
|
|
14
|
+
import { type DataType } from '@dxos/schema';
|
|
15
|
+
import { isNonNullable } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { SPACE_PLUGIN } from '../meta';
|
|
18
|
+
|
|
19
|
+
type RowDetailsPanelProps = { objectId: string; view: DataType.View };
|
|
20
|
+
|
|
21
|
+
const ObjectDetailsPanel = ({ objectId, view }: RowDetailsPanelProps) => {
|
|
22
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
23
|
+
const client = useClient();
|
|
24
|
+
const space = getSpace(view);
|
|
25
|
+
const schema = useSchema(client, space, view.query?.typename);
|
|
26
|
+
|
|
27
|
+
const queriedObjects = useQuery(space, schema ? Filter.type(schema) : Filter.nothing());
|
|
28
|
+
const selectedRows = useSelected(objectId, 'multi');
|
|
29
|
+
const selectedObjects = selectedRows.map((id) => queriedObjects.find((obj) => obj.id === id)).filter(isNonNullable);
|
|
30
|
+
|
|
31
|
+
const handleRefQueryLookup = useRefQueryLookupHandler({ space });
|
|
32
|
+
|
|
33
|
+
const handleSave = useCallback(
|
|
34
|
+
(values: any, { changed }: { changed: Record<JsonPath, boolean> }) => {
|
|
35
|
+
const id = values.id;
|
|
36
|
+
invariant(typeof id === 'string');
|
|
37
|
+
const object = queriedObjects.find((obj) => obj.id === id);
|
|
38
|
+
invariant(object);
|
|
39
|
+
|
|
40
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
41
|
+
for (const path of changedPaths) {
|
|
42
|
+
const value = values[path];
|
|
43
|
+
setValue(object, path, value);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[queriedObjects],
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
if (selectedObjects.length === 0) {
|
|
50
|
+
return (
|
|
51
|
+
<div role='none' className='plb-cardSpacingBlock pli-cardSpacingInline'>
|
|
52
|
+
<Callout.Root classNames='is-full'>
|
|
53
|
+
<Callout.Title>{t('row details no selection label')}</Callout.Title>
|
|
54
|
+
</Callout.Root>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div role='none' className='bs-full is-full flex flex-col p-2 gap-1 overflow-y-auto'>
|
|
61
|
+
{schema &&
|
|
62
|
+
selectedObjects.map((object) => (
|
|
63
|
+
<div key={object.id} className='border border-separator rounded'>
|
|
64
|
+
<Form
|
|
65
|
+
autoSave
|
|
66
|
+
schema={schema}
|
|
67
|
+
values={object}
|
|
68
|
+
onSave={handleSave}
|
|
69
|
+
onQueryRefOptions={handleRefQueryLookup}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
))}
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export default ObjectDetailsPanel;
|
|
@@ -9,9 +9,10 @@ import { ForeignKey } from '@dxos/echo-schema';
|
|
|
9
9
|
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
12
|
-
import { ForeignKeys } from './ForeignKeys';
|
|
13
12
|
import { SPACE_PLUGIN } from '../../meta';
|
|
14
13
|
|
|
14
|
+
import { ForeignKeys } from './ForeignKeys';
|
|
15
|
+
|
|
15
16
|
const initialValues = {
|
|
16
17
|
source: '',
|
|
17
18
|
id: '',
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { ArrowsCounterClockwise, CheckCircle, Warning } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useEffect, useState } from 'react';
|
|
7
6
|
|
|
8
7
|
import { debounce } from '@dxos/async';
|
|
9
8
|
import { type EchoDatabase } from '@dxos/react-client/echo';
|
|
10
|
-
import { Tooltip, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import {
|
|
9
|
+
import { Icon, Tooltip, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { mx, staticPlaceholderText, warningText } from '@dxos/react-ui-theme';
|
|
12
11
|
|
|
13
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
13
|
|
|
@@ -54,14 +53,14 @@ export const PersistenceStatus = ({ db }: { db: EchoDatabase }) => {
|
|
|
54
53
|
case Status.ERROR:
|
|
55
54
|
return (
|
|
56
55
|
<div className='flex items-center'>
|
|
57
|
-
<
|
|
56
|
+
<Icon icon='ph--warning--regular' size={4} classNames='me-1' />
|
|
58
57
|
<span className={mx('text-sm', warningText)}>{t('persistence error label')}</span>
|
|
59
58
|
</div>
|
|
60
59
|
);
|
|
61
60
|
case Status.PENDING:
|
|
62
61
|
return (
|
|
63
62
|
<div className='flex items-center'>
|
|
64
|
-
<
|
|
63
|
+
<Icon icon='ph--arrows-counter-clockwise--regular' size={4} classNames='me-1' />
|
|
65
64
|
<span className={mx('text-sm', staticPlaceholderText)}>{t('persistence pending label')}</span>
|
|
66
65
|
</div>
|
|
67
66
|
);
|
|
@@ -74,7 +73,7 @@ export const PersistenceStatus = ({ db }: { db: EchoDatabase }) => {
|
|
|
74
73
|
content={t('persisted locally message')}
|
|
75
74
|
className='flex items-center'
|
|
76
75
|
>
|
|
77
|
-
<
|
|
76
|
+
<Icon icon='ph--check-circle--regular' size={4} classNames='me-1' />
|
|
78
77
|
{displayMessage && (
|
|
79
78
|
<span className={mx('text-sm', staticPlaceholderText)}>{t('persisted locally label')}</span>
|
|
80
79
|
)}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
8
9
|
import { type Live } from '@dxos/live-object';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
11
|
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
@@ -13,24 +14,17 @@ import { SPACE_PLUGIN } from '../meta';
|
|
|
13
14
|
|
|
14
15
|
export const POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
15
16
|
|
|
16
|
-
export const PopoverRenameObject = ({ object
|
|
17
|
+
export const PopoverRenameObject = ({ object }: { object: Live<any> }) => {
|
|
17
18
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
18
19
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
19
|
-
|
|
20
|
-
const object = obj as any;
|
|
21
|
-
// TODO(burdon): Field should not be hardcoded field.
|
|
22
|
-
const [name, setName] = useState(object.name || object.title || '');
|
|
20
|
+
const [name, setName] = useState(Obj.getLabel(object));
|
|
23
21
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
24
22
|
|
|
25
23
|
const handleDone = useCallback(() => {
|
|
26
24
|
try {
|
|
27
|
-
|
|
28
|
-
} catch {
|
|
29
|
-
|
|
30
|
-
object.title = name;
|
|
31
|
-
} catch (err) {
|
|
32
|
-
log.error('Failed to rename object', { err });
|
|
33
|
-
}
|
|
25
|
+
name && Obj.setLabel(object, name);
|
|
26
|
+
} catch (err) {
|
|
27
|
+
log.error('Failed to rename object', { err });
|
|
34
28
|
}
|
|
35
29
|
void dispatch(
|
|
36
30
|
createIntent(LayoutAction.UpdatePopover, {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
9
|
import { Button, Input, Popover, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { type JsonPath, setValue } from '@dxos/echo-schema';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
11
|
+
import { Form, useRefQueryLookupHandler } from '@dxos/react-ui-form';
|
|
12
|
+
|
|
13
|
+
export const RecordMain = ({ record }: { record: Obj.Any }) => {
|
|
14
|
+
const space = getSpace(record);
|
|
15
|
+
const schema = Obj.getSchema(record);
|
|
16
|
+
invariant(schema, 'Record has no schema.');
|
|
17
|
+
|
|
18
|
+
const handleRefQueryLookup = useRefQueryLookupHandler({ space });
|
|
19
|
+
|
|
20
|
+
const handleSave = useCallback(
|
|
21
|
+
(values: any, { changed }: { changed: Record<JsonPath, boolean> }) => {
|
|
22
|
+
const id = values.id;
|
|
23
|
+
invariant(typeof id === 'string');
|
|
24
|
+
|
|
25
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
26
|
+
for (const path of changedPaths) {
|
|
27
|
+
const value = values[path];
|
|
28
|
+
setValue(record, path, value);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
[record],
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div role='none' className='container-max-width flex flex-col p-2 gap-1 overflow-y-auto'>
|
|
36
|
+
<div key={record.id} className='border border-separator rounded'>
|
|
37
|
+
<Form autoSave schema={schema} values={record} onSave={handleSave} onQueryRefOptions={handleRefQueryLookup} />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default RecordMain;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type Type } from '@dxos/echo';
|
|
8
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
9
|
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
10
|
+
import { ControlPage, ControlSection, controlItemClasses } from '@dxos/react-ui-form';
|
|
11
11
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
12
12
|
|
|
13
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
@@ -7,8 +7,8 @@ import React from 'react';
|
|
|
7
7
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
8
|
import { useClient } from '@dxos/react-client';
|
|
9
9
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { IconButton, Input, List, ListItem, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { ControlPage, ControlSection, DeprecatedFormInput, controlItemClasses } from '@dxos/react-ui-form';
|
|
12
12
|
|
|
13
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
14
|
import { SpaceAction, type SpaceSettingsProps } from '../types';
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
7
|
+
import { type Meta } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { IdentityDid, PublicKey } from '@dxos/keys';
|
|
11
11
|
import { HaloSpaceMember, SpaceMember } from '@dxos/react-client/echo';
|
|
12
12
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import { translations } from '../translations';
|
|
15
|
+
|
|
16
|
+
import { FullPresence, type Member, type MemberPresenceProps, SmallPresence } from './SpacePresence';
|
|
16
17
|
|
|
17
18
|
const nViewers = (n: number, currentlyAttended = true): Member[] =>
|
|
18
19
|
Array.from({ length: n }, () => ({
|
|
@@ -9,22 +9,22 @@ import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
|
9
9
|
import { generateName } from '@dxos/display-name';
|
|
10
10
|
import { type Type } from '@dxos/echo';
|
|
11
11
|
import { PublicKey, useClient } from '@dxos/react-client';
|
|
12
|
-
import {
|
|
12
|
+
import { type SpaceMember, fullyQualifiedId, getSpace, useMembers } from '@dxos/react-client/echo';
|
|
13
13
|
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
14
14
|
import {
|
|
15
15
|
Avatar,
|
|
16
16
|
type AvatarContentProps,
|
|
17
|
+
type DxAvatar,
|
|
18
|
+
List,
|
|
19
|
+
ListItem,
|
|
20
|
+
Popover,
|
|
17
21
|
type Size,
|
|
18
22
|
type ThemedClassName,
|
|
19
23
|
Tooltip,
|
|
20
|
-
Popover,
|
|
21
|
-
useTranslation,
|
|
22
|
-
List,
|
|
23
|
-
ListItem,
|
|
24
24
|
useDefaultValue,
|
|
25
|
-
|
|
25
|
+
useTranslation,
|
|
26
26
|
} from '@dxos/react-ui';
|
|
27
|
-
import { AttentionGlyph, useAttended, useAttention
|
|
27
|
+
import { AttentionGlyph, type AttentionGlyphProps, useAttended, useAttention } from '@dxos/react-ui-attention';
|
|
28
28
|
import { ComplexMap, keyToFallback } from '@dxos/util';
|
|
29
29
|
|
|
30
30
|
import { SpaceCapabilities } from '../capabilities';
|
|
@@ -4,14 +4,15 @@
|
|
|
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 from 'react';
|
|
9
9
|
|
|
10
10
|
import { useClientProvider, withClientProvider } from '@dxos/react-client/testing';
|
|
11
11
|
import { withTheme } from '@dxos/storybook-utils';
|
|
12
12
|
|
|
13
|
+
import { translations } from '../../translations';
|
|
14
|
+
|
|
13
15
|
import { SpaceSettingsContainer, type SpaceSettingsContainerProps } from './SpaceSettingsContainer';
|
|
14
|
-
import translations from '../../translations';
|
|
15
16
|
|
|
16
17
|
const Story = (args: Partial<SpaceSettingsContainerProps>) => {
|
|
17
18
|
const { space } = useClientProvider();
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Schema, pipe } from 'effect';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import { chain, createIntent,
|
|
8
|
+
import { LayoutAction, chain, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
12
|
-
import {
|
|
12
|
+
import { type Space, SpaceState } from '@dxos/react-client/echo';
|
|
13
13
|
import { Button, Input, useMulticastObservable, useTranslation } from '@dxos/react-ui';
|
|
14
14
|
import {
|
|
15
|
-
Form,
|
|
16
|
-
type InputComponent,
|
|
17
15
|
ControlItem,
|
|
18
16
|
ControlItemInput,
|
|
19
|
-
ControlSection,
|
|
20
17
|
ControlPage,
|
|
18
|
+
ControlSection,
|
|
19
|
+
Form,
|
|
20
|
+
type InputComponent,
|
|
21
21
|
} from '@dxos/react-ui-form';
|
|
22
22
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
23
23
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
@@ -4,28 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
8
|
-
import React from 'react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
9
8
|
|
|
10
|
-
import { withTheme
|
|
9
|
+
import { withTheme } from '@dxos/storybook-utils';
|
|
10
|
+
|
|
11
|
+
import { translations } from '../../translations';
|
|
11
12
|
|
|
12
13
|
import { SyncStatusIndicator } from './SyncStatus';
|
|
13
|
-
import translations from '../../translations';
|
|
14
|
-
|
|
15
|
-
const DefaultStory = (props: any) => {
|
|
16
|
-
return (
|
|
17
|
-
<div className='flex flex-col-reverse p-4'>
|
|
18
|
-
<SyncStatusIndicator {...props} />
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
14
|
|
|
23
15
|
const meta: Meta = {
|
|
24
16
|
title: 'plugins/plugin-space/SyncStatusIndicator',
|
|
25
17
|
component: SyncStatusIndicator,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
decorators: [withTheme],
|
|
19
|
+
parameters: {
|
|
20
|
+
translations,
|
|
21
|
+
layout: 'centered',
|
|
22
|
+
},
|
|
29
23
|
};
|
|
30
24
|
|
|
31
25
|
export default meta;
|