@skippr/live-agent-sdk 0.106.0 → 0.108.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 +29 -3
- package/dist/esm/lib-exports.js +868 -558
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +152 -152
- package/dist/types/capture/snapdom.d.ts +0 -6
- package/dist/types/components/LogoMark.d.ts +6 -0
- package/dist/types/components/SplashAlwaysOn.d.ts +19 -0
- package/dist/types/components/SplashMediaSection.d.ts +11 -0
- package/dist/types/components/{SplashDefault.d.ts → SplashPrimary.d.ts} +1 -1
- package/dist/types/context/LiveAgentContext.d.ts +5 -3
- package/dist/types/hooks/useAdoptionGoals.d.ts +1 -0
- package/dist/types/hooks/useSplash.d.ts +9 -2
- package/dist/types/lib/constants.d.ts +9 -1
- package/dist/types/lib/splashStyles.d.ts +10 -0
- package/package.json +2 -2
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { SnapdomOptions } from '@zumer/snapdom';
|
|
2
2
|
export type SnapdomCaptureOptions = SnapdomOptions & {
|
|
3
|
-
clip?: 'viewport' | {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
3
|
snap?: unknown;
|
|
10
4
|
};
|
|
11
5
|
export declare function preCacheSnapshotResources(): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AdoptionGoalMatch } from '../context/LiveAgentContext';
|
|
2
|
+
import type { SplashPresentation } from '../lib/splashPresentation';
|
|
3
|
+
export interface SplashAlwaysOnViewProps {
|
|
4
|
+
agentName: string;
|
|
5
|
+
presentation: SplashPresentation;
|
|
6
|
+
headerIconUrl: string | null;
|
|
7
|
+
attributionVisible: boolean;
|
|
8
|
+
tips: AdoptionGoalMatch[];
|
|
9
|
+
micEnabled: boolean;
|
|
10
|
+
startMuted: boolean;
|
|
11
|
+
screenEnabled: boolean | null;
|
|
12
|
+
enableMic: () => void;
|
|
13
|
+
toggleStartMuted: () => void;
|
|
14
|
+
enableScreen: () => void;
|
|
15
|
+
startTip: (goal: AdoptionGoalMatch) => void;
|
|
16
|
+
start: () => void;
|
|
17
|
+
dismiss: () => void;
|
|
18
|
+
}
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SplashPresentation } from '../lib/splashPresentation';
|
|
2
|
+
export interface SplashMediaSectionProps {
|
|
3
|
+
copy: SplashPresentation['copy'];
|
|
4
|
+
micEnabled: boolean;
|
|
5
|
+
startMuted: boolean;
|
|
6
|
+
screenEnabled: boolean | null;
|
|
7
|
+
enableMic: () => void;
|
|
8
|
+
toggleStartMuted: () => void;
|
|
9
|
+
enableScreen: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function SplashMediaSection({ copy, micEnabled, startMuted, screenEnabled, enableMic, toggleStartMuted, enableScreen, }: SplashMediaSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,4 +27,4 @@ export interface SplashViewProps {
|
|
|
27
27
|
start: () => void;
|
|
28
28
|
dismiss: () => void;
|
|
29
29
|
}
|
|
30
|
-
export declare function
|
|
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;
|
|
@@ -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, type SplashCopy, type SplashSection
|
|
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
5
|
import type { SessionStatus } from '../lib/sessionStatus';
|
|
6
6
|
import type { BarPos } from '../lib/voiceBar';
|
|
7
7
|
import type { Message } from '../types';
|
|
@@ -51,11 +51,12 @@ export interface BuddyAppearance {
|
|
|
51
51
|
}
|
|
52
52
|
export interface SplashAppearance {
|
|
53
53
|
enabled: boolean;
|
|
54
|
-
variant:
|
|
54
|
+
variant: 'primary';
|
|
55
55
|
copy?: SplashCopy;
|
|
56
56
|
sections?: SplashSection[];
|
|
57
57
|
attributionVisible?: boolean;
|
|
58
|
-
|
|
58
|
+
startSkipButtonVisible?: boolean;
|
|
59
|
+
continueSkipButtonVisible?: boolean;
|
|
59
60
|
width?: number;
|
|
60
61
|
maxHeight?: number;
|
|
61
62
|
}
|
|
@@ -185,6 +186,7 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
185
186
|
hasResolvedModules: boolean;
|
|
186
187
|
appearance: WidgetAppearance | null;
|
|
187
188
|
adoptionGoals: AdoptionGoalMatch[];
|
|
189
|
+
hasResolvedAdoptionGoals: boolean;
|
|
188
190
|
startAdoptionSession: (goal: AdoptionGoalMatch) => void;
|
|
189
191
|
attendGoal: (goalId: string) => void;
|
|
190
192
|
setTextModeState: (enabled: boolean) => void;
|
|
@@ -7,6 +7,7 @@ interface UseAdoptionGoalsParams {
|
|
|
7
7
|
}
|
|
8
8
|
interface UseAdoptionGoalsResult {
|
|
9
9
|
goals: AdoptionGoalMatch[];
|
|
10
|
+
hasResolved: boolean;
|
|
10
11
|
attendGoal: (goalId: string) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare function useAdoptionGoals({ enabled, bearerToken, authedFetch, }: UseAdoptionGoalsParams): UseAdoptionGoalsResult;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { SplashAlwaysOnViewProps } from '../components/SplashAlwaysOn';
|
|
2
|
+
import type { SplashViewProps } from '../components/SplashPrimary';
|
|
3
|
+
import { SPLASH_LAYOUT } from '../lib/constants';
|
|
4
|
+
export type ResolvedSplash = ({
|
|
5
|
+
layout: typeof SPLASH_LAYOUT.Primary;
|
|
6
|
+
} & SplashViewProps) | ({
|
|
7
|
+
layout: typeof SPLASH_LAYOUT.AlwaysOn;
|
|
8
|
+
} & SplashAlwaysOnViewProps);
|
|
9
|
+
export declare function useSplash(onDismiss?: (() => void) | undefined): ResolvedSplash | null;
|
|
@@ -79,7 +79,11 @@ export declare const LAUNCHER_MODE: {
|
|
|
79
79
|
};
|
|
80
80
|
export type LauncherMode = (typeof LAUNCHER_MODE)[keyof typeof LAUNCHER_MODE];
|
|
81
81
|
export declare const DEFAULT_LAUNCHER_MODE: LauncherMode;
|
|
82
|
-
export
|
|
82
|
+
export declare const SPLASH_LAYOUT: {
|
|
83
|
+
readonly Primary: "primary";
|
|
84
|
+
readonly AlwaysOn: "always_on";
|
|
85
|
+
};
|
|
86
|
+
export type SplashLayout = (typeof SPLASH_LAYOUT)[keyof typeof SPLASH_LAYOUT];
|
|
83
87
|
export declare const SPLASH_COPY_DEFAULTS: {
|
|
84
88
|
readonly howItWorksHeading: "How it works";
|
|
85
89
|
readonly lastAccomplishmentHeading: "Last accomplishment";
|
|
@@ -92,6 +96,10 @@ export declare const SPLASH_COPY_DEFAULTS: {
|
|
|
92
96
|
readonly startCta: "Start with Skippr";
|
|
93
97
|
readonly continueCta: "Continue session";
|
|
94
98
|
readonly dismissLabel: "Skip for now";
|
|
99
|
+
readonly tipsHeading: "Tips";
|
|
100
|
+
readonly tipsCta: "Need help with something else?";
|
|
101
|
+
readonly tipsEmptyTitle: "Ask about this page";
|
|
102
|
+
readonly tipsEmptyDescription: "Get instant answers about anything you see here";
|
|
95
103
|
};
|
|
96
104
|
export type SplashCopyKey = keyof typeof SPLASH_COPY_DEFAULTS;
|
|
97
105
|
export type SplashCopy = Partial<Record<SplashCopyKey, string>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const SECTION_HEADING = "skippr:text-[11px] skippr:font-semibold skippr:uppercase skippr:tracking-[0.05em] skippr:text-[#6b6875]";
|
|
2
|
+
export declare const SECTION_BLOCK = "skippr:mt-[6px] skippr:flex skippr:flex-col skippr:gap-[14px] skippr:first:mt-0";
|
|
3
|
+
export declare const ICON_TILE = "skippr:flex skippr:size-[38px] skippr:shrink-0 skippr:items-center skippr:justify-center skippr:rounded-[11px] skippr:bg-[#f2f0eb] skippr:text-[#2D2D3F]";
|
|
4
|
+
export declare const ICON_TILE_BRAND = "skippr:flex skippr:size-[38px] skippr:shrink-0 skippr:items-center skippr:justify-center skippr:rounded-[11px] skippr:bg-primary skippr:text-primary-foreground";
|
|
5
|
+
export declare const ROW_TEXT = "skippr:flex skippr:min-w-0 skippr:flex-col skippr:gap-px";
|
|
6
|
+
export declare const ROW_TITLE = "skippr:text-[14px] skippr:font-medium skippr:text-[#2D2D3F]";
|
|
7
|
+
export declare const ROW_SUBTEXT = "skippr:text-[12px] skippr:text-[#6b6875]";
|
|
8
|
+
export declare const ROW_ICON = "skippr:size-[17px]";
|
|
9
|
+
export declare const ROW_ICON_STROKE = 1.8;
|
|
10
|
+
export declare const FOCUS_RING = "skippr:focus-visible:outline-2 skippr:focus-visible:outline-offset-2 skippr:focus-visible:outline-[var(--skippr-brand)]";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skippr/live-agent-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/esm/lib-exports.js",
|
|
6
6
|
"module": "dist/esm/lib-exports.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"release": "release-it"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@zumer/snapdom": "2.
|
|
37
|
+
"@zumer/snapdom": "2.23.1",
|
|
38
38
|
"clsx": "2.1.1",
|
|
39
39
|
"lucide-react": "1.8.0",
|
|
40
40
|
"tailwind-merge": "3.5.0"
|