@skippr/live-agent-sdk 0.28.0 → 0.30.0
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/README.md +3 -1
- package/dist/esm/lib-exports.js +545 -272
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +129 -129
- package/dist/types/components/HighlightOverlay.d.ts +1 -0
- package/dist/types/components/LiveAgent.d.ts +10 -4
- package/dist/types/context/LiveAgentContext.d.ts +4 -0
- package/dist/types/hooks/useSession.d.ts +3 -2
- package/dist/types/lib/constants.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HighlightOverlay(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
interface
|
|
2
|
+
import { type AgentControls } from '../context/LiveAgentContext';
|
|
3
|
+
interface LiveAgentBaseProps {
|
|
4
4
|
agentId: string;
|
|
5
5
|
authToken?: string | undefined;
|
|
6
6
|
appKey?: string | undefined;
|
|
@@ -15,8 +15,14 @@ interface LiveAgentProps {
|
|
|
15
15
|
startSessionLabel?: string;
|
|
16
16
|
autoFocusChat?: boolean;
|
|
17
17
|
showAgentStateBanner?: boolean;
|
|
18
|
-
captureMode?: CaptureMode | undefined;
|
|
19
18
|
children?: ReactNode;
|
|
20
19
|
}
|
|
21
|
-
export
|
|
20
|
+
export type LiveAgentProps = (LiveAgentBaseProps & {
|
|
21
|
+
captureMode?: 'screenshare' | undefined;
|
|
22
|
+
agentControls?: never;
|
|
23
|
+
}) | (LiveAgentBaseProps & {
|
|
24
|
+
captureMode: 'auto';
|
|
25
|
+
agentControls?: AgentControls | undefined;
|
|
26
|
+
});
|
|
27
|
+
export declare function LiveAgent(props: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
|
|
22
28
|
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export type SidebarTab = 'chat' | 'agenda';
|
|
2
2
|
export type CaptureMode = 'screenshare' | 'auto';
|
|
3
|
+
export interface AgentControls {
|
|
4
|
+
highlight?: boolean;
|
|
5
|
+
}
|
|
3
6
|
export interface LiveAgentPublicValue {
|
|
4
7
|
isConnected: boolean;
|
|
5
8
|
isStarting: boolean;
|
|
@@ -29,6 +32,7 @@ export interface LiveAgentPublicValue {
|
|
|
29
32
|
setSidebarTab: (tab: SidebarTab) => void;
|
|
30
33
|
autoFocusChat: boolean;
|
|
31
34
|
captureMode: CaptureMode;
|
|
35
|
+
agentControls?: AgentControls | undefined;
|
|
32
36
|
}
|
|
33
37
|
export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
34
38
|
connection: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CaptureMode } from '../context/LiveAgentContext';
|
|
1
|
+
import type { AgentControls, CaptureMode } from '../context/LiveAgentContext';
|
|
2
2
|
interface LiveKitConnection {
|
|
3
3
|
livekitUrl: string;
|
|
4
4
|
token: string;
|
|
@@ -6,11 +6,12 @@ interface LiveKitConnection {
|
|
|
6
6
|
interface UseSessionParams {
|
|
7
7
|
agentId: string;
|
|
8
8
|
captureMode?: CaptureMode | undefined;
|
|
9
|
+
agentControls?: AgentControls | undefined;
|
|
9
10
|
authToken?: string | undefined;
|
|
10
11
|
appKey?: string | undefined;
|
|
11
12
|
userToken?: string | undefined;
|
|
12
13
|
}
|
|
13
|
-
export declare function useSession({ agentId, captureMode, authToken, appKey, userToken, }: UseSessionParams): {
|
|
14
|
+
export declare function useSession({ agentId, captureMode, agentControls, authToken, appKey, userToken, }: UseSessionParams): {
|
|
14
15
|
connection: LiveKitConnection | null;
|
|
15
16
|
shouldConnect: boolean;
|
|
16
17
|
isStarting: boolean;
|
|
@@ -4,4 +4,5 @@ export declare const REF_ATTR = "data-skippr-ref";
|
|
|
4
4
|
export declare const PRIVATE_ATTR = "data-skippr-private";
|
|
5
5
|
export declare const DOM_SNAPSHOT_TOPIC = "skippr.dom-snapshot";
|
|
6
6
|
export declare const DOM_EVENTS_TOPIC = "skippr.dom-events";
|
|
7
|
+
export declare const HIGHLIGHT_TOPIC = "skippr.highlight";
|
|
7
8
|
export declare const NAME_MAX_CHARS = 80;
|