@skippr/live-agent-sdk 0.100.0 → 0.102.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 +354 -219
- 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/ConsentBubble.d.ts +2 -1
- package/dist/types/components/ConsentNotice.d.ts +3 -2
- 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 +16 -4
- package/dist/types/hooks/useLauncherDrag.d.ts +3 -1
- package/dist/types/hooks/useVoiceBarDrag.d.ts +2 -2
- package/dist/types/lib/constants.d.ts +5 -0
- 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,8 +1,9 @@
|
|
|
1
1
|
interface ConsentBubbleProps {
|
|
2
2
|
className?: string;
|
|
3
3
|
style?: React.CSSProperties;
|
|
4
|
+
leadIn: string;
|
|
4
5
|
onPointerEnter?: React.PointerEventHandler<HTMLDivElement>;
|
|
5
6
|
onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
|
|
6
7
|
}
|
|
7
|
-
export declare function ConsentBubble({ className, style, onPointerEnter, onPointerLeave, }: ConsentBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ConsentBubble({ className, style, leadIn, onPointerEnter, onPointerLeave, }: ConsentBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface ConsentNoticeProps {
|
|
2
2
|
className?: string;
|
|
3
|
-
|
|
3
|
+
leadIn: string;
|
|
4
|
+
determiner?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare function ConsentNotice({ className,
|
|
6
|
+
export declare function ConsentNotice({ className, leadIn, determiner }: ConsentNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
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 {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { LauncherDropTarget } from '../hooks/useLauncherDrag';
|
|
2
2
|
import type { PhaseStatus } from '../hooks/usePhaseUpdates';
|
|
3
3
|
import type { AgentMode } from '../lib/agentMode';
|
|
4
|
-
import { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode } from '../lib/constants';
|
|
4
|
+
import { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode, type PENDING_START_KIND } 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 };
|
|
@@ -80,6 +80,13 @@ export interface AdoptionGoalMatch {
|
|
|
80
80
|
hashPattern: string | null;
|
|
81
81
|
priority: number;
|
|
82
82
|
}
|
|
83
|
+
export type PendingStart = {
|
|
84
|
+
kind: typeof PENDING_START_KIND.Goal;
|
|
85
|
+
goal: AdoptionGoalMatch;
|
|
86
|
+
} | {
|
|
87
|
+
kind: typeof PENDING_START_KIND.Module;
|
|
88
|
+
moduleId: string;
|
|
89
|
+
};
|
|
83
90
|
export interface LiveAgentPublicValue {
|
|
84
91
|
isConnected: boolean;
|
|
85
92
|
isStarting: boolean;
|
|
@@ -110,6 +117,7 @@ export interface LiveAgentPublicValue {
|
|
|
110
117
|
isMinimized: boolean;
|
|
111
118
|
expandPanel: () => void;
|
|
112
119
|
minimizePanel: () => void;
|
|
120
|
+
revealBar: () => void;
|
|
113
121
|
isAuthenticated: boolean;
|
|
114
122
|
isValidating: boolean;
|
|
115
123
|
authError: string;
|
|
@@ -135,6 +143,9 @@ export interface LiveAgentPublicValue {
|
|
|
135
143
|
export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
136
144
|
defaultAgentId: string | null;
|
|
137
145
|
startDefaultSession: () => void;
|
|
146
|
+
startPrimarySession: () => void;
|
|
147
|
+
pendingStart: PendingStart | null;
|
|
148
|
+
previewStart: (pending: PendingStart) => void;
|
|
138
149
|
buddyActive: boolean;
|
|
139
150
|
buddyShape: BuddyShape;
|
|
140
151
|
pauseTimeoutSeconds: number | null;
|
|
@@ -159,12 +170,13 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
159
170
|
setLauncherBottomPx: (px: number) => void;
|
|
160
171
|
commitLauncherDrop: (target: LauncherDropTarget) => void;
|
|
161
172
|
popsDown: boolean;
|
|
162
|
-
|
|
163
|
-
|
|
173
|
+
barPos: BarPos | null;
|
|
174
|
+
setBarPos: (next: BarPos) => void;
|
|
164
175
|
panelExpanded: boolean;
|
|
165
176
|
togglePanelExpanded: () => void;
|
|
166
177
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
167
178
|
controlBarRef: React.RefObject<HTMLDivElement | null>;
|
|
179
|
+
voiceBarRef: React.RefObject<HTMLDivElement | null>;
|
|
168
180
|
isDragging: boolean;
|
|
169
181
|
setIsDragging: (dragging: boolean) => void;
|
|
170
182
|
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 {};
|
|
@@ -98,6 +98,11 @@ export declare const NOTIFICATION_KIND: {
|
|
|
98
98
|
readonly Module: "module";
|
|
99
99
|
};
|
|
100
100
|
export type NotificationKind = (typeof NOTIFICATION_KIND)[keyof typeof NOTIFICATION_KIND];
|
|
101
|
+
export declare const PENDING_START_KIND: {
|
|
102
|
+
readonly Goal: "goal";
|
|
103
|
+
readonly Module: "module";
|
|
104
|
+
};
|
|
105
|
+
export type PendingStartKind = (typeof PENDING_START_KIND)[keyof typeof PENDING_START_KIND];
|
|
101
106
|
export declare const PLAN_ATTR = "skippr.action-plan";
|
|
102
107
|
export declare const LINK_CARD_ATTR = "skippr.link-card";
|
|
103
108
|
export declare const NAME_MAX_CHARS = 80;
|
|
@@ -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;
|