@skippr/live-agent-sdk 0.82.0 → 0.84.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,2 @@
1
+ export declare function drawPausedOverlay(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D): void;
2
+ export declare function createPausedScreenTrack(sourceTrack: MediaStreamTrack): Promise<MediaStreamTrack | null>;
@@ -8,7 +8,6 @@ interface LiveAgentBaseProps {
8
8
  appKey?: string | undefined;
9
9
  getUserToken?: (() => Promise<string>) | undefined;
10
10
  userToken?: string | undefined;
11
- position?: 'left' | 'right' | undefined;
12
11
  verticalAlign?: VerticalAlign | undefined;
13
12
  variant?: 'floating' | 'sidebar' | undefined;
14
13
  minimizable?: boolean | undefined;
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  export declare const PROPERTIES_STYLE_ID = "skippr-tw-properties";
3
- export declare function ShadowHost({ children }: {
3
+ export declare function ShadowHost({ children, accentColor, }: {
4
4
  children: ReactNode;
5
+ accentColor?: string | null;
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -41,6 +41,12 @@ export interface ModuleDefault {
41
41
  agentId: string | null;
42
42
  sessionId: string | null;
43
43
  }
44
+ export interface WidgetAppearance {
45
+ accentColor: string | null;
46
+ logoUrl: string | null;
47
+ position: 'left' | 'right' | null;
48
+ verticalAlign: 'top' | 'middle' | 'bottom' | null;
49
+ }
44
50
  export interface IdleSessionHistory {
45
51
  messages: Message[];
46
52
  phases: PhaseStatus[];
@@ -128,6 +134,7 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
128
134
  phasesSnapshot: unknown[];
129
135
  setPhasesSnapshot: (phases: unknown[]) => void;
130
136
  hasResolvedModules: boolean;
137
+ appearance: WidgetAppearance | null;
131
138
  adoptionGoals: AdoptionGoalMatch[];
132
139
  startAdoptionSession: (goal: AdoptionGoalMatch) => void;
133
140
  textMode: boolean;
@@ -4,6 +4,7 @@ interface UseAuthParams {
4
4
  export declare function useAuth({ appKey }: UseAuthParams): {
5
5
  isAuthenticated: boolean;
6
6
  isValidating: boolean;
7
+ hasResolvedStoredToken: boolean;
7
8
  authToken: string | null;
8
9
  requestOtp: (email: string) => Promise<boolean>;
9
10
  verifyOtp: (email: string, code: string) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Module, ModuleDefault } from '../context/LiveAgentContext';
1
+ import type { Module, ModuleDefault, WidgetAppearance } from '../context/LiveAgentContext';
2
2
  import type { AuthedFetch } from './useSession';
3
3
  interface UseAvailableModulesParams {
4
4
  enabled: boolean;
@@ -9,6 +9,7 @@ interface UseAvailableModulesParams {
9
9
  interface UseAvailableModulesResult {
10
10
  modules: Module[];
11
11
  defaultSelection: ModuleDefault;
12
+ appearance: WidgetAppearance | null;
12
13
  isLoading: boolean;
13
14
  hasResolved: boolean;
14
15
  error: string | null;
@@ -1 +1 @@
1
- export declare function useElapsedSeconds(isRunning: boolean): number;
1
+ export declare function useElapsedSeconds(isRunning: boolean, resetSignal?: unknown): number;
@@ -0,0 +1 @@
1
+ export declare function useIsSessionHeld(): boolean;
@@ -0,0 +1 @@
1
+ export declare function useOnceTrue(value: boolean): boolean;
@@ -1,7 +1,9 @@
1
+ import { type CaptureMode } from '../lib/constants';
1
2
  export declare const FALLBACK_PAUSE_TIMEOUT_SECONDS = 120;
2
3
  export interface UseSessionHoldOptions {
3
4
  pauseSession: () => Promise<void>;
4
5
  pauseTimeoutSeconds: number | null;
6
+ captureMode: CaptureMode;
5
7
  }
6
8
  export interface UseSessionHoldValue {
7
9
  isHeld: boolean;
@@ -10,4 +12,4 @@ export interface UseSessionHoldValue {
10
12
  }
11
13
  /** Owns the user's in-session pause/resume: mutes the mic, signals the worker to stop listening,
12
14
  * and ends the session if the hold outlasts the countdown. */
13
- export declare function useSessionHold({ pauseSession, pauseTimeoutSeconds, }: UseSessionHoldOptions): UseSessionHoldValue;
15
+ export declare function useSessionHold({ pauseSession, pauseTimeoutSeconds, captureMode, }: UseSessionHoldOptions): UseSessionHoldValue;
@@ -0,0 +1,2 @@
1
+ export declare function isHexColor(value: string): boolean;
2
+ export declare function brandForeground(accentColor: string): string;
@@ -3,6 +3,7 @@ export type { Module } from './context/LiveAgentContext';
3
3
  export * from './hooks/useAgentVoiceState';
4
4
  export * from './hooks/useElapsedSeconds';
5
5
  export * from './hooks/useIsLocalSpeaking';
6
+ export * from './hooks/useIsSessionHeld';
6
7
  export * from './hooks/useLiveAgent';
7
8
  export * from './hooks/useMediaControls';
8
9
  export * from './lib/agentMode';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.82.0",
3
+ "version": "0.84.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",