@skippr/live-agent-sdk 0.99.0 → 0.101.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/dist/esm/lib-exports.js +1270 -957
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +154 -154
- package/dist/types/components/ChatHeader.d.ts +7 -1
- package/dist/types/components/ConsentBubble.d.ts +8 -0
- package/dist/types/components/ConsentNotice.d.ts +6 -0
- package/dist/types/components/LoginFlow.d.ts +3 -1
- package/dist/types/components/VoiceBarChatLine.d.ts +2 -3
- package/dist/types/components/VoiceBarFrame.d.ts +4 -4
- package/dist/types/components/VoiceBarNotification.d.ts +3 -3
- package/dist/types/context/LiveAgentContext.d.ts +7 -4
- package/dist/types/hooks/useAuth.d.ts +3 -1
- package/dist/types/hooks/useLauncherDrag.d.ts +3 -1
- package/dist/types/hooks/useVoiceBarDrag.d.ts +2 -2
- package/dist/types/lib/voiceBar.d.ts +12 -2
- package/package.json +1 -1
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
interface ChatHeaderProps {
|
|
2
|
+
wasDraggedRef: React.RefObject<boolean>;
|
|
3
|
+
draggable: boolean;
|
|
4
|
+
headerRef?: React.RefObject<HTMLElement | null>;
|
|
5
|
+
}
|
|
6
|
+
export declare function ChatHeader({ wasDraggedRef, draggable, headerRef }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ConsentBubbleProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
style?: React.CSSProperties;
|
|
4
|
+
onPointerEnter?: React.PointerEventHandler<HTMLDivElement>;
|
|
5
|
+
onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare function ConsentBubble({ className, style, onPointerEnter, onPointerLeave, }: ConsentBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface LoginFlowProps {
|
|
2
2
|
requestOtp: (email: string) => Promise<boolean>;
|
|
3
|
-
verifyOtp: (email: string, code: string
|
|
3
|
+
verifyOtp: (email: string, code: string, options?: {
|
|
4
|
+
tcAccepted?: boolean;
|
|
5
|
+
}) => Promise<void>;
|
|
4
6
|
error: string;
|
|
5
7
|
isSubmitting: boolean;
|
|
6
8
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { BarDock } from '../lib/voiceBar';
|
|
2
1
|
interface VoiceBarChatLineProps {
|
|
3
|
-
|
|
2
|
+
popsDown: boolean;
|
|
4
3
|
canSend: boolean;
|
|
5
4
|
onClose: () => void;
|
|
6
5
|
embedded?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export declare function VoiceBarChatLine({
|
|
7
|
+
export declare function VoiceBarChatLine({ popsDown, canSend, onClose, embedded, }: VoiceBarChatLineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { BarNotification } from '../hooks/useBarNotifications';
|
|
2
|
-
import { type
|
|
2
|
+
import { type BarPos } from '../lib/voiceBar';
|
|
3
3
|
interface VoiceBarFrameProps {
|
|
4
|
-
|
|
4
|
+
pos: BarPos;
|
|
5
5
|
canFold: boolean;
|
|
6
6
|
notifications: BarNotification[];
|
|
7
|
-
onDrop: (
|
|
7
|
+
onDrop: (pos: BarPos) => void;
|
|
8
8
|
setDragging: (dragging: boolean) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare function VoiceBarFrame({
|
|
10
|
+
export declare function VoiceBarFrame({ pos, canFold, notifications, onDrop, setDragging, }: VoiceBarFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { BarNotification } from '../hooks/useBarNotifications';
|
|
2
|
-
import { type
|
|
2
|
+
import { type BarPos } from '../lib/voiceBar';
|
|
3
3
|
interface VoiceBarNotificationProps {
|
|
4
4
|
notifications: BarNotification[];
|
|
5
|
-
|
|
5
|
+
pos: BarPos;
|
|
6
6
|
onDismiss: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function VoiceBarNotification({ notifications,
|
|
8
|
+
export declare function VoiceBarNotification({ notifications, pos, onDismiss }: VoiceBarNotificationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { PhaseStatus } from '../hooks/usePhaseUpdates';
|
|
|
3
3
|
import type { AgentMode } from '../lib/agentMode';
|
|
4
4
|
import { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode } from '../lib/constants';
|
|
5
5
|
import type { SessionStatus } from '../lib/sessionStatus';
|
|
6
|
-
import type {
|
|
6
|
+
import type { BarPos } from '../lib/voiceBar';
|
|
7
7
|
import type { Message } from '../types';
|
|
8
8
|
export type SidebarTab = 'chat' | 'agenda';
|
|
9
9
|
export { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE, MIC_MODE, type MicMode };
|
|
@@ -114,7 +114,9 @@ export interface LiveAgentPublicValue {
|
|
|
114
114
|
isValidating: boolean;
|
|
115
115
|
authError: string;
|
|
116
116
|
requestOtp: (email: string) => Promise<boolean>;
|
|
117
|
-
verifyOtp: (email: string, code: string
|
|
117
|
+
verifyOtp: (email: string, code: string, options?: {
|
|
118
|
+
tcAccepted?: boolean;
|
|
119
|
+
}) => Promise<void>;
|
|
118
120
|
logoutAuth: () => Promise<void>;
|
|
119
121
|
isAuthSubmitting: boolean;
|
|
120
122
|
sidebarTab: SidebarTab;
|
|
@@ -157,12 +159,13 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
157
159
|
setLauncherBottomPx: (px: number) => void;
|
|
158
160
|
commitLauncherDrop: (target: LauncherDropTarget) => void;
|
|
159
161
|
popsDown: boolean;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
barPos: BarPos | null;
|
|
163
|
+
setBarPos: (next: BarPos) => void;
|
|
162
164
|
panelExpanded: boolean;
|
|
163
165
|
togglePanelExpanded: () => void;
|
|
164
166
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
165
167
|
controlBarRef: React.RefObject<HTMLDivElement | null>;
|
|
168
|
+
voiceBarRef: React.RefObject<HTMLDivElement | null>;
|
|
166
169
|
isDragging: boolean;
|
|
167
170
|
setIsDragging: (dragging: boolean) => void;
|
|
168
171
|
chatActivityAt: number;
|
|
@@ -7,7 +7,9 @@ export declare function useAuth({ appKey }: UseAuthParams): {
|
|
|
7
7
|
hasResolvedStoredToken: boolean;
|
|
8
8
|
authToken: string | null;
|
|
9
9
|
requestOtp: (email: string) => Promise<boolean>;
|
|
10
|
-
verifyOtp: (email: string, code: string
|
|
10
|
+
verifyOtp: (email: string, code: string, options?: {
|
|
11
|
+
tcAccepted?: boolean;
|
|
12
|
+
}) => Promise<void>;
|
|
11
13
|
logout: () => Promise<void>;
|
|
12
14
|
error: string;
|
|
13
15
|
isSubmitting: boolean;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export interface LauncherDropTarget {
|
|
2
2
|
side: 'left' | 'right';
|
|
3
3
|
bottomPx: number;
|
|
4
|
+
clientX: number;
|
|
5
|
+
clientY: number;
|
|
4
6
|
}
|
|
5
7
|
type FollowerRef = React.RefObject<HTMLElement | null>;
|
|
6
|
-
export declare function useLauncherDrag(containerRef: React.RefObject<HTMLElement | null>, onDrop: (target: LauncherDropTarget) => void, followRefs?: FollowerRef[] | null, reportDragging?: (dragging: boolean) => void): {
|
|
8
|
+
export declare function useLauncherDrag(containerRef: React.RefObject<HTMLElement | null>, onDrop: (target: LauncherDropTarget) => void, followRefs?: FollowerRef[] | null, reportDragging?: (dragging: boolean) => void, enabled?: boolean): {
|
|
7
9
|
wasDraggedRef: React.RefObject<boolean>;
|
|
8
10
|
};
|
|
9
11
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BarPos } from '../lib/voiceBar';
|
|
2
2
|
type FollowerRef = React.RefObject<HTMLElement | null>;
|
|
3
|
-
export declare function useVoiceBarDrag(containerRef: React.RefObject<HTMLElement | null>, onDrop: (
|
|
3
|
+
export declare function useVoiceBarDrag(containerRef: React.RefObject<HTMLElement | null>, onDrop: (pos: BarPos) => void, followRefs?: FollowerRef[] | null, reportDragging?: (dragging: boolean) => void): {
|
|
4
4
|
wasDraggedRef: React.RefObject<boolean>;
|
|
5
5
|
};
|
|
6
6
|
export {};
|
|
@@ -6,13 +6,23 @@ export interface BarDock {
|
|
|
6
6
|
edge: BarEdge;
|
|
7
7
|
offsetPx: number;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export interface BarPos {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}
|
|
13
|
+
export type DockKind = 'launcher';
|
|
10
14
|
export declare function isHorizontalEdge(edge: BarEdge): boolean;
|
|
11
15
|
export declare function readSavedDock(kind: DockKind): BarDock | null;
|
|
12
16
|
export declare function persistDock(kind: DockKind, dock: BarDock): void;
|
|
17
|
+
export declare function readSavedBarPos(): BarPos | null;
|
|
18
|
+
export declare function persistBarPos(pos: BarPos): void;
|
|
19
|
+
export declare function clampBarPos(pos: BarPos): BarPos;
|
|
20
|
+
export declare function barPopsDown(pos: BarPos): boolean;
|
|
21
|
+
export declare function barLeftAligned(pos: BarPos): boolean;
|
|
22
|
+
export declare function defaultBarPos(): BarPos;
|
|
23
|
+
export declare function barPosStyle(pos: BarPos): React.CSSProperties;
|
|
13
24
|
export declare function clampOffset(edge: BarEdge, offsetPx: number): number;
|
|
14
25
|
export declare function defaultOffset(edge: BarEdge): number;
|
|
15
26
|
export declare function nearestEdge(clientX: number, clientY: number): BarEdge;
|
|
16
27
|
export declare function dropTargetFromPointer(clientX: number, clientY: number): BarDock;
|
|
17
|
-
export declare function dockStyle(dock: BarDock): React.CSSProperties;
|
|
18
28
|
export declare function dockStyleFlush(dock: BarDock): React.CSSProperties;
|