@skippr/live-agent-sdk 0.24.0 → 0.25.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 +20 -1
- package/dist/esm/lib-exports.js +979 -940
- package/dist/esm/logo-icon-cn8fyke6.png +0 -0
- package/dist/logo-icon-cn8fyke6.png +0 -0
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +139 -139
- package/dist/types/components/AutoStartMedia.d.ts +5 -0
- package/dist/types/components/ChatHeader.d.ts +1 -5
- package/dist/types/components/ChatInput.d.ts +2 -1
- package/dist/types/components/LiveAgent.d.ts +6 -1
- package/dist/types/components/LoadingDots.d.ts +5 -0
- package/dist/types/components/MessageList.d.ts +2 -1
- package/dist/types/components/ObservingBanner.d.ts +1 -0
- package/dist/types/components/SessionAgenda.d.ts +1 -3
- package/dist/types/components/Sidebar.d.ts +7 -1
- package/dist/types/components/StartSessionPrompt.d.ts +8 -0
- package/dist/types/components/ui/tooltip.d.ts +3 -1
- package/dist/types/context/LiveAgentContext.d.ts +4 -0
- package/dist/types/hooks/useAgentVoiceState.d.ts +9 -0
- package/dist/types/hooks/useElapsedSeconds.d.ts +1 -0
- package/dist/types/hooks/useIsLocalSpeaking.d.ts +1 -0
- package/dist/types/hooks/useMediaControls.d.ts +14 -0
- package/dist/types/hooks/useSession.d.ts +1 -0
- package/dist/types/hooks/useSessionRemaining.d.ts +1 -0
- package/dist/types/lib/assets.d.ts +1 -0
- package/dist/types/lib/constants.d.ts +1 -1
- package/dist/types/lib-exports.d.ts +5 -0
- package/package.json +1 -1
- package/dist/types/components/QuickActions.d.ts +0 -7
- package/dist/types/components/SettingsView.d.ts +0 -5
- package/dist/types/hooks/useQuestionUpdates.d.ts +0 -11
package/README.md
CHANGED
|
@@ -157,7 +157,6 @@ Any component rendered inside `<LiveAgent>` can use the `useLiveAgent` hook to a
|
|
|
157
157
|
```tsx
|
|
158
158
|
import { LiveAgent, useLiveAgent } from '@skippr/live-agent-sdk';
|
|
159
159
|
|
|
160
|
-
function ConnectionStatus() {
|
|
161
160
|
function ConnectionStatus() {
|
|
162
161
|
const { isConnected } = useLiveAgent();
|
|
163
162
|
|
|
@@ -192,6 +191,9 @@ Self-contained widget component. Renders a floating button that opens a sidebar
|
|
|
192
191
|
| `minimizable` | `boolean` | `true` | Whether the widget can be minimized |
|
|
193
192
|
| `defaultOpen` | `boolean` | `false` | Whether the panel starts open |
|
|
194
193
|
| `welcomeMessage` | `string` | — | Message shown on the minimized bubble |
|
|
194
|
+
| `startSessionLabel` | `string` | `'Talk to Skippr'` | Label for the start-session button |
|
|
195
|
+
| `autoFocusChat` | `boolean` | `true` | Whether the chat input auto-focuses when opened |
|
|
196
|
+
| `showObservingBanner` | `boolean` | `true` | Whether to show the "Skippr is observing this page" banner during screen share |
|
|
195
197
|
|
|
196
198
|
### `useLiveAgent()`
|
|
197
199
|
|
|
@@ -223,6 +225,23 @@ Hook for accessing session state and panel controls. Must be called within `<Liv
|
|
|
223
225
|
| `minimizePanel` | `() => void` | Minimize the widget |
|
|
224
226
|
| `setPosition` | `(position: 'left' \| 'right') => void` | Change widget position |
|
|
225
227
|
|
|
228
|
+
### Additional Hooks
|
|
229
|
+
|
|
230
|
+
All hooks must be called within `<LiveAgent>`.
|
|
231
|
+
|
|
232
|
+
| Hook | Returns | Description |
|
|
233
|
+
|------|---------|-------------|
|
|
234
|
+
| `useMediaControls()` | `{ isMuted, isScreenSharing, toggleMute, toggleScreenShare }` | Mic and screen share state and toggles |
|
|
235
|
+
| `useAgentVoiceState()` | `{ isSpeaking, isThinking }` | Agent voice activity state |
|
|
236
|
+
| `useIsLocalSpeaking()` | `boolean` | Whether the local user is currently speaking |
|
|
237
|
+
| `useElapsedSeconds(isRunning)` | `number` | Drift-safe elapsed seconds since the flag flipped to `true` |
|
|
238
|
+
|
|
239
|
+
### Utilities
|
|
240
|
+
|
|
241
|
+
| Export | Signature | Description |
|
|
242
|
+
|--------|-----------|-------------|
|
|
243
|
+
| `formatTime` | `(seconds: number) => string` | Format seconds as `mm:ss` |
|
|
244
|
+
|
|
226
245
|
### Global API (Script Tag)
|
|
227
246
|
|
|
228
247
|
Available on `window.Skippr` when using the script tag bundle.
|