@skippr/live-agent-sdk 0.109.0 → 0.111.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.
- package/README.md +21 -22
- package/dist/esm/lib-exports.js +4208 -3755
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +154 -154
- package/dist/types/components/ConsentBubble.d.ts +2 -2
- package/dist/types/components/ConsentNotice.d.ts +2 -3
- package/dist/types/components/LiveAgent.d.ts +1 -0
- package/dist/types/components/Sidebar.d.ts +1 -1
- package/dist/types/components/SplashAlwaysOn.d.ts +6 -1
- package/dist/types/components/SplashOptOut.d.ts +5 -0
- package/dist/types/components/SplashOverlay.d.ts +3 -5
- package/dist/types/components/SplashPanel.d.ts +1 -0
- package/dist/types/components/SplashPrimary.d.ts +6 -1
- package/dist/types/components/SplashScreen.d.ts +1 -1
- package/dist/types/context/LiveAgentContext.d.ts +19 -5
- package/dist/types/hooks/useAvailableModules.d.ts +3 -1
- package/dist/types/hooks/useSplash.d.ts +2 -2
- package/dist/types/hooks/useSplashMedia.d.ts +14 -0
- package/dist/types/hooks/useSplashOverlayOptOut.d.ts +7 -0
- package/dist/types/lib/constants.d.ts +43 -1
- package/dist/types/lib/locale.d.ts +2 -0
- package/dist/types/lib/panelAnchor.d.ts +14 -0
- package/dist/types/lib/splashPresentation.d.ts +1 -0
- package/dist/types/lib/splashStyles.d.ts +3 -0
- package/dist/types/lib/splashSurfaces.d.ts +22 -0
- package/dist/types/lib/voiceBar.d.ts +1 -0
- package/dist/types/lib-exports.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface ConsentBubbleProps {
|
|
2
2
|
className?: string;
|
|
3
3
|
style?: React.CSSProperties;
|
|
4
|
-
|
|
4
|
+
template: string;
|
|
5
5
|
onPointerEnter?: React.PointerEventHandler<HTMLDivElement>;
|
|
6
6
|
onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
|
|
7
7
|
}
|
|
8
|
-
export declare function ConsentBubble({ className, style,
|
|
8
|
+
export declare function ConsentBubble({ className, style, template, onPointerEnter, onPointerLeave, }: ConsentBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
interface ConsentNoticeProps {
|
|
2
2
|
className?: string;
|
|
3
|
-
|
|
4
|
-
determiner?: string;
|
|
3
|
+
template: string;
|
|
5
4
|
}
|
|
6
|
-
export declare function ConsentNotice({ className,
|
|
5
|
+
export declare function ConsentNotice({ className, template }: ConsentNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -9,6 +9,7 @@ interface LiveAgentBaseProps {
|
|
|
9
9
|
getUserToken?: (() => Promise<string>) | undefined;
|
|
10
10
|
userToken?: string | undefined;
|
|
11
11
|
userContext?: UserContext | undefined;
|
|
12
|
+
locale?: string | undefined;
|
|
12
13
|
verticalAlign?: VerticalAlign | undefined;
|
|
13
14
|
variant?: 'floating' | 'sidebar' | undefined;
|
|
14
15
|
minimizable?: boolean | undefined;
|
|
@@ -3,5 +3,5 @@ interface SidebarProps {
|
|
|
3
3
|
hideHeader?: boolean;
|
|
4
4
|
startSessionLabel?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function Sidebar({ hideControls, hideHeader, startSessionLabel, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Sidebar({ hideControls, hideHeader, startSessionLabel, }: SidebarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
1
2
|
import type { AdoptionGoalMatch } from '../context/LiveAgentContext';
|
|
2
3
|
import type { SplashPresentation } from '../lib/splashPresentation';
|
|
3
4
|
export interface SplashAlwaysOnViewProps {
|
|
@@ -5,6 +6,7 @@ export interface SplashAlwaysOnViewProps {
|
|
|
5
6
|
presentation: SplashPresentation;
|
|
6
7
|
headerIconUrl: string | null;
|
|
7
8
|
attributionVisible: boolean;
|
|
9
|
+
optOutVisible: boolean;
|
|
8
10
|
tips: AdoptionGoalMatch[];
|
|
9
11
|
micEnabled: boolean;
|
|
10
12
|
startMuted: boolean;
|
|
@@ -15,5 +17,8 @@ export interface SplashAlwaysOnViewProps {
|
|
|
15
17
|
startTip: (goal: AdoptionGoalMatch) => void;
|
|
16
18
|
start: () => void;
|
|
17
19
|
dismiss: () => void;
|
|
20
|
+
optOutChecked: boolean;
|
|
21
|
+
toggleOptOut: () => void;
|
|
22
|
+
ctaRef?: Ref<HTMLButtonElement>;
|
|
18
23
|
}
|
|
19
|
-
export declare function SplashAlwaysOn({ agentName, presentation, headerIconUrl, attributionVisible, tips, micEnabled, startMuted, screenEnabled, enableMic, toggleStartMuted, enableScreen, startTip, start, dismiss, }: SplashAlwaysOnViewProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function SplashAlwaysOn({ agentName, presentation, headerIconUrl, attributionVisible, optOutVisible, tips, micEnabled, startMuted, screenEnabled, enableMic, toggleStartMuted, enableScreen, startTip, start, dismiss, optOutChecked, toggleOptOut, ctaRef, }: SplashAlwaysOnViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare function SplashOverlay({ width, maxHeight }: SplashOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
export declare const SPLASH_DIALOG_ATTRIBUTE = "data-skippr-splash";
|
|
2
|
+
export declare const BACKDROP_RESET_STYLE_ID = "skippr-splash-backdrop";
|
|
3
|
+
export declare function SplashOverlay(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SplashPanel(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
1
2
|
import type { PhaseStatus } from '../hooks/usePhaseUpdates';
|
|
2
3
|
import { type SplashIntent, type SplashSectionGlyph } from '../lib/constants';
|
|
3
4
|
import type { SplashPresentation } from '../lib/splashPresentation';
|
|
@@ -15,6 +16,7 @@ export interface SplashViewProps {
|
|
|
15
16
|
sections: SplashSectionView[];
|
|
16
17
|
attributionVisible: boolean;
|
|
17
18
|
skipButtonVisible: boolean;
|
|
19
|
+
optOutVisible: boolean;
|
|
18
20
|
intent: SplashIntent;
|
|
19
21
|
lastCompletedPhase: PhaseStatus | null;
|
|
20
22
|
upcomingPhases: PhaseStatus[];
|
|
@@ -26,5 +28,8 @@ export interface SplashViewProps {
|
|
|
26
28
|
enableScreen: () => void;
|
|
27
29
|
start: () => void;
|
|
28
30
|
dismiss: () => void;
|
|
31
|
+
optOutChecked: boolean;
|
|
32
|
+
toggleOptOut: () => void;
|
|
33
|
+
ctaRef?: Ref<HTMLButtonElement>;
|
|
29
34
|
}
|
|
30
|
-
export declare function SplashPrimary({ agentName, presentation, headerIconUrl, sections, attributionVisible, skipButtonVisible, intent, lastCompletedPhase, upcomingPhases, micEnabled, startMuted, screenEnabled, enableMic, toggleStartMuted, enableScreen, start, dismiss, }: SplashViewProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function SplashPrimary({ agentName, presentation, headerIconUrl, sections, attributionVisible, skipButtonVisible, optOutVisible, intent, lastCompletedPhase, upcomingPhases, micEnabled, startMuted, screenEnabled, enableMic, toggleStartMuted, enableScreen, start, dismiss, optOutChecked, toggleOptOut, ctaRef, }: SplashViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,4 +2,4 @@ export interface SplashScreenProps {
|
|
|
2
2
|
className?: string | undefined;
|
|
3
3
|
onDismiss?: (() => void) | undefined;
|
|
4
4
|
}
|
|
5
|
-
export declare function SplashScreen({ className, onDismiss }: SplashScreenProps): import("react/jsx-runtime").JSX.Element
|
|
5
|
+
export declare function SplashScreen({ className, onDismiss }: SplashScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { LauncherDropTarget } from '../hooks/useLauncherDrag';
|
|
2
2
|
import type { PhaseStatus } from '../hooks/usePhaseUpdates';
|
|
3
|
+
import type { SplashMedia } from '../hooks/useSplashMedia';
|
|
3
4
|
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, type SplashCopy, type SplashSection } from '../lib/constants';
|
|
5
|
+
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 SplashOverlayMode, type SplashSection, type SplashSurface } from '../lib/constants';
|
|
5
6
|
import type { SessionStatus } from '../lib/sessionStatus';
|
|
6
|
-
import type {
|
|
7
|
+
import type { SplashSurfaces } from '../lib/splashSurfaces';
|
|
8
|
+
import type { BarDock, BarPos } from '../lib/voiceBar';
|
|
7
9
|
import type { Message } from '../types';
|
|
8
10
|
export type SidebarTab = 'chat' | 'agenda';
|
|
9
11
|
export { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE, MIC_MODE, type MicMode };
|
|
@@ -13,6 +15,7 @@ export interface AgentControls {
|
|
|
13
15
|
actionPlanMode?: ActionPlanMode;
|
|
14
16
|
micMode?: MicMode;
|
|
15
17
|
chat?: ChatSurface;
|
|
18
|
+
showSplash?: boolean;
|
|
16
19
|
}
|
|
17
20
|
export type UserContext = Record<string, string | number | boolean>;
|
|
18
21
|
export interface UiPreferences {
|
|
@@ -52,11 +55,16 @@ export interface BuddyAppearance {
|
|
|
52
55
|
export interface SplashAppearance {
|
|
53
56
|
enabled: boolean;
|
|
54
57
|
variant: 'primary';
|
|
58
|
+
overlayMode?: SplashOverlayMode;
|
|
59
|
+
panelEnabled?: boolean;
|
|
60
|
+
launcherVisible?: boolean;
|
|
61
|
+
locale?: string;
|
|
55
62
|
copy?: SplashCopy;
|
|
56
63
|
sections?: SplashSection[];
|
|
57
64
|
attributionVisible?: boolean;
|
|
58
65
|
startSkipButtonVisible?: boolean;
|
|
59
66
|
continueSkipButtonVisible?: boolean;
|
|
67
|
+
overlayOptOutVisible?: boolean;
|
|
60
68
|
width?: number;
|
|
61
69
|
maxHeight?: number;
|
|
62
70
|
}
|
|
@@ -130,6 +138,7 @@ export interface LiveAgentPublicValue {
|
|
|
130
138
|
minimizable: boolean;
|
|
131
139
|
isMinimized: boolean;
|
|
132
140
|
expandPanel: () => void;
|
|
141
|
+
expandPanelForChat: () => void;
|
|
133
142
|
minimizePanel: () => void;
|
|
134
143
|
revealBar: () => void;
|
|
135
144
|
isAuthenticated: boolean;
|
|
@@ -157,13 +166,16 @@ export interface LiveAgentPublicValue {
|
|
|
157
166
|
reopenSplash: () => void;
|
|
158
167
|
}
|
|
159
168
|
export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
169
|
+
splashSurfaces: SplashSurfaces;
|
|
170
|
+
isSplashDismissed: boolean;
|
|
171
|
+
isLauncherHiddenBySplash: boolean;
|
|
160
172
|
operatingModule: Module | null;
|
|
161
173
|
armScreenStream: (stream: MediaStream | null) => void;
|
|
162
174
|
startMuted: boolean;
|
|
163
175
|
setStartMuted: (muted: boolean) => void;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
splashMedia: SplashMedia;
|
|
177
|
+
dismissSplash: (surface: SplashSurface) => void;
|
|
178
|
+
optOutOfSplashOverlay: () => void;
|
|
167
179
|
defaultAgentId: string | null;
|
|
168
180
|
startDefaultSession: () => void;
|
|
169
181
|
startPrimarySession: () => void;
|
|
@@ -196,6 +208,8 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
196
208
|
popsDown: boolean;
|
|
197
209
|
barPos: BarPos | null;
|
|
198
210
|
setBarPos: (next: BarPos) => void;
|
|
211
|
+
launcherDock: BarDock;
|
|
212
|
+
setLauncherDock: (next: BarDock) => void;
|
|
199
213
|
panelExpanded: boolean;
|
|
200
214
|
togglePanelExpanded: () => void;
|
|
201
215
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
@@ -5,15 +5,17 @@ interface UseAvailableModulesParams {
|
|
|
5
5
|
bearerToken: string | null;
|
|
6
6
|
authedFetch: AuthedFetch;
|
|
7
7
|
agentId?: string | undefined;
|
|
8
|
+
locale?: string | undefined;
|
|
8
9
|
}
|
|
9
10
|
interface UseAvailableModulesResult {
|
|
10
11
|
modules: Module[];
|
|
11
12
|
defaultSelection: ModuleDefault;
|
|
12
13
|
appearance: WidgetAppearance | null;
|
|
14
|
+
splashOverlayOptedOut: boolean;
|
|
13
15
|
isLoading: boolean;
|
|
14
16
|
hasResolved: boolean;
|
|
15
17
|
error: string | null;
|
|
16
18
|
refetch: () => Promise<void>;
|
|
17
19
|
}
|
|
18
|
-
export declare function useAvailableModules({ enabled, bearerToken, authedFetch, agentId, }: UseAvailableModulesParams): UseAvailableModulesResult;
|
|
20
|
+
export declare function useAvailableModules({ enabled, bearerToken, authedFetch, agentId, locale, }: UseAvailableModulesParams): UseAvailableModulesResult;
|
|
19
21
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { SplashAlwaysOnViewProps } from '../components/SplashAlwaysOn';
|
|
2
2
|
import type { SplashViewProps } from '../components/SplashPrimary';
|
|
3
|
-
import { SPLASH_LAYOUT } from '../lib/constants';
|
|
3
|
+
import { SPLASH_LAYOUT, type SplashSurface } from '../lib/constants';
|
|
4
4
|
export type ResolvedSplash = ({
|
|
5
5
|
layout: typeof SPLASH_LAYOUT.Primary;
|
|
6
6
|
} & SplashViewProps) | ({
|
|
7
7
|
layout: typeof SPLASH_LAYOUT.AlwaysOn;
|
|
8
8
|
} & SplashAlwaysOnViewProps);
|
|
9
|
-
export declare function useSplash(onDismiss?: (() => void) | undefined): ResolvedSplash | null;
|
|
9
|
+
export declare function useSplash(surface: SplashSurface, onDismiss?: (() => void) | undefined): ResolvedSplash | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface SplashMedia {
|
|
2
|
+
micEnabled: boolean;
|
|
3
|
+
screenEnabled: boolean;
|
|
4
|
+
enableMic: () => void;
|
|
5
|
+
enableScreen: () => void;
|
|
6
|
+
releaseScreen: () => void;
|
|
7
|
+
}
|
|
8
|
+
interface SplashMediaInputs {
|
|
9
|
+
armScreenStream: (stream: MediaStream | null) => void;
|
|
10
|
+
isSplashVisible: boolean;
|
|
11
|
+
isSessionLive: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function useSplashMedia({ armScreenStream, isSplashVisible, isSessionLive, }: SplashMediaInputs): SplashMedia;
|
|
14
|
+
export {};
|
|
@@ -63,6 +63,11 @@ export declare const CHAT_SURFACE: {
|
|
|
63
63
|
};
|
|
64
64
|
export type ChatSurface = (typeof CHAT_SURFACE)[keyof typeof CHAT_SURFACE];
|
|
65
65
|
export declare const DEFAULT_CHAT_SURFACE: ChatSurface;
|
|
66
|
+
export declare const PANEL_ENTRY: {
|
|
67
|
+
readonly Launcher: "launcher";
|
|
68
|
+
readonly Chat: "chat";
|
|
69
|
+
};
|
|
70
|
+
export type PanelEntry = (typeof PANEL_ENTRY)[keyof typeof PANEL_ENTRY];
|
|
66
71
|
export declare const ACTION_PLAN_MODE: {
|
|
67
72
|
readonly Always: "always";
|
|
68
73
|
readonly Auto: "auto";
|
|
@@ -75,7 +80,6 @@ export declare const LAUNCHER_MODE: {
|
|
|
75
80
|
readonly Strip: "strip";
|
|
76
81
|
readonly None: "none";
|
|
77
82
|
readonly Custom: "custom";
|
|
78
|
-
readonly Template: "template";
|
|
79
83
|
};
|
|
80
84
|
export type LauncherMode = (typeof LAUNCHER_MODE)[keyof typeof LAUNCHER_MODE];
|
|
81
85
|
export declare const DEFAULT_LAUNCHER_MODE: LauncherMode;
|
|
@@ -84,6 +88,28 @@ export declare const SPLASH_LAYOUT: {
|
|
|
84
88
|
readonly AlwaysOn: "always_on";
|
|
85
89
|
};
|
|
86
90
|
export type SplashLayout = (typeof SPLASH_LAYOUT)[keyof typeof SPLASH_LAYOUT];
|
|
91
|
+
export declare const SPLASH_OVERLAY_MODE: {
|
|
92
|
+
readonly Always: "always";
|
|
93
|
+
readonly UntilFirstSession: "until_first_session";
|
|
94
|
+
readonly Never: "never";
|
|
95
|
+
};
|
|
96
|
+
export type SplashOverlayMode = (typeof SPLASH_OVERLAY_MODE)[keyof typeof SPLASH_OVERLAY_MODE];
|
|
97
|
+
export declare const DEFAULT_SPLASH_OVERLAY_MODE: SplashOverlayMode;
|
|
98
|
+
export declare const DEFAULT_SPLASH_PANEL_ENABLED = false;
|
|
99
|
+
export declare const DEFAULT_SPLASH_LAUNCHER_VISIBLE = true;
|
|
100
|
+
export declare const DEFAULT_AGENT_SHOW_SPLASH = true;
|
|
101
|
+
export declare const SPLASH_SURFACE: {
|
|
102
|
+
readonly Overlay: "overlay";
|
|
103
|
+
readonly Panel: "panel";
|
|
104
|
+
readonly Host: "host";
|
|
105
|
+
};
|
|
106
|
+
export type SplashSurface = (typeof SPLASH_SURFACE)[keyof typeof SPLASH_SURFACE];
|
|
107
|
+
export declare const SKIPPR_OPEN_EVENT = "skippr:open";
|
|
108
|
+
export declare const CONSENT_TERMS_PLACEHOLDER = "{terms}";
|
|
109
|
+
export declare const CONSENT_PRIVACY_PLACEHOLDER = "{privacy}";
|
|
110
|
+
export declare const CONSENT_NOTICE_SESSION_START = "By starting a session, you agree to Skippr's {terms} & {privacy}";
|
|
111
|
+
export declare const CONSENT_NOTICE_CONTINUING = "By continuing, you agree to the {terms} & {privacy}";
|
|
112
|
+
export declare const CONSENT_NOTICE_AGENT_SESSION_START = "By starting the AI agent session, you agree to Skippr's {terms} & {privacy}";
|
|
87
113
|
export declare const SPLASH_COPY_DEFAULTS: {
|
|
88
114
|
readonly howItWorksHeading: "How it works";
|
|
89
115
|
readonly lastAccomplishmentHeading: "Last accomplishment";
|
|
@@ -96,10 +122,25 @@ export declare const SPLASH_COPY_DEFAULTS: {
|
|
|
96
122
|
readonly startCta: "Start with Skippr";
|
|
97
123
|
readonly continueCta: "Continue session";
|
|
98
124
|
readonly dismissLabel: "Skip for now";
|
|
125
|
+
readonly optOutLabel: "Don't show this again";
|
|
99
126
|
readonly tipsHeading: "Tips";
|
|
100
127
|
readonly tipsCta: "Need help with something else?";
|
|
101
128
|
readonly tipsEmptyTitle: "Ask about this page";
|
|
102
129
|
readonly tipsEmptyDescription: "Get instant answers about anything you see here";
|
|
130
|
+
readonly attributionPrefix: "AI Agent Powered by";
|
|
131
|
+
readonly closeLabel: "Close";
|
|
132
|
+
readonly mediaEnableAction: "Enable";
|
|
133
|
+
readonly mediaEnabledStatus: "Enabled";
|
|
134
|
+
readonly micMutedStatus: "Muted";
|
|
135
|
+
readonly screenRequiredStatus: "Required";
|
|
136
|
+
readonly muteMicAction: "Mute microphone";
|
|
137
|
+
readonly consentNotice: "By starting a session, you agree to Skippr's {terms} & {privacy}";
|
|
138
|
+
readonly sectionRouteTitle: "Guides you step by step";
|
|
139
|
+
readonly sectionRouteDescription: "Walks you through each step, start to finish";
|
|
140
|
+
readonly sectionMessagesTitle: "Talk or type";
|
|
141
|
+
readonly sectionMessagesDescription: "Ask by voice or in chat";
|
|
142
|
+
readonly sectionPointerTitle: "Ask it to click through for you";
|
|
143
|
+
readonly sectionPointerDescription: "Controls the environment for you";
|
|
103
144
|
};
|
|
104
145
|
export type SplashCopyKey = keyof typeof SPLASH_COPY_DEFAULTS;
|
|
105
146
|
export type SplashCopy = Partial<Record<SplashCopyKey, string>>;
|
|
@@ -140,6 +181,7 @@ export declare const SPLASH_MAX_HEIGHT_MAX_VH = 95;
|
|
|
140
181
|
export declare const DEFAULT_SPLASH_MAX_HEIGHT_VH = 90;
|
|
141
182
|
export declare const DEFAULT_SPLASH_ATTRIBUTION_VISIBLE = true;
|
|
142
183
|
export declare const DEFAULT_SPLASH_SKIP_BUTTON_VISIBLE = true;
|
|
184
|
+
export declare const DEFAULT_SPLASH_OVERLAY_OPT_OUT_VISIBLE = true;
|
|
143
185
|
export declare const SPLASH_INTENT: {
|
|
144
186
|
readonly Start: "start";
|
|
145
187
|
readonly Continue: "continue";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import { type BarDock, type BarPos } from './voiceBar';
|
|
3
|
+
export declare const PANEL_GAP_PX = 12;
|
|
4
|
+
export declare const PANEL_VIEWPORT_MARGIN_PX = 24;
|
|
5
|
+
export declare const PANEL_MAX_HEIGHT_PX = 460;
|
|
6
|
+
export interface PanelAnchor {
|
|
7
|
+
style: CSSProperties;
|
|
8
|
+
availableHeight: string;
|
|
9
|
+
popsDown: boolean;
|
|
10
|
+
isLeftAligned: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolvePanelAnchor(barPos: BarPos | null, widthPx: number): PanelAnchor;
|
|
13
|
+
export declare function resolveLauncherAnchor(dock: BarDock, widthPx: number): PanelAnchor;
|
|
14
|
+
export declare function panelTransformOrigin(popsDown: boolean, isLeftAligned: boolean): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SplashAppearance } from '../context/LiveAgentContext';
|
|
2
2
|
import { type SplashCopyKey, type SplashSection, type SplashSectionGlyph } from './constants';
|
|
3
3
|
export interface SplashPresentation {
|
|
4
|
+
locale: string;
|
|
4
5
|
copy: Record<SplashCopyKey, string>;
|
|
5
6
|
card: {
|
|
6
7
|
width: number;
|
|
@@ -8,3 +8,6 @@ export declare const ROW_SUBTEXT = "skippr:text-[12px] skippr:text-[#6b6875]";
|
|
|
8
8
|
export declare const ROW_ICON = "skippr:size-[17px]";
|
|
9
9
|
export declare const ROW_ICON_STROKE = 1.8;
|
|
10
10
|
export declare const FOCUS_RING = "skippr:focus-visible:outline-2 skippr:focus-visible:outline-offset-2 skippr:focus-visible:outline-[var(--skippr-brand)]";
|
|
11
|
+
export declare const FOOTER_LINK = "skippr:text-[12px] skippr:text-[#6b6875] skippr:focus-visible:outline-2 skippr:focus-visible:outline-offset-2 skippr:focus-visible:outline-[var(--skippr-brand)] skippr:mt-2 skippr:block skippr:w-full skippr:cursor-pointer skippr:py-1 skippr:text-center skippr:transition-colors skippr:hover:text-[#2D2D3F]";
|
|
12
|
+
export declare const CARD_SHELL = "skippr:flex skippr:w-full skippr:flex-col skippr:overflow-hidden";
|
|
13
|
+
export declare const CARD_FRAME = "skippr:rounded-[16px] skippr:bg-white skippr:shadow-[0_0_0_1px_rgba(45,45,63,0.10),0_1px_2px_rgba(45,45,63,0.04)]";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AgentControls, SplashAppearance } from '../context/LiveAgentContext';
|
|
2
|
+
import { type PanelEntry } from './constants';
|
|
3
|
+
export interface SplashSurfaces {
|
|
4
|
+
applies: boolean;
|
|
5
|
+
overlay: boolean;
|
|
6
|
+
panel: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SplashSurfaceInputs {
|
|
9
|
+
splash: SplashAppearance | null;
|
|
10
|
+
defaultAgentControls: AgentControls | null;
|
|
11
|
+
isRoomChat: boolean;
|
|
12
|
+
hasStartedSession: boolean;
|
|
13
|
+
isAuthenticated: boolean;
|
|
14
|
+
isLive: boolean;
|
|
15
|
+
overlayOptedOut: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const NO_SPLASH_SURFACES: SplashSurfaces;
|
|
18
|
+
export declare function resolveSplashSurfaces({ splash, defaultAgentControls, isRoomChat, hasStartedSession, isAuthenticated, isLive, overlayOptedOut, }: SplashSurfaceInputs): SplashSurfaces;
|
|
19
|
+
export declare function visibleSplashSurfaces(configured: SplashSurfaces, { pageDismissed, panelEntry }: {
|
|
20
|
+
pageDismissed: boolean;
|
|
21
|
+
panelEntry: PanelEntry;
|
|
22
|
+
}): SplashSurfaces;
|
|
@@ -2,6 +2,7 @@ export type BarEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
|
2
2
|
export declare const VOICE_BAR_EDGE_MARGIN_PX = 16;
|
|
3
3
|
export declare const VOICE_BAR_HEIGHT_PX = 46;
|
|
4
4
|
export declare const VOICE_BAR_WIDTH_PX = 255;
|
|
5
|
+
export declare const LAUNCHER_DOCK_THICKNESS_PX = 56;
|
|
5
6
|
export interface BarDock {
|
|
6
7
|
edge: BarEdge;
|
|
7
8
|
offsetPx: number;
|