@skippr/live-agent-sdk 0.87.0 → 0.89.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 +9744 -6037
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +155 -155
- package/dist/types/buddy/BuddyCreature.d.ts +10 -0
- package/dist/types/buddy/BuddyFace.d.ts +10 -0
- package/dist/types/buddy/BuddyVoiceBar.d.ts +5 -0
- package/dist/types/buddy/buddy.d.ts +20 -0
- package/dist/types/buddy/hooks/useBuddyEyeTracking.d.ts +9 -0
- package/dist/types/buddy/hooks/useBuddyFreeDrag.d.ts +14 -0
- package/dist/types/buddy/hooks/useBuddyIdleMode.d.ts +12 -0
- package/dist/types/buddy/index.d.ts +3 -0
- package/dist/types/buddy/shapes/bespoke.d.ts +1 -0
- package/dist/types/buddy/shapes/colorful.d.ts +5 -0
- package/dist/types/buddy/shapes/constants.d.ts +6 -0
- package/dist/types/buddy/shapes/glass.d.ts +5 -0
- package/dist/types/buddy/shapes/index.d.ts +9 -0
- package/dist/types/buddy/shapes/original.d.ts +4 -0
- package/dist/types/buddy/shapes/pixel.d.ts +5 -0
- package/dist/types/capture/widgetAnchor.d.ts +6 -0
- package/dist/types/components/LauncherNotification.d.ts +11 -0
- package/dist/types/components/MessageList.d.ts +1 -1
- package/dist/types/components/PlanCard.d.ts +3 -0
- package/dist/types/components/VoiceBar.d.ts +5 -0
- package/dist/types/components/VoiceBarChatLine.d.ts +9 -0
- package/dist/types/components/VoiceBarFrame.d.ts +11 -0
- package/dist/types/components/VoiceBarLauncher.d.ts +15 -0
- package/dist/types/components/VoiceBarNotification.d.ts +9 -0
- package/dist/types/components/VoiceBarPlanCard.d.ts +9 -0
- package/dist/types/context/LiveAgentContext.d.ts +20 -2
- package/dist/types/hooks/useAdoptionTips.d.ts +2 -0
- package/dist/types/hooks/useAutoStart.d.ts +2 -2
- package/dist/types/hooks/useBarNotifications.d.ts +9 -0
- package/dist/types/hooks/useIdleAutoOff.d.ts +9 -0
- package/dist/types/hooks/useKeyboardPushToTalk.d.ts +3 -1
- package/dist/types/hooks/useKeyboardStop.d.ts +6 -0
- package/dist/types/hooks/usePlanUpdates.d.ts +1 -0
- package/dist/types/hooks/usePointerHold.d.ts +1 -0
- package/dist/types/hooks/useSessionTimer.d.ts +5 -0
- package/dist/types/hooks/useVoiceBarDrag.d.ts +6 -0
- package/dist/types/lib/constants.d.ts +65 -1
- package/dist/types/lib/utils.d.ts +1 -0
- package/dist/types/lib/voiceBar.d.ts +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type BuddyMode, type BuddyShape } from '../lib/constants';
|
|
2
|
+
interface BuddyCreatureProps {
|
|
3
|
+
shape: BuddyShape;
|
|
4
|
+
mode: BuddyMode;
|
|
5
|
+
eyeDx: number;
|
|
6
|
+
eyeDy: number;
|
|
7
|
+
isTalking: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function BuddyCreature({ shape, mode, eyeDx, eyeDy, isTalking }: BuddyCreatureProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface BuddyFaceProps {
|
|
2
|
+
eyeDx: number;
|
|
3
|
+
eyeDy: number;
|
|
4
|
+
mouthPath: string;
|
|
5
|
+
mouthFill: string;
|
|
6
|
+
lidsPath: string;
|
|
7
|
+
pupilOpacity: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function BuddyFace({ eyeDx, eyeDy, mouthPath, mouthFill, lidsPath, pupilOpacity, }: BuddyFaceProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AgentControls, WidgetAppearance } from '../context/LiveAgentContext';
|
|
2
|
+
export declare const SKIPPR_BUDDY_POS_KEY = "skippr_buddy_pos";
|
|
3
|
+
export declare const BUDDY_SLEEP_MS = 14000;
|
|
4
|
+
export declare const BUDDY_HAPPY_MS = 1300;
|
|
5
|
+
export declare const BUDDY_SIZE_PX = 96;
|
|
6
|
+
export declare const BUDDY_EDGE_MARGIN_PX = 16;
|
|
7
|
+
export declare const BUDDY_DRAG_THRESHOLD_PX = 5;
|
|
8
|
+
export interface BuddyPos {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function isBuddyActive(appearance: WidgetAppearance | null): boolean;
|
|
13
|
+
export declare function buddyEffectiveControls(base: AgentControls | undefined): AgentControls;
|
|
14
|
+
export declare function clampBuddyPos(pos: BuddyPos, sizePx?: number): BuddyPos;
|
|
15
|
+
export declare function readSavedBuddyPos(): BuddyPos | null;
|
|
16
|
+
export declare function persistBuddyPos(pos: BuddyPos): void;
|
|
17
|
+
export declare function seedBuddyPosFromAppearance(position: 'left' | 'right' | null, verticalAlign: 'top' | 'middle' | 'bottom' | null, viewport: {
|
|
18
|
+
innerWidth: number;
|
|
19
|
+
innerHeight: number;
|
|
20
|
+
}, sizePx?: number): BuddyPos;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface BuddyEyeDeltas {
|
|
2
|
+
eyeDx: number;
|
|
3
|
+
eyeDy: number;
|
|
4
|
+
}
|
|
5
|
+
export interface UseBuddyEyeTrackingOptions {
|
|
6
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function useBuddyEyeTracking({ containerRef, disabled, }: UseBuddyEyeTrackingOptions): BuddyEyeDeltas;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type BuddyPos } from '../buddy';
|
|
2
|
+
export interface UseBuddyFreeDragOptions {
|
|
3
|
+
appearancePosition: 'left' | 'right' | null;
|
|
4
|
+
appearanceVerticalAlign: 'top' | 'middle' | 'bottom' | null;
|
|
5
|
+
sizePx?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UseBuddyFreeDragValue {
|
|
8
|
+
pos: BuddyPos;
|
|
9
|
+
isDragging: boolean;
|
|
10
|
+
startDrag: (event: React.PointerEvent) => {
|
|
11
|
+
didDrag: () => boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function useBuddyFreeDrag({ appearancePosition, appearanceVerticalAlign, sizePx, }: UseBuddyFreeDragOptions): UseBuddyFreeDragValue;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type BuddyMode } from '../../lib/constants';
|
|
2
|
+
export interface UseBuddyIdleModeOptions {
|
|
3
|
+
isConnected: boolean;
|
|
4
|
+
isSpeaking: boolean;
|
|
5
|
+
isListening: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface UseBuddyIdleModeValue {
|
|
8
|
+
mode: BuddyMode;
|
|
9
|
+
reportActivity: () => void;
|
|
10
|
+
reportHover: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function useBuddyIdleMode({ isConnected, isSpeaking, isListening, }: UseBuddyIdleModeOptions): UseBuddyIdleModeValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PeekBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function BloomBody(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function WobbleBody(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function SplatBody(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function CloudBody(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function BoopBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function BoulderBody(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function KiteBody(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function LoafBody(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function FacetBody(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function BellBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import { type BuddyShape } from '../../lib/constants';
|
|
3
|
+
export { BODY_SIZE } from './constants';
|
|
4
|
+
export declare const SHAPE_BODY: Record<BuddyShape, () => ReactElement>;
|
|
5
|
+
export interface ShapeFaceOffset {
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const SHAPE_FACE_OFFSET: Record<BuddyShape, ShapeFaceOffset>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function BoltBody(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function TermBody(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function HexBody(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function BubBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function TotemBody(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function MelonBody(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function SunnyBody(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function StormBody(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function ReedBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BarNotification } from '../hooks/useBarNotifications';
|
|
2
|
+
import { type LauncherMode } from '../lib/constants';
|
|
3
|
+
import { type BarDock } from '../lib/voiceBar';
|
|
4
|
+
interface LauncherNotificationProps {
|
|
5
|
+
notifications: BarNotification[];
|
|
6
|
+
dock: BarDock;
|
|
7
|
+
mode: Exclude<LauncherMode, 'none'>;
|
|
8
|
+
onDismiss: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function LauncherNotification({ notifications, dock, mode, onDismiss, }: LauncherNotificationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -4,5 +4,8 @@ interface PlanCardProps {
|
|
|
4
4
|
sendChatMessage: (message: string) => Promise<unknown>;
|
|
5
5
|
onDismiss: () => void;
|
|
6
6
|
}
|
|
7
|
+
export declare const APPROVE_MESSAGE = "Yes, go ahead.";
|
|
8
|
+
export declare const CANCEL_MESSAGE = "No, cancel that.";
|
|
9
|
+
export declare const COMPLETED_CARD_VISIBLE_MS = 2500;
|
|
7
10
|
export declare function PlanCard({ plan, sendChatMessage, onDismiss }: PlanCardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BarDock } from '../lib/voiceBar';
|
|
2
|
+
interface VoiceBarChatLineProps {
|
|
3
|
+
dock: BarDock;
|
|
4
|
+
canSend: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
embedded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function VoiceBarChatLine({ dock, canSend, onClose, embedded, }: VoiceBarChatLineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BarNotification } from '../hooks/useBarNotifications';
|
|
2
|
+
import { type BarDock } from '../lib/voiceBar';
|
|
3
|
+
interface VoiceBarFrameProps {
|
|
4
|
+
dock: BarDock;
|
|
5
|
+
canFold: boolean;
|
|
6
|
+
notifications: BarNotification[];
|
|
7
|
+
onDrop: (dock: BarDock) => void;
|
|
8
|
+
setDragging: (dragging: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function VoiceBarFrame({ dock, canFold, notifications, onDrop, setDragging, }: VoiceBarFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BarNotification } from '../hooks/useBarNotifications';
|
|
2
|
+
import { type LauncherMode } from '../lib/constants';
|
|
3
|
+
import { type BarDock } from '../lib/voiceBar';
|
|
4
|
+
interface VoiceBarLauncherProps {
|
|
5
|
+
dock: BarDock;
|
|
6
|
+
mode: Exclude<LauncherMode, 'none'>;
|
|
7
|
+
logoUrl: string | null;
|
|
8
|
+
notifications: BarNotification[];
|
|
9
|
+
onOpen: () => void;
|
|
10
|
+
onChat: (() => void) | null;
|
|
11
|
+
onDrop: (dock: BarDock) => void;
|
|
12
|
+
setDragging: (dragging: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function VoiceBarLauncher({ dock, mode, logoUrl, notifications, onOpen, onChat, onDrop, setDragging, }: VoiceBarLauncherProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BarNotification } from '../hooks/useBarNotifications';
|
|
2
|
+
import { type BarDock } from '../lib/voiceBar';
|
|
3
|
+
interface VoiceBarNotificationProps {
|
|
4
|
+
notifications: BarNotification[];
|
|
5
|
+
dock: BarDock;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function VoiceBarNotification({ notifications, dock, onDismiss, }: VoiceBarNotificationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PlanCardData } from '../hooks/usePlanUpdates';
|
|
2
|
+
interface VoiceBarPlanCardProps {
|
|
3
|
+
plan: PlanCardData;
|
|
4
|
+
sendChatMessage: (message: string) => Promise<unknown>;
|
|
5
|
+
onDismiss: () => void;
|
|
6
|
+
embedded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function VoiceBarPlanCard({ plan, sendChatMessage, onDismiss, embedded, }: VoiceBarPlanCardProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,8 +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 { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE, MIC_MODE, type MicMode } from '../lib/constants';
|
|
4
|
+
import { 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 { BarDock } from '../lib/voiceBar';
|
|
6
7
|
import type { Message } from '../types';
|
|
7
8
|
export type SidebarTab = 'chat' | 'agenda';
|
|
8
9
|
export { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE, MIC_MODE, type MicMode };
|
|
@@ -10,6 +11,7 @@ export interface AgentControls {
|
|
|
10
11
|
highlight?: boolean;
|
|
11
12
|
actions?: boolean;
|
|
12
13
|
micMode?: MicMode;
|
|
14
|
+
chat?: ChatSurface;
|
|
13
15
|
}
|
|
14
16
|
export interface UiPreferences {
|
|
15
17
|
animateCursor?: boolean;
|
|
@@ -41,11 +43,17 @@ export interface ModuleDefault {
|
|
|
41
43
|
agentId: string | null;
|
|
42
44
|
sessionId: string | null;
|
|
43
45
|
}
|
|
46
|
+
export interface BuddyAppearance {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
shape: BuddyShape;
|
|
49
|
+
}
|
|
44
50
|
export interface WidgetAppearance {
|
|
45
51
|
accentColor: string | null;
|
|
46
52
|
logoUrl: string | null;
|
|
47
53
|
position: 'left' | 'right' | null;
|
|
48
54
|
verticalAlign: 'top' | 'middle' | 'bottom' | null;
|
|
55
|
+
launcherMode: LauncherMode | null;
|
|
56
|
+
buddy: BuddyAppearance | null;
|
|
49
57
|
}
|
|
50
58
|
export interface IdleSessionHistory {
|
|
51
59
|
messages: Message[];
|
|
@@ -65,6 +73,7 @@ export interface AdoptionGoalMatch {
|
|
|
65
73
|
goalId: string;
|
|
66
74
|
agentId: string;
|
|
67
75
|
displayMessage: string;
|
|
76
|
+
objective: string;
|
|
68
77
|
matchType: AdoptionMatchType;
|
|
69
78
|
hashPattern: string | null;
|
|
70
79
|
priority: number;
|
|
@@ -117,10 +126,13 @@ export interface LiveAgentPublicValue {
|
|
|
117
126
|
modulesError: string | null;
|
|
118
127
|
refetchModules: () => Promise<void>;
|
|
119
128
|
selectModule: (id: string) => void;
|
|
129
|
+
textMode: boolean;
|
|
120
130
|
}
|
|
121
131
|
export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
122
132
|
defaultAgentId: string | null;
|
|
123
133
|
startDefaultSession: () => void;
|
|
134
|
+
buddyActive: boolean;
|
|
135
|
+
buddyShape: BuddyShape;
|
|
124
136
|
pauseTimeoutSeconds: number | null;
|
|
125
137
|
usesHostAuth: boolean;
|
|
126
138
|
authFailed: boolean;
|
|
@@ -137,17 +149,23 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
137
149
|
appearance: WidgetAppearance | null;
|
|
138
150
|
adoptionGoals: AdoptionGoalMatch[];
|
|
139
151
|
startAdoptionSession: (goal: AdoptionGoalMatch) => void;
|
|
140
|
-
|
|
152
|
+
attendGoal: (goalId: string) => void;
|
|
141
153
|
setTextModeState: (enabled: boolean) => void;
|
|
142
154
|
launcherBottomPx: number;
|
|
143
155
|
setLauncherBottomPx: (px: number) => void;
|
|
144
156
|
commitLauncherDrop: (target: LauncherDropTarget) => void;
|
|
145
157
|
popsDown: boolean;
|
|
158
|
+
barDock: BarDock | null;
|
|
159
|
+
setBarDock: (next: BarDock) => void;
|
|
146
160
|
panelExpanded: boolean;
|
|
147
161
|
togglePanelExpanded: () => void;
|
|
148
162
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
149
163
|
controlBarRef: React.RefObject<HTMLDivElement | null>;
|
|
150
164
|
isDragging: boolean;
|
|
151
165
|
setIsDragging: (dragging: boolean) => void;
|
|
166
|
+
chatActivityAt: number;
|
|
167
|
+
reportChatActivity: () => void;
|
|
168
|
+
chatDraft: string;
|
|
169
|
+
setChatDraft: (text: string) => void;
|
|
152
170
|
}
|
|
153
171
|
export declare const LiveAgentContext: import("react").Context<LiveAgentContextValue | null>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Module } from '../context/LiveAgentContext';
|
|
2
2
|
interface UseAutoStartParams {
|
|
3
3
|
availableModules: Module[];
|
|
4
|
-
|
|
4
|
+
suppressed: boolean;
|
|
5
5
|
bearerToken: string | null;
|
|
6
6
|
selectModule: (id: string, opts?: {
|
|
7
7
|
autoStarted?: boolean;
|
|
8
8
|
}) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare function useAutoStart({ availableModules,
|
|
10
|
+
export declare function useAutoStart({ availableModules, suppressed, bearerToken, selectModule, }: UseAutoStartParams): void;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type NotificationKind } from '../lib/constants';
|
|
2
|
+
export interface BarNotification {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: NotificationKind;
|
|
5
|
+
message: string;
|
|
6
|
+
accentColor: string;
|
|
7
|
+
activate: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useBarNotifications(): BarNotification[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface UseIdleAutoOffOptions {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
active: boolean;
|
|
4
|
+
onExpire: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface UseIdleAutoOffValue {
|
|
7
|
+
reportActivity: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useIdleAutoOff({ enabled, active, onExpire, }: UseIdleAutoOffOptions): UseIdleAutoOffValue;
|
|
@@ -3,6 +3,8 @@ interface UseKeyboardPushToTalkOptions {
|
|
|
3
3
|
onStart: () => void;
|
|
4
4
|
onCommit: () => void;
|
|
5
5
|
onKeyUsed?: () => void;
|
|
6
|
+
code?: string;
|
|
7
|
+
requireCtrl?: boolean;
|
|
6
8
|
}
|
|
7
|
-
export declare function useKeyboardPushToTalk({ enabled, onStart, onCommit, onKeyUsed, }: UseKeyboardPushToTalkOptions): void;
|
|
9
|
+
export declare function useKeyboardPushToTalk({ enabled, onStart, onCommit, onKeyUsed, code, requireCtrl, }: UseKeyboardPushToTalkOptions): void;
|
|
8
10
|
export {};
|
|
@@ -11,4 +11,5 @@ export interface PlanCardData {
|
|
|
11
11
|
state: PlanState;
|
|
12
12
|
}
|
|
13
13
|
export declare function parsePlan(json: string): PlanCardData | null;
|
|
14
|
+
export declare function isPlanVisible(plan: PlanCardData | null | undefined): plan is PlanCardData;
|
|
14
15
|
export declare function usePlanUpdates(): PlanCardData | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePointerHold(onStart: () => void, onCommit: () => void): (event: React.PointerEvent) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type BarDock } from '../lib/voiceBar';
|
|
2
|
+
type FollowerRef = React.RefObject<HTMLElement | null>;
|
|
3
|
+
export declare function useVoiceBarDrag(containerRef: React.RefObject<HTMLElement | null>, onDrop: (dock: BarDock) => void, followRefs?: FollowerRef[] | null, reportDragging?: (dragging: boolean) => void): {
|
|
4
|
+
wasDraggedRef: React.RefObject<boolean>;
|
|
5
|
+
};
|
|
6
|
+
export {};
|
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const BUDDY_SHAPE: {
|
|
2
|
+
readonly Bolt: "bolt";
|
|
3
|
+
readonly Term: "term";
|
|
4
|
+
readonly Bub: "bub";
|
|
5
|
+
readonly Hex: "hex";
|
|
6
|
+
readonly Peek: "peek";
|
|
7
|
+
readonly Bloom: "bloom";
|
|
8
|
+
readonly Wobble: "wobble";
|
|
9
|
+
readonly Splat: "splat";
|
|
10
|
+
readonly Cloud: "cloud";
|
|
11
|
+
readonly Boop: "boop";
|
|
12
|
+
readonly Boulder: "boulder";
|
|
13
|
+
readonly Kite: "kite";
|
|
14
|
+
readonly Loaf: "loaf";
|
|
15
|
+
readonly Facet: "facet";
|
|
16
|
+
readonly Bell: "bell";
|
|
17
|
+
readonly Totem: "totem";
|
|
18
|
+
readonly Melon: "melon";
|
|
19
|
+
readonly Sunny: "sunny";
|
|
20
|
+
readonly Storm: "storm";
|
|
21
|
+
readonly Reed: "reed";
|
|
22
|
+
};
|
|
23
|
+
export type BuddyShape = (typeof BUDDY_SHAPE)[keyof typeof BUDDY_SHAPE];
|
|
24
|
+
export declare const DEFAULT_BUDDY_SHAPE: BuddyShape;
|
|
25
|
+
export declare const BUDDY_MODE: {
|
|
26
|
+
readonly Idle: "idle";
|
|
27
|
+
readonly Happy: "happy";
|
|
28
|
+
readonly Sleep: "sleep";
|
|
29
|
+
readonly Talking: "talking";
|
|
30
|
+
readonly Listening: "listening";
|
|
31
|
+
};
|
|
32
|
+
export type BuddyMode = (typeof BUDDY_MODE)[keyof typeof BUDDY_MODE];
|
|
33
|
+
export declare const SIDEBAR_WIDTH = 255;
|
|
2
34
|
export declare const CAPTURE_MODE: {
|
|
3
35
|
readonly Screenshare: "screenshare";
|
|
4
36
|
readonly Auto: "auto";
|
|
@@ -8,6 +40,7 @@ export declare const DEFAULT_CAPTURE_MODE: CaptureMode;
|
|
|
8
40
|
export declare const WIDGET_ROOT_ID = "skippr-sdk-root";
|
|
9
41
|
export declare const REF_ATTR = "data-skippr-ref";
|
|
10
42
|
export declare const PRIVATE_ATTR = "data-skippr-private";
|
|
43
|
+
export declare const NO_DRAG_ATTR = "data-skippr-no-drag";
|
|
11
44
|
export declare const DOM_SNAPSHOT_TOPIC = "skippr.dom-snapshot";
|
|
12
45
|
export declare const DOM_EVENTS_TOPIC = "skippr.dom-events";
|
|
13
46
|
export declare const HIGHLIGHT_TOPIC = "skippr.highlight";
|
|
@@ -24,8 +57,39 @@ export declare const MIC_MODE: {
|
|
|
24
57
|
export type MicMode = (typeof MIC_MODE)[keyof typeof MIC_MODE];
|
|
25
58
|
export declare const DEFAULT_MIC_MODE: MicMode;
|
|
26
59
|
export declare function isRequestResponseMicMode(micMode: MicMode | undefined): micMode is typeof MIC_MODE.PushToTalk | typeof MIC_MODE.TapToTalk;
|
|
60
|
+
export declare const CHAT_SURFACE: {
|
|
61
|
+
readonly Line: "line";
|
|
62
|
+
readonly Room: "room";
|
|
63
|
+
};
|
|
64
|
+
export type ChatSurface = (typeof CHAT_SURFACE)[keyof typeof CHAT_SURFACE];
|
|
65
|
+
export declare const DEFAULT_CHAT_SURFACE: ChatSurface;
|
|
66
|
+
export declare const LAUNCHER_MODE: {
|
|
67
|
+
readonly Avatar: "avatar";
|
|
68
|
+
readonly Strip: "strip";
|
|
69
|
+
readonly None: "none";
|
|
70
|
+
readonly Custom: "custom";
|
|
71
|
+
};
|
|
72
|
+
export type LauncherMode = (typeof LAUNCHER_MODE)[keyof typeof LAUNCHER_MODE];
|
|
73
|
+
export declare const DEFAULT_LAUNCHER_MODE: LauncherMode;
|
|
27
74
|
export declare const PUSH_TO_TALK_KEY = "Backquote";
|
|
28
75
|
export declare const PUSH_TO_TALK_KEY_LABEL = "`";
|
|
76
|
+
export declare const STOP_AGENT_KEY = "KeyX";
|
|
29
77
|
export declare const IDLE_AUTO_PAUSE_MS: number;
|
|
78
|
+
export declare const IDLE_AUTO_OFF_MS: number;
|
|
79
|
+
export declare const AUTO_OFF_NOTICE_MS = 3500;
|
|
80
|
+
export declare const CHAT_ACTIVITY_THROTTLE_MS = 15000;
|
|
81
|
+
export declare const MAX_ADOPTION_TIPS = 3;
|
|
82
|
+
export declare const TIP_ROTATE_MS = 2000;
|
|
83
|
+
export declare const TIP_HIDE_MS = 6000;
|
|
84
|
+
export declare const SESSION_TIMER_WARNING_S = 120;
|
|
85
|
+
export declare const SESSION_TIMER_HOLD_MS = 6000;
|
|
86
|
+
export declare const SESSION_TIMER_INTERVAL_MS: number;
|
|
87
|
+
export declare const NOTIF_ACCENT_COLOR = "#199a89";
|
|
88
|
+
export declare const MODULE_ACCENT_COLOR = "#e0574f";
|
|
89
|
+
export declare const NOTIFICATION_KIND: {
|
|
90
|
+
readonly Tip: "tip";
|
|
91
|
+
readonly Module: "module";
|
|
92
|
+
};
|
|
93
|
+
export type NotificationKind = (typeof NOTIFICATION_KIND)[keyof typeof NOTIFICATION_KIND];
|
|
30
94
|
export declare const PLAN_ATTR = "skippr.action-plan";
|
|
31
95
|
export declare const NAME_MAX_CHARS = 80;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type BarEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
2
|
+
export declare const VOICE_BAR_EDGE_MARGIN_PX = 16;
|
|
3
|
+
export declare const VOICE_BAR_HEIGHT_PX = 46;
|
|
4
|
+
export declare const VOICE_BAR_WIDTH_PX = 255;
|
|
5
|
+
export interface BarDock {
|
|
6
|
+
edge: BarEdge;
|
|
7
|
+
offsetPx: number;
|
|
8
|
+
}
|
|
9
|
+
export type DockKind = 'bar' | 'launcher';
|
|
10
|
+
export declare function isHorizontalEdge(edge: BarEdge): boolean;
|
|
11
|
+
export declare function readSavedDock(kind: DockKind): BarDock | null;
|
|
12
|
+
export declare function persistDock(kind: DockKind, dock: BarDock): void;
|
|
13
|
+
export declare function clampOffset(edge: BarEdge, offsetPx: number): number;
|
|
14
|
+
export declare function defaultOffset(edge: BarEdge): number;
|
|
15
|
+
export declare function nearestEdge(clientX: number, clientY: number): BarEdge;
|
|
16
|
+
export declare function dropTargetFromPointer(clientX: number, clientY: number): BarDock;
|
|
17
|
+
export declare function dockStyle(dock: BarDock): React.CSSProperties;
|
|
18
|
+
export declare function dockStyleFlush(dock: BarDock): React.CSSProperties;
|