@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
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useInputSurfaceLookup,
|
|
3
3
|
usePath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DYKFFVN6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SpaceCapabilities
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q5EEPP3S.mjs";
|
|
8
8
|
import {
|
|
9
9
|
COMPOSER_SPACE_LOCK,
|
|
10
10
|
getSpaceDisplayName
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SMB4DGYO.mjs";
|
|
12
12
|
import {
|
|
13
13
|
SpaceAction,
|
|
14
14
|
SpaceForm
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3UFG6LQQ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
SPACE_PLUGIN,
|
|
18
18
|
meta
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FBCGT5YY.mjs";
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// src/components/AwaitingObject.tsx
|
|
22
22
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
23
|
-
import { CheckCircle, CircleDashed, CircleNotch } from "@phosphor-icons/react";
|
|
24
23
|
import React, { useCallback, useEffect, useState } from "react";
|
|
25
|
-
import {
|
|
24
|
+
import { LayoutAction, createIntent, useIntentDispatcher, useLayout } from "@dxos/app-framework";
|
|
26
25
|
import { useClient } from "@dxos/react-client";
|
|
27
26
|
import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
|
|
28
|
-
import { Button, Toast, useTranslation } from "@dxos/react-ui";
|
|
29
|
-
import { getSize, mx } from "@dxos/react-ui-theme";
|
|
27
|
+
import { Button, Icon, Toast, useTranslation } from "@dxos/react-ui";
|
|
30
28
|
var WAIT_FOR_OBJECT_TIMEOUT = 18e4;
|
|
31
29
|
var TOAST_TIMEOUT = 24e4;
|
|
32
30
|
var AwaitingObject = ({ id }) => {
|
|
@@ -87,12 +85,16 @@ var AwaitingObject = ({ id }) => {
|
|
|
87
85
|
onOpenChange: setOpen
|
|
88
86
|
}, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
|
|
89
87
|
classNames: "flex items-center gap-2"
|
|
90
|
-
}, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
}, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
89
|
+
icon: "ph--check-circle--regular",
|
|
90
|
+
size: 5
|
|
91
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("found object label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
92
|
+
icon: "ph--circle-notch--regular",
|
|
93
|
+
size: 5,
|
|
94
|
+
classNames: "animate-spin"
|
|
95
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("waiting for object label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
96
|
+
icon: "ph--circle-dashed--regular",
|
|
97
|
+
size: 5
|
|
96
98
|
}), /* @__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, {
|
|
97
99
|
altText: t("go to object alt"),
|
|
98
100
|
asChild: true
|
|
@@ -117,26 +119,40 @@ var AwaitingObject = ({ id }) => {
|
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
121
|
|
|
120
|
-
//
|
|
122
|
+
// src/components/CreateDialog/CreateObjectDialog.tsx
|
|
121
123
|
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
122
|
-
import { pipe } from "effect";
|
|
124
|
+
import { Effect, pipe } from "effect";
|
|
123
125
|
import React3, { useCallback as useCallback3, useRef, useState as useState2 } from "react";
|
|
124
126
|
import { Capabilities, LayoutAction as LayoutAction2, chain, createIntent as createIntent2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework";
|
|
125
|
-
import { Query, Type as Type2 } from "@dxos/echo";
|
|
127
|
+
import { Obj, Query, Type as Type2 } from "@dxos/echo";
|
|
126
128
|
import { invariant } from "@dxos/invariant";
|
|
127
129
|
import { useClient as useClient2 } from "@dxos/react-client";
|
|
128
130
|
import { getSpace, isLiveObject, isSpace, useQuery as useQuery2, useSpaces } from "@dxos/react-client/echo";
|
|
129
|
-
import { Button as Button2, Dialog, Icon as
|
|
131
|
+
import { Button as Button2, Dialog, Icon as Icon3, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
130
132
|
import { cardDialogContent, cardDialogHeader } from "@dxos/react-ui-stack";
|
|
131
133
|
import { DataType } from "@dxos/schema";
|
|
132
134
|
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
133
135
|
|
|
134
|
-
//
|
|
136
|
+
// src/capabilities/index.ts
|
|
137
|
+
import { lazy } from "@dxos/app-framework";
|
|
138
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-VZW75QPJ.mjs"));
|
|
139
|
+
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-YPHYVZAP.mjs"));
|
|
140
|
+
var IdentityCreated = lazy(() => import("./identity-created-T6ZNVE7S.mjs"));
|
|
141
|
+
var IntentResolver = lazy(() => import("./intent-resolver-TS6CCKST.mjs"));
|
|
142
|
+
var ReactRoot = lazy(() => import("./react-root-RQGTZ2ZO.mjs"));
|
|
143
|
+
var ReactSurface = lazy(() => import("./react-surface-V3ARS2BP.mjs"));
|
|
144
|
+
var SchemaDefs = lazy(() => import("./schema-defs-5LBA43X5.mjs"));
|
|
145
|
+
var SchemaTools = lazy(() => import("./schema-tools-LPL35WOJ.mjs"));
|
|
146
|
+
var SpaceSettings = lazy(() => import("./settings-FLLBP5KI.mjs"));
|
|
147
|
+
var SpaceState = lazy(() => import("./state-K3UBPKYP.mjs"));
|
|
148
|
+
var SpacesReady = lazy(() => import("./spaces-ready-FXEP6XEW.mjs"));
|
|
149
|
+
|
|
150
|
+
// src/components/CreateDialog/CreateObjectPanel.tsx
|
|
135
151
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
136
152
|
import React2, { useCallback as useCallback2 } from "react";
|
|
137
153
|
import { Type } from "@dxos/echo";
|
|
138
154
|
import { getTypeAnnotation } from "@dxos/echo-schema";
|
|
139
|
-
import { Icon, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
155
|
+
import { Icon as Icon2, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
140
156
|
import { Form } from "@dxos/react-ui-form";
|
|
141
157
|
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
142
158
|
import { cardDialogOverflow, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
|
|
@@ -274,7 +290,7 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
274
290
|
classNames: "flex items-center gap-2"
|
|
275
291
|
}, /* @__PURE__ */ React2.createElement("span", {
|
|
276
292
|
className: "flex gap-2 items-center grow truncate"
|
|
277
|
-
}, /* @__PURE__ */ React2.createElement(
|
|
293
|
+
}, /* @__PURE__ */ React2.createElement(Icon2, {
|
|
278
294
|
icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
|
|
279
295
|
size: 5
|
|
280
296
|
}), t("typename label", {
|
|
@@ -286,24 +302,10 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
286
302
|
}
|
|
287
303
|
};
|
|
288
304
|
|
|
289
|
-
//
|
|
290
|
-
|
|
291
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-M2RH72VL.mjs"));
|
|
292
|
-
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-F7ISRRBV.mjs"));
|
|
293
|
-
var IdentityCreated = lazy(() => import("./identity-created-PI7TKANR.mjs"));
|
|
294
|
-
var IntentResolver = lazy(() => import("./intent-resolver-RWU6ZE4H.mjs"));
|
|
295
|
-
var ReactRoot = lazy(() => import("./react-root-QIKHSNT2.mjs"));
|
|
296
|
-
var ReactSurface = lazy(() => import("./react-surface-W56UD53I.mjs"));
|
|
297
|
-
var SchemaDefs = lazy(() => import("./schema-defs-WREJNMIC.mjs"));
|
|
298
|
-
var SchemaTools = lazy(() => import("./schema-tools-ILTVSSS3.mjs"));
|
|
299
|
-
var SpaceSettings = lazy(() => import("./settings-K54STC5A.mjs"));
|
|
300
|
-
var SpaceState = lazy(() => import("./state-HRZ4VRXU.mjs"));
|
|
301
|
-
var SpacesReady = lazy(() => import("./spaces-ready-3PDRDHPC.mjs"));
|
|
302
|
-
|
|
303
|
-
// packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
|
|
304
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
|
|
305
|
+
// src/components/CreateDialog/CreateObjectDialog.tsx
|
|
306
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
|
|
305
307
|
var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
306
|
-
var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, name, shouldNavigate: _shouldNavigate }) => {
|
|
308
|
+
var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, name, onCreateObject, shouldNavigate: _shouldNavigate }) => {
|
|
307
309
|
var _effect = _useSignals3();
|
|
308
310
|
try {
|
|
309
311
|
const closeRef = useRef(null);
|
|
@@ -311,7 +313,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
311
313
|
const { t } = useTranslation3(SPACE_PLUGIN);
|
|
312
314
|
const client = useClient2();
|
|
313
315
|
const spaces = useSpaces();
|
|
314
|
-
const {
|
|
316
|
+
const { dispatch } = useIntentDispatcher2();
|
|
315
317
|
const forms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
316
318
|
const [target, setTarget] = useState2(initialTarget);
|
|
317
319
|
const [typename, setTypename] = useState2(initialTypename);
|
|
@@ -321,7 +323,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
321
323
|
const resolve = useCallback3((typename2) => manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
|
|
322
324
|
manager
|
|
323
325
|
]);
|
|
324
|
-
const handleCreateObject = useCallback3(
|
|
326
|
+
const handleCreateObject = useCallback3(({ form, data = {} }) => Effect.gen(function* () {
|
|
325
327
|
if (!target) {
|
|
326
328
|
return;
|
|
327
329
|
}
|
|
@@ -329,18 +331,17 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
329
331
|
const space2 = isSpace(target) ? target : getSpace(target);
|
|
330
332
|
invariant(space2, "Missing space", {
|
|
331
333
|
F: __dxlog_file,
|
|
332
|
-
L:
|
|
333
|
-
S:
|
|
334
|
+
L: 77,
|
|
335
|
+
S: this,
|
|
334
336
|
A: [
|
|
335
337
|
"space",
|
|
336
338
|
"'Missing space'"
|
|
337
339
|
]
|
|
338
340
|
});
|
|
339
|
-
const
|
|
341
|
+
const { object } = yield* dispatch(form.getIntent(data, {
|
|
340
342
|
space: space2
|
|
341
343
|
}));
|
|
342
|
-
|
|
343
|
-
if (isLiveObject(object)) {
|
|
344
|
+
if (isLiveObject(object) && !Obj.instanceOf(DataType.StoredSchema, object)) {
|
|
344
345
|
const hidden = form.hidden || hiddenTypenames.includes(Type2.getTypename(form.objectSchema));
|
|
345
346
|
const addObjectIntent = createIntent2(SpaceAction.AddObject, {
|
|
346
347
|
target,
|
|
@@ -349,14 +350,15 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
349
350
|
});
|
|
350
351
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
351
352
|
if (shouldNavigate(object)) {
|
|
352
|
-
|
|
353
|
+
yield* dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
|
|
353
354
|
part: "main"
|
|
354
355
|
})));
|
|
355
356
|
} else {
|
|
356
|
-
|
|
357
|
+
yield* dispatch(addObjectIntent);
|
|
357
358
|
}
|
|
359
|
+
onCreateObject?.(object);
|
|
358
360
|
}
|
|
359
|
-
}, [
|
|
361
|
+
}).pipe(Effect.runPromise), [
|
|
360
362
|
dispatch,
|
|
361
363
|
target,
|
|
362
364
|
resolve,
|
|
@@ -383,7 +385,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
383
385
|
density: "fine",
|
|
384
386
|
variant: "ghost",
|
|
385
387
|
autoFocus: true
|
|
386
|
-
}, /* @__PURE__ */ React3.createElement(
|
|
388
|
+
}, /* @__PURE__ */ React3.createElement(Icon3, {
|
|
387
389
|
icon: "ph--x--regular",
|
|
388
390
|
size: 4
|
|
389
391
|
})))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
|
|
@@ -404,12 +406,12 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
404
406
|
}
|
|
405
407
|
};
|
|
406
408
|
|
|
407
|
-
//
|
|
409
|
+
// src/components/CreateDialog/CreateSpaceDialog.tsx
|
|
408
410
|
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
409
|
-
import { Effect } from "effect";
|
|
411
|
+
import { Effect as Effect2 } from "effect";
|
|
410
412
|
import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
|
|
411
|
-
import {
|
|
412
|
-
import { Button as Button3, Dialog as Dialog2, Icon as
|
|
413
|
+
import { LayoutAction as LayoutAction3, createIntent as createIntent3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
|
|
414
|
+
import { Button as Button3, Dialog as Dialog2, Icon as Icon4, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
413
415
|
import { Form as Form2 } from "@dxos/react-ui-form";
|
|
414
416
|
import { cardDialogContent as cardDialogContent2, cardDialogHeader as cardDialogHeader2 } from "@dxos/react-ui-stack";
|
|
415
417
|
var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
|
|
@@ -424,7 +426,7 @@ var CreateSpaceDialog = () => {
|
|
|
424
426
|
const { dispatch } = useIntentDispatcher3();
|
|
425
427
|
const inputSurfaceLookup = useInputSurfaceLookup();
|
|
426
428
|
const handleCreateSpace = useCallback4(async (data) => {
|
|
427
|
-
const program =
|
|
429
|
+
const program = Effect2.gen(function* () {
|
|
428
430
|
const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
|
|
429
431
|
yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
|
|
430
432
|
part: "workspace",
|
|
@@ -437,7 +439,7 @@ var CreateSpaceDialog = () => {
|
|
|
437
439
|
}
|
|
438
440
|
}));
|
|
439
441
|
});
|
|
440
|
-
await
|
|
442
|
+
await Effect2.runPromise(program);
|
|
441
443
|
}, [
|
|
442
444
|
dispatch
|
|
443
445
|
]);
|
|
@@ -456,7 +458,7 @@ var CreateSpaceDialog = () => {
|
|
|
456
458
|
density: "fine",
|
|
457
459
|
variant: "ghost",
|
|
458
460
|
autoFocus: true
|
|
459
|
-
}, /* @__PURE__ */ React4.createElement(
|
|
461
|
+
}, /* @__PURE__ */ React4.createElement(Icon4, {
|
|
460
462
|
icon: "ph--x--regular",
|
|
461
463
|
size: 4
|
|
462
464
|
})))), /* @__PURE__ */ React4.createElement("div", {
|
|
@@ -477,39 +479,17 @@ var CreateSpaceDialog = () => {
|
|
|
477
479
|
}
|
|
478
480
|
};
|
|
479
481
|
|
|
480
|
-
//
|
|
482
|
+
// src/components/CollectionSection.tsx
|
|
481
483
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
482
484
|
import React5 from "react";
|
|
483
485
|
import { useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
484
|
-
|
|
485
|
-
var CollectionMain = ({ collection }) => {
|
|
486
|
+
var CollectionSection = ({ collection }) => {
|
|
486
487
|
var _effect = _useSignals5();
|
|
487
488
|
try {
|
|
488
489
|
const { t } = useTranslation5(SPACE_PLUGIN);
|
|
489
490
|
return /* @__PURE__ */ React5.createElement("div", {
|
|
490
|
-
role: "none",
|
|
491
|
-
className: mx2(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
|
|
492
|
-
"data-testid": "composer.firstRunMessage"
|
|
493
|
-
}, /* @__PURE__ */ React5.createElement("p", {
|
|
494
|
-
role: "alert",
|
|
495
|
-
className: mx2(descriptionMessage, "rounded-md p-8 font-normal text-lg max-is-[24rem] break-words")
|
|
496
|
-
}, collection.name ?? t("unnamed collection label")));
|
|
497
|
-
} finally {
|
|
498
|
-
_effect.f();
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
// packages/plugins/plugin-space/src/components/CollectionSection.tsx
|
|
503
|
-
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
504
|
-
import React6 from "react";
|
|
505
|
-
import { useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
506
|
-
var CollectionSection = ({ collection }) => {
|
|
507
|
-
var _effect = _useSignals6();
|
|
508
|
-
try {
|
|
509
|
-
const { t } = useTranslation6(SPACE_PLUGIN);
|
|
510
|
-
return /* @__PURE__ */ React6.createElement("div", {
|
|
511
491
|
className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
|
|
512
|
-
}, /* @__PURE__ */
|
|
492
|
+
}, /* @__PURE__ */ React5.createElement("span", {
|
|
513
493
|
className: "truncate"
|
|
514
494
|
}, collection.name ?? t("unnamed collection label")));
|
|
515
495
|
} finally {
|
|
@@ -517,23 +497,23 @@ var CollectionSection = ({ collection }) => {
|
|
|
517
497
|
}
|
|
518
498
|
};
|
|
519
499
|
|
|
520
|
-
//
|
|
521
|
-
import { useSignals as
|
|
522
|
-
import
|
|
523
|
-
import {
|
|
500
|
+
// src/components/JoinDialog.tsx
|
|
501
|
+
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
502
|
+
import React6, { useCallback as useCallback5 } from "react";
|
|
503
|
+
import { LayoutAction as LayoutAction4, createIntent as createIntent4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
|
|
524
504
|
import { Trigger } from "@dxos/async";
|
|
525
505
|
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
526
506
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
527
|
-
import { Dialog as Dialog3, useTranslation as
|
|
507
|
+
import { Dialog as Dialog3, useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
528
508
|
import { JoinPanel } from "@dxos/shell/react";
|
|
529
509
|
var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
|
|
530
510
|
var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
531
|
-
var _effect =
|
|
511
|
+
var _effect = _useSignals6();
|
|
532
512
|
try {
|
|
533
513
|
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
534
514
|
const client = useClient3();
|
|
535
515
|
const { graph } = useAppGraph();
|
|
536
|
-
const { t } =
|
|
516
|
+
const { t } = useTranslation6(SPACE_PLUGIN);
|
|
537
517
|
const handleDone = useCallback5(async (result) => {
|
|
538
518
|
const spaceKey = result?.spaceKey;
|
|
539
519
|
if (!spaceKey) {
|
|
@@ -614,16 +594,16 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
614
594
|
client,
|
|
615
595
|
graph
|
|
616
596
|
]);
|
|
617
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ React6.createElement(Dialog3.Content, null, /* @__PURE__ */ React6.createElement(Dialog3.Title, {
|
|
618
598
|
classNames: "sr-only"
|
|
619
599
|
}, t("join space label", {
|
|
620
600
|
ns: "os"
|
|
621
|
-
})), /* @__PURE__ */
|
|
601
|
+
})), /* @__PURE__ */ React6.createElement(JoinPanel, {
|
|
622
602
|
...props,
|
|
623
|
-
exitActionParent: /* @__PURE__ */
|
|
603
|
+
exitActionParent: /* @__PURE__ */ React6.createElement(Dialog3.Close, {
|
|
624
604
|
asChild: true
|
|
625
605
|
}),
|
|
626
|
-
doneActionParent: /* @__PURE__ */
|
|
606
|
+
doneActionParent: /* @__PURE__ */ React6.createElement(Dialog3.Close, {
|
|
627
607
|
asChild: true
|
|
628
608
|
}),
|
|
629
609
|
onDone: handleDone
|
|
@@ -633,25 +613,22 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
633
613
|
}
|
|
634
614
|
};
|
|
635
615
|
|
|
636
|
-
//
|
|
637
|
-
import { useSignals as
|
|
638
|
-
import {
|
|
639
|
-
import React8, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
|
|
616
|
+
// src/components/MembersContainer.tsx
|
|
617
|
+
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
618
|
+
import React7, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
|
|
640
619
|
import { QR } from "react-qr-rounded";
|
|
641
620
|
import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
|
|
642
|
-
import { Type as Type3 } from "@dxos/echo";
|
|
643
621
|
import { log } from "@dxos/log";
|
|
644
622
|
import { useConfig } from "@dxos/react-client";
|
|
645
623
|
import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
|
|
646
624
|
import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
|
|
647
|
-
import { Button as Button4, Clipboard, Icon as
|
|
648
|
-
import {
|
|
625
|
+
import { Button as Button4, Clipboard, Icon as Icon5, Input, useId, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
626
|
+
import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
649
627
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
650
|
-
import { getSize as getSize2, mx as mx3 } from "@dxos/react-ui-theme";
|
|
651
628
|
import { DataType as DataType2 } from "@dxos/schema";
|
|
652
629
|
import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport } from "@dxos/shell/react";
|
|
653
630
|
import { hexToEmoji } from "@dxos/util";
|
|
654
|
-
var __dxlog_file2 = "/
|
|
631
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer.tsx";
|
|
655
632
|
var activeActionKey = "dxos:react-shell/space-manager/active-action";
|
|
656
633
|
var handleInvitationEvent = (invitation, subscription) => {
|
|
657
634
|
const invitationCode = InvitationEncoder.encode(invitation);
|
|
@@ -661,7 +638,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
661
638
|
authCode: invitation.authCode
|
|
662
639
|
}), void 0, {
|
|
663
640
|
F: __dxlog_file2,
|
|
664
|
-
L:
|
|
641
|
+
L: 39,
|
|
665
642
|
S: void 0,
|
|
666
643
|
C: (f, a) => f(...a)
|
|
667
644
|
});
|
|
@@ -669,9 +646,9 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
669
646
|
}
|
|
670
647
|
};
|
|
671
648
|
var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
672
|
-
var _effect =
|
|
649
|
+
var _effect = _useSignals7();
|
|
673
650
|
try {
|
|
674
|
-
const { t } =
|
|
651
|
+
const { t } = useTranslation7(SPACE_PLUGIN);
|
|
675
652
|
const config = useConfig();
|
|
676
653
|
const { dispatchPromise: dispatch } = useIntentDispatcher5();
|
|
677
654
|
const invitations = useSpaceInvitations(space.key);
|
|
@@ -683,7 +660,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
683
660
|
setInternalActiveAction(nextAction);
|
|
684
661
|
localStorage.setItem(activeActionKey, nextAction);
|
|
685
662
|
};
|
|
686
|
-
const target = space.properties[
|
|
663
|
+
const target = space.properties[DataType2.Collection.typename]?.target?.objects[0]?.target;
|
|
687
664
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
688
665
|
const handleChangeLocked = useCallback6(() => {
|
|
689
666
|
space.properties[COMPOSER_SPACE_LOCK] = !locked;
|
|
@@ -699,7 +676,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
699
676
|
description: t("invite one description", {
|
|
700
677
|
ns: "os"
|
|
701
678
|
}),
|
|
702
|
-
icon: () => /* @__PURE__ */
|
|
679
|
+
icon: () => /* @__PURE__ */ React7.createElement(Icon5, {
|
|
703
680
|
icon: "ph--user-plus--regular",
|
|
704
681
|
size: 5
|
|
705
682
|
}),
|
|
@@ -724,7 +701,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
724
701
|
description: t("invite many description", {
|
|
725
702
|
ns: "os"
|
|
726
703
|
}),
|
|
727
|
-
icon: () => /* @__PURE__ */
|
|
704
|
+
icon: () => /* @__PURE__ */ React7.createElement(Icon5, {
|
|
728
705
|
icon: "ph--users-three--regular",
|
|
729
706
|
size: 5
|
|
730
707
|
}),
|
|
@@ -754,44 +731,44 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
754
731
|
const handleBack = () => {
|
|
755
732
|
setSelectedInvitation(null);
|
|
756
733
|
};
|
|
757
|
-
return /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ React7.createElement(Clipboard.Provider, null, /* @__PURE__ */ React7.createElement(StackItem.Content, {
|
|
758
735
|
classNames: "block overflow-y-auto"
|
|
759
|
-
}, /* @__PURE__ */
|
|
736
|
+
}, /* @__PURE__ */ React7.createElement(ControlPage, null, /* @__PURE__ */ React7.createElement(ControlSection, {
|
|
760
737
|
title: t("members verbose label"),
|
|
761
738
|
description: t("members description")
|
|
762
|
-
}, /* @__PURE__ */
|
|
739
|
+
}, /* @__PURE__ */ React7.createElement(ControlFrame, null, /* @__PURE__ */ React7.createElement(ControlFrameItem, {
|
|
763
740
|
title: t("members label")
|
|
764
|
-
}, /* @__PURE__ */
|
|
741
|
+
}, /* @__PURE__ */ React7.createElement(SpaceMemberList, {
|
|
765
742
|
spaceKey: space.key,
|
|
766
743
|
includeSelf: true
|
|
767
|
-
})), locked && /* @__PURE__ */
|
|
744
|
+
})), locked && /* @__PURE__ */ React7.createElement(ControlFrameItem, {
|
|
768
745
|
title: t("invitations label")
|
|
769
|
-
}, /* @__PURE__ */
|
|
746
|
+
}, /* @__PURE__ */ React7.createElement("p", {
|
|
770
747
|
className: "text-description mbe-2"
|
|
771
|
-
}, t("locked space description"))), !locked && /* @__PURE__ */
|
|
748
|
+
}, t("locked space description"))), !locked && /* @__PURE__ */ React7.createElement(ControlFrameItem, {
|
|
772
749
|
title: t("invitations label")
|
|
773
|
-
}, selectedInvitation && /* @__PURE__ */
|
|
750
|
+
}, selectedInvitation && /* @__PURE__ */ React7.createElement(InvitationSection, {
|
|
774
751
|
...selectedInvitation,
|
|
775
752
|
onBack: handleBack
|
|
776
|
-
}), !selectedInvitation && /* @__PURE__ */
|
|
753
|
+
}), !selectedInvitation && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
|
|
777
754
|
className: "text-description mbe-2"
|
|
778
|
-
}, t("space invitation description")), /* @__PURE__ */
|
|
755
|
+
}, t("space invitation description")), /* @__PURE__ */ React7.createElement(InvitationList, {
|
|
779
756
|
className: "mb-2",
|
|
780
757
|
send: handleSend,
|
|
781
758
|
invitations: visibleInvitations ?? [],
|
|
782
759
|
onClickRemove: (invitation) => invitation.cancel(),
|
|
783
760
|
createInvitationUrl
|
|
784
|
-
}), /* @__PURE__ */
|
|
761
|
+
}), /* @__PURE__ */ React7.createElement(BifurcatedAction, {
|
|
785
762
|
actions: inviteActions,
|
|
786
763
|
activeAction,
|
|
787
764
|
onChangeActiveAction: setActiveAction,
|
|
788
765
|
"data-testid": "membersContainer.createInvitation"
|
|
789
|
-
})))), /* @__PURE__ */
|
|
766
|
+
})))), /* @__PURE__ */ React7.createElement("div", {
|
|
790
767
|
className: "justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
791
|
-
}, /* @__PURE__ */
|
|
768
|
+
}, /* @__PURE__ */ React7.createElement(ControlItemInput, {
|
|
792
769
|
title: t("space locked label"),
|
|
793
770
|
description: t("space locked description")
|
|
794
|
-
}, /* @__PURE__ */
|
|
771
|
+
}, /* @__PURE__ */ React7.createElement(Input.Switch, {
|
|
795
772
|
checked: locked,
|
|
796
773
|
onCheckedChange: handleChangeLocked,
|
|
797
774
|
classNames: "justify-self-end"
|
|
@@ -801,26 +778,26 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
801
778
|
}
|
|
802
779
|
};
|
|
803
780
|
var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
|
|
804
|
-
var _effect =
|
|
781
|
+
var _effect = _useSignals7();
|
|
805
782
|
try {
|
|
806
783
|
const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
|
|
807
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ React7.createElement(Viewport.Root, {
|
|
808
785
|
activeView
|
|
809
|
-
}, /* @__PURE__ */
|
|
786
|
+
}, /* @__PURE__ */ React7.createElement(Viewport.Views, null, /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
810
787
|
id: "init"
|
|
811
|
-
}), /* @__PURE__ */
|
|
788
|
+
}), /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
812
789
|
id: "complete"
|
|
813
|
-
}, /* @__PURE__ */
|
|
790
|
+
}, /* @__PURE__ */ React7.createElement(InvitationComplete, {
|
|
814
791
|
statusValue: state
|
|
815
|
-
})), /* @__PURE__ */
|
|
792
|
+
})), /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
816
793
|
id: "auth-code"
|
|
817
|
-
}, /* @__PURE__ */
|
|
794
|
+
}, /* @__PURE__ */ React7.createElement(InvitationAuthCode, {
|
|
818
795
|
id: invitationId,
|
|
819
796
|
code: authCode ?? "never",
|
|
820
797
|
onCancel: onBack
|
|
821
|
-
})), /* @__PURE__ */
|
|
798
|
+
})), /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
822
799
|
id: "qr-code"
|
|
823
|
-
}, /* @__PURE__ */
|
|
800
|
+
}, /* @__PURE__ */ React7.createElement(InvitationQR, {
|
|
824
801
|
id: invitationId,
|
|
825
802
|
url,
|
|
826
803
|
onCancel: onBack
|
|
@@ -830,36 +807,36 @@ var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId
|
|
|
830
807
|
}
|
|
831
808
|
};
|
|
832
809
|
var InvitationQR = ({ id, url, onCancel }) => {
|
|
833
|
-
var _effect =
|
|
810
|
+
var _effect = _useSignals7();
|
|
834
811
|
try {
|
|
835
|
-
const { t } =
|
|
812
|
+
const { t } = useTranslation7("os");
|
|
836
813
|
const qrLabel = useId("members-container__qr-code");
|
|
837
814
|
const emoji = hexToEmoji(id);
|
|
838
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
|
|
839
816
|
className: "text-description"
|
|
840
817
|
}, t("qr code description", {
|
|
841
818
|
ns: SPACE_PLUGIN
|
|
842
|
-
})), /* @__PURE__ */
|
|
819
|
+
})), /* @__PURE__ */ React7.createElement("div", {
|
|
843
820
|
role: "group",
|
|
844
821
|
className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
|
|
845
|
-
}, /* @__PURE__ */
|
|
822
|
+
}, /* @__PURE__ */ React7.createElement("div", {
|
|
846
823
|
role: "none",
|
|
847
824
|
className: "is-full aspect-square relative text-description"
|
|
848
|
-
}, /* @__PURE__ */
|
|
825
|
+
}, /* @__PURE__ */ React7.createElement(QR, {
|
|
849
826
|
rounding: 100,
|
|
850
827
|
backgroundColor: "transparent",
|
|
851
828
|
color: "currentColor",
|
|
852
829
|
"aria-labelledby": qrLabel,
|
|
853
830
|
errorCorrectionLevel: "Q",
|
|
854
831
|
cutout: true
|
|
855
|
-
}, url ?? "never"), /* @__PURE__ */
|
|
832
|
+
}, url ?? "never"), /* @__PURE__ */ React7.createElement(Centered, null, /* @__PURE__ */ React7.createElement(Emoji, {
|
|
856
833
|
text: emoji
|
|
857
|
-
}))), /* @__PURE__ */
|
|
834
|
+
}))), /* @__PURE__ */ React7.createElement("span", {
|
|
858
835
|
id: qrLabel,
|
|
859
836
|
className: "sr-only"
|
|
860
|
-
}, t("qr label")), /* @__PURE__ */
|
|
837
|
+
}, t("qr label")), /* @__PURE__ */ React7.createElement(Clipboard.Button, {
|
|
861
838
|
value: url ?? "never"
|
|
862
|
-
})), /* @__PURE__ */
|
|
839
|
+
})), /* @__PURE__ */ React7.createElement(Button4, {
|
|
863
840
|
variant: "ghost",
|
|
864
841
|
onClick: onCancel
|
|
865
842
|
}, t("cancel label")));
|
|
@@ -868,22 +845,22 @@ var InvitationQR = ({ id, url, onCancel }) => {
|
|
|
868
845
|
}
|
|
869
846
|
};
|
|
870
847
|
var InvitationAuthCode = ({ id, code, onCancel }) => {
|
|
871
|
-
var _effect =
|
|
848
|
+
var _effect = _useSignals7();
|
|
872
849
|
try {
|
|
873
|
-
const { t } =
|
|
850
|
+
const { t } = useTranslation7("os");
|
|
874
851
|
const emoji = hexToEmoji(id);
|
|
875
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
|
|
876
853
|
className: "text-description"
|
|
877
|
-
}, t("auth other device emoji message")), emoji && /* @__PURE__ */
|
|
854
|
+
}, t("auth other device emoji message")), emoji && /* @__PURE__ */ React7.createElement(Emoji, {
|
|
878
855
|
text: emoji,
|
|
879
856
|
className: "mli-auto mlb-2 text-center"
|
|
880
|
-
}), /* @__PURE__ */
|
|
857
|
+
}), /* @__PURE__ */ React7.createElement("p", {
|
|
881
858
|
className: "text-description"
|
|
882
|
-
}, t("auth code message")), /* @__PURE__ */
|
|
859
|
+
}, t("auth code message")), /* @__PURE__ */ React7.createElement(AuthCode, {
|
|
883
860
|
code,
|
|
884
861
|
large: true,
|
|
885
862
|
classNames: "mli-auto mlb-2 text-center grow"
|
|
886
|
-
}), /* @__PURE__ */
|
|
863
|
+
}), /* @__PURE__ */ React7.createElement(Button4, {
|
|
887
864
|
variant: "ghost",
|
|
888
865
|
onClick: onCancel
|
|
889
866
|
}, t("cancel label")));
|
|
@@ -892,65 +869,69 @@ var InvitationAuthCode = ({ id, code, onCancel }) => {
|
|
|
892
869
|
}
|
|
893
870
|
};
|
|
894
871
|
var InvitationComplete = ({ statusValue }) => {
|
|
895
|
-
var _effect =
|
|
872
|
+
var _effect = _useSignals7();
|
|
896
873
|
try {
|
|
897
|
-
return statusValue > 0 ? /* @__PURE__ */
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
874
|
+
return statusValue > 0 ? /* @__PURE__ */ React7.createElement(Icon5, {
|
|
875
|
+
icon: "ph--check--regular",
|
|
876
|
+
size: 6,
|
|
877
|
+
classNames: "m-1.5"
|
|
878
|
+
}) : /* @__PURE__ */ React7.createElement(Icon5, {
|
|
879
|
+
icon: "ph--x--regular",
|
|
880
|
+
size: 6,
|
|
881
|
+
classNames: "m-1.5"
|
|
901
882
|
});
|
|
902
883
|
} finally {
|
|
903
884
|
_effect.f();
|
|
904
885
|
}
|
|
905
886
|
};
|
|
906
887
|
|
|
907
|
-
//
|
|
908
|
-
import { useSignals as
|
|
909
|
-
import
|
|
910
|
-
import React9 from "react";
|
|
888
|
+
// src/components/MenuFooter.tsx
|
|
889
|
+
import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
|
|
890
|
+
import React8 from "react";
|
|
911
891
|
import { getSpace as getSpace2 } from "@dxos/client/echo";
|
|
912
892
|
import { useClient as useClient4 } from "@dxos/react-client";
|
|
913
|
-
import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as
|
|
893
|
+
import { DropdownMenu, Icon as Icon6, toLocalizedString as toLocalizedString2, useTranslation as useTranslation8 } from "@dxos/react-ui";
|
|
914
894
|
var MenuFooter = ({ object }) => {
|
|
915
|
-
var _effect =
|
|
895
|
+
var _effect = _useSignals8();
|
|
916
896
|
try {
|
|
917
|
-
const { t } =
|
|
897
|
+
const { t } = useTranslation8(SPACE_PLUGIN);
|
|
918
898
|
const client = useClient4();
|
|
919
899
|
const space = getSpace2(object);
|
|
920
900
|
const spaceName = space ? getSpaceDisplayName(space, {
|
|
921
901
|
personal: client.spaces.default === space
|
|
922
902
|
}) : "";
|
|
923
|
-
return space ? /* @__PURE__ */
|
|
903
|
+
return space ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React8.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React8.createElement("dl", {
|
|
924
904
|
className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
|
|
925
|
-
}, /* @__PURE__ */
|
|
905
|
+
}, /* @__PURE__ */ React8.createElement("dt", {
|
|
926
906
|
className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
|
|
927
|
-
}, t("location label")), /* @__PURE__ */
|
|
907
|
+
}, t("location label")), /* @__PURE__ */ React8.createElement("dd", {
|
|
928
908
|
className: "line-clamp-3"
|
|
929
|
-
}, /* @__PURE__ */
|
|
930
|
-
|
|
909
|
+
}, /* @__PURE__ */ React8.createElement(Icon6, {
|
|
910
|
+
icon: "ph--planet--regular",
|
|
911
|
+
classNames: "inline-block mie-1"
|
|
931
912
|
}), toLocalizedString2(spaceName, t)))) : null;
|
|
932
913
|
} finally {
|
|
933
914
|
_effect.f();
|
|
934
915
|
}
|
|
935
916
|
};
|
|
936
917
|
|
|
937
|
-
//
|
|
938
|
-
import { useSignals as
|
|
939
|
-
import
|
|
918
|
+
// src/components/ObjectSettings/ObjectSettingsContainer.tsx
|
|
919
|
+
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
920
|
+
import React10, { useMemo as useMemo2 } from "react";
|
|
940
921
|
import { Surface } from "@dxos/app-framework";
|
|
941
922
|
import { Clipboard as Clipboard2 } from "@dxos/react-ui";
|
|
942
923
|
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
943
924
|
|
|
944
|
-
//
|
|
945
|
-
import { useSignals as
|
|
946
|
-
import
|
|
947
|
-
import { Input as Input2, useTranslation as
|
|
925
|
+
// src/components/ObjectSettings/BaseObjectSettings.tsx
|
|
926
|
+
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
927
|
+
import React9, { useRef as useRef3 } from "react";
|
|
928
|
+
import { Input as Input2, useTranslation as useTranslation9 } from "@dxos/react-ui";
|
|
948
929
|
var BaseObjectSettings = ({ classNames, children, object }) => {
|
|
949
|
-
var _effect =
|
|
930
|
+
var _effect = _useSignals9();
|
|
950
931
|
try {
|
|
951
|
-
const { t } =
|
|
932
|
+
const { t } = useTranslation9(meta.id);
|
|
952
933
|
const inputRef = useRef3(null);
|
|
953
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Input2.Root, null, /* @__PURE__ */ React9.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React9.createElement(Input2.TextInput, {
|
|
954
935
|
ref: inputRef,
|
|
955
936
|
placeholder: t("name placeholder"),
|
|
956
937
|
// TODO(burdon): Use annotation to get the name field.
|
|
@@ -969,26 +950,26 @@ var BaseObjectSettings = ({ classNames, children, object }) => {
|
|
|
969
950
|
}
|
|
970
951
|
};
|
|
971
952
|
|
|
972
|
-
//
|
|
953
|
+
// src/components/ObjectSettings/ObjectSettingsContainer.tsx
|
|
973
954
|
var ObjectSettingsContainer = ({ object, role }) => {
|
|
974
|
-
var _effect =
|
|
955
|
+
var _effect = _useSignals10();
|
|
975
956
|
try {
|
|
976
957
|
const data = useMemo2(() => ({
|
|
977
958
|
subject: object
|
|
978
959
|
}), [
|
|
979
960
|
object
|
|
980
961
|
]);
|
|
981
|
-
return /* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ React10.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React10.createElement(StackItem2.Content, {
|
|
982
963
|
toolbar: false
|
|
983
|
-
}, /* @__PURE__ */
|
|
964
|
+
}, /* @__PURE__ */ React10.createElement("div", {
|
|
984
965
|
role: "none",
|
|
985
966
|
className: "overflow-y-auto pli-cardSpacingInline plb-cardSpacingBlock"
|
|
986
|
-
}, /* @__PURE__ */
|
|
967
|
+
}, /* @__PURE__ */ React10.createElement(BaseObjectSettings, {
|
|
987
968
|
object
|
|
988
|
-
}, /* @__PURE__ */
|
|
969
|
+
}, /* @__PURE__ */ React10.createElement(Surface, {
|
|
989
970
|
role: "base-object-settings",
|
|
990
971
|
data
|
|
991
|
-
})), /* @__PURE__ */
|
|
972
|
+
})), /* @__PURE__ */ React10.createElement(Surface, {
|
|
992
973
|
role: "object-settings",
|
|
993
974
|
data
|
|
994
975
|
}))));
|
|
@@ -997,17 +978,16 @@ var ObjectSettingsContainer = ({ object, role }) => {
|
|
|
997
978
|
}
|
|
998
979
|
};
|
|
999
980
|
|
|
1000
|
-
//
|
|
1001
|
-
import { useSignals as
|
|
1002
|
-
import {
|
|
1003
|
-
import React12, { useEffect as useEffect2, useState as useState4 } from "react";
|
|
981
|
+
// src/components/PersistenceStatus.tsx
|
|
982
|
+
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
983
|
+
import React11, { useEffect as useEffect2, useState as useState4 } from "react";
|
|
1004
984
|
import { debounce } from "@dxos/async";
|
|
1005
|
-
import { Tooltip, useTranslation as
|
|
1006
|
-
import {
|
|
985
|
+
import { Icon as Icon7, Tooltip, useTranslation as useTranslation10 } from "@dxos/react-ui";
|
|
986
|
+
import { mx, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
|
|
1007
987
|
var PersistenceStatus = ({ db }) => {
|
|
1008
|
-
var _effect =
|
|
988
|
+
var _effect = _useSignals11();
|
|
1009
989
|
try {
|
|
1010
|
-
const { t } =
|
|
990
|
+
const { t } = useTranslation10(SPACE_PLUGIN);
|
|
1011
991
|
const [displayMessage, setDisplayMessage] = useState4(false);
|
|
1012
992
|
const [status, naturalSetStatus] = useState4(0);
|
|
1013
993
|
const [prevStatus, setPrevStatus] = useState4(0);
|
|
@@ -1024,32 +1004,38 @@ var PersistenceStatus = ({ db }) => {
|
|
|
1024
1004
|
]);
|
|
1025
1005
|
switch (status) {
|
|
1026
1006
|
case 2:
|
|
1027
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
1028
1008
|
className: "flex items-center"
|
|
1029
|
-
}, /* @__PURE__ */
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1009
|
+
}, /* @__PURE__ */ React11.createElement(Icon7, {
|
|
1010
|
+
icon: "ph--warning--regular",
|
|
1011
|
+
size: 4,
|
|
1012
|
+
classNames: "me-1"
|
|
1013
|
+
}), /* @__PURE__ */ React11.createElement("span", {
|
|
1014
|
+
className: mx("text-sm", warningText)
|
|
1033
1015
|
}, t("persistence error label")));
|
|
1034
1016
|
case 1:
|
|
1035
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
1036
1018
|
className: "flex items-center"
|
|
1037
|
-
}, /* @__PURE__ */
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1019
|
+
}, /* @__PURE__ */ React11.createElement(Icon7, {
|
|
1020
|
+
icon: "ph--arrows-counter-clockwise--regular",
|
|
1021
|
+
size: 4,
|
|
1022
|
+
classNames: "me-1"
|
|
1023
|
+
}), /* @__PURE__ */ React11.createElement("span", {
|
|
1024
|
+
className: mx("text-sm", staticPlaceholderText)
|
|
1041
1025
|
}, t("persistence pending label")));
|
|
1042
1026
|
case 0:
|
|
1043
1027
|
default:
|
|
1044
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ React11.createElement(Tooltip.Trigger, {
|
|
1045
1029
|
delayDuration: 400,
|
|
1046
1030
|
role: "status",
|
|
1047
1031
|
content: t("persisted locally message"),
|
|
1048
1032
|
className: "flex items-center"
|
|
1049
|
-
}, /* @__PURE__ */
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1033
|
+
}, /* @__PURE__ */ React11.createElement(Icon7, {
|
|
1034
|
+
icon: "ph--check-circle--regular",
|
|
1035
|
+
size: 4,
|
|
1036
|
+
classNames: "me-1"
|
|
1037
|
+
}), displayMessage && /* @__PURE__ */ React11.createElement("span", {
|
|
1038
|
+
className: mx("text-sm", staticPlaceholderText)
|
|
1053
1039
|
}, t("persisted locally label")));
|
|
1054
1040
|
}
|
|
1055
1041
|
} finally {
|
|
@@ -1057,38 +1043,34 @@ var PersistenceStatus = ({ db }) => {
|
|
|
1057
1043
|
}
|
|
1058
1044
|
};
|
|
1059
1045
|
|
|
1060
|
-
//
|
|
1061
|
-
import { useSignals as
|
|
1062
|
-
import
|
|
1063
|
-
import {
|
|
1046
|
+
// src/components/PopoverRenameObject.tsx
|
|
1047
|
+
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
1048
|
+
import React12, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
|
|
1049
|
+
import { LayoutAction as LayoutAction5, createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
1050
|
+
import { Obj as Obj2 } from "@dxos/echo";
|
|
1064
1051
|
import { log as log2 } from "@dxos/log";
|
|
1065
|
-
import { Button as Button5, Input as Input3, useTranslation as
|
|
1066
|
-
var __dxlog_file3 = "/
|
|
1052
|
+
import { Button as Button5, Input as Input3, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
1053
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
|
|
1067
1054
|
var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
1068
|
-
var PopoverRenameObject = ({ object
|
|
1069
|
-
var _effect =
|
|
1055
|
+
var PopoverRenameObject = ({ object }) => {
|
|
1056
|
+
var _effect = _useSignals12();
|
|
1070
1057
|
try {
|
|
1071
|
-
const { t } =
|
|
1058
|
+
const { t } = useTranslation11(SPACE_PLUGIN);
|
|
1072
1059
|
const doneButton = useRef4(null);
|
|
1073
|
-
const
|
|
1074
|
-
const [name, setName] = useState5(object.name || object.title || "");
|
|
1060
|
+
const [name, setName] = useState5(Obj2.getLabel(object));
|
|
1075
1061
|
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1076
1062
|
const handleDone = useCallback7(() => {
|
|
1077
1063
|
try {
|
|
1078
|
-
|
|
1079
|
-
} catch {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
S: void 0,
|
|
1089
|
-
C: (f, a) => f(...a)
|
|
1090
|
-
});
|
|
1091
|
-
}
|
|
1064
|
+
name && Obj2.setLabel(object, name);
|
|
1065
|
+
} catch (err) {
|
|
1066
|
+
log2.error("Failed to rename object", {
|
|
1067
|
+
err
|
|
1068
|
+
}, {
|
|
1069
|
+
F: __dxlog_file3,
|
|
1070
|
+
L: 27,
|
|
1071
|
+
S: void 0,
|
|
1072
|
+
C: (f, a) => f(...a)
|
|
1073
|
+
});
|
|
1092
1074
|
}
|
|
1093
1075
|
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1094
1076
|
part: "popover",
|
|
@@ -1102,21 +1084,21 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1102
1084
|
object,
|
|
1103
1085
|
name
|
|
1104
1086
|
]);
|
|
1105
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
1106
1088
|
role: "none",
|
|
1107
1089
|
className: "p-2 flex gap-2"
|
|
1108
|
-
}, /* @__PURE__ */
|
|
1090
|
+
}, /* @__PURE__ */ React12.createElement("div", {
|
|
1109
1091
|
role: "none",
|
|
1110
1092
|
className: "flex-1"
|
|
1111
|
-
}, /* @__PURE__ */
|
|
1093
|
+
}, /* @__PURE__ */ React12.createElement(Input3.Root, null, /* @__PURE__ */ React12.createElement(Input3.Label, {
|
|
1112
1094
|
srOnly: true
|
|
1113
|
-
}, t("object name label")), /* @__PURE__ */
|
|
1095
|
+
}, t("object name label")), /* @__PURE__ */ React12.createElement(Input3.TextInput, {
|
|
1114
1096
|
placeholder: t("object placeholder"),
|
|
1115
1097
|
value: name,
|
|
1116
1098
|
"data-testid": "spacePlugin.renameObject.input",
|
|
1117
1099
|
onChange: ({ target: { value } }) => setName(value),
|
|
1118
1100
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1119
|
-
}))), /* @__PURE__ */
|
|
1101
|
+
}))), /* @__PURE__ */ React12.createElement(Button5, {
|
|
1120
1102
|
ref: doneButton,
|
|
1121
1103
|
classNames: "self-stretch",
|
|
1122
1104
|
onClick: handleDone
|
|
@@ -1128,16 +1110,16 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1128
1110
|
}
|
|
1129
1111
|
};
|
|
1130
1112
|
|
|
1131
|
-
//
|
|
1132
|
-
import { useSignals as
|
|
1133
|
-
import
|
|
1134
|
-
import {
|
|
1135
|
-
import { Button as Button6, Input as Input4, Popover, useTranslation as
|
|
1113
|
+
// src/components/PopoverRenameSpace.tsx
|
|
1114
|
+
import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
|
|
1115
|
+
import React13, { useCallback as useCallback8, useRef as useRef5, useState as useState6 } from "react";
|
|
1116
|
+
import { LayoutAction as LayoutAction6, createIntent as createIntent7, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
|
|
1117
|
+
import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation12 } from "@dxos/react-ui";
|
|
1136
1118
|
var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1137
1119
|
var PopoverRenameSpace = ({ space }) => {
|
|
1138
|
-
var _effect =
|
|
1120
|
+
var _effect = _useSignals13();
|
|
1139
1121
|
try {
|
|
1140
|
-
const { t } =
|
|
1122
|
+
const { t } = useTranslation12(SPACE_PLUGIN);
|
|
1141
1123
|
const doneButton = useRef5(null);
|
|
1142
1124
|
const [name, setName] = useState6(space.properties.name ?? "");
|
|
1143
1125
|
const { dispatchPromise: dispatch } = useIntentDispatcher7();
|
|
@@ -1155,24 +1137,24 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1155
1137
|
space,
|
|
1156
1138
|
name
|
|
1157
1139
|
]);
|
|
1158
|
-
return /* @__PURE__ */
|
|
1140
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
1159
1141
|
role: "none",
|
|
1160
1142
|
className: "p-2 flex gap-2"
|
|
1161
|
-
}, /* @__PURE__ */
|
|
1143
|
+
}, /* @__PURE__ */ React13.createElement("div", {
|
|
1162
1144
|
role: "none",
|
|
1163
1145
|
className: "flex-1"
|
|
1164
|
-
}, /* @__PURE__ */
|
|
1146
|
+
}, /* @__PURE__ */ React13.createElement(Input4.Root, null, /* @__PURE__ */ React13.createElement(Input4.Label, {
|
|
1165
1147
|
srOnly: true
|
|
1166
|
-
}, t("space name label")), /* @__PURE__ */
|
|
1148
|
+
}, t("space name label")), /* @__PURE__ */ React13.createElement(Input4.TextInput, {
|
|
1167
1149
|
defaultValue: space.properties.name ?? "",
|
|
1168
1150
|
placeholder: t("unnamed space label"),
|
|
1169
1151
|
onChange: ({ target: { value } }) => setName(value),
|
|
1170
1152
|
// TODO(wittjosiah): Ideally this should access the popover context to close the popover.
|
|
1171
1153
|
// Currently this is not possible because Radix does not expose the popover context.
|
|
1172
1154
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1173
|
-
}))), /* @__PURE__ */
|
|
1155
|
+
}))), /* @__PURE__ */ React13.createElement(Popover.Close, {
|
|
1174
1156
|
asChild: true
|
|
1175
|
-
}, /* @__PURE__ */
|
|
1157
|
+
}, /* @__PURE__ */ React13.createElement(Button6, {
|
|
1176
1158
|
ref: doneButton,
|
|
1177
1159
|
classNames: "self-stretch",
|
|
1178
1160
|
onClick: handleDone
|
|
@@ -1184,11 +1166,11 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1184
1166
|
}
|
|
1185
1167
|
};
|
|
1186
1168
|
|
|
1187
|
-
//
|
|
1188
|
-
import { useSignals as
|
|
1189
|
-
import
|
|
1190
|
-
import { useTranslation as
|
|
1191
|
-
import {
|
|
1169
|
+
// src/components/SchemaContainer.tsx
|
|
1170
|
+
import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
|
|
1171
|
+
import React14, { useEffect as useEffect3, useState as useState7 } from "react";
|
|
1172
|
+
import { useTranslation as useTranslation13 } from "@dxos/react-ui";
|
|
1173
|
+
import { ControlPage as ControlPage2, ControlSection as ControlSection2, controlItemClasses } from "@dxos/react-ui-form";
|
|
1192
1174
|
import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
|
|
1193
1175
|
var useQuerySpaceSchemas = (space) => {
|
|
1194
1176
|
const [schemas, setSchemas] = useState7([]);
|
|
@@ -1204,38 +1186,38 @@ var useQuerySpaceSchemas = (space) => {
|
|
|
1204
1186
|
return schemas;
|
|
1205
1187
|
};
|
|
1206
1188
|
var SchemaContainer = ({ space }) => {
|
|
1207
|
-
var _effect =
|
|
1189
|
+
var _effect = _useSignals14();
|
|
1208
1190
|
try {
|
|
1209
|
-
const { t } =
|
|
1191
|
+
const { t } = useTranslation13(SPACE_PLUGIN);
|
|
1210
1192
|
const schemas = useQuerySpaceSchemas(space);
|
|
1211
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ React14.createElement(StackItem3.Content, {
|
|
1212
1194
|
classNames: "block overflow-y-auto"
|
|
1213
|
-
}, /* @__PURE__ */
|
|
1195
|
+
}, /* @__PURE__ */ React14.createElement(ControlPage2, null, /* @__PURE__ */ React14.createElement(ControlSection2, {
|
|
1214
1196
|
title: t("schema verbose label"),
|
|
1215
1197
|
description: t("schema description")
|
|
1216
|
-
}, /* @__PURE__ */
|
|
1198
|
+
}, /* @__PURE__ */ React14.createElement("div", {
|
|
1217
1199
|
role: "none",
|
|
1218
1200
|
className: controlItemClasses
|
|
1219
|
-
}, schemas.length === 0 && /* @__PURE__ */
|
|
1201
|
+
}, schemas.length === 0 && /* @__PURE__ */ React14.createElement("div", {
|
|
1220
1202
|
className: "text-center plb-4"
|
|
1221
|
-
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */
|
|
1203
|
+
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React14.createElement("div", {
|
|
1222
1204
|
key: schema.id
|
|
1223
|
-
}, /* @__PURE__ */
|
|
1205
|
+
}, /* @__PURE__ */ React14.createElement("div", null, schema.typename)))))));
|
|
1224
1206
|
} finally {
|
|
1225
1207
|
_effect.f();
|
|
1226
1208
|
}
|
|
1227
1209
|
};
|
|
1228
1210
|
|
|
1229
|
-
//
|
|
1230
|
-
import { useSignals as
|
|
1211
|
+
// src/components/SpacePresence.tsx
|
|
1212
|
+
import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
|
|
1231
1213
|
import { Option } from "effect";
|
|
1232
|
-
import
|
|
1214
|
+
import React15, { forwardRef, useCallback as useCallback9, useEffect as useEffect4, useState as useState8 } from "react";
|
|
1233
1215
|
import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
|
|
1234
1216
|
import { generateName } from "@dxos/display-name";
|
|
1235
1217
|
import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
|
|
1236
|
-
import { getSpace as getSpace3, useMembers
|
|
1218
|
+
import { fullyQualifiedId as fullyQualifiedId3, getSpace as getSpace3, useMembers } from "@dxos/react-client/echo";
|
|
1237
1219
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
1238
|
-
import { Avatar,
|
|
1220
|
+
import { Avatar, List, ListItem, Popover as Popover2, Tooltip as Tooltip2, useDefaultValue, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1239
1221
|
import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
|
|
1240
1222
|
import { ComplexMap, keyToFallback } from "@dxos/util";
|
|
1241
1223
|
var REFRESH_INTERVAL = 5e3;
|
|
@@ -1243,7 +1225,7 @@ var ACTIVITY_DURATION = 3e4;
|
|
|
1243
1225
|
var noViewers = new ComplexMap(PublicKey.hash);
|
|
1244
1226
|
var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
|
|
1245
1227
|
var SpacePresence = ({ object, spaceKey }) => {
|
|
1246
|
-
var _effect =
|
|
1228
|
+
var _effect = _useSignals15();
|
|
1247
1229
|
try {
|
|
1248
1230
|
const spaceState = useCapability(SpaceCapabilities.MutableState);
|
|
1249
1231
|
const client = useClient5();
|
|
@@ -1273,7 +1255,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1273
1255
|
lastSeen
|
|
1274
1256
|
};
|
|
1275
1257
|
}).toSorted((a, b) => a.lastSeen - b.lastSeen);
|
|
1276
|
-
return /* @__PURE__ */
|
|
1258
|
+
return /* @__PURE__ */ React15.createElement(FullPresence, {
|
|
1277
1259
|
members: membersForObject
|
|
1278
1260
|
});
|
|
1279
1261
|
} finally {
|
|
@@ -1281,46 +1263,46 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1281
1263
|
}
|
|
1282
1264
|
};
|
|
1283
1265
|
var FullPresence = (props) => {
|
|
1284
|
-
var _effect =
|
|
1266
|
+
var _effect = _useSignals15();
|
|
1285
1267
|
try {
|
|
1286
1268
|
const { size = 9, onMemberClick } = props;
|
|
1287
1269
|
const members = useDefaultValue(props.members, () => []);
|
|
1288
1270
|
if (members.length === 0) {
|
|
1289
1271
|
return null;
|
|
1290
1272
|
}
|
|
1291
|
-
return /* @__PURE__ */
|
|
1273
|
+
return /* @__PURE__ */ React15.createElement("div", {
|
|
1292
1274
|
className: "dx-avatar-group",
|
|
1293
1275
|
"data-testid": "spacePlugin.presence"
|
|
1294
|
-
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */
|
|
1276
|
+
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
|
|
1295
1277
|
key: member.identity.identityKey.toHex(),
|
|
1296
1278
|
side: "bottom",
|
|
1297
1279
|
content: getName(member.identity),
|
|
1298
1280
|
className: "grid focus:outline-none"
|
|
1299
|
-
}, /* @__PURE__ */
|
|
1281
|
+
}, /* @__PURE__ */ React15.createElement(PresenceAvatar, {
|
|
1300
1282
|
identity: member.identity,
|
|
1301
1283
|
match: member.currentlyAttended,
|
|
1302
1284
|
index: members.length - i,
|
|
1303
1285
|
onClick: () => onMemberClick?.(member),
|
|
1304
1286
|
size
|
|
1305
|
-
}))), members.length > 3 && /* @__PURE__ */
|
|
1287
|
+
}))), members.length > 3 && /* @__PURE__ */ React15.createElement(Popover2.Root, null, /* @__PURE__ */ React15.createElement(Popover2.Trigger, {
|
|
1306
1288
|
className: "grid focus:outline-none"
|
|
1307
|
-
}, /* @__PURE__ */
|
|
1289
|
+
}, /* @__PURE__ */ React15.createElement(Avatar.Root, null, /* @__PURE__ */ React15.createElement(Avatar.Content, {
|
|
1308
1290
|
status: "inactive",
|
|
1309
1291
|
style: {
|
|
1310
1292
|
zIndex: members.length - 4
|
|
1311
1293
|
},
|
|
1312
1294
|
fallback: `+${members.length - 3}`,
|
|
1313
1295
|
size
|
|
1314
|
-
}))), /* @__PURE__ */
|
|
1296
|
+
}))), /* @__PURE__ */ React15.createElement(Popover2.Portal, null, /* @__PURE__ */ React15.createElement(Popover2.Content, {
|
|
1315
1297
|
side: "bottom"
|
|
1316
|
-
}, /* @__PURE__ */
|
|
1298
|
+
}, /* @__PURE__ */ React15.createElement(Popover2.Arrow, null), /* @__PURE__ */ React15.createElement(Popover2.Viewport, {
|
|
1317
1299
|
classNames: "max-bs-56"
|
|
1318
|
-
}, /* @__PURE__ */
|
|
1300
|
+
}, /* @__PURE__ */ React15.createElement(List, null, members.map((member) => /* @__PURE__ */ React15.createElement(ListItem.Root, {
|
|
1319
1301
|
key: member.identity.identityKey.toHex(),
|
|
1320
1302
|
classNames: "flex gap-2 items-center cursor-pointer mbe-2",
|
|
1321
1303
|
onClick: () => onMemberClick?.(member),
|
|
1322
1304
|
"data-testid": "identity-list-item"
|
|
1323
|
-
}, /* @__PURE__ */
|
|
1305
|
+
}, /* @__PURE__ */ React15.createElement(PresenceAvatar, {
|
|
1324
1306
|
identity: member.identity,
|
|
1325
1307
|
size,
|
|
1326
1308
|
showName: true,
|
|
@@ -1331,11 +1313,11 @@ var FullPresence = (props) => {
|
|
|
1331
1313
|
}
|
|
1332
1314
|
};
|
|
1333
1315
|
var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
|
|
1334
|
-
var _effect =
|
|
1316
|
+
var _effect = _useSignals15();
|
|
1335
1317
|
try {
|
|
1336
1318
|
const status = match ? "current" : "active";
|
|
1337
1319
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
1338
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ React15.createElement(Avatar.Root, null, /* @__PURE__ */ React15.createElement(Avatar.Content, {
|
|
1339
1321
|
status,
|
|
1340
1322
|
hue: identity.profile?.data?.hue || fallbackValue.hue,
|
|
1341
1323
|
"data-testid": "spacePlugin.presence.member",
|
|
@@ -1349,7 +1331,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
|
|
|
1349
1331
|
onClick,
|
|
1350
1332
|
fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
|
|
1351
1333
|
ref: forwardedRef
|
|
1352
|
-
}), /* @__PURE__ */
|
|
1334
|
+
}), /* @__PURE__ */ React15.createElement(Avatar.Label, {
|
|
1353
1335
|
classNames: showName ? "text-sm truncate pli-2" : "sr-only"
|
|
1354
1336
|
}, getName(identity)));
|
|
1355
1337
|
} finally {
|
|
@@ -1357,7 +1339,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
|
|
|
1357
1339
|
}
|
|
1358
1340
|
});
|
|
1359
1341
|
var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
1360
|
-
var _effect =
|
|
1342
|
+
var _effect = _useSignals15();
|
|
1361
1343
|
try {
|
|
1362
1344
|
const { hasAttention, isAncestor, isRelated } = useAttention(id);
|
|
1363
1345
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1382,7 +1364,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1382
1364
|
}, [
|
|
1383
1365
|
viewers
|
|
1384
1366
|
]);
|
|
1385
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ React15.createElement(SmallPresence, {
|
|
1386
1368
|
count: activeViewers.length,
|
|
1387
1369
|
attended: isAttended,
|
|
1388
1370
|
containsAttended
|
|
@@ -1392,16 +1374,16 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1392
1374
|
}
|
|
1393
1375
|
};
|
|
1394
1376
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1395
|
-
var _effect =
|
|
1377
|
+
var _effect = _useSignals15();
|
|
1396
1378
|
try {
|
|
1397
|
-
const { t } =
|
|
1398
|
-
return /* @__PURE__ */
|
|
1379
|
+
const { t } = useTranslation14(SPACE_PLUGIN);
|
|
1380
|
+
return /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
|
|
1399
1381
|
asChild: true,
|
|
1400
1382
|
content: t("presence label", {
|
|
1401
1383
|
count
|
|
1402
1384
|
}),
|
|
1403
1385
|
side: "bottom"
|
|
1404
|
-
}, /* @__PURE__ */
|
|
1386
|
+
}, /* @__PURE__ */ React15.createElement(AttentionGlyph, {
|
|
1405
1387
|
attended,
|
|
1406
1388
|
containsAttended,
|
|
1407
1389
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
@@ -1412,46 +1394,46 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
|
1412
1394
|
}
|
|
1413
1395
|
};
|
|
1414
1396
|
|
|
1415
|
-
//
|
|
1416
|
-
import { useSignals as
|
|
1417
|
-
import
|
|
1397
|
+
// src/components/SpacePluginSettings.tsx
|
|
1398
|
+
import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
|
|
1399
|
+
import React16 from "react";
|
|
1418
1400
|
import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
|
|
1419
1401
|
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1420
1402
|
import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
|
|
1421
|
-
import { Input as Input5,
|
|
1422
|
-
import {
|
|
1403
|
+
import { IconButton, Input as Input5, List as List2, ListItem as ListItem2, toLocalizedString as toLocalizedString3, useTranslation as useTranslation15 } from "@dxos/react-ui";
|
|
1404
|
+
import { ControlPage as ControlPage3, ControlSection as ControlSection3, DeprecatedFormInput, controlItemClasses as controlItemClasses2 } from "@dxos/react-ui-form";
|
|
1423
1405
|
var SpacePluginSettings = ({ settings }) => {
|
|
1424
|
-
var _effect =
|
|
1406
|
+
var _effect = _useSignals16();
|
|
1425
1407
|
try {
|
|
1426
|
-
const { t } =
|
|
1408
|
+
const { t } = useTranslation15(SPACE_PLUGIN);
|
|
1427
1409
|
const client = useClient6();
|
|
1428
1410
|
const spaces = useSpaces2({
|
|
1429
1411
|
all: settings.showHidden
|
|
1430
1412
|
});
|
|
1431
1413
|
const { dispatchPromise: dispatch } = useIntentDispatcher8();
|
|
1432
|
-
return /* @__PURE__ */
|
|
1414
|
+
return /* @__PURE__ */ React16.createElement(ControlPage3, null, /* @__PURE__ */ React16.createElement(ControlSection3, {
|
|
1433
1415
|
title: t("space settings label"),
|
|
1434
1416
|
description: t("space settings description")
|
|
1435
|
-
}, /* @__PURE__ */
|
|
1417
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1436
1418
|
className: "pli-trimMd container-max-width"
|
|
1437
|
-
}, /* @__PURE__ */
|
|
1419
|
+
}, /* @__PURE__ */ React16.createElement(DeprecatedFormInput, {
|
|
1438
1420
|
label: t("show hidden spaces label")
|
|
1439
|
-
}, /* @__PURE__ */
|
|
1421
|
+
}, /* @__PURE__ */ React16.createElement(Input5.Switch, {
|
|
1440
1422
|
checked: settings.showHidden,
|
|
1441
1423
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1442
|
-
}))), /* @__PURE__ */
|
|
1424
|
+
}))), /* @__PURE__ */ React16.createElement(List2, {
|
|
1443
1425
|
classNames: [
|
|
1444
1426
|
controlItemClasses2,
|
|
1445
1427
|
"flex flex-col gap-trimSm"
|
|
1446
1428
|
]
|
|
1447
|
-
}, spaces.map((space) => /* @__PURE__ */
|
|
1429
|
+
}, spaces.map((space) => /* @__PURE__ */ React16.createElement(ListItem2.Root, {
|
|
1448
1430
|
key: space.id,
|
|
1449
1431
|
classNames: "is-full items-center"
|
|
1450
|
-
}, /* @__PURE__ */
|
|
1432
|
+
}, /* @__PURE__ */ React16.createElement(ListItem2.Heading, {
|
|
1451
1433
|
classNames: "grow truncate !min-bs-0"
|
|
1452
1434
|
}, toLocalizedString3(getSpaceDisplayName(space, {
|
|
1453
1435
|
personal: space === client.spaces.default
|
|
1454
|
-
}), t)), /* @__PURE__ */
|
|
1436
|
+
}), t)), /* @__PURE__ */ React16.createElement(IconButton, {
|
|
1455
1437
|
icon: "ph--faders--regular",
|
|
1456
1438
|
onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
|
|
1457
1439
|
space
|
|
@@ -1463,29 +1445,29 @@ var SpacePluginSettings = ({ settings }) => {
|
|
|
1463
1445
|
}
|
|
1464
1446
|
};
|
|
1465
1447
|
|
|
1466
|
-
//
|
|
1467
|
-
import { useSignals as
|
|
1468
|
-
import { pipe as pipe2
|
|
1469
|
-
import
|
|
1470
|
-
import {
|
|
1448
|
+
// src/components/SpaceSettings/SpaceSettingsContainer.tsx
|
|
1449
|
+
import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
|
|
1450
|
+
import { Schema, pipe as pipe2 } from "effect";
|
|
1451
|
+
import React17, { useCallback as useCallback10, useMemo as useMemo3, useState as useState9 } from "react";
|
|
1452
|
+
import { LayoutAction as LayoutAction7, chain as chain2, createIntent as createIntent9, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
|
|
1471
1453
|
import { log as log3 } from "@dxos/log";
|
|
1472
1454
|
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1473
1455
|
import { useClient as useClient7 } from "@dxos/react-client";
|
|
1474
1456
|
import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
|
|
1475
|
-
import { Button as Button7, Input as Input6, useMulticastObservable, useTranslation as
|
|
1476
|
-
import {
|
|
1457
|
+
import { Button as Button7, Input as Input6, useMulticastObservable, useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
1458
|
+
import { ControlItem, ControlItemInput as ControlItemInput2, ControlPage as ControlPage4, ControlSection as ControlSection4, Form as Form3 } from "@dxos/react-ui-form";
|
|
1477
1459
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
1478
1460
|
import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
|
|
1479
|
-
var __dxlog_file4 = "/
|
|
1461
|
+
var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
|
|
1480
1462
|
var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
|
|
1481
1463
|
archived: Schema.Boolean.annotations({
|
|
1482
1464
|
title: "Archive space"
|
|
1483
1465
|
})
|
|
1484
1466
|
})));
|
|
1485
1467
|
var SpaceSettingsContainer = ({ space }) => {
|
|
1486
|
-
var _effect =
|
|
1468
|
+
var _effect = _useSignals17();
|
|
1487
1469
|
try {
|
|
1488
|
-
const { t } =
|
|
1470
|
+
const { t } = useTranslation16(SPACE_PLUGIN);
|
|
1489
1471
|
const { dispatchPromise: dispatch } = useIntentDispatcher9();
|
|
1490
1472
|
const client = useClient7();
|
|
1491
1473
|
const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
|
|
@@ -1551,10 +1533,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1551
1533
|
onValueChange,
|
|
1552
1534
|
type
|
|
1553
1535
|
]);
|
|
1554
|
-
return /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ React17.createElement(ControlItemInput2, {
|
|
1555
1537
|
title: label,
|
|
1556
1538
|
description: t("display name description")
|
|
1557
|
-
}, /* @__PURE__ */
|
|
1539
|
+
}, /* @__PURE__ */ React17.createElement(Input6.TextInput, {
|
|
1558
1540
|
value: getValue(),
|
|
1559
1541
|
onChange: handleChange,
|
|
1560
1542
|
placeholder: t("display name input placeholder"),
|
|
@@ -1570,10 +1552,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1570
1552
|
onValueChange,
|
|
1571
1553
|
type
|
|
1572
1554
|
]);
|
|
1573
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ React17.createElement(ControlItem, {
|
|
1574
1556
|
title: label,
|
|
1575
1557
|
description: t("icon description")
|
|
1576
|
-
}, /* @__PURE__ */
|
|
1558
|
+
}, /* @__PURE__ */ React17.createElement(IconPicker, {
|
|
1577
1559
|
value: getValue(),
|
|
1578
1560
|
onChange: handleChange,
|
|
1579
1561
|
onReset: handleEmojiReset,
|
|
@@ -1590,10 +1572,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1590
1572
|
onValueChange,
|
|
1591
1573
|
type
|
|
1592
1574
|
]);
|
|
1593
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ React17.createElement(ControlItem, {
|
|
1594
1576
|
title: label,
|
|
1595
1577
|
description: t("hue description")
|
|
1596
|
-
}, /* @__PURE__ */
|
|
1578
|
+
}, /* @__PURE__ */ React17.createElement(HuePicker, {
|
|
1597
1579
|
value: getValue(),
|
|
1598
1580
|
onChange: handleChange,
|
|
1599
1581
|
onReset: handleHueReset,
|
|
@@ -1605,10 +1587,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1605
1587
|
onValueChange,
|
|
1606
1588
|
type
|
|
1607
1589
|
]);
|
|
1608
|
-
return /* @__PURE__ */
|
|
1590
|
+
return /* @__PURE__ */ React17.createElement(ControlItemInput2, {
|
|
1609
1591
|
title: label,
|
|
1610
1592
|
description: t("edge replication description")
|
|
1611
|
-
}, /* @__PURE__ */
|
|
1593
|
+
}, /* @__PURE__ */ React17.createElement(Input6.Switch, {
|
|
1612
1594
|
checked: getValue(),
|
|
1613
1595
|
onCheckedChange: handleChange,
|
|
1614
1596
|
classNames: "justify-self-end"
|
|
@@ -1620,10 +1602,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1620
1602
|
type,
|
|
1621
1603
|
getValue
|
|
1622
1604
|
]);
|
|
1623
|
-
return /* @__PURE__ */
|
|
1605
|
+
return /* @__PURE__ */ React17.createElement(ControlItemInput2, {
|
|
1624
1606
|
title: label,
|
|
1625
1607
|
description: t("archive space description")
|
|
1626
|
-
}, /* @__PURE__ */
|
|
1608
|
+
}, /* @__PURE__ */ React17.createElement(Button7, {
|
|
1627
1609
|
disabled: space === client.spaces.default,
|
|
1628
1610
|
onClick: handleChange
|
|
1629
1611
|
}, getValue() ? t("unarchive space label") : t("archive space label")));
|
|
@@ -1632,16 +1614,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1632
1614
|
t,
|
|
1633
1615
|
space
|
|
1634
1616
|
]);
|
|
1635
|
-
return /* @__PURE__ */
|
|
1617
|
+
return /* @__PURE__ */ React17.createElement(StackItem4.Content, {
|
|
1636
1618
|
classNames: "block overflow-y-auto pli-2"
|
|
1637
|
-
}, /* @__PURE__ */
|
|
1619
|
+
}, /* @__PURE__ */ React17.createElement(ControlPage4, null, /* @__PURE__ */ React17.createElement(ControlSection4, {
|
|
1638
1620
|
title: t("space properties settings verbose label", {
|
|
1639
1621
|
ns: SPACE_PLUGIN
|
|
1640
1622
|
}),
|
|
1641
1623
|
description: t("space properties settings description", {
|
|
1642
1624
|
ns: SPACE_PLUGIN
|
|
1643
1625
|
})
|
|
1644
|
-
}, /* @__PURE__ */
|
|
1626
|
+
}, /* @__PURE__ */ React17.createElement(Form3, {
|
|
1645
1627
|
schema: FormSchema,
|
|
1646
1628
|
values,
|
|
1647
1629
|
autoSave: true,
|
|
@@ -1655,16 +1637,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1655
1637
|
}
|
|
1656
1638
|
};
|
|
1657
1639
|
|
|
1658
|
-
//
|
|
1659
|
-
import { useSignals as
|
|
1640
|
+
// src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1641
|
+
import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
|
|
1660
1642
|
import { Option as Option2 } from "effect";
|
|
1661
|
-
import
|
|
1643
|
+
import React18, { useEffect as useEffect5, useState as useState10 } from "react";
|
|
1662
1644
|
import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
|
|
1663
1645
|
import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
1664
1646
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1665
1647
|
import { useClient as useClient8 } from "@dxos/react-client";
|
|
1666
1648
|
import { useSpaceSyncState } from "@dxos/react-client/echo";
|
|
1667
|
-
import { Tooltip as Tooltip3, useTranslation as
|
|
1649
|
+
import { Tooltip as Tooltip3, useTranslation as useTranslation17 } from "@dxos/react-ui";
|
|
1668
1650
|
import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
1669
1651
|
var useEdgeStatus = () => {
|
|
1670
1652
|
const [status, setStatus] = useState10(EdgeStatus.NOT_CONNECTED);
|
|
@@ -1679,9 +1661,9 @@ var useEdgeStatus = () => {
|
|
|
1679
1661
|
return status;
|
|
1680
1662
|
};
|
|
1681
1663
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1682
|
-
var _effect =
|
|
1664
|
+
var _effect = _useSignals18();
|
|
1683
1665
|
try {
|
|
1684
|
-
const { t } =
|
|
1666
|
+
const { t } = useTranslation17(SPACE_PLUGIN);
|
|
1685
1667
|
const id = space.id;
|
|
1686
1668
|
const { hasAttention, isAncestor, isRelated } = useAttention2(id);
|
|
1687
1669
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1694,11 +1676,11 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1694
1676
|
const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
|
|
1695
1677
|
const syncState = useSpaceSyncState(space);
|
|
1696
1678
|
const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
|
|
1697
|
-
return /* @__PURE__ */
|
|
1679
|
+
return /* @__PURE__ */ React18.createElement(Tooltip3.Trigger, {
|
|
1698
1680
|
asChild: true,
|
|
1699
1681
|
content: t("syncing label"),
|
|
1700
1682
|
side: "bottom"
|
|
1701
|
-
}, /* @__PURE__ */
|
|
1683
|
+
}, /* @__PURE__ */ React18.createElement(AttentionGlyph2, {
|
|
1702
1684
|
syncing,
|
|
1703
1685
|
attended: isAttended,
|
|
1704
1686
|
containsAttended,
|
|
@@ -1709,17 +1691,17 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1709
1691
|
}
|
|
1710
1692
|
};
|
|
1711
1693
|
|
|
1712
|
-
//
|
|
1713
|
-
import { useSignals as
|
|
1714
|
-
import
|
|
1694
|
+
// src/components/SyncStatus/SyncStatus.tsx
|
|
1695
|
+
import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
|
|
1696
|
+
import React19, { useEffect as useEffect6, useState as useState11 } from "react";
|
|
1715
1697
|
import { StatusBar } from "@dxos/plugin-status-bar";
|
|
1716
1698
|
import { useClient as useClient9 } from "@dxos/react-client";
|
|
1717
1699
|
import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
|
|
1718
|
-
import { Icon as
|
|
1700
|
+
import { Icon as Icon8, useTranslation as useTranslation18 } from "@dxos/react-ui";
|
|
1719
1701
|
|
|
1720
|
-
//
|
|
1702
|
+
// src/components/SyncStatus/save-tracker.ts
|
|
1721
1703
|
import { Context } from "@dxos/context";
|
|
1722
|
-
var __dxlog_file5 = "/
|
|
1704
|
+
var __dxlog_file5 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
|
|
1723
1705
|
var createClientSaveTracker = (client, cb) => {
|
|
1724
1706
|
const CleanupFns = {};
|
|
1725
1707
|
const state = {};
|
|
@@ -1756,15 +1738,15 @@ var createSpaceSaveTracker = (space, cb) => {
|
|
|
1756
1738
|
}
|
|
1757
1739
|
let hasUnsavedChanges = false;
|
|
1758
1740
|
let lastFlushPromise;
|
|
1759
|
-
space.
|
|
1741
|
+
space.db.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
|
|
1760
1742
|
hasUnsavedChanges = unsavedDocuments.length > 0;
|
|
1761
1743
|
});
|
|
1762
|
-
space.
|
|
1744
|
+
space.db.saveStateChanged.debounce(500).on(ctx, () => {
|
|
1763
1745
|
if (hasUnsavedChanges) {
|
|
1764
1746
|
lastFlushPromise = void 0;
|
|
1765
1747
|
cb("saving");
|
|
1766
1748
|
} else {
|
|
1767
|
-
const flushPromise = space.
|
|
1749
|
+
const flushPromise = space.db.flush();
|
|
1768
1750
|
lastFlushPromise = flushPromise;
|
|
1769
1751
|
void flushPromise.then(() => {
|
|
1770
1752
|
if (lastFlushPromise === flushPromise) {
|
|
@@ -1779,7 +1761,7 @@ var createSpaceSaveTracker = (space, cb) => {
|
|
|
1779
1761
|
};
|
|
1780
1762
|
};
|
|
1781
1763
|
|
|
1782
|
-
//
|
|
1764
|
+
// src/components/SyncStatus/status.ts
|
|
1783
1765
|
var getStatus = ({ offline, saved, needsToUpload, needsToDownload }) => {
|
|
1784
1766
|
if (!saved) {
|
|
1785
1767
|
return "saving locally";
|
|
@@ -1808,10 +1790,10 @@ var getIcon = (status) => {
|
|
|
1808
1790
|
}
|
|
1809
1791
|
};
|
|
1810
1792
|
|
|
1811
|
-
//
|
|
1793
|
+
// src/components/SyncStatus/SyncStatus.tsx
|
|
1812
1794
|
var SYNC_STALLED_TIMEOUT = 5e3;
|
|
1813
1795
|
var SyncStatus = () => {
|
|
1814
|
-
var _effect =
|
|
1796
|
+
var _effect = _useSignals19();
|
|
1815
1797
|
try {
|
|
1816
1798
|
const client = useClient9();
|
|
1817
1799
|
const state = useSyncState();
|
|
@@ -1821,7 +1803,7 @@ var SyncStatus = () => {
|
|
|
1821
1803
|
setSaved(state2 === "saved");
|
|
1822
1804
|
});
|
|
1823
1805
|
}, []);
|
|
1824
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ React19.createElement(SyncStatusIndicator, {
|
|
1825
1807
|
state,
|
|
1826
1808
|
saved
|
|
1827
1809
|
});
|
|
@@ -1830,9 +1812,9 @@ var SyncStatus = () => {
|
|
|
1830
1812
|
}
|
|
1831
1813
|
};
|
|
1832
1814
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1833
|
-
var _effect =
|
|
1815
|
+
var _effect = _useSignals19();
|
|
1834
1816
|
try {
|
|
1835
|
-
const { t } =
|
|
1817
|
+
const { t } = useTranslation18(SPACE_PLUGIN);
|
|
1836
1818
|
const summary = getSyncSummary(state);
|
|
1837
1819
|
const offline = Object.values(state).length === 0;
|
|
1838
1820
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1859,12 +1841,12 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1859
1841
|
needsToDownload
|
|
1860
1842
|
]);
|
|
1861
1843
|
const title = t(`${status} label`);
|
|
1862
|
-
const icon = /* @__PURE__ */
|
|
1844
|
+
const icon = /* @__PURE__ */ React19.createElement(Icon8, {
|
|
1863
1845
|
icon: getIcon(status),
|
|
1864
1846
|
size: 4,
|
|
1865
1847
|
classNames
|
|
1866
1848
|
});
|
|
1867
|
-
return /* @__PURE__ */
|
|
1849
|
+
return /* @__PURE__ */ React19.createElement(StatusBar.Item, {
|
|
1868
1850
|
title
|
|
1869
1851
|
}, icon);
|
|
1870
1852
|
} finally {
|
|
@@ -1872,13 +1854,93 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1872
1854
|
}
|
|
1873
1855
|
};
|
|
1874
1856
|
|
|
1857
|
+
// src/components/ViewEditor.tsx
|
|
1858
|
+
import { useSignals as _useSignals20 } from "@preact-signals/safe-react/tracking";
|
|
1859
|
+
import React20, { useCallback as useCallback11, useMemo as useMemo4 } from "react";
|
|
1860
|
+
import { createIntent as createIntent10, useIntentDispatcher as useIntentDispatcher10 } from "@dxos/app-framework";
|
|
1861
|
+
import { Type as Type3 } from "@dxos/echo";
|
|
1862
|
+
import { invariant as invariant2 } from "@dxos/invariant";
|
|
1863
|
+
import { useClient as useClient10 } from "@dxos/react-client";
|
|
1864
|
+
import { Filter as Filter2, getSpace as getSpace4, useQuery as useQuery3, useSchema } from "@dxos/react-client/echo";
|
|
1865
|
+
import { ViewEditor as NativeViewEditor } from "@dxos/react-ui-form";
|
|
1866
|
+
import { DataType as DataType3 } from "@dxos/schema";
|
|
1867
|
+
var __dxlog_file6 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ViewEditor.tsx";
|
|
1868
|
+
var ViewEditor = ({ view }) => {
|
|
1869
|
+
var _effect = _useSignals20();
|
|
1870
|
+
try {
|
|
1871
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher10();
|
|
1872
|
+
const client = useClient10();
|
|
1873
|
+
const space = getSpace4(view);
|
|
1874
|
+
const schema = useSchema(client, space, view.query.typename);
|
|
1875
|
+
const views = useQuery3(space, Filter2.type(DataType3.View));
|
|
1876
|
+
const currentTypename = useMemo4(() => view.query?.typename, [
|
|
1877
|
+
view.query?.typename
|
|
1878
|
+
]);
|
|
1879
|
+
const handleUpdateTypename = useCallback11((typename) => {
|
|
1880
|
+
invariant2(schema, void 0, {
|
|
1881
|
+
F: __dxlog_file6,
|
|
1882
|
+
L: 30,
|
|
1883
|
+
S: void 0,
|
|
1884
|
+
A: [
|
|
1885
|
+
"schema",
|
|
1886
|
+
""
|
|
1887
|
+
]
|
|
1888
|
+
});
|
|
1889
|
+
invariant2(Type3.isMutable(schema), void 0, {
|
|
1890
|
+
F: __dxlog_file6,
|
|
1891
|
+
L: 31,
|
|
1892
|
+
S: void 0,
|
|
1893
|
+
A: [
|
|
1894
|
+
"Type.isMutable(schema)",
|
|
1895
|
+
""
|
|
1896
|
+
]
|
|
1897
|
+
});
|
|
1898
|
+
const matchingViews = views.filter((view2) => view2.query.typename === currentTypename);
|
|
1899
|
+
for (const view2 of matchingViews) {
|
|
1900
|
+
view2.query.typename = typename;
|
|
1901
|
+
}
|
|
1902
|
+
schema.updateTypename(typename);
|
|
1903
|
+
}, [
|
|
1904
|
+
views,
|
|
1905
|
+
schema
|
|
1906
|
+
]);
|
|
1907
|
+
const handleDelete = useCallback11((fieldId) => {
|
|
1908
|
+
void dispatch(createIntent10(SpaceAction.DeleteField, {
|
|
1909
|
+
view,
|
|
1910
|
+
fieldId
|
|
1911
|
+
}));
|
|
1912
|
+
}, [
|
|
1913
|
+
dispatch,
|
|
1914
|
+
view
|
|
1915
|
+
]);
|
|
1916
|
+
if (!space || !schema) {
|
|
1917
|
+
return null;
|
|
1918
|
+
}
|
|
1919
|
+
return /* @__PURE__ */ React20.createElement(NativeViewEditor, {
|
|
1920
|
+
registry: space.db.schemaRegistry,
|
|
1921
|
+
schema,
|
|
1922
|
+
view,
|
|
1923
|
+
onTypenameChanged: Type3.isMutable(schema) ? handleUpdateTypename : void 0,
|
|
1924
|
+
onDelete: Type3.isMutable(schema) ? handleDelete : void 0,
|
|
1925
|
+
outerSpacing: false
|
|
1926
|
+
});
|
|
1927
|
+
} finally {
|
|
1928
|
+
_effect.f();
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
|
|
1932
|
+
// src/components/index.ts
|
|
1933
|
+
import { lazy as lazy2 } from "react";
|
|
1934
|
+
var CollectionMain = lazy2(() => import("./CollectionMain-D2B75XBS.mjs"));
|
|
1935
|
+
var ObjectDetailsPanel = lazy2(() => import("./ObjectDetailsPanel-SY6FYTYC.mjs"));
|
|
1936
|
+
var RecordMain = lazy2(() => import("./RecordMain-TEBGAVSL.mjs"));
|
|
1937
|
+
|
|
1875
1938
|
export {
|
|
1876
1939
|
AwaitingObject,
|
|
1877
1940
|
CREATE_OBJECT_DIALOG,
|
|
1878
1941
|
CreateObjectDialog,
|
|
1879
1942
|
CREATE_SPACE_DIALOG,
|
|
1880
1943
|
CreateSpaceDialog,
|
|
1881
|
-
CollectionMain,
|
|
1882
1944
|
CollectionSection,
|
|
1883
1945
|
JOIN_DIALOG,
|
|
1884
1946
|
JoinDialog,
|
|
@@ -1901,6 +1963,10 @@ export {
|
|
|
1901
1963
|
InlineSyncStatus,
|
|
1902
1964
|
SyncStatus,
|
|
1903
1965
|
SyncStatusIndicator,
|
|
1966
|
+
ViewEditor,
|
|
1967
|
+
CollectionMain,
|
|
1968
|
+
ObjectDetailsPanel,
|
|
1969
|
+
RecordMain,
|
|
1904
1970
|
AppGraphBuilder,
|
|
1905
1971
|
AppGraphSerializer,
|
|
1906
1972
|
IdentityCreated,
|
|
@@ -1913,4 +1979,4 @@ export {
|
|
|
1913
1979
|
SpaceState,
|
|
1914
1980
|
SpacesReady
|
|
1915
1981
|
};
|
|
1916
|
-
//# sourceMappingURL=chunk-
|
|
1982
|
+
//# sourceMappingURL=chunk-PSIBVBTA.mjs.map
|