@skippr/live-agent-sdk 0.100.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 +275 -159
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +156 -156
- package/dist/types/components/ChatHeader.d.ts +7 -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 +4 -3
- 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 {};
|
|
@@ -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 };
|
|
@@ -159,12 +159,13 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
159
159
|
setLauncherBottomPx: (px: number) => void;
|
|
160
160
|
commitLauncherDrop: (target: LauncherDropTarget) => void;
|
|
161
161
|
popsDown: boolean;
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
barPos: BarPos | null;
|
|
163
|
+
setBarPos: (next: BarPos) => void;
|
|
164
164
|
panelExpanded: boolean;
|
|
165
165
|
togglePanelExpanded: () => void;
|
|
166
166
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
167
167
|
controlBarRef: React.RefObject<HTMLDivElement | null>;
|
|
168
|
+
voiceBarRef: React.RefObject<HTMLDivElement | null>;
|
|
168
169
|
isDragging: boolean;
|
|
169
170
|
setIsDragging: (dragging: boolean) => void;
|
|
170
171
|
chatActivityAt: number;
|
|
@@ -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;
|