@cuekit-ai/react 1.6.5 → 1.6.7

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.
@@ -23658,6 +23658,14 @@ function findDOMElementById(elementId) {
23658
23658
  }
23659
23659
 
23660
23660
  // src/utils/webrtc-service.ts
23661
+ function normalizeToNavigationCommand(message) {
23662
+ if (!message || typeof message !== "object") return message;
23663
+ if (message.type === "ai_intent" && message.data != null) return message;
23664
+ if ("actionType" in message && typeof message.actionType === "string") {
23665
+ return { type: "ai_intent", data: message };
23666
+ }
23667
+ return message;
23668
+ }
23661
23669
  var room = null;
23662
23670
  var reconnectTimeout = null;
23663
23671
  var serverUrl = WEBRTC_BACKEND_SERVER_URL || "https://api-webrtc.ansyr.ai";
@@ -23787,7 +23795,7 @@ function setupEventListeners() {
23787
23795
  try {
23788
23796
  const message = JSON.parse(jsonPart);
23789
23797
  console.log("\u{1F4E1} WebRTC Parsed JSON message:", message);
23790
- callbacks.onNavigationCommand?.(message);
23798
+ callbacks.onNavigationCommand?.(normalizeToNavigationCommand(message));
23791
23799
  } catch (error) {
23792
23800
  console.log("\u{1F4E1} WebRTC JSON parse error for JSON part:", error, "JSON part:", jsonPart);
23793
23801
  }
@@ -23796,7 +23804,7 @@ function setupEventListeners() {
23796
23804
  try {
23797
23805
  const message = JSON.parse(decodedPayload);
23798
23806
  console.log("\u{1F4E1} WebRTC Parsed message:", message);
23799
- callbacks.onNavigationCommand?.(message);
23807
+ callbacks.onNavigationCommand?.(normalizeToNavigationCommand(message));
23800
23808
  } catch (error) {
23801
23809
  console.log("\u{1F4E1} WebRTC JSON parse error:", error, "Raw payload:", decodedPayload);
23802
23810
  const message = decodedPayload;
package/dist/cuekit.css CHANGED
@@ -2,27 +2,42 @@
2
2
 
3
3
  /* Global CSS Variables for CueKit */
4
4
  :root {
5
- /* Light theme (default) */
5
+ /* Custom Color Palette - Purple */
6
+ --color-primary-25: #fafaff;
7
+ --color-primary-50: #f6f5ff;
8
+ --color-primary-100: #ecebff;
9
+ --color-primary-200: #dad7fe;
10
+ --color-primary-300: #c0bbfb;
11
+ --color-primary-400: #9a92f6;
12
+ --color-primary-500: #8177ed;
13
+ --color-primary-600: #6257d9;
14
+ --color-primary-700: #5447cd;
15
+ --color-primary-800: #42389e;
16
+ --color-primary-900: #38307d;
17
+ --color-primary-950: #241c5f;
18
+
19
+ /* Light theme (default) - Purple */
6
20
  --voice-bg: 0 0% 100%;
7
21
  --voice-surface: 0 0% 100%;
8
- --voice-border: 214.3 31.8% 91.4%;
22
+ --voice-border: 252 31% 91%;
9
23
  --voice-text: 222.2 84% 4.9%;
10
- --voice-text-muted: 215.4 16.3% 46.9%;
11
- --voice-accent: 200 98% 39%;
12
- --voice-accent-light: 200 98% 95%;
13
- --voice-user-bubble: 200 98% 39%;
24
+ --voice-text-muted: 252 16% 47%;
25
+ --voice-accent: 252 81% 60%;
26
+ --voice-accent-light: 252 100% 96%;
27
+ --voice-user-bubble: 252 81% 60%;
14
28
  --voice-user-text: 0 0% 100%;
15
29
  --voice-ai-bubble: 0 0% 100%;
16
30
  --voice-ai-text: 222.2 84% 4.9%;
17
- --indicator-bg: 200 98% 39%;
18
- --voice-placeholder: 215.4 16.3% 46.9%;
31
+ --indicator-bg: 252 81% 60%;
32
+ --voice-placeholder: 252 16% 47%;
19
33
 
20
- /* Gradients Light */
21
- --gradient-primary: linear-gradient(135deg, hsl(200 98% 39%), hsl(200 98% 50%));
22
- --gradient-surface: linear-gradient(180deg, hsl(0 0% 100%), hsl(210 40% 98%));
34
+ /* Gradients Light - Purple */
35
+ --gradient-primary: linear-gradient(135deg, hsl(252 81% 60%), hsl(252 88% 70%));
36
+ --gradient-surface: linear-gradient(180deg, hsl(0 0% 100%), hsl(252 40% 98%));
37
+ --gradient-mic-button: radial-gradient(circle at 50% 0%, hsl(252 88% 77%), hsl(252 66% 59%));
23
38
 
24
39
  /* Shadows Light */
25
- --shadow-soft: 0 4px 20px -2px hsl(200 98% 39% / 0.1);
40
+ --shadow-soft: 0 4px 20px -2px hsl(252 81% 60% / 0.1);
26
41
  --shadow-card: 0 10px 40px -10px hsl(0 0% 0% / 0.05);
27
42
  }
28
43
 
@@ -31,45 +46,47 @@
31
46
  .cuekit-voice-popup:not(.cuekit-dark) {
32
47
  --voice-bg: 0 0% 100%;
33
48
  --voice-surface: 0 0% 100%;
34
- --voice-border: 214.3 31.8% 91.4%;
49
+ --voice-border: 252 31% 91%;
35
50
  --voice-text: 222.2 84% 4.9%;
36
- --voice-text-muted: 215.4 16.3% 46.9%;
37
- --voice-accent: 200 98% 39%;
38
- --voice-accent-light: 200 98% 95%;
39
- --voice-user-bubble: 200 98% 39%;
51
+ --voice-text-muted: 252 16% 47%;
52
+ --voice-accent: 252 81% 60%;
53
+ --voice-accent-light: 252 100% 96%;
54
+ --voice-user-bubble: 252 81% 60%;
40
55
  --voice-user-text: 0 0% 100%;
41
56
  --voice-ai-bubble: 0 0% 100%;
42
57
  --voice-ai-text: 222.2 84% 4.9%;
43
- --indicator-bg: 200 98% 39%;
44
- --voice-placeholder: 215.4 16.3% 46.9%;
45
- --gradient-primary: linear-gradient(135deg, hsl(200 98% 39%), hsl(200 98% 50%));
46
- --gradient-surface: linear-gradient(180deg, hsl(0 0% 100%), hsl(210 40% 98%));
47
- --shadow-soft: 0 4px 20px -2px hsl(200 98% 39% / 0.1);
58
+ --indicator-bg: 252 81% 60%;
59
+ --voice-placeholder: 252 16% 47%;
60
+ --gradient-primary: linear-gradient(135deg, hsl(252 81% 60%), hsl(252 88% 70%));
61
+ --gradient-surface: linear-gradient(180deg, hsl(0 0% 100%), hsl(252 40% 98%));
62
+ --gradient-mic-button: radial-gradient(circle at 50% 0%, hsl(252 88% 77%), hsl(252 66% 59%));
63
+ --shadow-soft: 0 4px 20px -2px hsl(252 81% 60% / 0.1);
48
64
  --shadow-card: 0 10px 40px -10px hsl(0 0% 0% / 0.05);
49
65
  }
50
66
 
51
67
  .cuekit-voice-popup.cuekit-dark {
52
- /* Dark theme */
53
- --voice-bg: 211 32% 11%;
54
- --voice-surface: 217.2 32.6% 17.5%;
55
- --voice-border: 217.2 32.6% 17.5%;
56
- --voice-text: 210 40% 98%;
57
- --voice-text-muted: 215 20.2% 65.1%;
58
- --voice-accent: 200 98% 60%;
59
- --voice-accent-light: 200 98% 20%;
60
- --voice-user-bubble: 200.12 80.39% 60%;
68
+ /* Dark theme - Purple */
69
+ --voice-bg: 248 35% 11%;
70
+ --voice-surface: 248 32% 17.5%;
71
+ --voice-border: 248 32% 22%;
72
+ --voice-text: 252 40% 98%;
73
+ --voice-text-muted: 252 20% 65%;
74
+ --voice-accent: 252 88% 70%;
75
+ --voice-accent-light: 252 47% 25%;
76
+ --voice-user-bubble: 252 88% 70%;
61
77
  --voice-user-text: 0 0% 100%;
62
- --voice-ai-bubble: 200.57 32.71% 20.98%;
78
+ --voice-ai-bubble: 252 32% 21%;
63
79
  --voice-ai-text: 0 0% 100%;
64
- --indicator-bg: 200.12 80.39% 60%;
65
- --voice-placeholder: 215 20.2% 65.1%;
80
+ --indicator-bg: 252 88% 70%;
81
+ --voice-placeholder: 252 20% 65%;
66
82
 
67
- /* Gradients Dark */
68
- --gradient-primary: linear-gradient(135deg, hsl(200 98% 60%), hsl(200 98% 70%));
69
- --gradient-surface: linear-gradient(180deg, hsl(217.2 32.6% 17.5%), hsl(211 32% 11%));
83
+ /* Gradients Dark - Purple */
84
+ --gradient-primary: linear-gradient(135deg, hsl(252 88% 70%), hsl(252 88% 77%));
85
+ --gradient-surface: linear-gradient(180deg, hsl(248 32% 17.5%), hsl(248 35% 11%));
86
+ --gradient-mic-button: radial-gradient(circle at 50% 0%, hsl(252 88% 77%), hsl(252 59% 54%));
70
87
 
71
88
  /* Shadows Dark */
72
- --shadow-soft: 0 4px 20px -2px hsl(200 98% 60% / 0.2);
89
+ --shadow-soft: 0 4px 20px -2px hsl(252 88% 70% / 0.2);
73
90
  --shadow-card: 0 10px 40px -10px hsl(0 0% 0% / 0.3);
74
91
  }
75
92
 
package/dist/index.d.mts CHANGED
@@ -85,6 +85,7 @@ type MicButtonProps = {
85
85
  language?: Language;
86
86
  defaultLanguage?: Language;
87
87
  onLanguageChange?: (language: Language) => void;
88
+ showLanguageDropdown?: boolean;
88
89
  };
89
90
 
90
91
  declare const MicButton: React__default.FC<MicButtonProps>;
package/dist/index.d.ts CHANGED
@@ -85,6 +85,7 @@ type MicButtonProps = {
85
85
  language?: Language;
86
86
  defaultLanguage?: Language;
87
87
  onLanguageChange?: (language: Language) => void;
88
+ showLanguageDropdown?: boolean;
88
89
  };
89
90
 
90
91
  declare const MicButton: React__default.FC<MicButtonProps>;
package/dist/index.js CHANGED
@@ -23682,6 +23682,14 @@ __export(webrtc_service_exports, {
23682
23682
  setServerUrl: () => setServerUrl,
23683
23683
  setWebRTCCallbacks: () => setWebRTCCallbacks
23684
23684
  });
23685
+ function normalizeToNavigationCommand(message) {
23686
+ if (!message || typeof message !== "object") return message;
23687
+ if (message.type === "ai_intent" && message.data != null) return message;
23688
+ if ("actionType" in message && typeof message.actionType === "string") {
23689
+ return { type: "ai_intent", data: message };
23690
+ }
23691
+ return message;
23692
+ }
23685
23693
  function setServerUrl(url) {
23686
23694
  serverUrl = url;
23687
23695
  }
@@ -23803,7 +23811,7 @@ function setupEventListeners() {
23803
23811
  try {
23804
23812
  const message = JSON.parse(jsonPart);
23805
23813
  console.log("\u{1F4E1} WebRTC Parsed JSON message:", message);
23806
- callbacks.onNavigationCommand?.(message);
23814
+ callbacks.onNavigationCommand?.(normalizeToNavigationCommand(message));
23807
23815
  } catch (error) {
23808
23816
  console.log("\u{1F4E1} WebRTC JSON parse error for JSON part:", error, "JSON part:", jsonPart);
23809
23817
  }
@@ -23812,7 +23820,7 @@ function setupEventListeners() {
23812
23820
  try {
23813
23821
  const message = JSON.parse(decodedPayload);
23814
23822
  console.log("\u{1F4E1} WebRTC Parsed message:", message);
23815
- callbacks.onNavigationCommand?.(message);
23823
+ callbacks.onNavigationCommand?.(normalizeToNavigationCommand(message));
23816
23824
  } catch (error) {
23817
23825
  console.log("\u{1F4E1} WebRTC JSON parse error:", error, "Raw payload:", decodedPayload);
23818
23826
  const message = decodedPayload;
@@ -25250,12 +25258,14 @@ var AnsyrProvider = ({
25250
25258
  Promise.resolve().then(() => (init_webrtc_service(), webrtc_service_exports)).then(({ setWebRTCCallbacks: setWebRTCCallbacks2 }) => {
25251
25259
  setWebRTCCallbacks2({
25252
25260
  onNavigationCommand: (command) => {
25253
- if (command.data.actionType === "navigate" && command.data.routeName) {
25261
+ const data = command.data ?? command;
25262
+ if (!data?.actionType) return;
25263
+ if (data.actionType === "navigate" && data.routeName) {
25254
25264
  if (navigationHandler2) {
25255
- navigationHandler2(command.data.routeName);
25265
+ navigationHandler2(data.routeName);
25256
25266
  }
25257
- } else if (command.data.actionType === "click" && command.data.elementId) {
25258
- console.log("AI intent: Click element", command.data.elementId);
25267
+ } else if (data.actionType === "click" && data.elementId) {
25268
+ console.log("AI intent: Click element", data.elementId);
25259
25269
  }
25260
25270
  },
25261
25271
  onConnectionStateChange: (state) => {
@@ -39769,8 +39779,9 @@ var ChatPopup = ({
39769
39779
  style: {
39770
39780
  padding: "10px 12px",
39771
39781
  borderRadius: 8,
39772
- border: "1px solid hsl(var(--voice-accent))",
39773
- background: "hsl(var(--voice-accent))",
39782
+ border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
39783
+ background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
39784
+ color: "#fff",
39774
39785
  fontSize: 12,
39775
39786
  fontWeight: 700,
39776
39787
  display: "flex",
@@ -39782,25 +39793,7 @@ var ChatPopup = ({
39782
39793
  "aria-label": muteState.isMuted ? "Unmute microphone" : "Mute microphone",
39783
39794
  title: muteState.isMuted ? "Unmute microphone" : "Mute microphone"
39784
39795
  },
39785
- muteState.isMuted ? /* @__PURE__ */ import_react14.default.createElement(
39786
- mic_off_default,
39787
- {
39788
- style: {
39789
- width: 16,
39790
- height: 16,
39791
- color: "hsl(var(--voice-user-text))"
39792
- }
39793
- }
39794
- ) : /* @__PURE__ */ import_react14.default.createElement(
39795
- mic_default,
39796
- {
39797
- style: {
39798
- width: 16,
39799
- height: 16,
39800
- color: "hsl(var(--voice-user-text))"
39801
- }
39802
- }
39803
- )
39796
+ muteState.isMuted ? /* @__PURE__ */ import_react14.default.createElement(mic_off_default, { style: { width: 16, height: 16, color: "#fff" } }) : /* @__PURE__ */ import_react14.default.createElement(mic_default, { style: { width: 16, height: 16, color: "#fff" } })
39804
39797
  ),
39805
39798
  isConnected2 && onEndCall && /* @__PURE__ */ import_react14.default.createElement(
39806
39799
  "button",
@@ -39810,9 +39803,9 @@ var ChatPopup = ({
39810
39803
  style: {
39811
39804
  padding: "10px 12px",
39812
39805
  borderRadius: 8,
39813
- border: "1px solid hsl(var(--voice-accent))",
39814
- background: "hsl(var(--voice-accent))",
39815
- color: "hsl(var(--voice-user-text))",
39806
+ border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
39807
+ background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
39808
+ color: "#fff",
39816
39809
  fontSize: 12,
39817
39810
  fontWeight: 700,
39818
39811
  display: "flex",
@@ -39821,7 +39814,7 @@ var ChatPopup = ({
39821
39814
  cursor: "pointer"
39822
39815
  }
39823
39816
  },
39824
- /* @__PURE__ */ import_react14.default.createElement(phone_off_default, { style: { width: 16, height: 16 } })
39817
+ /* @__PURE__ */ import_react14.default.createElement(phone_off_default, { style: { width: 16, height: 16, color: "#fff" } })
39825
39818
  )
39826
39819
  )
39827
39820
  )
@@ -39849,7 +39842,7 @@ var BorderGlow = ({ isActive }) => {
39849
39842
  right: 0,
39850
39843
  bottom: 0,
39851
39844
  width: "4px",
39852
- background: "linear-gradient(to bottom, #06b6d4, #3b82f6, #2563eb)",
39845
+ background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
39853
39846
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39854
39847
  opacity: 0.8
39855
39848
  },
@@ -39859,7 +39852,7 @@ var BorderGlow = ({ isActive }) => {
39859
39852
  right: 0,
39860
39853
  bottom: 0,
39861
39854
  width: "8px",
39862
- background: "linear-gradient(to bottom, #22d3ee, #3b82f6, #3b82f6)",
39855
+ background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
39863
39856
  filter: "blur(4px)",
39864
39857
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39865
39858
  opacity: 0.6
@@ -39870,7 +39863,7 @@ var BorderGlow = ({ isActive }) => {
39870
39863
  right: 0,
39871
39864
  bottom: 0,
39872
39865
  width: "16px",
39873
- background: "linear-gradient(to bottom, #67e8f9, #3b82f6, #60a5fa)",
39866
+ background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
39874
39867
  filter: "blur(12px)",
39875
39868
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39876
39869
  opacity: 0.4
@@ -39881,7 +39874,7 @@ var BorderGlow = ({ isActive }) => {
39881
39874
  left: 0,
39882
39875
  bottom: 0,
39883
39876
  width: "4px",
39884
- background: "linear-gradient(to bottom, #f59e0b, #3b82f6, #2563eb)",
39877
+ background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
39885
39878
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39886
39879
  opacity: 0.8
39887
39880
  },
@@ -39891,7 +39884,7 @@ var BorderGlow = ({ isActive }) => {
39891
39884
  left: 0,
39892
39885
  bottom: 0,
39893
39886
  width: "8px",
39894
- background: "linear-gradient(to bottom, #f59e0b, #3b82f6, #3b82f6)",
39887
+ background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
39895
39888
  filter: "blur(4px)",
39896
39889
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39897
39890
  opacity: 0.6
@@ -39902,7 +39895,7 @@ var BorderGlow = ({ isActive }) => {
39902
39895
  left: 0,
39903
39896
  bottom: 0,
39904
39897
  width: "16px",
39905
- background: "linear-gradient(to bottom, #f59e0b, #3b82f6, #60a5fa)",
39898
+ background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
39906
39899
  filter: "blur(12px)",
39907
39900
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
39908
39901
  opacity: 0.4
@@ -39913,7 +39906,7 @@ var BorderGlow = ({ isActive }) => {
39913
39906
  left: 0,
39914
39907
  width: "32px",
39915
39908
  height: "32px",
39916
- background: "#f59e0b",
39909
+ background: "#9a92f6",
39917
39910
  borderBottomRightRadius: "50%",
39918
39911
  filter: "blur(16px)",
39919
39912
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -39925,7 +39918,7 @@ var BorderGlow = ({ isActive }) => {
39925
39918
  right: 0,
39926
39919
  width: "32px",
39927
39920
  height: "32px",
39928
- background: "#06b6d4",
39921
+ background: "#A39EEC",
39929
39922
  borderBottomLeftRadius: "50%",
39930
39923
  filter: "blur(16px)",
39931
39924
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -39937,7 +39930,7 @@ var BorderGlow = ({ isActive }) => {
39937
39930
  right: 0,
39938
39931
  width: "32px",
39939
39932
  height: "32px",
39940
- background: "#3b82f6",
39933
+ background: "#8177ed",
39941
39934
  borderTopLeftRadius: "50%",
39942
39935
  filter: "blur(16px)",
39943
39936
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -39949,7 +39942,7 @@ var BorderGlow = ({ isActive }) => {
39949
39942
  left: 0,
39950
39943
  width: "32px",
39951
39944
  height: "32px",
39952
- background: "#2563eb",
39945
+ background: "#6257d9",
39953
39946
  borderTopRightRadius: "50%",
39954
39947
  filter: "blur(16px)",
39955
39948
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -42055,7 +42048,8 @@ var MicButton = ({
42055
42048
  showBorderGlow = false,
42056
42049
  language,
42057
42050
  defaultLanguage,
42058
- onLanguageChange
42051
+ onLanguageChange,
42052
+ showLanguageDropdown = true
42059
42053
  }) => {
42060
42054
  const { apiKey, appId } = useAnsyrContext();
42061
42055
  const [showBodyGlow, setShowBodyGlow] = (0, import_react20.useState)(false);
@@ -42214,6 +42208,7 @@ var MicButton = ({
42214
42208
  );
42215
42209
  const handleLanguageConfirm = (0, import_react20.useCallback)(() => {
42216
42210
  setShowLanguageSelector(false);
42211
+ openChat();
42217
42212
  voiceConnect(`user_${Date.now()}`, apiKey, appId, selectedLanguage).then(() => {
42218
42213
  if (showBorderGlow) setShowBodyGlow(true);
42219
42214
  openChat();
@@ -42230,10 +42225,11 @@ var MicButton = ({
42230
42225
  }).catch((error) => {
42231
42226
  });
42232
42227
  } else {
42233
- if (!language && !defaultLanguage && !selectedLanguage) {
42228
+ if (showLanguageDropdown && !language && !defaultLanguage && !selectedLanguage) {
42234
42229
  setShowLanguageSelector(true);
42235
42230
  return;
42236
42231
  }
42232
+ openChat();
42237
42233
  voiceConnect(`user_${Date.now()}`, apiKey, appId, selectedLanguage).then(() => {
42238
42234
  if (showBorderGlow) setShowBodyGlow(true);
42239
42235
  openChat();
@@ -42252,6 +42248,7 @@ var MicButton = ({
42252
42248
  appId,
42253
42249
  language,
42254
42250
  selectedLanguage,
42251
+ showLanguageDropdown,
42255
42252
  openChat,
42256
42253
  showBorderGlow,
42257
42254
  sendChatMessage,
@@ -42343,6 +42340,7 @@ var MicButton = ({
42343
42340
  };
42344
42341
  }
42345
42342
  };
42343
+ const micButtonGradient = currentTheme === "dark" ? "radial-gradient(circle at 50% 0%, #9a92f6, #5447cd)" : "radial-gradient(circle at 50% 0%, #9a92f6, #6257d9)";
42346
42344
  const buttonStyles = {
42347
42345
  container: {
42348
42346
  position: "relative",
@@ -42358,7 +42356,7 @@ var MicButton = ({
42358
42356
  width: `${buttonSize}px`,
42359
42357
  height: `${buttonSize}px`,
42360
42358
  borderRadius: "50%",
42361
- background: "oklch(0.23 0.08 252.75)",
42359
+ background: micButtonGradient,
42362
42360
  transition: "all 0.5s",
42363
42361
  border: "none",
42364
42362
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
@@ -42377,18 +42375,18 @@ var MicButton = ({
42377
42375
  switch (micState) {
42378
42376
  case "listening":
42379
42377
  baseStyle.transform = "scale(1.05)";
42380
- baseStyle.boxShadow = "0 25px 50px -12px rgba(59, 130, 246, 0.6)";
42378
+ baseStyle.boxShadow = "0 25px 50px -12px rgba(129, 119, 237, 0.6)";
42381
42379
  break;
42382
42380
  case "thinking":
42383
42381
  baseStyle.transform = "scale(1.02)";
42384
- baseStyle.boxShadow = "0 20px 25px -5px rgba(196, 132, 252, 0.4)";
42382
+ baseStyle.boxShadow = "0 20px 25px -5px rgba(154, 146, 246, 0.4)";
42385
42383
  break;
42386
42384
  case "replying":
42387
42385
  baseStyle.transform = "scale(1.02)";
42388
- baseStyle.boxShadow = "0 20px 25px -5px rgba(34, 211, 238, 0.4)";
42386
+ baseStyle.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
42389
42387
  break;
42390
42388
  default:
42391
- baseStyle.boxShadow = "0 10px 15px -3px rgba(59, 130, 246, 0.3)";
42389
+ baseStyle.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
42392
42390
  break;
42393
42391
  }
42394
42392
  return baseStyle;
@@ -42400,7 +42398,7 @@ var MicButton = ({
42400
42398
  className: `cuekit-voice-popup ${currentTheme === "dark" ? "cuekit-dark" : ""}`,
42401
42399
  style: { ...buttonStyles.container, ...getPositionStyle() }
42402
42400
  },
42403
- showLanguageSelector ? /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-language-selection" }, /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-language-header" }, /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-language-icon" }, /* @__PURE__ */ import_react20.default.createElement(mic_default, { width: 20, height: 20 })), /* @__PURE__ */ import_react20.default.createElement("span", { className: "voice-chat-language-title" }, "Select Language")), /* @__PURE__ */ import_react20.default.createElement(
42401
+ showLanguageSelector && showLanguageDropdown ? /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-language-selection" }, /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-language-header" }, /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-language-icon" }, /* @__PURE__ */ import_react20.default.createElement(mic_default, { width: 20, height: 20 })), /* @__PURE__ */ import_react20.default.createElement("span", { className: "voice-chat-language-title" }, "Select Language")), /* @__PURE__ */ import_react20.default.createElement(
42404
42402
  LanguageSelector,
42405
42403
  {
42406
42404
  selectedLanguage,
@@ -42413,10 +42411,27 @@ var MicButton = ({
42413
42411
  "button",
42414
42412
  {
42415
42413
  className: "voice-chat-cancel-button",
42416
- onClick: () => setShowLanguageSelector(false)
42414
+ onClick: () => setShowLanguageSelector(false),
42415
+ style: {
42416
+ background: currentTheme === "dark" ? "hsl(248 32% 17.5%)" : "#f6f5ff",
42417
+ color: currentTheme === "dark" ? "hsl(252 20% 65%)" : "#6257d9",
42418
+ border: `1px solid ${currentTheme === "dark" ? "hsl(248 32% 22%)" : "#c0bbfb"}`
42419
+ }
42417
42420
  },
42418
42421
  "Cancel"
42419
- ), /* @__PURE__ */ import_react20.default.createElement("button", { className: "voice-chat-confirm-button", onClick: handleLanguageConfirm }, "Start Voice Chat"))) : /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-main-button" }, /* @__PURE__ */ import_react20.default.createElement(
42422
+ ), /* @__PURE__ */ import_react20.default.createElement(
42423
+ "button",
42424
+ {
42425
+ className: "voice-chat-confirm-button",
42426
+ onClick: handleLanguageConfirm,
42427
+ style: {
42428
+ background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
42429
+ color: "#fff",
42430
+ border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`
42431
+ }
42432
+ },
42433
+ "Start Voice Chat"
42434
+ ))) : /* @__PURE__ */ import_react20.default.createElement("div", { className: "voice-chat-main-button" }, showLanguageDropdown && /* @__PURE__ */ import_react20.default.createElement(
42420
42435
  LanguageSelector,
42421
42436
  {
42422
42437
  selectedLanguage,
@@ -42432,18 +42447,18 @@ var MicButton = ({
42432
42447
  {
42433
42448
  "data-testid": "ignore",
42434
42449
  onClick: handleMicClick,
42435
- disabled: micState === "thinking" || micState === "replying",
42450
+ disabled: micState === "thinking" || micState === "replying" || isConnecting,
42436
42451
  style: getDynamicButtonStyle(),
42437
42452
  onMouseEnter: (e3) => {
42438
42453
  if (micState === "idle") {
42439
42454
  e3.currentTarget.style.transform = "scale(1.05)";
42440
- e3.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(59, 130, 246, 0.4)";
42455
+ e3.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
42441
42456
  }
42442
42457
  },
42443
42458
  onMouseLeave: (e3) => {
42444
42459
  if (micState === "idle") {
42445
42460
  e3.currentTarget.style.transform = "scale(1)";
42446
- e3.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(59, 130, 246, 0.3)";
42461
+ e3.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
42447
42462
  }
42448
42463
  },
42449
42464
  "aria-label": micState === "thinking" ? "Processing..." : micState === "replying" ? "AI is responding..." : isListening ? "Stop listening" : "Start listening"
@@ -42510,7 +42525,7 @@ var MicButton = ({
42510
42525
  onClick: restoreChat,
42511
42526
  style: {
42512
42527
  position: "fixed",
42513
- zIndex: 5e5,
42528
+ zIndex: 999,
42514
42529
  bottom: bottomSpace + buttonSize + 30,
42515
42530
  right: screenPosition === "bottom-right" ? 20 : void 0,
42516
42531
  left: screenPosition === "bottom-left" ? 20 : screenPosition === "bottom-center" ? "50%" : void 0,
package/dist/index.mjs CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  setWebRTCCallbacks,
38
38
  setWebRTCConfig,
39
39
  validateDynamicElements
40
- } from "./chunk-WBAYQSGF.mjs";
40
+ } from "./chunk-JVYSFKMO.mjs";
41
41
 
42
42
  // node_modules/inline-style-parser/index.js
43
43
  var require_inline_style_parser = __commonJS({
@@ -1293,15 +1293,17 @@ var AnsyrProvider = ({
1293
1293
  };
1294
1294
  }, [navigationHandler]);
1295
1295
  useEffect(() => {
1296
- import("./webrtc-service-CJ34OHJN.mjs").then(({ setWebRTCCallbacks: setWebRTCCallbacks2 }) => {
1296
+ import("./webrtc-service-KN5SEJKS.mjs").then(({ setWebRTCCallbacks: setWebRTCCallbacks2 }) => {
1297
1297
  setWebRTCCallbacks2({
1298
1298
  onNavigationCommand: (command) => {
1299
- if (command.data.actionType === "navigate" && command.data.routeName) {
1299
+ const data = command.data ?? command;
1300
+ if (!data?.actionType) return;
1301
+ if (data.actionType === "navigate" && data.routeName) {
1300
1302
  if (navigationHandler) {
1301
- navigationHandler(command.data.routeName);
1303
+ navigationHandler(data.routeName);
1302
1304
  }
1303
- } else if (command.data.actionType === "click" && command.data.elementId) {
1304
- console.log("AI intent: Click element", command.data.elementId);
1305
+ } else if (data.actionType === "click" && data.elementId) {
1306
+ console.log("AI intent: Click element", data.elementId);
1305
1307
  }
1306
1308
  },
1307
1309
  onConnectionStateChange: (state) => {
@@ -15809,8 +15811,9 @@ var ChatPopup = ({
15809
15811
  style: {
15810
15812
  padding: "10px 12px",
15811
15813
  borderRadius: 8,
15812
- border: "1px solid hsl(var(--voice-accent))",
15813
- background: "hsl(var(--voice-accent))",
15814
+ border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
15815
+ background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
15816
+ color: "#fff",
15814
15817
  fontSize: 12,
15815
15818
  fontWeight: 700,
15816
15819
  display: "flex",
@@ -15822,25 +15825,7 @@ var ChatPopup = ({
15822
15825
  "aria-label": muteState.isMuted ? "Unmute microphone" : "Mute microphone",
15823
15826
  title: muteState.isMuted ? "Unmute microphone" : "Mute microphone"
15824
15827
  },
15825
- muteState.isMuted ? /* @__PURE__ */ React10.createElement(
15826
- mic_off_default,
15827
- {
15828
- style: {
15829
- width: 16,
15830
- height: 16,
15831
- color: "hsl(var(--voice-user-text))"
15832
- }
15833
- }
15834
- ) : /* @__PURE__ */ React10.createElement(
15835
- mic_default,
15836
- {
15837
- style: {
15838
- width: 16,
15839
- height: 16,
15840
- color: "hsl(var(--voice-user-text))"
15841
- }
15842
- }
15843
- )
15828
+ muteState.isMuted ? /* @__PURE__ */ React10.createElement(mic_off_default, { style: { width: 16, height: 16, color: "#fff" } }) : /* @__PURE__ */ React10.createElement(mic_default, { style: { width: 16, height: 16, color: "#fff" } })
15844
15829
  ),
15845
15830
  isConnected && onEndCall && /* @__PURE__ */ React10.createElement(
15846
15831
  "button",
@@ -15850,9 +15835,9 @@ var ChatPopup = ({
15850
15835
  style: {
15851
15836
  padding: "10px 12px",
15852
15837
  borderRadius: 8,
15853
- border: "1px solid hsl(var(--voice-accent))",
15854
- background: "hsl(var(--voice-accent))",
15855
- color: "hsl(var(--voice-user-text))",
15838
+ border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`,
15839
+ background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
15840
+ color: "#fff",
15856
15841
  fontSize: 12,
15857
15842
  fontWeight: 700,
15858
15843
  display: "flex",
@@ -15861,7 +15846,7 @@ var ChatPopup = ({
15861
15846
  cursor: "pointer"
15862
15847
  }
15863
15848
  },
15864
- /* @__PURE__ */ React10.createElement(phone_off_default, { style: { width: 16, height: 16 } })
15849
+ /* @__PURE__ */ React10.createElement(phone_off_default, { style: { width: 16, height: 16, color: "#fff" } })
15865
15850
  )
15866
15851
  )
15867
15852
  )
@@ -15889,7 +15874,7 @@ var BorderGlow = ({ isActive }) => {
15889
15874
  right: 0,
15890
15875
  bottom: 0,
15891
15876
  width: "4px",
15892
- background: "linear-gradient(to bottom, #06b6d4, #3b82f6, #2563eb)",
15877
+ background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
15893
15878
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
15894
15879
  opacity: 0.8
15895
15880
  },
@@ -15899,7 +15884,7 @@ var BorderGlow = ({ isActive }) => {
15899
15884
  right: 0,
15900
15885
  bottom: 0,
15901
15886
  width: "8px",
15902
- background: "linear-gradient(to bottom, #22d3ee, #3b82f6, #3b82f6)",
15887
+ background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
15903
15888
  filter: "blur(4px)",
15904
15889
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
15905
15890
  opacity: 0.6
@@ -15910,7 +15895,7 @@ var BorderGlow = ({ isActive }) => {
15910
15895
  right: 0,
15911
15896
  bottom: 0,
15912
15897
  width: "16px",
15913
- background: "linear-gradient(to bottom, #67e8f9, #3b82f6, #60a5fa)",
15898
+ background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
15914
15899
  filter: "blur(12px)",
15915
15900
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
15916
15901
  opacity: 0.4
@@ -15921,7 +15906,7 @@ var BorderGlow = ({ isActive }) => {
15921
15906
  left: 0,
15922
15907
  bottom: 0,
15923
15908
  width: "4px",
15924
- background: "linear-gradient(to bottom, #f59e0b, #3b82f6, #2563eb)",
15909
+ background: "linear-gradient(to bottom, #A39EEC, #8177ed, #6257d9)",
15925
15910
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
15926
15911
  opacity: 0.8
15927
15912
  },
@@ -15931,7 +15916,7 @@ var BorderGlow = ({ isActive }) => {
15931
15916
  left: 0,
15932
15917
  bottom: 0,
15933
15918
  width: "8px",
15934
- background: "linear-gradient(to bottom, #f59e0b, #3b82f6, #3b82f6)",
15919
+ background: "linear-gradient(to bottom, #c0bbfb, #8177ed, #8177ed)",
15935
15920
  filter: "blur(4px)",
15936
15921
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
15937
15922
  opacity: 0.6
@@ -15942,7 +15927,7 @@ var BorderGlow = ({ isActive }) => {
15942
15927
  left: 0,
15943
15928
  bottom: 0,
15944
15929
  width: "16px",
15945
- background: "linear-gradient(to bottom, #f59e0b, #3b82f6, #60a5fa)",
15930
+ background: "linear-gradient(to bottom, #dad7fe, #8177ed, #9a92f6)",
15946
15931
  filter: "blur(12px)",
15947
15932
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
15948
15933
  opacity: 0.4
@@ -15953,7 +15938,7 @@ var BorderGlow = ({ isActive }) => {
15953
15938
  left: 0,
15954
15939
  width: "32px",
15955
15940
  height: "32px",
15956
- background: "#f59e0b",
15941
+ background: "#9a92f6",
15957
15942
  borderBottomRightRadius: "50%",
15958
15943
  filter: "blur(16px)",
15959
15944
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -15965,7 +15950,7 @@ var BorderGlow = ({ isActive }) => {
15965
15950
  right: 0,
15966
15951
  width: "32px",
15967
15952
  height: "32px",
15968
- background: "#06b6d4",
15953
+ background: "#A39EEC",
15969
15954
  borderBottomLeftRadius: "50%",
15970
15955
  filter: "blur(16px)",
15971
15956
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -15977,7 +15962,7 @@ var BorderGlow = ({ isActive }) => {
15977
15962
  right: 0,
15978
15963
  width: "32px",
15979
15964
  height: "32px",
15980
- background: "#3b82f6",
15965
+ background: "#8177ed",
15981
15966
  borderTopLeftRadius: "50%",
15982
15967
  filter: "blur(16px)",
15983
15968
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -15989,7 +15974,7 @@ var BorderGlow = ({ isActive }) => {
15989
15974
  left: 0,
15990
15975
  width: "32px",
15991
15976
  height: "32px",
15992
- background: "#2563eb",
15977
+ background: "#6257d9",
15993
15978
  borderTopRightRadius: "50%",
15994
15979
  filter: "blur(16px)",
15995
15980
  animation: "borderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
@@ -18086,7 +18071,8 @@ var MicButton = ({
18086
18071
  showBorderGlow = false,
18087
18072
  language,
18088
18073
  defaultLanguage,
18089
- onLanguageChange
18074
+ onLanguageChange,
18075
+ showLanguageDropdown = true
18090
18076
  }) => {
18091
18077
  const { apiKey, appId } = useAnsyrContext();
18092
18078
  const [showBodyGlow, setShowBodyGlow] = useState12(false);
@@ -18245,6 +18231,7 @@ var MicButton = ({
18245
18231
  );
18246
18232
  const handleLanguageConfirm = useCallback6(() => {
18247
18233
  setShowLanguageSelector(false);
18234
+ openChat();
18248
18235
  voiceConnect(`user_${Date.now()}`, apiKey, appId, selectedLanguage).then(() => {
18249
18236
  if (showBorderGlow) setShowBodyGlow(true);
18250
18237
  openChat();
@@ -18261,10 +18248,11 @@ var MicButton = ({
18261
18248
  }).catch((error) => {
18262
18249
  });
18263
18250
  } else {
18264
- if (!language && !defaultLanguage && !selectedLanguage) {
18251
+ if (showLanguageDropdown && !language && !defaultLanguage && !selectedLanguage) {
18265
18252
  setShowLanguageSelector(true);
18266
18253
  return;
18267
18254
  }
18255
+ openChat();
18268
18256
  voiceConnect(`user_${Date.now()}`, apiKey, appId, selectedLanguage).then(() => {
18269
18257
  if (showBorderGlow) setShowBodyGlow(true);
18270
18258
  openChat();
@@ -18283,6 +18271,7 @@ var MicButton = ({
18283
18271
  appId,
18284
18272
  language,
18285
18273
  selectedLanguage,
18274
+ showLanguageDropdown,
18286
18275
  openChat,
18287
18276
  showBorderGlow,
18288
18277
  sendChatMessage,
@@ -18374,6 +18363,7 @@ var MicButton = ({
18374
18363
  };
18375
18364
  }
18376
18365
  };
18366
+ const micButtonGradient = currentTheme === "dark" ? "radial-gradient(circle at 50% 0%, #9a92f6, #5447cd)" : "radial-gradient(circle at 50% 0%, #9a92f6, #6257d9)";
18377
18367
  const buttonStyles = {
18378
18368
  container: {
18379
18369
  position: "relative",
@@ -18389,7 +18379,7 @@ var MicButton = ({
18389
18379
  width: `${buttonSize}px`,
18390
18380
  height: `${buttonSize}px`,
18391
18381
  borderRadius: "50%",
18392
- background: "oklch(0.23 0.08 252.75)",
18382
+ background: micButtonGradient,
18393
18383
  transition: "all 0.5s",
18394
18384
  border: "none",
18395
18385
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
@@ -18408,18 +18398,18 @@ var MicButton = ({
18408
18398
  switch (micState) {
18409
18399
  case "listening":
18410
18400
  baseStyle.transform = "scale(1.05)";
18411
- baseStyle.boxShadow = "0 25px 50px -12px rgba(59, 130, 246, 0.6)";
18401
+ baseStyle.boxShadow = "0 25px 50px -12px rgba(129, 119, 237, 0.6)";
18412
18402
  break;
18413
18403
  case "thinking":
18414
18404
  baseStyle.transform = "scale(1.02)";
18415
- baseStyle.boxShadow = "0 20px 25px -5px rgba(196, 132, 252, 0.4)";
18405
+ baseStyle.boxShadow = "0 20px 25px -5px rgba(154, 146, 246, 0.4)";
18416
18406
  break;
18417
18407
  case "replying":
18418
18408
  baseStyle.transform = "scale(1.02)";
18419
- baseStyle.boxShadow = "0 20px 25px -5px rgba(34, 211, 238, 0.4)";
18409
+ baseStyle.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
18420
18410
  break;
18421
18411
  default:
18422
- baseStyle.boxShadow = "0 10px 15px -3px rgba(59, 130, 246, 0.3)";
18412
+ baseStyle.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
18423
18413
  break;
18424
18414
  }
18425
18415
  return baseStyle;
@@ -18431,7 +18421,7 @@ var MicButton = ({
18431
18421
  className: `cuekit-voice-popup ${currentTheme === "dark" ? "cuekit-dark" : ""}`,
18432
18422
  style: { ...buttonStyles.container, ...getPositionStyle() }
18433
18423
  },
18434
- showLanguageSelector ? /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-language-selection" }, /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-language-header" }, /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-language-icon" }, /* @__PURE__ */ React15.createElement(mic_default, { width: 20, height: 20 })), /* @__PURE__ */ React15.createElement("span", { className: "voice-chat-language-title" }, "Select Language")), /* @__PURE__ */ React15.createElement(
18424
+ showLanguageSelector && showLanguageDropdown ? /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-language-selection" }, /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-language-header" }, /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-language-icon" }, /* @__PURE__ */ React15.createElement(mic_default, { width: 20, height: 20 })), /* @__PURE__ */ React15.createElement("span", { className: "voice-chat-language-title" }, "Select Language")), /* @__PURE__ */ React15.createElement(
18435
18425
  LanguageSelector,
18436
18426
  {
18437
18427
  selectedLanguage,
@@ -18444,10 +18434,27 @@ var MicButton = ({
18444
18434
  "button",
18445
18435
  {
18446
18436
  className: "voice-chat-cancel-button",
18447
- onClick: () => setShowLanguageSelector(false)
18437
+ onClick: () => setShowLanguageSelector(false),
18438
+ style: {
18439
+ background: currentTheme === "dark" ? "hsl(248 32% 17.5%)" : "#f6f5ff",
18440
+ color: currentTheme === "dark" ? "hsl(252 20% 65%)" : "#6257d9",
18441
+ border: `1px solid ${currentTheme === "dark" ? "hsl(248 32% 22%)" : "#c0bbfb"}`
18442
+ }
18448
18443
  },
18449
18444
  "Cancel"
18450
- ), /* @__PURE__ */ React15.createElement("button", { className: "voice-chat-confirm-button", onClick: handleLanguageConfirm }, "Start Voice Chat"))) : /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-main-button" }, /* @__PURE__ */ React15.createElement(
18445
+ ), /* @__PURE__ */ React15.createElement(
18446
+ "button",
18447
+ {
18448
+ className: "voice-chat-confirm-button",
18449
+ onClick: handleLanguageConfirm,
18450
+ style: {
18451
+ background: currentTheme === "dark" ? "#8177ed" : "#6257d9",
18452
+ color: "#fff",
18453
+ border: `1px solid ${currentTheme === "dark" ? "#8177ed" : "#6257d9"}`
18454
+ }
18455
+ },
18456
+ "Start Voice Chat"
18457
+ ))) : /* @__PURE__ */ React15.createElement("div", { className: "voice-chat-main-button" }, showLanguageDropdown && /* @__PURE__ */ React15.createElement(
18451
18458
  LanguageSelector,
18452
18459
  {
18453
18460
  selectedLanguage,
@@ -18463,18 +18470,18 @@ var MicButton = ({
18463
18470
  {
18464
18471
  "data-testid": "ignore",
18465
18472
  onClick: handleMicClick,
18466
- disabled: micState === "thinking" || micState === "replying",
18473
+ disabled: micState === "thinking" || micState === "replying" || isConnecting,
18467
18474
  style: getDynamicButtonStyle(),
18468
18475
  onMouseEnter: (e2) => {
18469
18476
  if (micState === "idle") {
18470
18477
  e2.currentTarget.style.transform = "scale(1.05)";
18471
- e2.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(59, 130, 246, 0.4)";
18478
+ e2.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(129, 119, 237, 0.4)";
18472
18479
  }
18473
18480
  },
18474
18481
  onMouseLeave: (e2) => {
18475
18482
  if (micState === "idle") {
18476
18483
  e2.currentTarget.style.transform = "scale(1)";
18477
- e2.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(59, 130, 246, 0.3)";
18484
+ e2.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(129, 119, 237, 0.3)";
18478
18485
  }
18479
18486
  },
18480
18487
  "aria-label": micState === "thinking" ? "Processing..." : micState === "replying" ? "AI is responding..." : isListening ? "Stop listening" : "Start listening"
@@ -18541,7 +18548,7 @@ var MicButton = ({
18541
18548
  onClick: restoreChat,
18542
18549
  style: {
18543
18550
  position: "fixed",
18544
- zIndex: 5e5,
18551
+ zIndex: 999,
18545
18552
  bottom: bottomSpace + buttonSize + 30,
18546
18553
  right: screenPosition === "bottom-right" ? 20 : void 0,
18547
18554
  left: screenPosition === "bottom-left" ? 20 : screenPosition === "bottom-center" ? "50%" : void 0,
@@ -15,7 +15,7 @@ import {
15
15
  setAudioContainer,
16
16
  setServerUrl,
17
17
  setWebRTCCallbacks
18
- } from "./chunk-WBAYQSGF.mjs";
18
+ } from "./chunk-JVYSFKMO.mjs";
19
19
  export {
20
20
  authenticate,
21
21
  connectToRoom,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuekit-ai/react",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {