From 57229c697a7f0b0be52f328e7115cf7bbefd7665 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 21 Nov 2023 18:22:49 +0200 Subject: [PATCH] Expose icons and hooks necessary to recreate participant tile (#716) --- .changeset/tiny-walls-repeat.md | 5 + packages/react/etc/components-react.api.md | 99 +++++++++++++++++++ .../src/assets/icons/CameraDisabledIcon.tsx | 3 + .../react/src/assets/icons/CameraIcon.tsx | 3 + packages/react/src/assets/icons/ChatIcon.tsx | 3 + packages/react/src/assets/icons/Chevron.tsx | 3 + .../src/assets/icons/FocusToggleIcon.tsx | 3 + packages/react/src/assets/icons/GearIcon.tsx | 3 + packages/react/src/assets/icons/LeaveIcon.tsx | 3 + .../react/src/assets/icons/LockLockedIcon.tsx | 3 + .../src/assets/icons/MicDisabledIcon.tsx | 3 + packages/react/src/assets/icons/MicIcon.tsx | 3 + .../src/assets/icons/QualityExcellentIcon.tsx | 3 + .../src/assets/icons/QualityGoodIcon.tsx | 3 + .../src/assets/icons/QualityPoorIcon.tsx | 3 + .../src/assets/icons/QualityUnknownIcon.tsx | 3 + .../src/assets/icons/ScreenShareIcon.tsx | 3 + .../src/assets/icons/ScreenShareStopIcon.tsx | 3 + .../react/src/assets/icons/SpinnerIcon.tsx | 3 + .../src/assets/icons/UnfocusToggleIcon.tsx | 3 + .../assets/images/ParticipantPlaceholder.tsx | 3 + packages/react/src/assets/template.js | 3 +- packages/react/src/hooks/index.ts | 1 + packages/react/src/index.ts | 4 + 24 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 .changeset/tiny-walls-repeat.md diff --git a/.changeset/tiny-walls-repeat.md b/.changeset/tiny-walls-repeat.md new file mode 100644 index 000000000..9554f0ed7 --- /dev/null +++ b/.changeset/tiny-walls-repeat.md @@ -0,0 +1,5 @@ +--- +"@livekit/components-react": patch +--- + +Expose icons and hooks necessary to recreate participant tile diff --git a/packages/react/etc/components-react.api.md b/packages/react/etc/components-react.api.md index c717829dd..3007ef60f 100644 --- a/packages/react/etc/components-react.api.md +++ b/packages/react/etc/components-react.api.md @@ -29,6 +29,7 @@ import type { RoomEvent } from 'livekit-client'; import type { RoomOptions } from 'livekit-client'; import type { ScreenShareCaptureOptions } from 'livekit-client'; import { setLogLevel as setLogLevel_2 } from 'livekit-client'; +import type { SVGProps } from 'react'; import { Track } from 'livekit-client'; import { TrackPublication } from 'livekit-client'; import type { VideoCaptureOptions } from 'livekit-client'; @@ -78,6 +79,16 @@ export interface AudioVisualizerProps extends React_2.HTMLAttributes trackRef?: TrackReferenceOrPlaceholder; } +// Warning: (ae-internal-missing-underscore) The name "CameraDisabledIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const CameraDisabledIcon: (props: SVGProps) => React_2.JSX.Element; + +// Warning: (ae-internal-missing-underscore) The name "CameraIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const CameraIcon: (props: SVGProps) => React_2.JSX.Element; + // @public export function CarouselLayout({ tracks, orientation, ...props }: CarouselLayoutProps): React_2.JSX.Element; @@ -107,6 +118,11 @@ export interface ChatEntryProps extends React_2.HTMLAttributes { messageFormatter?: MessageFormatter; } +// Warning: (ae-internal-missing-underscore) The name "ChatIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const ChatIcon: (props: SVGProps) => React_2.JSX.Element; + // @public (undocumented) export interface ChatMessage { // (undocumented) @@ -132,6 +148,11 @@ export function ChatToggle(props: ChatToggleProps): React_2.JSX.Element; export interface ChatToggleProps extends React_2.ButtonHTMLAttributes { } +// Warning: (ae-internal-missing-underscore) The name "Chevron" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const Chevron: (props: SVGProps) => React_2.JSX.Element; + // @public export function ClearPinButton(props: ClearPinButtonProps): React_2.JSX.Element; @@ -236,6 +257,11 @@ export interface FocusLayoutProps extends React_2.HTMLAttributes { // @public export function FocusToggle({ trackRef, trackSource, participant, ...props }: FocusToggleProps): React_2.JSX.Element; +// Warning: (ae-internal-missing-underscore) The name "FocusToggleIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const FocusToggleIcon: (props: SVGProps) => React_2.JSX.Element; + // @public (undocumented) export interface FocusToggleProps extends React_2.ButtonHTMLAttributes { // @deprecated (undocumented) @@ -249,6 +275,11 @@ export interface FocusToggleProps extends React_2.ButtonHTMLAttributes) => React_2.JSX.Element; + // @public export function GridLayout({ tracks, ...props }: GridLayoutProps): React_2.JSX.Element; @@ -287,6 +318,11 @@ export type LayoutContextType = { widget: ChatContextType; }; +// Warning: (ae-internal-missing-underscore) The name "LeaveIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const LeaveIcon: (props: SVGProps) => React_2.JSX.Element; + // @public export function LiveKitRoom(props: React_2.PropsWithChildren): React_2.JSX.Element; @@ -333,6 +369,11 @@ export type LocalUserChoices = { sharedPassphrase: string; }; +// Warning: (ae-internal-missing-underscore) The name "LockLockedIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const LockLockedIcon: (props: SVGProps) => React_2.JSX.Element; + // @public export function MediaDeviceMenu({ kind, initialSelection, onActiveDeviceChange, tracks, requestPermissions, ...props }: MediaDeviceMenuProps): React_2.JSX.Element; @@ -379,6 +420,16 @@ export type MessageEncoder = (message: ChatMessage) => Uint8Array; // @public (undocumented) export type MessageFormatter = (message: string) => React_2.ReactNode; +// Warning: (ae-internal-missing-underscore) The name "MicDisabledIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const MicDisabledIcon: (props: SVGProps) => React_2.JSX.Element; + +// Warning: (ae-internal-missing-underscore) The name "MicIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const MicIcon: (props: SVGProps) => React_2.JSX.Element; + // @public export function ParticipantAudioTile({ participant, children, source, publication, disableSpeakingIndicator, onParticipantClick, ...htmlProps }: ParticipantTileProps): React_2.JSX.Element; @@ -416,6 +467,11 @@ export function ParticipantName({ participant, ...props }: ParticipantNameProps) export interface ParticipantNameProps extends React_2.HTMLAttributes, UseParticipantInfoOptions { } +// Warning: (ae-internal-missing-underscore) The name "ParticipantPlaceholder" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const ParticipantPlaceholder: (props: SVGProps) => React_2.JSX.Element; + // @public export function ParticipantTile({ trackRef, participant, children, source, onParticipantClick, publication, disableSpeakingIndicator, ...htmlProps }: ParticipantTileProps): React_2.JSX.Element; @@ -464,6 +520,26 @@ export interface PreJoinProps extends Omit) => React_2.JSX.Element; + +// Warning: (ae-internal-missing-underscore) The name "QualityGoodIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const QualityGoodIcon: (props: SVGProps) => React_2.JSX.Element; + +// Warning: (ae-internal-missing-underscore) The name "QualityPoorIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const QualityPoorIcon: (props: SVGProps) => React_2.JSX.Element; + +// Warning: (ae-internal-missing-underscore) The name "QualityUnknownIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const QualityUnknownIcon: (props: SVGProps) => React_2.JSX.Element; + // @public (undocumented) export interface ReceivedChatMessage extends ChatMessage { // (undocumented) @@ -492,12 +568,27 @@ export interface RoomNameProps extends React_2.HTMLAttributes { childrenPosition?: 'before' | 'after'; } +// Warning: (ae-internal-missing-underscore) The name "ScreenShareIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const ScreenShareIcon: (props: SVGProps) => React_2.JSX.Element; + +// Warning: (ae-internal-missing-underscore) The name "ScreenShareStopIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const ScreenShareStopIcon: (props: SVGProps) => React_2.JSX.Element; + // Warning: (ae-forgotten-export) The symbol "LogLevel" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "SetLogLevelOptions" needs to be exported by the entry point index.d.ts // // @public export function setLogLevel(level: LogLevel, options?: SetLogLevelOptions): void; +// Warning: (ae-internal-missing-underscore) The name "SpinnerIcon" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const SpinnerIcon: (props: SVGProps) => React_2.JSX.Element; + // @public export function StartAudio({ label, ...props }: AllowAudioPlaybackProps): React_2.JSX.Element; @@ -567,6 +658,11 @@ export interface TrackToggleProps extends Omit) => React_2.JSX.Element; + // @alpha export function useAudioPlayback(room?: Room): { canPlayAudio: boolean; @@ -693,6 +789,9 @@ trackCount: number): { layout: GridLayoutDefinition; }; +// @alpha (undocumented) +export function useIsEncrypted(participant?: Participant): boolean; + // @public export function useIsMuted(trackRef: TrackReferenceOrPlaceholder): boolean; diff --git a/packages/react/src/assets/icons/CameraDisabledIcon.tsx b/packages/react/src/assets/icons/CameraDisabledIcon.tsx index e4e1a9f19..de3b39a6e 100644 --- a/packages/react/src/assets/icons/CameraDisabledIcon.tsx +++ b/packages/react/src/assets/icons/CameraDisabledIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgCameraDisabledIcon = (props: SVGProps) => ( diff --git a/packages/react/src/assets/icons/CameraIcon.tsx b/packages/react/src/assets/icons/CameraIcon.tsx index 4cbd22de4..3d689ee9b 100644 --- a/packages/react/src/assets/icons/CameraIcon.tsx +++ b/packages/react/src/assets/icons/CameraIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgCameraIcon = (props: SVGProps) => ( diff --git a/packages/react/src/assets/icons/ChatIcon.tsx b/packages/react/src/assets/icons/ChatIcon.tsx index d499a34f2..2a4cbe6cd 100644 --- a/packages/react/src/assets/icons/ChatIcon.tsx +++ b/packages/react/src/assets/icons/ChatIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgChatIcon = (props: SVGProps) => ( ) => ( ) => ( diff --git a/packages/react/src/assets/icons/GearIcon.tsx b/packages/react/src/assets/icons/GearIcon.tsx index 92fe93751..7bf588d67 100644 --- a/packages/react/src/assets/icons/GearIcon.tsx +++ b/packages/react/src/assets/icons/GearIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgGearIcon = (props: SVGProps) => ( ) => ( ) => ( ) => ( diff --git a/packages/react/src/assets/icons/MicIcon.tsx b/packages/react/src/assets/icons/MicIcon.tsx index 30a7b272e..ff40247da 100644 --- a/packages/react/src/assets/icons/MicIcon.tsx +++ b/packages/react/src/assets/icons/MicIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgMicIcon = (props: SVGProps) => ( ) => ( diff --git a/packages/react/src/assets/icons/QualityGoodIcon.tsx b/packages/react/src/assets/icons/QualityGoodIcon.tsx index d2e6d3a2b..e66703506 100644 --- a/packages/react/src/assets/icons/QualityGoodIcon.tsx +++ b/packages/react/src/assets/icons/QualityGoodIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgQualityGoodIcon = (props: SVGProps) => ( diff --git a/packages/react/src/assets/icons/QualityPoorIcon.tsx b/packages/react/src/assets/icons/QualityPoorIcon.tsx index 90a67a3a0..d035a5650 100644 --- a/packages/react/src/assets/icons/QualityPoorIcon.tsx +++ b/packages/react/src/assets/icons/QualityPoorIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgQualityPoorIcon = (props: SVGProps) => ( diff --git a/packages/react/src/assets/icons/QualityUnknownIcon.tsx b/packages/react/src/assets/icons/QualityUnknownIcon.tsx index 6c710705c..aa49bc6f7 100644 --- a/packages/react/src/assets/icons/QualityUnknownIcon.tsx +++ b/packages/react/src/assets/icons/QualityUnknownIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgQualityUnknownIcon = (props: SVGProps) => ( diff --git a/packages/react/src/assets/icons/ScreenShareIcon.tsx b/packages/react/src/assets/icons/ScreenShareIcon.tsx index 4420348d9..2c3c499de 100644 --- a/packages/react/src/assets/icons/ScreenShareIcon.tsx +++ b/packages/react/src/assets/icons/ScreenShareIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgScreenShareIcon = (props: SVGProps) => ( ) => ( diff --git a/packages/react/src/assets/icons/SpinnerIcon.tsx b/packages/react/src/assets/icons/SpinnerIcon.tsx index 89236dff7..62e56ed41 100644 --- a/packages/react/src/assets/icons/SpinnerIcon.tsx +++ b/packages/react/src/assets/icons/SpinnerIcon.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgSpinnerIcon = (props: SVGProps) => ( ) => ( diff --git a/packages/react/src/assets/images/ParticipantPlaceholder.tsx b/packages/react/src/assets/images/ParticipantPlaceholder.tsx index c3d1345c1..fe93c17c9 100644 --- a/packages/react/src/assets/images/ParticipantPlaceholder.tsx +++ b/packages/react/src/assets/images/ParticipantPlaceholder.tsx @@ -3,6 +3,9 @@ */ import * as React from 'react'; import type { SVGProps } from 'react'; +/** + * @internal + */ const SvgParticipantPlaceholder = (props: SVGProps) => ( ( ${variables.jsx} ); diff --git a/packages/react/src/hooks/index.ts b/packages/react/src/hooks/index.ts index 2ce993810..7d04e8a00 100644 --- a/packages/react/src/hooks/index.ts +++ b/packages/react/src/hooks/index.ts @@ -48,3 +48,4 @@ export { usePersistentUserChoices, type UsePersistentUserChoicesOptions, } from './usePersistentUserChoices'; +export { useIsEncrypted } from './useIsEncrypted'; diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 5ff111e81..ad59cacb2 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -6,6 +6,10 @@ export * from './prefabs'; export * from './context'; +export * from './assets/icons'; + +export * from './assets/images'; + // Re-exports from core export { setLogLevel, isTrackReference } from '@livekit/components-core'; export type {