diff --git a/packages/audio-filters-web/tsconfig.json b/packages/audio-filters-web/tsconfig.json index 65dac05c36..15cc755989 100644 --- a/packages/audio-filters-web/tsconfig.json +++ b/packages/audio-filters-web/tsconfig.json @@ -3,13 +3,11 @@ "outDir": "./dist", "module": "ES2020", "target": "ES2020", - "lib": [ - "esnext", - "dom" - ], + "lib": ["esnext", "dom"], "allowJs": true, "declaration": true, "moduleResolution": "node", + "verbatimModuleSyntax": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "resolveJsonModule": true, @@ -21,8 +19,5 @@ "inlineSources": true }, "exclude": ["**/__tests__/**"], - "include": [ - "./src", - "index.ts" - ] + "include": ["./src", "index.ts"] } diff --git a/packages/client/src/Call.ts b/packages/client/src/Call.ts index 1230684d3b..0e28bd742e 100644 --- a/packages/client/src/Call.ts +++ b/packages/client/src/Call.ts @@ -8,7 +8,7 @@ import { Publisher, Subscriber, toRtcConfiguration, - TrackPublishOptions, + type TrackPublishOptions, trackTypeToParticipantStreamKey, } from './rtc'; import { @@ -97,7 +97,7 @@ import type { UpdateUserPermissionsResponse, } from './gen/coordinator'; import { OwnCapability } from './gen/coordinator'; -import { +import type { AudioTrackType, CallConstructor, CallLeaveOptions, @@ -124,7 +124,7 @@ import { createStatsReporter, getSdkSignature, SfuStatsReporter, - StatsReporter, + type StatsReporter, Tracer, } from './stats'; import { DynascaleManager } from './helpers/DynascaleManager'; @@ -133,12 +133,12 @@ import { CallTypes } from './CallType'; import { StreamClient } from './coordinator/connection/client'; import { retryInterval, sleep } from './coordinator/connection/utils'; import { - AllCallEvents, - CallEventListener, + type AllCallEvents, + type CallEventListener, ErrorFromResponse, - Logger, - RejectReason, - StreamCallEvent, + type Logger, + type RejectReason, + type StreamCallEvent, } from './coordinator/connection/types'; import { getClientDetails } from './helpers/client-details'; import { getLogger } from './logger'; @@ -153,10 +153,10 @@ import { ensureExhausted } from './helpers/ensureExhausted'; import { pushToIfMissing } from './helpers/array'; import { makeSafePromise, - PromiseWithResolvers, + type PromiseWithResolvers, promiseWithResolvers, } from './helpers/promise'; -import { GetCallStatsResponse } from './gen/shims'; +import type { GetCallStatsResponse } from './gen/shims'; /** * An object representation of a `Call`. diff --git a/packages/client/src/CallType.ts b/packages/client/src/CallType.ts index 70ea8ffa6a..a993bdd46a 100644 --- a/packages/client/src/CallType.ts +++ b/packages/client/src/CallType.ts @@ -1,6 +1,6 @@ -import { StreamVideoParticipant } from './types'; +import type { StreamVideoParticipant } from './types'; import { - Comparator, + type Comparator, defaultSortPreset, livestreamOrAudioRoomSortPreset, } from './sorting'; diff --git a/packages/client/src/StreamSfuClient.ts b/packages/client/src/StreamSfuClient.ts index 1dcd984911..b12d73a349 100644 --- a/packages/client/src/StreamSfuClient.ts +++ b/packages/client/src/StreamSfuClient.ts @@ -10,7 +10,7 @@ import { createWebSocketSignalChannel, Dispatcher, IceTrickleBuffer, - SfuEventKinds, + type SfuEventKinds, } from './rtc'; import { JoinRequest, @@ -28,17 +28,17 @@ import { import { ICETrickle } from './gen/video/sfu/models/models'; import { StreamClient } from './coordinator/connection/client'; import { generateUUIDv4 } from './coordinator/connection/utils'; -import { Credentials } from './gen/coordinator'; -import { Logger } from './coordinator/connection/types'; +import type { Credentials } from './gen/coordinator'; +import type { Logger } from './coordinator/connection/types'; import { getLogger, getLogLevel } from './logger'; import { makeSafePromise, - PromiseWithResolvers, + type PromiseWithResolvers, promiseWithResolvers, - SafePromise, + type SafePromise, } from './helpers/promise'; import { getTimers } from './timers'; -import { Tracer, TraceSlice } from './stats'; +import { Tracer, type TraceSlice } from './stats'; export type StreamSfuClientConstructor = { /** diff --git a/packages/client/src/StreamVideoClient.ts b/packages/client/src/StreamVideoClient.ts index f22cac0623..f76bf44ccd 100644 --- a/packages/client/src/StreamVideoClient.ts +++ b/packages/client/src/StreamVideoClient.ts @@ -21,7 +21,7 @@ import type { QueryCallStatsRequest, QueryCallStatsResponse, } from './gen/coordinator'; -import { +import type { AllClientEvents, ClientEventListener, Logger, diff --git a/packages/client/src/__tests__/clientTestUtils.ts b/packages/client/src/__tests__/clientTestUtils.ts index 2a1cd3490c..1e06d5453a 100644 --- a/packages/client/src/__tests__/clientTestUtils.ts +++ b/packages/client/src/__tests__/clientTestUtils.ts @@ -1,4 +1,4 @@ -import { AllClientEvents } from '../coordinator/connection/types'; +import type { AllClientEvents } from '../coordinator/connection/types'; import { StreamVideoClient } from '../StreamVideoClient'; import { Call } from '../Call'; import { RxUtils } from '../store'; diff --git a/packages/client/src/coordinator/connection/client.ts b/packages/client/src/coordinator/connection/client.ts index 1fc2c78a6c..e2e346cf40 100644 --- a/packages/client/src/coordinator/connection/client.ts +++ b/packages/client/src/coordinator/connection/client.ts @@ -1,8 +1,8 @@ import axios, { AxiosError, - AxiosInstance, - AxiosRequestConfig, - AxiosResponse, + type AxiosInstance, + type AxiosRequestConfig, + type AxiosResponse, } from 'axios'; import https from 'https'; import { StableWSConnection } from './connection'; @@ -17,22 +17,22 @@ import { retryInterval, sleep, } from './utils'; -import { - AllClientEvents, - AllClientEventTypes, - APIErrorResponse, - ClientEventListener, - ConnectAPIResponse, +import { + type AllClientEvents, + type AllClientEventTypes, + type APIErrorResponse, + type ClientEventListener, + type ConnectAPIResponse, ErrorFromResponse, - Logger, - StreamClientOptions, - StreamVideoEvent, - TokenOrProvider, - User, - UserWithId, + type Logger, + type StreamClientOptions, + type StreamVideoEvent, + type TokenOrProvider, + type User, + type UserWithId, } from './types'; import { getLocationHint } from './location'; -import { +import type { ConnectedEvent, CreateGuestRequest, CreateGuestResponse, diff --git a/packages/client/src/coordinator/connection/types.ts b/packages/client/src/coordinator/connection/types.ts index 2c54673d2f..f05c7a4e27 100644 --- a/packages/client/src/coordinator/connection/types.ts +++ b/packages/client/src/coordinator/connection/types.ts @@ -1,6 +1,10 @@ -import { AxiosRequestConfig, AxiosResponse } from 'axios'; -import { ConnectedEvent, UserRequest, VideoEvent } from '../../gen/coordinator'; -import { AllSfuEvents } from '../../rtc'; +import type { AxiosRequestConfig, AxiosResponse } from 'axios'; +import type { + ConnectedEvent, + UserRequest, + VideoEvent, +} from '../../gen/coordinator'; +import type { AllSfuEvents } from '../../rtc'; export type UR = Record; diff --git a/packages/client/src/devices/AudioDeviceManager.ts b/packages/client/src/devices/AudioDeviceManager.ts index 2884700ea3..2096c6272d 100644 --- a/packages/client/src/devices/AudioDeviceManager.ts +++ b/packages/client/src/devices/AudioDeviceManager.ts @@ -1,7 +1,7 @@ import { DeviceManager } from './DeviceManager'; import { AudioDeviceManagerState } from './AudioDeviceManagerState'; import { AudioBitrateProfile } from '../gen/video/sfu/models/models'; -import { TrackPublishOptions } from '../rtc'; +import type { TrackPublishOptions } from '../rtc'; /** * Base class for High Fidelity enabled Device Managers. diff --git a/packages/client/src/devices/AudioDeviceManagerState.ts b/packages/client/src/devices/AudioDeviceManagerState.ts index c9cf58ebcf..7d8870f407 100644 --- a/packages/client/src/devices/AudioDeviceManagerState.ts +++ b/packages/client/src/devices/AudioDeviceManagerState.ts @@ -1,6 +1,9 @@ import { BehaviorSubject, distinctUntilChanged, Observable } from 'rxjs'; import { AudioBitrateProfile } from '../gen/video/sfu/models/models'; -import { DeviceManagerState, TrackDisableMode } from './DeviceManagerState'; +import { + DeviceManagerState, + type TrackDisableMode, +} from './DeviceManagerState'; import { RxUtils } from './../store'; import { BrowserPermission } from './BrowserPermission'; diff --git a/packages/client/src/devices/CameraManager.ts b/packages/client/src/devices/CameraManager.ts index aa8362d0e4..0a4422b972 100644 --- a/packages/client/src/devices/CameraManager.ts +++ b/packages/client/src/devices/CameraManager.ts @@ -1,9 +1,9 @@ import { Observable } from 'rxjs'; import { Call } from '../Call'; -import { CameraDirection, CameraManagerState } from './CameraManagerState'; +import { type CameraDirection, CameraManagerState } from './CameraManagerState'; import { DeviceManager } from './DeviceManager'; import { getVideoDevices, getVideoStream } from './devices'; -import { OwnCapability, VideoSettingsResponse } from '../gen/coordinator'; +import { OwnCapability, type VideoSettingsResponse } from '../gen/coordinator'; import { TrackType } from '../gen/video/sfu/models/models'; import { isMobile } from '../helpers/compatibility'; import { isReactNative } from '../helpers/platforms'; diff --git a/packages/client/src/devices/DeviceManager.ts b/packages/client/src/devices/DeviceManager.ts index e1232be657..d73a6edc82 100644 --- a/packages/client/src/devices/DeviceManager.ts +++ b/packages/client/src/devices/DeviceManager.ts @@ -1,12 +1,12 @@ import { combineLatest, Observable, pairwise } from 'rxjs'; import { Call } from '../Call'; -import { TrackPublishOptions } from '../rtc'; +import type { TrackPublishOptions } from '../rtc'; import { CallingState } from '../store'; import { createSubscription } from '../store/rxUtils'; import { DeviceManagerState } from './DeviceManagerState'; import { isMobile } from '../helpers/compatibility'; import { isReactNative } from '../helpers/platforms'; -import { Logger } from '../coordinator/connection/types'; +import type { Logger } from '../coordinator/connection/types'; import { getLogger } from '../logger'; import { TrackType } from '../gen/video/sfu/models/models'; import { deviceIds$ } from './devices'; @@ -15,7 +15,7 @@ import { withCancellation, withoutConcurrency, } from '../helpers/concurrency'; -import { +import type { MediaStreamFilter, MediaStreamFilterEntry, MediaStreamFilterRegistrationResult, diff --git a/packages/client/src/devices/DeviceManagerState.ts b/packages/client/src/devices/DeviceManagerState.ts index f4b828d2ef..d50484adbf 100644 --- a/packages/client/src/devices/DeviceManagerState.ts +++ b/packages/client/src/devices/DeviceManagerState.ts @@ -6,7 +6,10 @@ import { shareReplay, } from 'rxjs'; import { RxUtils } from '../store'; -import { BrowserPermission, BrowserPermissionState } from './BrowserPermission'; +import { + BrowserPermission, + type BrowserPermissionState, +} from './BrowserPermission'; export type InputDeviceStatus = 'enabled' | 'disabled' | undefined; export type TrackDisableMode = 'stop-tracks' | 'disable-tracks'; diff --git a/packages/client/src/devices/MicrophoneManager.ts b/packages/client/src/devices/MicrophoneManager.ts index bd9b69cf40..434618d19f 100644 --- a/packages/client/src/devices/MicrophoneManager.ts +++ b/packages/client/src/devices/MicrophoneManager.ts @@ -6,13 +6,13 @@ import { createAudioConstraints, } from './AudioDeviceManager'; import { MicrophoneManagerState } from './MicrophoneManagerState'; -import { TrackDisableMode } from './DeviceManagerState'; +import type { TrackDisableMode } from './DeviceManagerState'; import { getAudioDevices, getAudioStream } from './devices'; import { AudioBitrateProfile, TrackType } from '../gen/video/sfu/models/models'; import { createSoundDetector } from '../helpers/sound-detector'; import { isReactNative } from '../helpers/platforms'; import { - AudioSettingsResponse, + type AudioSettingsResponse, NoiseCancellationSettingsModeEnum, OwnCapability, } from '../gen/coordinator'; diff --git a/packages/client/src/devices/MicrophoneManagerState.ts b/packages/client/src/devices/MicrophoneManagerState.ts index 173261e7e8..a9d058e4c8 100644 --- a/packages/client/src/devices/MicrophoneManagerState.ts +++ b/packages/client/src/devices/MicrophoneManagerState.ts @@ -1,6 +1,6 @@ import { BehaviorSubject, distinctUntilChanged } from 'rxjs'; import { RxUtils } from '../store'; -import { TrackDisableMode } from './DeviceManagerState'; +import type { TrackDisableMode } from './DeviceManagerState'; import { AudioDeviceManagerState } from './AudioDeviceManagerState'; import { getAudioBrowserPermission, resolveDeviceId } from './devices'; import { AudioBitrateProfile } from '../gen/video/sfu/models/models'; diff --git a/packages/client/src/devices/ScreenShareManager.ts b/packages/client/src/devices/ScreenShareManager.ts index 915b791e74..d51d7a42b8 100644 --- a/packages/client/src/devices/ScreenShareManager.ts +++ b/packages/client/src/devices/ScreenShareManager.ts @@ -7,7 +7,7 @@ import { ScreenShareState } from './ScreenShareState'; import { Call } from '../Call'; import { AudioBitrateProfile, TrackType } from '../gen/video/sfu/models/models'; import { getScreenShareStream } from './devices'; -import { ScreenShareSettings } from '../types'; +import type { ScreenShareSettings } from '../types'; import { createSubscription } from '../store/rxUtils'; export class ScreenShareManager extends AudioDeviceManager< diff --git a/packages/client/src/devices/ScreenShareState.ts b/packages/client/src/devices/ScreenShareState.ts index 5ca22b5998..f43bcfa470 100644 --- a/packages/client/src/devices/ScreenShareState.ts +++ b/packages/client/src/devices/ScreenShareState.ts @@ -1,7 +1,7 @@ import { BehaviorSubject, distinctUntilChanged } from 'rxjs'; import { AudioDeviceManagerState } from './AudioDeviceManagerState'; import { AudioBitrateProfile } from '../gen/video/sfu/models/models'; -import { ScreenShareSettings } from '../types'; +import type { ScreenShareSettings } from '../types'; import { RxUtils } from '../store'; export class ScreenShareState extends AudioDeviceManagerState { diff --git a/packages/client/src/events/call.ts b/packages/client/src/events/call.ts index 7bde2be7bf..aab562d9fe 100644 --- a/packages/client/src/events/call.ts +++ b/packages/client/src/events/call.ts @@ -1,8 +1,8 @@ import { CallingState } from '../store'; import { Call } from '../Call'; import { - CallAcceptedEvent, - CallRejectedEvent, + type CallAcceptedEvent, + type CallRejectedEvent, OwnCapability, } from '../gen/coordinator'; import { CallEnded } from '../gen/video/sfu/event/events'; diff --git a/packages/client/src/events/callEventHandlers.ts b/packages/client/src/events/callEventHandlers.ts index 5433af7aef..4a35ce67f3 100644 --- a/packages/client/src/events/callEventHandlers.ts +++ b/packages/client/src/events/callEventHandlers.ts @@ -21,7 +21,7 @@ import { watchTrackPublished, watchTrackUnpublished, } from '../events'; -import { +import type { AllCallEvents, AllClientCallEvents, CallEventListener, diff --git a/packages/client/src/events/internal.ts b/packages/client/src/events/internal.ts index 7d9e700bc9..438b999187 100644 --- a/packages/client/src/events/internal.ts +++ b/packages/client/src/events/internal.ts @@ -1,7 +1,7 @@ import { Dispatcher } from '../rtc'; import { Call } from '../Call'; import { CallState } from '../store'; -import { StreamVideoParticipantPatches } from '../types'; +import type { StreamVideoParticipantPatches } from '../types'; import { getLogger } from '../logger'; import { pushToIfMissing, removeFromIfPresent } from '../helpers/array'; import type { diff --git a/packages/client/src/events/participant.ts b/packages/client/src/events/participant.ts index a9725deca3..371bbee157 100644 --- a/packages/client/src/events/participant.ts +++ b/packages/client/src/events/participant.ts @@ -7,8 +7,8 @@ import type { } from '../gen/video/sfu/event/events'; import type { Participant } from '../gen/video/sfu/models/models'; import { - StreamVideoParticipant, - StreamVideoParticipantPatch, + type StreamVideoParticipant, + type StreamVideoParticipantPatch, VisibilityState, } from '../types'; import { CallState } from '../store'; diff --git a/packages/client/src/events/speaker.ts b/packages/client/src/events/speaker.ts index 548fc83f17..ef5f4ee6be 100644 --- a/packages/client/src/events/speaker.ts +++ b/packages/client/src/events/speaker.ts @@ -1,6 +1,6 @@ import { Dispatcher } from '../rtc'; import { CallState } from '../store'; -import { StreamVideoParticipantPatches } from '../types'; +import type { StreamVideoParticipantPatches } from '../types'; /** * Watches for `dominantSpeakerChanged` events. diff --git a/packages/client/src/helpers/DynascaleManager.ts b/packages/client/src/helpers/DynascaleManager.ts index d689139f74..6767b53b8e 100644 --- a/packages/client/src/helpers/DynascaleManager.ts +++ b/packages/client/src/helpers/DynascaleManager.ts @@ -1,7 +1,7 @@ import { - AudioTrackType, + type AudioTrackType, DebounceType, - VideoTrackType, + type VideoTrackType, VisibilityState, } from '../types'; import { TrackType, VideoDimension } from '../gen/video/sfu/models/models'; diff --git a/packages/client/src/helpers/RNSpeechDetector.ts b/packages/client/src/helpers/RNSpeechDetector.ts index 0ef4f83525..bd29af4b76 100644 --- a/packages/client/src/helpers/RNSpeechDetector.ts +++ b/packages/client/src/helpers/RNSpeechDetector.ts @@ -1,5 +1,5 @@ -import { BaseStats } from '../stats'; -import { SoundStateChangeHandler } from './sound-detector'; +import type { BaseStats } from '../stats'; +import type { SoundStateChangeHandler } from './sound-detector'; import { flatten } from '../stats/utils'; import { getLogger } from '../logger'; diff --git a/packages/client/src/helpers/__tests__/clientUtils.test.ts b/packages/client/src/helpers/__tests__/clientUtils.test.ts index 249622cecd..9ec595b1a0 100644 --- a/packages/client/src/helpers/__tests__/clientUtils.test.ts +++ b/packages/client/src/helpers/__tests__/clientUtils.test.ts @@ -5,7 +5,7 @@ import { getCallInitConcurrencyTag, getInstanceKey, } from '../clientUtils'; -import { TokenProvider } from '../../coordinator/connection/types'; +import type { TokenProvider } from '../../coordinator/cownnection/types'; import { getSdkInfo, setSdkInfo } from '../client-details'; describe('clientUtils', () => { diff --git a/packages/client/src/helpers/participantUtils.ts b/packages/client/src/helpers/participantUtils.ts index 612f33d3fa..d377ecd86a 100644 --- a/packages/client/src/helpers/participantUtils.ts +++ b/packages/client/src/helpers/participantUtils.ts @@ -1,4 +1,4 @@ -import { StreamVideoParticipant, VideoTrackType } from '../types'; +import type { StreamVideoParticipant, VideoTrackType } from '../types'; import { TrackType } from '../gen/video/sfu/models/models'; /** diff --git a/packages/client/src/logger.ts b/packages/client/src/logger.ts index dedb026a23..8475bf7f68 100644 --- a/packages/client/src/logger.ts +++ b/packages/client/src/logger.ts @@ -1,4 +1,4 @@ -import { Logger, LogLevel } from './coordinator/connection/types'; +import type { Logger, LogLevel } from './coordinator/connection/types'; import { isReactNative } from './helpers/platforms'; // log levels, sorted by verbosity diff --git a/packages/client/src/permissions/PermissionsContext.ts b/packages/client/src/permissions/PermissionsContext.ts index 99c754be77..17956b4648 100644 --- a/packages/client/src/permissions/PermissionsContext.ts +++ b/packages/client/src/permissions/PermissionsContext.ts @@ -1,4 +1,4 @@ -import { CallSettingsResponse, OwnCapability } from '../gen/coordinator'; +import { type CallSettingsResponse, OwnCapability } from '../gen/coordinator'; import { TrackType } from '../gen/video/sfu/models/models'; import { ensureExhausted } from '../helpers/ensureExhausted'; diff --git a/packages/client/src/rpc/createClient.ts b/packages/client/src/rpc/createClient.ts index 9a3cf1879b..58844bffe7 100644 --- a/packages/client/src/rpc/createClient.ts +++ b/packages/client/src/rpc/createClient.ts @@ -1,16 +1,16 @@ import { - MethodInfo, - NextUnaryFn, - RpcInterceptor, - RpcOptions, + type MethodInfo, + type NextUnaryFn, + type RpcInterceptor, + type RpcOptions, UnaryCall, } from '@protobuf-ts/runtime-rpc'; import { TwirpFetchTransport, - TwirpOptions, + type TwirpOptions, } from '@protobuf-ts/twirp-transport'; import { SignalServerClient } from '../gen/video/sfu/signal_rpc/signal.client'; -import { Logger, LogLevel } from '../coordinator/connection/types'; +import type { Logger, LogLevel } from '../coordinator/connection/types'; import type { Trace } from '../stats'; import type { SfuResponseWithError } from './retryable'; diff --git a/packages/client/src/rpc/retryable.ts b/packages/client/src/rpc/retryable.ts index cb02ad51a6..fd494d3dcc 100644 --- a/packages/client/src/rpc/retryable.ts +++ b/packages/client/src/rpc/retryable.ts @@ -1,5 +1,5 @@ import { - FinishedUnaryCall, + type FinishedUnaryCall, RpcError, UnaryCall, } from '@protobuf-ts/runtime-rpc'; diff --git a/packages/client/src/rtc/BasePeerConnection.ts b/packages/client/src/rtc/BasePeerConnection.ts index b65010ce07..94aca7532c 100644 --- a/packages/client/src/rtc/BasePeerConnection.ts +++ b/packages/client/src/rtc/BasePeerConnection.ts @@ -13,10 +13,10 @@ import { } from '../gen/video/sfu/models/models'; import { NegotiationError } from './NegotiationError'; import { StreamSfuClient } from '../StreamSfuClient'; -import { AllSfuEvents, Dispatcher } from './Dispatcher'; +import { type AllSfuEvents, Dispatcher } from './Dispatcher'; import { withoutConcurrency } from '../helpers/concurrency'; import { StatsTracer, Tracer, traceRTCPeerConnection } from '../stats'; -import { BasePeerConnectionOpts, OnReconnectionNeeded } from './types'; +import type { BasePeerConnectionOpts, OnReconnectionNeeded } from './types'; /** * A base class for the `Publisher` and `Subscriber` classes. diff --git a/packages/client/src/rtc/Dispatcher.ts b/packages/client/src/rtc/Dispatcher.ts index d74cc89f74..33cb25da53 100644 --- a/packages/client/src/rtc/Dispatcher.ts +++ b/packages/client/src/rtc/Dispatcher.ts @@ -1,4 +1,4 @@ -import { CallEventListener, EventTypes } from '../coordinator/connection/types'; +import type { CallEventListener, EventTypes } from '../coordinator/connection/types'; import type { SfuEvent } from '../gen/video/sfu/event/events'; import { getLogger } from '../logger'; diff --git a/packages/client/src/rtc/Publisher.ts b/packages/client/src/rtc/Publisher.ts index b9800ce759..f71a32a88f 100644 --- a/packages/client/src/rtc/Publisher.ts +++ b/packages/client/src/rtc/Publisher.ts @@ -1,5 +1,5 @@ import { BasePeerConnection } from './BasePeerConnection'; -import { +import type { PublishBundle, PublisherConstructorOpts, TrackPublishOptions, diff --git a/packages/client/src/rtc/Subscriber.ts b/packages/client/src/rtc/Subscriber.ts index 3c1e78ba05..5fb8f85c52 100644 --- a/packages/client/src/rtc/Subscriber.ts +++ b/packages/client/src/rtc/Subscriber.ts @@ -1,5 +1,5 @@ import { BasePeerConnection } from './BasePeerConnection'; -import { BasePeerConnectionOpts } from './types'; +import type { BasePeerConnectionOpts } from './types'; import { NegotiationError } from './NegotiationError'; import { PeerType } from '../gen/video/sfu/models/models'; import { SubscriberOffer } from '../gen/video/sfu/event/events'; diff --git a/packages/client/src/rtc/helpers/rtcConfiguration.ts b/packages/client/src/rtc/helpers/rtcConfiguration.ts index edf2713499..cb567a7b3d 100644 --- a/packages/client/src/rtc/helpers/rtcConfiguration.ts +++ b/packages/client/src/rtc/helpers/rtcConfiguration.ts @@ -1,4 +1,4 @@ -import { ICEServer } from '../../gen/coordinator'; +import type { ICEServer } from '../../gen/coordinator'; export const toRtcConfiguration = (config: ICEServer[]): RTCConfiguration => { return { diff --git a/packages/client/src/rtc/helpers/tracks.ts b/packages/client/src/rtc/helpers/tracks.ts index 694ed11645..01d77becbb 100644 --- a/packages/client/src/rtc/helpers/tracks.ts +++ b/packages/client/src/rtc/helpers/tracks.ts @@ -1,5 +1,5 @@ import { TrackType } from '../../gen/video/sfu/models/models'; -import { TrackMuteType } from '../../types'; +import type { TrackMuteType } from '../../types'; import { ensureExhausted } from '../../helpers/ensureExhausted'; export const trackTypeToParticipantStreamKey = ( diff --git a/packages/client/src/rtc/layers.ts b/packages/client/src/rtc/layers.ts index d5d590f83a..a3669e8dd9 100644 --- a/packages/client/src/rtc/layers.ts +++ b/packages/client/src/rtc/layers.ts @@ -7,7 +7,7 @@ import { VideoQuality, } from '../gen/video/sfu/models/models'; import { isAudioTrackType } from './helpers/tracks'; -import { TrackPublishOptions } from './types'; +import type { TrackPublishOptions } from './types'; export type OptimalVideoLayer = RTCRtpEncodingParameters & { width: number; diff --git a/packages/client/src/rtc/signal.ts b/packages/client/src/rtc/signal.ts index 45e4d80ba8..f49c4bb887 100644 --- a/packages/client/src/rtc/signal.ts +++ b/packages/client/src/rtc/signal.ts @@ -1,6 +1,6 @@ import { SfuEvent } from '../gen/video/sfu/event/events'; import { getLogger } from '../logger'; -import { DispatchableMessage, SfuEventKinds } from './Dispatcher'; +import type { DispatchableMessage, SfuEventKinds } from './Dispatcher'; import { Tracer } from '../stats'; export const createWebSocketSignalChannel = (opts: { diff --git a/packages/client/src/sorting/participants.ts b/packages/client/src/sorting/participants.ts index ce2f2f53a8..b2a353ce74 100644 --- a/packages/client/src/sorting/participants.ts +++ b/packages/client/src/sorting/participants.ts @@ -1,5 +1,5 @@ -import { Comparator } from './'; -import { StreamVideoParticipant } from '../types'; +import type { Comparator } from './'; +import type { StreamVideoParticipant } from '../types'; import { ParticipantSource } from '../gen/video/sfu/models/models'; import { hasAudio, diff --git a/packages/client/src/sorting/presets.ts b/packages/client/src/sorting/presets.ts index aeded3911a..1df87aa740 100644 --- a/packages/client/src/sorting/presets.ts +++ b/packages/client/src/sorting/presets.ts @@ -1,4 +1,4 @@ -import { StreamVideoParticipant, VisibilityState } from '../types'; +import { type StreamVideoParticipant, VisibilityState } from '../types'; import { combineComparators, conditional } from './comparator'; import { ParticipantSource } from '../gen/video/sfu/models/models'; import { diff --git a/packages/client/src/stats/SfuStatsReporter.ts b/packages/client/src/stats/SfuStatsReporter.ts index f1ec184ce3..1db38b1bed 100644 --- a/packages/client/src/stats/SfuStatsReporter.ts +++ b/packages/client/src/stats/SfuStatsReporter.ts @@ -1,9 +1,9 @@ import { combineLatest } from 'rxjs'; import { StreamSfuClient } from '../StreamSfuClient'; -import { OwnCapability, StatsOptions } from '../gen/coordinator'; +import { OwnCapability, type StatsOptions } from '../gen/coordinator'; import { getLogger } from '../logger'; import { Publisher, Subscriber } from '../rtc'; -import { Tracer, TraceRecord } from './rtc'; +import { Tracer, type TraceRecord } from './rtc'; import { flatten, getSdkName, getSdkVersion } from './utils'; import { getDeviceState, getWebRTCInfo } from '../helpers/client-details'; import { diff --git a/packages/client/src/store/CallState.ts b/packages/client/src/store/CallState.ts index 14d0448af9..c49a8d5896 100644 --- a/packages/client/src/store/CallState.ts +++ b/packages/client/src/store/CallState.ts @@ -17,34 +17,34 @@ import { type StreamVideoParticipantPatch, type StreamVideoParticipantPatches, type SubscriptionChanges, - VideoTrackType, + type VideoTrackType, VisibilityState, } from '../types'; -import { CallStatsReport } from '../stats'; +import type { CallStatsReport } from '../stats'; import { - BlockedUserEvent, - CallClosedCaption, - CallIngressResponse, - CallMemberAddedEvent, - CallMemberRemovedEvent, - CallMemberUpdatedEvent, - CallMemberUpdatedPermissionEvent, - CallReactionEvent, - CallResponse, - CallSessionParticipantCountsUpdatedEvent, - CallSessionParticipantJoinedEvent, - CallSessionParticipantLeftEvent, - CallSessionResponse, - CallSettingsResponse, - ClosedCaptionEvent, - EgressResponse, - MemberResponse, + type BlockedUserEvent, + type CallClosedCaption, + type CallIngressResponse, + type CallMemberAddedEvent, + type CallMemberRemovedEvent, + type CallMemberUpdatedEvent, + type CallMemberUpdatedPermissionEvent, + type CallReactionEvent, + type CallResponse, + type CallSessionParticipantCountsUpdatedEvent, + type CallSessionParticipantJoinedEvent, + type CallSessionParticipantLeftEvent, + type CallSessionResponse, + type CallSettingsResponse, + type ClosedCaptionEvent, + type EgressResponse, + type MemberResponse, OwnCapability, - ThumbnailResponse, - UnblockedUserEvent, - UpdatedCallPermissionsEvent, - UserResponse, - VideoEvent, + type ThumbnailResponse, + type UnblockedUserEvent, + type UpdatedCallPermissionsEvent, + type UserResponse, + type VideoEvent, } from '../gen/coordinator'; import { Timestamp } from '../gen/google/protobuf/timestamp'; import { ReconnectDetails } from '../gen/video/sfu/event/events'; @@ -54,7 +54,7 @@ import { TrackType, CallGrants, } from '../gen/video/sfu/models/models'; -import { Comparator, defaultSortPreset } from '../sorting'; +import { type Comparator, defaultSortPreset } from '../sorting'; import { getLogger } from '../logger'; import { hasScreenShare } from '../helpers/participantUtils'; diff --git a/packages/client/src/types.ts b/packages/client/src/types.ts index 7b43b099d2..1f403d34cb 100644 --- a/packages/client/src/types.ts +++ b/packages/client/src/types.ts @@ -13,7 +13,7 @@ import type { StreamClient } from './coordinator/connection/client'; import type { Comparator } from './sorting'; import type { StreamVideoWriteableStateStore } from './store'; import { AxiosError } from 'axios'; -import { RejectReason } from './coordinator/connection/types'; +import type { RejectReason } from './coordinator/connection/types'; export type StreamReaction = Pick< ReactionResponse, diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 1dea390513..c9c24ed69a 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -3,15 +3,13 @@ "outDir": "./dist", "module": "ES2020", "target": "ES2020", - "lib": [ - "esnext", - "dom" - ], + "lib": ["esnext", "dom"], "noEmitOnError": true, "noImplicitAny": true, "declaration": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, + "verbatimModuleSyntax": true, "esModuleInterop": true, "resolveJsonModule": true, "isolatedModules": true, @@ -19,12 +17,8 @@ "strict": true, "strictNullChecks": true, "sourceMap": true, - "inlineSources": true, + "inlineSources": true }, "exclude": ["**/__tests__/**"], - "include": [ - "./src", - "index.ts", - "version.ts" - ] + "include": ["./src", "index.ts", "version.ts"] } diff --git a/packages/react-bindings/src/contexts/StreamCallContext.tsx b/packages/react-bindings/src/contexts/StreamCallContext.tsx index 9c0dec934e..96fb72dd2e 100644 --- a/packages/react-bindings/src/contexts/StreamCallContext.tsx +++ b/packages/react-bindings/src/contexts/StreamCallContext.tsx @@ -1,4 +1,4 @@ -import { createContext, PropsWithChildren, useContext } from 'react'; +import { createContext, type PropsWithChildren, useContext } from 'react'; import { Call } from '@stream-io/video-client'; const StreamCallContext = createContext(undefined); diff --git a/packages/react-bindings/src/contexts/StreamI18nContext.tsx b/packages/react-bindings/src/contexts/StreamI18nContext.tsx index 7d21f587f3..0e78393fab 100644 --- a/packages/react-bindings/src/contexts/StreamI18nContext.tsx +++ b/packages/react-bindings/src/contexts/StreamI18nContext.tsx @@ -1,6 +1,6 @@ import { createContext, - PropsWithChildren, + type PropsWithChildren, useContext, useEffect, useMemo, @@ -9,8 +9,8 @@ import { import { defaultTranslationFunction, StreamI18n, - TranslationLanguage, - TranslationsMap, + type TranslationLanguage, + type TranslationsMap, } from '../i18n'; type StreamI18nContextValue = { diff --git a/packages/react-bindings/src/contexts/StreamVideoContext.tsx b/packages/react-bindings/src/contexts/StreamVideoContext.tsx index 5c24a7946f..0f05bb263b 100644 --- a/packages/react-bindings/src/contexts/StreamVideoContext.tsx +++ b/packages/react-bindings/src/contexts/StreamVideoContext.tsx @@ -1,8 +1,8 @@ -import { createContext, PropsWithChildren, useContext } from 'react'; +import { createContext, type PropsWithChildren, useContext } from 'react'; import { StreamVideoClient } from '@stream-io/video-client'; import { StreamI18nProvider, - StreamI18nProviderProps, + type StreamI18nProviderProps, } from './StreamI18nContext'; const StreamVideoContext = createContext( diff --git a/packages/react-bindings/src/hooks/callStateHooks.ts b/packages/react-bindings/src/hooks/callStateHooks.ts index 193f111191..c57dd82b62 100644 --- a/packages/react-bindings/src/hooks/callStateHooks.ts +++ b/packages/react-bindings/src/hooks/callStateHooks.ts @@ -1,18 +1,18 @@ import { Call, - CallClosedCaption, - CallIngressResponse, - CallSessionResponse, - CallSettingsResponse, + type CallClosedCaption, + type CallIngressResponse, + type CallSessionResponse, + type CallSettingsResponse, CallState, - CallStatsReport, - Comparator, - EgressResponse, - InputDeviceStatus, - MemberResponse, + type CallStatsReport, + type Comparator, + type EgressResponse, + type InputDeviceStatus, + type MemberResponse, OwnCapability, - StreamVideoParticipant, - UserResponse, + type StreamVideoParticipant, + type UserResponse, } from '@stream-io/video-client'; import { useMemo, useState } from 'react'; import { Observable, of } from 'rxjs'; diff --git a/packages/react-bindings/src/i18n/StreamI18n.ts b/packages/react-bindings/src/i18n/StreamI18n.ts index 73d25f6404..7c9a3daded 100644 --- a/packages/react-bindings/src/i18n/StreamI18n.ts +++ b/packages/react-bindings/src/i18n/StreamI18n.ts @@ -1,5 +1,5 @@ import i18next from 'i18next'; -import { +import type { TranslationLanguage, TranslationsMap, TranslationsRegistry, diff --git a/packages/react-bindings/src/wrappers/Restricted.tsx b/packages/react-bindings/src/wrappers/Restricted.tsx index 5b60ad619a..055a789730 100644 --- a/packages/react-bindings/src/wrappers/Restricted.tsx +++ b/packages/react-bindings/src/wrappers/Restricted.tsx @@ -1,6 +1,6 @@ import { OwnCapability } from '@stream-io/video-client'; -import { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; import { useCall } from '../contexts'; import { useCallStateHooks } from '../hooks'; diff --git a/packages/react-bindings/tsconfig.json b/packages/react-bindings/tsconfig.json index 054c512440..f4f7f2cd9d 100644 --- a/packages/react-bindings/tsconfig.json +++ b/packages/react-bindings/tsconfig.json @@ -11,6 +11,7 @@ "resolveJsonModule": true, "isolatedModules": true, "skipLibCheck": true, + "verbatimModuleSyntax": true, "strict": true, "strictNullChecks": true, "sourceMap": true, @@ -18,5 +19,5 @@ "jsx": "react-jsxdev" }, "exclude": ["**/__tests__/**"], - "include": ["./src", "index.ts"], + "include": ["./src", "index.ts"] } diff --git a/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsGrid.tsx b/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsGrid.tsx index 5aca586ec2..50e86236d2 100644 --- a/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsGrid.tsx +++ b/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsGrid.tsx @@ -11,7 +11,7 @@ import { useTheme } from '../../../contexts/ThemeContext'; import type { CallContentProps } from '../CallContent'; import type { ParticipantViewComponentProps } from '../../Participant'; import { useIsInPiPMode } from '../../../hooks/useIsInPiPMode'; -import { StreamVideoParticipant } from '@stream-io/video-client'; +import type { StreamVideoParticipant } from '@stream-io/video-client'; /** * Props for the CallParticipantsGrid component. diff --git a/packages/react-native-sdk/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx b/packages/react-native-sdk/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx index 7fe6eb60e2..fa33962e9d 100644 --- a/packages/react-native-sdk/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +++ b/packages/react-native-sdk/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { hasScreenShare, SfuModels, - StreamVideoParticipant, + type StreamVideoParticipant, } from '@stream-io/video-client'; import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings'; import { StyleSheet, View, type ViewStyle } from 'react-native'; diff --git a/packages/react-native-sdk/src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx b/packages/react-native-sdk/src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx index e5a499c941..6a95b760bf 100644 --- a/packages/react-native-sdk/src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx +++ b/packages/react-native-sdk/src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useCall, useI18n } from '@stream-io/video-react-bindings'; import { useState, useEffect, useMemo } from 'react'; import { useTheme } from '../../../contexts'; -import { ListRecordingsResponse } from '@stream-io/video-client'; +import type { ListRecordingsResponse } from '@stream-io/video-client'; import { FlatList, Pressable, diff --git a/packages/react-native-sdk/src/contexts/internal/ScreenshotIosContext.tsx b/packages/react-native-sdk/src/contexts/internal/ScreenshotIosContext.tsx index 4c184abd92..46795ccda2 100644 --- a/packages/react-native-sdk/src/contexts/internal/ScreenshotIosContext.tsx +++ b/packages/react-native-sdk/src/contexts/internal/ScreenshotIosContext.tsx @@ -1,12 +1,12 @@ import { - StreamVideoParticipant, + type StreamVideoParticipant, type VideoTrackType, getLogger, } from '@stream-io/video-client'; import React, { createContext, useContext, - RefObject, + type RefObject, useCallback, useMemo, } from 'react'; diff --git a/packages/react-native-sdk/src/hooks/useScreenshot.ts b/packages/react-native-sdk/src/hooks/useScreenshot.ts index fd01f8c1c8..234fff7d71 100644 --- a/packages/react-native-sdk/src/hooks/useScreenshot.ts +++ b/packages/react-native-sdk/src/hooks/useScreenshot.ts @@ -3,7 +3,7 @@ import { useScreenshotIosContext } from '../contexts/internal/ScreenshotIosConte import { NativeModules, Platform } from 'react-native'; import type { MediaStream } from '@stream-io/react-native-webrtc'; import { - StreamVideoParticipant, + type StreamVideoParticipant, getLogger, type VideoTrackType, } from '@stream-io/video-client'; diff --git a/packages/react-native-sdk/src/icons/LivestreamControls.tsx b/packages/react-native-sdk/src/icons/LivestreamControls.tsx index 895f47ca05..7cf1e81389 100644 --- a/packages/react-native-sdk/src/icons/LivestreamControls.tsx +++ b/packages/react-native-sdk/src/icons/LivestreamControls.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { ColorValue } from 'react-native/types'; +import type { ColorValue } from 'react-native/types'; type IconProps = { color: ColorValue; diff --git a/packages/react-native-sdk/src/modules/call-manager/CallManager.ts b/packages/react-native-sdk/src/modules/call-manager/CallManager.ts index f25583be2e..8ef31ba486 100644 --- a/packages/react-native-sdk/src/modules/call-manager/CallManager.ts +++ b/packages/react-native-sdk/src/modules/call-manager/CallManager.ts @@ -1,5 +1,5 @@ import { NativeEventEmitter, NativeModules, Platform } from 'react-native'; -import { AudioDeviceStatus, StreamInCallManagerConfig } from './types'; +import type { AudioDeviceStatus, StreamInCallManagerConfig } from './types'; const NativeManager = NativeModules.StreamInCallManager; diff --git a/packages/react-native-sdk/src/providers/NoiseCancellation/NoiseCancellationProvider.tsx b/packages/react-native-sdk/src/providers/NoiseCancellation/NoiseCancellationProvider.tsx index e42d9aec75..f31db239bb 100644 --- a/packages/react-native-sdk/src/providers/NoiseCancellation/NoiseCancellationProvider.tsx +++ b/packages/react-native-sdk/src/providers/NoiseCancellation/NoiseCancellationProvider.tsx @@ -1,6 +1,6 @@ import React, { createContext, - PropsWithChildren, + type PropsWithChildren, useContext, useEffect, useState, diff --git a/packages/react-native-sdk/src/utils/push/internal/ios.ts b/packages/react-native-sdk/src/utils/push/internal/ios.ts index 11b0a07863..0deef09d92 100644 --- a/packages/react-native-sdk/src/utils/push/internal/ios.ts +++ b/packages/react-native-sdk/src/utils/push/internal/ios.ts @@ -4,7 +4,7 @@ import { getCallKeepLib, getVoipPushNotificationLib } from '../libs'; import { voipPushNotificationCallCId$ } from './rxSubjects'; import { pushUnsubscriptionCallbacks } from './constants'; import { canAddPushWSSubscriptionsRef, shouldCallBeEnded } from './utils'; -import { StreamVideoConfig } from '../../StreamVideoRN/types'; +import type { StreamVideoConfig } from '../../StreamVideoRN/types'; export const onVoipNotificationReceived = async ( notification: any, diff --git a/packages/react-native-sdk/src/utils/push/setupIosVoipPushEvents.ts b/packages/react-native-sdk/src/utils/push/setupIosVoipPushEvents.ts index 61b5fd32b1..513219aa75 100644 --- a/packages/react-native-sdk/src/utils/push/setupIosVoipPushEvents.ts +++ b/packages/react-native-sdk/src/utils/push/setupIosVoipPushEvents.ts @@ -4,7 +4,7 @@ import { Platform } from 'react-native'; import { onVoipNotificationReceived } from './internal/ios'; import { setPushLogoutCallback } from '../internal/pushLogoutCallback'; import { getLogger } from '@stream-io/video-client'; -import { StreamVideoConfig } from '../StreamVideoRN/types'; +import type { StreamVideoConfig } from '../StreamVideoRN/types'; export function setupIosVoipPushEvents( pushConfig: NonNullable, diff --git a/packages/react-native-sdk/tsconfig.json b/packages/react-native-sdk/tsconfig.json index a92ff18d0b..4eb360263c 100644 --- a/packages/react-native-sdk/tsconfig.json +++ b/packages/react-native-sdk/tsconfig.json @@ -10,6 +10,7 @@ "resolveJsonModule": true, "isolatedModules": true, "skipLibCheck": true, + "verbatimModuleSyntax": true, "strict": true, "strictNullChecks": true, "noUncheckedIndexedAccess": true, diff --git a/packages/react-sdk/src/components/Avatar/Avatar.tsx b/packages/react-sdk/src/components/Avatar/Avatar.tsx index 00e314fcae..b4f166e64a 100644 --- a/packages/react-sdk/src/components/Avatar/Avatar.tsx +++ b/packages/react-sdk/src/components/Avatar/Avatar.tsx @@ -1,4 +1,4 @@ -import { ComponentProps, CSSProperties, useState } from 'react'; +import { type ComponentProps, type CSSProperties, useState } from 'react'; import clsx from 'clsx'; export type AvatarData = { diff --git a/packages/react-sdk/src/components/BackgroundFilters/BackgroundFilters.tsx b/packages/react-sdk/src/components/BackgroundFilters/BackgroundFilters.tsx index 26df5a316e..a4ac26df54 100644 --- a/packages/react-sdk/src/components/BackgroundFilters/BackgroundFilters.tsx +++ b/packages/react-sdk/src/components/BackgroundFilters/BackgroundFilters.tsx @@ -1,6 +1,6 @@ import { createContext, - PropsWithChildren, + type PropsWithChildren, useCallback, useContext, useEffect, @@ -12,14 +12,14 @@ import clsx from 'clsx'; import { useCall } from '@stream-io/video-react-bindings'; import { Call, disposeOfMediaStream, getLogger } from '@stream-io/video-client'; import { - BackgroundBlurLevel, - BackgroundFilter, + type BackgroundBlurLevel, + type BackgroundFilter, createRenderer, isPlatformSupported, loadTFLite, - PlatformSupportFlags, - Renderer, - TFLite, + type PlatformSupportFlags, + type Renderer, + type TFLite, } from '@stream-io/video-filters-web'; export type BackgroundFiltersProps = PlatformSupportFlags & { diff --git a/packages/react-sdk/src/components/Button/CompositeButton.tsx b/packages/react-sdk/src/components/Button/CompositeButton.tsx index 4b678ede91..d81b841f0a 100644 --- a/packages/react-sdk/src/components/Button/CompositeButton.tsx +++ b/packages/react-sdk/src/components/Button/CompositeButton.tsx @@ -1,13 +1,13 @@ import clsx from 'clsx'; -import { MenuToggle, ToggleMenuButtonProps } from '../Menu'; +import { MenuToggle, type ToggleMenuButtonProps } from '../Menu'; import { - ComponentProps, - ComponentType, + type ComponentProps, + type ComponentType, forwardRef, - PropsWithChildren, - ReactElement, + type PropsWithChildren, + type ReactElement, } from 'react'; -import { Placement } from '@floating-ui/react'; +import type { Placement } from '@floating-ui/react'; import { IconButton } from './IconButton'; import { isComponentType } from '../../utilities'; diff --git a/packages/react-sdk/src/components/Button/IconButton.tsx b/packages/react-sdk/src/components/Button/IconButton.tsx index af09c5ad55..08094c867f 100644 --- a/packages/react-sdk/src/components/Button/IconButton.tsx +++ b/packages/react-sdk/src/components/Button/IconButton.tsx @@ -1,7 +1,7 @@ -import { ComponentProps, ForwardedRef, forwardRef } from 'react'; +import { type ComponentProps, type ForwardedRef, forwardRef } from 'react'; import clsx from 'clsx'; -import { Icon, IconProps } from '../Icon'; +import { Icon, type IconProps } from '../Icon'; export type ButtonWithIconProps = { enabled?: boolean; diff --git a/packages/react-sdk/src/components/Button/TextButton.tsx b/packages/react-sdk/src/components/Button/TextButton.tsx index 4105ebbef7..0f06fa072f 100644 --- a/packages/react-sdk/src/components/Button/TextButton.tsx +++ b/packages/react-sdk/src/components/Button/TextButton.tsx @@ -1,4 +1,4 @@ -import { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; export const TextButton = ({ children, diff --git a/packages/react-sdk/src/components/CallControls/AcceptCallButton.tsx b/packages/react-sdk/src/components/CallControls/AcceptCallButton.tsx index 642e98a9e4..16ce687dc8 100644 --- a/packages/react-sdk/src/components/CallControls/AcceptCallButton.tsx +++ b/packages/react-sdk/src/components/CallControls/AcceptCallButton.tsx @@ -1,4 +1,4 @@ -import { MouseEventHandler, useCallback } from 'react'; +import { type MouseEventHandler, useCallback } from 'react'; import { IconButton } from '../Button'; import { useCall } from '@stream-io/video-react-bindings'; diff --git a/packages/react-sdk/src/components/CallControls/CallStatsButton.tsx b/packages/react-sdk/src/components/CallControls/CallStatsButton.tsx index 0a774c4985..e07ff05f9f 100644 --- a/packages/react-sdk/src/components/CallControls/CallStatsButton.tsx +++ b/packages/react-sdk/src/components/CallControls/CallStatsButton.tsx @@ -3,7 +3,7 @@ import { useI18n } from '@stream-io/video-react-bindings'; import { CallStats } from '../CallStats'; import { CompositeButton } from '../Button/'; -import { MenuToggle, ToggleMenuButtonProps } from '../Menu'; +import { MenuToggle, type ToggleMenuButtonProps } from '../Menu'; import { Icon } from '../Icon'; export type CallStatsButtonProps = { diff --git a/packages/react-sdk/src/components/CallControls/CancelCallButton.tsx b/packages/react-sdk/src/components/CallControls/CancelCallButton.tsx index 08481f8b85..5a9b1ad540 100644 --- a/packages/react-sdk/src/components/CallControls/CancelCallButton.tsx +++ b/packages/react-sdk/src/components/CallControls/CancelCallButton.tsx @@ -1,8 +1,8 @@ -import { forwardRef, MouseEventHandler, useCallback } from 'react'; +import { forwardRef, type MouseEventHandler, useCallback } from 'react'; import { OwnCapability } from '@stream-io/video-client'; import { Restricted, useCall, useI18n } from '@stream-io/video-react-bindings'; -import { MenuToggle, ToggleMenuButtonProps } from '../Menu'; +import { MenuToggle, type ToggleMenuButtonProps } from '../Menu'; import { IconButton } from '../Button'; import { Icon } from '../Icon'; diff --git a/packages/react-sdk/src/components/CallControls/ReactionsButton.tsx b/packages/react-sdk/src/components/CallControls/ReactionsButton.tsx index c085a98cbc..a32f95c2d6 100644 --- a/packages/react-sdk/src/components/CallControls/ReactionsButton.tsx +++ b/packages/react-sdk/src/components/CallControls/ReactionsButton.tsx @@ -1,13 +1,13 @@ import { forwardRef } from 'react'; import clsx from 'clsx'; -import { OwnCapability, StreamReaction } from '@stream-io/video-client'; +import { OwnCapability, type StreamReaction } from '@stream-io/video-client'; import { Restricted, useCall, useI18n } from '@stream-io/video-react-bindings'; import { MenuToggle, MenuVisualType, - ToggleMenuButtonProps, + type ToggleMenuButtonProps, useMenuContext, } from '../Menu'; import { CompositeButton } from '../Button'; diff --git a/packages/react-sdk/src/components/CallControls/RecordCallButton.tsx b/packages/react-sdk/src/components/CallControls/RecordCallButton.tsx index f0a6fcf231..70c62c84f6 100644 --- a/packages/react-sdk/src/components/CallControls/RecordCallButton.tsx +++ b/packages/react-sdk/src/components/CallControls/RecordCallButton.tsx @@ -11,7 +11,7 @@ import { Icon } from '../Icon'; import { MenuToggle, MenuVisualType, - ToggleMenuButtonProps, + type ToggleMenuButtonProps, useMenuContext, } from '../Menu'; import { LoadingIndicator } from '../LoadingIndicator'; diff --git a/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx b/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx index 2106bcbc2d..10ffaa2237 100644 --- a/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx +++ b/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx @@ -3,7 +3,7 @@ import { Restricted, useCallStateHooks, useI18n, - UseInputMediaDeviceOptions, + type UseInputMediaDeviceOptions, } from '@stream-io/video-react-bindings'; import { CompositeButton } from '../Button/'; import { PermissionNotification } from '../Notification'; @@ -11,7 +11,7 @@ import { useRequestPermission } from '../../hooks'; import { Icon } from '../Icon'; import { WithTooltip } from '../Tooltip'; import { - PropsWithErrorHandler, + type PropsWithErrorHandler, createCallControlHandler, } from '../../utilities/callControlHandler'; diff --git a/packages/react-sdk/src/components/CallControls/ToggleAudioButton.tsx b/packages/react-sdk/src/components/CallControls/ToggleAudioButton.tsx index aed840e8dc..ce23da7c98 100644 --- a/packages/react-sdk/src/components/CallControls/ToggleAudioButton.tsx +++ b/packages/react-sdk/src/components/CallControls/ToggleAudioButton.tsx @@ -6,7 +6,7 @@ import { type UseInputMediaDeviceOptions, } from '@stream-io/video-react-bindings'; import clsx from 'clsx'; -import { CompositeButton, IconButtonWithMenuProps } from '../Button'; +import { CompositeButton, type IconButtonWithMenuProps } from '../Button'; import { DeviceSelectorAudioInput } from '../DeviceSettings'; import { PermissionNotification } from '../Notification'; import { useRequestPermission } from '../../hooks'; @@ -15,7 +15,7 @@ import { WithTooltip } from '../Tooltip'; import { useState } from 'react'; import { createCallControlHandler, - PropsWithErrorHandler, + type PropsWithErrorHandler, } from '../../utilities/callControlHandler'; export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler< diff --git a/packages/react-sdk/src/components/CallControls/ToggleAudioOutputButton.tsx b/packages/react-sdk/src/components/CallControls/ToggleAudioOutputButton.tsx index b183f8a5de..1f10ef477e 100644 --- a/packages/react-sdk/src/components/CallControls/ToggleAudioOutputButton.tsx +++ b/packages/react-sdk/src/components/CallControls/ToggleAudioOutputButton.tsx @@ -1,4 +1,4 @@ -import { CompositeButton, IconButtonWithMenuProps } from '../Button'; +import { CompositeButton, type IconButtonWithMenuProps } from '../Button'; import { useI18n } from '@stream-io/video-react-bindings'; import { Icon } from '../Icon'; import { DeviceSelectorAudioOutput } from '../DeviceSettings'; diff --git a/packages/react-sdk/src/components/CallControls/ToggleVideoButton.tsx b/packages/react-sdk/src/components/CallControls/ToggleVideoButton.tsx index d001da86f7..fe5a505d49 100644 --- a/packages/react-sdk/src/components/CallControls/ToggleVideoButton.tsx +++ b/packages/react-sdk/src/components/CallControls/ToggleVideoButton.tsx @@ -2,11 +2,11 @@ import { Restricted, useCallStateHooks, useI18n, - UseInputMediaDeviceOptions, + type UseInputMediaDeviceOptions, } from '@stream-io/video-react-bindings'; import clsx from 'clsx'; import { OwnCapability } from '@stream-io/video-client'; -import { CompositeButton, IconButtonWithMenuProps } from '../Button/'; +import { CompositeButton, type IconButtonWithMenuProps } from '../Button/'; import { DeviceSelectorVideo } from '../DeviceSettings'; import { PermissionNotification } from '../Notification'; import { useRequestPermission } from '../../hooks'; @@ -15,7 +15,7 @@ import { WithTooltip } from '../Tooltip'; import { useState } from 'react'; import { createCallControlHandler, - PropsWithErrorHandler, + type PropsWithErrorHandler, } from '../../utilities/callControlHandler'; export type ToggleVideoPreviewButtonProps = PropsWithErrorHandler< diff --git a/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListing.tsx b/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListing.tsx index 56e156302b..e3f8fe0893 100644 --- a/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListing.tsx +++ b/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListing.tsx @@ -1,5 +1,5 @@ -import { ComponentType } from 'react'; -import { StreamVideoParticipant } from '@stream-io/video-client'; +import type { ComponentType } from 'react'; +import type { StreamVideoParticipant } from '@stream-io/video-client'; import { CallParticipantListingItem } from './CallParticipantListingItem'; export type CallParticipantListingProps = { diff --git a/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListingItem.tsx b/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListingItem.tsx index dcf76084d8..80aff1fa39 100644 --- a/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListingItem.tsx +++ b/packages/react-sdk/src/components/CallParticipantsList/CallParticipantListingItem.tsx @@ -1,14 +1,14 @@ import clsx from 'clsx'; -import { ComponentProps, ComponentType, forwardRef } from 'react'; +import { type ComponentProps, type ComponentType, forwardRef } from 'react'; import { useConnectedUser, useI18n } from '@stream-io/video-react-bindings'; import { hasAudio, hasVideo, isPinned, - StreamVideoParticipant, + type StreamVideoParticipant, } from '@stream-io/video-client'; import { IconButton } from '../Button'; -import { MenuToggle, ToggleMenuButtonProps } from '../Menu'; +import { MenuToggle, type ToggleMenuButtonProps } from '../Menu'; import { WithTooltip } from '../Tooltip'; import { Avatar } from '../Avatar'; import { ParticipantActionsContextMenu } from '../../core/components/ParticipantView/ParticipantActionsContextMenu'; diff --git a/packages/react-sdk/src/components/CallParticipantsList/CallParticipantsList.tsx b/packages/react-sdk/src/components/CallParticipantsList/CallParticipantsList.tsx index 15e19b5fd7..3f5f97ab07 100644 --- a/packages/react-sdk/src/components/CallParticipantsList/CallParticipantsList.tsx +++ b/packages/react-sdk/src/components/CallParticipantsList/CallParticipantsList.tsx @@ -1,7 +1,7 @@ import { - Dispatch, + type Dispatch, forwardRef, - SetStateAction, + type SetStateAction, useCallback, useState, } from 'react'; @@ -14,7 +14,7 @@ import { import { name, OwnCapability, - StreamVideoParticipant, + type StreamVideoParticipant, } from '@stream-io/video-client'; import { BlockedUserListing } from './BlockedUserListing'; @@ -24,12 +24,12 @@ import { CallParticipantListing } from './CallParticipantListing'; import { EmptyParticipantSearchList } from './EmptyParticipantSearchList'; import { LoadingIndicator } from '../LoadingIndicator'; import { SearchInput, SearchResults } from '../Search'; -import { useSearch, UseSearchParams } from '../Search/hooks'; +import { useSearch, type UseSearchParams } from '../Search/hooks'; import { GenericMenu, GenericMenuButtonItem, MenuToggle, - ToggleMenuButtonProps, + type ToggleMenuButtonProps, } from '../Menu'; type CallParticipantListProps = { diff --git a/packages/react-sdk/src/components/CallPreview/CallPreview.tsx b/packages/react-sdk/src/components/CallPreview/CallPreview.tsx index b8543b1e88..020956c3ed 100644 --- a/packages/react-sdk/src/components/CallPreview/CallPreview.tsx +++ b/packages/react-sdk/src/components/CallPreview/CallPreview.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import { CSSProperties, useEffect, useState } from 'react'; +import { type CSSProperties, useEffect, useState } from 'react'; import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings'; export type CallPreviewProps = { diff --git a/packages/react-sdk/src/components/CallRecordingList/CallRecordingList.tsx b/packages/react-sdk/src/components/CallRecordingList/CallRecordingList.tsx index 981ba86487..acc0eb411f 100644 --- a/packages/react-sdk/src/components/CallRecordingList/CallRecordingList.tsx +++ b/packages/react-sdk/src/components/CallRecordingList/CallRecordingList.tsx @@ -1,18 +1,18 @@ -import { ComponentType } from 'react'; -import { CallRecording } from '@stream-io/video-client'; +import type { ComponentType } from 'react'; +import type { CallRecording } from '@stream-io/video-client'; import { CallRecordingListHeader as DefaultCallRecordingListHeader, - CallRecordingListHeaderProps, + type CallRecordingListHeaderProps, } from './CallRecordingListHeader'; import { CallRecordingListItem as DefaultCallRecordingListItem, - CallRecordingListItemProps, + type CallRecordingListItemProps, } from './CallRecordingListItem'; import { EmptyCallRecordingListing as DefaultEmptyCallRecordingList } from './EmptyCallRecordingListing'; import { LoadingCallRecordingListing as DefaultLoadingCallRecordingList, - LoadingCallRecordingListProps, + type LoadingCallRecordingListProps, } from './LoadingCallRecordingListing'; export type CallRecordingListProps = { diff --git a/packages/react-sdk/src/components/CallRecordingList/CallRecordingListHeader.tsx b/packages/react-sdk/src/components/CallRecordingList/CallRecordingListHeader.tsx index e92a084691..e9f02f38f2 100644 --- a/packages/react-sdk/src/components/CallRecordingList/CallRecordingListHeader.tsx +++ b/packages/react-sdk/src/components/CallRecordingList/CallRecordingListHeader.tsx @@ -1,4 +1,4 @@ -import { CallRecording } from '@stream-io/video-client'; +import type { CallRecording } from '@stream-io/video-client'; import { useI18n } from '@stream-io/video-react-bindings'; import { IconButton } from '../Button'; diff --git a/packages/react-sdk/src/components/CallRecordingList/CallRecordingListItem.tsx b/packages/react-sdk/src/components/CallRecordingList/CallRecordingListItem.tsx index 26351f3724..00311ceb46 100644 --- a/packages/react-sdk/src/components/CallRecordingList/CallRecordingListItem.tsx +++ b/packages/react-sdk/src/components/CallRecordingList/CallRecordingListItem.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import { CallRecording } from '@stream-io/video-client'; +import type { CallRecording } from '@stream-io/video-client'; import { Icon } from '../Icon'; export type CallRecordingListItemProps = { diff --git a/packages/react-sdk/src/components/CallRecordingList/LoadingCallRecordingListing.tsx b/packages/react-sdk/src/components/CallRecordingList/LoadingCallRecordingListing.tsx index 47217f3fdf..f98c8205e3 100644 --- a/packages/react-sdk/src/components/CallRecordingList/LoadingCallRecordingListing.tsx +++ b/packages/react-sdk/src/components/CallRecordingList/LoadingCallRecordingListing.tsx @@ -1,4 +1,4 @@ -import { CallRecording } from '@stream-io/video-client'; +import type { CallRecording } from '@stream-io/video-client'; import { CallRecordingListItem } from './CallRecordingListItem'; import { LoadingIndicator } from '../LoadingIndicator'; diff --git a/packages/react-sdk/src/components/CallStats/CallStats.tsx b/packages/react-sdk/src/components/CallStats/CallStats.tsx index ff939325ea..d84c5d3bd9 100644 --- a/packages/react-sdk/src/components/CallStats/CallStats.tsx +++ b/packages/react-sdk/src/components/CallStats/CallStats.tsx @@ -1,8 +1,15 @@ -import { lazy, ReactNode, Suspense, useEffect, useRef, useState } from 'react'; +import { + lazy, + type ReactNode, + Suspense, + useEffect, + useRef, + useState, +} from 'react'; import clsx from 'clsx'; import { - AggregatedStatsReport, - CallStatsReport, + type AggregatedStatsReport, + type CallStatsReport, SfuModels, } from '@stream-io/video-client'; import { useCallStateHooks, useI18n } from '@stream-io/video-react-bindings'; diff --git a/packages/react-sdk/src/components/CallStats/CallStatsLatencyChart.tsx b/packages/react-sdk/src/components/CallStats/CallStatsLatencyChart.tsx index 1495462d23..a80a6849c6 100644 --- a/packages/react-sdk/src/components/CallStats/CallStatsLatencyChart.tsx +++ b/packages/react-sdk/src/components/CallStats/CallStatsLatencyChart.tsx @@ -1,8 +1,8 @@ import { CategoryScale, Chart as ChartJS, - ChartData, - ChartOptions, + type ChartData, + type ChartOptions, LinearScale, LineElement, PointElement, diff --git a/packages/react-sdk/src/components/DeviceSettings/DeviceSelector.tsx b/packages/react-sdk/src/components/DeviceSettings/DeviceSelector.tsx index 9c26da85a4..239f3e1913 100644 --- a/packages/react-sdk/src/components/DeviceSettings/DeviceSelector.tsx +++ b/packages/react-sdk/src/components/DeviceSettings/DeviceSelector.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import { ChangeEventHandler, useCallback } from 'react'; +import { type ChangeEventHandler, useCallback } from 'react'; import { useDeviceList } from '../../hooks'; import { DropDownSelect, DropDownSelectOption } from '../DropdownSelect'; diff --git a/packages/react-sdk/src/components/DeviceSettings/DeviceSettings.tsx b/packages/react-sdk/src/components/DeviceSettings/DeviceSettings.tsx index e4af3ae71e..c838ac882d 100644 --- a/packages/react-sdk/src/components/DeviceSettings/DeviceSettings.tsx +++ b/packages/react-sdk/src/components/DeviceSettings/DeviceSettings.tsx @@ -1,7 +1,7 @@ import { forwardRef } from 'react'; import { useI18n } from '@stream-io/video-react-bindings'; import clsx from 'clsx'; -import { MenuToggle, MenuVisualType, ToggleMenuButtonProps } from '../Menu'; +import { MenuToggle, MenuVisualType, type ToggleMenuButtonProps } from '../Menu'; import { DeviceSelectorAudioInput, DeviceSelectorAudioOutput, diff --git a/packages/react-sdk/src/components/DropdownSelect/DropdownSelect.tsx b/packages/react-sdk/src/components/DropdownSelect/DropdownSelect.tsx index b7f584d77d..d116990027 100644 --- a/packages/react-sdk/src/components/DropdownSelect/DropdownSelect.tsx +++ b/packages/react-sdk/src/components/DropdownSelect/DropdownSelect.tsx @@ -1,7 +1,7 @@ import { createContext, - ReactElement, - ReactNode, + type ReactElement, + type ReactNode, useCallback, useContext, useMemo, diff --git a/packages/react-sdk/src/components/Menu/GenericMenu.tsx b/packages/react-sdk/src/components/Menu/GenericMenu.tsx index 160a561089..b89967c3cc 100644 --- a/packages/react-sdk/src/components/Menu/GenericMenu.tsx +++ b/packages/react-sdk/src/components/Menu/GenericMenu.tsx @@ -1,4 +1,4 @@ -import { ComponentProps, MouseEvent, PropsWithChildren, useRef } from 'react'; +import { type ComponentProps, type MouseEvent, type PropsWithChildren, useRef } from 'react'; export const GenericMenu = ({ children, diff --git a/packages/react-sdk/src/components/Menu/MenuToggle.tsx b/packages/react-sdk/src/components/Menu/MenuToggle.tsx index b486fd0951..ee6b8bc4b6 100644 --- a/packages/react-sdk/src/components/Menu/MenuToggle.tsx +++ b/packages/react-sdk/src/components/Menu/MenuToggle.tsx @@ -1,8 +1,8 @@ import { - ComponentType, + type ComponentType, createContext, - PropsWithChildren, - RefAttributes, + type PropsWithChildren, + type RefAttributes, useContext, useEffect, useMemo, @@ -12,9 +12,9 @@ import { import { FloatingOverlay, FloatingPortal, - Placement, - Strategy, - UseFloatingReturn, + type Placement, + type Strategy, + type UseFloatingReturn, } from '@floating-ui/react'; import { useFloatingUIPreset } from '../../hooks'; diff --git a/packages/react-sdk/src/components/NoiseCancellation/NoiseCancellationProvider.tsx b/packages/react-sdk/src/components/NoiseCancellation/NoiseCancellationProvider.tsx index a1443639d1..2a3fb62f02 100644 --- a/packages/react-sdk/src/components/NoiseCancellation/NoiseCancellationProvider.tsx +++ b/packages/react-sdk/src/components/NoiseCancellation/NoiseCancellationProvider.tsx @@ -1,6 +1,6 @@ import { createContext, - PropsWithChildren, + type PropsWithChildren, useContext, useEffect, useMemo, diff --git a/packages/react-sdk/src/components/Notification/Notification.tsx b/packages/react-sdk/src/components/Notification/Notification.tsx index b927a75036..0fda694b2b 100644 --- a/packages/react-sdk/src/components/Notification/Notification.tsx +++ b/packages/react-sdk/src/components/Notification/Notification.tsx @@ -1,5 +1,5 @@ -import { PropsWithChildren, ReactNode, useEffect } from 'react'; -import { Placement } from '@floating-ui/react'; +import { type PropsWithChildren, type ReactNode, useEffect } from 'react'; +import type { Placement } from '@floating-ui/react'; import { useFloatingUIPreset } from '../../hooks'; diff --git a/packages/react-sdk/src/components/Notification/PermissionNotification.tsx b/packages/react-sdk/src/components/Notification/PermissionNotification.tsx index 2e9f97f025..d072d87ebb 100644 --- a/packages/react-sdk/src/components/Notification/PermissionNotification.tsx +++ b/packages/react-sdk/src/components/Notification/PermissionNotification.tsx @@ -1,7 +1,7 @@ import { Notification } from './Notification'; import { OwnCapability } from '@stream-io/video-client'; import { - PropsWithChildren, + type PropsWithChildren, useCallback, useEffect, useRef, diff --git a/packages/react-sdk/src/components/Notification/RecordingInProgressNotification.tsx b/packages/react-sdk/src/components/Notification/RecordingInProgressNotification.tsx index 915ad875c6..39f34e7eb9 100644 --- a/packages/react-sdk/src/components/Notification/RecordingInProgressNotification.tsx +++ b/packages/react-sdk/src/components/Notification/RecordingInProgressNotification.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren, useEffect, useState } from 'react'; +import { type PropsWithChildren, useEffect, useState } from 'react'; import { useI18n, useToggleCallRecording, diff --git a/packages/react-sdk/src/components/Notification/SpeakingWhileMutedNotification.tsx b/packages/react-sdk/src/components/Notification/SpeakingWhileMutedNotification.tsx index f43a60c8c6..9e70f882b1 100644 --- a/packages/react-sdk/src/components/Notification/SpeakingWhileMutedNotification.tsx +++ b/packages/react-sdk/src/components/Notification/SpeakingWhileMutedNotification.tsx @@ -1,5 +1,5 @@ -import { PropsWithChildren } from 'react'; -import { Placement } from '@floating-ui/react'; +import type { PropsWithChildren } from 'react'; +import type { Placement } from '@floating-ui/react'; import { useCallStateHooks, useI18n } from '@stream-io/video-react-bindings'; import { Notification } from './Notification'; diff --git a/packages/react-sdk/src/components/Permissions/PermissionRequests.tsx b/packages/react-sdk/src/components/Permissions/PermissionRequests.tsx index c797323f63..0aca994a4e 100644 --- a/packages/react-sdk/src/components/Permissions/PermissionRequests.tsx +++ b/packages/react-sdk/src/components/Permissions/PermissionRequests.tsx @@ -1,19 +1,19 @@ import { - ButtonHTMLAttributes, - ComponentProps, + type ButtonHTMLAttributes, + type ComponentProps, forwardRef, Fragment, - PropsWithChildren, + type PropsWithChildren, useEffect, useState, } from 'react'; import { OwnCapability, - PermissionRequestEvent, - UserResponse, + type PermissionRequestEvent, + type UserResponse, } from '@stream-io/video-client'; import { - TranslatorFunction, + type TranslatorFunction, useCall, useCallStateHooks, useI18n, diff --git a/packages/react-sdk/src/components/Reaction/Reaction.tsx b/packages/react-sdk/src/components/Reaction/Reaction.tsx index a90910f4bd..b8c4986b83 100644 --- a/packages/react-sdk/src/components/Reaction/Reaction.tsx +++ b/packages/react-sdk/src/components/Reaction/Reaction.tsx @@ -1,5 +1,5 @@ import { useEffect } from 'react'; -import { StreamVideoParticipant } from '@stream-io/video-client'; +import type { StreamVideoParticipant } from '@stream-io/video-client'; import { useCall } from '@stream-io/video-react-bindings'; export type ReactionProps = { diff --git a/packages/react-sdk/src/components/RingingCall/RingingCall.tsx b/packages/react-sdk/src/components/RingingCall/RingingCall.tsx index 81afb39397..0d6857fa86 100644 --- a/packages/react-sdk/src/components/RingingCall/RingingCall.tsx +++ b/packages/react-sdk/src/components/RingingCall/RingingCall.tsx @@ -1,4 +1,4 @@ -import { CallingState, UserResponse } from '@stream-io/video-client'; +import { CallingState, type UserResponse } from '@stream-io/video-client'; import { useCall, useCallStateHooks, diff --git a/packages/react-sdk/src/components/Search/SearchInput.tsx b/packages/react-sdk/src/components/Search/SearchInput.tsx index 1f4989d30b..9b31d092af 100644 --- a/packages/react-sdk/src/components/Search/SearchInput.tsx +++ b/packages/react-sdk/src/components/Search/SearchInput.tsx @@ -1,4 +1,4 @@ -import { ComponentProps, useEffect, useState } from 'react'; +import { type ComponentProps, useEffect, useState } from 'react'; import clsx from 'clsx'; type SearchInputProps = ComponentProps<'input'> & { diff --git a/packages/react-sdk/src/components/Search/SearchResults.tsx b/packages/react-sdk/src/components/Search/SearchResults.tsx index aac51eb869..b8560a80be 100644 --- a/packages/react-sdk/src/components/Search/SearchResults.tsx +++ b/packages/react-sdk/src/components/Search/SearchResults.tsx @@ -1,6 +1,6 @@ -import { ComponentType } from 'react'; +import { type ComponentType } from 'react'; import { LoadingIndicator as DefaultLoadingIndicator } from '../LoadingIndicator'; -import { SearchController } from './hooks'; +import { type SearchController } from './hooks'; export type SearchResultListProps = { data: T[]; diff --git a/packages/react-sdk/src/components/StreamTheme/StreamTheme.tsx b/packages/react-sdk/src/components/StreamTheme/StreamTheme.tsx index 0188087ff4..a17907075b 100644 --- a/packages/react-sdk/src/components/StreamTheme/StreamTheme.tsx +++ b/packages/react-sdk/src/components/StreamTheme/StreamTheme.tsx @@ -1,4 +1,4 @@ -import { ElementType, HTMLProps, PropsWithChildren } from 'react'; +import type { ElementType, HTMLProps, PropsWithChildren } from 'react'; import clsx from 'clsx'; export type StreamThemeProps = HTMLProps & { diff --git a/packages/react-sdk/src/components/Tooltip/Tooltip.tsx b/packages/react-sdk/src/components/Tooltip/Tooltip.tsx index 5f6bb2825f..4c86e1f87d 100644 --- a/packages/react-sdk/src/components/Tooltip/Tooltip.tsx +++ b/packages/react-sdk/src/components/Tooltip/Tooltip.tsx @@ -1,7 +1,7 @@ -import { PropsWithChildren, useEffect, useRef } from 'react'; +import { type PropsWithChildren, useEffect, useRef } from 'react'; import clsx from 'clsx'; import { useFloatingUIPreset } from '../../hooks'; -import { FloatingArrow, Placement, arrow } from '@floating-ui/react'; +import { FloatingArrow, type Placement, arrow } from '@floating-ui/react'; export type TooltipProps = PropsWithChildren<{ /** Reference element to which the tooltip should attach to */ diff --git a/packages/react-sdk/src/components/Tooltip/WithTooltip.tsx b/packages/react-sdk/src/components/Tooltip/WithTooltip.tsx index 533f34cb82..74e1c23c46 100644 --- a/packages/react-sdk/src/components/Tooltip/WithTooltip.tsx +++ b/packages/react-sdk/src/components/Tooltip/WithTooltip.tsx @@ -1,5 +1,5 @@ -import { ComponentProps, useState } from 'react'; -import { Tooltip, TooltipProps } from './Tooltip'; +import { type ComponentProps, useState } from 'react'; +import { Tooltip, type TooltipProps } from './Tooltip'; import { useEnterLeaveHandlers } from './hooks'; type WithPopupProps = ComponentProps<'div'> & diff --git a/packages/react-sdk/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts b/packages/react-sdk/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts index 9c272c96a3..5b61997a7d 100644 --- a/packages/react-sdk/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts +++ b/packages/react-sdk/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts @@ -1,4 +1,4 @@ -import { MouseEventHandler, useCallback, useState } from 'react'; +import { type MouseEventHandler, useCallback, useState } from 'react'; export const useEnterLeaveHandlers = ({ onMouseEnter, diff --git a/packages/react-sdk/src/components/VideoPreview/VideoPreview.tsx b/packages/react-sdk/src/components/VideoPreview/VideoPreview.tsx index 28b50bfa8a..f230fa1cbd 100644 --- a/packages/react-sdk/src/components/VideoPreview/VideoPreview.tsx +++ b/packages/react-sdk/src/components/VideoPreview/VideoPreview.tsx @@ -1,4 +1,4 @@ -import { ComponentType } from 'react'; +import type { ComponentType } from 'react'; import clsx from 'clsx'; import { useCallStateHooks, useI18n } from '@stream-io/video-react-bindings'; import { BaseVideo } from '../../core/components/Video'; diff --git a/packages/react-sdk/src/core/components/Audio/Audio.tsx b/packages/react-sdk/src/core/components/Audio/Audio.tsx index 4d2d671d1e..ead9300eb0 100644 --- a/packages/react-sdk/src/core/components/Audio/Audio.tsx +++ b/packages/react-sdk/src/core/components/Audio/Audio.tsx @@ -1,5 +1,5 @@ -import { ComponentPropsWithoutRef, useEffect, useState } from 'react'; -import { +import { type ComponentPropsWithoutRef, useEffect, useState } from 'react'; +import type { AudioTrackType, StreamVideoParticipant, } from '@stream-io/video-client'; diff --git a/packages/react-sdk/src/core/components/Audio/ParticipantsAudio.tsx b/packages/react-sdk/src/core/components/Audio/ParticipantsAudio.tsx index a0fec007ca..4ea157e296 100644 --- a/packages/react-sdk/src/core/components/Audio/ParticipantsAudio.tsx +++ b/packages/react-sdk/src/core/components/Audio/ParticipantsAudio.tsx @@ -1,8 +1,8 @@ -import { ComponentProps, Fragment } from 'react'; +import { type ComponentProps, Fragment } from 'react'; import { hasAudio, hasScreenShareAudio, - StreamVideoParticipant, + type StreamVideoParticipant, } from '@stream-io/video-client'; import { Audio } from './Audio'; diff --git a/packages/react-sdk/src/core/components/CallLayout/PaginatedGridLayout.tsx b/packages/react-sdk/src/core/components/CallLayout/PaginatedGridLayout.tsx index a111cf114a..c2e4767dce 100644 --- a/packages/react-sdk/src/core/components/CallLayout/PaginatedGridLayout.tsx +++ b/packages/react-sdk/src/core/components/CallLayout/PaginatedGridLayout.tsx @@ -1,19 +1,19 @@ import { useEffect, useMemo, useState } from 'react'; import { useCall } from '@stream-io/video-react-bindings'; -import { StreamVideoParticipant } from '@stream-io/video-client'; +import type { StreamVideoParticipant } from '@stream-io/video-client'; import clsx from 'clsx'; import { DefaultParticipantViewUI, ParticipantView, - ParticipantViewProps, + type ParticipantViewProps, } from '../ParticipantView'; import { ParticipantsAudio } from '../Audio'; import { IconButton } from '../../../components'; import { chunk } from '../../../utilities'; import { - ParticipantFilter, - ParticipantPredicate, + type ParticipantFilter, + type ParticipantPredicate, useFilteredParticipants, usePaginatedLayoutSortPreset, useRawRemoteParticipants, diff --git a/packages/react-sdk/src/core/components/CallLayout/PipLayout.tsx b/packages/react-sdk/src/core/components/CallLayout/PipLayout.tsx index ffdfb35e19..f2e9d1e1f7 100644 --- a/packages/react-sdk/src/core/components/CallLayout/PipLayout.tsx +++ b/packages/react-sdk/src/core/components/CallLayout/PipLayout.tsx @@ -7,11 +7,11 @@ import { ParticipantsAudio } from '../Audio'; import { DefaultParticipantViewUI, ParticipantView, - ParticipantViewProps, + type ParticipantViewProps, } from '../ParticipantView'; import { - ParticipantFilter, - ParticipantPredicate, + type ParticipantFilter, + type ParticipantPredicate, useFilteredParticipants, usePaginatedLayoutSortPreset, useRawRemoteParticipants, diff --git a/packages/react-sdk/src/core/components/CallLayout/SpeakerLayout.tsx b/packages/react-sdk/src/core/components/CallLayout/SpeakerLayout.tsx index 860c4352a8..4b0fab7f06 100644 --- a/packages/react-sdk/src/core/components/CallLayout/SpeakerLayout.tsx +++ b/packages/react-sdk/src/core/components/CallLayout/SpeakerLayout.tsx @@ -6,7 +6,7 @@ import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings'; import { DefaultParticipantViewUI, ParticipantView, - ParticipantViewProps, + type ParticipantViewProps, } from '../ParticipantView'; import { IconButton } from '../../../components'; import { @@ -14,8 +14,8 @@ import { useVerticalScrollPosition, } from '../../../hooks'; import { - ParticipantFilter, - ParticipantPredicate, + type ParticipantFilter, + type ParticipantPredicate, useFilteredParticipants, useRawRemoteParticipants, useSpeakerLayoutSortPreset, diff --git a/packages/react-sdk/src/core/components/CallLayout/hooks.ts b/packages/react-sdk/src/core/components/CallLayout/hooks.ts index 2f34a88342..5cd0cf8443 100644 --- a/packages/react-sdk/src/core/components/CallLayout/hooks.ts +++ b/packages/react-sdk/src/core/components/CallLayout/hooks.ts @@ -3,7 +3,7 @@ import { Call, CallTypes, combineComparators, - Comparator, + type Comparator, defaultSortPreset, hasAudio, hasVideo, @@ -11,10 +11,10 @@ import { paginatedLayoutSortPreset, screenSharing, speakerLayoutSortPreset, - StreamVideoParticipant, + type StreamVideoParticipant, } from '@stream-io/video-client'; import { useCallStateHooks } from '@stream-io/video-react-bindings'; -import { applyFilter, Filter } from '../../../utilities/filter'; +import { applyFilter, type Filter } from '../../../utilities/filter'; export type FilterableParticipant = Pick< StreamVideoParticipant, diff --git a/packages/react-sdk/src/core/components/CallLayout/partcipantFilter.test.ts b/packages/react-sdk/src/core/components/CallLayout/partcipantFilter.test.ts index 0070e8ccda..084fce0b5f 100644 --- a/packages/react-sdk/src/core/components/CallLayout/partcipantFilter.test.ts +++ b/packages/react-sdk/src/core/components/CallLayout/partcipantFilter.test.ts @@ -1,4 +1,4 @@ -import { StreamVideoParticipant } from '@stream-io/video-client'; +import type { StreamVideoParticipant } from '@stream-io/video-client'; import { test, type TestContext } from 'node:test'; import { applyParticipantsFilter } from './hooks'; diff --git a/packages/react-sdk/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx b/packages/react-sdk/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx index 4a1ff9b4fe..7fd1f0376d 100644 --- a/packages/react-sdk/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +++ b/packages/react-sdk/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx @@ -1,5 +1,5 @@ -import { ComponentType, forwardRef } from 'react'; -import { Placement } from '@floating-ui/react'; +import { type ComponentType, forwardRef } from 'react'; +import { type Placement } from '@floating-ui/react'; import { hasAudio, hasPausedTrack, @@ -15,7 +15,7 @@ import { IconButton, MenuToggle, Notification, - ToggleMenuButtonProps, + type ToggleMenuButtonProps, } from '../../../components'; import { ParticipantActionsContextMenu as DefaultParticipantActionsContextMenu } from './ParticipantActionsContextMenu'; import { Reaction } from '../../../components/Reaction'; diff --git a/packages/react-sdk/src/core/components/ParticipantView/ParticipantView.tsx b/packages/react-sdk/src/core/components/ParticipantView/ParticipantView.tsx index 4c2477dd48..26a33ecdfe 100644 --- a/packages/react-sdk/src/core/components/ParticipantView/ParticipantView.tsx +++ b/packages/react-sdk/src/core/components/ParticipantView/ParticipantView.tsx @@ -1,7 +1,7 @@ import { - ComponentType, + type ComponentType, forwardRef, - ReactElement, + type ReactElement, useMemo, useState, } from 'react'; @@ -10,13 +10,13 @@ import { hasAudio, hasScreenShareAudio, hasVideo, - StreamVideoParticipant, - VideoTrackType, + type StreamVideoParticipant, + type VideoTrackType, } from '@stream-io/video-client'; import { useCallStateHooks } from '@stream-io/video-react-bindings'; import { Audio } from '../Audio'; -import { Video, VideoProps } from '../Video'; +import { Video, type VideoProps } from '../Video'; import { useTrackElementVisibility } from '../../hooks'; import { DefaultParticipantViewUI } from './DefaultParticipantViewUI'; import { applyElementToRef, isComponentType } from '../../../utilities'; diff --git a/packages/react-sdk/src/core/components/ParticipantView/ParticipantViewContext.tsx b/packages/react-sdk/src/core/components/ParticipantView/ParticipantViewContext.tsx index d425c95ce1..fbf9f1602f 100644 --- a/packages/react-sdk/src/core/components/ParticipantView/ParticipantViewContext.tsx +++ b/packages/react-sdk/src/core/components/ParticipantView/ParticipantViewContext.tsx @@ -1,5 +1,5 @@ import { createContext, useContext } from 'react'; -import { ParticipantViewProps } from './ParticipantView'; +import type { ParticipantViewProps } from './ParticipantView'; export type ParticipantViewContextValue = Required< Pick diff --git a/packages/react-sdk/src/core/components/StreamCall/StreamCall.tsx b/packages/react-sdk/src/core/components/StreamCall/StreamCall.tsx index a3c7032063..289554fea7 100644 --- a/packages/react-sdk/src/core/components/StreamCall/StreamCall.tsx +++ b/packages/react-sdk/src/core/components/StreamCall/StreamCall.tsx @@ -1,7 +1,7 @@ -import { ComponentType, PropsWithChildren } from 'react'; +import type { ComponentType, PropsWithChildren } from 'react'; import { StreamCallProvider, - StreamCallProviderProps, + type StreamCallProviderProps, } from '@stream-io/video-react-bindings'; // re-exporting the StreamCallProvider as StreamCall diff --git a/packages/react-sdk/src/core/components/StreamVideo/StreamVideo.tsx b/packages/react-sdk/src/core/components/StreamVideo/StreamVideo.tsx index a92bf8936c..0c87ef91fb 100644 --- a/packages/react-sdk/src/core/components/StreamVideo/StreamVideo.tsx +++ b/packages/react-sdk/src/core/components/StreamVideo/StreamVideo.tsx @@ -1,8 +1,8 @@ import { - StreamVideoProps, + type StreamVideoProps, StreamVideoProvider, } from '@stream-io/video-react-bindings'; -import { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; import { translations } from '../../../translations'; export const StreamVideo = (props: PropsWithChildren) => { diff --git a/packages/react-sdk/src/core/components/Video/BaseVideo.tsx b/packages/react-sdk/src/core/components/Video/BaseVideo.tsx index 8d5f2ae5fc..a4526e9c07 100644 --- a/packages/react-sdk/src/core/components/Video/BaseVideo.tsx +++ b/packages/react-sdk/src/core/components/Video/BaseVideo.tsx @@ -1,4 +1,4 @@ -import { ComponentPropsWithRef, forwardRef, useEffect, useState } from 'react'; +import { type ComponentPropsWithRef, forwardRef, useEffect, useState } from 'react'; import { Browsers } from '@stream-io/video-client'; import { applyElementToRef } from '../../../utilities'; diff --git a/packages/react-sdk/src/core/components/Video/BaseVideoPlaceholder.tsx b/packages/react-sdk/src/core/components/Video/BaseVideoPlaceholder.tsx index 6485311ce8..ede2900649 100644 --- a/packages/react-sdk/src/core/components/Video/BaseVideoPlaceholder.tsx +++ b/packages/react-sdk/src/core/components/Video/BaseVideoPlaceholder.tsx @@ -1,4 +1,4 @@ -import { ComponentProps, RefAttributes, forwardRef, useState } from 'react'; +import { type ComponentProps, type RefAttributes, forwardRef, useState } from 'react'; import type { StreamVideoParticipant } from '@stream-io/video-client'; export type BaseVideoPlaceholderProps = { diff --git a/packages/react-sdk/src/core/components/Video/Video.tsx b/packages/react-sdk/src/core/components/Video/Video.tsx index 4af634a011..22ac82bb33 100644 --- a/packages/react-sdk/src/core/components/Video/Video.tsx +++ b/packages/react-sdk/src/core/components/Video/Video.tsx @@ -1,6 +1,6 @@ import { - ComponentPropsWithoutRef, - ComponentType, + type ComponentPropsWithoutRef, + type ComponentType, useEffect, useLayoutEffect, useState, @@ -9,20 +9,20 @@ import { hasPausedTrack, hasScreenShare, hasVideo, - StreamVideoParticipant, - VideoTrackType, + type StreamVideoParticipant, + type VideoTrackType, VisibilityState, } from '@stream-io/video-client'; import clsx from 'clsx'; import { DefaultVideoPlaceholder, - VideoPlaceholderProps, + type VideoPlaceholderProps, } from './DefaultVideoPlaceholder'; import { useCall } from '@stream-io/video-react-bindings'; import { usePictureInPictureState } from '../../hooks/usePictureInPictureState'; import { DefaultPictureInPicturePlaceholder, - PictureInPicturePlaceholderProps, + type PictureInPicturePlaceholderProps, } from './DefaultPictureInPicturePlaceholder'; export type VideoProps = ComponentPropsWithoutRef<'video'> & { diff --git a/packages/react-sdk/src/core/hooks/useTrackElementVisibility.ts b/packages/react-sdk/src/core/hooks/useTrackElementVisibility.ts index 544157758d..053ce2970c 100644 --- a/packages/react-sdk/src/core/hooks/useTrackElementVisibility.ts +++ b/packages/react-sdk/src/core/hooks/useTrackElementVisibility.ts @@ -1,5 +1,5 @@ import { useEffect } from 'react'; -import { DynascaleManager, VideoTrackType } from '@stream-io/video-client'; +import { DynascaleManager, type VideoTrackType } from '@stream-io/video-client'; import { useCall } from '@stream-io/video-react-bindings'; export const useTrackElementVisibility = ({ diff --git a/packages/react-sdk/src/hooks/usePersistedDevicePreferences.ts b/packages/react-sdk/src/hooks/usePersistedDevicePreferences.ts index a42a10f0ac..cbffd92c60 100644 --- a/packages/react-sdk/src/hooks/usePersistedDevicePreferences.ts +++ b/packages/react-sdk/src/hooks/usePersistedDevicePreferences.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { CallingState, InputDeviceStatus } from '@stream-io/video-client'; +import { CallingState, type InputDeviceStatus } from '@stream-io/video-client'; import { useCallStateHooks } from '@stream-io/video-react-bindings'; export type LocalDevicePreference = { diff --git a/packages/react-sdk/src/utilities/isComponentType.ts b/packages/react-sdk/src/utilities/isComponentType.ts index 7b105d4075..181934a826 100644 --- a/packages/react-sdk/src/utilities/isComponentType.ts +++ b/packages/react-sdk/src/utilities/isComponentType.ts @@ -1,4 +1,4 @@ -import { ComponentType, isValidElement, ReactElement } from 'react'; +import { type ComponentType, isValidElement, type ReactElement } from 'react'; export const isComponentType = ( elementOrComponent?: ComponentType | ReactElement | null, diff --git a/packages/react-sdk/src/wrappers/LivestreamPlayer/LivestreamPlayer.tsx b/packages/react-sdk/src/wrappers/LivestreamPlayer/LivestreamPlayer.tsx index ba2438c5d9..f1fc991171 100644 --- a/packages/react-sdk/src/wrappers/LivestreamPlayer/LivestreamPlayer.tsx +++ b/packages/react-sdk/src/wrappers/LivestreamPlayer/LivestreamPlayer.tsx @@ -7,9 +7,9 @@ import { } from '@stream-io/video-react-bindings'; import { BackstageLayout, - BackstageLayoutProps, + type BackstageLayoutProps, LivestreamLayout, - LivestreamLayoutProps, + type LivestreamLayoutProps, StreamCall, } from '../../core'; import { useEffectEvent } from '@stream-io/video-react-bindings'; diff --git a/packages/react-sdk/tsconfig.json b/packages/react-sdk/tsconfig.json index 7b75c0865c..04a891fc54 100644 --- a/packages/react-sdk/tsconfig.json +++ b/packages/react-sdk/tsconfig.json @@ -3,12 +3,10 @@ "outDir": "./dist", "module": "ES2020", "target": "ES2020", - "lib": [ - "esnext", - "dom" - ], + "lib": ["esnext", "dom"], "declaration": true, "moduleResolution": "node", + "verbatimModuleSyntax": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "resolveJsonModule": true, @@ -21,8 +19,5 @@ "jsx": "react-jsxdev" }, "exclude": ["**/__tests__/**"], - "include": [ - "./src", - "index.ts" - ] + "include": ["./src", "index.ts"] } diff --git a/packages/video-filters-web/src/createRenderer.ts b/packages/video-filters-web/src/createRenderer.ts index 20c9574a0f..e5be9140cd 100644 --- a/packages/video-filters-web/src/createRenderer.ts +++ b/packages/video-filters-web/src/createRenderer.ts @@ -1,5 +1,5 @@ import { WorkerTimer } from '@stream-io/worker-timer'; -import { TFLite } from './tflite'; +import type { TFLite } from './tflite'; import { buildWebGL2Pipeline } from './webgl2/webgl2Pipeline'; import { getSegmentationParams, SegmentationLevel } from './segmentation'; diff --git a/packages/video-filters-web/src/webgl2/jointBilateralFilterStage.ts b/packages/video-filters-web/src/webgl2/jointBilateralFilterStage.ts index 9538671c21..505b460ee7 100644 --- a/packages/video-filters-web/src/webgl2/jointBilateralFilterStage.ts +++ b/packages/video-filters-web/src/webgl2/jointBilateralFilterStage.ts @@ -3,7 +3,7 @@ import { createPipelineStageProgram, glsl, } from '../helpers/webglHelper'; -import { SegmentationParams } from '../segmentation'; +import type { SegmentationParams } from '../segmentation'; export function buildJointBilateralFilterStage( gl: WebGL2RenderingContext, diff --git a/packages/video-filters-web/src/webgl2/resizingStage.ts b/packages/video-filters-web/src/webgl2/resizingStage.ts index d026b2b101..1be6a8ab26 100644 --- a/packages/video-filters-web/src/webgl2/resizingStage.ts +++ b/packages/video-filters-web/src/webgl2/resizingStage.ts @@ -1,4 +1,4 @@ -import { TFLite } from '../tflite'; +import type { TFLite } from '../tflite'; import { compileShader, createPipelineStageProgram, @@ -6,7 +6,7 @@ import { glsl, readPixelsAsync, } from '../helpers/webglHelper'; -import { SegmentationParams } from '../segmentation'; +import type { SegmentationParams } from '../segmentation'; export function buildResizingStage( gl: WebGL2RenderingContext, diff --git a/packages/video-filters-web/src/webgl2/softmaxStage.ts b/packages/video-filters-web/src/webgl2/softmaxStage.ts index f493bb17d2..172d78222c 100644 --- a/packages/video-filters-web/src/webgl2/softmaxStage.ts +++ b/packages/video-filters-web/src/webgl2/softmaxStage.ts @@ -1,11 +1,11 @@ -import { TFLite } from '../tflite'; +import type { TFLite } from '../tflite'; import { compileShader, createPipelineStageProgram, createTexture, glsl, } from '../helpers/webglHelper'; -import { SegmentationParams } from '../segmentation'; +import type { SegmentationParams } from '../segmentation'; export function buildSoftmaxStage( gl: WebGL2RenderingContext, diff --git a/packages/video-filters-web/src/webgl2/webgl2Pipeline.ts b/packages/video-filters-web/src/webgl2/webgl2Pipeline.ts index fb6c6d6854..d7db4dba97 100644 --- a/packages/video-filters-web/src/webgl2/webgl2Pipeline.ts +++ b/packages/video-filters-web/src/webgl2/webgl2Pipeline.ts @@ -1,18 +1,18 @@ -import { TFLite } from '../tflite'; +import type { TFLite } from '../tflite'; import { compileShader, createTexture, glsl } from '../helpers/webglHelper'; import { - BackgroundBlurStage, + type BackgroundBlurStage, buildBackgroundBlurStage, } from './backgroundBlurStage'; import { - BackgroundImageStage, + type BackgroundImageStage, buildBackgroundImageStage, } from './backgroundImageStage'; import { buildJointBilateralFilterStage } from './jointBilateralFilterStage'; import { buildResizingStage } from './resizingStage'; import { buildSoftmaxStage } from './softmaxStage'; -import { BackgroundBlurLevel, BackgroundFilter } from '../createRenderer'; -import { SegmentationParams } from '../segmentation'; +import type { BackgroundBlurLevel, BackgroundFilter } from '../createRenderer'; +import type { SegmentationParams } from '../segmentation'; export function buildWebGL2Pipeline( videoSource: HTMLVideoElement, diff --git a/packages/video-filters-web/tsconfig.json b/packages/video-filters-web/tsconfig.json index 75ddffb7ce..8bf188c91d 100644 --- a/packages/video-filters-web/tsconfig.json +++ b/packages/video-filters-web/tsconfig.json @@ -3,10 +3,7 @@ "outDir": "./dist", "module": "ES2020", "target": "ES2020", - "lib": [ - "esnext", - "dom" - ], + "lib": ["esnext", "dom"], "declaration": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, @@ -17,11 +14,9 @@ "strict": true, "strictNullChecks": true, "sourceMap": true, - "inlineSources": true + "inlineSources": true, + "verbatimModuleSyntax": true }, "exclude": ["**/__tests__/**"], - "include": [ - "./src", - "index.ts" - ] + "include": ["./src", "index.ts"] } diff --git a/sample-apps/react-native/dogfood/src/screens/Meeting/GuestMeetingScreen.tsx b/sample-apps/react-native/dogfood/src/screens/Meeting/GuestMeetingScreen.tsx index 9792f9e961..0e6a231aaa 100644 --- a/sample-apps/react-native/dogfood/src/screens/Meeting/GuestMeetingScreen.tsx +++ b/sample-apps/react-native/dogfood/src/screens/Meeting/GuestMeetingScreen.tsx @@ -5,9 +5,9 @@ import { StreamCall, StreamVideo, StreamVideoClient, - User, } from '@stream-io/video-react-native-sdk'; -import { MeetingStackParamList } from '../../../types'; +import type { User } from '@stream-io/video-react-sdk'; +import type { MeetingStackParamList } from '../../../types'; import { MeetingUI } from '../../components/MeetingUI'; import { createToken } from '../../modules/helpers/createToken'; import { useAppGlobalStoreValue } from '../../contexts/AppContext'; diff --git a/sample-apps/react/audio-rooms/src/data/users.ts b/sample-apps/react/audio-rooms/src/data/users.ts index 1e11ff1986..0c51a65e03 100644 --- a/sample-apps/react/audio-rooms/src/data/users.ts +++ b/sample-apps/react/audio-rooms/src/data/users.ts @@ -1,4 +1,4 @@ -import { User } from '../types'; +import type { User } from '../types'; const users: User[] = [ { diff --git a/sample-apps/react/audio-rooms/src/utils/generateRoomData.ts b/sample-apps/react/audio-rooms/src/utils/generateRoomData.ts index 0d8131fdbd..73b7fe603f 100644 --- a/sample-apps/react/audio-rooms/src/utils/generateRoomData.ts +++ b/sample-apps/react/audio-rooms/src/utils/generateRoomData.ts @@ -1,4 +1,4 @@ -import { User } from '../types'; +import type { User } from '../types'; export const generateRoomId = () => Math.random().toString(36).substring(2, 12); export const generateRoomPayload = ({ diff --git a/sample-apps/react/audio-rooms/src/utils/user.ts b/sample-apps/react/audio-rooms/src/utils/user.ts index 3df225fea6..f96622d05a 100644 --- a/sample-apps/react/audio-rooms/src/utils/user.ts +++ b/sample-apps/react/audio-rooms/src/utils/user.ts @@ -1,7 +1,7 @@ import users from '../data/users'; import { SESSION_STORAGE_USER_KEY } from './constants'; import { getURLCredentials } from './getURLCredentials'; -import { User } from '../types'; +import type { User } from '../types'; export const storeUser = (user?: User) => { if (!(user && user.id)) return; diff --git a/sample-apps/react/messenger-clone/src/utils/user.ts b/sample-apps/react/messenger-clone/src/utils/user.ts index 80afa4e2ff..43c154a386 100644 --- a/sample-apps/react/messenger-clone/src/utils/user.ts +++ b/sample-apps/react/messenger-clone/src/utils/user.ts @@ -1,7 +1,7 @@ import users from '../../data/users.json'; import { SESSION_STORAGE_USER_KEY } from './constants'; import { getURLCredentials } from './getURLCredentials'; -import { User } from '../types/user'; +import type { User } from '../types/user'; import { getUserFromToken } from './userFromToken'; export const storeUser = (user?: User) => { diff --git a/sample-apps/react/react-dogfood/helpers/client.ts b/sample-apps/react/react-dogfood/helpers/client.ts index 073cf99874..cd5b81b8d9 100644 --- a/sample-apps/react/react-dogfood/helpers/client.ts +++ b/sample-apps/react/react-dogfood/helpers/client.ts @@ -1,4 +1,5 @@ -import { StreamVideoClient, User } from '@stream-io/video-react-sdk'; +import { StreamVideoClient } from '@stream-io/video-react-sdk'; +import type { User } from '@stream-io/video-react-sdk'; import { AppEnvironment } from '../context/AppEnvironmentContext'; import { CreateJwtTokenRequest, diff --git a/sample-apps/react/react-dogfood/hooks/useGleap.ts b/sample-apps/react/react-dogfood/hooks/useGleap.ts index 7e118ea49e..695d4e84b5 100644 --- a/sample-apps/react/react-dogfood/hooks/useGleap.ts +++ b/sample-apps/react/react-dogfood/hooks/useGleap.ts @@ -4,8 +4,8 @@ import { Call, RxUtils, StreamVideoClient, - User, } from '@stream-io/video-react-sdk'; +import type { User } from '@stream-io/video-react-sdk'; import { getLayoutSettings } from './useLayoutSwitcher'; type GleapReportPayload = { diff --git a/sample-apps/react/react-dogfood/pages/guest/join/[guestCallId].tsx b/sample-apps/react/react-dogfood/pages/guest/join/[guestCallId].tsx index 227bf15f63..310f83cf73 100644 --- a/sample-apps/react/react-dogfood/pages/guest/join/[guestCallId].tsx +++ b/sample-apps/react/react-dogfood/pages/guest/join/[guestCallId].tsx @@ -8,9 +8,9 @@ import { StreamVideo, StreamVideoClient, useCallStateHooks, - User, UserResponse, } from '@stream-io/video-react-sdk'; +import type { User } from '@stream-io/video-react-sdk'; import { GetServerSidePropsContext } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; diff --git a/sample-apps/react/stream-video-react-tutorial/src/App.tsx b/sample-apps/react/stream-video-react-tutorial/src/App.tsx index 64cce9a8a6..15e62a27b1 100644 --- a/sample-apps/react/stream-video-react-tutorial/src/App.tsx +++ b/sample-apps/react/stream-video-react-tutorial/src/App.tsx @@ -9,9 +9,9 @@ import { StreamVideo, StreamVideoClient, useCallStateHooks, - User, } from '@stream-io/video-react-sdk'; +import type { User } from '@stream-io/video-react-sdk'; import '@stream-io/video-react-sdk/dist/css/styles.css'; import './style.css'; diff --git a/sample-apps/react/zoom-clone/src/contexts/UserContext.tsx b/sample-apps/react/zoom-clone/src/contexts/UserContext.tsx index ab278b31f7..d6fc994bc9 100644 --- a/sample-apps/react/zoom-clone/src/contexts/UserContext.tsx +++ b/sample-apps/react/zoom-clone/src/contexts/UserContext.tsx @@ -13,7 +13,7 @@ import { storeUser, } from '../utils'; import type { StreamChat } from 'stream-chat'; -import type { User } from '../types/'; +import type { User } from '../types'; const envApiKey = (import.meta.env.VITE_STREAM_API_KEY as string | undefined) || 'mmhfdzb5evj2'; diff --git a/sample-apps/react/zoom-clone/src/utils/user.ts b/sample-apps/react/zoom-clone/src/utils/user.ts index a9de7284b7..1db997000e 100644 --- a/sample-apps/react/zoom-clone/src/utils/user.ts +++ b/sample-apps/react/zoom-clone/src/utils/user.ts @@ -1,7 +1,7 @@ import users from '../../data/users.json'; import { SESSION_STORAGE_USER_KEY } from './constants'; import { getURLCredentials } from './getURLCredentials'; -import { User } from '../types'; +import type { User } from '../types'; export const storeUser = (user?: User) => { if (!(user && user.id)) return; diff --git a/yarn.lock b/yarn.lock index d376183f78..3b24fcf46b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8385,6 +8385,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/merge-streams@npm:^2.1.0": + version: 2.3.0 + resolution: "@sindresorhus/merge-streams@npm:2.3.0" + checksum: 10/798bcb53cd1ace9df84fcdd1ba86afdc9e0cd84f5758d26ae9b1eefd8e8887e5fc30051132b9e74daf01bb41fa5a2faf1369361f83d76a3b3d7ee938058fd71c + languageName: node + linkType: hard + "@sinonjs/commons@npm:^2.0.0": version: 2.0.0 resolution: "@sinonjs/commons@npm:2.0.0" @@ -12262,6 +12269,16 @@ __metadata: languageName: node linkType: hard +"copy-file@npm:^11.1.0": + version: 11.1.0 + resolution: "copy-file@npm:11.1.0" + dependencies: + graceful-fs: "npm:^4.2.11" + p-event: "npm:^6.0.0" + checksum: 10/286aa3770921af29765f3bc8ce834aa4a8e40c01c69929d6d2d8abb0a722ecc48983a276aa3b90dacd590870dfbcaf2c92af0a5ec4a64c33b64e0461e8be2174 + languageName: node + linkType: hard + "core-js-compat@npm:^3.38.0, core-js-compat@npm:^3.40.0": version: 3.40.0 resolution: "core-js-compat@npm:3.40.0" @@ -12330,6 +12347,20 @@ __metadata: languageName: node linkType: hard +"cpy@npm:^12.0.0": + version: 12.0.1 + resolution: "cpy@npm:12.0.1" + dependencies: + copy-file: "npm:^11.1.0" + globby: "npm:^14.1.0" + junk: "npm:^4.0.1" + micromatch: "npm:^4.0.8" + p-filter: "npm:^4.1.0" + p-map: "npm:^7.0.3" + checksum: 10/512049ee101d0720ae37f218aaa7dbac03886bbf31a794a0a563927dfebba649c5eaeaf12f029a81af039ff9ddaef66b28d58ff4a08a37fbd3a714ae4c357a3f + languageName: node + linkType: hard + "create-jest@npm:^29.7.0": version: 29.7.0 resolution: "create-jest@npm:29.7.0" @@ -14875,6 +14906,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.3.3": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.8" + checksum: 10/dcc6432b269762dd47381d8b8358bf964d8f4f60286ac6aa41c01ade70bda459ff2001b516690b96d5365f68a49242966112b5d5cc9cd82395fa8f9d017c90ad + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -15827,6 +15871,20 @@ __metadata: languageName: node linkType: hard +"globby@npm:^14.1.0": + version: 14.1.0 + resolution: "globby@npm:14.1.0" + dependencies: + "@sindresorhus/merge-streams": "npm:^2.1.0" + fast-glob: "npm:^3.3.3" + ignore: "npm:^7.0.3" + path-type: "npm:^6.0.0" + slash: "npm:^5.1.0" + unicorn-magic: "npm:^0.3.0" + checksum: 10/e527ff54f0dddf60abfabd0d9e799768619d957feecd8b13ef60481f270bfdce0d28f6b09267c60f8064798fb3003b8ec991375f7fe0233fbce5304e1741368c + languageName: node + linkType: hard + "gopd@npm:^1.0.1, gopd@npm:^1.2.0": version: 1.2.0 resolution: "gopd@npm:1.2.0" @@ -15834,7 +15892,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 @@ -16359,6 +16417,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^7.0.3": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10/f134b96a4de0af419196f52c529d5c6120c4456ff8a6b5a14ceaaa399f883e15d58d2ce651c9b69b9388491d4669dda47285d307e827de9304a53a1824801bc6 + languageName: node + linkType: hard + "image-size@npm:^1.0.2": version: 1.0.2 resolution: "image-size@npm:1.0.2" @@ -18131,6 +18196,13 @@ __metadata: languageName: node linkType: hard +"junk@npm:^4.0.1": + version: 4.0.1 + resolution: "junk@npm:4.0.1" + checksum: 10/4f0c94c0b2e46172284d9eaeb57bf1b784d86d218dbc673a1c8e08ef3443d03164238eb067591d0ad9f2c76a6ad012aeb618bb8135a2f0f26a6da931058e131b + languageName: node + linkType: hard + "jwa@npm:^1.4.1": version: 1.4.1 resolution: "jwa@npm:1.4.1" @@ -19257,6 +19329,13 @@ __metadata: languageName: node linkType: hard +"meow@npm:^13.2.0": + version: 13.2.0 + resolution: "meow@npm:13.2.0" + checksum: 10/4eff5bc921fed0b8a471ad79069d741a0210036d717547d0c7f36fdaf84ef7a3036225f38b6a53830d84dc9cbf8b944b097fde62381b8b5b215119e735ce1063 + languageName: node + linkType: hard + "merge-descriptors@npm:^2.0.0": version: 2.0.0 resolution: "merge-descriptors@npm:2.0.0" @@ -21725,6 +21804,24 @@ __metadata: languageName: node linkType: hard +"p-event@npm:^6.0.0": + version: 6.0.1 + resolution: "p-event@npm:6.0.1" + dependencies: + p-timeout: "npm:^6.1.2" + checksum: 10/f8a6bb7e5addee541f5be42685fb070d9848aa0fb761132e825762c1e4009d90416b3f78ec06f7d4ee96b48ef9cebda0b809a0a87e504d7ae5f371f406cf16a8 + languageName: node + linkType: hard + +"p-filter@npm:^4.1.0": + version: 4.1.0 + resolution: "p-filter@npm:4.1.0" + dependencies: + p-map: "npm:^7.0.1" + checksum: 10/a8c783f6f783d2cf2b1b23f128576abee9545942961d1a242d0bb673eaf5390e51acd887d526e468d23fb08546ba7c958222464e75a25ac502f2951aeffcbb72 + languageName: node + linkType: hard + "p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" @@ -21797,6 +21894,20 @@ __metadata: languageName: node linkType: hard +"p-map@npm:^7.0.1, p-map@npm:^7.0.3": + version: 7.0.3 + resolution: "p-map@npm:7.0.3" + checksum: 10/2ef48ccfc6dd387253d71bf502604f7893ed62090b2c9d73387f10006c342606b05233da0e4f29388227b61eb5aeface6197e166520c465c234552eeab2fe633 + languageName: node + linkType: hard + +"p-timeout@npm:^6.1.2": + version: 6.1.4 + resolution: "p-timeout@npm:6.1.4" + checksum: 10/5ee0df408ba353cc2d7036af90d2eb1724c428fd1cf67cd9110c03f0035077c29f6506bff7198dfbef4910ec558c711f21f9741d89d043a6f2c2ff82064afcaf + languageName: node + linkType: hard + "p-try@npm:^2.0.0": version: 2.2.0 resolution: "p-try@npm:2.2.0" @@ -22009,6 +22120,13 @@ __metadata: languageName: node linkType: hard +"path-type@npm:^6.0.0": + version: 6.0.0 + resolution: "path-type@npm:6.0.0" + checksum: 10/b9f6eaf7795c48d5c9bc4c6bc3ac61315b8d36975a73497ab2e02b764c0836b71fb267ea541863153f633a069a1c2ed3c247cb781633842fc571c655ac57c00e + languageName: node + linkType: hard + "path@npm:0.12.7": version: 0.12.7 resolution: "path@npm:0.12.7" @@ -25018,7 +25136,7 @@ __metadata: languageName: node linkType: hard -"slash@npm:^5.0.0": +"slash@npm:^5.0.0, slash@npm:^5.1.0": version: 5.1.0 resolution: "slash@npm:5.1.0" checksum: 10/2c41ec6fb1414cd9bba0fa6b1dd00e8be739e3fe85d079c69d4b09ca5f2f86eafd18d9ce611c0c0f686428638a36c272a6ac14799146a8295f259c10cc45cde4 @@ -26654,6 +26772,13 @@ __metadata: languageName: node linkType: hard +"unicorn-magic@npm:^0.3.0": + version: 0.3.0 + resolution: "unicorn-magic@npm:0.3.0" + checksum: 10/bdd7d7c522f9456f32a0b77af23f8854f9a7db846088c3868ec213f9550683ab6a2bdf3803577eacbafddb4e06900974385841ccb75338d17346ccef45f9cb01 + languageName: node + linkType: hard + "unified@npm:^11.0.0": version: 11.0.5 resolution: "unified@npm:11.0.5"