farvex 0.2.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/README.md +292 -175
- package/dist/index.cjs +1045 -2471
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +1043 -2464
- package/dist/index.js.map +1 -1
- package/dist/livekit/index.cjs +4 -24
- package/dist/livekit/index.d.cts +2 -2
- package/dist/livekit/index.d.ts +2 -2
- package/dist/livekit/index.js +1 -1
- package/dist/react/index.cjs +89 -3287
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +18 -84
- package/dist/react/index.d.ts +18 -84
- package/dist/react/index.js +88 -3276
- package/dist/react/index.js.map +1 -1
- package/dist/types-Dgwrb3rf.d.cts +206 -0
- package/dist/types-Dgwrb3rf.d.ts +206 -0
- package/package.json +52 -71
- package/dist/core/index.cjs +0 -2917
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -1417
- package/dist/core/index.d.ts +0 -1417
- package/dist/core/index.js +0 -2902
- package/dist/core/index.js.map +0 -1
- package/dist/mock/index.cjs +0 -3267
- package/dist/mock/index.cjs.map +0 -1
- package/dist/mock/index.d.cts +0 -31
- package/dist/mock/index.d.ts +0 -31
- package/dist/mock/index.js +0 -3263
- package/dist/mock/index.js.map +0 -1
package/dist/react/index.d.cts
CHANGED
|
@@ -1,88 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import 'livekit-client';
|
|
3
|
+
import { j as SessionClient, H as HostClient, S as SessionAction, N as Nullable, m as SessionInvite, t as VoiceSession, l as SessionDuration, b as ClientStatus } from '../types-Dgwrb3rf.cjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type CallpadClient = SessionClient | HostClient;
|
|
6
|
+
type CallpadProviderProps<TClient extends CallpadClient = CallpadClient> = {
|
|
7
|
+
client: TClient;
|
|
8
|
+
connect?: boolean;
|
|
9
|
+
disposeOnUnmount?: boolean;
|
|
7
10
|
children: ReactNode;
|
|
8
|
-
audioRenderer?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare function CallpadProvider({ config, children, audioRenderer, }: CallpadProviderProps): ReactNode;
|
|
11
|
-
|
|
12
|
-
declare function useCallpadClient(): {
|
|
13
|
-
client: CallpadClient;
|
|
14
|
-
status: ClientStatus;
|
|
15
11
|
};
|
|
16
|
-
|
|
17
|
-
declare
|
|
18
|
-
|
|
19
|
-
declare
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
declare
|
|
23
|
-
|
|
24
|
-
declare
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
interface CallDuration {
|
|
28
|
-
formatted: string;
|
|
29
|
-
elapsedSeconds: number;
|
|
30
|
-
}
|
|
31
|
-
declare function useCallDuration(sessionId?: string): CallDuration;
|
|
32
|
-
|
|
33
|
-
declare function useIsHeld(sessionId?: string): boolean;
|
|
34
|
-
|
|
35
|
-
declare function useActiveRecording(sessionId?: string): Nullable<Recording>;
|
|
36
|
-
|
|
37
|
-
declare function useSessionParticipants(sessionId?: string): readonly Participant[];
|
|
38
|
-
declare function useSessionParticipant(participantId: string, sessionId?: string): Nullable<Participant>;
|
|
39
|
-
declare function useSelfParticipant(sessionId?: string): Nullable<Participant>;
|
|
40
|
-
|
|
41
|
-
declare function useSessionCapabilities(sessionId?: string): ReadonlySet<SessionParticipantCapability>;
|
|
42
|
-
|
|
43
|
-
declare function useSessionDispatches(sessionId?: string): readonly Dispatch[];
|
|
44
|
-
|
|
45
|
-
interface CallControls {
|
|
46
|
-
mic: {
|
|
47
|
-
muted: boolean;
|
|
48
|
-
toggle: () => Promise<void>;
|
|
49
|
-
setMuted: (v: boolean) => Promise<void>;
|
|
50
|
-
};
|
|
51
|
-
camera: {
|
|
52
|
-
enabled: boolean;
|
|
53
|
-
toggle: () => Promise<void>;
|
|
54
|
-
};
|
|
55
|
-
screenShare: {
|
|
56
|
-
active: boolean;
|
|
57
|
-
toggle: () => Promise<void>;
|
|
58
|
-
};
|
|
59
|
-
hold: {
|
|
60
|
-
active: boolean;
|
|
61
|
-
enabled: boolean;
|
|
62
|
-
toggle: () => Promise<void>;
|
|
63
|
-
};
|
|
64
|
-
recording: {
|
|
65
|
-
active: boolean;
|
|
66
|
-
enabled: boolean;
|
|
67
|
-
toggle: () => Promise<void>;
|
|
68
|
-
};
|
|
69
|
-
leave: {
|
|
70
|
-
enabled: boolean;
|
|
71
|
-
run: () => Promise<void>;
|
|
72
|
-
};
|
|
73
|
-
end: {
|
|
74
|
-
enabled: boolean;
|
|
75
|
-
run: () => Promise<void>;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
declare function useCallControls(sessionId?: string): CallControls;
|
|
79
|
-
|
|
80
|
-
declare function usePresence(refs: readonly PresenceRef[]): ReadonlyMap<string, PresenceSnapshot>;
|
|
81
|
-
interface MyPresenceHandle {
|
|
82
|
-
snapshot: Nullable<PresenceSnapshot>;
|
|
83
|
-
setStatus: (mode: PresenceMode, note?: Nullable<string>) => Promise<void>;
|
|
84
|
-
clearStatus: () => Promise<void>;
|
|
85
|
-
}
|
|
86
|
-
declare function useMyPresence(): MyPresenceHandle;
|
|
87
|
-
|
|
88
|
-
export { type CallControls, type CallDuration, CallpadProvider, type CallpadProviderProps, type MyPresenceHandle, useActiveRecording, useCallControls, useCallDuration, useCallpadClient, useClientEvent, useIncomingInvite, useIncomingInvites, useIsHeld, useMyPresence, usePresence, useSelfParticipant, useSession, useSessionCapabilities, useSessionDispatches, useSessionEvent, useSessionParticipant, useSessionParticipants, useSessions };
|
|
12
|
+
declare const CallpadProvider: <TClient extends CallpadClient>({ client, connect, disposeOnUnmount, children, }: CallpadProviderProps<TClient>) => react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare const useCallpad: <TClient extends CallpadClient = SessionClient>() => TClient;
|
|
14
|
+
declare const useStatus: () => ClientStatus;
|
|
15
|
+
declare const useSessions: () => readonly VoiceSession[];
|
|
16
|
+
declare const useSession: (sessionId?: string) => Nullable<VoiceSession>;
|
|
17
|
+
declare const useIncomingInvites: () => readonly SessionInvite[];
|
|
18
|
+
declare const useIncomingInvite: () => Nullable<SessionInvite>;
|
|
19
|
+
declare const useCan: (sessionId: string | undefined, action: SessionAction) => boolean;
|
|
20
|
+
declare const useSessionDuration: (sessionId?: string) => SessionDuration;
|
|
21
|
+
|
|
22
|
+
export { CallpadProvider, type CallpadProviderProps, useCallpad, useCan, useIncomingInvite, useIncomingInvites, useSession, useSessionDuration, useSessions, useStatus };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,88 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import 'livekit-client';
|
|
3
|
+
import { j as SessionClient, H as HostClient, S as SessionAction, N as Nullable, m as SessionInvite, t as VoiceSession, l as SessionDuration, b as ClientStatus } from '../types-Dgwrb3rf.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type CallpadClient = SessionClient | HostClient;
|
|
6
|
+
type CallpadProviderProps<TClient extends CallpadClient = CallpadClient> = {
|
|
7
|
+
client: TClient;
|
|
8
|
+
connect?: boolean;
|
|
9
|
+
disposeOnUnmount?: boolean;
|
|
7
10
|
children: ReactNode;
|
|
8
|
-
audioRenderer?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare function CallpadProvider({ config, children, audioRenderer, }: CallpadProviderProps): ReactNode;
|
|
11
|
-
|
|
12
|
-
declare function useCallpadClient(): {
|
|
13
|
-
client: CallpadClient;
|
|
14
|
-
status: ClientStatus;
|
|
15
11
|
};
|
|
16
|
-
|
|
17
|
-
declare
|
|
18
|
-
|
|
19
|
-
declare
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
declare
|
|
23
|
-
|
|
24
|
-
declare
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
interface CallDuration {
|
|
28
|
-
formatted: string;
|
|
29
|
-
elapsedSeconds: number;
|
|
30
|
-
}
|
|
31
|
-
declare function useCallDuration(sessionId?: string): CallDuration;
|
|
32
|
-
|
|
33
|
-
declare function useIsHeld(sessionId?: string): boolean;
|
|
34
|
-
|
|
35
|
-
declare function useActiveRecording(sessionId?: string): Nullable<Recording>;
|
|
36
|
-
|
|
37
|
-
declare function useSessionParticipants(sessionId?: string): readonly Participant[];
|
|
38
|
-
declare function useSessionParticipant(participantId: string, sessionId?: string): Nullable<Participant>;
|
|
39
|
-
declare function useSelfParticipant(sessionId?: string): Nullable<Participant>;
|
|
40
|
-
|
|
41
|
-
declare function useSessionCapabilities(sessionId?: string): ReadonlySet<SessionParticipantCapability>;
|
|
42
|
-
|
|
43
|
-
declare function useSessionDispatches(sessionId?: string): readonly Dispatch[];
|
|
44
|
-
|
|
45
|
-
interface CallControls {
|
|
46
|
-
mic: {
|
|
47
|
-
muted: boolean;
|
|
48
|
-
toggle: () => Promise<void>;
|
|
49
|
-
setMuted: (v: boolean) => Promise<void>;
|
|
50
|
-
};
|
|
51
|
-
camera: {
|
|
52
|
-
enabled: boolean;
|
|
53
|
-
toggle: () => Promise<void>;
|
|
54
|
-
};
|
|
55
|
-
screenShare: {
|
|
56
|
-
active: boolean;
|
|
57
|
-
toggle: () => Promise<void>;
|
|
58
|
-
};
|
|
59
|
-
hold: {
|
|
60
|
-
active: boolean;
|
|
61
|
-
enabled: boolean;
|
|
62
|
-
toggle: () => Promise<void>;
|
|
63
|
-
};
|
|
64
|
-
recording: {
|
|
65
|
-
active: boolean;
|
|
66
|
-
enabled: boolean;
|
|
67
|
-
toggle: () => Promise<void>;
|
|
68
|
-
};
|
|
69
|
-
leave: {
|
|
70
|
-
enabled: boolean;
|
|
71
|
-
run: () => Promise<void>;
|
|
72
|
-
};
|
|
73
|
-
end: {
|
|
74
|
-
enabled: boolean;
|
|
75
|
-
run: () => Promise<void>;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
declare function useCallControls(sessionId?: string): CallControls;
|
|
79
|
-
|
|
80
|
-
declare function usePresence(refs: readonly PresenceRef[]): ReadonlyMap<string, PresenceSnapshot>;
|
|
81
|
-
interface MyPresenceHandle {
|
|
82
|
-
snapshot: Nullable<PresenceSnapshot>;
|
|
83
|
-
setStatus: (mode: PresenceMode, note?: Nullable<string>) => Promise<void>;
|
|
84
|
-
clearStatus: () => Promise<void>;
|
|
85
|
-
}
|
|
86
|
-
declare function useMyPresence(): MyPresenceHandle;
|
|
87
|
-
|
|
88
|
-
export { type CallControls, type CallDuration, CallpadProvider, type CallpadProviderProps, type MyPresenceHandle, useActiveRecording, useCallControls, useCallDuration, useCallpadClient, useClientEvent, useIncomingInvite, useIncomingInvites, useIsHeld, useMyPresence, usePresence, useSelfParticipant, useSession, useSessionCapabilities, useSessionDispatches, useSessionEvent, useSessionParticipant, useSessionParticipants, useSessions };
|
|
12
|
+
declare const CallpadProvider: <TClient extends CallpadClient>({ client, connect, disposeOnUnmount, children, }: CallpadProviderProps<TClient>) => react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare const useCallpad: <TClient extends CallpadClient = SessionClient>() => TClient;
|
|
14
|
+
declare const useStatus: () => ClientStatus;
|
|
15
|
+
declare const useSessions: () => readonly VoiceSession[];
|
|
16
|
+
declare const useSession: (sessionId?: string) => Nullable<VoiceSession>;
|
|
17
|
+
declare const useIncomingInvites: () => readonly SessionInvite[];
|
|
18
|
+
declare const useIncomingInvite: () => Nullable<SessionInvite>;
|
|
19
|
+
declare const useCan: (sessionId: string | undefined, action: SessionAction) => boolean;
|
|
20
|
+
declare const useSessionDuration: (sessionId?: string) => SessionDuration;
|
|
21
|
+
|
|
22
|
+
export { CallpadProvider, type CallpadProviderProps, useCallpad, useCan, useIncomingInvite, useIncomingInvites, useSession, useSessionDuration, useSessions, useStatus };
|