@skippr/live-agent-sdk 0.111.0 → 0.112.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.
@@ -4,7 +4,7 @@ interface VoiceBarFrameProps {
4
4
  pos: BarPos;
5
5
  canFold: boolean;
6
6
  notifications: BarNotification[];
7
- onDrop: (pos: BarPos) => void;
7
+ onDrop: (pos: BarPos, widthPx: number) => void;
8
8
  setDragging: (dragging: boolean) => void;
9
9
  }
10
10
  export declare function VoiceBarFrame({ pos, canFold, notifications, onDrop, setDragging, }: VoiceBarFrameProps): import("react/jsx-runtime").JSX.Element;
@@ -207,7 +207,7 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
207
207
  commitLauncherDrop: (target: LauncherDropTarget) => void;
208
208
  popsDown: boolean;
209
209
  barPos: BarPos | null;
210
- setBarPos: (next: BarPos) => void;
210
+ setBarPos: (next: BarPos, widthPx: number) => void;
211
211
  launcherDock: BarDock;
212
212
  setLauncherDock: (next: BarDock) => void;
213
213
  panelExpanded: boolean;
@@ -1,4 +1,4 @@
1
- import { type BarPos } from '../lib/voiceBar';
1
+ import type { BarPos } from '../lib/voiceBar';
2
2
  type FollowerRef = React.RefObject<HTMLElement | null>;
3
3
  export declare function useVoiceBarDrag(containerRef: React.RefObject<HTMLElement | null>, onDrop: (pos: BarPos) => void, followRefs?: FollowerRef[] | null, reportDragging?: (dragging: boolean) => void): {
4
4
  wasDraggedRef: React.RefObject<boolean>;
@@ -11,13 +11,18 @@ export interface BarPos {
11
11
  x: number;
12
12
  y: number;
13
13
  }
14
+ export interface BarPosRatio {
15
+ xRatio: number;
16
+ yRatio: number;
17
+ }
14
18
  export type DockKind = 'launcher';
15
19
  export declare function isHorizontalEdge(edge: BarEdge): boolean;
16
20
  export declare function readSavedDock(kind: DockKind): BarDock | null;
17
21
  export declare function persistDock(kind: DockKind, dock: BarDock): void;
18
22
  export declare function readSavedBarPos(): BarPos | null;
23
+ export declare function barPosRatio(pos: BarPos): BarPosRatio;
19
24
  export declare function persistBarPos(pos: BarPos): void;
20
- export declare function clampBarPos(pos: BarPos): BarPos;
25
+ export declare function clampBarPos(pos: BarPos, widthPx: number): BarPos;
21
26
  export declare function barPopsDown(pos: BarPos): boolean;
22
27
  export declare function barLeftAligned(pos: BarPos): boolean;
23
28
  export declare function defaultBarPos(): BarPos;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.111.0",
3
+ "version": "0.112.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",