2025-09-24 10:58:41 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2025 New Vector Ltd.
|
|
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
|
|
|
|
*/
|
|
|
|
|
|
2025-09-24 16:07:31 +01:00
|
|
|
/**
|
|
|
|
|
* The props that must be passed to a RoomView component.
|
|
|
|
|
* @alpha Subject to change.
|
|
|
|
|
*/
|
2025-09-24 10:58:41 +01:00
|
|
|
export interface RoomViewProps {
|
2025-10-28 16:06:28 +01:00
|
|
|
/*
|
|
|
|
|
* If true, the room header will be hidden.
|
|
|
|
|
*/
|
|
|
|
|
hideHeader?: boolean;
|
|
|
|
|
/*
|
|
|
|
|
* If true, the message composer will be hidden.
|
|
|
|
|
*/
|
|
|
|
|
hideComposer?: boolean;
|
2025-09-24 10:58:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2025-10-17 11:56:48 +01:00
|
|
|
* Exposes components and classes that are part of Element Web to allow modules to
|
|
|
|
|
* render the components as part of their custom components or use the classes
|
|
|
|
|
* (because they can't import the components from Element Web since it would cause
|
|
|
|
|
* a dependency cycle)
|
2025-09-24 16:07:31 +01:00
|
|
|
* @alpha
|
2025-09-24 10:58:41 +01:00
|
|
|
*/
|
|
|
|
|
export interface BuiltinsApi {
|
2025-10-23 12:39:11 +05:30
|
|
|
/**
|
|
|
|
|
* Render room avatar component from element-web.
|
|
|
|
|
*
|
|
|
|
|
* @alpha
|
|
|
|
|
* @param roomId - Id of the room
|
|
|
|
|
* @param size - Size of the avatar to render
|
|
|
|
|
*/
|
|
|
|
|
renderRoomAvatar(roomId: string, size?: string): React.ReactNode;
|
|
|
|
|
|
2025-10-17 12:10:07 +01:00
|
|
|
/**
|
2025-10-23 12:38:36 +05:30
|
|
|
* Render room view component from element-web.
|
2025-10-17 12:10:07 +01:00
|
|
|
*
|
|
|
|
|
* @alpha
|
2025-10-23 12:38:36 +05:30
|
|
|
* @param roomId - Id of the room
|
2025-10-28 16:06:28 +01:00
|
|
|
* @param props - Additional props to pass to the room view
|
2025-10-17 12:10:07 +01:00
|
|
|
*/
|
2025-10-29 10:36:55 +01:00
|
|
|
renderRoomView(roomId: string, props?: RoomViewProps): React.ReactNode;
|
2025-09-24 10:58:41 +01:00
|
|
|
}
|