Skip to content

Commit 176749a

Browse files
authored
Fix livekit-client internal export usage (#1289)
1 parent 442048c commit 176749a

File tree

8 files changed

+339
-210
lines changed

8 files changed

+339
-210
lines changed

.changeset/rare-flowers-yawn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@livekit/components-core': patch
3+
---
4+
5+
Update all livekit-client to not use internal exports

packages/core/etc/components-core.api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ import loglevel from 'loglevel';
1919
import { Observable } from 'rxjs';
2020
import { Participant } from 'livekit-client';
2121
import { ParticipantEvent } from 'livekit-client';
22-
import type { ParticipantEventCallbacks } from 'livekit-client/dist/src/room/participant/Participant';
22+
import { ParticipantEventCallbacks } from 'livekit-client';
2323
import type { ParticipantKind } from 'livekit-client';
2424
import type { ParticipantPermission } from '@livekit/protocol';
25-
import type { PublicationEventCallbacks } from 'livekit-client/dist/src/room/track/TrackPublication';
25+
import type { PublicationEventCallbacks } from 'livekit-client';
2626
import { RemoteParticipant } from 'livekit-client';
2727
import { Room } from 'livekit-client';
2828
import { RoomEvent } from 'livekit-client';
29-
import type { RoomEventCallbacks } from 'livekit-client/dist/src/room/Room';
29+
import { RoomEventCallbacks } from 'livekit-client';
3030
import type { ScreenShareCaptureOptions } from 'livekit-client';
3131
import { SendTextOptions } from 'livekit-client';
3232
import { setLogLevel as setLogLevel_2 } from 'livekit-client';
33-
import type { TextStreamInfo } from 'livekit-client/dist/src/room/types';
33+
import { TextStreamInfo } from 'livekit-client';
3434
import { Track } from 'livekit-client';
3535
import { TrackEvent as TrackEvent_2 } from 'livekit-client';
3636
import { TrackPublication } from 'livekit-client';

packages/core/src/components/textStream.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { RoomEvent, type Room } from 'livekit-client';
2-
import type { TextStreamInfo } from 'livekit-client/dist/src/room/types';
1+
import { RoomEvent, type Room, type TextStreamInfo } from 'livekit-client';
32
import { from, scan, Subject, type Observable } from 'rxjs';
43
import { share, tap } from 'rxjs/operators';
54
import { ParticipantAgentAttributes } from '../helper';

packages/core/src/observables/participant.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import type { ParticipantPermission } from '@livekit/protocol';
2-
import { Participant, RemoteParticipant, Room, TrackPublication } from 'livekit-client';
3-
import { ParticipantEvent, RoomEvent, Track } from 'livekit-client';
4-
// @ts-ignore some module resolutions (other than 'node') choke on this
5-
import type { ParticipantEventCallbacks } from 'livekit-client/dist/src/room/participant/Participant';
2+
import {
3+
Participant,
4+
RemoteParticipant,
5+
Room,
6+
TrackPublication,
7+
ParticipantEvent,
8+
RoomEvent,
9+
Track,
10+
type ParticipantEventCallbacks,
11+
} from 'livekit-client';
612
import type { Subscriber } from 'rxjs';
713
import { Observable, map, startWith, switchMap } from 'rxjs';
814
import { getTrackByIdentifier } from '../components/mediaTrack';

packages/core/src/observables/room.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
import type { Participant, TrackPublication } from 'livekit-client';
2-
import { LocalParticipant, Room, RoomEvent, Track } from 'livekit-client';
1+
import {
2+
LocalParticipant,
3+
Room,
4+
RoomEvent,
5+
Track,
6+
type Participant,
7+
type TrackPublication,
8+
type RoomEventCallbacks,
9+
} from 'livekit-client';
310
import type { Subscriber, Subscription } from 'rxjs';
411
import { concat, filter, map, Observable, startWith } from 'rxjs';
5-
// @ts-ignore some module resolutions (other than 'node') choke on this
6-
import type { RoomEventCallbacks } from 'livekit-client/dist/src/room/Room';
712
import { log } from '../logger';
813
export function observeRoomEvents(room: Room, ...events: RoomEvent[]): Observable<Room> {
914
const observable = new Observable<Room>((subscribe) => {

packages/core/src/observables/track.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
Room,
66
Track,
77
TrackPublication,
8+
PublicationEventCallbacks,
89
} from 'livekit-client';
910
import { RoomEvent, TrackEvent } from 'livekit-client';
1011
import { map, Observable, startWith } from 'rxjs';
@@ -14,8 +15,6 @@ import type { TrackReference } from '../track-reference';
1415
import { observeRoomEvents } from './room';
1516
import type { ParticipantTrackIdentifier } from '../types';
1617
import { observeParticipantEvents } from './participant';
17-
// @ts-ignore some module resolutions (other than 'node') choke on this
18-
import type { PublicationEventCallbacks } from 'livekit-client/dist/src/room/track/TrackPublication';
1918

2019
export function trackObservable(track: TrackPublication) {
2120
const trackObserver = observeTrackEvents(

0 commit comments

Comments
 (0)