@dxos/plugin-thread 0.8.4-main.c1de068 → 0.8.4-main.c351d160a8
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/CallDebugPanel-BO3SLD4E.mjs +182 -0
- package/dist/lib/browser/CallDebugPanel-BO3SLD4E.mjs.map +7 -0
- package/dist/lib/browser/CallSidebar-KSOBZJGD.mjs +36 -0
- package/dist/lib/browser/CallSidebar-KSOBZJGD.mjs.map +7 -0
- package/dist/lib/browser/ChannelContainer-EQZXMQMV.mjs +17 -0
- package/dist/lib/browser/ChatContainer-VPCJ2AMF.mjs +18 -0
- package/dist/lib/browser/ThreadCompanion-7GTSEJQT.mjs +209 -0
- package/dist/lib/browser/ThreadCompanion-7GTSEJQT.mjs.map +7 -0
- package/dist/lib/browser/ThreadSettings-VL3HBE62.mjs +20 -0
- package/dist/lib/browser/ThreadSettings-VL3HBE62.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-ECTCB36F.mjs +189 -0
- package/dist/lib/browser/app-graph-builder-ECTCB36F.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-UJ4QH3LV.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-UJ4QH3LV.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/call-manager-3P6D7IH7.mjs +27 -0
- package/dist/lib/browser/call-manager-3P6D7IH7.mjs.map +7 -0
- package/dist/lib/browser/chunk-2M2HV5K4.mjs +35 -0
- package/dist/lib/browser/chunk-2M2HV5K4.mjs.map +7 -0
- package/dist/lib/browser/chunk-7GONB2BI.mjs +219 -0
- package/dist/lib/browser/chunk-7GONB2BI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GERVMFQW.mjs → chunk-CP7E2HRE.mjs} +2 -2
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +7 -0
- package/dist/lib/browser/chunk-D7PVIURR.mjs +1094 -0
- package/dist/lib/browser/chunk-D7PVIURR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZE7KWN36.mjs → chunk-ERK254BS.mjs} +381 -240
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/chunk-FGEVENLN.mjs +280 -0
- package/dist/lib/browser/chunk-FGEVENLN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ERWASUQK.mjs → chunk-HDLDMR54.mjs} +85 -50
- package/dist/lib/browser/chunk-HDLDMR54.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6NSMBO3B.mjs → chunk-ISCHODBV.mjs} +55 -5
- package/dist/lib/browser/chunk-ISCHODBV.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J75MXJZN.mjs +105 -0
- package/dist/lib/browser/chunk-J75MXJZN.mjs.map +7 -0
- package/dist/lib/browser/chunk-JMH6UT5J.mjs +127 -0
- package/dist/lib/browser/chunk-JMH6UT5J.mjs.map +7 -0
- package/dist/lib/browser/chunk-PV5GYINX.mjs +135 -0
- package/dist/lib/browser/chunk-PV5GYINX.mjs.map +7 -0
- package/dist/lib/browser/chunk-QVJO3VJ4.mjs +20 -0
- package/dist/lib/browser/chunk-QVJO3VJ4.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +136 -137
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-J6H6EIZE.mjs +83 -0
- package/dist/lib/browser/markdown-J6H6EIZE.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-3JHO5DFX.mjs +434 -0
- package/dist/lib/browser/operation-resolver-3JHO5DFX.mjs.map +7 -0
- package/dist/lib/browser/react-root-AM3J34AK.mjs +27 -0
- package/dist/lib/browser/react-root-AM3J34AK.mjs.map +7 -0
- package/dist/lib/browser/react-surface-VNGEEVYP.mjs +115 -0
- package/dist/lib/browser/react-surface-VNGEEVYP.mjs.map +7 -0
- package/dist/lib/browser/settings-HYNYTOSX.mjs +35 -0
- package/dist/lib/browser/settings-HYNYTOSX.mjs.map +7 -0
- package/dist/lib/browser/state-NQZQCDFD.mjs +25 -0
- package/dist/lib/browser/state-NQZQCDFD.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +11 -12
- package/dist/lib/node-esm/CallDebugPanel-7OIL5FVT.mjs +183 -0
- package/dist/lib/node-esm/CallDebugPanel-7OIL5FVT.mjs.map +7 -0
- package/dist/lib/node-esm/CallSidebar-Y2I3UBBA.mjs +37 -0
- package/dist/lib/node-esm/CallSidebar-Y2I3UBBA.mjs.map +7 -0
- package/dist/lib/node-esm/ChannelContainer-WB5YYZKU.mjs +18 -0
- package/dist/lib/node-esm/ChannelContainer-WB5YYZKU.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-CP6PNF53.mjs +19 -0
- package/dist/lib/node-esm/ChatContainer-CP6PNF53.mjs.map +7 -0
- package/dist/lib/node-esm/ThreadCompanion-5MM3XACT.mjs +210 -0
- package/dist/lib/node-esm/ThreadCompanion-5MM3XACT.mjs.map +7 -0
- package/dist/lib/node-esm/ThreadSettings-TCZMYH3J.mjs +21 -0
- package/dist/lib/node-esm/ThreadSettings-TCZMYH3J.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-HSX4GHGQ.mjs +190 -0
- package/dist/lib/node-esm/app-graph-builder-HSX4GHGQ.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-SABUBK23.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-SABUBK23.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/call-manager-ENAYC5L3.mjs +28 -0
- package/dist/lib/node-esm/call-manager-ENAYC5L3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-35G7Q243.mjs +1095 -0
- package/dist/lib/node-esm/chunk-35G7Q243.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4BOUHFEC.mjs +128 -0
- package/dist/lib/node-esm/chunk-4BOUHFEC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-A3SWGVF3.mjs +37 -0
- package/dist/lib/node-esm/chunk-A3SWGVF3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-57XR3LEF.mjs → chunk-ABUFOZVX.mjs} +2 -2
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-B7POKKGL.mjs +136 -0
- package/dist/lib/node-esm/chunk-B7POKKGL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CSIDVJEC.mjs +220 -0
- package/dist/lib/node-esm/chunk-CSIDVJEC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HGIUKAXD.mjs +281 -0
- package/dist/lib/node-esm/chunk-HGIUKAXD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-N2T5KLKB.mjs +22 -0
- package/dist/lib/node-esm/chunk-N2T5KLKB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NDSI2G7B.mjs +107 -0
- package/dist/lib/node-esm/chunk-NDSI2G7B.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IHDNQLLR.mjs → chunk-QP3KQOPQ.mjs} +381 -240
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OU5BYIDO.mjs → chunk-VBI32FGI.mjs} +55 -5
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-25ABSYP2.mjs → chunk-YN2Y7GPW.mjs} +85 -50
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +136 -137
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-P2WSGZJB.mjs +84 -0
- package/dist/lib/node-esm/markdown-P2WSGZJB.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-I3RCYCC4.mjs +435 -0
- package/dist/lib/node-esm/operation-resolver-I3RCYCC4.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-TFDOAH6Z.mjs +28 -0
- package/dist/lib/node-esm/react-root-TFDOAH6Z.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-3C7PBXXD.mjs +116 -0
- package/dist/lib/node-esm/react-surface-3C7PBXXD.mjs.map +7 -0
- package/dist/lib/node-esm/settings-FV2O6HDY.mjs +36 -0
- package/dist/lib/node-esm/settings-FV2O6HDY.mjs.map +7 -0
- package/dist/lib/node-esm/state-IODNXJEB.mjs +26 -0
- package/dist/lib/node-esm/state-IODNXJEB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +11 -12
- package/dist/types/src/ThreadPlugin.d.ts +2 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
- package/dist/types/src/calls/call-manager.d.ts +40 -30
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts +2 -2
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +5 -3
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +10 -9
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +9 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +3 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +6 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +7 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/components/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +2 -2
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts +13 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts +164 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts +14 -0
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts +3 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +3 -3
- package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +18 -4
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts +15 -0
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -0
- package/dist/types/src/components/MessagePanel/index.d.ts +2 -0
- package/dist/types/src/components/MessagePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +163 -4
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/{ResponsiveContainer.d.ts → ResponsivePanel.d.ts} +4 -4
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts +168 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +1 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -9
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts +15 -0
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +3 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/CallSidebar}/CallSidebar.d.ts +0 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +1 -0
- package/dist/types/src/containers/CallSidebar/index.d.ts +3 -0
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +12 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +166 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +17 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts +166 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +4 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +6 -0
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts +8 -0
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ThreadSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +8 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/{components/command-extension.d.ts → extensions/command.d.ts} +1 -1
- package/dist/types/src/extensions/command.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +1 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +8 -3
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/functions/create-proposals.d.ts +13 -0
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +14 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/hooks/analytics.d.ts +2 -3
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +1 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +5 -0
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/stories.d.ts +2 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +81 -7
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +711 -0
- package/dist/types/src/types/Channel.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +23 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3300 -365
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +93 -66
- package/src/ThreadPlugin.tsx +92 -130
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +40 -0
- package/src/calls/call-manager.ts +78 -54
- package/src/calls/call-swarm-synchronizer.ts +3 -3
- package/src/calls/media-manager.ts +67 -38
- package/src/calls/types.ts +8 -4
- package/src/calls/util/calls-service.ts +66 -15
- package/src/calls/util/stub-media-streams.ts +64 -7
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/calls-service.stories.tsx +79 -66
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +203 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/call-manager/call-manager.ts +26 -0
- package/src/capabilities/call-manager/index.ts +7 -0
- package/src/capabilities/index.ts +9 -12
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +81 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +392 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +20 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +101 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +34 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +22 -0
- package/src/components/Call/Call.tsx +11 -6
- package/src/components/Call/Toolbar.tsx +40 -33
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +93 -0
- package/src/components/CommentsPanel/CommentsPanel.tsx +71 -0
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +60 -55
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/Lobby/Lobby.tsx +13 -11
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.stories.tsx +37 -29
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessagePanel/MessagePanel.tsx +216 -0
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/Participant/Participant.tsx +34 -15
- package/src/components/Participant/ParticipantGrid.tsx +2 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +45 -43
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +5 -5
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +9 -6
- package/src/components/ResponsiveGrid/{ResponsiveContainer.stories.tsx → ResponsivePanel.stories.tsx} +11 -11
- package/src/components/ResponsiveGrid/{ResponsiveContainer.tsx → ResponsivePanel.tsx} +4 -4
- package/src/components/ResponsiveGrid/index.ts +1 -1
- package/src/components/index.ts +2 -13
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +172 -0
- package/src/containers/CallDebugPanel/index.ts +7 -0
- package/src/containers/CallSidebar/CallSidebar.tsx +17 -0
- package/src/containers/CallSidebar/index.ts +7 -0
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +59 -0
- package/src/{components → containers/ChannelContainer}/ChannelContainer.tsx +81 -59
- package/src/containers/ChannelContainer/index.ts +7 -0
- package/src/containers/ChatContainer/ChatContainer.stories.tsx +87 -0
- package/src/{components → containers/ChatContainer}/ChatContainer.tsx +67 -63
- package/src/containers/ChatContainer/index.ts +8 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +199 -0
- package/src/containers/ThreadCompanion/index.ts +7 -0
- package/src/containers/ThreadSettings/ThreadSettings.tsx +22 -0
- package/src/containers/ThreadSettings/index.ts +7 -0
- package/src/containers/index.ts +12 -0
- package/src/{components/command-extension.ts → extensions/command.ts} +7 -4
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +88 -44
- package/src/functions/create-proposals.ts +57 -0
- package/src/functions/index.ts +9 -0
- package/src/hooks/analytics.ts +22 -21
- package/src/hooks/index.ts +3 -1
- package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
- package/src/hooks/useDebugMode.ts +1 -1
- package/src/hooks/useVideoStreamTrack.tsx +6 -3
- package/src/index.ts +1 -1
- package/src/meta.ts +11 -7
- package/src/testing/data.ts +49 -0
- package/src/testing/stories.ts +18 -16
- package/src/translations.ts +10 -4
- package/src/types/Channel.ts +36 -0
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +170 -82
- package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
- package/src/typings.d.ts +8 -0
- package/src/util.ts +1 -1
- package/dist/lib/browser/ChannelContainer-IY2UIRLF.mjs +0 -16
- package/dist/lib/browser/ChatContainer-AIGIWAUG.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-N7BE5TYW.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-N7BE5TYW.mjs.map +0 -7
- package/dist/lib/browser/call-manager-NIPDYUVD.mjs +0 -24
- package/dist/lib/browser/call-manager-NIPDYUVD.mjs.map +0 -7
- package/dist/lib/browser/chunk-4OYAYON2.mjs +0 -21
- package/dist/lib/browser/chunk-4OYAYON2.mjs.map +0 -7
- package/dist/lib/browser/chunk-6NSMBO3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERWASUQK.mjs.map +0 -7
- package/dist/lib/browser/chunk-EV4JWI7L.mjs +0 -17
- package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
- package/dist/lib/browser/chunk-GCLD5ESP.mjs +0 -137
- package/dist/lib/browser/chunk-GCLD5ESP.mjs.map +0 -7
- package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
- package/dist/lib/browser/chunk-KWPRNHTK.mjs +0 -984
- package/dist/lib/browser/chunk-KWPRNHTK.mjs.map +0 -7
- package/dist/lib/browser/chunk-LGSDKXPF.mjs +0 -18
- package/dist/lib/browser/chunk-LGSDKXPF.mjs.map +0 -7
- package/dist/lib/browser/chunk-VUWC4IJM.mjs +0 -479
- package/dist/lib/browser/chunk-VUWC4IJM.mjs.map +0 -7
- package/dist/lib/browser/chunk-XLPJXUKO.mjs +0 -367
- package/dist/lib/browser/chunk-XLPJXUKO.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZE7KWN36.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JFGLZ6VI.mjs +0 -369
- package/dist/lib/browser/intent-resolver-JFGLZ6VI.mjs.map +0 -7
- package/dist/lib/browser/markdown-GEXBVJYN.mjs +0 -169
- package/dist/lib/browser/markdown-GEXBVJYN.mjs.map +0 -7
- package/dist/lib/browser/react-root-X4UIVGTX.mjs +0 -28
- package/dist/lib/browser/react-root-X4UIVGTX.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YCYEFBPM.mjs +0 -109
- package/dist/lib/browser/react-surface-YCYEFBPM.mjs.map +0 -7
- package/dist/lib/browser/settings-E32MTL7A.mjs +0 -22
- package/dist/lib/browser/settings-E32MTL7A.mjs.map +0 -7
- package/dist/lib/browser/state-H6CYONWE.mjs +0 -34
- package/dist/lib/browser/state-H6CYONWE.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-DET6T5N2.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-IQUWU426.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-VCW76Z6V.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-VCW76Z6V.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-D6O5ZJJ4.mjs +0 -25
- package/dist/lib/node-esm/call-manager-D6O5ZJJ4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-25ABSYP2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2MFNK53T.mjs +0 -480
- package/dist/lib/node-esm/chunk-2MFNK53T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-75RJ5DJI.mjs +0 -19
- package/dist/lib/node-esm/chunk-75RJ5DJI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C3XFMUAY.mjs +0 -985
- package/dist/lib/node-esm/chunk-C3XFMUAY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs +0 -19
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GW37AAM4.mjs +0 -23
- package/dist/lib/node-esm/chunk-GW37AAM4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IHDNQLLR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J4NSON5Q.mjs +0 -368
- package/dist/lib/node-esm/chunk-J4NSON5Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OU5BYIDO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs +0 -138
- package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-OXGNQ44Y.mjs +0 -370
- package/dist/lib/node-esm/intent-resolver-OXGNQ44Y.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-LIJZDK2J.mjs +0 -170
- package/dist/lib/node-esm/markdown-LIJZDK2J.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-M7J6PZVW.mjs +0 -29
- package/dist/lib/node-esm/react-root-M7J6PZVW.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-IRSEKM42.mjs +0 -110
- package/dist/lib/node-esm/react-surface-IRSEKM42.mjs.map +0 -7
- package/dist/lib/node-esm/settings-SJ24YG7M.mjs +0 -23
- package/dist/lib/node-esm/settings-SJ24YG7M.mjs.map +0 -7
- package/dist/lib/node-esm/state-D7WNDT3N.mjs +0 -35
- package/dist/lib/node-esm/state-D7WNDT3N.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -5
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -27
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -7
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/CallDebugPanel.d.ts +0 -8
- package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/components/ChannelContainer.d.ts +0 -14
- package/dist/types/src/components/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +0 -10
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chat.stories.d.ts +0 -7
- package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -17
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -6
- package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsContainer.d.ts +0 -13
- package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +0 -14
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/MessageContainer.d.ts +0 -11
- package/dist/types/src/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -10
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
- package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
- package/dist/types/src/components/ThreadSettings.d.ts +0 -6
- package/dist/types/src/components/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/components/command-extension.d.ts.map +0 -1
- package/dist/types/src/components/testing.d.ts +0 -4
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -162
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -180
- package/src/capabilities/call-manager.ts +0 -19
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -314
- package/src/capabilities/markdown.ts +0 -68
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -88
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -25
- package/src/components/CallDebugPanel.tsx +0 -115
- package/src/components/CallSidebar.tsx +0 -17
- package/src/components/ChannelContainer.stories.tsx +0 -58
- package/src/components/Chat.stories.tsx +0 -88
- package/src/components/Comments.stories.tsx +0 -92
- package/src/components/CommentsContainer.tsx +0 -71
- package/src/components/MessageContainer.tsx +0 -151
- package/src/components/ThreadComplementary.tsx +0 -151
- package/src/components/ThreadSettings.tsx +0 -17
- package/src/components/testing.ts +0 -29
- package/src/types/schema.ts +0 -33
- /package/dist/lib/browser/{ChannelContainer-IY2UIRLF.mjs.map → ChannelContainer-EQZXMQMV.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-VPCJ2AMF.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-DET6T5N2.mjs.map → browser/blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChatContainer-IQUWU426.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
|
@@ -2,47 +2,55 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useEffect, useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { scheduleTask } from '@dxos/async';
|
|
11
9
|
import { Context } from '@dxos/context';
|
|
12
10
|
import { log } from '@dxos/log';
|
|
13
|
-
import {
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
|
|
15
|
-
import { VideoObject } from './VideoObject';
|
|
16
13
|
import { getUserMediaTrack } from '../../calls';
|
|
17
|
-
import {
|
|
14
|
+
import { ResponsivePanel } from '../ResponsiveGrid';
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
render
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
import { VideoObject, type VideoObjectProps } from './VideoObject';
|
|
17
|
+
|
|
18
|
+
const DefaultStory = (props: VideoObjectProps) => {
|
|
19
|
+
log.info('render');
|
|
20
|
+
const [videoStream, setVideoStream] = useState<MediaStream>();
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const ctx = new Context();
|
|
23
|
+
scheduleTask(ctx, async () => {
|
|
24
|
+
try {
|
|
28
25
|
const stream = new MediaStream();
|
|
29
26
|
stream.addTrack(await getUserMediaTrack('videoinput'));
|
|
30
27
|
setVideoStream(stream);
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
} catch (err) {
|
|
29
|
+
log.catch(err);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return () => {
|
|
34
|
+
void ctx.dispose();
|
|
35
|
+
videoStream?.getTracks().forEach((track) => track.stop());
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ResponsivePanel>
|
|
41
|
+
<VideoObject videoStream={videoStream} flip {...props} />
|
|
42
|
+
</ResponsivePanel>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const meta = {
|
|
47
|
+
title: 'plugins/plugin-thread/components/VideoObject',
|
|
48
|
+
component: VideoObject,
|
|
49
|
+
render: DefaultStory,
|
|
50
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
51
|
+
parameters: {
|
|
52
|
+
layout: 'fullscreen',
|
|
44
53
|
},
|
|
45
|
-
decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'justify-center' })],
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
export default meta;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { type JSX, forwardRef, memo, useEffect, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
8
|
-
import { mx } from '@dxos/
|
|
8
|
+
import { mx } from '@dxos/ui-theme';
|
|
9
9
|
|
|
10
10
|
export type VideoObjectProps = Omit<JSX.IntrinsicElements['video'], 'className' | 'ref'> &
|
|
11
11
|
ThemedClassName<{
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { EditorView } from '@codemirror/view';
|
|
6
|
+
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
9
|
+
import { type Obj, Ref } from '@dxos/echo';
|
|
10
|
+
import { useObject } from '@dxos/echo-react';
|
|
11
|
+
import { PublicKey } from '@dxos/react-client';
|
|
12
|
+
import { type SpaceMember } from '@dxos/react-client/echo';
|
|
13
|
+
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
14
|
+
import { IconButton, useOnTransition, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
15
|
+
import { Card } from '@dxos/react-ui';
|
|
16
|
+
import { useTextEditor } from '@dxos/react-ui-editor';
|
|
17
|
+
import { MessageHeading, MessageRoot } from '@dxos/react-ui-thread';
|
|
18
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
19
|
+
import { createBasicExtensions, createThemeExtensions } from '@dxos/ui-editor';
|
|
20
|
+
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
|
|
21
|
+
|
|
22
|
+
import { useOnEditAnalytics } from '../../hooks';
|
|
23
|
+
import { meta } from '../../meta';
|
|
24
|
+
import { getMessageMetadata } from '../../util';
|
|
25
|
+
|
|
26
|
+
import { command } from '../../extensions/command';
|
|
27
|
+
|
|
28
|
+
export const buttonGroupClassNames = 'flex flex-row items-center gap-0.5 pe-2';
|
|
29
|
+
export const buttonClassNames = 'p-1! transition-opacity';
|
|
30
|
+
|
|
31
|
+
export type MessagePanelProps = {
|
|
32
|
+
message: Obj.OfShape<Message.Message> | Ref.Ref<Obj.OfShape<Message.Message>>;
|
|
33
|
+
members: SpaceMember[];
|
|
34
|
+
editable?: boolean;
|
|
35
|
+
onDelete?: (id: string) => void;
|
|
36
|
+
onAcceptProposal?: (id: string) => void;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const MessagePanel = ({
|
|
40
|
+
message: messageOrRef,
|
|
41
|
+
members,
|
|
42
|
+
editable = false,
|
|
43
|
+
onDelete,
|
|
44
|
+
onAcceptProposal,
|
|
45
|
+
}: MessagePanelProps) => {
|
|
46
|
+
const { t } = useTranslation(meta.id);
|
|
47
|
+
const [message, updateMessage] = useObject(messageOrRef);
|
|
48
|
+
const identity = useIdentity();
|
|
49
|
+
const [editing, setEditing] = useState(false);
|
|
50
|
+
|
|
51
|
+
const textBlockIndex = message?.blocks.findIndex((block) => block._tag === 'text') ?? -1;
|
|
52
|
+
|
|
53
|
+
const handleEdit = useCallback(() => setEditing((editing) => !editing), []);
|
|
54
|
+
const handleDelete = useCallback(() => message && onDelete?.(message.id), [message, onDelete]);
|
|
55
|
+
const handleAcceptProposal = useCallback(
|
|
56
|
+
() => message && onAcceptProposal?.(message.id),
|
|
57
|
+
[message, onAcceptProposal],
|
|
58
|
+
);
|
|
59
|
+
const handleTextBlockChange = useCallback(
|
|
60
|
+
(newText: string) => {
|
|
61
|
+
updateMessage((m) => {
|
|
62
|
+
const targetBlock = m.blocks[textBlockIndex];
|
|
63
|
+
if (targetBlock && targetBlock._tag === 'text') {
|
|
64
|
+
targetBlock.text = newText;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
[updateMessage, textBlockIndex],
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const textBlock =
|
|
72
|
+
message && textBlockIndex !== -1 ? (message.blocks[textBlockIndex] as ContentBlock.Text) : undefined;
|
|
73
|
+
useOnEditAnalytics(message, textBlock, !!editing);
|
|
74
|
+
|
|
75
|
+
if (!message) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const senderIdentity = members.find(
|
|
80
|
+
(member) =>
|
|
81
|
+
(message.sender.identityDid && member.identity.did === message.sender.identityDid) ||
|
|
82
|
+
(message.sender.identityKey && PublicKey.equals(member.identity.identityKey, message.sender.identityKey)),
|
|
83
|
+
)?.identity;
|
|
84
|
+
const messageMetadata = getMessageMetadata(message.id, senderIdentity);
|
|
85
|
+
const userIsAuthor = identity?.did === messageMetadata.authorId;
|
|
86
|
+
const proposalBlock = message.blocks.find((block) => block._tag === 'proposal');
|
|
87
|
+
const references = message.blocks.filter((block) => block._tag === 'reference').map((block) => block.reference);
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<MessageRoot {...messageMetadata} classNames={[hoverableControls, hoverableFocusedWithinControls]}>
|
|
91
|
+
<MessageHeading authorName={messageMetadata.authorName} timestamp={messageMetadata.timestamp}>
|
|
92
|
+
<div role='none' className={buttonGroupClassNames}>
|
|
93
|
+
{userIsAuthor && editable && (
|
|
94
|
+
<IconButton
|
|
95
|
+
data-testid={editing ? 'thread.message.save' : 'thread.message.edit'}
|
|
96
|
+
variant='ghost'
|
|
97
|
+
icon={editing ? 'ph--check--regular' : 'ph--pencil-simple--regular'}
|
|
98
|
+
iconOnly
|
|
99
|
+
label={t(editing ? 'save message label' : 'edit message label')}
|
|
100
|
+
classNames={[buttonClassNames, hoverableControlItem]}
|
|
101
|
+
onClick={handleEdit}
|
|
102
|
+
/>
|
|
103
|
+
)}
|
|
104
|
+
{/* TODO(wittjosiah): Proposal controls should probably be hoisted to thread level. */}
|
|
105
|
+
{proposalBlock && onAcceptProposal && (
|
|
106
|
+
<IconButton
|
|
107
|
+
data-testid='thread.message.accept'
|
|
108
|
+
variant='ghost'
|
|
109
|
+
icon='ph--check--regular'
|
|
110
|
+
iconOnly
|
|
111
|
+
label={t('accept proposal label')}
|
|
112
|
+
classNames={[buttonClassNames, hoverableControlItem]}
|
|
113
|
+
onClick={handleAcceptProposal}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
{onDelete && (
|
|
117
|
+
<IconButton
|
|
118
|
+
data-testid='thread.message.delete'
|
|
119
|
+
variant='ghost'
|
|
120
|
+
icon='ph--x--regular'
|
|
121
|
+
iconOnly
|
|
122
|
+
label={t('delete message label')}
|
|
123
|
+
classNames={[buttonClassNames, hoverableControlItem]}
|
|
124
|
+
onClick={handleDelete}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
</MessageHeading>
|
|
129
|
+
{textBlock && (
|
|
130
|
+
<TextboxBlock block={textBlock} isAuthor={userIsAuthor} editing={editing} onSave={handleTextBlockChange} />
|
|
131
|
+
)}
|
|
132
|
+
{proposalBlock && <ProposalBlock block={proposalBlock} />}
|
|
133
|
+
{Ref.Array.targets(references).map((reference, index) => (
|
|
134
|
+
<MessagePart key={index} part={reference as Obj.Unknown} />
|
|
135
|
+
))}
|
|
136
|
+
</MessageRoot>
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const MessagePart = ({ part }: { part: Obj.Unknown }) => {
|
|
141
|
+
return <MessageBlockObjectTile subject={part} />;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const TextboxBlock = ({
|
|
145
|
+
block,
|
|
146
|
+
isAuthor,
|
|
147
|
+
editing,
|
|
148
|
+
onSave,
|
|
149
|
+
}: {
|
|
150
|
+
block: ContentBlock.Text;
|
|
151
|
+
editing?: boolean;
|
|
152
|
+
isAuthor?: boolean;
|
|
153
|
+
identity?: Identity;
|
|
154
|
+
onSave?: (newText: string) => void;
|
|
155
|
+
}) => {
|
|
156
|
+
const { themeMode } = useThemeContext();
|
|
157
|
+
const inMemoryContentRef = useRef(block.text);
|
|
158
|
+
|
|
159
|
+
const handleDocumentChange = useCallback((newState: string) => {
|
|
160
|
+
inMemoryContentRef.current = newState;
|
|
161
|
+
}, []);
|
|
162
|
+
|
|
163
|
+
const saveDocumentChange = useCallback(() => {
|
|
164
|
+
onSave?.(inMemoryContentRef.current);
|
|
165
|
+
}, [onSave]);
|
|
166
|
+
|
|
167
|
+
useOnTransition(editing, true, false, saveDocumentChange);
|
|
168
|
+
|
|
169
|
+
const { parentRef, focusAttributes, view } = useTextEditor(
|
|
170
|
+
() => ({
|
|
171
|
+
initialValue: block.text,
|
|
172
|
+
extensions: [
|
|
173
|
+
createBasicExtensions({ readOnly: !isAuthor || !editing }),
|
|
174
|
+
createThemeExtensions({ themeMode }),
|
|
175
|
+
command,
|
|
176
|
+
EditorView.updateListener.of((update) => {
|
|
177
|
+
if (update.docChanged) {
|
|
178
|
+
handleDocumentChange(update.state.doc.toString());
|
|
179
|
+
}
|
|
180
|
+
}),
|
|
181
|
+
],
|
|
182
|
+
}),
|
|
183
|
+
[block.text, editing, isAuthor, themeMode, handleDocumentChange],
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
editing && view?.focus();
|
|
188
|
+
}, [editing, view]);
|
|
189
|
+
|
|
190
|
+
return <div role='none' ref={parentRef} className='me-4' {...focusAttributes} />;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const ProposalBlock = ({ block }: { block: ContentBlock.Proposal }) => {
|
|
194
|
+
return (
|
|
195
|
+
<div role='none' className='me-4 italic'>
|
|
196
|
+
{block.text}
|
|
197
|
+
</div>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
const MessageBlockObjectTile = forwardRef<HTMLDivElement, { subject: Obj.Unknown }>(({ subject }, forwardedRef) => {
|
|
202
|
+
// TODO(burdon): Use annotation to get title.
|
|
203
|
+
let title = (subject as any).name ?? (subject as any).title ?? (subject as any).type ?? 'Object';
|
|
204
|
+
if (typeof title !== 'string') {
|
|
205
|
+
title = title?.content ?? '';
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<Card.Root
|
|
210
|
+
className={mx('grid col-span-3 py-1 pr-4', hoverableControls, hoverableFocusedWithinControls)}
|
|
211
|
+
ref={forwardedRef}
|
|
212
|
+
>
|
|
213
|
+
<Surface.Surface role='card--content' limit={1} data={{ subject }} fallback={title} />
|
|
214
|
+
</Card.Root>
|
|
215
|
+
);
|
|
216
|
+
});
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
5
6
|
import React, { memo, useMemo } from 'react';
|
|
6
7
|
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/ui';
|
|
8
9
|
|
|
9
10
|
import { type EncodedTrackName, type UserState } from '../../calls';
|
|
10
|
-
import { ThreadCapabilities } from '../../
|
|
11
|
+
import { ThreadCapabilities } from '../../types';
|
|
11
12
|
import { VideoObject } from '../Media';
|
|
12
13
|
import { ResponsiveGridItem, type ResponsiveGridItemProps } from '../ResponsiveGrid';
|
|
13
14
|
|
|
@@ -15,21 +16,39 @@ export const SCREENSHARE_SUFFIX = '_screenshare';
|
|
|
15
16
|
|
|
16
17
|
export const Participant = memo(({ item: user, debug, ...props }: ResponsiveGridItemProps<UserState>) => {
|
|
17
18
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
18
|
-
const
|
|
19
|
+
const self = useAtomValue(call.selfAtom);
|
|
20
|
+
const media = useAtomValue(call.mediaAtom);
|
|
21
|
+
const isSelf: boolean = self.id !== undefined && user.id !== undefined && user.id.startsWith(self.id);
|
|
19
22
|
const isScreenshare = user.id?.endsWith(SCREENSHARE_SUFFIX);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
)
|
|
23
|
+
|
|
24
|
+
// Get pulled video stream for non-self users.
|
|
25
|
+
const pulledVideoStream = useMemo<MediaStream | undefined>(() => {
|
|
26
|
+
if (isSelf) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const trackName =
|
|
30
|
+
isScreenshare && user.tracks?.screenshareEnabled
|
|
31
|
+
? (user.tracks?.screenshare as EncodedTrackName)
|
|
32
|
+
: !isScreenshare && user.tracks?.videoEnabled
|
|
33
|
+
? (user.tracks?.video as EncodedTrackName)
|
|
34
|
+
: undefined;
|
|
35
|
+
return trackName ? media.pulledVideoStreams[trackName]?.stream : undefined;
|
|
36
|
+
}, [
|
|
37
|
+
isSelf,
|
|
38
|
+
isScreenshare,
|
|
39
|
+
media.pulledVideoStreams,
|
|
40
|
+
user.tracks?.screenshare,
|
|
41
|
+
user.tracks?.video,
|
|
42
|
+
user.tracks?.screenshareEnabled,
|
|
43
|
+
user.tracks?.videoEnabled,
|
|
44
|
+
]);
|
|
23
45
|
|
|
24
46
|
const videoStream = useMemo<MediaStream | undefined>(() => {
|
|
25
|
-
if (isSelf
|
|
26
|
-
return
|
|
27
|
-
} else if (isSelf && isScreenshare) {
|
|
28
|
-
return call.media.screenshareVideoStream;
|
|
29
|
-
} else if (!isSelf) {
|
|
30
|
-
return pulledVideoStream;
|
|
47
|
+
if (isSelf) {
|
|
48
|
+
return isScreenshare ? media.screenshareVideoStream : media.videoStream;
|
|
31
49
|
}
|
|
32
|
-
|
|
50
|
+
return pulledVideoStream;
|
|
51
|
+
}, [isSelf, isScreenshare, media.videoStream, media.screenshareVideoStream, pulledVideoStream]);
|
|
33
52
|
|
|
34
53
|
return (
|
|
35
54
|
<ResponsiveGridItem
|
|
@@ -37,8 +56,8 @@ export const Participant = memo(({ item: user, debug, ...props }: ResponsiveGrid
|
|
|
37
56
|
item={user}
|
|
38
57
|
name={user.name}
|
|
39
58
|
self={isSelf}
|
|
40
|
-
screenshare={!!
|
|
41
|
-
video={
|
|
59
|
+
screenshare={!!media.screenshareVideoStream}
|
|
60
|
+
video={media.videoEnabled}
|
|
42
61
|
mute={user ? !user.tracks?.audioEnabled : false}
|
|
43
62
|
wave={user.raisedHand}
|
|
44
63
|
speaking={user.speaking}
|
|
@@ -6,10 +6,11 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
-
import { Participant, SCREENSHARE_SUFFIX } from './Participant';
|
|
10
9
|
import { type UserState } from '../../calls';
|
|
11
10
|
import { ResponsiveGrid } from '../ResponsiveGrid';
|
|
12
11
|
|
|
12
|
+
import { Participant, SCREENSHARE_SUFFIX } from './Participant';
|
|
13
|
+
|
|
13
14
|
const getId = (user: UserState): string => user.id!;
|
|
14
15
|
|
|
15
16
|
export type ParticipantGridProps = ThemedClassName<{
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useEffect, useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { faker } from '@dxos/random';
|
|
11
|
-
import {
|
|
9
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
10
|
+
|
|
11
|
+
import { translations } from '../../translations';
|
|
12
12
|
|
|
13
13
|
import { ResponsiveGrid, type ResponsiveGridProps } from './ResponsiveGrid';
|
|
14
14
|
import { ResponsiveGridItem, type ResponsiveGridItemProps } from './ResponsiveGridItem';
|
|
15
|
-
import { translations } from '../../translations';
|
|
16
15
|
|
|
17
16
|
type TestItem = {
|
|
18
17
|
id: string;
|
|
@@ -56,46 +55,49 @@ const TestCell = ({ item, ...props }: ResponsiveGridItemProps<TestItem>) => {
|
|
|
56
55
|
|
|
57
56
|
type StoryProps = ResponsiveGridProps<TestItem> & { random?: boolean; autoHideGallery?: boolean };
|
|
58
57
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
58
|
+
const DefaultStory = (props: StoryProps) => {
|
|
59
|
+
const [pinned, setPinned] = useState<string | undefined>(
|
|
60
|
+
(props.pinned ?? props.items.length > 1) ? props.items[0]?.id : undefined,
|
|
61
|
+
);
|
|
62
|
+
const [items, setItems] = useState<TestItem[]>(props.items);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!props.random) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const interval = setInterval(() => {
|
|
69
|
+
setItems((items) => {
|
|
70
|
+
const p = Math.random();
|
|
71
|
+
if (p < 0.5) {
|
|
72
|
+
return items;
|
|
73
|
+
} else if (p < 0.99 && items.length > 1) {
|
|
74
|
+
return items.slice(0, -1);
|
|
75
|
+
} else {
|
|
76
|
+
return [...items, createItem(items[0]?.type)];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}, 3_000);
|
|
80
|
+
|
|
81
|
+
return () => clearInterval(interval);
|
|
82
|
+
}, []);
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className='grid grow p-4'>
|
|
86
|
+
<ResponsiveGrid {...props} Cell={TestCell} items={items} pinned={pinned} onPinnedChange={setPinned} />
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const meta = {
|
|
92
|
+
title: 'plugins/plugin-thread/components/ResponsiveGrid',
|
|
93
|
+
component: ResponsiveGrid as any,
|
|
94
|
+
render: DefaultStory,
|
|
95
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
95
96
|
parameters: {
|
|
97
|
+
layout: 'fullscreen',
|
|
96
98
|
translations,
|
|
97
99
|
},
|
|
98
|
-
}
|
|
100
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
99
101
|
|
|
100
102
|
const videoUrls = [
|
|
101
103
|
'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4',
|
|
@@ -117,7 +119,7 @@ const createItem = (type?: 'image' | 'video') => {
|
|
|
117
119
|
|
|
118
120
|
export default meta;
|
|
119
121
|
|
|
120
|
-
type Story = StoryObj<
|
|
122
|
+
type Story = StoryObj<typeof meta>;
|
|
121
123
|
|
|
122
124
|
// TODO(burdon): Story to join/leave repeatedly to test stable position.
|
|
123
125
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { type ComponentType, type FC,
|
|
5
|
+
import React, { type ComponentType, type FC, useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { useResizeDetector } from 'react-resize-detector';
|
|
7
7
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
10
10
|
import { type Size } from '@dxos/react-ui-dnd';
|
|
11
|
-
import { mx } from '@dxos/
|
|
11
|
+
import { mx } from '@dxos/ui-theme';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { ResponsivePanel } from './ResponsivePanel';
|
|
14
14
|
import { type ResponsiveGridItemProps } from './ResponsiveGridItem';
|
|
15
15
|
|
|
16
16
|
const ASPECT_RATIO = 16 / 9;
|
|
@@ -206,7 +206,7 @@ export const ResponsiveGrid = <T extends object = any>({
|
|
|
206
206
|
|
|
207
207
|
const SoloItem: FC<Pick<ResponsiveGridProps, 'debug'> & { id: string }> = ({ debug, id }) => {
|
|
208
208
|
return (
|
|
209
|
-
<
|
|
209
|
+
<ResponsivePanel>
|
|
210
210
|
<div
|
|
211
211
|
{...{ 'data-grid-item': id }}
|
|
212
212
|
className={mx('aspect-video overflow-hidden', debug && 'z-20 border-2 border-primary-500')}
|
|
@@ -214,7 +214,7 @@ const SoloItem: FC<Pick<ResponsiveGridProps, 'debug'> & { id: string }> = ({ deb
|
|
|
214
214
|
{/* Maximum size placeholder image forces aspect ratio. */}
|
|
215
215
|
<img alt='placeholder video' className={mx('opacity-0', maxImageSize)} />
|
|
216
216
|
</div>
|
|
217
|
-
</
|
|
217
|
+
</ResponsivePanel>
|
|
218
218
|
);
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { type CSSProperties, type PropsWithChildren, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Icon, IconButton,
|
|
7
|
+
import { Icon, IconButton, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
import { Waveform } from '@dxos/react-ui-sfx';
|
|
9
|
-
import { groupHoverControlItemWithTransition, mx } from '@dxos/
|
|
9
|
+
import { groupHoverControlItemWithTransition, mx } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
11
|
import { meta } from '../../meta';
|
|
12
12
|
|
|
@@ -89,7 +89,7 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
89
89
|
{onClick && (
|
|
90
90
|
<div className='z-10 absolute top-1 right-1 flex'>
|
|
91
91
|
<IconButton
|
|
92
|
-
classNames={mx('p-1 min-
|
|
92
|
+
classNames={mx('p-1 min-h-1 rounded-sm', groupHoverControlItemWithTransition)}
|
|
93
93
|
iconOnly
|
|
94
94
|
icon={pinned ? 'ph--x--regular' : 'ph--arrows-out--regular'}
|
|
95
95
|
size={pinned ? 5 : 4}
|
|
@@ -106,7 +106,10 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
106
106
|
{/* {self && <Icon icon='ph--asterisk--regular' size={pinned ? 5 : 4} />} */}
|
|
107
107
|
{screenshare && <Icon icon='ph--broadcast--regular' size={pinned ? 5 : 4} />}
|
|
108
108
|
<div
|
|
109
|
-
className={mx(
|
|
109
|
+
className={mx(
|
|
110
|
+
'bg-neutral-800 text-neutral-100 py-0.5 truncate rounded-sm',
|
|
111
|
+
pinned ? 'px-2' : 'px-1 text-xs',
|
|
112
|
+
)}
|
|
110
113
|
>
|
|
111
114
|
{name}
|
|
112
115
|
</div>
|
|
@@ -118,7 +121,7 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
118
121
|
{(speaking && <Waveform active size={pinned ? 5 : 4} />) ||
|
|
119
122
|
(props && (
|
|
120
123
|
<IconButton
|
|
121
|
-
classNames={mx('p-1 min-
|
|
124
|
+
classNames={mx('p-1 min-h-1 rounded-sm', props?.classNames)}
|
|
122
125
|
icon={props?.icon}
|
|
123
126
|
label={props?.label}
|
|
124
127
|
size={pinned ? 5 : 4}
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
9
|
|
|
12
|
-
import { ResponsiveContainer } from './ResponsiveContainer';
|
|
13
10
|
import { translations } from '../../translations';
|
|
14
11
|
import { VideoObject as VideoObjectComponent } from '../Media';
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
import { ResponsivePanel } from './ResponsivePanel';
|
|
14
|
+
|
|
15
|
+
const meta = {
|
|
16
|
+
title: 'plugins/plugin-thread/components/ResponsivePanel',
|
|
17
|
+
component: ResponsivePanel,
|
|
18
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
20
19
|
parameters: {
|
|
20
|
+
layout: 'fullscreen',
|
|
21
21
|
translations,
|
|
22
22
|
},
|
|
23
|
-
}
|
|
23
|
+
} satisfies Meta<typeof ResponsivePanel>;
|
|
24
24
|
|
|
25
25
|
export default meta;
|
|
26
26
|
|
|
27
|
-
type Story = StoryObj<typeof
|
|
27
|
+
type Story = StoryObj<typeof ResponsivePanel>;
|
|
28
28
|
|
|
29
29
|
export const Image: Story = {
|
|
30
30
|
args: {
|