From 3f27d8fe44bc14160d60eb9016fd85b0df0ca218 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 7 Nov 2023 12:01:00 +0200 Subject: [PATCH 1/6] Deprecate showE2EE options on PreJoin --- examples/nextjs/pages/prejoin.tsx | 2 +- packages/react/src/prefabs/PreJoin.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/nextjs/pages/prejoin.tsx b/examples/nextjs/pages/prejoin.tsx index 2e3243dee..6f76d4dba 100644 --- a/examples/nextjs/pages/prejoin.tsx +++ b/examples/nextjs/pages/prejoin.tsx @@ -8,7 +8,7 @@ const PreJoinExample: NextPage = () => { return (
- +
); }; diff --git a/packages/react/src/prefabs/PreJoin.tsx b/packages/react/src/prefabs/PreJoin.tsx index 87faebcb0..cdf8e369a 100644 --- a/packages/react/src/prefabs/PreJoin.tsx +++ b/packages/react/src/prefabs/PreJoin.tsx @@ -21,7 +21,7 @@ import { ParticipantPlaceholder } from '../assets/images'; import { useMediaDevices, usePersistentUserChoices } from '../hooks'; /** - * @deprecated Use `UserChoices` from `@livekit/components-core` instead. + * @deprecated Use `UserChoices` instead. * @public */ export type LocalUserChoices = { @@ -65,6 +65,7 @@ export interface PreJoinProps micLabel?: string; camLabel?: string; userLabel?: string; + /** @deprecated E2EE options will be removed from PreJoin in a future version **/ showE2EEOptions?: boolean; /** From ea906d6574daf38068d25c651677528c8faf5467 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 7 Nov 2023 12:01:31 +0200 Subject: [PATCH 2/6] Move re-exports to highest react package level --- packages/react/src/index.ts | 10 ++++++++++ packages/react/src/prefabs/index.ts | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index c2dd44920..147d638ff 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -5,3 +5,13 @@ export * from './hooks'; export * from './prefabs'; export * from './context'; + +// Re-exports from core +export { + ChatMessage, + ReceivedChatMessage, + MessageDecoder, + MessageEncoder, + UserChoices, + setLogLevel, +} from '@livekit/components-core'; diff --git a/packages/react/src/prefabs/index.ts b/packages/react/src/prefabs/index.ts index a5ee88050..e63bfdd77 100644 --- a/packages/react/src/prefabs/index.ts +++ b/packages/react/src/prefabs/index.ts @@ -10,11 +10,3 @@ export { VideoConference, type VideoConferenceProps } from './VideoConference'; export { ControlBar, type ControlBarProps, type ControlBarControls } from './ControlBar'; export { MediaDeviceMenu, type MediaDeviceMenuProps } from './MediaDeviceMenu'; export { AudioConference, type AudioConferenceProps } from './AudioConference'; - -// Re-export types from core -export { - type ChatMessage, - type ReceivedChatMessage, - type MessageDecoder, - type MessageEncoder, -} from '@livekit/components-core'; From d4a7e65e7850defd38e5e1a728040b96a9122125 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 7 Nov 2023 12:02:39 +0200 Subject: [PATCH 3/6] Create thin-zoos-tell.md --- .changeset/thin-zoos-tell.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/thin-zoos-tell.md diff --git a/.changeset/thin-zoos-tell.md b/.changeset/thin-zoos-tell.md new file mode 100644 index 000000000..4c4de6f7c --- /dev/null +++ b/.changeset/thin-zoos-tell.md @@ -0,0 +1,6 @@ +--- +"@livekit/components-react": minor +"@livekit/component-example-next": minor +--- + +Deprecate showE2EE options on PreJoin From 870a413b70f78679062d29dc8e6a1a67db2125a8 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 7 Nov 2023 12:07:56 +0200 Subject: [PATCH 4/6] update examples --- examples/nextjs/pages/e2ee.tsx | 3 +-- examples/nextjs/pages/minimal.tsx | 3 +-- examples/nextjs/pages/prejoin.tsx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/nextjs/pages/e2ee.tsx b/examples/nextjs/pages/e2ee.tsx index acbb3292e..21f2706c6 100644 --- a/examples/nextjs/pages/e2ee.tsx +++ b/examples/nextjs/pages/e2ee.tsx @@ -1,5 +1,4 @@ -import { setLogLevel } from '@livekit/components-core'; -import { LiveKitRoom, useToken, VideoConference } from '@livekit/components-react'; +import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react'; import type { NextPage } from 'next'; import * as React from 'react'; import { Room, ExternalE2EEKeyProvider } from 'livekit-client'; diff --git a/examples/nextjs/pages/minimal.tsx b/examples/nextjs/pages/minimal.tsx index f800e45c1..e6b21557f 100644 --- a/examples/nextjs/pages/minimal.tsx +++ b/examples/nextjs/pages/minimal.tsx @@ -1,5 +1,4 @@ -import { setLogLevel } from '@livekit/components-core'; -import { LiveKitRoom, useToken, VideoConference } from '@livekit/components-react'; +import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react'; import { RoomConnectOptions } from 'livekit-client'; import type { NextPage } from 'next'; import { generateRandomUserId } from '../lib/helper'; diff --git a/examples/nextjs/pages/prejoin.tsx b/examples/nextjs/pages/prejoin.tsx index 6f76d4dba..23c01d468 100644 --- a/examples/nextjs/pages/prejoin.tsx +++ b/examples/nextjs/pages/prejoin.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { setLogLevel } from '@livekit/components-core'; -import { PreJoin } from '@livekit/components-react'; +import { PreJoin, setLogLevel } from '@livekit/components-react'; import type { NextPage } from 'next'; const PreJoinExample: NextPage = () => { From 9be7a9c62b31a1d66f6f5597202f1021ce6fa6d3 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 7 Nov 2023 12:10:06 +0200 Subject: [PATCH 5/6] Update api docs --- packages/react/etc/components-react.api.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/react/etc/components-react.api.md b/packages/react/etc/components-react.api.md index 651c5e0f0..ee5120f4c 100644 --- a/packages/react/etc/components-react.api.md +++ b/packages/react/etc/components-react.api.md @@ -38,6 +38,7 @@ import type { RoomConnectOptions } from 'livekit-client'; import type { RoomEvent } from 'livekit-client'; import type { RoomOptions } from 'livekit-client'; import type { ScreenShareCaptureOptions } from 'livekit-client'; +import { setLogLevel } from '@livekit/components-core'; import { SetMediaDeviceOptions } from '@livekit/components-core'; import type { SourcesArray } from '@livekit/components-core'; import type { ToggleSource } from '@livekit/components-core'; @@ -47,7 +48,7 @@ import { TrackPublication } from 'livekit-client'; import type { TrackReference } from '@livekit/components-core'; import { TrackReferenceOrPlaceholder } from '@livekit/components-core'; import type { TrackSourceWithOptions } from '@livekit/components-core'; -import type { UserChoices } from '@livekit/components-core'; +import { UserChoices } from '@livekit/components-core'; import type { VideoCaptureOptions } from 'livekit-client'; import type { VideoSource } from '@livekit/components-core'; import type { WidgetState } from '@livekit/components-core'; @@ -445,7 +446,7 @@ export interface PreJoinProps extends Omit boolean; // @alpha persistUserChoices?: boolean; - // (undocumented) + // @deprecated (undocumented) showE2EEOptions?: boolean; // (undocumented) userLabel?: string; @@ -475,6 +476,8 @@ export interface RoomNameProps extends React_2.HTMLAttributes { childrenPosition?: 'before' | 'after'; } +export { setLogLevel } + // @public export function StartAudio({ label, ...props }: AllowAudioPlaybackProps): React_2.JSX.Element; @@ -859,6 +862,8 @@ export function usePreviewDevice(en // @alpha (undocumented) export function usePreviewTracks(options: CreateLocalTracksOptions, onError?: (err: Error) => void): LocalTrack[] | undefined; +export { UserChoices } + // @public export function useRemoteParticipant(identity: string, options?: UseRemoteParticipantOptions): RemoteParticipant | undefined; From 04cd97ef758d5552dd641147d76c812609554a65 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 7 Nov 2023 12:21:41 +0200 Subject: [PATCH 6/6] explicitly export types as types --- packages/react/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 147d638ff..937b15f7f 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -7,11 +7,11 @@ export * from './prefabs'; export * from './context'; // Re-exports from core -export { +export { setLogLevel } from '@livekit/components-core'; +export type { ChatMessage, ReceivedChatMessage, MessageDecoder, MessageEncoder, UserChoices, - setLogLevel, } from '@livekit/components-core';