@skippr/live-agent-sdk 0.51.0 → 0.53.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.
@@ -0,0 +1,7 @@
1
+ import type { CursorTarget } from '../components/AgentCursor';
2
+ export type CursorOwner = 'guide' | 'act';
3
+ type CursorTargetListener = (target: CursorTarget | null) => void;
4
+ export declare function setCursorTarget(owner: CursorOwner, target: CursorTarget): void;
5
+ export declare function clearCursorTarget(owner: CursorOwner): void;
6
+ export declare function subscribeCursorTarget(listener: CursorTargetListener): () => void;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { CSSProperties } from 'react';
2
+ export declare const RING_PAD = 6;
3
+ interface Size {
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export declare function ringRadius(size: Size): number;
8
+ export declare function ringPathD(size: Size): string;
9
+ export declare function ringBoxStyle(rect: DOMRect, zIndex: number): CSSProperties;
10
+ export interface RingTrace {
11
+ cancel: () => void;
12
+ }
13
+ export declare function traceRing(path: SVGPathElement, durationMs: number, onFrame?: (easedProgress: number) => void, onDone?: () => void): RingTrace;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { CursorTarget } from '../components/AgentCursor';
2
+ export declare function useAgentCursor(): CursorTarget | null;
@@ -0,0 +1,11 @@
1
+ export type CursorMode = 'guide' | 'act';
2
+ export interface CursorTarget {
3
+ element: HTMLElement;
4
+ label: string;
5
+ mode: CursorMode;
6
+ onAct?: () => void;
7
+ }
8
+ export declare function AgentCursor({ target, animated, }: {
9
+ target: CursorTarget | null;
10
+ animated?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,2 @@
1
1
  export declare const HIGHLIGHT_AUTO_CLEAR_MS = 10000;
2
- export declare function HighlightOverlay(): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare function HighlightOverlay(): null;
@@ -15,6 +15,7 @@ interface LiveAgentBaseProps {
15
15
  hideHeader?: boolean;
16
16
  startSessionLabel?: string;
17
17
  autoFocusChat?: boolean;
18
+ animateAgentCursor?: boolean;
18
19
  children?: ReactNode;
19
20
  }
20
21
  export type LiveAgentProps = (LiveAgentBaseProps & {
@@ -1 +1 @@
1
- export declare function PageActionHandler(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function PageActionHandler(): null;
@@ -7,6 +7,9 @@ export interface AgentControls {
7
7
  highlight?: boolean;
8
8
  actions?: boolean;
9
9
  }
10
+ export interface UiPreferences {
11
+ animateCursor?: boolean;
12
+ }
10
13
  export type { AgentMode, SessionStatus };
11
14
  export interface ModuleCurrentSession {
12
15
  id: string;
@@ -21,6 +24,7 @@ export interface Module {
21
24
  mode: AgentMode;
22
25
  priority: number;
23
26
  controls: AgentControls;
27
+ uiPreferences: UiPreferences;
24
28
  totalPhases: number;
25
29
  currentSession: ModuleCurrentSession | null;
26
30
  }
@@ -116,5 +120,6 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
116
120
  popsDown: boolean;
117
121
  panelExpanded: boolean;
118
122
  togglePanelExpanded: () => void;
123
+ panelRef: React.RefObject<HTMLDivElement | null>;
119
124
  }
120
125
  export declare const LiveAgentContext: import("react").Context<LiveAgentContextValue | null>;
@@ -2,6 +2,6 @@ export interface LauncherDropTarget {
2
2
  side: 'left' | 'right';
3
3
  bottomPx: number;
4
4
  }
5
- export declare function useLauncherDrag(containerRef: React.RefObject<HTMLDivElement | null>, onDrop: (target: LauncherDropTarget) => void): {
5
+ export declare function useLauncherDrag(containerRef: React.RefObject<HTMLDivElement | null>, onDrop: (target: LauncherDropTarget) => void, followRef?: React.RefObject<HTMLElement | null> | null): {
6
6
  wasDraggedRef: React.RefObject<boolean>;
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.51.0",
3
+ "version": "0.53.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",
@@ -1,7 +0,0 @@
1
- export interface ActivityTarget {
2
- element: HTMLElement;
3
- label: string;
4
- }
5
- export declare function AgentActivityIndicator({ target }: {
6
- target: ActivityTarget | null;
7
- }): import("react/jsx-runtime").JSX.Element | null;