@skippr/live-agent-sdk 0.104.0 → 0.106.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.
@@ -1,3 +1,4 @@
1
+ export declare function hasFrameworkPointerHandler(element: Element): boolean;
1
2
  export declare function inferRole(element: Element): string | null;
2
3
  interface AccessibleNameOptions {
3
4
  quick?: boolean;
@@ -1,6 +1,7 @@
1
1
  interface AutoStartMediaProps {
2
2
  pendingScreenStream: MediaStream | null;
3
3
  pushOrTapMicMode?: boolean;
4
+ startMuted?: boolean;
4
5
  }
5
- export declare function AutoStartMedia({ pendingScreenStream, pushOrTapMicMode, }: AutoStartMediaProps): null;
6
+ export declare function AutoStartMedia({ pendingScreenStream, pushOrTapMicMode, startMuted, }: AutoStartMediaProps): null;
6
7
  export {};
@@ -3,6 +3,7 @@ export declare function shouldIncludeInSnapshot(element: Element): boolean;
3
3
  export declare function shouldIncludeInFirstFrame(element: Element): boolean;
4
4
  interface DomCaptureProps {
5
5
  pushOrTapMicMode?: boolean;
6
+ startMuted?: boolean;
6
7
  }
7
- export declare function DomCapture({ pushOrTapMicMode }: DomCaptureProps): null;
8
+ export declare function DomCapture({ pushOrTapMicMode, startMuted }: DomCaptureProps): null;
8
9
  export {};
@@ -1,5 +1,6 @@
1
1
  interface LogoProps {
2
2
  className?: string;
3
+ decorative?: boolean;
3
4
  }
4
- export declare function Logo({ className }: LogoProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Logo({ className, decorative }: LogoProps): import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  export declare const PROPERTIES_STYLE_ID = "skippr-tw-properties";
3
- export declare function ShadowHost({ children, accentColor, }: {
3
+ export declare function ShadowHost({ children, accentColor, className, }: {
4
4
  children: ReactNode;
5
5
  accentColor?: string | null;
6
+ className?: string | undefined;
6
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import type { PhaseStatus } from '../hooks/usePhaseUpdates';
2
+ import { type SplashIntent, type SplashSectionGlyph } from '../lib/constants';
3
+ import type { SplashPresentation } from '../lib/splashPresentation';
4
+ export interface SplashSectionView {
5
+ id: string;
6
+ title: string;
7
+ description: string;
8
+ iconUrl: string | null;
9
+ glyph: SplashSectionGlyph | null;
10
+ }
11
+ export interface SplashViewProps {
12
+ agentName: string;
13
+ presentation: SplashPresentation;
14
+ headerIconUrl: string | null;
15
+ sections: SplashSectionView[];
16
+ attributionVisible: boolean;
17
+ skipButtonVisible: boolean;
18
+ intent: SplashIntent;
19
+ lastCompletedPhase: PhaseStatus | null;
20
+ upcomingPhases: PhaseStatus[];
21
+ micEnabled: boolean;
22
+ startMuted: boolean;
23
+ screenEnabled: boolean | null;
24
+ enableMic: () => void;
25
+ toggleStartMuted: () => void;
26
+ enableScreen: () => void;
27
+ start: () => void;
28
+ dismiss: () => void;
29
+ }
30
+ export declare function SplashDefault({ agentName, presentation, headerIconUrl, sections, attributionVisible, skipButtonVisible, intent, lastCompletedPhase, upcomingPhases, micEnabled, startMuted, screenEnabled, enableMic, toggleStartMuted, enableScreen, start, dismiss, }: SplashViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface SplashOverlayProps {
2
+ width?: number | undefined;
3
+ maxHeight?: number | undefined;
4
+ }
5
+ export declare function SplashOverlay({ width, maxHeight }: SplashOverlayProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ export interface SplashScreenProps {
2
+ className?: string | undefined;
3
+ onDismiss?: (() => void) | undefined;
4
+ }
5
+ export declare function SplashScreen({ className, onDismiss }: SplashScreenProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,7 +1,7 @@
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 { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode, type PENDING_START_KIND } from '../lib/constants';
4
+ import { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode, type PENDING_START_KIND, type SplashCopy, type SplashSection, type SplashVariant } from '../lib/constants';
5
5
  import type { SessionStatus } from '../lib/sessionStatus';
6
6
  import type { BarPos } from '../lib/voiceBar';
7
7
  import type { Message } from '../types';
@@ -49,6 +49,16 @@ export interface BuddyAppearance {
49
49
  enabled: boolean;
50
50
  shape: BuddyShape;
51
51
  }
52
+ export interface SplashAppearance {
53
+ enabled: boolean;
54
+ variant: SplashVariant;
55
+ copy?: SplashCopy;
56
+ sections?: SplashSection[];
57
+ attributionVisible?: boolean;
58
+ skipButtonVisible?: boolean;
59
+ width?: number;
60
+ maxHeight?: number;
61
+ }
52
62
  export interface WidgetAppearance {
53
63
  accentColor: string | null;
54
64
  logoUrl: string | null;
@@ -56,6 +66,8 @@ export interface WidgetAppearance {
56
66
  verticalAlign: 'top' | 'middle' | 'bottom' | null;
57
67
  launcherMode: LauncherMode | null;
58
68
  buddy: BuddyAppearance | null;
69
+ splash: SplashAppearance | null;
70
+ splashIconUrls: Record<string, string> | null;
59
71
  }
60
72
  export interface IdleSessionHistory {
61
73
  messages: Message[];
@@ -140,8 +152,17 @@ export interface LiveAgentPublicValue {
140
152
  refetchModules: () => Promise<void>;
141
153
  selectModule: (id: string) => Promise<void>;
142
154
  textMode: boolean;
155
+ isSplashConfigured: boolean;
156
+ reopenSplash: () => void;
143
157
  }
144
158
  export interface LiveAgentContextValue extends LiveAgentPublicValue {
159
+ operatingModule: Module | null;
160
+ armScreenStream: (stream: MediaStream | null) => void;
161
+ startMuted: boolean;
162
+ setStartMuted: (muted: boolean) => void;
163
+ notifySplashMount: () => () => void;
164
+ splashDismissed: boolean;
165
+ dismissSplash: () => void;
145
166
  defaultAgentId: string | null;
146
167
  startDefaultSession: () => void;
147
168
  startPrimarySession: () => void;
@@ -23,6 +23,7 @@ export interface StartSessionOptions {
23
23
  adoptionGoalId?: string | undefined;
24
24
  autoStarted?: boolean | undefined;
25
25
  }
26
+ export declare function requestScreenShare(): Promise<MediaStream | null>;
26
27
  export declare function useSession({ captureMode, authToken, appKey, getUserToken, userToken, userContext, onStart, onStartError, onDisconnect, }: UseSessionParams): {
27
28
  connection: LiveKitConnection | null;
28
29
  shouldConnect: boolean;
@@ -38,6 +39,7 @@ export declare function useSession({ captureMode, authToken, appKey, getUserToke
38
39
  pauseTimeoutSeconds: number | null;
39
40
  historyMessages: Message[];
40
41
  pendingScreenStream: MediaStream | null;
42
+ armScreenStream: (stream: MediaStream | null) => void;
41
43
  bearerToken: string | null;
42
44
  authedFetch: AuthedFetch;
43
45
  authFailed: boolean;
@@ -0,0 +1,2 @@
1
+ import type { SplashViewProps } from '../components/SplashDefault';
2
+ export declare function useSplash(onDismiss?: (() => void) | undefined): SplashViewProps | null;
@@ -1,2 +1,3 @@
1
1
  export declare function isHexColor(value: string): boolean;
2
2
  export declare function brandForeground(accentColor: string): string;
3
+ export declare function brandOnWhite(accentColor: string): string;
@@ -75,9 +75,68 @@ export declare const LAUNCHER_MODE: {
75
75
  readonly Strip: "strip";
76
76
  readonly None: "none";
77
77
  readonly Custom: "custom";
78
+ readonly Template: "template";
78
79
  };
79
80
  export type LauncherMode = (typeof LAUNCHER_MODE)[keyof typeof LAUNCHER_MODE];
80
81
  export declare const DEFAULT_LAUNCHER_MODE: LauncherMode;
82
+ export type SplashVariant = 'default';
83
+ export declare const SPLASH_COPY_DEFAULTS: {
84
+ readonly howItWorksHeading: "How it works";
85
+ readonly lastAccomplishmentHeading: "Last accomplishment";
86
+ readonly upNextHeading: "Up next";
87
+ readonly mediaHeading: "Enable access to use";
88
+ readonly micLabel: "Microphone";
89
+ readonly micSubtext: "Talk to Skippr hands-free";
90
+ readonly screenLabel: "Screen access";
91
+ readonly screenSubtext: "Skippr sees your screen while the session runs";
92
+ readonly startCta: "Start with Skippr";
93
+ readonly continueCta: "Continue session";
94
+ readonly dismissLabel: "Skip for now";
95
+ };
96
+ export type SplashCopyKey = keyof typeof SPLASH_COPY_DEFAULTS;
97
+ export type SplashCopy = Partial<Record<SplashCopyKey, string>>;
98
+ export declare const SPLASH_SECTION_GLYPH: {
99
+ readonly Route: "route";
100
+ readonly Messages: "messages";
101
+ readonly Pointer: "pointer";
102
+ };
103
+ export type SplashSectionGlyph = (typeof SPLASH_SECTION_GLYPH)[keyof typeof SPLASH_SECTION_GLYPH];
104
+ export interface SplashSection {
105
+ id: string;
106
+ title?: string;
107
+ description?: string;
108
+ glyph?: SplashSectionGlyph;
109
+ }
110
+ export declare const DEFAULT_SPLASH_SECTIONS: readonly [{
111
+ readonly id: "9f2b1c4a-5d6e-4f70-8a91-b2c3d4e5f601";
112
+ readonly title: "Guides you step by step";
113
+ readonly description: "Walks you through each step, start to finish";
114
+ readonly glyph: "route";
115
+ }, {
116
+ readonly id: "9f2b1c4a-5d6e-4f70-8a91-b2c3d4e5f602";
117
+ readonly title: "Talk or type";
118
+ readonly description: "Ask by voice or in chat";
119
+ readonly glyph: "messages";
120
+ }, {
121
+ readonly id: "9f2b1c4a-5d6e-4f70-8a91-b2c3d4e5f603";
122
+ readonly title: "Ask it to click through for you";
123
+ readonly description: "Controls the environment for you";
124
+ readonly glyph: "pointer";
125
+ }];
126
+ export declare const SPLASH_HEADER_ICON_SLOT = "header";
127
+ export declare const SPLASH_WIDTH_MIN_PX = 320;
128
+ export declare const SPLASH_WIDTH_MAX_PX = 560;
129
+ export declare const DEFAULT_SPLASH_WIDTH_PX = 420;
130
+ export declare const SPLASH_MAX_HEIGHT_MIN_VH = 50;
131
+ export declare const SPLASH_MAX_HEIGHT_MAX_VH = 95;
132
+ export declare const DEFAULT_SPLASH_MAX_HEIGHT_VH = 90;
133
+ export declare const DEFAULT_SPLASH_ATTRIBUTION_VISIBLE = true;
134
+ export declare const DEFAULT_SPLASH_SKIP_BUTTON_VISIBLE = true;
135
+ export declare const SPLASH_INTENT: {
136
+ readonly Start: "start";
137
+ readonly Continue: "continue";
138
+ };
139
+ export type SplashIntent = (typeof SPLASH_INTENT)[keyof typeof SPLASH_INTENT];
81
140
  export declare const PUSH_TO_TALK_KEY = "Backquote";
82
141
  export declare const PUSH_TO_TALK_KEY_LABEL = "`";
83
142
  export declare const STOP_AGENT_KEY = "KeyX";
@@ -0,0 +1,20 @@
1
+ import type { SplashAppearance } from '../context/LiveAgentContext';
2
+ import { type SplashCopyKey, type SplashSection, type SplashSectionGlyph } from './constants';
3
+ export interface SplashPresentation {
4
+ copy: Record<SplashCopyKey, string>;
5
+ card: {
6
+ width: number;
7
+ maxHeight: number;
8
+ };
9
+ }
10
+ export interface ResolvedSplashSection {
11
+ id: string;
12
+ title: string;
13
+ description: string;
14
+ iconUrl: string | null;
15
+ glyph: SplashSectionGlyph | null;
16
+ }
17
+ export declare function resolveSplashSections(sections: SplashSection[] | null, iconUrls: Record<string, string> | null): ResolvedSplashSection[];
18
+ export declare function clampSplashWidth(width: number): number;
19
+ export declare function clampSplashMaxHeight(maxHeight: number): number;
20
+ export declare function resolveSplashPresentation(splash: SplashAppearance | null): SplashPresentation;
@@ -1,4 +1,6 @@
1
1
  export * from './components/LiveAgent';
2
+ export * from './components/SplashOverlay';
3
+ export * from './components/SplashScreen';
2
4
  export type { Module, UserContext } from './context/LiveAgentContext';
3
5
  export * from './hooks/useAgentVoiceState';
4
6
  export * from './hooks/useElapsedSeconds';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.104.0",
3
+ "version": "0.106.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",