@skippr/live-agent-sdk 0.72.0 → 0.74.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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type AgentControls } from '../context/LiveAgentContext';
|
|
3
|
+
import { CAPTURE_MODE } from '../lib/constants';
|
|
4
|
+
import { type VerticalAlign } from '../lib/launcher';
|
|
3
5
|
interface LiveAgentBaseProps {
|
|
4
6
|
agentId?: string | undefined;
|
|
5
7
|
authToken?: string | undefined;
|
|
@@ -7,6 +9,7 @@ interface LiveAgentBaseProps {
|
|
|
7
9
|
getUserToken?: (() => Promise<string>) | undefined;
|
|
8
10
|
userToken?: string | undefined;
|
|
9
11
|
position?: 'left' | 'right' | undefined;
|
|
12
|
+
verticalAlign?: VerticalAlign | undefined;
|
|
10
13
|
variant?: 'floating' | 'sidebar' | undefined;
|
|
11
14
|
minimizable?: boolean | undefined;
|
|
12
15
|
defaultOpen?: boolean;
|
|
@@ -19,11 +22,11 @@ interface LiveAgentBaseProps {
|
|
|
19
22
|
children?: ReactNode;
|
|
20
23
|
}
|
|
21
24
|
export type LiveAgentProps = (LiveAgentBaseProps & {
|
|
22
|
-
captureMode?:
|
|
23
|
-
agentControls?: never;
|
|
24
|
-
}) | (LiveAgentBaseProps & {
|
|
25
|
-
captureMode: 'auto';
|
|
25
|
+
captureMode?: typeof CAPTURE_MODE.Auto | undefined;
|
|
26
26
|
agentControls?: AgentControls | undefined;
|
|
27
|
+
}) | (LiveAgentBaseProps & {
|
|
28
|
+
captureMode: typeof CAPTURE_MODE.Screenshare;
|
|
29
|
+
agentControls?: never;
|
|
27
30
|
});
|
|
28
31
|
export declare function LiveAgent(props: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
32
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { LauncherDropTarget } from '../hooks/useLauncherDrag';
|
|
2
2
|
import type { AgentMode } from '../lib/agentMode';
|
|
3
|
+
import { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE } from '../lib/constants';
|
|
3
4
|
import type { SessionStatus } from '../lib/sessionStatus';
|
|
4
5
|
import type { Message } from '../types';
|
|
5
6
|
export type SidebarTab = 'chat' | 'agenda';
|
|
6
|
-
export type CaptureMode
|
|
7
|
+
export { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE };
|
|
7
8
|
export interface AgentControls {
|
|
8
9
|
highlight?: boolean;
|
|
9
10
|
actions?: boolean;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare const SIDEBAR_WIDTH = 280;
|
|
2
|
+
export declare const CAPTURE_MODE: {
|
|
3
|
+
readonly Screenshare: "screenshare";
|
|
4
|
+
readonly Auto: "auto";
|
|
5
|
+
};
|
|
6
|
+
export type CaptureMode = (typeof CAPTURE_MODE)[keyof typeof CAPTURE_MODE];
|
|
7
|
+
export declare const DEFAULT_CAPTURE_MODE: CaptureMode;
|
|
2
8
|
export declare const WIDGET_ROOT_ID = "skippr-sdk-root";
|
|
3
9
|
export declare const REF_ATTR = "data-skippr-ref";
|
|
4
10
|
export declare const PRIVATE_ATTR = "data-skippr-private";
|
|
@@ -6,4 +6,6 @@ export declare const TRIGGER_HEIGHT_PX = 48;
|
|
|
6
6
|
export declare const IDLE_TRIGGER_CLEARANCE_PX: number;
|
|
7
7
|
export declare function triggerBottomPx(launcherBottomPx: number, popsDown: boolean): number;
|
|
8
8
|
export declare function clampLauncherBottom(px: number): number;
|
|
9
|
+
export type VerticalAlign = 'top' | 'middle' | 'bottom';
|
|
10
|
+
export declare function verticalAlignToBottomPx(align: VerticalAlign): number;
|
|
9
11
|
export declare function launcherPopsDown(bottomPx: number): boolean;
|