@skippr/live-agent-sdk 0.90.0 → 0.92.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/dist/esm/lib-exports.js +1801 -1318
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +125 -125
- package/dist/types/buddy/BuddyFamilyFace.d.ts +10 -0
- package/dist/types/buddy/buddy.d.ts +17 -0
- package/dist/types/buddy/hooks/useBuddyEdgeDrag.d.ts +14 -0
- package/dist/types/buddy/shapes/colorful.d.ts +2 -2
- package/dist/types/capture/highlightSignal.d.ts +5 -0
- package/dist/types/hooks/useHighlightControl.d.ts +6 -0
- package/dist/types/lib/constants.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface FamilyFaceProps {
|
|
2
|
+
eyeDx: number;
|
|
3
|
+
eyeDy: number;
|
|
4
|
+
asleep: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function ColorfulFace({ eyeDx, eyeDy, asleep, animated, }: FamilyFaceProps & {
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function PixelFace({ eyeDx, eyeDy, asleep }: FamilyFaceProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { AgentControls, WidgetAppearance } from '../context/LiveAgentContext';
|
|
2
2
|
export declare const SKIPPR_BUDDY_POS_KEY = "skippr_buddy_pos";
|
|
3
|
+
export declare const SKIPPR_BUDDY_EDGE_KEY = "skippr_buddy_edge";
|
|
3
4
|
export declare const BUDDY_SLEEP_MS = 14000;
|
|
4
5
|
export declare const BUDDY_HAPPY_MS = 1300;
|
|
5
6
|
export declare const BUDDY_SIZE_PX = 96;
|
|
6
7
|
export declare const BUDDY_EDGE_MARGIN_PX = 16;
|
|
7
8
|
export declare const BUDDY_DRAG_THRESHOLD_PX = 5;
|
|
9
|
+
export type BuddyEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
10
|
+
export interface BuddyEdgePos {
|
|
11
|
+
edge: BuddyEdge;
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function isVerticalEdge(edge: BuddyEdge): boolean;
|
|
8
16
|
export interface BuddyPos {
|
|
9
17
|
x: number;
|
|
10
18
|
y: number;
|
|
@@ -18,3 +26,12 @@ export declare function seedBuddyPosFromAppearance(position: 'left' | 'right' |
|
|
|
18
26
|
innerWidth: number;
|
|
19
27
|
innerHeight: number;
|
|
20
28
|
}, sizePx?: number): BuddyPos;
|
|
29
|
+
export declare function clampBuddyTop(top: number, sizePx?: number): number;
|
|
30
|
+
export declare function clampBuddyLeft(left: number, sizePx?: number): number;
|
|
31
|
+
export declare function nearestBuddyEdge(pointerX: number, pointerY: number): BuddyEdge;
|
|
32
|
+
export declare function readSavedBuddyEdgePos(sizePx?: number): BuddyEdgePos | null;
|
|
33
|
+
export declare function persistBuddyEdgePos(pos: BuddyEdgePos): void;
|
|
34
|
+
export declare function seedBuddyEdgePosFromAppearance(position: 'left' | 'right' | null, verticalAlign: 'top' | 'middle' | 'bottom' | null, viewport: {
|
|
35
|
+
innerWidth: number;
|
|
36
|
+
innerHeight: number;
|
|
37
|
+
}, sizePx?: number): BuddyEdgePos;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type BuddyEdgePos } from '../buddy';
|
|
2
|
+
export interface UseBuddyEdgeDragOptions {
|
|
3
|
+
appearancePosition: 'left' | 'right' | null;
|
|
4
|
+
appearanceVerticalAlign: 'top' | 'middle' | 'bottom' | null;
|
|
5
|
+
sizePx?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UseBuddyEdgeDragValue {
|
|
8
|
+
pos: BuddyEdgePos;
|
|
9
|
+
isDragging: boolean;
|
|
10
|
+
startDrag: (event: React.PointerEvent) => {
|
|
11
|
+
didDrag: () => boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function useBuddyEdgeDrag({ appearancePosition, appearanceVerticalAlign, sizePx, }: UseBuddyEdgeDragOptions): UseBuddyEdgeDragValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function BloomBody(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export declare function WobbleBody(): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function SplatBody(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
4
|
+
export declare function PopBody(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function RoboBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function setHighlightActive(active: boolean): void;
|
|
2
|
+
export declare function isHighlightActive(): boolean;
|
|
3
|
+
export declare function subscribeHighlightActive(subscriber: (active: boolean) => void): () => void;
|
|
4
|
+
export declare function clearHighlight(): void;
|
|
5
|
+
export declare function onHighlightCleared(subscriber: () => void): () => void;
|
|
@@ -7,8 +7,8 @@ export declare const BUDDY_SHAPE: {
|
|
|
7
7
|
readonly Bloom: "bloom";
|
|
8
8
|
readonly Wobble: "wobble";
|
|
9
9
|
readonly Splat: "splat";
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
10
|
+
readonly Pop: "pop";
|
|
11
|
+
readonly Robo: "robo";
|
|
12
12
|
readonly Boulder: "boulder";
|
|
13
13
|
readonly Kite: "kite";
|
|
14
14
|
readonly Loaf: "loaf";
|