@skippr/live-agent-sdk 0.41.0 → 0.43.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 +8 -16
- package/dist/skippr-sdk.js +81 -81
- package/package.json +1 -1
- package/dist/types/lib/react-compat.d.ts +0 -26
package/dist/esm/lib-exports.js
CHANGED
|
@@ -1519,12 +1519,10 @@ var hasA11yProp = (props) => {
|
|
|
1519
1519
|
|
|
1520
1520
|
// ../../node_modules/.bun/lucide-react@1.8.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/context.js
|
|
1521
1521
|
import { createContext as createContext2, useContext, useMemo, createElement } from "react";
|
|
1522
|
-
"use client";
|
|
1523
1522
|
var LucideContext = createContext2({});
|
|
1524
1523
|
var useLucideContext = () => useContext(LucideContext);
|
|
1525
1524
|
|
|
1526
1525
|
// ../../node_modules/.bun/lucide-react@1.8.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/Icon.js
|
|
1527
|
-
"use client";
|
|
1528
1526
|
var Icon = forwardRef(({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
1529
1527
|
const {
|
|
1530
1528
|
size: contextSize = 24,
|
|
@@ -2037,16 +2035,10 @@ function HighlightOverlay() {
|
|
|
2037
2035
|
// src/components/MinimizedBubble.tsx
|
|
2038
2036
|
import { useEffect as useEffect7 } from "react";
|
|
2039
2037
|
|
|
2040
|
-
// src/lib/react-compat.ts
|
|
2041
|
-
import * as React from "react";
|
|
2042
|
-
function selectContextHook(use2, useContext3) {
|
|
2043
|
-
return use2 ?? useContext3;
|
|
2044
|
-
}
|
|
2045
|
-
var useContextValue = selectContextHook(React.use, React.useContext);
|
|
2046
|
-
|
|
2047
2038
|
// src/hooks/useLiveAgent.ts
|
|
2039
|
+
import { useContext as useContext2 } from "react";
|
|
2048
2040
|
function useLiveAgent() {
|
|
2049
|
-
const ctx =
|
|
2041
|
+
const ctx = useContext2(LiveAgentContext);
|
|
2050
2042
|
if (!ctx) {
|
|
2051
2043
|
throw new Error("useLiveAgent must be used within a <LiveAgent> provider");
|
|
2052
2044
|
}
|
|
@@ -2515,10 +2507,10 @@ function ShadowHost({ children }) {
|
|
|
2515
2507
|
}
|
|
2516
2508
|
|
|
2517
2509
|
// src/components/Sidebar.tsx
|
|
2518
|
-
import { useEffect as useEffect16 } from "react";
|
|
2510
|
+
import { useContext as useContext5, useEffect as useEffect16 } from "react";
|
|
2519
2511
|
|
|
2520
2512
|
// src/hooks/useCombinedMessages.ts
|
|
2521
|
-
import { useMemo as useMemo4 } from "react";
|
|
2513
|
+
import { useContext as useContext3, useMemo as useMemo4 } from "react";
|
|
2522
2514
|
|
|
2523
2515
|
// src/hooks/useChatMessages.ts
|
|
2524
2516
|
import { useChat, useLocalParticipant as useLocalParticipant4 } from "@livekit/components-react/hooks";
|
|
@@ -2586,7 +2578,7 @@ function useCombinedMessages() {
|
|
|
2586
2578
|
const { transcriptMessages } = useStreamingTranscript();
|
|
2587
2579
|
const { chatMessages, sendChatMessage, isSendingChat } = useChatMessages();
|
|
2588
2580
|
const { state: agentState } = useAgentVoiceState();
|
|
2589
|
-
const historyMessages =
|
|
2581
|
+
const historyMessages = useContext3(LiveAgentContext)?.historyMessages ?? [];
|
|
2590
2582
|
const liveMessages = useMemo4(() => {
|
|
2591
2583
|
if (chatMessages.length === 0)
|
|
2592
2584
|
return transcriptMessages;
|
|
@@ -2604,7 +2596,7 @@ function useCombinedMessages() {
|
|
|
2604
2596
|
}
|
|
2605
2597
|
|
|
2606
2598
|
// src/hooks/usePhaseUpdates.ts
|
|
2607
|
-
import { useCallback as useCallback6, useEffect as useEffect9 } from "react";
|
|
2599
|
+
import { useCallback as useCallback6, useContext as useContext4, useEffect as useEffect9 } from "react";
|
|
2608
2600
|
|
|
2609
2601
|
// src/hooks/useAgentState.ts
|
|
2610
2602
|
import { useRemoteParticipants } from "@livekit/components-react/hooks";
|
|
@@ -2660,7 +2652,7 @@ function parsePhases(json) {
|
|
|
2660
2652
|
function usePhaseUpdates() {
|
|
2661
2653
|
const parse = useCallback6(parsePhases, []);
|
|
2662
2654
|
const livePhases = useAgentState("phases", parse, []);
|
|
2663
|
-
const ctx =
|
|
2655
|
+
const ctx = useContext4(LiveAgentContext);
|
|
2664
2656
|
useEffect9(() => {
|
|
2665
2657
|
if (livePhases.length > 0)
|
|
2666
2658
|
ctx?.setPhasesSnapshot(livePhases);
|
|
@@ -3694,7 +3686,7 @@ function Sidebar({
|
|
|
3694
3686
|
agentMode,
|
|
3695
3687
|
agentControls
|
|
3696
3688
|
} = useLiveAgent();
|
|
3697
|
-
const internalCtx =
|
|
3689
|
+
const internalCtx = useContext5(LiveAgentContext);
|
|
3698
3690
|
const usesHostAuth = internalCtx?.usesHostAuth ?? false;
|
|
3699
3691
|
const authFailed = internalCtx?.authFailed ?? false;
|
|
3700
3692
|
const showAgenda = agentMode !== AGENT_MODE.AlwaysOn;
|