@skippr/live-agent-sdk 0.27.0 → 0.29.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,11 @@
1
+ interface AccessibilityTreeResult {
2
+ pageContent: string;
3
+ viewport: {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ refCount: number;
8
+ truncated: boolean;
9
+ }
10
+ export declare function buildAccessibilityTree(): AccessibilityTreeResult;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare function inferRole(element: Element): string | null;
2
+ interface AccessibleNameOptions {
3
+ quick?: boolean;
4
+ }
5
+ export declare function accessibleName(element: Element, options?: AccessibleNameOptions): string;
6
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { LocalParticipant } from 'livekit-client';
2
+ export type DomEvent = {
3
+ type: 'click';
4
+ ref: string | null;
5
+ role: string;
6
+ name: string;
7
+ timestamp: number;
8
+ } | {
9
+ type: 'navigation';
10
+ from: string;
11
+ to: string;
12
+ title: string;
13
+ timestamp: number;
14
+ } | {
15
+ type: 'submit';
16
+ ref: string | null;
17
+ formName: string;
18
+ action: string;
19
+ timestamp: number;
20
+ } | {
21
+ type: 'mutation';
22
+ summary: string;
23
+ addedRefs: string[];
24
+ removedRefs: string[];
25
+ timestamp: number;
26
+ };
27
+ interface DomEventListenerOptions {
28
+ onTriggerEvent?: () => void;
29
+ }
30
+ export declare function installDomEventListeners(localParticipant: LocalParticipant, options?: DomEventListenerOptions): () => void;
31
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { SnapdomOptions } from '@zumer/snapdom';
2
+ export declare function snapToCanvas(element: Element, options?: SnapdomOptions): Promise<HTMLCanvasElement>;
@@ -0,0 +1 @@
1
+ export declare function DomCapture(): null;
@@ -0,0 +1 @@
1
+ export declare function HighlightOverlay(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
- interface LiveAgentProps {
2
+ import { type AgentControls } from '../context/LiveAgentContext';
3
+ interface LiveAgentBaseProps {
3
4
  agentId: string;
4
5
  authToken?: string | undefined;
5
6
  appKey?: string | undefined;
@@ -16,5 +17,12 @@ interface LiveAgentProps {
16
17
  showAgentStateBanner?: boolean;
17
18
  children?: ReactNode;
18
19
  }
19
- export declare function LiveAgent({ agentId, authToken: authTokenProp, appKey, userToken, position, variant, minimizable, defaultOpen, welcomeMessage, hideControls, hideHeader, startSessionLabel, autoFocusChat, showAgentStateBanner, children, }: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
20
+ export type LiveAgentProps = (LiveAgentBaseProps & {
21
+ captureMode?: 'screenshare' | undefined;
22
+ agentControls?: never;
23
+ }) | (LiveAgentBaseProps & {
24
+ captureMode: 'auto';
25
+ agentControls?: AgentControls | undefined;
26
+ });
27
+ export declare function LiveAgent(props: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
20
28
  export {};
@@ -1,5 +1,6 @@
1
1
  interface MeetingControlsProps {
2
2
  onHangUp: () => void;
3
+ showScreenShareToggle?: boolean;
3
4
  }
4
- export declare function MeetingControls({ onHangUp }: MeetingControlsProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function MeetingControls({ onHangUp, showScreenShareToggle }: MeetingControlsProps): import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -1,4 +1,8 @@
1
1
  export type SidebarTab = 'chat' | 'agenda';
2
+ export type CaptureMode = 'screenshare' | 'auto';
3
+ export interface AgentControls {
4
+ highlight?: boolean;
5
+ }
2
6
  export interface LiveAgentPublicValue {
3
7
  isConnected: boolean;
4
8
  isStarting: boolean;
@@ -27,6 +31,8 @@ export interface LiveAgentPublicValue {
27
31
  sidebarTab: SidebarTab;
28
32
  setSidebarTab: (tab: SidebarTab) => void;
29
33
  autoFocusChat: boolean;
34
+ captureMode: CaptureMode;
35
+ agentControls?: AgentControls | undefined;
30
36
  }
31
37
  export interface LiveAgentContextValue extends LiveAgentPublicValue {
32
38
  connection: {
@@ -1,4 +1,4 @@
1
- import { useVoiceAssistant } from '@livekit/components-react';
1
+ import { useVoiceAssistant } from '@livekit/components-react/hooks';
2
2
  export type AgentState = ReturnType<typeof useVoiceAssistant>['state'];
3
3
  export interface UseAgentVoiceStateValue {
4
4
  state: AgentState;
@@ -1,14 +1,17 @@
1
+ import type { AgentControls, CaptureMode } from '../context/LiveAgentContext';
1
2
  interface LiveKitConnection {
2
3
  livekitUrl: string;
3
4
  token: string;
4
5
  }
5
6
  interface UseSessionParams {
6
7
  agentId: string;
8
+ captureMode?: CaptureMode | undefined;
9
+ agentControls?: AgentControls | undefined;
7
10
  authToken?: string | undefined;
8
11
  appKey?: string | undefined;
9
12
  userToken?: string | undefined;
10
13
  }
11
- export declare function useSession({ agentId, authToken, appKey, userToken }: UseSessionParams): {
14
+ export declare function useSession({ agentId, captureMode, agentControls, authToken, appKey, userToken, }: UseSessionParams): {
12
15
  connection: LiveKitConnection | null;
13
16
  shouldConnect: boolean;
14
17
  isStarting: boolean;
@@ -1 +1,8 @@
1
1
  export declare const SIDEBAR_WIDTH = 360;
2
+ export declare const WIDGET_ROOT_ID = "skippr-sdk-root";
3
+ export declare const REF_ATTR = "data-skippr-ref";
4
+ export declare const PRIVATE_ATTR = "data-skippr-private";
5
+ export declare const DOM_SNAPSHOT_TOPIC = "skippr.dom-snapshot";
6
+ export declare const DOM_EVENTS_TOPIC = "skippr.dom-events";
7
+ export declare const HIGHLIGHT_TOPIC = "skippr.highlight";
8
+ export declare const NAME_MAX_CHARS = 80;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.27.0",
3
+ "version": "0.29.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",
@@ -31,6 +31,7 @@
31
31
  "release": "release-it"
32
32
  },
33
33
  "dependencies": {
34
+ "@zumer/snapdom": "^2.9.0",
34
35
  "clsx": "2.1.1",
35
36
  "lucide-react": "1.8.0",
36
37
  "tailwind-merge": "3.5.0"