@skippr/live-agent-sdk 0.23.0 → 0.25.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.
Files changed (32) hide show
  1. package/README.md +20 -1
  2. package/dist/esm/lib-exports.js +979 -940
  3. package/dist/esm/logo-icon-cn8fyke6.png +0 -0
  4. package/dist/logo-icon-cn8fyke6.png +0 -0
  5. package/dist/skippr-sdk.css +1 -1
  6. package/dist/skippr-sdk.js +139 -139
  7. package/dist/types/components/AutoStartMedia.d.ts +5 -0
  8. package/dist/types/components/ChatHeader.d.ts +1 -5
  9. package/dist/types/components/ChatInput.d.ts +2 -1
  10. package/dist/types/components/LiveAgent.d.ts +6 -1
  11. package/dist/types/components/LoadingDots.d.ts +5 -0
  12. package/dist/types/components/MessageList.d.ts +2 -1
  13. package/dist/types/components/ObservingBanner.d.ts +1 -0
  14. package/dist/types/components/SessionAgenda.d.ts +1 -3
  15. package/dist/types/components/Sidebar.d.ts +7 -1
  16. package/dist/types/components/StartSessionPrompt.d.ts +8 -0
  17. package/dist/types/components/ui/tooltip.d.ts +3 -1
  18. package/dist/types/context/LiveAgentContext.d.ts +4 -0
  19. package/dist/types/hooks/useAgentVoiceState.d.ts +9 -0
  20. package/dist/types/hooks/useElapsedSeconds.d.ts +1 -0
  21. package/dist/types/hooks/useIsLocalSpeaking.d.ts +1 -0
  22. package/dist/types/hooks/useMediaControls.d.ts +14 -0
  23. package/dist/types/hooks/usePhaseUpdates.d.ts +1 -0
  24. package/dist/types/hooks/useSession.d.ts +1 -0
  25. package/dist/types/hooks/useSessionRemaining.d.ts +1 -0
  26. package/dist/types/lib/assets.d.ts +1 -0
  27. package/dist/types/lib/constants.d.ts +1 -1
  28. package/dist/types/lib-exports.d.ts +5 -0
  29. package/package.json +1 -1
  30. package/dist/types/components/QuickActions.d.ts +0 -7
  31. package/dist/types/components/SettingsView.d.ts +0 -5
  32. package/dist/types/hooks/useQuestionUpdates.d.ts +0 -11
@@ -0,0 +1,5 @@
1
+ interface AutoStartMediaProps {
2
+ pendingScreenStream: MediaStream | null;
3
+ }
4
+ export declare function AutoStartMedia({ pendingScreenStream }: AutoStartMediaProps): null;
5
+ export {};
@@ -1,5 +1 @@
1
- interface ChatHeaderProps {
2
- onOpenSettings: () => void;
3
- }
4
- export declare function ChatHeader({ onOpenSettings }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
1
+ export declare function ChatHeader(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  interface ChatInputProps {
2
2
  sendChatMessage: (message: string) => Promise<unknown>;
3
3
  isSendingChat: boolean;
4
+ autoFocus?: boolean;
4
5
  }
5
- export declare function ChatInput({ sendChatMessage, isSendingChat }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ChatInput({ sendChatMessage, isSendingChat, autoFocus }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -9,7 +9,12 @@ interface LiveAgentProps {
9
9
  minimizable?: boolean | undefined;
10
10
  defaultOpen?: boolean;
11
11
  welcomeMessage?: string | undefined;
12
+ hideControls?: boolean;
13
+ hideHeader?: boolean;
14
+ startSessionLabel?: string;
15
+ autoFocusChat?: boolean;
16
+ showObservingBanner?: boolean;
12
17
  children?: ReactNode;
13
18
  }
14
- export declare function LiveAgent({ agentId, authToken: authTokenProp, appKey, userToken, position, variant, minimizable, defaultOpen, welcomeMessage, children, }: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function LiveAgent({ agentId, authToken: authTokenProp, appKey, userToken, position, variant, minimizable, defaultOpen, welcomeMessage, hideControls, hideHeader, startSessionLabel, autoFocusChat, showObservingBanner, children, }: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
15
20
  export {};
@@ -0,0 +1,5 @@
1
+ interface LoadingDotsProps {
2
+ label: string;
3
+ }
4
+ export declare function LoadingDots({ label }: LoadingDotsProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -4,6 +4,7 @@ interface MessageListProps {
4
4
  isStreaming: boolean;
5
5
  sendChatMessage: (message: string) => Promise<unknown>;
6
6
  isSendingChat: boolean;
7
+ autoFocus?: boolean;
7
8
  }
8
- export declare function MessageList({ messages, isStreaming, sendChatMessage, isSendingChat, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MessageList({ messages, isStreaming, sendChatMessage, isSendingChat, autoFocus, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -0,0 +1 @@
1
+ export declare function ObservingBanner(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +1,6 @@
1
1
  import type { PhaseStatus } from '../hooks/usePhaseUpdates';
2
- import type { QuestionStatus } from '../hooks/useQuestionUpdates';
3
2
  interface SessionAgendaProps {
4
3
  phases: PhaseStatus[];
5
- questions?: QuestionStatus[];
6
4
  }
7
- export declare function SessionAgenda({ phases, questions }: SessionAgendaProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function SessionAgenda({ phases }: SessionAgendaProps): import("react/jsx-runtime").JSX.Element;
8
6
  export {};
@@ -1 +1,7 @@
1
- export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
1
+ interface SidebarProps {
2
+ hideControls?: boolean;
3
+ hideHeader?: boolean;
4
+ startSessionLabel?: string;
5
+ }
6
+ export declare function Sidebar({ hideControls, hideHeader, startSessionLabel, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ interface StartSessionPromptProps {
2
+ onStartSession: () => void;
3
+ isStarting?: boolean;
4
+ error?: string;
5
+ label?: string;
6
+ }
7
+ export declare function StartSessionPrompt({ onStartSession, isStarting, error, label, }: StartSessionPromptProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,8 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
+ type TooltipAlign = 'center' | 'start' | 'end';
2
3
  interface TooltipProps {
3
4
  label: string;
4
5
  children: ReactNode;
5
6
  position?: 'top' | 'bottom';
7
+ align?: TooltipAlign;
6
8
  }
7
- export declare function Tooltip({ label, children, position }: TooltipProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Tooltip({ label, children, position, align }: TooltipProps): import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -1,3 +1,4 @@
1
+ export type SidebarTab = 'chat' | 'agenda';
1
2
  export interface LiveAgentPublicValue {
2
3
  isConnected: boolean;
3
4
  isStarting: boolean;
@@ -23,6 +24,9 @@ export interface LiveAgentPublicValue {
23
24
  verifyOtp: (email: string, code: string) => Promise<void>;
24
25
  logoutAuth: () => void;
25
26
  isAuthSubmitting: boolean;
27
+ sidebarTab: SidebarTab;
28
+ setSidebarTab: (tab: SidebarTab) => void;
29
+ autoFocusChat: boolean;
26
30
  }
27
31
  export interface LiveAgentContextValue extends LiveAgentPublicValue {
28
32
  connection: {
@@ -0,0 +1,9 @@
1
+ import { useVoiceAssistant } from '@livekit/components-react';
2
+ type AgentState = ReturnType<typeof useVoiceAssistant>['state'];
3
+ export interface UseAgentVoiceStateValue {
4
+ state: AgentState;
5
+ isSpeaking: boolean;
6
+ isListening: boolean;
7
+ }
8
+ export declare function useAgentVoiceState(): UseAgentVoiceStateValue;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useElapsedSeconds(isRunning: boolean): number;
@@ -0,0 +1 @@
1
+ export declare function useIsLocalSpeaking(): boolean;
@@ -0,0 +1,14 @@
1
+ export declare const SCREEN_SHARE_OPTIONS: {
2
+ video: {
3
+ displaySurface: "browser";
4
+ };
5
+ resolution: import("livekit-client").VideoResolution;
6
+ contentHint: "detail";
7
+ };
8
+ export interface UseMediaControlsValue {
9
+ isMuted: boolean;
10
+ toggleMute: () => Promise<void>;
11
+ isScreenSharing: boolean;
12
+ toggleScreenShare: () => Promise<void>;
13
+ }
14
+ export declare function useMediaControls(): UseMediaControlsValue;
@@ -1,6 +1,7 @@
1
1
  export interface PhaseStatus {
2
2
  name: string;
3
3
  description: string;
4
+ highlights: string[];
4
5
  status: 'pending' | 'active' | 'completed';
5
6
  }
6
7
  export declare function usePhaseUpdates(): {
@@ -16,5 +16,6 @@ export declare function useSession({ agentId, authToken, appKey, userToken }: Us
16
16
  errorCode: number | null;
17
17
  startSession: () => Promise<void>;
18
18
  disconnect: () => Promise<void>;
19
+ pendingScreenStream: MediaStream | null;
19
20
  };
20
21
  export {};
@@ -0,0 +1 @@
1
+ export declare function useSessionRemaining(): number | null;
@@ -0,0 +1 @@
1
+ export declare const LOGO_URL: string;
@@ -1 +1 @@
1
- export declare const SIDEBAR_WIDTH = 480;
1
+ export declare const SIDEBAR_WIDTH = 360;
@@ -1,2 +1,7 @@
1
1
  export * from './components/LiveAgent';
2
+ export * from './hooks/useAgentVoiceState';
3
+ export * from './hooks/useElapsedSeconds';
4
+ export * from './hooks/useIsLocalSpeaking';
2
5
  export * from './hooks/useLiveAgent';
6
+ export * from './hooks/useMediaControls';
7
+ export * from './lib/format';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.23.0",
3
+ "version": "0.25.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
- interface QuickActionsProps {
2
- onStartSession: () => void;
3
- isStarting?: boolean;
4
- error?: string;
5
- }
6
- export declare function QuickActions({ onStartSession, isStarting, error }: QuickActionsProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,5 +0,0 @@
1
- interface SettingsViewProps {
2
- onBack: () => void;
3
- }
4
- export declare function SettingsView({ onBack }: SettingsViewProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,11 +0,0 @@
1
- export interface QuestionStatus {
2
- id: string;
3
- text: string;
4
- phaseName: string;
5
- required: boolean;
6
- status: 'unanswered' | 'answered';
7
- answer: string | null;
8
- }
9
- export declare function useQuestionUpdates(): {
10
- questions: QuestionStatus[];
11
- };